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 @@
{"version":3,"file":"convertX509PublicKeyToCOSE.d.ts","sourceRoot":"","sources":["../../src/helpers/convertX509PublicKeyToCOSE.ts"],"names":[],"mappings":"AAKA,OAAO,EAIL,aAAa,EAGd,MAAM,WAAW,CAAC;AAEnB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,wBAAgB,0BAA0B,CACxC,eAAe,EAAE,WAAW,GAC3B,aAAa,CA+Ff"}
@@ -0,0 +1 @@
{"mappings":";;;AAAA;;;;;;;;;;CAUC;;AAUD,IAAI,uCAAiB,OAAO,aAAa,eAAe,OAAO,cAAc;AAEtE,SAAS;IACd,IAAI,QAAQ,CAAA,GAAA,eAAO;IACnB,IAAI,CAAC,MAAM,QAAQ,GAAG,CAAA,GAAA,eAAO,EAAE,IAAM,QAAQ;YAAC,OAAO;YAAG,QAAQ;QAAC,IAAI;IAErE,CAAA,GAAA,gBAAQ,EAAE;QACR,wFAAwF;QACxF,IAAI,WAAW;YACb,QAAQ,CAAA;gBACN,IAAI,UAAU;gBACd,IAAI,QAAQ,KAAK,KAAK,KAAK,KAAK,IAAI,QAAQ,MAAM,KAAK,KAAK,MAAM,EAChE,OAAO;gBAET,OAAO;YACT;QACF;QAEA,IAAI,CAAC,sCACH,OAAO,gBAAgB,CAAC,UAAU;aAElC,qCAAe,gBAAgB,CAAC,UAAU;QAG5C,OAAO;YACL,IAAI,CAAC,sCACH,OAAO,mBAAmB,CAAC,UAAU;iBAErC,qCAAe,mBAAmB,CAAC,UAAU;QAEjD;IACF,GAAG,EAAE;IAEL,OAAO;AACT;AAEA,SAAS;IACP,OAAO;QACL,OAAO,AAAC,yCAAkB,iDAAA,2DAAA,qCAAgB,KAAK,KAAK,OAAO,UAAU;QACrE,QAAQ,AAAC,yCAAkB,iDAAA,2DAAA,qCAAgB,MAAM,KAAK,OAAO,WAAW;IAC1E;AACF","sources":["packages/@react-aria/utils/src/useViewportSize.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {useEffect, useState} from 'react';\nimport {useIsSSR} from '@react-aria/ssr';\n\ninterface ViewportSize {\n width: number,\n height: number\n}\n\nlet visualViewport = typeof document !== 'undefined' && window.visualViewport;\n\nexport function useViewportSize(): ViewportSize {\n let isSSR = useIsSSR();\n let [size, setSize] = useState(() => isSSR ? {width: 0, height: 0} : getViewportSize());\n\n useEffect(() => {\n // Use visualViewport api to track available height even on iOS virtual keyboard opening\n let onResize = () => {\n setSize(size => {\n let newSize = getViewportSize();\n if (newSize.width === size.width && newSize.height === size.height) {\n return size;\n }\n return newSize;\n });\n };\n\n if (!visualViewport) {\n window.addEventListener('resize', onResize);\n } else {\n visualViewport.addEventListener('resize', onResize);\n }\n\n return () => {\n if (!visualViewport) {\n window.removeEventListener('resize', onResize);\n } else {\n visualViewport.removeEventListener('resize', onResize);\n }\n };\n }, []);\n\n return size;\n}\n\nfunction getViewportSize(): ViewportSize {\n return {\n width: (visualViewport && visualViewport?.width) || window.innerWidth,\n height: (visualViewport && visualViewport?.height) || window.innerHeight\n };\n}\n"],"names":[],"version":3,"file":"useViewportSize.module.js.map"}
@@ -0,0 +1 @@
{"version":3,"names":["_classApplyDescriptorGet","require","_assertClassBrand","_classCheckPrivateStaticFieldDescriptor","_classStaticPrivateFieldSpecGet","receiver","classConstructor","descriptor","assertClassBrand","classCheckPrivateStaticFieldDescriptor","classApplyDescriptorGet"],"sources":["../../src/helpers/classStaticPrivateFieldSpecGet.js"],"sourcesContent":["/* @minVersion 7.0.2 */\n/* @onlyBabel7 */\n\nimport classApplyDescriptorGet from \"classApplyDescriptorGet\";\nimport assertClassBrand from \"assertClassBrand\";\nimport classCheckPrivateStaticFieldDescriptor from \"classCheckPrivateStaticFieldDescriptor\";\nexport default function _classStaticPrivateFieldSpecGet(\n receiver,\n classConstructor,\n descriptor,\n) {\n assertClassBrand(classConstructor, receiver);\n classCheckPrivateStaticFieldDescriptor(descriptor, \"get\");\n return classApplyDescriptorGet(receiver, descriptor);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,wBAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,uCAAA,GAAAF,OAAA;AACe,SAASG,+BAA+BA,CACrDC,QAAQ,EACRC,gBAAgB,EAChBC,UAAU,EACV;EACAC,iBAAgB,CAACF,gBAAgB,EAAED,QAAQ,CAAC;EAC5CI,uCAAsC,CAACF,UAAU,EAAE,KAAK,CAAC;EACzD,OAAOG,wBAAuB,CAACL,QAAQ,EAAEE,UAAU,CAAC;AACtD","ignoreList":[]}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"1":"IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I","2":"C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","194":"0 1 2 3 4 5 GB HB"},C:{"2":"0 1 2 3 4 5 6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC 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 0C 1C","322":"YC yC zC"},D:{"1":"IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","194":"0 1 2 3 4 5 GB HB"},E:{"1":"sC tC DD ED","2":"J ZB K D E F A B C L M G 2C ZC 3C 4C 5C 6C aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC"},F:{"1":"0 1 2 3 4 5 u v w x y z","2":"6 7 8 9 F B C G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l FD GD HD ID NC uC JD OC","194":"m n o p q r s t"},G:{"1":"sC tC","2":"E ZC KD vC LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC"},H:{"2":"hD"},I:{"1":"I","2":"TC J iD jD kD lD vC mD nD"},J:{"2":"D A"},K:{"2":"A B C H NC uC OC"},L:{"1":"I"},M:{"2":"MC"},N:{"2":"A B"},O:{"2":"PC"},P:{"1":"DB EB FB","2":"6 7 8 9 J AB BB CB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"2":"zD"},R:{"2":"0D"},S:{"2":"1D 2D"}},B:5,C:"CSS Anchor Positioning",D:true};
@@ -0,0 +1,34 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var progressbarRole = {
abstract: false,
accessibleNameRequired: true,
baseConcepts: [],
childrenPresentational: true,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-valuetext': null
},
relatedConcepts: [{
concept: {
name: 'progress'
},
module: 'HTML'
}, {
concept: {
name: 'status'
},
module: 'ARIA'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'range'], ['roletype', 'widget']]
};
var _default = exports.default = progressbarRole;
@@ -0,0 +1,53 @@
/**
* Turn markdown into a syntax tree.
*
* @overload
* @param {Value} value
* @param {Encoding | null | undefined} [encoding]
* @param {Options | null | undefined} [options]
* @returns {Root}
*
* @overload
* @param {Value} value
* @param {Options | null | undefined} [options]
* @returns {Root}
*
* @param {Value} value
* Markdown to parse.
* @param {Encoding | Options | null | undefined} [encoding]
* Character encoding for when `value` is `Buffer`.
* @param {Options | null | undefined} [options]
* Configuration.
* @returns {Root}
* mdast tree.
*/
export function fromMarkdown(value: Value, encoding?: Encoding | null | undefined, options?: Options | null | undefined): Root;
/**
* Turn markdown into a syntax tree.
*
* @overload
* @param {Value} value
* @param {Encoding | null | undefined} [encoding]
* @param {Options | null | undefined} [options]
* @returns {Root}
*
* @overload
* @param {Value} value
* @param {Options | null | undefined} [options]
* @returns {Root}
*
* @param {Value} value
* Markdown to parse.
* @param {Encoding | Options | null | undefined} [encoding]
* Character encoding for when `value` is `Buffer`.
* @param {Options | null | undefined} [options]
* Configuration.
* @returns {Root}
* mdast tree.
*/
export function fromMarkdown(value: Value, options?: Options | null | undefined): Root;
import type { Value } from 'micromark-util-types';
import type { Encoding } from 'micromark-util-types';
import type { Options } from './types.js';
import type { Root } from 'mdast';
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,41 @@
var $9e20cff0af27e8cc$exports = require("./platform.main.js");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "isVirtualClick", () => $577e795361f19be9$export$60278871457622de);
$parcel$export(module.exports, "isVirtualPointerEvent", () => $577e795361f19be9$export$29bf1b5f2c56cf63);
/*
* Copyright 2022 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 $577e795361f19be9$export$60278871457622de(event) {
// JAWS/NVDA with Firefox.
if (event.pointerType === '' && event.isTrusted) return true;
// Android TalkBack's detail value varies depending on the event listener providing the event so we have specific logic here instead
// If pointerType is defined, event is from a click listener. For events from mousedown listener, detail === 0 is a sufficient check
// to detect TalkBack virtual clicks.
if ((0, $9e20cff0af27e8cc$exports.isAndroid)() && event.pointerType) return event.type === 'click' && event.buttons === 1;
return event.detail === 0 && !event.pointerType;
}
function $577e795361f19be9$export$29bf1b5f2c56cf63(event) {
// If the pointer size is zero, then we assume it's from a screen reader.
// Android TalkBack double tap will sometimes return a event with width and height of 1
// and pointerType === 'mouse' so we need to check for a specific combination of event attributes.
// Cannot use "event.pressure === 0" as the sole check due to Safari pointer events always returning pressure === 0
// instead of .5, see https://bugs.webkit.org/show_bug.cgi?id=206216. event.pointerType === 'mouse' is to distingush
// Talkback double tap from Windows Firefox touch screen press
return !(0, $9e20cff0af27e8cc$exports.isAndroid)() && event.width === 0 && event.height === 0 || event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === 'mouse';
}
//# sourceMappingURL=isVirtualEvent.main.js.map
@@ -0,0 +1,21 @@
// Adapted from https://github.com/sindresorhus/make-dir
// Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.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.
'use strict'
const path = require('path')
// https://github.com/nodejs/node/issues/8987
// https://github.com/libuv/libuv/pull/1088
module.exports.checkPath = function checkPath (pth) {
if (process.platform === 'win32') {
const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path.parse(pth).root, ''))
if (pathHasInvalidWinCharacters) {
const error = new Error(`Path contains invalid characters: ${pth}`)
error.code = 'EINVAL'
throw error
}
}
}
@@ -0,0 +1,18 @@
import type { ScrollBlot } from 'parchment';
import { EmbedBlot } from 'parchment';
export interface EmbedContextRange {
startNode: Node | Text;
startOffset: number;
endNode?: Node | Text;
endOffset?: number;
}
declare class Embed extends EmbedBlot {
contentNode: HTMLSpanElement;
leftGuard: Text;
rightGuard: Text;
constructor(scroll: ScrollBlot, node: Node);
index(node: Node, offset: number): number;
restore(node: Text): EmbedContextRange | null;
update(mutations: MutationRecord[], context: Record<string, unknown>): void;
}
export default Embed;
@@ -0,0 +1,168 @@
var $625ad1e1f4c43bc1$exports = require("./CalendarDate.main.js");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "EthiopicCalendar", () => $4db04d1051af0f2f$export$26ba6eab5e20cd7d);
$parcel$export(module.exports, "EthiopicAmeteAlemCalendar", () => $4db04d1051af0f2f$export$d72e0c37005a4914);
$parcel$export(module.exports, "CopticCalendar", () => $4db04d1051af0f2f$export$fe6243cbe1a4b7c1);
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/ // Portions of the code in this file are based on code from ICU.
// Original licensing can be found in the NOTICE file in the root directory of this source tree.
const $4db04d1051af0f2f$var$ETHIOPIC_EPOCH = 1723856;
const $4db04d1051af0f2f$var$COPTIC_EPOCH = 1824665;
// The delta between Amete Alem 1 and Amete Mihret 1
// AA 5501 = AM 1
const $4db04d1051af0f2f$var$AMETE_MIHRET_DELTA = 5500;
function $4db04d1051af0f2f$var$ceToJulianDay(epoch, year, month, day) {
return epoch // difference from Julian epoch to 1,1,1
+ 365 * year // number of days from years
+ Math.floor(year / 4) // extra day of leap year
+ 30 * (month - 1 // number of days from months (1 based)
) + day - 1 // number of days for present month (1 based)
;
}
function $4db04d1051af0f2f$var$julianDayToCE(epoch, jd) {
let year = Math.floor(4 * (jd - epoch) / 1461);
let month = 1 + Math.floor((jd - $4db04d1051af0f2f$var$ceToJulianDay(epoch, year, 1, 1)) / 30);
let day = jd + 1 - $4db04d1051af0f2f$var$ceToJulianDay(epoch, year, month, 1);
return [
year,
month,
day
];
}
function $4db04d1051af0f2f$var$getLeapDay(year) {
return Math.floor(year % 4 / 3);
}
function $4db04d1051af0f2f$var$getDaysInMonth(year, month) {
// The Ethiopian and Coptic calendars have 13 months, 12 of 30 days each and
// an intercalary month at the end of the year of 5 or 6 days, depending whether
// the year is a leap year or not. The Leap Year follows the same rules as the
// Julian Calendar so that the extra month always has six days in the year before
// a Julian Leap Year.
if (month % 13 !== 0) // not intercalary month
return 30;
else // intercalary month 5 days + possible leap day
return $4db04d1051af0f2f$var$getLeapDay(year) + 5;
}
class $4db04d1051af0f2f$export$26ba6eab5e20cd7d {
fromJulianDay(jd) {
let [year, month, day] = $4db04d1051af0f2f$var$julianDayToCE($4db04d1051af0f2f$var$ETHIOPIC_EPOCH, jd);
let era = 'AM';
if (year <= 0) {
era = 'AA';
year += $4db04d1051af0f2f$var$AMETE_MIHRET_DELTA;
}
return new (0, $625ad1e1f4c43bc1$exports.CalendarDate)(this, era, year, month, day);
}
toJulianDay(date) {
let year = date.year;
if (date.era === 'AA') year -= $4db04d1051af0f2f$var$AMETE_MIHRET_DELTA;
return $4db04d1051af0f2f$var$ceToJulianDay($4db04d1051af0f2f$var$ETHIOPIC_EPOCH, year, date.month, date.day);
}
getDaysInMonth(date) {
return $4db04d1051af0f2f$var$getDaysInMonth(date.year, date.month);
}
getMonthsInYear() {
return 13;
}
getDaysInYear(date) {
return 365 + $4db04d1051af0f2f$var$getLeapDay(date.year);
}
getYearsInEra(date) {
// 9999-12-31 gregorian is 9992-20-02 ethiopic.
// Round down to 9991 for the last full year.
// AA 9999-01-01 ethiopic is 4506-09-30 gregorian.
return date.era === 'AA' ? 9999 : 9991;
}
getEras() {
return [
'AA',
'AM'
];
}
constructor(){
this.identifier = 'ethiopic';
}
}
class $4db04d1051af0f2f$export$d72e0c37005a4914 extends $4db04d1051af0f2f$export$26ba6eab5e20cd7d {
fromJulianDay(jd) {
let [year, month, day] = $4db04d1051af0f2f$var$julianDayToCE($4db04d1051af0f2f$var$ETHIOPIC_EPOCH, jd);
year += $4db04d1051af0f2f$var$AMETE_MIHRET_DELTA;
return new (0, $625ad1e1f4c43bc1$exports.CalendarDate)(this, 'AA', year, month, day);
}
getEras() {
return [
'AA'
];
}
getYearsInEra() {
// 9999-13-04 ethioaa is the maximum date, which is equivalent to 4506-09-29 gregorian.
return 9999;
}
constructor(...args){
super(...args), this.identifier = 'ethioaa' // also known as 'ethiopic-amete-alem' in ICU
;
}
}
class $4db04d1051af0f2f$export$fe6243cbe1a4b7c1 extends $4db04d1051af0f2f$export$26ba6eab5e20cd7d {
fromJulianDay(jd) {
let [year, month, day] = $4db04d1051af0f2f$var$julianDayToCE($4db04d1051af0f2f$var$COPTIC_EPOCH, jd);
let era = 'CE';
if (year <= 0) {
era = 'BCE';
year = 1 - year;
}
return new (0, $625ad1e1f4c43bc1$exports.CalendarDate)(this, era, year, month, day);
}
toJulianDay(date) {
let year = date.year;
if (date.era === 'BCE') year = 1 - year;
return $4db04d1051af0f2f$var$ceToJulianDay($4db04d1051af0f2f$var$COPTIC_EPOCH, year, date.month, date.day);
}
getDaysInMonth(date) {
let year = date.year;
if (date.era === 'BCE') year = 1 - year;
return $4db04d1051af0f2f$var$getDaysInMonth(year, date.month);
}
isInverseEra(date) {
return date.era === 'BCE';
}
balanceDate(date) {
if (date.year <= 0) {
date.era = date.era === 'BCE' ? 'CE' : 'BCE';
date.year = 1 - date.year;
}
}
getEras() {
return [
'BCE',
'CE'
];
}
getYearsInEra(date) {
// 9999-12-30 gregorian is 9716-02-20 coptic.
// Round down to 9715 for the last full year.
// BCE 9999-01-01 coptic is BC 9716-06-15 gregorian.
return date.era === 'BCE' ? 9999 : 9715;
}
constructor(...args){
super(...args), this.identifier = 'coptic';
}
}
//# sourceMappingURL=EthiopicCalendar.main.js.map
@@ -0,0 +1,29 @@
"use client";
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/base/table-column.tsx
var table_column_exports = {};
__export(table_column_exports, {
default: () => table_column_default
});
module.exports = __toCommonJS(table_column_exports);
var import_table = require("@react-stately/table");
var TableColumn = import_table.Column;
var table_column_default = TableColumn;
@@ -0,0 +1,145 @@
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const net_1 = __importDefault(require("net"));
const tls_1 = __importDefault(require("tls"));
const url_1 = __importDefault(require("url"));
const debug_1 = __importDefault(require("debug"));
const once_1 = __importDefault(require("@tootallnate/once"));
const agent_base_1 = require("agent-base");
const debug = (0, debug_1.default)('http-proxy-agent');
function isHTTPS(protocol) {
return typeof protocol === 'string' ? /^https:?$/i.test(protocol) : false;
}
/**
* The `HttpProxyAgent` implements an HTTP Agent subclass that connects
* to the specified "HTTP proxy server" in order to proxy HTTP requests.
*
* @api public
*/
class HttpProxyAgent extends agent_base_1.Agent {
constructor(_opts) {
let opts;
if (typeof _opts === 'string') {
opts = url_1.default.parse(_opts);
}
else {
opts = _opts;
}
if (!opts) {
throw new Error('an HTTP(S) proxy server `host` and `port` must be specified!');
}
debug('Creating new HttpProxyAgent instance: %o', opts);
super(opts);
const proxy = Object.assign({}, opts);
// If `true`, then connect to the proxy server over TLS.
// Defaults to `false`.
this.secureProxy = opts.secureProxy || isHTTPS(proxy.protocol);
// Prefer `hostname` over `host`, and set the `port` if needed.
proxy.host = proxy.hostname || proxy.host;
if (typeof proxy.port === 'string') {
proxy.port = parseInt(proxy.port, 10);
}
if (!proxy.port && proxy.host) {
proxy.port = this.secureProxy ? 443 : 80;
}
if (proxy.host && proxy.path) {
// If both a `host` and `path` are specified then it's most likely
// the result of a `url.parse()` call... we need to remove the
// `path` portion so that `net.connect()` doesn't attempt to open
// that as a Unix socket file.
delete proxy.path;
delete proxy.pathname;
}
this.proxy = proxy;
}
/**
* Called when the node-core HTTP client library is creating a
* new HTTP request.
*
* @api protected
*/
callback(req, opts) {
return __awaiter(this, void 0, void 0, function* () {
const { proxy, secureProxy } = this;
const parsed = url_1.default.parse(req.path);
if (!parsed.protocol) {
parsed.protocol = 'http:';
}
if (!parsed.hostname) {
parsed.hostname = opts.hostname || opts.host || null;
}
if (parsed.port == null && typeof opts.port) {
parsed.port = String(opts.port);
}
if (parsed.port === '80') {
// if port is 80, then we can remove the port so that the
// ":80" portion is not on the produced URL
parsed.port = '';
}
// Change the `http.ClientRequest` instance's "path" field
// to the absolute path of the URL that will be requested.
req.path = url_1.default.format(parsed);
// Inject the `Proxy-Authorization` header if necessary.
if (proxy.auth) {
req.setHeader('Proxy-Authorization', `Basic ${Buffer.from(proxy.auth).toString('base64')}`);
}
// Create a socket connection to the proxy server.
let socket;
if (secureProxy) {
debug('Creating `tls.Socket`: %o', proxy);
socket = tls_1.default.connect(proxy);
}
else {
debug('Creating `net.Socket`: %o', proxy);
socket = net_1.default.connect(proxy);
}
// At this point, the http ClientRequest's internal `_header` field
// might have already been set. If this is the case then we'll need
// to re-generate the string since we just changed the `req.path`.
if (req._header) {
let first;
let endOfHeaders;
debug('Regenerating stored HTTP header string for request');
req._header = null;
req._implicitHeader();
if (req.output && req.output.length > 0) {
// Node < 12
debug('Patching connection write() output buffer with updated header');
first = req.output[0];
endOfHeaders = first.indexOf('\r\n\r\n') + 4;
req.output[0] = req._header + first.substring(endOfHeaders);
debug('Output buffer: %o', req.output);
}
else if (req.outputData && req.outputData.length > 0) {
// Node >= 12
debug('Patching connection write() output buffer with updated header');
first = req.outputData[0].data;
endOfHeaders = first.indexOf('\r\n\r\n') + 4;
req.outputData[0].data =
req._header + first.substring(endOfHeaders);
debug('Output buffer: %o', req.outputData[0].data);
}
}
// Wait for the socket's `connect` event, so that this `callback()`
// function throws instead of the `http` request machinery. This is
// important for i.e. `PacProxyAgent` which determines a failed proxy
// connection via the `callback()` function throwing.
yield (0, once_1.default)(socket, 'connect');
return socket;
});
}
}
exports.default = HttpProxyAgent;
//# sourceMappingURL=agent.js.map
@@ -0,0 +1,594 @@
/* -*- Mode: js; js-indent-level: 2; -*- */
/*
* Copyright 2011 Mozilla Foundation and contributors
* Licensed under the New BSD license. See LICENSE or:
* http://opensource.org/licenses/BSD-3-Clause
*/
/**
* This is a helper function for getting values from parameter/options
* objects.
*
* @param args The object we are extracting values from
* @param name The name of the property we are getting.
* @param defaultValue An optional value to return if the property is missing
* from the object. If this is not specified and the property is missing, an
* error will be thrown.
*/
function getArg(aArgs, aName, aDefaultValue) {
if (aName in aArgs) {
return aArgs[aName];
} else if (arguments.length === 3) {
return aDefaultValue;
} else {
throw new Error('"' + aName + '" is a required argument.');
}
}
exports.getArg = getArg;
var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;
var dataUrlRegexp = /^data:.+\,.+$/;
function urlParse(aUrl) {
var match = aUrl.match(urlRegexp);
if (!match) {
return null;
}
return {
scheme: match[1],
auth: match[2],
host: match[3],
port: match[4],
path: match[5]
};
}
exports.urlParse = urlParse;
function urlGenerate(aParsedUrl) {
var url = '';
if (aParsedUrl.scheme) {
url += aParsedUrl.scheme + ':';
}
url += '//';
if (aParsedUrl.auth) {
url += aParsedUrl.auth + '@';
}
if (aParsedUrl.host) {
url += aParsedUrl.host;
}
if (aParsedUrl.port) {
url += ":" + aParsedUrl.port
}
if (aParsedUrl.path) {
url += aParsedUrl.path;
}
return url;
}
exports.urlGenerate = urlGenerate;
var MAX_CACHED_INPUTS = 32;
/**
* Takes some function `f(input) -> result` and returns a memoized version of
* `f`.
*
* We keep at most `MAX_CACHED_INPUTS` memoized results of `f` alive. The
* memoization is a dumb-simple, linear least-recently-used cache.
*/
function lruMemoize(f) {
var cache = [];
return function(input) {
for (var i = 0; i < cache.length; i++) {
if (cache[i].input === input) {
var temp = cache[0];
cache[0] = cache[i];
cache[i] = temp;
return cache[0].result;
}
}
var result = f(input);
cache.unshift({
input,
result,
});
if (cache.length > MAX_CACHED_INPUTS) {
cache.pop();
}
return result;
};
}
/**
* Normalizes a path, or the path portion of a URL:
*
* - Replaces consecutive slashes with one slash.
* - Removes unnecessary '.' parts.
* - Removes unnecessary '<dir>/..' parts.
*
* Based on code in the Node.js 'path' core module.
*
* @param aPath The path or url to normalize.
*/
var normalize = lruMemoize(function normalize(aPath) {
var path = aPath;
var url = urlParse(aPath);
if (url) {
if (!url.path) {
return aPath;
}
path = url.path;
}
var isAbsolute = exports.isAbsolute(path);
// Split the path into parts between `/` characters. This is much faster than
// using `.split(/\/+/g)`.
var parts = [];
var start = 0;
var i = 0;
while (true) {
start = i;
i = path.indexOf("/", start);
if (i === -1) {
parts.push(path.slice(start));
break;
} else {
parts.push(path.slice(start, i));
while (i < path.length && path[i] === "/") {
i++;
}
}
}
for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
part = parts[i];
if (part === '.') {
parts.splice(i, 1);
} else if (part === '..') {
up++;
} else if (up > 0) {
if (part === '') {
// The first part is blank if the path is absolute. Trying to go
// above the root is a no-op. Therefore we can remove all '..' parts
// directly after the root.
parts.splice(i + 1, up);
up = 0;
} else {
parts.splice(i, 2);
up--;
}
}
}
path = parts.join('/');
if (path === '') {
path = isAbsolute ? '/' : '.';
}
if (url) {
url.path = path;
return urlGenerate(url);
}
return path;
});
exports.normalize = normalize;
/**
* Joins two paths/URLs.
*
* @param aRoot The root path or URL.
* @param aPath The path or URL to be joined with the root.
*
* - If aPath is a URL or a data URI, aPath is returned, unless aPath is a
* scheme-relative URL: Then the scheme of aRoot, if any, is prepended
* first.
* - Otherwise aPath is a path. If aRoot is a URL, then its path portion
* is updated with the result and aRoot is returned. Otherwise the result
* is returned.
* - If aPath is absolute, the result is aPath.
* - Otherwise the two paths are joined with a slash.
* - Joining for example 'http://' and 'www.example.com' is also supported.
*/
function join(aRoot, aPath) {
if (aRoot === "") {
aRoot = ".";
}
if (aPath === "") {
aPath = ".";
}
var aPathUrl = urlParse(aPath);
var aRootUrl = urlParse(aRoot);
if (aRootUrl) {
aRoot = aRootUrl.path || '/';
}
// `join(foo, '//www.example.org')`
if (aPathUrl && !aPathUrl.scheme) {
if (aRootUrl) {
aPathUrl.scheme = aRootUrl.scheme;
}
return urlGenerate(aPathUrl);
}
if (aPathUrl || aPath.match(dataUrlRegexp)) {
return aPath;
}
// `join('http://', 'www.example.com')`
if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
aRootUrl.host = aPath;
return urlGenerate(aRootUrl);
}
var joined = aPath.charAt(0) === '/'
? aPath
: normalize(aRoot.replace(/\/+$/, '') + '/' + aPath);
if (aRootUrl) {
aRootUrl.path = joined;
return urlGenerate(aRootUrl);
}
return joined;
}
exports.join = join;
exports.isAbsolute = function (aPath) {
return aPath.charAt(0) === '/' || urlRegexp.test(aPath);
};
/**
* Make a path relative to a URL or another path.
*
* @param aRoot The root path or URL.
* @param aPath The path or URL to be made relative to aRoot.
*/
function relative(aRoot, aPath) {
if (aRoot === "") {
aRoot = ".";
}
aRoot = aRoot.replace(/\/$/, '');
// It is possible for the path to be above the root. In this case, simply
// checking whether the root is a prefix of the path won't work. Instead, we
// need to remove components from the root one by one, until either we find
// a prefix that fits, or we run out of components to remove.
var level = 0;
while (aPath.indexOf(aRoot + '/') !== 0) {
var index = aRoot.lastIndexOf("/");
if (index < 0) {
return aPath;
}
// If the only part of the root that is left is the scheme (i.e. http://,
// file:///, etc.), one or more slashes (/), or simply nothing at all, we
// have exhausted all components, so the path is not relative to the root.
aRoot = aRoot.slice(0, index);
if (aRoot.match(/^([^\/]+:\/)?\/*$/)) {
return aPath;
}
++level;
}
// Make sure we add a "../" for each component we removed from the root.
return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
}
exports.relative = relative;
var supportsNullProto = (function () {
var obj = Object.create(null);
return !('__proto__' in obj);
}());
function identity (s) {
return s;
}
/**
* Because behavior goes wacky when you set `__proto__` on objects, we
* have to prefix all the strings in our set with an arbitrary character.
*
* See https://github.com/mozilla/source-map/pull/31 and
* https://github.com/mozilla/source-map/issues/30
*
* @param String aStr
*/
function toSetString(aStr) {
if (isProtoString(aStr)) {
return '$' + aStr;
}
return aStr;
}
exports.toSetString = supportsNullProto ? identity : toSetString;
function fromSetString(aStr) {
if (isProtoString(aStr)) {
return aStr.slice(1);
}
return aStr;
}
exports.fromSetString = supportsNullProto ? identity : fromSetString;
function isProtoString(s) {
if (!s) {
return false;
}
var length = s.length;
if (length < 9 /* "__proto__".length */) {
return false;
}
if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||
s.charCodeAt(length - 2) !== 95 /* '_' */ ||
s.charCodeAt(length - 3) !== 111 /* 'o' */ ||
s.charCodeAt(length - 4) !== 116 /* 't' */ ||
s.charCodeAt(length - 5) !== 111 /* 'o' */ ||
s.charCodeAt(length - 6) !== 114 /* 'r' */ ||
s.charCodeAt(length - 7) !== 112 /* 'p' */ ||
s.charCodeAt(length - 8) !== 95 /* '_' */ ||
s.charCodeAt(length - 9) !== 95 /* '_' */) {
return false;
}
for (var i = length - 10; i >= 0; i--) {
if (s.charCodeAt(i) !== 36 /* '$' */) {
return false;
}
}
return true;
}
/**
* Comparator between two mappings where the original positions are compared.
*
* Optionally pass in `true` as `onlyCompareGenerated` to consider two
* mappings with the same original source/line/column, but different generated
* line and column the same. Useful when searching for a mapping with a
* stubbed out mapping.
*/
function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
var cmp = strcmp(mappingA.source, mappingB.source);
if (cmp !== 0) {
return cmp;
}
cmp = mappingA.originalLine - mappingB.originalLine;
if (cmp !== 0) {
return cmp;
}
cmp = mappingA.originalColumn - mappingB.originalColumn;
if (cmp !== 0 || onlyCompareOriginal) {
return cmp;
}
cmp = mappingA.generatedColumn - mappingB.generatedColumn;
if (cmp !== 0) {
return cmp;
}
cmp = mappingA.generatedLine - mappingB.generatedLine;
if (cmp !== 0) {
return cmp;
}
return strcmp(mappingA.name, mappingB.name);
}
exports.compareByOriginalPositions = compareByOriginalPositions;
function compareByOriginalPositionsNoSource(mappingA, mappingB, onlyCompareOriginal) {
var cmp
cmp = mappingA.originalLine - mappingB.originalLine;
if (cmp !== 0) {
return cmp;
}
cmp = mappingA.originalColumn - mappingB.originalColumn;
if (cmp !== 0 || onlyCompareOriginal) {
return cmp;
}
cmp = mappingA.generatedColumn - mappingB.generatedColumn;
if (cmp !== 0) {
return cmp;
}
cmp = mappingA.generatedLine - mappingB.generatedLine;
if (cmp !== 0) {
return cmp;
}
return strcmp(mappingA.name, mappingB.name);
}
exports.compareByOriginalPositionsNoSource = compareByOriginalPositionsNoSource;
/**
* Comparator between two mappings with deflated source and name indices where
* the generated positions are compared.
*
* Optionally pass in `true` as `onlyCompareGenerated` to consider two
* mappings with the same generated line and column, but different
* source/name/original line and column the same. Useful when searching for a
* mapping with a stubbed out mapping.
*/
function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
var cmp = mappingA.generatedLine - mappingB.generatedLine;
if (cmp !== 0) {
return cmp;
}
cmp = mappingA.generatedColumn - mappingB.generatedColumn;
if (cmp !== 0 || onlyCompareGenerated) {
return cmp;
}
cmp = strcmp(mappingA.source, mappingB.source);
if (cmp !== 0) {
return cmp;
}
cmp = mappingA.originalLine - mappingB.originalLine;
if (cmp !== 0) {
return cmp;
}
cmp = mappingA.originalColumn - mappingB.originalColumn;
if (cmp !== 0) {
return cmp;
}
return strcmp(mappingA.name, mappingB.name);
}
exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
function compareByGeneratedPositionsDeflatedNoLine(mappingA, mappingB, onlyCompareGenerated) {
var cmp = mappingA.generatedColumn - mappingB.generatedColumn;
if (cmp !== 0 || onlyCompareGenerated) {
return cmp;
}
cmp = strcmp(mappingA.source, mappingB.source);
if (cmp !== 0) {
return cmp;
}
cmp = mappingA.originalLine - mappingB.originalLine;
if (cmp !== 0) {
return cmp;
}
cmp = mappingA.originalColumn - mappingB.originalColumn;
if (cmp !== 0) {
return cmp;
}
return strcmp(mappingA.name, mappingB.name);
}
exports.compareByGeneratedPositionsDeflatedNoLine = compareByGeneratedPositionsDeflatedNoLine;
function strcmp(aStr1, aStr2) {
if (aStr1 === aStr2) {
return 0;
}
if (aStr1 === null) {
return 1; // aStr2 !== null
}
if (aStr2 === null) {
return -1; // aStr1 !== null
}
if (aStr1 > aStr2) {
return 1;
}
return -1;
}
/**
* Comparator between two mappings with inflated source and name strings where
* the generated positions are compared.
*/
function compareByGeneratedPositionsInflated(mappingA, mappingB) {
var cmp = mappingA.generatedLine - mappingB.generatedLine;
if (cmp !== 0) {
return cmp;
}
cmp = mappingA.generatedColumn - mappingB.generatedColumn;
if (cmp !== 0) {
return cmp;
}
cmp = strcmp(mappingA.source, mappingB.source);
if (cmp !== 0) {
return cmp;
}
cmp = mappingA.originalLine - mappingB.originalLine;
if (cmp !== 0) {
return cmp;
}
cmp = mappingA.originalColumn - mappingB.originalColumn;
if (cmp !== 0) {
return cmp;
}
return strcmp(mappingA.name, mappingB.name);
}
exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
/**
* Strip any JSON XSSI avoidance prefix from the string (as documented
* in the source maps specification), and then parse the string as
* JSON.
*/
function parseSourceMapInput(str) {
return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, ''));
}
exports.parseSourceMapInput = parseSourceMapInput;
/**
* Compute the URL of a source given the the source root, the source's
* URL, and the source map's URL.
*/
function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {
sourceURL = sourceURL || '';
if (sourceRoot) {
// This follows what Chrome does.
if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') {
sourceRoot += '/';
}
// The spec says:
// Line 4: An optional source root, useful for relocating source
// files on a server or removing repeated values in the
// “sources” entry. This value is prepended to the individual
// entries in the “source” field.
sourceURL = sourceRoot + sourceURL;
}
// Historically, SourceMapConsumer did not take the sourceMapURL as
// a parameter. This mode is still somewhat supported, which is why
// this code block is conditional. However, it's preferable to pass
// the source map URL to SourceMapConsumer, so that this function
// can implement the source URL resolution algorithm as outlined in
// the spec. This block is basically the equivalent of:
// new URL(sourceURL, sourceMapURL).toString()
// ... except it avoids using URL, which wasn't available in the
// older releases of node still supported by this library.
//
// The spec says:
// If the sources are not absolute URLs after prepending of the
// “sourceRoot”, the sources are resolved relative to the
// SourceMap (like resolving script src in a html document).
if (sourceMapURL) {
var parsed = urlParse(sourceMapURL);
if (!parsed) {
throw new Error("sourceMapURL could not be parsed");
}
if (parsed.path) {
// Strip the last path component, but keep the "/".
var index = parsed.path.lastIndexOf('/');
if (index >= 0) {
parsed.path = parsed.path.substring(0, index + 1);
}
}
sourceURL = join(urlGenerate(parsed), sourceURL);
}
return normalize(sourceURL);
}
exports.computeSourceURL = computeSourceURL;
@@ -0,0 +1,156 @@
#!/usr/bin/env node
var fs = require('fs')
var updateDb = require('update-browserslist-db')
var browserslist = require('./')
var pkg = require('./package.json')
var args = process.argv.slice(2)
var USAGE =
'Usage:\n' +
' npx browserslist\n' +
' npx browserslist "QUERIES"\n' +
' npx browserslist --json "QUERIES"\n' +
' npx browserslist --config="path/to/browserlist/file"\n' +
' npx browserslist --coverage "QUERIES"\n' +
' npx browserslist --coverage=US "QUERIES"\n' +
' npx browserslist --coverage=US,RU,global "QUERIES"\n' +
' npx browserslist --env="environment name defined in config"\n' +
' npx browserslist --stats="path/to/browserlist/stats/file"\n' +
' npx browserslist --mobile-to-desktop\n' +
' npx browserslist --ignore-unknown-versions\n'
function isArg(arg) {
return args.some(function (str) {
return str === arg || str.indexOf(arg + '=') === 0
})
}
function error(msg) {
process.stderr.write('browserslist: ' + msg + '\n')
process.exit(1)
}
if (isArg('--help') || isArg('-h')) {
process.stdout.write(pkg.description + '.\n\n' + USAGE + '\n')
} else if (isArg('--version') || isArg('-v')) {
process.stdout.write('browserslist ' + pkg.version + '\n')
} else if (isArg('--update-db')) {
/* c8 ignore next 8 */
process.stdout.write(
'The --update-db command is deprecated.\n' +
'Please use npx update-browserslist-db@latest instead.\n'
)
process.stdout.write('Browserslist DB update will still be made.\n')
updateDb(function (str) {
process.stdout.write(str)
})
} else {
var mode = 'browsers'
var opts = {}
var queries
var areas
for (var i = 0; i < args.length; i++) {
if (args[i][0] !== '-') {
queries = args[i].replace(/^["']|["']$/g, '')
continue
}
var arg = args[i].split('=')
var name = arg[0]
var value = arg[1]
if (value) value = value.replace(/^["']|["']$/g, '')
if (name === '--config' || name === '-b') {
opts.config = value
} else if (name === '--env' || name === '-e') {
opts.env = value
} else if (name === '--stats' || name === '-s') {
opts.stats = value
} else if (name === '--coverage' || name === '-c') {
if (mode !== 'json') mode = 'coverage'
if (value) {
areas = value.split(',')
} else {
areas = ['global']
}
} else if (name === '--json') {
mode = 'json'
} else if (name === '--mobile-to-desktop') {
/* c8 ignore next */
opts.mobileToDesktop = true
} else if (name === '--ignore-unknown-versions') {
/* c8 ignore next */
opts.ignoreUnknownVersions = true
} else {
error('Unknown arguments ' + args[i] + '.\n\n' + USAGE)
}
}
var browsers
try {
browsers = browserslist(queries, opts)
} catch (e) {
if (e.name === 'BrowserslistError') {
error(e.message)
} /* c8 ignore start */ else {
throw e
} /* c8 ignore end */
}
var coverage
if (mode === 'browsers') {
browsers.forEach(function (browser) {
process.stdout.write(browser + '\n')
})
} else if (areas) {
coverage = areas.map(function (area) {
var stats
if (area !== 'global') {
stats = area
} else if (opts.stats) {
stats = JSON.parse(fs.readFileSync(opts.stats))
}
var result = browserslist.coverage(browsers, stats)
var round = Math.round(result * 100) / 100.0
return [area, round]
})
if (mode === 'coverage') {
var prefix = 'These browsers account for '
process.stdout.write(prefix)
coverage.forEach(function (data, index) {
var area = data[0]
var round = data[1]
var end = 'globally'
if (area && area !== 'global') {
end = 'in the ' + area.toUpperCase()
} else if (opts.stats) {
end = 'in custom statistics'
}
if (index !== 0) {
process.stdout.write(prefix.replace(/./g, ' '))
}
process.stdout.write(round + '% of all users ' + end + '\n')
})
}
}
if (mode === 'json') {
var data = { browsers: browsers }
if (coverage) {
data.coverage = coverage.reduce(function (object, j) {
object[j[0]] = j[1]
return object
}, {})
}
process.stdout.write(JSON.stringify(data, null, ' ') + '\n')
}
}
@@ -0,0 +1,445 @@
/// <reference types="node" />
import { EventEmitter } from "events";
import {
Agent,
ClientRequest,
ClientRequestArgs,
IncomingMessage,
OutgoingHttpHeaders,
Server as HTTPServer,
} from "http";
import { Server as HTTPSServer } from "https";
import { createConnection } from "net";
import { Duplex, DuplexOptions } from "stream";
import { SecureContextOptions } from "tls";
import { URL } from "url";
import { ZlibOptions } from "zlib";
// can not get all overload of BufferConstructor['from'], need to copy all it's first arguments here
// https://github.com/microsoft/TypeScript/issues/32164
type BufferLike =
| string
| Buffer
| DataView
| number
| ArrayBufferView
| Uint8Array
| ArrayBuffer
| SharedArrayBuffer
| Blob
| readonly any[]
| readonly number[]
| { valueOf(): ArrayBuffer }
| { valueOf(): SharedArrayBuffer }
| { valueOf(): Uint8Array }
| { valueOf(): readonly number[] }
| { valueOf(): string }
| { [Symbol.toPrimitive](hint: string): string };
// WebSocket socket.
declare class WebSocket extends EventEmitter {
/** The connection is not yet open. */
static readonly CONNECTING: 0;
/** The connection is open and ready to communicate. */
static readonly OPEN: 1;
/** The connection is in the process of closing. */
static readonly CLOSING: 2;
/** The connection is closed. */
static readonly CLOSED: 3;
binaryType: "nodebuffer" | "arraybuffer" | "fragments";
readonly bufferedAmount: number;
readonly extensions: string;
/** Indicates whether the websocket is paused */
readonly isPaused: boolean;
readonly protocol: string;
/** The current state of the connection */
readonly readyState:
| typeof WebSocket.CONNECTING
| typeof WebSocket.OPEN
| typeof WebSocket.CLOSING
| typeof WebSocket.CLOSED;
readonly url: string;
/** The connection is not yet open. */
readonly CONNECTING: 0;
/** The connection is open and ready to communicate. */
readonly OPEN: 1;
/** The connection is in the process of closing. */
readonly CLOSING: 2;
/** The connection is closed. */
readonly CLOSED: 3;
onopen: ((event: WebSocket.Event) => void) | null;
onerror: ((event: WebSocket.ErrorEvent) => void) | null;
onclose: ((event: WebSocket.CloseEvent) => void) | null;
onmessage: ((event: WebSocket.MessageEvent) => void) | null;
constructor(address: null);
constructor(address: string | URL, options?: WebSocket.ClientOptions | ClientRequestArgs);
constructor(
address: string | URL,
protocols?: string | string[],
options?: WebSocket.ClientOptions | ClientRequestArgs,
);
close(code?: number, data?: string | Buffer): void;
ping(data?: any, mask?: boolean, cb?: (err: Error) => void): void;
pong(data?: any, mask?: boolean, cb?: (err: Error) => void): void;
// https://github.com/websockets/ws/issues/2076#issuecomment-1250354722
send(data: BufferLike, cb?: (err?: Error) => void): void;
send(
data: BufferLike,
options: {
mask?: boolean | undefined;
binary?: boolean | undefined;
compress?: boolean | undefined;
fin?: boolean | undefined;
},
cb?: (err?: Error) => void,
): void;
terminate(): void;
/**
* Pause the websocket causing it to stop emitting events. Some events can still be
* emitted after this is called, until all buffered data is consumed. This method
* is a noop if the ready state is `CONNECTING` or `CLOSED`.
*/
pause(): void;
/**
* Make a paused socket resume emitting events. This method is a noop if the ready
* state is `CONNECTING` or `CLOSED`.
*/
resume(): void;
// HTML5 WebSocket events
addEventListener<K extends keyof WebSocket.WebSocketEventMap>(
type: K,
listener:
| ((event: WebSocket.WebSocketEventMap[K]) => void)
| { handleEvent(event: WebSocket.WebSocketEventMap[K]): void },
options?: WebSocket.EventListenerOptions,
): void;
removeEventListener<K extends keyof WebSocket.WebSocketEventMap>(
type: K,
listener:
| ((event: WebSocket.WebSocketEventMap[K]) => void)
| { handleEvent(event: WebSocket.WebSocketEventMap[K]): void },
): void;
// Events
on(event: "close", listener: (this: WebSocket, code: number, reason: Buffer) => void): this;
on(event: "error", listener: (this: WebSocket, error: Error) => void): this;
on(event: "upgrade", listener: (this: WebSocket, request: IncomingMessage) => void): this;
on(event: "message", listener: (this: WebSocket, data: WebSocket.RawData, isBinary: boolean) => void): this;
on(event: "open", listener: (this: WebSocket) => void): this;
on(event: "ping" | "pong", listener: (this: WebSocket, data: Buffer) => void): this;
on(event: "redirect", listener: (this: WebSocket, url: string, request: ClientRequest) => void): this;
on(
event: "unexpected-response",
listener: (this: WebSocket, request: ClientRequest, response: IncomingMessage) => void,
): this;
on(event: string | symbol, listener: (this: WebSocket, ...args: any[]) => void): this;
once(event: "close", listener: (this: WebSocket, code: number, reason: Buffer) => void): this;
once(event: "error", listener: (this: WebSocket, error: Error) => void): this;
once(event: "upgrade", listener: (this: WebSocket, request: IncomingMessage) => void): this;
once(event: "message", listener: (this: WebSocket, data: WebSocket.RawData, isBinary: boolean) => void): this;
once(event: "open", listener: (this: WebSocket) => void): this;
once(event: "ping" | "pong", listener: (this: WebSocket, data: Buffer) => void): this;
once(event: "redirect", listener: (this: WebSocket, url: string, request: ClientRequest) => void): this;
once(
event: "unexpected-response",
listener: (this: WebSocket, request: ClientRequest, response: IncomingMessage) => void,
): this;
once(event: string | symbol, listener: (this: WebSocket, ...args: any[]) => void): this;
off(event: "close", listener: (this: WebSocket, code: number, reason: Buffer) => void): this;
off(event: "error", listener: (this: WebSocket, error: Error) => void): this;
off(event: "upgrade", listener: (this: WebSocket, request: IncomingMessage) => void): this;
off(event: "message", listener: (this: WebSocket, data: WebSocket.RawData, isBinary: boolean) => void): this;
off(event: "open", listener: (this: WebSocket) => void): this;
off(event: "ping" | "pong", listener: (this: WebSocket, data: Buffer) => void): this;
off(event: "redirect", listener: (this: WebSocket, url: string, request: ClientRequest) => void): this;
off(
event: "unexpected-response",
listener: (this: WebSocket, request: ClientRequest, response: IncomingMessage) => void,
): this;
off(event: string | symbol, listener: (this: WebSocket, ...args: any[]) => void): this;
addListener(event: "close", listener: (code: number, reason: Buffer) => void): this;
addListener(event: "error", listener: (error: Error) => void): this;
addListener(event: "upgrade", listener: (request: IncomingMessage) => void): this;
addListener(event: "message", listener: (data: WebSocket.RawData, isBinary: boolean) => void): this;
addListener(event: "open", listener: () => void): this;
addListener(event: "ping" | "pong", listener: (data: Buffer) => void): this;
addListener(event: "redirect", listener: (url: string, request: ClientRequest) => void): this;
addListener(
event: "unexpected-response",
listener: (request: ClientRequest, response: IncomingMessage) => void,
): this;
addListener(event: string | symbol, listener: (...args: any[]) => void): this;
removeListener(event: "close", listener: (code: number, reason: Buffer) => void): this;
removeListener(event: "error", listener: (error: Error) => void): this;
removeListener(event: "upgrade", listener: (request: IncomingMessage) => void): this;
removeListener(event: "message", listener: (data: WebSocket.RawData, isBinary: boolean) => void): this;
removeListener(event: "open", listener: () => void): this;
removeListener(event: "ping" | "pong", listener: (data: Buffer) => void): this;
removeListener(event: "redirect", listener: (url: string, request: ClientRequest) => void): this;
removeListener(
event: "unexpected-response",
listener: (request: ClientRequest, response: IncomingMessage) => void,
): this;
removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
}
declare const WebSocketAlias: typeof WebSocket;
interface WebSocketAlias extends WebSocket {} // eslint-disable-line @typescript-eslint/no-empty-interface
declare namespace WebSocket {
/**
* Data represents the raw message payload received over the WebSocket.
*/
type RawData = Buffer | ArrayBuffer | Buffer[];
/**
* Data represents the message payload received over the WebSocket.
*/
type Data = string | Buffer | ArrayBuffer | Buffer[];
/**
* CertMeta represents the accepted types for certificate & key data.
*/
type CertMeta = string | string[] | Buffer | Buffer[];
/**
* VerifyClientCallbackSync is a synchronous callback used to inspect the
* incoming message. The return value (boolean) of the function determines
* whether or not to accept the handshake.
*/
type VerifyClientCallbackSync<Request extends IncomingMessage = IncomingMessage> = (info: {
origin: string;
secure: boolean;
req: Request;
}) => boolean;
/**
* VerifyClientCallbackAsync is an asynchronous callback used to inspect the
* incoming message. The return value (boolean) of the function determines
* whether or not to accept the handshake.
*/
type VerifyClientCallbackAsync<Request extends IncomingMessage = IncomingMessage> = (
info: { origin: string; secure: boolean; req: Request },
callback: (res: boolean, code?: number, message?: string, headers?: OutgoingHttpHeaders) => void,
) => void;
/**
* FinishRequestCallback is a callback for last minute customization of the
* headers. If finishRequest is set, then it has the responsibility to call
* request.end() once it is done setting request headers.
*/
type FinishRequestCallback = (request: ClientRequest, websocket: WebSocket) => void;
interface ClientOptions extends SecureContextOptions {
protocol?: string | undefined;
followRedirects?: boolean | undefined;
generateMask?(mask: Buffer): void;
handshakeTimeout?: number | undefined;
maxRedirects?: number | undefined;
perMessageDeflate?: boolean | PerMessageDeflateOptions | undefined;
localAddress?: string | undefined;
protocolVersion?: number | undefined;
headers?: { [key: string]: string } | undefined;
origin?: string | undefined;
agent?: Agent | undefined;
host?: string | undefined;
family?: number | undefined;
checkServerIdentity?(servername: string, cert: CertMeta): boolean;
rejectUnauthorized?: boolean | undefined;
allowSynchronousEvents?: boolean | undefined;
autoPong?: boolean | undefined;
maxPayload?: number | undefined;
skipUTF8Validation?: boolean | undefined;
createConnection?: typeof createConnection | undefined;
finishRequest?: FinishRequestCallback | undefined;
}
interface PerMessageDeflateOptions {
serverNoContextTakeover?: boolean | undefined;
clientNoContextTakeover?: boolean | undefined;
serverMaxWindowBits?: number | undefined;
clientMaxWindowBits?: number | undefined;
zlibDeflateOptions?: {
flush?: number | undefined;
finishFlush?: number | undefined;
chunkSize?: number | undefined;
windowBits?: number | undefined;
level?: number | undefined;
memLevel?: number | undefined;
strategy?: number | undefined;
dictionary?: Buffer | Buffer[] | DataView | undefined;
info?: boolean | undefined;
} | undefined;
zlibInflateOptions?: ZlibOptions | undefined;
threshold?: number | undefined;
concurrencyLimit?: number | undefined;
}
interface Event {
type: string;
target: WebSocket;
}
interface ErrorEvent {
error: any;
message: string;
type: string;
target: WebSocket;
}
interface CloseEvent {
wasClean: boolean;
code: number;
reason: string;
type: string;
target: WebSocket;
}
interface MessageEvent {
data: Data;
type: string;
target: WebSocket;
}
interface WebSocketEventMap {
open: Event;
error: ErrorEvent;
close: CloseEvent;
message: MessageEvent;
}
interface EventListenerOptions {
once?: boolean | undefined;
}
interface ServerOptions<
U extends typeof WebSocket.WebSocket = typeof WebSocket.WebSocket,
V extends typeof IncomingMessage = typeof IncomingMessage,
> {
host?: string | undefined;
port?: number | undefined;
backlog?: number | undefined;
server?: HTTPServer<V> | HTTPSServer<V> | undefined;
verifyClient?:
| VerifyClientCallbackAsync<InstanceType<V>>
| VerifyClientCallbackSync<InstanceType<V>>
| undefined;
handleProtocols?: (protocols: Set<string>, request: InstanceType<V>) => string | false;
path?: string | undefined;
noServer?: boolean | undefined;
allowSynchronousEvents?: boolean | undefined;
autoPong?: boolean | undefined;
clientTracking?: boolean | undefined;
perMessageDeflate?: boolean | PerMessageDeflateOptions | undefined;
maxPayload?: number | undefined;
skipUTF8Validation?: boolean | undefined;
WebSocket?: U | undefined;
}
interface AddressInfo {
address: string;
family: string;
port: number;
}
// WebSocket Server
class Server<
T extends typeof WebSocket.WebSocket = typeof WebSocket.WebSocket,
U extends typeof IncomingMessage = typeof IncomingMessage,
> extends EventEmitter {
options: ServerOptions<T, U>;
path: string;
clients: Set<InstanceType<T>>;
constructor(options?: ServerOptions<T, U>, callback?: () => void);
address(): AddressInfo | string | null;
close(cb?: (err?: Error) => void): void;
handleUpgrade(
request: InstanceType<U>,
socket: Duplex,
upgradeHead: Buffer,
callback: (client: InstanceType<T>, request: InstanceType<U>) => void,
): void;
shouldHandle(request: InstanceType<U>): boolean | Promise<boolean>;
// Events
on(
event: "connection",
cb: (this: Server<T>, websocket: InstanceType<T>, request: InstanceType<U>) => void,
): this;
on(event: "error", cb: (this: Server<T>, error: Error) => void): this;
on(event: "headers", cb: (this: Server<T>, headers: string[], request: InstanceType<U>) => void): this;
on(event: "close" | "listening", cb: (this: Server<T>) => void): this;
on(
event: "wsClientError",
cb: (this: Server<T>, error: Error, socket: Duplex, request: InstanceType<U>) => void,
): this;
on(event: string | symbol, listener: (this: Server<T>, ...args: any[]) => void): this;
once(
event: "connection",
cb: (this: Server<T>, websocket: InstanceType<T>, request: InstanceType<U>) => void,
): this;
once(event: "error", cb: (this: Server<T>, error: Error) => void): this;
once(event: "headers", cb: (this: Server<T>, headers: string[], request: InstanceType<U>) => void): this;
once(event: "close" | "listening", cb: (this: Server<T>) => void): this;
once(
event: "wsClientError",
cb: (this: Server<T>, error: Error, socket: Duplex, request: InstanceType<U>) => void,
): this;
once(event: string | symbol, listener: (this: Server<T>, ...args: any[]) => void): this;
off(
event: "connection",
cb: (this: Server<T>, socket: InstanceType<T>, request: InstanceType<U>) => void,
): this;
off(event: "error", cb: (this: Server<T>, error: Error) => void): this;
off(event: "headers", cb: (this: Server<T>, headers: string[], request: InstanceType<U>) => void): this;
off(event: "close" | "listening", cb: (this: Server<T>) => void): this;
off(
event: "wsClientError",
cb: (this: Server<T>, error: Error, socket: Duplex, request: InstanceType<U>) => void,
): this;
off(event: string | symbol, listener: (this: Server<T>, ...args: any[]) => void): this;
addListener(event: "connection", cb: (websocket: InstanceType<T>, request: InstanceType<U>) => void): this;
addListener(event: "error", cb: (error: Error) => void): this;
addListener(event: "headers", cb: (headers: string[], request: InstanceType<U>) => void): this;
addListener(event: "close" | "listening", cb: () => void): this;
addListener(event: "wsClientError", cb: (error: Error, socket: Duplex, request: InstanceType<U>) => void): this;
addListener(event: string | symbol, listener: (...args: any[]) => void): this;
removeListener(event: "connection", cb: (websocket: InstanceType<T>, request: InstanceType<U>) => void): this;
removeListener(event: "error", cb: (error: Error) => void): this;
removeListener(event: "headers", cb: (headers: string[], request: InstanceType<U>) => void): this;
removeListener(event: "close" | "listening", cb: () => void): this;
removeListener(
event: "wsClientError",
cb: (error: Error, socket: Duplex, request: InstanceType<U>) => void,
): this;
removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
}
const WebSocketServer: typeof Server;
interface WebSocketServer extends Server {} // eslint-disable-line @typescript-eslint/no-empty-interface
const WebSocket: typeof WebSocketAlias;
interface WebSocket extends WebSocketAlias {} // eslint-disable-line @typescript-eslint/no-empty-interface
// WebSocket stream
function createWebSocketStream(websocket: WebSocket, options?: DuplexOptions): Duplex;
}
export = WebSocket;
@@ -0,0 +1,15 @@
'use strict';
var $TypeError = require('es-errors/type');
var BigIntEqual = require('./equal');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-sameValueZero
module.exports = function BigIntSameValueZero(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
return BigIntEqual(x, y);
};
@@ -0,0 +1,62 @@
{
"name": "exponential-backoff",
"version": "3.1.3",
"description": "A utility that allows retrying a function with an exponential delay between attempts.",
"files": [
"dist/",
"src/"
],
"main": "dist/backoff.js",
"types": "dist/backoff.d.ts",
"scripts": {
"build": "tsc",
"test": "jest",
"test:watch": "jest --watch"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.{ts,json,md}": [
"prettier --write",
"git add"
]
},
"jest": {
"transform": {
"^.+\\.ts$": "ts-jest"
},
"testRegex": "\\.spec\\.ts$",
"moduleFileExtensions": [
"ts",
"js"
]
},
"repository": {
"type": "git",
"url": "git+https://github.com/coveooss/exponential-backoff.git"
},
"keywords": [
"exponential",
"backoff",
"retry"
],
"author": "Sami Sayegh",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/coveooss/exponential-backoff/issues"
},
"homepage": "https://github.com/coveooss/exponential-backoff#readme",
"devDependencies": {
"@types/jest": "^24.0.18",
"@types/node": "^10.14.21",
"husky": "^3.0.9",
"jest": "^24.9.0",
"lint-staged": "^9.4.2",
"prettier": "^1.18.2",
"ts-jest": "^24.1.0",
"typescript": "^3.6.4"
}
}
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2021 Suren Atoyan
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,22 @@
(The MIT License)
Copyright (c) Titus Wormer <mailto:tituswormer@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,4 @@
export { horizontalListSortingStrategy } from './horizontalListSorting';
export { rectSortingStrategy } from './rectSorting';
export { rectSwappingStrategy } from './rectSwapping';
export { verticalListSortingStrategy } from './verticalListSorting';
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const es2017_intl: LibDefinition;
@@ -0,0 +1,29 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _using;
function _using(stack, value, isAwait) {
if (value === null || value === void 0) return value;
if (Object(value) !== value) {
throw new TypeError("using declarations can only be used with objects, functions, null, or undefined.");
}
if (isAwait) {
var dispose = value[Symbol.asyncDispose || Symbol.for("Symbol.asyncDispose")];
}
if (dispose === null || dispose === void 0) {
dispose = value[Symbol.dispose || Symbol.for("Symbol.dispose")];
}
if (typeof dispose !== "function") {
throw new TypeError(`Property [Symbol.dispose] is not a function.`);
}
stack.push({
v: value,
d: dispose,
a: isAwait
});
return value;
}
//# sourceMappingURL=using.js.map
@@ -0,0 +1 @@
{"name":"tar-fs","version":"2.1.4","requiresBuild":false,"files":{"test/fixtures/e/directory/.ignore":{"checkedAt":1794532102434,"integrity":"sha512-z4PhNX7vuL3xVChQ1m2AB9Yg5AULVxXcg/SpIdNs6c5H0NE8XYXysP+DGNKHfuwvY7kxvUdBeoGlODJ6+SfaPg==","mode":420,"size":0},"test/fixtures/e/file":{"checkedAt":1794532102434,"integrity":"sha512-z4PhNX7vuL3xVChQ1m2AB9Yg5AULVxXcg/SpIdNs6c5H0NE8XYXysP+DGNKHfuwvY7kxvUdBeoGlODJ6+SfaPg==","mode":420,"size":0},"test/fixtures/d/file1":{"checkedAt":1794532102435,"integrity":"sha512-z4PhNX7vuL3xVChQ1m2AB9Yg5AULVxXcg/SpIdNs6c5H0NE8XYXysP+DGNKHfuwvY7kxvUdBeoGlODJ6+SfaPg==","mode":420,"size":0},"test/fixtures/d/file2":{"checkedAt":1794532102435,"integrity":"sha512-z4PhNX7vuL3xVChQ1m2AB9Yg5AULVxXcg/SpIdNs6c5H0NE8XYXysP+DGNKHfuwvY7kxvUdBeoGlODJ6+SfaPg==","mode":420,"size":0},"test/fixtures/d/sub-files/file3":{"checkedAt":1794532102435,"integrity":"sha512-z4PhNX7vuL3xVChQ1m2AB9Yg5AULVxXcg/SpIdNs6c5H0NE8XYXysP+DGNKHfuwvY7kxvUdBeoGlODJ6+SfaPg==","mode":420,"size":0},"test/fixtures/d/sub-files/file4":{"checkedAt":1794532102435,"integrity":"sha512-z4PhNX7vuL3xVChQ1m2AB9Yg5AULVxXcg/SpIdNs6c5H0NE8XYXysP+DGNKHfuwvY7kxvUdBeoGlODJ6+SfaPg==","mode":420,"size":0},"test/fixtures/d/sub-dir/file5":{"checkedAt":1794532102435,"integrity":"sha512-z4PhNX7vuL3xVChQ1m2AB9Yg5AULVxXcg/SpIdNs6c5H0NE8XYXysP+DGNKHfuwvY7kxvUdBeoGlODJ6+SfaPg==","mode":420,"size":0},"LICENSE":{"checkedAt":1794532102435,"integrity":"sha512-tSuhQwQoEtbdEDGhKUav3bbo+Ou8cWnFnBONFqr8XiYarpL+ax6pSj2A450kFcSyGXEO9Gk5ot8TXbJKDPcS+w==","mode":420,"size":1078},"index.js":{"checkedAt":1794532102435,"integrity":"sha512-SJ6mDyLU+2tbkZKOirMEUsVSkKHKxBq5aTPjw5gbJ5tISFbH6V8N7ytSsgzhQVThUkuTJ71pU2PqgeVRzN/YVg==","mode":420,"size":10026},"test/index.js":{"checkedAt":1794532102435,"integrity":"sha512-abMJ/6DAvlSpGP2Wi5Z/KrgB3f8bE4J39z/x0CuZY4hPW89QTJb/r+5Oo8c9/a0kB0equeJzIe18WltLPFIfmg==","mode":420,"size":9006},"package.json":{"checkedAt":1794532102435,"integrity":"sha512-tAN5w1W3NQhOItLTY7G0gXe4n95KikTcciELBWPTQv8wRpwNVgiTkMZVsQdDCIeT8jBLy4FeWGD7pKqWwhxAIw==","mode":420,"size":828},"README.md":{"checkedAt":1794532102435,"integrity":"sha512-ek2Er2ZJP34De5SdbBIVg8l9Z2N//Kz4Vir1YOJBp9FgO0Y5DVTtdFuaeMiVt/Zog8CBhP1xk8pabk81SuNa9A==","mode":420,"size":4897},"test/fixtures/invalid.tar":{"checkedAt":1794532102436,"integrity":"sha512-gFatw5YhH67trsYFWuoO2VBo+/WNAAIb+flb0S4R5B/LOJWlMxhMLyTRiuPHHCkMNf+BmUaJoQmgDGoFEEt+AA==","mode":420,"size":2560},"test/fixtures/a/hello.txt":{"checkedAt":1794532102436,"integrity":"sha512-2zl0qX8kB7fK4a5jfAAwaHoRkTJ01XhJJVjjnBbAF96E6s3Ixi/jTuThK0sUKIF/Cbaidgw/imZM6ulNJDSlkw==","mode":420,"size":12},"test/fixtures/b/a/test.txt":{"checkedAt":1794532090213,"integrity":"sha512-Dj51I0q8aPQ3ioaz9LMqGYujAYRbDNblAQbodDRXAMxmY6hsHqEl3F6SvhfJj5oPhcqdX1ldsgEvfMNXGUXBIw==","mode":420,"size":5},".travis.yml":{"checkedAt":1794532102436,"integrity":"sha512-JCuJ7g6fBwBjN85+ZCMqR0uz0TNPeoTGSBfexIK0/ekUqTznm3TfPWP93kd24v8px880oHyybv97bCxDFf3EGQ==","mode":420,"size":54}}}
@@ -0,0 +1,7 @@
import addSeconds from "./addSeconds.mjs";
function subSeconds(date, seconds) {
return addSeconds(date, -seconds);
}
export {
subSeconds as default
};
@@ -0,0 +1,226 @@
/**
* @import {HtmlOptions as Options} from 'micromark-extension-gfm-footnote'
* @import {HtmlExtension} from 'micromark-util-types'
*/
import {ok as assert} from 'devlop'
import {normalizeIdentifier} from 'micromark-util-normalize-identifier'
import {sanitizeUri} from 'micromark-util-sanitize-uri'
const own = {}.hasOwnProperty
/** @type {Options} */
const emptyOptions = {}
/**
* Generate the default label that GitHub uses on backreferences.
*
* @param {number} referenceIndex
* Index of the definition in the order that they are first referenced,
* 0-indexed.
* @param {number} rereferenceIndex
* Index of calls to the same definition, 0-indexed.
* @returns {string}
* Default label.
*/
export function defaultBackLabel(referenceIndex, rereferenceIndex) {
return (
'Back to reference ' +
(referenceIndex + 1) +
(rereferenceIndex > 1 ? '-' + rereferenceIndex : '')
)
}
/**
* Create an extension for `micromark` to support GFM footnotes when
* serializing to HTML.
*
* @param {Options | null | undefined} [options={}]
* Configuration (optional).
* @returns {HtmlExtension}
* Extension for `micromark` that can be passed in `htmlExtensions` to
* support GFM footnotes when serializing to HTML.
*/
export function gfmFootnoteHtml(options) {
const config = options || emptyOptions
const label = config.label || 'Footnotes'
const labelTagName = config.labelTagName || 'h2'
const labelAttributes =
config.labelAttributes === null || config.labelAttributes === undefined
? 'class="sr-only"'
: config.labelAttributes
const backLabel = config.backLabel || defaultBackLabel
const clobberPrefix =
config.clobberPrefix === null || config.clobberPrefix === undefined
? 'user-content-'
: config.clobberPrefix
return {
enter: {
gfmFootnoteDefinition() {
const stack = this.getData('tightStack')
stack.push(false)
},
gfmFootnoteDefinitionLabelString() {
this.buffer()
},
gfmFootnoteCallString() {
this.buffer()
}
},
exit: {
gfmFootnoteDefinition() {
let definitions = this.getData('gfmFootnoteDefinitions')
const footnoteStack = this.getData('gfmFootnoteDefinitionStack')
assert(footnoteStack, 'expected `footnoteStack`')
const tightStack = this.getData('tightStack')
const current = footnoteStack.pop()
const value = this.resume()
assert(current, 'expected to be in a footnote')
if (!definitions) {
this.setData('gfmFootnoteDefinitions', (definitions = {}))
}
if (!own.call(definitions, current)) definitions[current] = value
tightStack.pop()
this.setData('slurpOneLineEnding', true)
// “Hack” to prevent a line ending from showing up if we’re in a definition in
// an empty list item.
this.setData('lastWasTag')
},
gfmFootnoteDefinitionLabelString(token) {
let footnoteStack = this.getData('gfmFootnoteDefinitionStack')
if (!footnoteStack) {
this.setData('gfmFootnoteDefinitionStack', (footnoteStack = []))
}
footnoteStack.push(normalizeIdentifier(this.sliceSerialize(token)))
this.resume() // Drop the label.
this.buffer() // Get ready for a value.
},
gfmFootnoteCallString(token) {
let calls = this.getData('gfmFootnoteCallOrder')
let counts = this.getData('gfmFootnoteCallCounts')
const id = normalizeIdentifier(this.sliceSerialize(token))
/** @type {number} */
let counter
this.resume()
if (!calls) this.setData('gfmFootnoteCallOrder', (calls = []))
if (!counts) this.setData('gfmFootnoteCallCounts', (counts = {}))
const index = calls.indexOf(id)
const safeId = sanitizeUri(id.toLowerCase())
if (index === -1) {
calls.push(id)
counts[id] = 1
counter = calls.length
} else {
counts[id]++
counter = index + 1
}
const reuseCounter = counts[id]
this.tag(
'<sup><a href="#' +
clobberPrefix +
'fn-' +
safeId +
'" id="' +
clobberPrefix +
'fnref-' +
safeId +
(reuseCounter > 1 ? '-' + reuseCounter : '') +
'" data-footnote-ref="" aria-describedby="footnote-label">' +
String(counter) +
'</a></sup>'
)
},
null() {
const calls = this.getData('gfmFootnoteCallOrder') || []
const counts = this.getData('gfmFootnoteCallCounts') || {}
const definitions = this.getData('gfmFootnoteDefinitions') || {}
let index = -1
if (calls.length > 0) {
this.lineEndingIfNeeded()
this.tag(
'<section data-footnotes="" class="footnotes"><' +
labelTagName +
' id="footnote-label"' +
(labelAttributes ? ' ' + labelAttributes : '') +
'>'
)
this.raw(this.encode(label))
this.tag('</' + labelTagName + '>')
this.lineEndingIfNeeded()
this.tag('<ol>')
}
while (++index < calls.length) {
// Called definitions are always defined.
const id = calls[index]
const safeId = sanitizeUri(id.toLowerCase())
let referenceIndex = 0
/** @type {Array<string>} */
const references = []
while (++referenceIndex <= counts[id]) {
references.push(
'<a href="#' +
clobberPrefix +
'fnref-' +
safeId +
(referenceIndex > 1 ? '-' + referenceIndex : '') +
'" data-footnote-backref="" aria-label="' +
this.encode(
typeof backLabel === 'string'
? backLabel
: backLabel(index, referenceIndex)
) +
'" class="data-footnote-backref">↩' +
(referenceIndex > 1
? '<sup>' + referenceIndex + '</sup>'
: '') +
'</a>'
)
}
const reference = references.join(' ')
let injected = false
this.lineEndingIfNeeded()
this.tag('<li id="' + clobberPrefix + 'fn-' + safeId + '">')
this.lineEndingIfNeeded()
this.tag(
definitions[id].replace(/<\/p>(?:\r?\n|\r)?$/, function ($0) {
injected = true
return ' ' + reference + $0
})
)
if (!injected) {
this.lineEndingIfNeeded()
this.tag(reference)
}
this.lineEndingIfNeeded()
this.tag('</li>')
}
if (calls.length > 0) {
this.lineEndingIfNeeded()
this.tag('</ol>')
this.lineEndingIfNeeded()
this.tag('</section>')
}
}
}
}
}
@@ -0,0 +1,25 @@
import type { MessageInfo } from "./reflection-info";
import type { PartialMessage } from "./message-type-contract";
/**
* Copy partial data into the target message.
*
* If a singular scalar or enum field is present in the source, it
* replaces the field in the target.
*
* If a singular message field is present in the source, it is merged
* with the target field by calling mergePartial() of the responsible
* message type.
*
* If a repeated field is present in the source, its values replace
* all values in the target array, removing extraneous values.
* Repeated message fields are copied, not merged.
*
* If a map field is present in the source, entries are added to the
* target map, replacing entries with the same key. Entries that only
* exist in the target remain. Entries with message values are copied,
* not merged.
*
* Note that this function differs from protobuf merge semantics,
* which appends repeated fields.
*/
export declare function reflectionMergePartial<T extends object>(info: MessageInfo, target: T, source: PartialMessage<T>): void;
@@ -0,0 +1,75 @@
var $kykIu$react = require("react");
function $parcel$interopDefault(a) {
return a && a.__esModule ? a.default : a;
}
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "Column", () => $714483d9f6ca4c55$export$816b5d811295e6bc);
/*
* 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 $714483d9f6ca4c55$var$Column(props) {
return null;
}
$714483d9f6ca4c55$var$Column.getCollectionNode = function* getCollectionNode(props, context) {
let { title: title, children: children, childColumns: childColumns } = props;
let rendered = title || children;
let textValue = props.textValue || (typeof rendered === 'string' ? rendered : '') || props['aria-label'];
let fullNodes = yield {
type: 'column',
hasChildNodes: !!childColumns || !!title && (0, ($parcel$interopDefault($kykIu$react))).Children.count(children) > 0,
rendered: rendered,
textValue: textValue,
props: props,
*childNodes () {
if (childColumns) for (let child of childColumns)yield {
type: 'column',
value: child
};
else if (title) {
let childColumns = [];
(0, ($parcel$interopDefault($kykIu$react))).Children.forEach(children, (child)=>{
childColumns.push({
type: 'column',
element: child
});
});
yield* childColumns;
}
},
shouldInvalidate (newContext) {
// This is a bit of a hack, but it works.
// If this method is called, then there's a cached version of this node available.
// But, we need to keep the list of columns in the new context up to date.
updateContext(newContext);
return false;
}
};
let updateContext = (context)=>{
// register leaf columns on the context so that <Row> can access them
for (let node of fullNodes)if (!node.hasChildNodes) context.columns.push(node);
};
updateContext(context);
};
/**
* A Column represents a field of each item within a Table. Columns may also contain nested
* Column elements to represent column groups. Nested columns can be statically defined as
* children, or dynamically generated using a function based on the `childColumns` prop.
*/ // We don't want getCollectionNode to show up in the type definition
let $714483d9f6ca4c55$export$816b5d811295e6bc = $714483d9f6ca4c55$var$Column;
//# sourceMappingURL=Column.main.js.map
@@ -0,0 +1,171 @@
import {
VOID, PRIMITIVE,
ARRAY, OBJECT,
DATE, REGEXP, MAP, SET,
ERROR, BIGINT
} from './types.js';
const EMPTY = '';
const {toString} = {};
const {keys} = Object;
const typeOf = value => {
const type = typeof value;
if (type !== 'object' || !value)
return [PRIMITIVE, type];
const asString = toString.call(value).slice(8, -1);
switch (asString) {
case 'Array':
return [ARRAY, EMPTY];
case 'Object':
return [OBJECT, EMPTY];
case 'Date':
return [DATE, EMPTY];
case 'RegExp':
return [REGEXP, EMPTY];
case 'Map':
return [MAP, EMPTY];
case 'Set':
return [SET, EMPTY];
case 'DataView':
return [ARRAY, asString];
}
if (asString.includes('Array'))
return [ARRAY, asString];
if (asString.includes('Error'))
return [ERROR, asString];
return [OBJECT, asString];
};
const shouldSkip = ([TYPE, type]) => (
TYPE === PRIMITIVE &&
(type === 'function' || type === 'symbol')
);
const serializer = (strict, json, $, _) => {
const as = (out, value) => {
const index = _.push(out) - 1;
$.set(value, index);
return index;
};
const pair = value => {
if ($.has(value))
return $.get(value);
let [TYPE, type] = typeOf(value);
switch (TYPE) {
case PRIMITIVE: {
let entry = value;
switch (type) {
case 'bigint':
TYPE = BIGINT;
entry = value.toString();
break;
case 'function':
case 'symbol':
if (strict)
throw new TypeError('unable to serialize ' + type);
entry = null;
break;
case 'undefined':
return as([VOID], value);
}
return as([TYPE, entry], value);
}
case ARRAY: {
if (type) {
let spread = value;
if (type === 'DataView') {
spread = new Uint8Array(value.buffer);
}
else if (type === 'ArrayBuffer') {
spread = new Uint8Array(value);
}
return as([type, [...spread]], value);
}
const arr = [];
const index = as([TYPE, arr], value);
for (const entry of value)
arr.push(pair(entry));
return index;
}
case OBJECT: {
if (type) {
switch (type) {
case 'BigInt':
return as([type, value.toString()], value);
case 'Boolean':
case 'Number':
case 'String':
return as([type, value.valueOf()], value);
}
}
if (json && ('toJSON' in value))
return pair(value.toJSON());
const entries = [];
const index = as([TYPE, entries], value);
for (const key of keys(value)) {
if (strict || !shouldSkip(typeOf(value[key])))
entries.push([pair(key), pair(value[key])]);
}
return index;
}
case DATE:
return as([TYPE, value.toISOString()], value);
case REGEXP: {
const {source, flags} = value;
return as([TYPE, {source, flags}], value);
}
case MAP: {
const entries = [];
const index = as([TYPE, entries], value);
for (const [key, entry] of value) {
if (strict || !(shouldSkip(typeOf(key)) || shouldSkip(typeOf(entry))))
entries.push([pair(key), pair(entry)]);
}
return index;
}
case SET: {
const entries = [];
const index = as([TYPE, entries], value);
for (const entry of value) {
if (strict || !shouldSkip(typeOf(entry)))
entries.push(pair(entry));
}
return index;
}
}
const {message} = value;
return as([TYPE, {name: type, message}], value);
};
return pair;
};
/**
* @typedef {Array<string,any>} Record a type representation
*/
/**
* Returns an array of serialized Records.
* @param {any} value a serializable value.
* @param {{json?: boolean, lossy?: boolean}?} options an object with a `lossy` or `json` property that,
* if `true`, will not throw errors on incompatible types, and behave more
* like JSON stringify would behave. Symbol and Function will be discarded.
* @returns {Record[]}
*/
export const serialize = (value, {json, lossy} = {}) => {
const _ = [];
return serializer(!(json || lossy), !!json, new Map, _)(value), _;
};
@@ -0,0 +1,7 @@
import { SubtleCryptoAlg } from './structs.js';
import { COSEALG } from '../../cose.js';
/**
* Convert a COSE alg ID into a corresponding string value that WebCrypto APIs expect
*/
export declare function mapCoseAlgToWebCryptoAlg(alg: COSEALG): SubtleCryptoAlg;
//# sourceMappingURL=mapCoseAlgToWebCryptoAlg.d.ts.map
@@ -0,0 +1,158 @@
module.exports = flatten
flatten.flatten = flatten
flatten.unflatten = unflatten
function isBuffer (obj) {
return obj &&
obj.constructor &&
(typeof obj.constructor.isBuffer === 'function') &&
obj.constructor.isBuffer(obj)
}
function keyIdentity (key) {
return key
}
function flatten (target, opts) {
opts = opts || {}
const delimiter = opts.delimiter || '.'
const maxDepth = opts.maxDepth
const transformKey = opts.transformKey || keyIdentity
const output = {}
function step (object, prev, currentDepth) {
currentDepth = currentDepth || 1
Object.keys(object).forEach(function (key) {
const value = object[key]
const isarray = opts.safe && Array.isArray(value)
const type = Object.prototype.toString.call(value)
const isbuffer = isBuffer(value)
const isobject = (
type === '[object Object]' ||
type === '[object Array]'
)
const newKey = prev
? prev + delimiter + transformKey(key)
: transformKey(key)
if (!isarray && !isbuffer && isobject && Object.keys(value).length &&
(!opts.maxDepth || currentDepth < maxDepth)) {
return step(value, newKey, currentDepth + 1)
}
output[newKey] = value
})
}
step(target)
return output
}
function unflatten (target, opts) {
opts = opts || {}
const delimiter = opts.delimiter || '.'
const overwrite = opts.overwrite || false
const transformKey = opts.transformKey || keyIdentity
const result = {}
const isbuffer = isBuffer(target)
if (isbuffer || Object.prototype.toString.call(target) !== '[object Object]') {
return target
}
// safely ensure that the key is
// an integer.
function getkey (key) {
const parsedKey = Number(key)
return (
isNaN(parsedKey) ||
key.indexOf('.') !== -1 ||
opts.object
) ? key
: parsedKey
}
function addKeys (keyPrefix, recipient, target) {
return Object.keys(target).reduce(function (result, key) {
result[keyPrefix + delimiter + key] = target[key]
return result
}, recipient)
}
function isEmpty (val) {
const type = Object.prototype.toString.call(val)
const isArray = type === '[object Array]'
const isObject = type === '[object Object]'
if (!val) {
return true
} else if (isArray) {
return !val.length
} else if (isObject) {
return !Object.keys(val).length
}
}
target = Object.keys(target).reduce(function (result, key) {
const type = Object.prototype.toString.call(target[key])
const isObject = (type === '[object Object]' || type === '[object Array]')
if (!isObject || isEmpty(target[key])) {
result[key] = target[key]
return result
} else {
return addKeys(
key,
result,
flatten(target[key], opts)
)
}
}, {})
Object.keys(target).forEach(function (key) {
const split = key.split(delimiter).map(transformKey)
let key1 = getkey(split.shift())
let key2 = getkey(split[0])
let recipient = result
while (key2 !== undefined) {
if (key1 === '__proto__') {
return
}
const type = Object.prototype.toString.call(recipient[key1])
const isobject = (
type === '[object Object]' ||
type === '[object Array]'
)
// do not write over falsey, non-undefined values if overwrite is false
if (!overwrite && !isobject && typeof recipient[key1] !== 'undefined') {
return
}
if ((overwrite && !isobject) || (!overwrite && recipient[key1] == null)) {
recipient[key1] = (
typeof key2 === 'number' &&
!opts.object ? [] : {}
)
}
recipient = recipient[key1]
if (split.length > 0) {
key1 = getkey(split.shift())
key2 = getkey(split[0])
}
}
// unflatten again for 'messy objects'
recipient[key1] = unflatten(target[key], opts)
})
return result
}
@@ -0,0 +1,21 @@
import isArray from './isArray.js';
import isKey from './_isKey.js';
import stringToPath from './_stringToPath.js';
import toString from './toString.js';
/**
* Casts `value` to a path array if it's not one.
*
* @private
* @param {*} value The value to inspect.
* @param {Object} [object] The object to query keys on.
* @returns {Array} Returns the cast property path array.
*/
function castPath(value, object) {
if (isArray(value)) {
return value;
}
return isKey(value, object) ? [value] : stringToPath(toString(value));
}
export default castPath;
@@ -0,0 +1,185 @@
'use strict';
var utils = require('../utils.js');
require('eslint-visitor-keys');
require('espree');
require('estraverse');
var arrayElementNewline = utils.createRule({
name: "array-element-newline",
package: "js",
meta: {
type: "layout",
docs: {
description: "Enforce line breaks after each array element"
},
fixable: "whitespace",
schema: {
definitions: {
basicConfig: {
oneOf: [
{
type: "string",
enum: ["always", "never", "consistent"]
},
{
type: "object",
properties: {
consistent: {
type: "boolean"
},
multiline: {
type: "boolean"
},
minItems: {
type: ["integer", "null"],
minimum: 0
}
},
additionalProperties: false
}
]
}
},
type: "array",
items: [
{
oneOf: [
{
$ref: "#/definitions/basicConfig"
},
{
type: "object",
properties: {
ArrayExpression: {
$ref: "#/definitions/basicConfig"
},
ArrayPattern: {
$ref: "#/definitions/basicConfig"
}
},
additionalProperties: false,
minProperties: 1
}
]
}
]
},
messages: {
unexpectedLineBreak: "There should be no linebreak here.",
missingLineBreak: "There should be a linebreak after this element."
}
},
create(context) {
const sourceCode = context.sourceCode;
function normalizeOptionValue(providedOption) {
let consistent = false;
let multiline = false;
let minItems;
const option = providedOption || "always";
if (!option || option === "always" || typeof option === "object" && option.minItems === 0) {
minItems = 0;
} else if (option === "never") {
minItems = Number.POSITIVE_INFINITY;
} else if (option === "consistent") {
consistent = true;
minItems = Number.POSITIVE_INFINITY;
} else {
consistent = Boolean(option.consistent);
multiline = Boolean(option.multiline);
minItems = option.minItems || Number.POSITIVE_INFINITY;
}
return { consistent, multiline, minItems };
}
function normalizeOptions(options) {
if (options && (options.ArrayExpression || options.ArrayPattern)) {
let expressionOptions, patternOptions;
if (options.ArrayExpression)
expressionOptions = normalizeOptionValue(options.ArrayExpression);
if (options.ArrayPattern)
patternOptions = normalizeOptionValue(options.ArrayPattern);
return { ArrayExpression: expressionOptions, ArrayPattern: patternOptions };
}
const value = normalizeOptionValue(options);
return { ArrayExpression: value, ArrayPattern: value };
}
function reportNoLineBreak(token) {
const tokenBefore = sourceCode.getTokenBefore(token, { includeComments: true });
context.report({
loc: {
start: tokenBefore.loc.end,
end: token.loc.start
},
messageId: "unexpectedLineBreak",
fix(fixer) {
if (utils.isCommentToken(tokenBefore))
return null;
if (!utils.isTokenOnSameLine(tokenBefore, token))
return fixer.replaceTextRange([tokenBefore.range[1], token.range[0]], " ");
const twoTokensBefore = sourceCode.getTokenBefore(tokenBefore, { includeComments: true });
if (utils.isCommentToken(twoTokensBefore))
return null;
return fixer.replaceTextRange([twoTokensBefore.range[1], tokenBefore.range[0]], "");
}
});
}
function reportRequiredLineBreak(token) {
const tokenBefore = sourceCode.getTokenBefore(token, { includeComments: true });
context.report({
loc: {
start: tokenBefore.loc.end,
end: token.loc.start
},
messageId: "missingLineBreak",
fix(fixer) {
return fixer.replaceTextRange([tokenBefore.range[1], token.range[0]], "\n");
}
});
}
function check(node) {
const elements = node.elements;
const normalizedOptions = normalizeOptions(context.options[0]);
const options = normalizedOptions[node.type];
if (!options)
return;
let elementBreak = false;
if (options.multiline) {
elementBreak = elements.filter((element) => element !== null).some((element) => element.loc.start.line !== element.loc.end.line);
}
let linebreaksCount = 0;
for (let i = 0; i < node.elements.length; i++) {
const element = node.elements[i];
const previousElement = elements[i - 1];
if (i === 0 || element === null || previousElement === null)
continue;
const commaToken = sourceCode.getFirstTokenBetween(previousElement, element, utils.isCommaToken);
const lastTokenOfPreviousElement = sourceCode.getTokenBefore(commaToken);
const firstTokenOfCurrentElement = sourceCode.getTokenAfter(commaToken);
if (!utils.isTokenOnSameLine(lastTokenOfPreviousElement, firstTokenOfCurrentElement))
linebreaksCount++;
}
const needsLinebreaks = elements.length >= options.minItems || options.multiline && elementBreak || options.consistent && linebreaksCount > 0 && linebreaksCount < node.elements.length;
elements.forEach((element, i) => {
const previousElement = elements[i - 1];
if (i === 0 || element === null || previousElement === null)
return;
const commaToken = sourceCode.getFirstTokenBetween(previousElement, element, utils.isCommaToken);
const lastTokenOfPreviousElement = sourceCode.getTokenBefore(commaToken);
const firstTokenOfCurrentElement = sourceCode.getTokenAfter(commaToken);
if (needsLinebreaks) {
if (utils.isTokenOnSameLine(lastTokenOfPreviousElement, firstTokenOfCurrentElement))
reportRequiredLineBreak(firstTokenOfCurrentElement);
} else {
if (!utils.isTokenOnSameLine(lastTokenOfPreviousElement, firstTokenOfCurrentElement))
reportNoLineBreak(firstTokenOfCurrentElement);
}
});
}
return {
ArrayPattern: check,
ArrayExpression: check
};
}
});
module.exports = arrayElementNewline;
@@ -0,0 +1,83 @@
import { getValueTransition, frame, positionalKeys } from 'motion-dom';
import { setTarget } from '../../render/utils/setters.mjs';
import { addValueToWillChange } from '../../value/use-will-change/add-will-change.mjs';
import { getOptimisedAppearId } from '../optimized-appear/get-appear-id.mjs';
import { animateMotionValue } from './motion-value.mjs';
/**
* Decide whether we should block this animation. Previously, we achieved this
* just by checking whether the key was listed in protectedKeys, but this
* posed problems if an animation was triggered by afterChildren and protectedKeys
* had been set to true in the meantime.
*/
function shouldBlockAnimation({ protectedKeys, needsAnimating }, key) {
const shouldBlock = protectedKeys.hasOwnProperty(key) && needsAnimating[key] !== true;
needsAnimating[key] = false;
return shouldBlock;
}
function animateTarget(visualElement, targetAndTransition, { delay = 0, transitionOverride, type } = {}) {
let { transition = visualElement.getDefaultTransition(), transitionEnd, ...target } = targetAndTransition;
if (transitionOverride)
transition = transitionOverride;
const animations = [];
const animationTypeState = type &&
visualElement.animationState &&
visualElement.animationState.getState()[type];
for (const key in target) {
const value = visualElement.getValue(key, visualElement.latestValues[key] ?? null);
const valueTarget = target[key];
if (valueTarget === undefined ||
(animationTypeState &&
shouldBlockAnimation(animationTypeState, key))) {
continue;
}
const valueTransition = {
delay,
...getValueTransition(transition || {}, key),
};
/**
* If the value is already at the defined target, skip the animation.
*/
const currentValue = value.get();
if (currentValue !== undefined &&
!value.isAnimating &&
!Array.isArray(valueTarget) &&
valueTarget === currentValue &&
!valueTransition.velocity) {
continue;
}
/**
* If this is the first time a value is being animated, check
* to see if we're handling off from an existing animation.
*/
let isHandoff = false;
if (window.MotionHandoffAnimation) {
const appearId = getOptimisedAppearId(visualElement);
if (appearId) {
const startTime = window.MotionHandoffAnimation(appearId, key, frame);
if (startTime !== null) {
valueTransition.startTime = startTime;
isHandoff = true;
}
}
}
addValueToWillChange(visualElement, key);
value.start(animateMotionValue(key, value, valueTarget, visualElement.shouldReduceMotion && positionalKeys.has(key)
? { type: false }
: valueTransition, visualElement, isHandoff));
const animation = value.animation;
if (animation) {
animations.push(animation);
}
}
if (transitionEnd) {
Promise.all(animations).then(() => {
frame.update(() => {
transitionEnd && setTarget(visualElement, transitionEnd);
});
});
}
return animations;
}
export { animateTarget };
@@ -0,0 +1,11 @@
"use strict";
module.exports = {
languageOptions: {
parserOptions: {
ecmaFeatures: {
jsx: true
}
}
}
};
@@ -0,0 +1,46 @@
/**
* @typedef {import('hast').Element} Element
* @typedef {import('hast').ElementContent} ElementContent
* @typedef {import('hast').Properties} Properties
* @typedef {import('mdast').LinkReference} LinkReference
* @typedef {import('../state.js').State} State
*/
import {normalizeUri} from 'micromark-util-sanitize-uri'
import {revert} from '../revert.js'
/**
* Turn an mdast `linkReference` node into hast.
*
* @param {State} state
* Info passed around.
* @param {LinkReference} node
* mdast node.
* @returns {Array<ElementContent> | ElementContent}
* hast node.
*/
export function linkReference(state, node) {
const id = String(node.identifier).toUpperCase()
const definition = state.definitionById.get(id)
if (!definition) {
return revert(state, node)
}
/** @type {Properties} */
const properties = {href: normalizeUri(definition.url || '')}
if (definition.title !== null && definition.title !== undefined) {
properties.title = definition.title
}
/** @type {Element} */
const result = {
type: 'element',
tagName: 'a',
properties,
children: state.all(node)
}
state.patch(node, result)
return state.applyData(node, result)
}
@@ -0,0 +1,15 @@
module.exports = {
"deselectedItem": (args)=>`${args.item} niet geselecteerd.`,
"longPressToSelect": `Druk lang om de selectiemodus te openen.`,
"select": `Selecteren`,
"selectedAll": `Alle items geselecteerd.`,
"selectedCount": (args, formatter)=>`${formatter.plural(args.count, {
"=0": `Geen items geselecteerd`,
one: ()=>`${formatter.number(args.count)} item geselecteerd`,
other: ()=>`${formatter.number(args.count)} items geselecteerd`
})}.`,
"selectedItem": (args)=>`${args.item} geselecteerd.`
};
//# sourceMappingURL=nl-NL.main.js.map
@@ -0,0 +1,26 @@
/** Used for built-in method references. */
var funcProto = Function.prototype;
/** Used to resolve the decompiled source of functions. */
var funcToString = funcProto.toString;
/**
* Converts `func` to its source code.
*
* @private
* @param {Function} func The function to convert.
* @returns {string} Returns the source code.
*/
function toSource(func) {
if (func != null) {
try {
return funcToString.call(func);
} catch (e) {}
try {
return (func + '');
} catch (e) {}
}
return '';
}
export default toSource;
@@ -0,0 +1,413 @@
export default `flf2a$ 4 3 8 -1 3
Stick Figures By Joan Stark
Website: http://www.geocities.com/SoHo/7373/
Figlet conversion by patorjk, April 17, 2008
$ $@
$ $@
$ $@
$ $@@
/@
/ @
. @
@@
..@
''@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
. @
' @
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
. @
' @@
@
__ @
@
@@
@
@
.@
@@
/ @
/ @
/ @
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
$@
.@
.@
@@
$@
.@
,@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
__ @
_|@
. @
@@
@
@
@
@@
@
/\\ @
/~~\\ @
@@
__ @
|__) @
|__) @
@@
__ @
/ \` @
\\__, @
@@
__ @
| \\ @
|__/ @
@@
___ @
|__ @
|___ @
@@
___ @
|__ @
| @
@@
__ @
/ _\` @
\\__> @
@@
@
|__| @
| | @
@@
@
| @
| @
@@
@
| @
\\__/ @
@@
@
|__/ @
| \\ @
@@
@
| @
|___ @
@@
@
|\\/| @
| | @
@@
@
|\\ | @
| \\| @
@@
__ @
/ \\ @
\\__/ @
@@
__ @
|__) @
| @
@@
__ @
/ \\ @
\\__X @
@@
__ @
|__) @
| \\ @
@@
__ @
/__\` @
.__/ @
@@
___ @
| @
| @
@@
@
| | @
\\__/ @
@@
@
\\ / @
\\/ @
@@
@
| | @
|/\\| @
@@
@
\\_/ @
/ \\ @
@@
@
\\ / @
| @
@@
__ @
/ @
/_ @
@@
@
@
@
@@
\\ @
\\ @
\\ @
@@
@
@
@
@@
@
@
@
@@
@
@
___ @
@@
. @
\` @
@
@@
@
/\\ @
/~~\\ @
@@
__ @
|__) @
|__) @
@@
__ @
/ \` @
\\__, @
@@
__ @
| \\ @
|__/ @
@@
___ @
|__ @
|___ @
@@
___ @
|__ @
| @
@@
__ @
/ _\` @
\\__> @
@@
@
|__| @
| | @
@@
@
| @
| @
@@
@
| @
\\__/ @
@@
@
|__/ @
| \\ @
@@
@
| @
|___ @
@@
@
|\\/| @
| | @
@@
@
|\\ | @
| \\| @
@@
__ @
/ \\ @
\\__/ @
@@
__ @
|__) @
| @
@@
__ @
/ \\ @
\\__X @
@@
__ @
|__) @
| \\ @
@@
__ @
/__\` @
.__/ @
@@
___ @
| @
| @
@@
@
| | @
\\__/ @
@@
@
\\ / @
\\/ @
@@
@
| | @
|/\\| @
@@
@
\\_/ @
/ \\ @
@@
@
\\ / @
| @
@@
__ @
/ @
/_ @
@@
@
@
@
@@
| @
| @
| @
| @@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
`
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;AAUM,SAAS,0CAAiB,CAAQ;IACvC,IAAI,CAAA,GAAA,+BAAI,KACN,OAAO,EAAE,OAAO;IAGlB,OAAO,EAAE,OAAO;AAClB;AAEA,sEAAsE;AACtE,MAAM,0CAAoB,IAAI,IAAI;IAChC;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAEM,SAAS,0CAAiB,MAAe;IAC9C,OACE,AAAC,kBAAkB,oBAAoB,CAAC,wCAAkB,GAAG,CAAC,OAAO,IAAI,KACzE,kBAAkB,uBACjB,kBAAkB,eAAe,OAAO,iBAAiB;AAE9D","sources":["packages/@react-aria/utils/src/keyboard.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {isMac} from './platform';\n\ninterface Event {\n altKey: boolean,\n ctrlKey: boolean,\n metaKey: boolean\n}\n\nexport function isCtrlKeyPressed(e: Event): boolean {\n if (isMac()) {\n return e.metaKey;\n }\n\n return e.ctrlKey;\n}\n\n// HTML input types that do not cause the software keyboard to appear.\nconst nonTextInputTypes = new Set([\n 'checkbox',\n 'radio',\n 'range',\n 'color',\n 'file',\n 'image',\n 'button',\n 'submit',\n 'reset'\n]);\n\nexport function willOpenKeyboard(target: Element) {\n return (\n (target instanceof HTMLInputElement && !nonTextInputTypes.has(target.type)) ||\n target instanceof HTMLTextAreaElement ||\n (target instanceof HTMLElement && target.isContentEditable)\n );\n}\n"],"names":[],"version":3,"file":"keyboard.main.js.map"}
@@ -0,0 +1,36 @@
# codemirror [![NPM version](https://img.shields.io/npm/v/codemirror)](https://www.npmjs.org/package/codemirror)
[ [**WEBSITE**](https://codemirror.net/) | [**DOCS**](https://codemirror.net/docs/ref/#codemirror) | [**ISSUES**](https://github.com/codemirror/dev/issues) | [**FORUM**](https://discuss.codemirror.net/c/next/) | [**CHANGELOG**](https://github.com/codemirror/basic-setup/blob/main/CHANGELOG.md) ]
This package provides an example configuration for the
[CodeMirror](https://codemirror.net/) code editor. The actual editor
is implemented in the various packages under the `@codemirror` scope,
which this package depends on.
The [project page](https://codemirror.net/) has more information, a
number of [examples](https://codemirror.net/examples/) and the
[documentation](https://codemirror.net/docs/).
This code is released under an
[MIT license](https://github.com/codemirror/basic-setup/tree/main/LICENSE).
We aim to be an inclusive, welcoming community. To make that explicit,
we have a [code of
conduct](http://contributor-covenant.org/version/1/1/0/) that applies
to communication around the project.
## Usage
```javascript
import {EditorView, basicSetup} from "codemirror"
const view = new EditorView({
parent: document.body,
doc: "Hello",
extensions: [basicSetup /* ... */]
})
```
This sets up a basic code editor containing the word "Hello". You'll
usually want to add at least a [language
mode](https://codemirror.net/#languages) to your configuration.
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"1":"0 1 2 3 4 5 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 O P"},C:{"1":"0 1 2 3 4 5 6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R 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","16":"xC TC 0C 1C"},D:{"1":"0 1 2 3 4 5 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","132":"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"},E:{"1":"B C L M G aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","16":"J ZB 2C ZC","132":"K D E F A 3C 4C 5C 6C"},F:{"1":"0 1 2 3 4 5 jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","16":"F B FD GD HD ID NC uC","132":"6 7 8 9 G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB","260":"C JD OC"},G:{"1":"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","16":"ZC KD vC LD MD","132":"E ND OD PD QD RD"},H:{"260":"hD"},I:{"1":"I","16":"TC iD jD kD","132":"J lD vC mD nD"},J:{"16":"D","132":"A"},K:{"1":"H","16":"A B C NC uC","260":"OC"},L:{"1":"I"},M:{"1":"MC"},N:{"2":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD","132":"J"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"1D 2D"}},B:5,C:":default CSS pseudo-class",D:true};
@@ -0,0 +1,119 @@
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var regexTester = require('safe-regex-test');
var isInteger = require('math-intrinsics/isInteger');
var $charAt = callBound('String.prototype.charAt');
var $strSlice = callBound('String.prototype.slice');
var $indexOf = callBound('String.prototype.indexOf');
var $parseInt = parseInt;
var isDigit = regexTester(/^[0-9]$/);
var inspect = require('object-inspect');
var Get = require('./Get');
var IsArray = require('./IsArray');
var ToObject = require('./ToObject');
var ToString = require('./ToString');
var every = require('../helpers/every');
var isStringOrUndefined = require('../helpers/isStringOrUndefined');
// http://www.ecma-international.org/ecma-262/12.0/#sec-getsubstitution
// eslint-disable-next-line max-statements, max-params, max-lines-per-function
module.exports = function GetSubstitution(matched, str, position, captures, namedCaptures, replacement) {
if (typeof matched !== 'string') {
throw new $TypeError('Assertion failed: `matched` must be a String');
}
var matchLength = matched.length;
if (typeof str !== 'string') {
throw new $TypeError('Assertion failed: `str` must be a String');
}
var stringLength = str.length;
if (!isInteger(position) || position < 0 || position > stringLength) {
throw new $TypeError('Assertion failed: `position` must be a nonnegative integer, and less than or equal to the length of `string`, got ' + inspect(position));
}
if (!IsArray(captures) || !every(captures, isStringOrUndefined)) {
throw new $TypeError('Assertion failed: `captures` must be a possibly-empty List of Strings or `undefined`, got ' + inspect(captures));
}
if (typeof replacement !== 'string') {
throw new $TypeError('Assertion failed: `replacement` must be a String');
}
var tailPos = position + matchLength;
var m = captures.length;
if (typeof namedCaptures !== 'undefined') {
namedCaptures = ToObject(namedCaptures); // eslint-disable-line no-param-reassign
}
var result = '';
for (var i = 0; i < replacement.length; i += 1) {
// if this is a $, and it's not the end of the replacement
var current = $charAt(replacement, i);
var isLast = (i + 1) >= replacement.length;
var nextIsLast = (i + 2) >= replacement.length;
if (current === '$' && !isLast) {
var next = $charAt(replacement, i + 1);
if (next === '$') {
result += '$';
i += 1;
} else if (next === '&') {
result += matched;
i += 1;
} else if (next === '`') {
result += position === 0 ? '' : $strSlice(str, 0, position - 1);
i += 1;
} else if (next === "'") {
result += tailPos >= stringLength ? '' : $strSlice(str, tailPos);
i += 1;
} else {
var nextNext = nextIsLast ? null : $charAt(replacement, i + 2);
if (isDigit(next) && next !== '0' && (nextIsLast || !isDigit(nextNext))) {
// $1 through $9, and not followed by a digit
var n = $parseInt(next, 10);
// if (n > m, impl-defined)
result += n <= m && typeof captures[n - 1] === 'undefined' ? '' : captures[n - 1];
i += 1;
} else if (isDigit(next) && (nextIsLast || isDigit(nextNext))) {
// $00 through $99
var nn = next + nextNext;
var nnI = $parseInt(nn, 10) - 1;
// if nn === '00' or nn > m, impl-defined
result += nn <= m && typeof captures[nnI] === 'undefined' ? '' : captures[nnI];
i += 2;
} else if (next === '<') {
if (typeof namedCaptures === 'undefined') {
result += '$<';
i += 2;
} else {
var endIndex = $indexOf(replacement, '>', i);
if (endIndex > -1) {
var groupName = $strSlice(replacement, i + '$<'.length, endIndex);
var capture = Get(namedCaptures, groupName);
if (typeof capture !== 'undefined') {
result += ToString(capture);
}
i += ('<' + groupName + '>').length;
}
}
} else {
result += '$';
}
}
} else {
// the final $, or else not a $
result += $charAt(replacement, i);
}
}
return result;
};
@@ -0,0 +1,15 @@
import {
checkbox,
checkboxGroup
} from "../chunk-2CFQPGZ4.mjs";
import "../chunk-CWYZ2GEH.mjs";
import "../chunk-GQT3YUX3.mjs";
import "../chunk-46U6G7UJ.mjs";
import "../chunk-DGTYPKBN.mjs";
import "../chunk-UWE6H66T.mjs";
import "../chunk-GIXI35A3.mjs";
import "../chunk-GH5E4FQB.mjs";
export {
checkbox,
checkboxGroup
};
@@ -0,0 +1 @@
{"name":"@types/cors","version":"2.8.19","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532101788,"integrity":"sha512-HQaIQk9pwOcyKutyDk4o2a87WnotwYuLGYFW43emGm4FvIJFKPyg+OYaw5sTegKAKf+C5SKa1ACjzCLivbaHrQ==","mode":420,"size":1141},"README.md":{"checkedAt":1794532101788,"integrity":"sha512-dU0ab36rF/KdMZHagAxcxEr1YWXqMeuHIQdgqmyOtDduo9hiwQev53rY2b94dyMQhoeY2UViK46yB5PTlARsIA==","mode":420,"size":2297},"index.d.ts":{"checkedAt":1794532101788,"integrity":"sha512-LQZTH1LYdUwnZhZ5/au13wap9Ko/UN5ca1oQbhYTFAE6Gf0H7sFmWCkdPushRZFZMmFtIsGK2dqAFI9ASBKh5g==","mode":420,"size":1578},"package.json":{"checkedAt":1794532101789,"integrity":"sha512-hQaXMowx6KGpTxN3idbTCJRdstcZ3QcIYEcHjfvwWboh2aGPyn63gHVZuPQ+y/HC1iRCj/3h0Y0zCxi6ViMJew==","mode":420,"size":1132}}}
@@ -0,0 +1,81 @@
var $ar5WQ$react = require("react");
var $ar5WQ$reactariautils = require("@react-aria/utils");
var $ar5WQ$reactstatelyform = require("@react-stately/form");
var $ar5WQ$reactariaform = require("@react-aria/form");
var $ar5WQ$reactariainteractions = require("@react-aria/interactions");
var $ar5WQ$reactariatoggle = require("@react-aria/toggle");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "useCheckbox", () => $468c774d7db917b7$export$e375f10ce42261c5);
/*
* 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 $468c774d7db917b7$export$e375f10ce42261c5(props, state, inputRef) {
// Create validation state here because it doesn't make sense to add to general useToggleState.
let validationState = (0, $ar5WQ$reactstatelyform.useFormValidationState)({
...props,
value: state.isSelected
});
let { isInvalid: isInvalid, validationErrors: validationErrors, validationDetails: validationDetails } = validationState.displayValidation;
let { labelProps: labelProps, inputProps: inputProps, isSelected: isSelected, isPressed: isPressed, isDisabled: isDisabled, isReadOnly: isReadOnly } = (0, $ar5WQ$reactariatoggle.useToggle)({
...props,
isInvalid: isInvalid
}, state, inputRef);
(0, $ar5WQ$reactariaform.useFormValidation)(props, validationState, inputRef);
let { isIndeterminate: isIndeterminate, isRequired: isRequired, validationBehavior: validationBehavior = 'aria' } = props;
(0, $ar5WQ$react.useEffect)(()=>{
// indeterminate is a property, but it can only be set via javascript
// https://css-tricks.com/indeterminate-checkboxes/
if (inputRef.current) inputRef.current.indeterminate = !!isIndeterminate;
});
// Reset validation state on label press for checkbox with a hidden input.
let { pressProps: pressProps } = (0, $ar5WQ$reactariainteractions.usePress)({
isDisabled: isDisabled || isReadOnly,
onPress () {
// @ts-expect-error
let { [(0, $ar5WQ$reactstatelyform.privateValidationStateProp)]: groupValidationState } = props;
let { commitValidation: commitValidation } = groupValidationState ? groupValidationState : validationState;
commitValidation();
}
});
return {
labelProps: (0, $ar5WQ$reactariautils.mergeProps)(labelProps, pressProps, (0, $ar5WQ$react.useMemo)(()=>({
// Prevent label from being focused when mouse down on it.
// Note, this does not prevent the input from being focused in the `click` event.
onMouseDown: (e)=>e.preventDefault()
}), [])),
inputProps: {
...inputProps,
checked: isSelected,
'aria-required': isRequired && validationBehavior === 'aria' || undefined,
required: isRequired && validationBehavior === 'native'
},
isSelected: isSelected,
isPressed: isPressed,
isDisabled: isDisabled,
isReadOnly: isReadOnly,
isInvalid: isInvalid,
validationErrors: validationErrors,
validationDetails: validationDetails
};
}
//# sourceMappingURL=useCheckbox.main.js.map
@@ -0,0 +1 @@
{"version":3,"file":"getReflectMetadata.js","sourceRoot":"","sources":["../../../../src/reflectMetadata/utils/getReflectMetadata.ts"],"names":[],"mappings":";;AACA,gDAQC;AATD,6EAA6E;AAC7E,SAAgB,kBAAkB,CAChC,MAAc,EACd,WAAoB,EACpB,WAA6B;IAE7B,OAAO,OAAO,CAAC,WAAW,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,CAE9C,CAAC;AAChB,CAAC"}
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAyEM,SAAS,0CAAW,KAAuB,EAAE,KAA0B;IAC5E,IAAI,cACF,UAAU,cACV,UAAU,YACV,QAAQ,cACR,UAAU,6BACV,yBAAyB,gCACzB,4BAA4B,EAC5B,GAAG,YACJ,GAAG;IAEJ,IAAI,YAAY,UAAU,CAAC,UAAU,KAAK;IAE1C,IAAI,gBAAC,YAAY,iBAAE,aAAa,EAAC,GAAG,CAAA,GAAA,oCAAS,EAC3C;QACE,QAAQ,MAAM,MAAM;QACpB,SAAS,MAAM,KAAK;QACpB,mBAAmB;QACnB,eAAe,CAAC,cAAc;mCAC9B;sCACA;IACF,GACA,qBAAA,sBAAA,WAAY;IAGd,IAAI,EAAC,cAAc,aAAa,cAAE,UAAU,aAAE,SAAS,EAAE,oBAAoB,MAAM,EAAC,GAAG,CAAA,GAAA,4CAAiB,EAAE;QACxG,GAAG,UAAU;QACb,WAAW;QACX,YAAY;QACZ,QAAQ,MAAM,MAAM;QACpB,SAAS,cAAc,CAAC,YAAY,MAAM,KAAK,GAAG;IACpD;IAEA,CAAA,GAAA,0CAAe,EAAE;QACf,YAAY,cAAc,CAAC,MAAM,MAAM;IACzC;IAEA,CAAA,GAAA,sBAAQ,EAAE;QACR,IAAI,MAAM,MAAM,IAAI,WAAW,OAAO,EAAE;gBAEjB,mBAEK;YAH1B,IAAI,YACF,OAAO,CAAA,GAAA,qCAAU,EAAE,CAAA,oBAAA,qBAAA,+BAAA,SAAU,OAAO,cAAjB,+BAAA,oBAAqB,WAAW,OAAO;iBAE1D,OAAO,CAAA,GAAA,yCAAc,EAAE;gBAAC,CAAA,qBAAA,qBAAA,+BAAA,SAAU,OAAO,cAAjB,gCAAA,qBAAqB,WAAW,OAAO;aAAC,EAAE;gBAAC,gBAAgB;YAAI;QAE3F;IACF,GAAG;QAAC;QAAY,MAAM,MAAM;QAAE;QAAY;KAAS;IAEnD,OAAO;QACL,cAAc,CAAA,GAAA,gCAAS,EAAE,cAAc;oBACvC;uBACA;mBACA;QACA,oBAAoB;IACtB;AACF","sources":["packages/@react-aria/overlays/src/usePopover.ts"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ariaHideOutside, keepVisible} from './ariaHideOutside';\nimport {AriaPositionProps, useOverlayPosition} from './useOverlayPosition';\nimport {DOMAttributes, RefObject} from '@react-types/shared';\nimport {mergeProps} from '@react-aria/utils';\nimport {OverlayTriggerState} from '@react-stately/overlays';\nimport {PlacementAxis} from '@react-types/overlays';\nimport {useEffect} from 'react';\nimport {useOverlay} from './useOverlay';\nimport {usePreventScroll} from './usePreventScroll';\n\nexport interface AriaPopoverProps extends Omit<AriaPositionProps, 'isOpen' | 'onClose' | 'targetRef' | 'overlayRef'> {\n /**\n * The ref for the element which the popover positions itself with respect to.\n */\n triggerRef: RefObject<Element | null>,\n /**\n * The ref for the popover element.\n */\n popoverRef: RefObject<Element | null>,\n /** A ref for the popover arrow element. */\n arrowRef?: RefObject<Element | null>,\n /**\n * An optional ref for a group of popovers, e.g. submenus.\n * When provided, this element is used to detect outside interactions\n * and hiding elements from assistive technologies instead of the popoverRef.\n */\n groupRef?: RefObject<Element | null>,\n /**\n * Whether the popover is non-modal, i.e. elements outside the popover may be\n * interacted with by assistive technologies.\n *\n * Most popovers should not use this option as it may negatively impact the screen\n * reader experience. Only use with components such as combobox, which are designed\n * to handle this situation carefully.\n */\n isNonModal?: boolean,\n /**\n * Whether pressing the escape key to close the popover should be disabled.\n *\n * Most popovers should not use this option. When set to true, an alternative\n * way to close the popover with a keyboard must be provided.\n *\n * @default false\n */\n isKeyboardDismissDisabled?: boolean,\n /**\n * When user interacts with the argument element outside of the popover ref,\n * return true if onClose should be called. This gives you a chance to filter\n * out interaction with elements that should not dismiss the popover.\n * By default, onClose will always be called on interaction outside the popover ref.\n */\n shouldCloseOnInteractOutside?: (element: Element) => boolean\n}\n\nexport interface PopoverAria {\n /** Props for the popover element. */\n popoverProps: DOMAttributes,\n /** Props for the popover tip arrow if any. */\n arrowProps: DOMAttributes,\n /** Props to apply to the underlay element, if any. */\n underlayProps: DOMAttributes,\n /** Placement of the popover with respect to the trigger. */\n placement: PlacementAxis | null,\n /** The origin of the target in the overlay's coordinate system. Useful for animations. */\n triggerAnchorPoint: {x: number, y: number} | null\n}\n\n/**\n * Provides the behavior and accessibility implementation for a popover component.\n * A popover is an overlay element positioned relative to a trigger.\n */\nexport function usePopover(props: AriaPopoverProps, state: OverlayTriggerState): PopoverAria {\n let {\n triggerRef,\n popoverRef,\n groupRef,\n isLine truncated
@@ -0,0 +1,97 @@
/**
* License for programmatically and manually incorporated
* documentation aka. `JSDoc` from https://github.com/nodejs/node/tree/master/doc
*
* Copyright Node.js contributors. All rights reserved.
* 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.
*/
// NOTE: These definitions support Node.js and TypeScript 5.7+.
// Reference required TypeScript libs:
/// <reference lib="es2020" />
// TypeScript backwards-compatibility definitions:
/// <reference path="compatibility/index.d.ts" />
// Definitions specific to TypeScript 5.7+:
/// <reference path="globals.typedarray.d.ts" />
/// <reference path="buffer.buffer.d.ts" />
// Definitions for Node.js modules that are not specific to any version of TypeScript:
/// <reference path="globals.d.ts" />
/// <reference path="web-globals/abortcontroller.d.ts" />
/// <reference path="web-globals/domexception.d.ts" />
/// <reference path="web-globals/events.d.ts" />
/// <reference path="web-globals/fetch.d.ts" />
/// <reference path="web-globals/navigator.d.ts" />
/// <reference path="web-globals/storage.d.ts" />
/// <reference path="assert.d.ts" />
/// <reference path="assert/strict.d.ts" />
/// <reference path="async_hooks.d.ts" />
/// <reference path="buffer.d.ts" />
/// <reference path="child_process.d.ts" />
/// <reference path="cluster.d.ts" />
/// <reference path="console.d.ts" />
/// <reference path="constants.d.ts" />
/// <reference path="crypto.d.ts" />
/// <reference path="dgram.d.ts" />
/// <reference path="diagnostics_channel.d.ts" />
/// <reference path="dns.d.ts" />
/// <reference path="dns/promises.d.ts" />
/// <reference path="domain.d.ts" />
/// <reference path="events.d.ts" />
/// <reference path="fs.d.ts" />
/// <reference path="fs/promises.d.ts" />
/// <reference path="http.d.ts" />
/// <reference path="http2.d.ts" />
/// <reference path="https.d.ts" />
/// <reference path="inspector.d.ts" />
/// <reference path="inspector.generated.d.ts" />
/// <reference path="module.d.ts" />
/// <reference path="net.d.ts" />
/// <reference path="os.d.ts" />
/// <reference path="path.d.ts" />
/// <reference path="perf_hooks.d.ts" />
/// <reference path="process.d.ts" />
/// <reference path="punycode.d.ts" />
/// <reference path="querystring.d.ts" />
/// <reference path="readline.d.ts" />
/// <reference path="readline/promises.d.ts" />
/// <reference path="repl.d.ts" />
/// <reference path="sea.d.ts" />
/// <reference path="sqlite.d.ts" />
/// <reference path="stream.d.ts" />
/// <reference path="stream/promises.d.ts" />
/// <reference path="stream/consumers.d.ts" />
/// <reference path="stream/web.d.ts" />
/// <reference path="string_decoder.d.ts" />
/// <reference path="test.d.ts" />
/// <reference path="timers.d.ts" />
/// <reference path="timers/promises.d.ts" />
/// <reference path="tls.d.ts" />
/// <reference path="trace_events.d.ts" />
/// <reference path="tty.d.ts" />
/// <reference path="url.d.ts" />
/// <reference path="util.d.ts" />
/// <reference path="v8.d.ts" />
/// <reference path="vm.d.ts" />
/// <reference path="wasi.d.ts" />
/// <reference path="worker_threads.d.ts" />
/// <reference path="zlib.d.ts" />
@@ -0,0 +1 @@
{"name":"get-ready","version":"1.0.0","requiresBuild":false,"files":{"package.json":{"checkedAt":1794532099619,"integrity":"sha512-nuFPvtzhs2xBqxn2WWrsmYkvNe4imTJaXS2N0a6QoEiViFdM/HQTnyFj5r6+NXEzpbH8DzEc9YXJoxiK3OeaCg==","mode":420,"size":826},"README.md":{"checkedAt":1794532099620,"integrity":"sha512-mbeVGmxJHKhKlsyBPFwDNHfZCHoDKkw7vRIlQvYP6YIhXhNk1pwdR4gPzT5JHnOyyrw0negow0nT3/8WcRpLCA==","mode":420,"size":2501},"LICENSE":{"checkedAt":1794532099620,"integrity":"sha512-iRXUX4LHtY1mmxdLLnMj6HzmaPrhEkFNAjWstGsT0yd8Mk2KN/w9ZauXbdmyjo6CtQWH8jJO7yug6+VydkqN9g==","mode":420,"size":1141},"index.js":{"checkedAt":1794532099620,"integrity":"sha512-cy3s0dppupsmlRt7W+u0RykQX8vTfH+p4Zxumu5q08I3qnyXfGMGugvb6FomMR/IzzUJXvcXbsO2L/G5P6Wa2w==","mode":420,"size":826},"History.md":{"checkedAt":1794532099620,"integrity":"sha512-2BVuVOAHwvTxKHbygVR6rIWrTCUH58O1RqvQhR0wTrTyM2BTBccDfaJlTVB3P+h7rYs1kGKJjNwt3E4k2HPaFw==","mode":420,"size":184}}}
@@ -0,0 +1,12 @@
import { InjectionToken } from ".";
export default abstract class RegistryBase<T> {
protected _registryMap: Map<InjectionToken<any>, T[]>;
entries(): IterableIterator<[InjectionToken<any>, T[]]>;
getAll(key: InjectionToken<any>): T[];
get(key: InjectionToken<any>): T | null;
set(key: InjectionToken<any>, value: T): void;
setAll(key: InjectionToken<any>, value: T[]): void;
has(key: InjectionToken<any>): boolean;
clear(): void;
private ensure;
}
@@ -0,0 +1,41 @@
{
"name": "is-plain-obj",
"version": "4.1.0",
"description": "Check if a value is a plain object",
"license": "MIT",
"repository": "sindresorhus/is-plain-obj",
"funding": "https://github.com/sponsors/sindresorhus",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "https://sindresorhus.com"
},
"type": "module",
"exports": "./index.js",
"engines": {
"node": ">=12"
},
"scripts": {
"test": "xo && ava && tsd"
},
"files": [
"index.js",
"index.d.ts"
],
"keywords": [
"object",
"is",
"check",
"test",
"type",
"plain",
"vanilla",
"pure",
"simple"
],
"devDependencies": {
"ava": "^3.15.0",
"tsd": "^0.14.0",
"xo": "^0.38.2"
}
}
@@ -0,0 +1,13 @@
"use client";
import { createContext } from 'react';
/**
* @public
*/
const MotionConfigContext = createContext({
transformPagePoint: (p) => p,
isStatic: false,
reducedMotion: "never",
});
export { MotionConfigContext };
@@ -0,0 +1,3 @@
declare const _exports: import('eslint').Rule.RuleModule;
export = _exports;
//# sourceMappingURL=prop-types.d.ts.map
@@ -0,0 +1,261 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v1.1.19](https://github.com/inspect-js/which-typed-array/compare/v1.1.18...v1.1.19) - 2025-03-08
### Commits
- [Refactor] use `get-proto`, improve types [`e05d535`](https://github.com/inspect-js/which-typed-array/commit/e05d535fe4e4c4e674937718fe1cae90abff3606)
- [Dev Deps] update `@arethetypeswrong/cli`, `@ljharb/tsconfig`, `@types/tape` [`0dade9c`](https://github.com/inspect-js/which-typed-array/commit/0dade9c4c334f37ed14083a35724eea56a496991)
- [Deps] update `call-bound`, `for-each` [`490791a`](https://github.com/inspect-js/which-typed-array/commit/490791af49605390f9805660492976f86c64feb1)
- [Tests] skip `npm ls` in older nodes [`f83aaca`](https://github.com/inspect-js/which-typed-array/commit/f83aaca6b6634ce795f8caf9a1e14ab15d35161c)
- [Dev Deps] update `@ljharb/tsconfig` [`63c4795`](https://github.com/inspect-js/which-typed-array/commit/63c479564e5f3cb022c784ffe505673597341aab)
## [v1.1.18](https://github.com/inspect-js/which-typed-array/compare/v1.1.17...v1.1.18) - 2024-12-18
### Commits
- [types] improve types [`4b57173`](https://github.com/inspect-js/which-typed-array/commit/4b5717349976578c6b48966d581687df5dcc2e9b)
- [Dev Deps] update `@types/tape` [`81853b0`](https://github.com/inspect-js/which-typed-array/commit/81853b075c018538859a5533578be654fafecdae)
## [v1.1.17](https://github.com/inspect-js/which-typed-array/compare/v1.1.16...v1.1.17) - 2024-12-18
### Commits
- [types] improve types [`86bc612`](https://github.com/inspect-js/which-typed-array/commit/86bc61207e5970c2c7e13cdda4ccdeb0981ac40b)
- [Dev Deps] update `@arethetypeswrong/cli`, `@ljharb/tsconfig`, `@types/tape` [`2e9bed6`](https://github.com/inspect-js/which-typed-array/commit/2e9bed67f1d623b176b1a7f06c5eab006c21cf96)
- [Deps] update `call-bind`, `gopd` [`34579df`](https://github.com/inspect-js/which-typed-array/commit/34579df639e35ceb3a7e54f8e680a4077a950b8b)
- [Refactor] use `call-bound` directly [`2a2d84e`](https://github.com/inspect-js/which-typed-array/commit/2a2d84e91045266841ddb47afe594899bae2f483)
## [v1.1.16](https://github.com/inspect-js/which-typed-array/compare/v1.1.15...v1.1.16) - 2024-11-27
### Commits
- [actions] split out node 10-20, and 20+ [`8e289a9`](https://github.com/inspect-js/which-typed-array/commit/8e289a9665a32f7ea267c3ffed7451b154adbe26)
- [Dev Deps] update `@arethetypeswrong/cli`, `@ljharb/eslint-config`, `@types/node`, `@types/tape`, `auto-changelog`, `tape` [`3d4a678`](https://github.com/inspect-js/which-typed-array/commit/3d4a67872d0dbecb755e63ba4101e9ec030a5e7e)
- [Tests] replace `aud` with `npm audit` [`6fbada9`](https://github.com/inspect-js/which-typed-array/commit/6fbada976743192db47000e47eefc07708713ea0)
- [types] add an additional overload [`db5a791`](https://github.com/inspect-js/which-typed-array/commit/db5a791642cd8b4d78fe4ed4da151c4543ee0840)
- [Dev Deps] remove an unused DT package [`6bfff4c`](https://github.com/inspect-js/which-typed-array/commit/6bfff4c3b0c415cb32cd12be6fab3cbbe9e10e13)
- [Dev Deps] add missing peer dep [`05fd582`](https://github.com/inspect-js/which-typed-array/commit/05fd582a703cd68ee7613af0ef2c45546ea5d2ba)
## [v1.1.15](https://github.com/inspect-js/which-typed-array/compare/v1.1.14...v1.1.15) - 2024-03-10
### Commits
- [types] use a namespace; improve type [`f42bec3`](https://github.com/inspect-js/which-typed-array/commit/f42bec34d5c47bd9e4ab1b48dcde60c09c666712)
- [types] use shared config [`464a9e3`](https://github.com/inspect-js/which-typed-array/commit/464a9e358c2597253c747970b12032406a19b8d2)
- [actions] remove redundant finisher; use reusable workflow [`d114ee8`](https://github.com/inspect-js/which-typed-array/commit/d114ee83ceb6c7898386f4b5935a3ed9e2ec61e4)
- [Dev Deps] update `@types/node`, `tape`, `typescript`; add `@arethetypeswrong/cli` [`9cc63d8`](https://github.com/inspect-js/which-typed-array/commit/9cc63d8635e80ce6dabcb352d23050111040d747)
- [types] add a helpful hover description [`29ccf8d`](https://github.com/inspect-js/which-typed-array/commit/29ccf8dab0f805cdac6ec56d7b9cc27476708273)
- [Deps] update `available-typed-arrays`, `call-bind`, `has-tostringtag` [`7ecfd8e`](https://github.com/inspect-js/which-typed-array/commit/7ecfd8e29d09f8708f7cab7cc41fea9ae5a20867)
## [v1.1.14](https://github.com/inspect-js/which-typed-array/compare/v1.1.13...v1.1.14) - 2024-02-01
### Commits
- [patch] add types [`49c4d4c`](https://github.com/inspect-js/which-typed-array/commit/49c4d4c5db9bebb8d6f8c18a01047e44eea15e17)
- [Dev Deps] update `aud`, `npmignore`, `tape` [`e5fab7b`](https://github.com/inspect-js/which-typed-array/commit/e5fab7b3dc9df2bceb88f15c3d0a2c0176cf2567)
- [Deps] update `available-typed-arrays`, `call-bind` [`97e2b44`](https://github.com/inspect-js/which-typed-array/commit/97e2b44bad85c9183f1219e28211b3abd167677c)
- [Deps] update `has-tostringtag` [`1efa8bf`](https://github.com/inspect-js/which-typed-array/commit/1efa8bf910c080c14f011aa7c645ac88bc7a7078)
## [v1.1.13](https://github.com/inspect-js/which-typed-array/compare/v1.1.12...v1.1.13) - 2023-10-19
### Commits
- [Refactor] avoid call-binding entirely when there is no method to bind [`9ff452b`](https://github.com/inspect-js/which-typed-array/commit/9ff452b88fbd8e4419bd768d86d0ea9a87d7e310)
## [v1.1.12](https://github.com/inspect-js/which-typed-array/compare/v1.1.11...v1.1.12) - 2023-10-19
### Commits
- [Fix] somehow node 0.12 - 3 can hit here, and they lack slice but have set [`c28e9b8`](https://github.com/inspect-js/which-typed-array/commit/c28e9b84d6d68ad5f52236ba59c26b06cde6300b)
- [Deps] update `call-bind` [`a648554`](https://github.com/inspect-js/which-typed-array/commit/a64855495106235352ebb3550a860d3bfd4a1ce1)
- [Dev Deps] update `tape` [`7a094d6`](https://github.com/inspect-js/which-typed-array/commit/7a094d6f9219b903c9a9e13c559e68f0e9672b59)
## [v1.1.11](https://github.com/inspect-js/which-typed-array/compare/v1.1.10...v1.1.11) - 2023-07-17
### Commits
- [Fix] `node &lt; v0.6` lacks proper Object toString behavior [`b8fd654`](https://github.com/inspect-js/which-typed-array/commit/b8fd65479c0bd18385378cfae79750ebf7cb6ee7)
- [Dev Deps] update `tape` [`e1734c9`](https://github.com/inspect-js/which-typed-array/commit/e1734c99d79880ab11efa55220498a7a1e887834)
## [v1.1.10](https://github.com/inspect-js/which-typed-array/compare/v1.1.9...v1.1.10) - 2023-07-10
### Commits
- [actions] update rebase action to use reusable workflow [`2c10582`](https://github.com/inspect-js/which-typed-array/commit/2c105820d77274c079cb6d040cb348396e516ef5)
- [Robustness] use `call-bind` [`b2335fd`](https://github.com/inspect-js/which-typed-array/commit/b2335fdfca80840995eea5e6fcfffc6d712279a1)
- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`ad5e41b`](https://github.com/inspect-js/which-typed-array/commit/ad5e41ba18e7d23af1f9b211215c43a64bf75d70)
## [v1.1.9](https://github.com/inspect-js/which-typed-array/compare/v1.1.8...v1.1.9) - 2022-11-02
### Commits
- [Dev Deps] update `aud`, `is-callable`, `tape` [`9a20b3c`](https://github.com/inspect-js/which-typed-array/commit/9a20b3cb8f5d087789a8160395517bffe27b4339)
- [Refactor] use `gopd` instead of `es-abstract` helper [`00157af`](https://github.com/inspect-js/which-typed-array/commit/00157af909842b8b5affa5485d3574ec92d94065)
- [Deps] update `is-typed-array` [`6714240`](https://github.com/inspect-js/which-typed-array/commit/6714240e748cbbb634cb1e405ad762bc52acde66)
- [meta] add `sideEffects` flag [`89b96cc`](https://github.com/inspect-js/which-typed-array/commit/89b96cc3decc78d9621598e94fa1c2bb87eabf2e)
## [v1.1.8](https://github.com/inspect-js/which-typed-array/compare/v1.1.7...v1.1.8) - 2022-05-14
### Commits
- [actions] reuse common workflows [`95ea6c0`](https://github.com/inspect-js/which-typed-array/commit/95ea6c02dc5ec4ed0ee1b9c4692bb060108c8637)
- [meta] use `npmignore` to autogenerate an npmignore file [`d08436a`](https://github.com/inspect-js/which-typed-array/commit/d08436a19cdd76219732f5040a01cdb92ef2820e)
- [readme] add github actions/codecov badges [`35ae3af`](https://github.com/inspect-js/which-typed-array/commit/35ae3af6a0bb328c9d9b9bbb53e47122f269d81a)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`86e6e3a`](https://github.com/inspect-js/which-typed-array/commit/86e6e3af60b2436f0ff34968d9d6240a23f40528)
- [actions] update codecov uploader [`0aa6e30`](https://github.com/inspect-js/which-typed-array/commit/0aa6e3026ab4198c4364737ed4f0315a2ecc432a)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`a881a78`](https://github.com/inspect-js/which-typed-array/commit/a881a785f094e823e1cefe2ae9e4ebe31a8e996e)
- [Refactor] use `for-each` instead of `foreach` [`9dafa03`](https://github.com/inspect-js/which-typed-array/commit/9dafa0377fc5c690059a9d454f1dd4d365c5c902)
- [Deps] update `es-abstract`, `is-typed-array` [`0684022`](https://github.com/inspect-js/which-typed-array/commit/068402297608f321a4ec99ebce741b3eb38fcfdd)
- [Deps] update `es-abstract`, `is-typed-array` [`633a529`](https://github.com/inspect-js/which-typed-array/commit/633a529081b5c48d9675abb8aea425e6e33d528e)
## [v1.1.7](https://github.com/inspect-js/which-typed-array/compare/v1.1.6...v1.1.7) - 2021-08-30
### Commits
- [Refactor] use `globalThis` if available [`2a16d1f`](https://github.com/inspect-js/which-typed-array/commit/2a16d1fd520871ce6b23c60f0bd2113cf33b2533)
- [meta] changelog cleanup [`ba99f56`](https://github.com/inspect-js/which-typed-array/commit/ba99f56b45e6acde7aef4a1f34bb00e44088ccee)
- [Dev Deps] update `@ljharb/eslint-config` [`19a6e04`](https://github.com/inspect-js/which-typed-array/commit/19a6e04ce0094fb3fd6d0d2cbc58d320556ddf50)
- [Deps] update `available-typed-arrays` [`50dbc58`](https://github.com/inspect-js/which-typed-array/commit/50dbc5810a24c468b49409e1f0a79d03501e3dd6)
- [Deps] update `is-typed-array` [`c1b83ea`](https://github.com/inspect-js/which-typed-array/commit/c1b83eae65f042e46b6ae941ac4e814b7965a0f7)
## [v1.1.6](https://github.com/inspect-js/which-typed-array/compare/v1.1.5...v1.1.6) - 2021-08-06
### Fixed
- [Fix] if Symbol.toStringTag exists but is not present, use Object.prototype.toString [`#51`](https://github.com/inspect-js/which-typed-array/issues/51) [`#49`](https://github.com/inspect-js/which-typed-array/issues/49)
### Commits
- [Dev Deps] update `is-callable`, `tape` [`63eb1e3`](https://github.com/inspect-js/which-typed-array/commit/63eb1e3faede3f328bbbb4a5fcffc2e4769cf4ec)
- [Deps] update `is-typed-array` [`c5056f0`](https://github.com/inspect-js/which-typed-array/commit/c5056f0007d4c9434f1fa69eff183109468b4769)
## [v1.1.5](https://github.com/inspect-js/which-typed-array/compare/v1.1.4...v1.1.5) - 2021-08-05
### Commits
- [actions] use `node/install` instead of `node/run`; use `codecov` action [`63fa8dd`](https://github.com/inspect-js/which-typed-array/commit/63fa8dd1dc9c0f0dbbaa16d1de0eb89797324c5d)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `is-callable`, `tape` [`1107c74`](https://github.com/inspect-js/which-typed-array/commit/1107c74c52ed6eb4a719faec88e16c4343976d73)
- [Deps] update `available-typed-arrays`, `call-bind`, `es-abstract`, `is-typed-array` [`f953454`](https://github.com/inspect-js/which-typed-array/commit/f953454b2c6f589f09573ddc961431f970c2e1b6)
- [Fix] use `has-tostringtag` to behave correctly in the presence of symbol shams [`8aee720`](https://github.com/inspect-js/which-typed-array/commit/8aee7207abcd72c799ac324b214fbb6ca7ae4a28)
- [meta] use `prepublishOnly` script for npm 7+ [`6c5167b`](https://github.com/inspect-js/which-typed-array/commit/6c5167b4cd06cb62a5487a2e797d8e41cc2970b1)
## [v1.1.4](https://github.com/inspect-js/which-typed-array/compare/v1.1.3...v1.1.4) - 2020-12-05
### Commits
- [meta] npmignore github action workflows [`aa427e7`](https://github.com/inspect-js/which-typed-array/commit/aa427e79a230a985953695a8129ceb6bb7d42527)
## [v1.1.3](https://github.com/inspect-js/which-typed-array/compare/v1.1.2...v1.1.3) - 2020-12-05
### Commits
- [Tests] migrate tests to Github Actions [`803d4dd`](https://github.com/inspect-js/which-typed-array/commit/803d4ddb601ff03e587be792bd452de0e2783d03)
- [Tests] run `nyc` on all tests [`205a13f`](https://github.com/inspect-js/which-typed-array/commit/205a13f7aa172e014ddc2079c84af6ba575581c8)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `is-callable`, `tape` [`97ceb07`](https://github.com/inspect-js/which-typed-array/commit/97ceb070d5aea1c3a696c6f695800ae468bafc0b)
- [actions] add "Allow Edits" workflow [`b140492`](https://github.com/inspect-js/which-typed-array/commit/b14049211eff32bd4149767def4f939483810051)
- [Deps] update `es-abstract`; use `call-bind` where applicable [`2abdb87`](https://github.com/inspect-js/which-typed-array/commit/2abdb871961b4e1b58925115a7d56a9cc5966a02)
- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`256d34b`](https://github.com/inspect-js/which-typed-array/commit/256d34b8bdb67b8af0e9f83c9a318e54f3340e3b)
- [Dev Deps] update `auto-changelog`; add `aud` [`ddea96f`](https://github.com/inspect-js/which-typed-array/commit/ddea96fe320dbdd0c7d7569812399a7f64d43e04)
- [meta] gitignore nyc output [`8a812bd`](https://github.com/inspect-js/which-typed-array/commit/8a812bd1ce7c5609988fb4fe2e9af2089eccd07d)
## [v1.1.2](https://github.com/inspect-js/which-typed-array/compare/v1.1.1...v1.1.2) - 2020-04-07
### Commits
- [Dev Deps] update `make-arrow-function`, `make-generator-function` [`28c61ef`](https://github.com/inspect-js/which-typed-array/commit/28c61eff4903ff6509f65c2f500858b9cb4636f1)
- [Dev Deps] update `@ljharb/eslint-config` [`a233879`](https://github.com/inspect-js/which-typed-array/commit/a2338798d3a4a3169cda54e322b2f2eb0e976ad0)
- [Dev Deps] update `auto-changelog` [`df0134c`](https://github.com/inspect-js/which-typed-array/commit/df0134c0e20ec6d94993988ad670e1b3cf350bea)
- [Fix] move `foreach` to dependencies [`6ef29c0`](https://github.com/inspect-js/which-typed-array/commit/6ef29c0dbb91a7ec21df7ce8736f99f41efea39e)
- [Tests] only audit prod deps [`eb21044`](https://github.com/inspect-js/which-typed-array/commit/eb210446bd7a433657204d2314ef56fe264c21ad)
- [Deps] update `es-abstract` [`5ef0236`](https://github.com/inspect-js/which-typed-array/commit/5ef02368d9876a1074123aa7725d6759b4f3e358)
- [Dev Deps] update `tape` [`7456037`](https://github.com/inspect-js/which-typed-array/commit/745603728c6c3da8bdddee321e8a9196f4827aa3)
- [Deps] update `available-typed-arrays` [`8a856c9`](https://github.com/inspect-js/which-typed-array/commit/8a856c9aa707c1e6f7a52e834485356b31395ea6)
## [v1.1.1](https://github.com/inspect-js/which-typed-array/compare/v1.1.0...v1.1.1) - 2020-01-24
### Commits
- [Tests] use shared travis-ci configs [`0a627d9`](https://github.com/inspect-js/which-typed-array/commit/0a627d9694d0eabdaee63b19e605584166995a79)
- [meta] add `auto-changelog` [`2a14c58`](https://github.com/inspect-js/which-typed-array/commit/2a14c58b79f72e32ef2078efb40d31a4bf8c197a)
- [meta] remove unused Makefile and associated utilities [`75f7f22`](https://github.com/inspect-js/which-typed-array/commit/75f7f222199f42618c290de363c542b11f5a5632)
- [Tests] up to `node` `v12.10`, `v11.15`, `v10.16`, `v8.16`, `v6.17` [`4162327`](https://github.com/inspect-js/which-typed-array/commit/416232725e7d127cbd886af0f8988dae612a342f)
- [Refactor] use `es-abstract`’s `callBound`, `available-typed-arrays`, `has-symbols` [`9b04a2a`](https://github.com/inspect-js/which-typed-array/commit/9b04a2a14c758600cffcf59485b7b3c85839c266)
- [readme] fix repo URLs, remove testling [`03ed52f`](https://github.com/inspect-js/which-typed-array/commit/03ed52f3ae4fcd35614bcda7e947b14e62009c71)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `replace`, `semver`, `tape` [`bfbcf3e`](https://github.com/inspect-js/which-typed-array/commit/bfbcf3ec9c449bd0089ed805c01a32ba4e7e5938)
- [actions] add automatic rebasing / merge commit blocking [`cc88ac5`](https://github.com/inspect-js/which-typed-array/commit/cc88ac56bcfb71cb26c656ebde4c560a22fadd85)
- [meta] create FUNDING.yml [`acbc723`](https://github.com/inspect-js/which-typed-array/commit/acbc7230929b1256c83df28be4a456eed3e147e9)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `is-callable`, `tape` [`f1ab63e`](https://github.com/inspect-js/which-typed-array/commit/f1ab63e9366027eae2e29398c035181dac164132)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`; add `safe-publish-latest` [`ac9f50b`](https://github.com/inspect-js/which-typed-array/commit/ac9f50b59558933292dff993df2e68eaa44b07e2)
- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`aaaa15d`](https://github.com/inspect-js/which-typed-array/commit/aaaa15dfb5bd8228c0cfb8f2aba267efb405b0a1)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`602fc9a`](https://github.com/inspect-js/which-typed-array/commit/602fc9a0a7d708236f90c76f592e6a980ecde940)
- [Deps] update `available-typed-arrays`, `is-typed-array` [`b2d69b6`](https://github.com/inspect-js/which-typed-array/commit/b2d69b639bf14344d09f8512dbc060cd4f533161)
- [meta] add `funding` field [`156f613`](https://github.com/inspect-js/which-typed-array/commit/156f613d0ce547c4b15e1ae279198b66e3cef55e)
## [v1.1.0](https://github.com/inspect-js/which-typed-array/compare/v1.0.1...v1.1.0) - 2019-02-16
### Commits
- [Tests] remove `jscs` [`381c9b4`](https://github.com/inspect-js/which-typed-array/commit/381c9b4bd858da1adedf23d8555af3a3ed901a83)
- [Tests] up to `node` `v8.2`, `v7.10`, `v6.11`, `v5.8`; improve matrix; newer npm breaks on older node [`7015c19`](https://github.com/inspect-js/which-typed-array/commit/7015c196ba86540b04d18d9b1d2c368909492023)
- [Tests] up to `node` `v10.0`, `v9.11`, `v8.11`, `v6.14`, `v4.9`; use `nvm install-latest-npm` [`ad67885`](https://github.com/inspect-js/which-typed-array/commit/ad678853e245986720d7650be1c974a9ff3ac814)
- [Tests] up to `node` `v11.6`, `v10.15`, `v8.15`, `v6.16` [`dd94bfb`](https://github.com/inspect-js/which-typed-array/commit/dd94bfb6309a92d1537352f2d1100f9e913ebc01)
- [Refactor] use an array instead of an object for storing Typed Array names [`de98bc1`](https://github.com/inspect-js/which-typed-array/commit/de98bc1d44af92909a34212e276deb5d79ac428a)
- [meta] ignore `test.html` [`06cfb1b`](https://github.com/inspect-js/which-typed-array/commit/06cfb1bc0ca7881d1bd1621fa946a16366cd6afc)
- [Tests] up to `node` `v7.0`, `v6.9`, `v4.6`; improve test matrix [`df76eaa`](https://github.com/inspect-js/which-typed-array/commit/df76eaa39b94b28147e81a89bb587e8aa3e3dba3)
- [New] add `BigInt64Array` and `BigUint64Array` [`d6bca3a`](https://github.com/inspect-js/which-typed-array/commit/d6bca3a68ccfe33f6659a24b770068e89dab1592)
- [Dev Deps] update `jscs`, `nsp`, `eslint` [`f23b45b`](https://github.com/inspect-js/which-typed-array/commit/f23b45b2796bd1f63ddddf28b4b80b9709478cb3)
- [Dev Deps] update `@ljharb/eslint-config`, `eslint`, `semver`, `tape` [`ddb4484`](https://github.com/inspect-js/which-typed-array/commit/ddb4484adc3b45c4396632611556055f3b2f5990)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `is-callable`, `replace`, `semver`, `tape` [`4524e59`](https://github.com/inspect-js/which-typed-array/commit/4524e593e9387c185d5632696c62c1600c0b380f)
- [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver` [`1ec7056`](https://github.com/inspect-js/which-typed-array/commit/1ec70568565c479a6168b03e0a5aec6ec9ac5a21)
- [Dev Deps] update `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` [`799487d`](https://github.com/inspect-js/which-typed-array/commit/799487d666b32d1ae0d27cfededf2f5480c5faea)
- [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver` [`8092598`](https://github.com/inspect-js/which-typed-array/commit/8092598998a1f9f8005b4e3d299eb09c96fa2e21)
- [Tests] up to `node` `v11.10` [`a5aabb1`](https://github.com/inspect-js/which-typed-array/commit/a5aabb1910e8408f857a791253487824c7c758d3)
- [Dev Deps] update `@ljharb/eslint-config`, `eslint`, `nsp`, `semver`, `tape` [`277be33`](https://github.com/inspect-js/which-typed-array/commit/277be331d9f05ff95644d6bcd896547ca620cd8e)
- [Tests] use `npm audit` instead of `nsp` [`ee97dc7`](https://github.com/inspect-js/which-typed-array/commit/ee97dc7c5d384d68f60ce6cb5a85d9509e75f72b)
- [Dev Deps] update `tape`, `eslint`, `@ljharb/eslint-config` [`262ffb0`](https://github.com/inspect-js/which-typed-array/commit/262ffb025facb0795b33fbd5131183bdbc0a40f6)
- [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config` [`d6bbcfc`](https://github.com/inspect-js/which-typed-array/commit/d6bbcfc3eea427f0156fbdcf9ae11dbf3745a755)
- [Tests] up to `node` `v6.2` [`2ff89eb`](https://github.com/inspect-js/which-typed-array/commit/2ff89eb91754146c0bc1ae689f37458d84f6e690)
- Only apps should have lockfiles [`e2bc271`](https://github.com/inspect-js/which-typed-array/commit/e2bc271e1e9a6481a2836f892177825a808c331c)
- [Dev Deps] update `nsp`, `eslint`, `@ljharb/eslint-config` [`b79e93b`](https://github.com/inspect-js/which-typed-array/commit/b79e93bf15c871ce0ff24fa3ad61001707eea463)
- [Dev Deps] update `nsp`, `eslint`, `@ljharb/eslint-config` [`016dbff`](https://github.com/inspect-js/which-typed-array/commit/016dbff8c49c32cda7ec80d86006c8a7c43bc40c)
- [Dev Deps] update `eslint`, `tape` [`6ce4bbc`](https://github.com/inspect-js/which-typed-array/commit/6ce4bbc5f6caf632cbcf9ababbfe36e1bf4093d7)
- [Tests] on `node` `v10.1` [`f0683a0`](https://github.com/inspect-js/which-typed-array/commit/f0683a0c17e039e926ecaad4c4c341cd8e5878f1)
- [Tests] up to `node` `v7.2` [`2f29cef`](https://github.com/inspect-js/which-typed-array/commit/2f29cef42d30f87259cd6687c25a79ae4651d0c9)
- [Dev Deps] update `replace` [`73b5ba6`](https://github.com/inspect-js/which-typed-array/commit/73b5ba6e87638d13553985977cab9d1bad33e242)
- [Deps] update `function-bind` [`c8a18c2`](https://github.com/inspect-js/which-typed-array/commit/c8a18c2982e6b126ecc1d4655ec2e53b05535b20)
- [Tests] on `node` `v5.12` [`812102b`](https://github.com/inspect-js/which-typed-array/commit/812102bf223422da8f7a89e5a1308214dd158571)
- [Tests] on `node` `v5.10` [`271584f`](https://github.com/inspect-js/which-typed-array/commit/271584f3a8b10ef68a7d419ac0062b444e63d07c)
## [v1.0.1](https://github.com/inspect-js/which-typed-array/compare/v1.0.0...v1.0.1) - 2016-03-19
### Commits
- [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver`, `is-callable` [`4a628c5`](https://github.com/inspect-js/which-typed-array/commit/4a628c520d8e080a9fa7e8218947d3b2ceedca72)
- [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `is-callable` [`8e09372`](https://github.com/inspect-js/which-typed-array/commit/8e09372ded877a191cbf777060483227d5071e84)
- [Tests] up to `node` `v5.6`, `v4.3` [`3a35bf9`](https://github.com/inspect-js/which-typed-array/commit/3a35bf9fb9c7f8e6ac1b579ed2754087351ad1a5)
- [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config` [`9410d5e`](https://github.com/inspect-js/which-typed-array/commit/9410d5e35db4b834827b31ea1723bbeebbcde5ba)
- [Fix] `Symbol.toStringTag` is on the super-[[Prototype]] of Float32Array, not the [[Prototype]]. [`7c40a3a`](https://github.com/inspect-js/which-typed-array/commit/7c40a3a05046bbbd188340fb19471ad913e4af05)
- [Tests] up to `node` `v5.9`, `v4.4` [`07878e7`](https://github.com/inspect-js/which-typed-array/commit/07878e7cd23d586ddb9e85a03f675e0a574db246)
- Use the object form of "author" in package.json [`65caa56`](https://github.com/inspect-js/which-typed-array/commit/65caa560d1c0c15c1080b25a9df55c7373c73f08)
- [Tests] use pretest/posttest for linting/security [`c170f7e`](https://github.com/inspect-js/which-typed-array/commit/c170f7ebcf07475d6420f2d2d2d08b1646280cd4)
- [Deps] update `is-typed-array` [`9ab324e`](https://github.com/inspect-js/which-typed-array/commit/9ab324e746a7552b2d9363777fc5c9f5c2e31ce7)
- [Deps] update `function-bind` [`a723142`](https://github.com/inspect-js/which-typed-array/commit/a723142c70a5b6a4f8f5feecc9705619590f4eeb)
- [Deps] update `is-typed-array` [`ed82ce4`](https://github.com/inspect-js/which-typed-array/commit/ed82ce4e8ecc657fc6e839d23ef6347497bc93be)
- [Tests] on `node` `v4.2` [`f581c20`](https://github.com/inspect-js/which-typed-array/commit/f581c2031990668894a8e5a08eaf01a2548e822c)
## v1.0.0 - 2015-10-05
### Commits
- Dotfiles / Makefile [`667f89a`](https://github.com/inspect-js/which-typed-array/commit/667f89a9046502594e2559dbf5568e062af3b770)
- Tests. [`a14d05e`](https://github.com/inspect-js/which-typed-array/commit/a14d05ef443d2ac678cb0567befc0abf8cf21709)
- package.json [`560b1aa`](https://github.com/inspect-js/which-typed-array/commit/560b1aa4f8bbc5d41d9cee96c93faf08c25be0e5)
- Read me [`a22096e`](https://github.com/inspect-js/which-typed-array/commit/a22096e05773f93b34e672d3f743ec6f1963bc24)
- Implementation [`0b1ae28`](https://github.com/inspect-js/which-typed-array/commit/0b1ae2848372f6256cf075d687e3722878e67aca)
- Initial commit [`4b32f0a`](https://github.com/inspect-js/which-typed-array/commit/4b32f0a9d32165d6ab91797d6971ea83cf4ce9da)
@@ -0,0 +1,260 @@
// Generated by LiveScript 1.6.0
(function(){
var ref$, id, find, sort, min, max, map, unlines, nameToRaw, dasherize, naturalJoin, wordWrap, wordwrap, getPreText, setHelpStyleDefaults, generateHelpForOption, generateHelp;
ref$ = require('prelude-ls'), id = ref$.id, find = ref$.find, sort = ref$.sort, min = ref$.min, max = ref$.max, map = ref$.map, unlines = ref$.unlines;
ref$ = require('./util'), nameToRaw = ref$.nameToRaw, dasherize = ref$.dasherize, naturalJoin = ref$.naturalJoin;
wordWrap = require('word-wrap');
wordwrap = function(a, b){
var ref$, indent, width;
ref$ = b === undefined
? ['', a - 1]
: [repeatString$(' ', a), b - a - 1], indent = ref$[0], width = ref$[1];
return function(text){
return wordWrap(text, {
indent: indent,
width: width,
trim: true
});
};
};
getPreText = function(option, arg$, maxWidth){
var mainName, shortNames, ref$, longNames, type, description, aliasSeparator, typeSeparator, initialIndent, names, namesString, namesStringLen, typeSeparatorString, typeSeparatorStringLen, wrap;
mainName = option.option, shortNames = (ref$ = option.shortNames) != null
? ref$
: [], longNames = (ref$ = option.longNames) != null
? ref$
: [], type = option.type, description = option.description;
aliasSeparator = arg$.aliasSeparator, typeSeparator = arg$.typeSeparator, initialIndent = arg$.initialIndent;
if (option.negateName) {
mainName = "no-" + mainName;
if (longNames) {
longNames = map(function(it){
return "no-" + it;
}, longNames);
}
}
names = mainName.length === 1
? [mainName].concat(shortNames, longNames)
: shortNames.concat([mainName], longNames);
namesString = map(nameToRaw, names).join(aliasSeparator);
namesStringLen = namesString.length;
typeSeparatorString = mainName === 'NUM' ? '::' : typeSeparator;
typeSeparatorStringLen = typeSeparatorString.length;
if (maxWidth != null && !option.boolean && initialIndent + namesStringLen + typeSeparatorStringLen + type.length > maxWidth) {
wrap = wordwrap(initialIndent + namesStringLen + typeSeparatorStringLen, maxWidth);
return namesString + "" + typeSeparatorString + wrap(type).replace(/^\s+/, '');
} else {
return namesString + "" + (option.boolean
? ''
: typeSeparatorString + "" + type);
}
};
setHelpStyleDefaults = function(helpStyle){
helpStyle.aliasSeparator == null && (helpStyle.aliasSeparator = ', ');
helpStyle.typeSeparator == null && (helpStyle.typeSeparator = ' ');
helpStyle.descriptionSeparator == null && (helpStyle.descriptionSeparator = ' ');
helpStyle.initialIndent == null && (helpStyle.initialIndent = 2);
helpStyle.secondaryIndent == null && (helpStyle.secondaryIndent = 4);
helpStyle.maxPadFactor == null && (helpStyle.maxPadFactor = 1.5);
};
generateHelpForOption = function(getOption, arg$){
var stdout, helpStyle, ref$;
stdout = arg$.stdout, helpStyle = (ref$ = arg$.helpStyle) != null
? ref$
: {};
setHelpStyleDefaults(helpStyle);
return function(optionName){
var maxWidth, wrap, option, e, pre, defaultString, restPositionalString, description, fullDescription, that, preDescription, descriptionString, exampleString, examples, seperator;
maxWidth = stdout != null && stdout.isTTY ? stdout.columns - 1 : null;
wrap = maxWidth ? wordwrap(maxWidth) : id;
try {
option = getOption(dasherize(optionName));
} catch (e$) {
e = e$;
return e.message;
}
pre = getPreText(option, helpStyle);
defaultString = option['default'] && !option.negateName ? "\ndefault: " + option['default'] : '';
restPositionalString = option.restPositional ? 'Everything after this option is considered a positional argument, even if it looks like an option.' : '';
description = option.longDescription || option.description && sentencize(option.description);
fullDescription = description && restPositionalString
? description + " " + restPositionalString
: (that = description || restPositionalString) ? that : '';
preDescription = 'description:';
descriptionString = !fullDescription
? ''
: maxWidth && fullDescription.length - 1 - preDescription.length > maxWidth
? "\n" + preDescription + "\n" + wrap(fullDescription)
: "\n" + preDescription + " " + fullDescription;
exampleString = (that = option.example) ? (examples = [].concat(that), examples.length > 1
? "\nexamples:\n" + unlines(examples)
: "\nexample: " + examples[0]) : '';
seperator = defaultString || descriptionString || exampleString ? "\n" + repeatString$('=', pre.length) : '';
return pre + "" + seperator + defaultString + descriptionString + exampleString;
};
};
generateHelp = function(arg$){
var options, prepend, append, helpStyle, ref$, stdout, aliasSeparator, typeSeparator, descriptionSeparator, maxPadFactor, initialIndent, secondaryIndent;
options = arg$.options, prepend = arg$.prepend, append = arg$.append, helpStyle = (ref$ = arg$.helpStyle) != null
? ref$
: {}, stdout = arg$.stdout;
setHelpStyleDefaults(helpStyle);
aliasSeparator = helpStyle.aliasSeparator, typeSeparator = helpStyle.typeSeparator, descriptionSeparator = helpStyle.descriptionSeparator, maxPadFactor = helpStyle.maxPadFactor, initialIndent = helpStyle.initialIndent, secondaryIndent = helpStyle.secondaryIndent;
return function(arg$){
var ref$, showHidden, interpolate, maxWidth, output, out, data, optionCount, totalPreLen, preLens, i$, len$, item, that, pre, descParts, desc, preLen, sortedPreLens, maxPreLen, preLenMean, x, padAmount, descSepLen, fullWrapCount, partialWrapCount, descLen, totalLen, initialSpace, wrapAllFull, i, wrap;
ref$ = arg$ != null
? arg$
: {}, showHidden = ref$.showHidden, interpolate = ref$.interpolate;
maxWidth = stdout != null && stdout.isTTY ? stdout.columns - 1 : null;
output = [];
out = function(it){
return output.push(it != null ? it : '');
};
if (prepend) {
out(interpolate ? interp(prepend, interpolate) : prepend);
out();
}
data = [];
optionCount = 0;
totalPreLen = 0;
preLens = [];
for (i$ = 0, len$ = (ref$ = options).length; i$ < len$; ++i$) {
item = ref$[i$];
if (showHidden || !item.hidden) {
if (that = item.heading) {
data.push({
type: 'heading',
value: that
});
} else {
pre = getPreText(item, helpStyle, maxWidth);
descParts = [];
if ((that = item.description) != null) {
descParts.push(that);
}
if (that = item['enum']) {
descParts.push("either: " + naturalJoin(that));
}
if (item['default'] && !item.negateName) {
descParts.push("default: " + item['default']);
}
desc = descParts.join(' - ');
data.push({
type: 'option',
pre: pre,
desc: desc,
descLen: desc.length
});
preLen = pre.length;
optionCount++;
totalPreLen += preLen;
preLens.push(preLen);
}
}
}
sortedPreLens = sort(preLens);
maxPreLen = sortedPreLens[sortedPreLens.length - 1];
preLenMean = initialIndent + totalPreLen / optionCount;
x = optionCount > 2 ? min(preLenMean * maxPadFactor, maxPreLen) : maxPreLen;
for (i$ = sortedPreLens.length - 1; i$ >= 0; --i$) {
preLen = sortedPreLens[i$];
if (preLen <= x) {
padAmount = preLen;
break;
}
}
descSepLen = descriptionSeparator.length;
if (maxWidth != null) {
fullWrapCount = 0;
partialWrapCount = 0;
for (i$ = 0, len$ = data.length; i$ < len$; ++i$) {
item = data[i$];
if (item.type === 'option') {
pre = item.pre, desc = item.desc, descLen = item.descLen;
if (descLen === 0) {
item.wrap = 'none';
} else {
preLen = max(padAmount, pre.length) + initialIndent + descSepLen;
totalLen = preLen + descLen;
if (totalLen > maxWidth) {
if (descLen / 2.5 > maxWidth - preLen) {
fullWrapCount++;
item.wrap = 'full';
} else {
partialWrapCount++;
item.wrap = 'partial';
}
} else {
item.wrap = 'none';
}
}
}
}
}
initialSpace = repeatString$(' ', initialIndent);
wrapAllFull = optionCount > 1 && fullWrapCount + partialWrapCount * 0.5 > optionCount * 0.5;
for (i$ = 0, len$ = data.length; i$ < len$; ++i$) {
i = i$;
item = data[i$];
if (item.type === 'heading') {
if (i !== 0) {
out();
}
out(item.value + ":");
} else {
pre = item.pre, desc = item.desc, descLen = item.descLen, wrap = item.wrap;
if (maxWidth != null) {
if (wrapAllFull || wrap === 'full') {
wrap = wordwrap(initialIndent + secondaryIndent, maxWidth);
out(initialSpace + "" + pre + "\n" + wrap(desc));
continue;
} else if (wrap === 'partial') {
wrap = wordwrap(initialIndent + descSepLen + max(padAmount, pre.length), maxWidth);
out(initialSpace + "" + pad(pre, padAmount) + descriptionSeparator + wrap(desc).replace(/^\s+/, ''));
continue;
}
}
if (descLen === 0) {
out(initialSpace + "" + pre);
} else {
out(initialSpace + "" + pad(pre, padAmount) + descriptionSeparator + desc);
}
}
}
if (append) {
out();
out(interpolate ? interp(append, interpolate) : append);
}
return unlines(output);
};
};
function pad(str, num){
var len, padAmount;
len = str.length;
padAmount = num - len;
return str + "" + repeatString$(' ', padAmount > 0 ? padAmount : 0);
}
function sentencize(str){
var first, rest, period;
first = str.charAt(0).toUpperCase();
rest = str.slice(1);
period = /[\.!\?]$/.test(str) ? '' : '.';
return first + "" + rest + period;
}
function interp(string, object){
return string.replace(/{{([a-zA-Z$_][a-zA-Z$_0-9]*)}}/g, function(arg$, key){
var ref$;
return (ref$ = object[key]) != null
? ref$
: "{{" + key + "}}";
});
}
module.exports = {
generateHelp: generateHelp,
generateHelpForOption: generateHelpForOption
};
function repeatString$(str, n){
for (var r = ''; n > 0; (n >>= 1) && (str += str)) if (n & 1) r += str;
return r;
}
}).call(this);
@@ -0,0 +1,9 @@
"use client";
import {
free_solo_popover_default
} from "./chunk-ZPGVNVU7.mjs";
import "./chunk-L4NZQNWQ.mjs";
import "./chunk-C6TMY7KY.mjs";
export {
free_solo_popover_default as default
};
@@ -0,0 +1,7 @@
import { isMotionValue } from 'motion-dom';
function isWillChangeMotionValue(value) {
return Boolean(isMotionValue(value) && value.add);
}
export { isWillChangeMotionValue };
@@ -0,0 +1,5 @@
var assertClassBrand = require("./assertClassBrand.js");
function _classCheckPrivateStaticAccess(s, a, r) {
return assertClassBrand(a, s, r);
}
module.exports = _classCheckPrivateStaticAccess, module.exports.__esModule = true, module.exports["default"] = module.exports;
@@ -0,0 +1,9 @@
import type { TSESTree } from '@typescript-eslint/types';
import { DefinitionBase } from './DefinitionBase';
import { DefinitionType } from './DefinitionType';
export declare class ImportBindingDefinition extends DefinitionBase<DefinitionType.ImportBinding, TSESTree.ImportDefaultSpecifier | TSESTree.ImportNamespaceSpecifier | TSESTree.ImportSpecifier | TSESTree.TSImportEqualsDeclaration, TSESTree.ImportDeclaration | TSESTree.TSImportEqualsDeclaration, TSESTree.Identifier> {
readonly isTypeDefinition = true;
readonly isVariableDefinition = true;
constructor(name: TSESTree.Identifier, node: TSESTree.TSImportEqualsDeclaration, decl: TSESTree.TSImportEqualsDeclaration);
constructor(name: TSESTree.Identifier, node: Exclude<ImportBindingDefinition['node'], TSESTree.TSImportEqualsDeclaration>, decl: TSESTree.ImportDeclaration);
}
@@ -0,0 +1,52 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/warning.tsx
var warning_exports = {};
__export(warning_exports, {
WarningIcon: () => WarningIcon
});
module.exports = __toCommonJS(warning_exports);
var import_jsx_runtime = require("react/jsx-runtime");
var WarningIcon = (props) => {
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"svg",
{
fill: "none",
height: "24",
viewBox: "0 0 24 24",
width: "24",
xmlns: "http://www.w3.org/2000/svg",
...props,
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"path",
{
clipRule: "evenodd",
d: "M3 10.417C3 7.219 3 5.62 3.378 5.082C3.755 4.545 5.258 4.03 8.265 3.001L8.838 2.805C10.405 2.268 11.188 2 12 2C12.812 2 13.595 2.268 15.162 2.805L15.735 3.001C18.742 4.03 20.245 4.545 20.622 5.082C21 5.62 21 7.22 21 10.417V11.991C21 17.629 16.761 20.366 14.101 21.527C13.38 21.842 13.02 22 12 22C10.98 22 10.62 21.842 9.899 21.527C7.239 20.365 3 17.63 3 11.991V10.417ZM12 7.25C12.1989 7.25 12.3897 7.32902 12.5303 7.46967C12.671 7.61032 12.75 7.80109 12.75 8V12C12.75 12.1989 12.671 12.3897 12.5303 12.5303C12.3897 12.671 12.1989 12.75 12 12.75C11.8011 12.75 11.6103 12.671 11.4697 12.5303C11.329 12.3897 11.25 12.1989 11.25 12V8C11.25 7.80109 11.329 7.61032 11.4697 7.46967C11.6103 7.32902 11.8011 7.25 12 7.25ZM12 16C12.2652 16 12.5196 15.8946 12.7071 15.7071C12.8946 15.5196 13 15.2652 13 15C13 14.7348 12.8946 14.4804 12.7071 14.2929C12.5196 14.1054 12.2652 14 12 14C11.7348 14 11.4804 14.1054 11.2929 14.2929C11.1054 14.4804 11 14.7348 11 15C11 15.2652 11.1054 15.5196 11.2929 15.7071C11.4804 15.8946 11.7348 16 12 16Z",
fill: "currentColor",
fillRule: "evenodd"
}
)
}
);
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
WarningIcon
});
@@ -0,0 +1,232 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const util_1 = require("../util");
/**
* Check whatever node can be considered as simple
* @param node the node to be evaluated.
*/
function isSimpleType(node) {
switch (node.type) {
case utils_1.AST_NODE_TYPES.Identifier:
case utils_1.AST_NODE_TYPES.TSAnyKeyword:
case utils_1.AST_NODE_TYPES.TSBooleanKeyword:
case utils_1.AST_NODE_TYPES.TSNeverKeyword:
case utils_1.AST_NODE_TYPES.TSNumberKeyword:
case utils_1.AST_NODE_TYPES.TSBigIntKeyword:
case utils_1.AST_NODE_TYPES.TSObjectKeyword:
case utils_1.AST_NODE_TYPES.TSStringKeyword:
case utils_1.AST_NODE_TYPES.TSSymbolKeyword:
case utils_1.AST_NODE_TYPES.TSUnknownKeyword:
case utils_1.AST_NODE_TYPES.TSVoidKeyword:
case utils_1.AST_NODE_TYPES.TSNullKeyword:
case utils_1.AST_NODE_TYPES.TSArrayType:
case utils_1.AST_NODE_TYPES.TSUndefinedKeyword:
case utils_1.AST_NODE_TYPES.TSThisType:
case utils_1.AST_NODE_TYPES.TSQualifiedName:
return true;
case utils_1.AST_NODE_TYPES.TSTypeReference:
if (node.typeName.type === utils_1.AST_NODE_TYPES.Identifier &&
node.typeName.name === 'Array') {
if (!node.typeArguments) {
return true;
}
if (node.typeArguments.params.length === 1) {
return isSimpleType(node.typeArguments.params[0]);
}
}
else {
if (node.typeArguments) {
return false;
}
return isSimpleType(node.typeName);
}
return false;
default:
return false;
}
}
/**
* Check if node needs parentheses
* @param node the node to be evaluated.
*/
function typeNeedsParentheses(node) {
switch (node.type) {
case utils_1.AST_NODE_TYPES.TSTypeReference:
return typeNeedsParentheses(node.typeName);
case utils_1.AST_NODE_TYPES.TSUnionType:
case utils_1.AST_NODE_TYPES.TSFunctionType:
case utils_1.AST_NODE_TYPES.TSIntersectionType:
case utils_1.AST_NODE_TYPES.TSTypeOperator:
case utils_1.AST_NODE_TYPES.TSInferType:
case utils_1.AST_NODE_TYPES.TSConstructorType:
case utils_1.AST_NODE_TYPES.TSConditionalType:
return true;
case utils_1.AST_NODE_TYPES.Identifier:
return node.name === 'ReadonlyArray';
default:
return false;
}
}
exports.default = (0, util_1.createRule)({
name: 'array-type',
meta: {
type: 'suggestion',
docs: {
description: 'Require consistently using either `T[]` or `Array<T>` for arrays',
recommended: 'stylistic',
},
fixable: 'code',
messages: {
errorStringArray: "Array type using '{{className}}<{{type}}>' is forbidden. Use '{{readonlyPrefix}}{{type}}[]' instead.",
errorStringArrayReadonly: "Array type using '{{className}}<{{type}}>' is forbidden. Use '{{readonlyPrefix}}{{type}}' instead.",
errorStringArraySimple: "Array type using '{{className}}<{{type}}>' is forbidden for simple types. Use '{{readonlyPrefix}}{{type}}[]' instead.",
errorStringArraySimpleReadonly: "Array type using '{{className}}<{{type}}>' is forbidden for simple types. Use '{{readonlyPrefix}}{{type}}' instead.",
errorStringGeneric: "Array type using '{{readonlyPrefix}}{{type}}[]' is forbidden. Use '{{className}}<{{type}}>' instead.",
errorStringGenericSimple: "Array type using '{{readonlyPrefix}}{{type}}[]' is forbidden for non-simple types. Use '{{className}}<{{type}}>' instead.",
},
schema: [
{
type: 'object',
$defs: {
arrayOption: {
type: 'string',
enum: ['array', 'generic', 'array-simple'],
},
},
additionalProperties: false,
properties: {
default: {
$ref: '#/items/0/$defs/arrayOption',
description: 'The array type expected for mutable cases.',
},
readonly: {
$ref: '#/items/0/$defs/arrayOption',
description: 'The array type expected for readonly cases. If omitted, the value for `default` will be used.',
},
},
},
],
},
defaultOptions: [
{
default: 'array',
},
],
create(context, [options]) {
const defaultOption = options.default;
const readonlyOption = options.readonly ?? defaultOption;
/**
* @param node the node to be evaluated.
*/
function getMessageType(node) {
if (isSimpleType(node)) {
return context.sourceCode.getText(node);
}
return 'T';
}
return {
TSArrayType(node) {
const isReadonly = node.parent.type === utils_1.AST_NODE_TYPES.TSTypeOperator &&
node.parent.operator === 'readonly';
const currentOption = isReadonly ? readonlyOption : defaultOption;
if (currentOption === 'array' ||
(currentOption === 'array-simple' && isSimpleType(node.elementType))) {
return;
}
const messageId = currentOption === 'generic'
? 'errorStringGeneric'
: 'errorStringGenericSimple';
const errorNode = isReadonly ? node.parent : node;
context.report({
node: errorNode,
messageId,
data: {
type: getMessageType(node.elementType),
className: isReadonly ? 'ReadonlyArray' : 'Array',
readonlyPrefix: isReadonly ? 'readonly ' : '',
},
fix(fixer) {
const typeNode = node.elementType;
const arrayType = isReadonly ? 'ReadonlyArray' : 'Array';
return [
fixer.replaceTextRange([errorNode.range[0], typeNode.range[0]], `${arrayType}<`),
fixer.replaceTextRange([typeNode.range[1], errorNode.range[1]], '>'),
];
},
});
},
TSTypeReference(node) {
if (node.typeName.type !== utils_1.AST_NODE_TYPES.Identifier ||
!(node.typeName.name === 'Array' ||
node.typeName.name === 'ReadonlyArray' ||
node.typeName.name === 'Readonly') ||
(node.typeName.name === 'Readonly' &&
node.typeArguments?.params[0].type !== utils_1.AST_NODE_TYPES.TSArrayType)) {
return;
}
const isReadonlyWithGenericArrayType = node.typeName.name === 'Readonly' &&
node.typeArguments?.params[0].type === utils_1.AST_NODE_TYPES.TSArrayType;
const isReadonlyArrayType = node.typeName.name === 'ReadonlyArray' ||
isReadonlyWithGenericArrayType;
const currentOption = isReadonlyArrayType
? readonlyOption
: defaultOption;
if (currentOption === 'generic') {
return;
}
const readonlyPrefix = isReadonlyArrayType ? 'readonly ' : '';
const typeParams = node.typeArguments?.params;
const messageId = currentOption === 'array'
? isReadonlyWithGenericArrayType
? 'errorStringArrayReadonly'
: 'errorStringArray'
: isReadonlyArrayType && node.typeName.name !== 'ReadonlyArray'
? 'errorStringArraySimpleReadonly'
: 'errorStringArraySimple';
if (!typeParams) {
// Create an 'any' array
context.report({
node,
messageId,
data: {
type: 'any',
className: isReadonlyArrayType ? 'ReadonlyArray' : 'Array',
readonlyPrefix,
},
fix(fixer) {
return fixer.replaceText(node, `${readonlyPrefix}any[]`);
},
});
return;
}
if (typeParams.length !== 1 ||
(currentOption === 'array-simple' && !isSimpleType(typeParams[0]))) {
return;
}
const type = typeParams[0];
const typeParens = typeNeedsParentheses(type);
const parentParens = readonlyPrefix &&
node.parent.type === utils_1.AST_NODE_TYPES.TSArrayType &&
!(0, util_1.isParenthesized)(node.parent.elementType, context.sourceCode);
const start = `${parentParens ? '(' : ''}${readonlyPrefix}${typeParens ? '(' : ''}`;
const end = `${typeParens ? ')' : ''}${isReadonlyWithGenericArrayType ? '' : `[]`}${parentParens ? ')' : ''}`;
context.report({
node,
messageId,
data: {
type: getMessageType(type),
className: isReadonlyArrayType ? node.typeName.name : 'Array',
readonlyPrefix,
},
fix(fixer) {
return [
fixer.replaceTextRange([node.range[0], type.range[0]], start),
fixer.replaceTextRange([type.range[1], node.range[1]], end),
];
},
});
},
};
},
});
@@ -0,0 +1,829 @@
export default `flf2a$ 8 7 13 63 3 0 20415 1
Version 1.0 April 2001
Characters by Henry Segerman henryseg@email.com,
Converted to FIGlet font by Markus Gebhard markus@jave.de
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@@
__ @
LJ @
FJ @
J__L@
__ @
J__L@
|__|@
@@
_ _ @
EJ LJ@
-- --@
@
@
@
@
@@
_ _ @
_FJ__L]_ @
| __ | @
_| |__| |_ @
L_ __ _J@
LJ__F__J__LJ@
|__L J__| @
@@
_F]_ @
F ___L @
J (___| @
J\\___ \\ @
.--___) \\@
J\\__ __J@
J__LJ__F@
LJ @@
_ _ @
FJ // @
--/ F @
/ /' @
/ F __ @
/__/F L_|@
J___| L_J@
@@
___ @
F _ ", @
J '-'(| @
/ ,-, V\\ @
F L_/ < @
J\\____,_-L@
J____,_-'@
@@
__@
FJ@
L-@
- @
$@
@
@
@@
_ @
.'_| @
/ /-' @
| L @
\\ \\__ @
\\'.__L@
'.__|@
@@
_ @
|_'. @
'-\\ \\@
J |@
__/ /@
J__.'/@
|__.' @
@@
__ @
/\\FJ/\\ @
\\ / @
.' '. @
J\\.n n./L@
\\/J__L\\/ @
|__| @
@@
@
__ @
__FJ__ @
|__ __|@
L_J__L_J@
J__L @
@
@@
@
@
@
@
__ @
J L@
|_F @
|_F @@
@
@
______ @
|______|@
L______J@
$ @
@
@@
@
@
@
@
__ @
J__L@
|__|@
@@
_@
//@
/ F@
/ /'@
/ F @
/__/F @
J___| @
@@
____ @
F _ ] @
J |/ | L @
| | /| | @
F /_J J @
J\\______/F@
J______F @
@@
__ @
/ J @
LFJ @
J L@
J L@
J__L@
|__|@
@@
____ @
/ _ \`. @
J_/-7 .' @
\`-:'.'.' @
.' ;_J__ @
J________L@
|________|@
@@
____ @
F___ J @
\`-__| L @
|__ ( @
.-____] J @
J\\______/F@
J______F @
@@
_ _ @
FJ L] @
J |__| L @
|____ | @
L____J J @
J__L@
J__|@
@@
____ @
F ___L @
J |___| @
|____ \\ @
.--___) \\@
J\\______J@
J______F@
@@
____ @
F ___] @
J \`--_] @
| ,--. L @
F L__J | @
J\\______/L@
J______F @
@@
____ @
F___ ]@
\`--7 /@
/ //@
J L @
J__L @
|__| @
@@
____ @
F __ J @
J \`--' L @
/ ,--. \\ @
F L__J J @
J\\______/L@
J______F @
@@
____ @
F __ J @
J '--' L @
J\`---. | @
\`---J J @
J__L@
J__|@
@@
@
__ @
LJ @
-- @
__ @
J__L@
|__|@
@@
@
__ @
LJ @
-- @
__ @
J L@
|_F @
|_F @@
_ @
_-""_L @
," .""-' @
|"-_"--_ @
"-_"--_L@
"--_|@
@
@@
@
_____ @
|_____| @
_:_____:_@
L_______J@
L_______J@
@
@@
_ @
J_""-_ @
\`-"". ",@
__--"_-"|@
J_--""_-" @
|_--" @
@
@@
____ @
,"__ ".@
FJ--/ J|@
-- /_// @
J__/ @
J__L @
|__| @
@@
____ @
F __ ] @
J | | L @
| |[L' | @
F L_-_/_ @
J\\______/L@
J______F @
@@
_ @
/.\\ @
//_\\\\ @
/ ___ \\ @
/ L___J \\ @
J__L J__L@
|__L J__|@
@@
___ @
F _ ", @
J \`-'(| @
| ,--.\\ @
F L__J \\@
J_______J@
|_______F@
@@
___ @
,"___". @
FJ---L] @
J | LJ @
| \\___--.@
J\\_____/F@
J_____F @
@@
___ @
F __". @
J |--\\ L@
| | J |@
F L__J |@
J______/F@
|______F @
@@
____ @
F ___J @
J |___: @
| _____| @
F L____: @
J________L@
|________|@
@@
____ @
F ___J @
J |___: @
| _____|@
F |____J@
J__F @
|__| @
@@
___ @
,"___". @
FJ---L] @
J | [""L@
| \\___] |@
J\\_____/F@
J_____F @
@@
_ _ @
FJ L] @
J |__| L @
| __ | @
F L__J J @
J__L J__L@
|__L J__|@
@@
__ @
FJ @
J L @
| | @
F J @
J____L@
|____|@
@@
_ @
L] @
| L@
| |@
.--__J J@
J\\_____/@
J_____/@
@@
_ _ @
FJ / ; @
J |/ (| @
| L @
F L:\\ L @
J__L \\\\__L@
|__L \\L_|@
@@
_ @
FJ @
J | @
| | @
F L_____ @
J________L@
|________|@
@@
__ __ @
F \\/ ] @
J |\\__/| L @
| |\`--'| | @
F L J J @
J__L J__L@
|__L J__|@
@@
_ _ @
F L L] @
J \\| L @
| |\\ | @
F L\\\\ J @
J__L \\\\__L@
|__L J__|@
@@
____ @
F __ ] @
J |--| L @
| | | | @
F L__J J @
J\\______/F@
J______F @
@@
___ @
F _ ",@
J \`-' |@
| __/F@
F |__/ @
J__| @
|__L @
@@
____ @
F __ ] @
J |--| L @
| | _| | @
F L_F J @
J\\_____ \\@
J_____\\J]@
\\J @@
___ @
F _ ", @
J \`-'(| @
| _ L @
F |_\\ L @
J__| \\\\__L@
|__| J__|@
@@
___ @
F __". @
J (___| @
J\\___ \\ @
.--___) \\@
J\\______J@
J______F@
@@
____ @
/_ _\\@
[J L]@
| | @
F J @
J____L@
|____|@
@@
_ _ @
FJ L] @
J | | L @
| | | | @
F L__J J @
J\\______/F@
J______F @
@@
_ _ @
FJ L] @
J | | L@
J J F L@
J\\ \\/ /F@
\\\\__// @
\\__/ @
@@
_ _ @
F L J J @
J J .. L L @
| |/ \\| | @
F /\\ J @
J___//\\\\___L@
|___/ \\___|@
@@
_ _ @
FJ LJ @
J \\/ F @
/ \\ @
/ /\\ \\ @
J__//\\\\__L@
|__/ \\__|@
@@
_ _ @
FJ LJ@
J \\/ F@
J\\ /L@
F J @
|____|@
|____|@
@@
____ @
[__ '. @
\`--7 .' @
.'.'.' @
.' (_(__ @
J________L@
|________|@
@@
____ @
F ___J @
J |---' @
| | @
F L_____ @
J________L@
|________|@
@@
_ @
\\\\ @
J \\ @
'\\ \\ @
J \\ @
J\\__\\ @
|___L@
@@
____ @
L___ ] @
\`---| L @
| | @
_____J J @
J________L@
|________|@
@@
/\\ @
/ \\ @
/_/\\_\\@
L_/\\_J@
$$$ @
$ @
@
@@
@
@
@
@
$ @
________ @
|________|@
L________J@@
_ @
\\\\ @
\\\\\\@
$$ @
$ @
@
@
@@
@
___ _ @
F __\` L @
| |--| | @
F L__J J @
J\\____,__L@
J____,__F@
@@
_ @
FJ___ @
J __ J @
| |--| | @
F L__J J @
J__,____/L@
J__,____F @
@@
@
____ @
F ___J. @
| |---LJ @
F L___--.@
J\\______/F@
J______F @
@@
_ @
___FJ @
F __ L @
| |--| | @
F L__J J @
J\\____,__L@
J____,__F@
@@
@
____ @
F __ J @
| _____J @
F L___--.@
J\\______/F@
J______F @
@@
____ @
/ ___J@
J |_--'@
| _| @
F |_J @
J__F @
|__| @
@@
@
___ _ @
F __\` L @
| |--| | @
F L__J J @
)-____ L@
J\\______/F@
J______F @@
_ @
FJ___ @
J __ \`. @
| |--| | @
F L J J @
J__L J__L@
|__L J__|@
@@
__ @
LJ @
@
FJ @
J L@
J__L@
|__|@
@@
__ @
LJ @
_ @
J J @
J L@
,-_J |@
\\_____/@
\\_____/@@
_ @
FJ __ @
J |/ /L @
| \\ @
F L:\\ J @
J__L \\\\_J.@
|__L \\L_|@
@@
__ @
LJ @
FJ @
J L@
J L@
J__L@
|__|@
@@
@
_ _____ @
J '_ _ \`, @
| |_||_| | @
F L LJ J J @
J__L LJ J__L@
|__L LJ J__|@
@@
@
_ ___ @
J '__ J @
| |__| | @
F L J J @
J__L J__L@
|__L J__|@
@@
@
____ @
F __ J @
| |--| | @
F L__J J @
J\\______/F@
J______F @
@@
@
_ ___ @
J '__ J @
| |--| | @
F L__J J @
J _____/L@
|_J_____F @
L_J @@
@
___ _ @
F __\` L @
| |--| | @
F L__J J @
J\\_____ L@
J_____L_|@
L_J@@
@
_ ___ @
J '__ ",@
| |__|-J@
F L \`-'@
J__L @
|__L @
@@
@
____ @
F ___J @
| '----_ @
)-____ L@
J\\______/F@
J______F @
@@
_ @
FJ_ @
J _| @
| |-' @
F |__-.@
\\_____/@
J_____F@
@@
@
_ _ @
J | | L @
| | | | @
F L__J J @
J\\____,__L@
J____,__F@
@@
@
_ _ @
J | | L@
J J F L@
J\\ \\/ /F@
\\\\__// @
\\__/ @
@@
@
_ _ @
FJ .. L] @
| |/ \\| | @
F /\\ J @
J\\__//\\\\__/L@
\\__/ \\__/ @
@@
@
_ _ @
J \\ / F @
\\ ' / @
.' . \`. @
J__/:\\__L@
|__/ \\__|@
@@
@
_ _ @
J | | L @
| | | | @
F L__J J @
)-____ L@
J\\______/F@
J______F @@
@
_____ @
[__ F @
\`-.'.'/ @
.' (_(_ @
J_______L@
|_______|@
@@
_ @
."_J @
_/ /-' @
|_ (/ @
L_L."-__ @
"_"-__L@
"-__|@
@@
[] @
LJ @
FJ @
J L@
J L@
J L@
|__|@
|__|@@
_ @
F_". @
'-\\ \\_ @
\\) _|@
__-".J_J@
J__-"_" @
|__-" @
@@
@
/\\/]@
/ /@
L/\\//@
L/\\/ @
$ @
@
@@
[] [] @
\`,-.' @
//_\\\\ @
/ ___ \\ @
/ L___J \\ @
J__L J__L@
|__L J__|@
@@
[]__[] @
,"__", @
J |--| L @
| | | | @
F L__J J @
J\\______/F@
J______F @
@@
[] [] @
-, ,- @
J | | L @
| | | | @
F L__J J @
J\\______/F@
J______F @
@@
[] [] @
____-, @
F __ L @
| |--| | @
F L__J J @
J\\____-__L@
J____-__F@
@@
[] [] @
____ @
F __ J @
| |--| | @
F L__J J @
J\\______/F@
J______F @
@@
[] [] @
_ _ @
J | | L @
| | | | @
F L__J J @
J\\____-__L@
J____-__F@
@@
___ @
F _ ", @
J '-'(| @
| ,--.\\ @
F L__J \\@
J ____J@
|__|____F@
L__| @@
160 NO-BREAK SPACE
$$@
$$@
$$@
$$@
$$@
$$@
$$@
$$@@`
@@ -0,0 +1,197 @@
"use client";
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var src_exports = {};
__export(src_exports, {
Image: () => image_default,
useImage: () => useImage
});
module.exports = __toCommonJS(src_exports);
// src/image.tsx
var import_react3 = require("react");
var import_system2 = require("@heroui/system");
// src/use-image.ts
var import_react = require("react");
var import_system = require("@heroui/system");
var import_theme = require("@heroui/theme");
var import_react_utils = require("@heroui/react-utils");
var import_shared_utils = require("@heroui/shared-utils");
var import_use_image = require("@heroui/use-image");
var import_react2 = require("react");
function useImage(originalProps) {
var _a, _b;
const globalContext = (0, import_system.useProviderContext)();
const [props, variantProps] = (0, import_system.mapPropsVariants)(originalProps, import_theme.image.variantKeys);
const {
ref,
as,
src,
className,
classNames,
loading,
isBlurred,
fallbackSrc,
isLoading: isLoadingProp,
disableSkeleton = !!fallbackSrc,
removeWrapper = false,
onError,
onLoad,
srcSet,
sizes,
crossOrigin,
...otherProps
} = props;
const imageStatus = (0, import_use_image.useImage)({
src,
loading,
onError,
onLoad,
ignoreFallback: false,
srcSet,
sizes,
crossOrigin
});
const disableAnimation = (_b = (_a = originalProps.disableAnimation) != null ? _a : globalContext == null ? void 0 : globalContext.disableAnimation) != null ? _b : false;
const isImgLoaded = imageStatus === "loaded" && !isLoadingProp;
const isLoading = imageStatus === "loading" || isLoadingProp;
const isZoomed = originalProps.isZoomed;
const Component = as || "img";
const domRef = (0, import_react_utils.useDOMRef)(ref);
const { w, h } = (0, import_react2.useMemo)(() => {
return {
w: props.width ? typeof props.width === "number" ? `${props.width}px` : props.width : "fit-content",
h: props.height ? typeof props.height === "number" ? `${props.height}px` : props.height : "auto"
};
}, [props == null ? void 0 : props.width, props == null ? void 0 : props.height]);
const showFallback = (!src || !isImgLoaded) && !!fallbackSrc;
const showSkeleton = isLoading && !disableSkeleton;
const slots = (0, import_react2.useMemo)(
() => (0, import_theme.image)({
...variantProps,
disableAnimation,
showSkeleton
}),
[(0, import_shared_utils.objectToDeps)(variantProps), disableAnimation, showSkeleton]
);
const baseStyles = (0, import_shared_utils.clsx)(className, classNames == null ? void 0 : classNames.img);
const getImgProps = (props2 = {}) => {
const imgStyles = (0, import_shared_utils.clsx)(baseStyles, props2 == null ? void 0 : props2.className);
return {
src,
ref: domRef,
"data-loaded": (0, import_shared_utils.dataAttr)(isImgLoaded),
className: slots.img({ class: imgStyles }),
loading,
srcSet,
sizes,
crossOrigin,
...otherProps,
style: {
...(otherProps == null ? void 0 : otherProps.height) && { height: h },
...props2.style,
...otherProps.style
}
};
};
const getWrapperProps = (0, import_react.useCallback)(() => {
const fallbackStyle = showFallback ? {
backgroundImage: `url(${fallbackSrc})`
} : {};
return {
className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }),
style: {
...fallbackStyle,
maxWidth: w
}
};
}, [slots, showFallback, fallbackSrc, classNames == null ? void 0 : classNames.wrapper, w]);
const getBlurredImgProps = (0, import_react.useCallback)(() => {
return {
src,
"aria-hidden": (0, import_shared_utils.dataAttr)(true),
className: slots.blurredImg({ class: classNames == null ? void 0 : classNames.blurredImg })
};
}, [slots, src, classNames == null ? void 0 : classNames.blurredImg]);
return {
Component,
domRef,
slots,
classNames,
isBlurred,
disableSkeleton,
fallbackSrc,
removeWrapper,
isZoomed,
isLoading,
getImgProps,
getWrapperProps,
getBlurredImgProps
};
}
// src/image.tsx
var import_jsx_runtime = require("react/jsx-runtime");
var Image = (0, import_system2.forwardRef)((props, ref) => {
const {
Component,
domRef,
slots,
classNames,
isBlurred,
isZoomed,
fallbackSrc,
removeWrapper,
disableSkeleton,
getImgProps,
getWrapperProps,
getBlurredImgProps
} = useImage({
...props,
ref
});
const img = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, { ref: domRef, ...getImgProps() });
if (removeWrapper) {
return img;
}
const zoomed = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: slots.zoomedWrapper({ class: classNames == null ? void 0 : classNames.zoomedWrapper }), children: img });
if (isBlurred) {
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { ...getWrapperProps(), children: [
isZoomed ? zoomed : img,
(0, import_react3.cloneElement)(img, getBlurredImgProps())
] });
}
if (isZoomed || !disableSkeleton || fallbackSrc) {
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { ...getWrapperProps(), children: [
" ",
isZoomed ? zoomed : img
] });
}
return img;
});
Image.displayName = "HeroUI.Image";
var image_default = Image;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
Image,
useImage
});
@@ -0,0 +1,14 @@
"use strict";
module.exports = function (it) {
const { pluginName, ruleId } = it;
return `
A configuration object specifies rule "${ruleId}", but could not find plugin "${pluginName}".
Common causes of this problem include:
1. The "${pluginName}" plugin is not defined in your configuration file.
2. The "${pluginName}" plugin is not defined within the same configuration object in which the "${ruleId}" rule is applied.
`.trimStart();
};
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"1":"0 1 2 3 4 5 C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I"},C:{"1":"0 1 2 3 4 5 6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"xC TC 0C 1C"},D:{"1":"0 1 2 3 4 5 FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB"},E:{"1":"E F A B C L M G 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 K D 2C ZC 3C 4C 5C"},F:{"1":"0 1 2 3 4 5 6 7 8 9 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 G FD GD HD ID NC uC JD OC"},G:{"1":"E 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 LD MD ND"},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:{"1":"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:{"1":"1D 2D"}},B:1,C:"document.currentScript",D:true};
@@ -0,0 +1,75 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
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 at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/// <reference no-default-lib="true"/>
/// <reference lib="es2021.promise" />
interface ErrorOptions {
cause?: unknown;
}
interface Error {
cause?: unknown;
}
interface ErrorConstructor {
new (message?: string, options?: ErrorOptions): Error;
(message?: string, options?: ErrorOptions): Error;
}
interface EvalErrorConstructor {
new (message?: string, options?: ErrorOptions): EvalError;
(message?: string, options?: ErrorOptions): EvalError;
}
interface RangeErrorConstructor {
new (message?: string, options?: ErrorOptions): RangeError;
(message?: string, options?: ErrorOptions): RangeError;
}
interface ReferenceErrorConstructor {
new (message?: string, options?: ErrorOptions): ReferenceError;
(message?: string, options?: ErrorOptions): ReferenceError;
}
interface SyntaxErrorConstructor {
new (message?: string, options?: ErrorOptions): SyntaxError;
(message?: string, options?: ErrorOptions): SyntaxError;
}
interface TypeErrorConstructor {
new (message?: string, options?: ErrorOptions): TypeError;
(message?: string, options?: ErrorOptions): TypeError;
}
interface URIErrorConstructor {
new (message?: string, options?: ErrorOptions): URIError;
(message?: string, options?: ErrorOptions): URIError;
}
interface AggregateErrorConstructor {
new (
errors: Iterable<any>,
message?: string,
options?: ErrorOptions,
): AggregateError;
(
errors: Iterable<any>,
message?: string,
options?: ErrorOptions,
): AggregateError;
}
@@ -0,0 +1 @@
{"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;AAoBM,SAAS,0CAAoB,GAA8B,EAAE,OAAqC;IACvG,IAAI,aAAa,oBAAA,8BAAA,QAAS,UAAU;IACpC,IAAI,CAAC,kBAAkB,oBAAoB,GAAG,CAAA,GAAA,eAAO,EAAE;IAEvD,CAAA,GAAA,sBAAc,EAAE;QACd,IAAI,CAAA,gBAAA,0BAAA,IAAK,OAAO,KAAI,CAAC,YAAY;YAC/B,IAAI,SAAS;gBACX,IAAI,IAAI,OAAO,EAAE;oBACf,IAAI,SAAS,CAAA,GAAA,yCAAqB,EAAE,IAAI,OAAO,EAAE;wBAAC,UAAU;oBAAI;oBAChE,oBAAoB,CAAC,CAAC,OAAO,QAAQ;gBACvC;YACF;YAEA;YAEA,qFAAqF;YACrF,IAAI,WAAW,IAAI,iBAAiB;YACpC,SAAS,OAAO,CAAC,IAAI,OAAO,EAAE;gBAC5B,SAAS;gBACT,WAAW;gBACX,YAAY;gBACZ,iBAAiB;oBAAC;oBAAY;iBAAW;YAC3C;YAEA,OAAO;gBACL,qFAAqF;gBACrF,wFAAwF;gBACxF,4FAA4F;gBAC5F,yFAAyF;gBACzF,SAAS,UAAU;YACrB;QACF;IACF;IAEA,OAAO,aAAa,QAAQ;AAC9B","sources":["packages/@react-aria/focus/src/useHasTabbableChild.ts"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {getFocusableTreeWalker} from './FocusScope';\nimport {RefObject} from '@react-types/shared';\nimport {useLayoutEffect} from '@react-aria/utils';\nimport {useState} from 'react';\n\ninterface AriaHasTabbableChildOptions {\n isDisabled?: boolean\n}\n\n// This was created for a special empty case of a component that can have child or\n// be empty, like Collection/Virtualizer/Table/ListView/etc. When these components\n// are empty they can have a message with a tabbable element, which is like them\n// being not empty, when it comes to focus and tab order.\n\n/**\n * Returns whether an element has a tabbable child, and updates as children change.\n * @private\n */\nexport function useHasTabbableChild(ref: RefObject<Element | null>, options?: AriaHasTabbableChildOptions): boolean {\n let isDisabled = options?.isDisabled;\n let [hasTabbableChild, setHasTabbableChild] = useState(false);\n\n useLayoutEffect(() => {\n if (ref?.current && !isDisabled) {\n let update = () => {\n if (ref.current) {\n let walker = getFocusableTreeWalker(ref.current, {tabbable: true});\n setHasTabbableChild(!!walker.nextNode());\n }\n };\n\n update();\n\n // Update when new elements are inserted, or the tabIndex/disabled attribute updates.\n let observer = new MutationObserver(update);\n observer.observe(ref.current, {\n subtree: true,\n childList: true,\n attributes: true,\n attributeFilter: ['tabIndex', 'disabled']\n });\n\n return () => {\n // Disconnect mutation observer when a React update occurs on the top-level component\n // so we update synchronously after re-rendering. Otherwise React will emit act warnings\n // in tests since mutation observers fire asynchronously. The mutation observer is necessary\n // so we also update if a child component re-renders and adds/removes something tabbable.\n observer.disconnect();\n };\n }\n });\n\n return isDisabled ? false : hasTabbableChild;\n}\n"],"names":[],"version":3,"file":"useHasTabbableChild.module.js.map"}
@@ -0,0 +1,41 @@
import { COLUMN, SOURCES_INDEX, SOURCE_LINE, SOURCE_COLUMN } from './sourcemap-segment';
import { sortComparator } from './sort';
import type { ReverseSegment, SourceMapSegment } from './sourcemap-segment';
export type Source = ReverseSegment[][];
// Rebuilds the original source files, with mappings that are ordered by source line/column instead
// of generated line/column.
export default function buildBySources(
decoded: readonly SourceMapSegment[][],
memos: unknown[],
): Source[] {
const sources: Source[] = memos.map(() => []);
for (let i = 0; i < decoded.length; i++) {
const line = decoded[i];
for (let j = 0; j < line.length; j++) {
const seg = line[j];
if (seg.length === 1) continue;
const sourceIndex = seg[SOURCES_INDEX];
const sourceLine = seg[SOURCE_LINE];
const sourceColumn = seg[SOURCE_COLUMN];
const source = sources[sourceIndex];
const segs = (source[sourceLine] ||= []);
segs.push([sourceColumn, i, seg[COLUMN]]);
}
}
for (let i = 0; i < sources.length; i++) {
const source = sources[i];
for (let j = 0; j < source.length; j++) {
const line = source[j];
if (line) line.sort(sortComparator);
}
}
return sources;
}
@@ -0,0 +1,2 @@
export default function unset(object: any, path: string | (string | number)[]): any;
//# sourceMappingURL=unset.d.ts.map
@@ -0,0 +1,59 @@
'use strict';
var test = require('tape');
var inspect = require('object-inspect');
var is = require('object-is');
var forEach = require('for-each');
var v = require('es-value-fixtures');
var unboxPrimitive = require('..');
test('primitives', function (t) {
forEach([null, undefined], function (nullValue) {
t['throws'](
// @ts-expect-error
function () { unboxPrimitive(nullValue); },
TypeError,
inspect(nullValue) + ' is not a primitive'
);
});
// eslint-disable-next-line no-extra-parens
forEach(/** @type {typeof v.nonNullPrimitives} */ ([].concat(
// @ts-expect-error TS sucks with concat
v.nonNullPrimitives,
v.zeroes,
v.infinities,
NaN
)), function (primitive) {
var obj = Object(primitive);
t.ok(
is(unboxPrimitive(obj), primitive),
inspect(obj) + 'unboxes to ' + inspect(primitive)
);
});
t.end();
});
test('objects', function (t) {
// eslint-disable-next-line no-extra-parens
forEach(/** @type {typeof v.objects} */ (/** @type {unknown} */ ([].concat(
// @ts-expect-error TS sucks with concat
v.objects,
{},
[],
function () {},
/a/g,
new Date()
))), function (object) {
t['throws'](
// @ts-expect-error
function () { unboxPrimitive(object); },
TypeError,
inspect(object) + ' is not a primitive'
);
});
t.end();
});
@@ -0,0 +1,141 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = default_1;
const util = __importStar(require("../core/util.cjs"));
const error = () => {
const Sizable = {
string: { unit: "simvol", verb: "olmalıdır" },
file: { unit: "bayt", verb: "olmalıdır" },
array: { unit: "element", verb: "olmalıdır" },
set: { unit: "element", verb: "olmalıdır" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const parsedType = (data) => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "NaN" : "number";
}
case "object": {
if (Array.isArray(data)) {
return "array";
}
if (data === null) {
return "null";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns = {
regex: "input",
email: "email address",
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: "ISO datetime",
date: "ISO date",
time: "ISO time",
duration: "ISO duration",
ipv4: "IPv4 address",
ipv6: "IPv6 address",
cidrv4: "IPv4 range",
cidrv6: "IPv6 range",
base64: "base64-encoded string",
base64url: "base64url-encoded string",
json_string: "JSON string",
e164: "E.164 number",
jwt: "JWT",
template_literal: "input",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `Yanlış dəyər: gözlənilən ${issue.expected}, daxil olan ${parsedType(issue.input)}`;
case "invalid_value":
if (issue.values.length === 1)
return `Yanlış dəyər: gözlənilən ${util.stringifyPrimitive(issue.values[0])}`;
return `Yanlış seçim: aşağıdakılardan biri olmalıdır: ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Çox böyük: gözlənilən ${issue.origin ?? "dəyər"} ${adj}${issue.maximum.toString()} ${sizing.unit ?? "element"}`;
return `Çox böyük: gözlənilən ${issue.origin ?? "dəyər"} ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing)
return `Çox kiçik: gözlənilən ${issue.origin} ${adj}${issue.minimum.toString()} ${sizing.unit}`;
return `Çox kiçik: gözlənilən ${issue.origin} ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with")
return `Yanlış mətn: "${_issue.prefix}" ilə başlamalıdır`;
if (_issue.format === "ends_with")
return `Yanlış mətn: "${_issue.suffix}" ilə bitməlidir`;
if (_issue.format === "includes")
return `Yanlış mətn: "${_issue.includes}" daxil olmalıdır`;
if (_issue.format === "regex")
return `Yanlış mətn: ${_issue.pattern} şablonuna uyğun olmalıdır`;
return `Yanlış ${Nouns[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Yanlış ədəd: ${issue.divisor} ilə bölünə bilən olmalıdır`;
case "unrecognized_keys":
return `Tanınmayan açar${issue.keys.length > 1 ? "lar" : ""}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `${issue.origin} daxilində yanlış açar`;
case "invalid_union":
return "Yanlış dəyər";
case "invalid_element":
return `${issue.origin} daxilində yanlış dəyər`;
default:
return `Yanlış dəyər`;
}
};
};
function default_1() {
return {
localeError: error(),
};
}
@@ -0,0 +1,30 @@
var $4FGhO$react = require("react");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "useDeepMemo", () => $20e6e72fbf5dc81e$export$722debc0e56fea39);
/*
* Copyright 2023 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/ /* eslint-disable rulesdir/pure-render */
function $20e6e72fbf5dc81e$export$722debc0e56fea39(value, isEqual) {
// Using a ref during render is ok here because it's only an optimization – both values are equivalent.
// If a render is thrown away, it'll still work the same no matter if the next render is the same or not.
let lastValue = (0, $4FGhO$react.useRef)(null);
if (value && lastValue.current && isEqual(value, lastValue.current)) value = lastValue.current;
lastValue.current = value;
return value;
}
//# sourceMappingURL=useDeepMemo.main.js.map
@@ -0,0 +1,125 @@
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: "எழுத்துக்கள்", verb: "கொண்டிருக்க வேண்டும்" },
file: { unit: "பைட்டுகள்", verb: "கொண்டிருக்க வேண்டும்" },
array: { unit: "உறுப்புகள்", verb: "கொண்டிருக்க வேண்டும்" },
set: { unit: "உறுப்புகள்", verb: "கொண்டிருக்க வேண்டும்" },
};
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) ? "எண் அல்லாதது" : "எண்";
}
case "object": {
if (Array.isArray(data)) {
return "அணி";
}
if (data === null) {
return "வெறுமை";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns: {
[k in $ZodStringFormats | (string & {})]?: string;
} = {
regex: "உள்ளீடு",
email: "மின்னஞ்சல் முகவரி",
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: "ISO தேதி நேரம்",
date: "ISO தேதி",
time: "ISO நேரம்",
duration: "ISO கால அளவு",
ipv4: "IPv4 முகவரி",
ipv6: "IPv6 முகவரி",
cidrv4: "IPv4 வரம்பு",
cidrv6: "IPv6 வரம்பு",
base64: "base64-encoded சரம்",
base64url: "base64url-encoded சரம்",
json_string: "JSON சரம்",
e164: "E.164 எண்",
jwt: "JWT",
template_literal: "input",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${issue.expected}, பெறப்பட்டது ${parsedType(issue.input)}`;
case "invalid_value":
if (issue.values.length === 1) return `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${util.stringifyPrimitive(issue.values[0])}`;
return `தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${util.joinValues(issue.values, "|")} இல் ஒன்று`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing) {
return `மிக பெரியது: எதிர்பார்க்கப்பட்டது ${issue.origin ?? "மதிப்பு"} ${adj}${issue.maximum.toString()} ${sizing.unit ?? "உறுப்புகள்"} ஆக இருக்க வேண்டும்`;
}
return `மிக பெரியது: எதிர்பார்க்கப்பட்டது ${issue.origin ?? "மதிப்பு"} ${adj}${issue.maximum.toString()} ஆக இருக்க வேண்டும்`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${issue.origin} ${adj}${issue.minimum.toString()} ${sizing.unit} ஆக இருக்க வேண்டும்`; //
}
return `மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${issue.origin} ${adj}${issue.minimum.toString()} ஆக இருக்க வேண்டும்`;
}
case "invalid_format": {
const _issue = issue as errors.$ZodStringFormatIssues;
if (_issue.format === "starts_with") return `தவறான சரம்: "${_issue.prefix}" இல் தொடங்க வேண்டும்`;
if (_issue.format === "ends_with") return `தவறான சரம்: "${_issue.suffix}" இல் முடிவடைய வேண்டும்`;
if (_issue.format === "includes") return `தவறான சரம்: "${_issue.includes}" ஐ உள்ளடக்க வேண்டும்`;
if (_issue.format === "regex") return `தவறான சரம்: ${_issue.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`;
return `தவறான ${Nouns[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `தவறான எண்: ${issue.divisor} இன் பலமாக இருக்க வேண்டும்`;
case "unrecognized_keys":
return `அடையாளம் தெரியாத விசை${issue.keys.length > 1 ? "கள்" : ""}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `${issue.origin} இல் தவறான விசை`;
case "invalid_union":
return "தவறான உள்ளீடு";
case "invalid_element":
return `${issue.origin} இல் தவறான மதிப்பு`;
default:
return `தவறான உள்ளீடு`;
}
};
};
export default function (): { localeError: errors.$ZodErrorMap } {
return {
localeError: error(),
};
}
@@ -0,0 +1,5 @@
import { Parser } from "../index.js";
export declare const parsers: {
typescript: Parser;
};
@@ -0,0 +1 @@
{"version":3,"names":["_validate","require","_index","validateNode","node","fields","NODE_FIELDS","type","keys","BUILDER_KEYS","key","field","validateInternal"],"sources":["../../src/builders/validateNode.ts"],"sourcesContent":["import { validateInternal } from \"../validators/validate.ts\";\nimport type * as t from \"../index.ts\";\nimport { BUILDER_KEYS, NODE_FIELDS } from \"../index.ts\";\n\nexport default function validateNode<N extends t.Node>(node: N) {\n if (node == null || typeof node !== \"object\") return;\n const fields = NODE_FIELDS[node.type];\n if (!fields) return;\n\n // todo: because keys not in BUILDER_KEYS are not validated - this actually allows invalid nodes in some cases\n const keys = BUILDER_KEYS[node.type] as (keyof N & string)[];\n for (const key of keys) {\n const field = fields[key];\n if (field != null) validateInternal(field, node, key, node[key]);\n }\n return node;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAEe,SAASE,YAAYA,CAAmBC,IAAO,EAAE;EAC9D,IAAIA,IAAI,IAAI,IAAI,IAAI,OAAOA,IAAI,KAAK,QAAQ,EAAE;EAC9C,MAAMC,MAAM,GAAGC,kBAAW,CAACF,IAAI,CAACG,IAAI,CAAC;EACrC,IAAI,CAACF,MAAM,EAAE;EAGb,MAAMG,IAAI,GAAGC,mBAAY,CAACL,IAAI,CAACG,IAAI,CAAyB;EAC5D,KAAK,MAAMG,GAAG,IAAIF,IAAI,EAAE;IACtB,MAAMG,KAAK,GAAGN,MAAM,CAACK,GAAG,CAAC;IACzB,IAAIC,KAAK,IAAI,IAAI,EAAE,IAAAC,0BAAgB,EAACD,KAAK,EAAEP,IAAI,EAAEM,GAAG,EAAEN,IAAI,CAACM,GAAG,CAAC,CAAC;EAClE;EACA,OAAON,IAAI;AACb","ignoreList":[]}
@@ -0,0 +1,16 @@
var $1648ec00941567f3$exports = {};
$1648ec00941567f3$exports = {
"ascending": `\u{5347}\u{5E8F}`,
"ascendingSort": (args)=>`\u{6309}\u{5217} ${args.columnName} \u{5347}\u{5E8F}\u{6392}\u{5E8F}`,
"columnSize": (args)=>`${args.value} \u{50CF}\u{7D20}`,
"descending": `\u{964D}\u{5E8F}`,
"descendingSort": (args)=>`\u{6309}\u{5217} ${args.columnName} \u{964D}\u{5E8F}\u{6392}\u{5E8F}`,
"resizerDescription": `\u{6309}\u{201C}\u{8F93}\u{5165}\u{201D}\u{952E}\u{5F00}\u{59CB}\u{8C03}\u{6574}\u{5927}\u{5C0F}\u{3002}`,
"select": `\u{9009}\u{62E9}`,
"selectAll": `\u{5168}\u{9009}`,
"sortable": `\u{53EF}\u{6392}\u{5E8F}\u{7684}\u{5217}`
};
export {$1648ec00941567f3$exports as default};
//# sourceMappingURL=zh-CN.module.js.map
@@ -0,0 +1,47 @@
import type { PaginationOptions, PaginationResult } from '../usePagination/types';
export type Data = {
total: number;
list: any[];
};
export type Params = [
{
current: number;
pageSize: number;
sorter?: any;
filters?: any;
extra?: any;
[key: string]: any;
},
...any[]
];
export type Service<TData extends Data, TParams extends Params> = (...args: TParams) => Promise<TData>;
export type Antd3ValidateFields = (fieldNames: string[], callback: (errors: any, values: Record<string, any>) => void) => void;
export type Antd4ValidateFields = (fieldNames?: string[]) => Promise<Record<string, any>>;
export interface AntdFormUtils {
getFieldInstance?: (name: string) => Record<string, any>;
setFieldsValue: (value: Record<string, any>) => void;
getFieldsValue: (...args: any) => Record<string, any>;
resetFields: (...args: any) => void;
validateFields: Antd3ValidateFields | Antd4ValidateFields;
getInternalHooks?: any;
[key: string]: any;
}
export interface AntdTableResult<TData extends Data, TParams extends Params> extends PaginationResult<TData, TParams> {
tableProps: {
dataSource: TData['list'];
loading: boolean;
onChange: (pagination: any, filters?: any, sorter?: any) => void;
pagination: any;
[key: string]: any;
};
search: {
type: 'simple' | 'advance';
changeType: () => void;
submit: () => void;
reset: () => void;
};
}
export interface AntdTableOptions<TData extends Data, TParams extends Params> extends PaginationOptions<TData, TParams> {
form?: AntdFormUtils;
defaultType?: 'simple' | 'advance';
}
@@ -0,0 +1,34 @@
{
"name": "read-cache",
"version": "1.0.0",
"description": "Reads and caches the entire contents of a file until it is modified",
"files": [
"index.js"
],
"main": "index.js",
"scripts": {
"test": "ava"
},
"repository": {
"type": "git",
"url": "git+https://github.com/TrySound/read-cache.git"
},
"keywords": [
"fs",
"read",
"cache"
],
"author": "Bogdan Chadkin <trysound@yandex.ru>",
"license": "MIT",
"bugs": {
"url": "https://github.com/TrySound/read-cache/issues"
},
"homepage": "https://github.com/TrySound/read-cache#readme",
"devDependencies": {
"ava": "^0.9.1",
"del": "^2.2.0"
},
"dependencies": {
"pify": "^2.3.0"
}
}
@@ -0,0 +1,9 @@
'use strict';
module.exports = function reduce(arr, fn, init) {
var acc = init;
for (var i = 0; i < arr.length; i += 1) {
acc = fn(acc, arr[i], i);
}
return acc;
};
@@ -0,0 +1 @@
{"version":3,"names":["_toArray","require","_toPropertyKey","_decorate","decorators","factory","superClass","mixins","api","_getDecoratorsApi","i","length","r","initialize","O","initializeInstanceElements","decorated","elements","decorateClass","_coalesceClassElements","d","map","_createElementDescriptor","initializeClassElements","F","runClassFinishers","finishers","elementsDefinitionOrder","forEach","kind","element","placement","defineClassElement","proto","prototype","receiver","descriptor","initializer","enumerable","writable","configurable","value","call","Object","defineProperty","key","newElements","placements","static","own","addElementPlacement","_hasDecorators","push","elementFinishersExtras","decorateElement","apply","extras","result","decorateConstructor","silent","keys","indexOf","TypeError","splice","elementObject","fromElementDescriptor","elementFinisherExtras","toElementFinisherExtras","finisher","newExtras","j","obj","fromClassDescriptor","elementsAndFinisher","toClassDescriptor","undefined","k","desc","Symbol","toStringTag","toElementDescriptors","elementObjects","toArray","toElementDescriptor","disallowProperty","String","toPropertyKey","assign","_optionalCallableProperty","constructor","newConstructor","name","objectType","def","get","set","_coalesceGetterSetter","other","isSameElement","find","_isDataDescriptor","ReferenceError"],"sources":["../../src/helpers/decorate.js"],"sourcesContent":["/* @minVersion 7.1.5 */\n\n// TODO: Only Babel 7\n\nimport toArray from \"toArray\";\nimport toPropertyKey from \"toPropertyKey\";\n\n/*::\n type PropertyDescriptor =\n | {\n value: any,\n writable: boolean,\n configurable: boolean,\n enumerable: boolean,\n }\n | {\n get?: () => any,\n set?: (v: any) => void,\n configurable: boolean,\n enumerable: boolean,\n };\n\n type FieldDescriptor ={\n writable: boolean,\n configurable: boolean,\n enumerable: boolean,\n };\n\n type Placement = \"static\" | \"prototype\" | \"own\";\n type Key = string | symbol; // PrivateName is not supported yet.\n\n type ElementDescriptor =\n | {\n kind: \"method\",\n key: Key,\n placement: Placement,\n descriptor: PropertyDescriptor\n }\n | {\n kind: \"field\",\n key: Key,\n placement: Placement,\n descriptor: FieldDescriptor,\n initializer?: () => any,\n };\n\n // This is exposed to the user code\n type ElementObjectInput = ElementDescriptor & {\n [@@toStringTag]?: \"Descriptor\"\n };\n\n // This is exposed to the user code\n type ElementObjectOutput = ElementDescriptor & {\n [@@toStringTag]?: \"Descriptor\"\n extras?: ElementDescriptor[],\n finisher?: ClassFinisher,\n };\n\n // This is exposed to the user code\n type ClassObject = {\n [@@toStringTag]?: \"Descriptor\",\n kind: \"class\",\n elements: ElementDescriptor[],\n };\n\n type ElementDecorator = (descriptor: ElementObjectInput) => ?ElementObjectOutput;\n type ClassDecorator = (descriptor: ClassObject) => ?ClassObject;\n type ClassFinisher = <A, B>(cl: Class<A>) => Class<B>;\n\n // Only used by Babel in the transform output, not part of the spec.\n type ElementDefinition =\n | {\n kind: \"method\",\n value: any,\n key: Key,\n static?: boolean,\n decorators?: ElementDecorator[],\n }\n | {\n kind: \"field\",\n value: () => any,\n key: Key,\n static?: boolean,\n decorators?: ElementDecorator[],\n };\n\n declare function ClassFactory<C>(initialize: (instance: C) => void): {\n F: Class<C>,\n d: ElementDefinition[]\n }\n\n */\n\n/*::\n // Various combinations with/without extras and with one or many finishers\n\n type ElementFinisherExtras = {\n element: ElementDescriptor,\n finisher?: ClassFinisher,\n extras?: ElementDescriptor[],\n };\n\n type ElementFinishersExtras = {\n element: ElementDescriptor,\n finishers: ClassFinisher[],\n extras: ElementDescriptor[],\n };\n\n type ElementsFinisher = {\n elements: ElementDescriptor[],\n finisher?: ClassFinisher,\n };\n\n type ElementsFinishers = {\n elements: ElementDescriptor[],\n finishers: ClassFinisher[],\n };\n\n */\n\n/*::\n\n type Placements = {\n static: Key[],\n prototype: Key[],\n own: Key[],\n };\n\n */\n\n// ClassDefinitionEvaluation (Steps 26-*)\nexport default function _decorate(\n decorators /*: ClassDecorator[] */,\n factory /*: ClassFactory */,\n superClass /*: ?Class<*> */,\n mixins /*: ?Array<Function> */,\n) /*: Class<*> */ {\n var api = _getDecoratorsApi();\n if (mixins) {\n for (var i = 0; i < mixins.length; i++) {\n api = mixins[i](api);\n }\n }\n\n var r = factory(function initialize(O) {\n api.initializeInstanceElements(O, decorated.elements);\n }, superClass);\n var decorated = api.decorateClass(\n _coalesceClassElements(r.d.map(_createEleLine truncated
@@ -0,0 +1,597 @@
"use strict";
var Buffer = require("safer-buffer").Buffer;
// Multibyte codec. In this scheme, a character is represented by 1 or more bytes.
// Our codec supports UTF-16 surrogates, extensions for GB18030 and unicode sequences.
// To save memory and loading time, we read table files only when requested.
exports._dbcs = DBCSCodec;
var UNASSIGNED = -1,
GB18030_CODE = -2,
SEQ_START = -10,
NODE_START = -1000,
UNASSIGNED_NODE = new Array(0x100),
DEF_CHAR = -1;
for (var i = 0; i < 0x100; i++)
UNASSIGNED_NODE[i] = UNASSIGNED;
// Class DBCSCodec reads and initializes mapping tables.
function DBCSCodec(codecOptions, iconv) {
this.encodingName = codecOptions.encodingName;
if (!codecOptions)
throw new Error("DBCS codec is called without the data.")
if (!codecOptions.table)
throw new Error("Encoding '" + this.encodingName + "' has no data.");
// Load tables.
var mappingTable = codecOptions.table();
// Decode tables: MBCS -> Unicode.
// decodeTables is a trie, encoded as an array of arrays of integers. Internal arrays are trie nodes and all have len = 256.
// Trie root is decodeTables[0].
// Values: >= 0 -> unicode character code. can be > 0xFFFF
// == UNASSIGNED -> unknown/unassigned sequence.
// == GB18030_CODE -> this is the end of a GB18030 4-byte sequence.
// <= NODE_START -> index of the next node in our trie to process next byte.
// <= SEQ_START -> index of the start of a character code sequence, in decodeTableSeq.
this.decodeTables = [];
this.decodeTables[0] = UNASSIGNED_NODE.slice(0); // Create root node.
// Sometimes a MBCS char corresponds to a sequence of unicode chars. We store them as arrays of integers here.
this.decodeTableSeq = [];
// Actual mapping tables consist of chunks. Use them to fill up decode tables.
for (var i = 0; i < mappingTable.length; i++)
this._addDecodeChunk(mappingTable[i]);
// Load & create GB18030 tables when needed.
if (typeof codecOptions.gb18030 === 'function') {
this.gb18030 = codecOptions.gb18030(); // Load GB18030 ranges.
// Add GB18030 common decode nodes.
var commonThirdByteNodeIdx = this.decodeTables.length;
this.decodeTables.push(UNASSIGNED_NODE.slice(0));
var commonFourthByteNodeIdx = this.decodeTables.length;
this.decodeTables.push(UNASSIGNED_NODE.slice(0));
// Fill out the tree
var firstByteNode = this.decodeTables[0];
for (var i = 0x81; i <= 0xFE; i++) {
var secondByteNode = this.decodeTables[NODE_START - firstByteNode[i]];
for (var j = 0x30; j <= 0x39; j++) {
if (secondByteNode[j] === UNASSIGNED) {
secondByteNode[j] = NODE_START - commonThirdByteNodeIdx;
} else if (secondByteNode[j] > NODE_START) {
throw new Error("gb18030 decode tables conflict at byte 2");
}
var thirdByteNode = this.decodeTables[NODE_START - secondByteNode[j]];
for (var k = 0x81; k <= 0xFE; k++) {
if (thirdByteNode[k] === UNASSIGNED) {
thirdByteNode[k] = NODE_START - commonFourthByteNodeIdx;
} else if (thirdByteNode[k] === NODE_START - commonFourthByteNodeIdx) {
continue;
} else if (thirdByteNode[k] > NODE_START) {
throw new Error("gb18030 decode tables conflict at byte 3");
}
var fourthByteNode = this.decodeTables[NODE_START - thirdByteNode[k]];
for (var l = 0x30; l <= 0x39; l++) {
if (fourthByteNode[l] === UNASSIGNED)
fourthByteNode[l] = GB18030_CODE;
}
}
}
}
}
this.defaultCharUnicode = iconv.defaultCharUnicode;
// Encode tables: Unicode -> DBCS.
// `encodeTable` is array mapping from unicode char to encoded char. All its values are integers for performance.
// Because it can be sparse, it is represented as array of buckets by 256 chars each. Bucket can be null.
// Values: >= 0 -> it is a normal char. Write the value (if <=256 then 1 byte, if <=65536 then 2 bytes, etc.).
// == UNASSIGNED -> no conversion found. Output a default char.
// <= SEQ_START -> it's an index in encodeTableSeq, see below. The character starts a sequence.
this.encodeTable = [];
// `encodeTableSeq` is used when a sequence of unicode characters is encoded as a single code. We use a tree of
// objects where keys correspond to characters in sequence and leafs are the encoded dbcs values. A special DEF_CHAR key
// means end of sequence (needed when one sequence is a strict subsequence of another).
// Objects are kept separately from encodeTable to increase performance.
this.encodeTableSeq = [];
// Some chars can be decoded, but need not be encoded.
var skipEncodeChars = {};
if (codecOptions.encodeSkipVals)
for (var i = 0; i < codecOptions.encodeSkipVals.length; i++) {
var val = codecOptions.encodeSkipVals[i];
if (typeof val === 'number')
skipEncodeChars[val] = true;
else
for (var j = val.from; j <= val.to; j++)
skipEncodeChars[j] = true;
}
// Use decode trie to recursively fill out encode tables.
this._fillEncodeTable(0, 0, skipEncodeChars);
// Add more encoding pairs when needed.
if (codecOptions.encodeAdd) {
for (var uChar in codecOptions.encodeAdd)
if (Object.prototype.hasOwnProperty.call(codecOptions.encodeAdd, uChar))
this._setEncodeChar(uChar.charCodeAt(0), codecOptions.encodeAdd[uChar]);
}
this.defCharSB = this.encodeTable[0][iconv.defaultCharSingleByte.charCodeAt(0)];
if (this.defCharSB === UNASSIGNED) this.defCharSB = this.encodeTable[0]['?'];
if (this.defCharSB === UNASSIGNED) this.defCharSB = "?".charCodeAt(0);
}
DBCSCodec.prototype.encoder = DBCSEncoder;
DBCSCodec.prototype.decoder = DBCSDecoder;
// Decoder helpers
DBCSCodec.prototype._getDecodeTrieNode = function(addr) {
var bytes = [];
for (; addr > 0; addr >>>= 8)
bytes.push(addr & 0xFF);
if (bytes.length == 0)
bytes.push(0);
var node = this.decodeTables[0];
for (var i = bytes.length-1; i > 0; i--) { // Traverse nodes deeper into the trie.
var val = node[bytes[i]];
if (val == UNASSIGNED) { // Create new node.
node[bytes[i]] = NODE_START - this.decodeTables.length;
this.decodeTables.push(node = UNASSIGNED_NODE.slice(0));
}
else if (val <= NODE_START) { // Existing node.
node = this.decodeTables[NODE_START - val];
}
else
throw new Error("Overwrite byte in " + this.encodingName + ", addr: " + addr.toString(16));
}
return node;
}
DBCSCodec.prototype._addDecodeChunk = function(chunk) {
// First element of chunk is the hex mbcs code where we start.
var curAddr = parseInt(chunk[0], 16);
// Choose the decoding node where we'll write our chars.
var writeTable = this._getDecodeTrieNode(curAddr);
curAddr = curAddr & 0xFF;
// Write all other elements of the chunk to the table.
for (var k = 1; k < chunk.length; k++) {
var part = chunk[k];
if (typeof part === "string") { // String, write as-is.
for (var l = 0; l < part.length;) {
var code = part.charCodeAt(l++);
if (0xD800 <= code && code < 0xDC00) { // Decode surrogate
var codeTrail = part.charCodeAt(l++);
if (0xDC00 <= codeTrail && codeTrail < 0xE000)
writeTable[curAddr++] = 0x10000 + (code - 0xD800) * 0x400 + (codeTrail - 0xDC00);
else
throw new Error("Incorrect surrogate pair in " + this.encodingName + " at chunk " + chunk[0]);
}
else if (0x0FF0 < code && code <= 0x0FFF) { // Character sequence (our own encoding used)
var len = 0xFFF - code + 2;
var seq = [];
for (var m = 0; m < len; m++)
seq.push(part.charCodeAt(l++)); // Simple variation: don't support surrogates or subsequences in seq.
writeTable[curAddr++] = SEQ_START - this.decodeTableSeq.length;
this.decodeTableSeq.push(seq);
}
else
writeTable[curAddr++] = code; // Basic char
}
}
else if (typeof part === "number") { // Integer, meaning increasing sequence starting with prev character.
var charCode = writeTable[curAddr - 1] + 1;
for (var l = 0; l < part; l++)
writeTable[curAddr++] = charCode++;
}
else
throw new Error("Incorrect type '" + typeof part + "' given in " + this.encodingName + " at chunk " + chunk[0]);
}
if (curAddr > 0xFF)
throw new Error("Incorrect chunk in " + this.encodingName + " at addr " + chunk[0] + ": too long" + curAddr);
}
// Encoder helpers
DBCSCodec.prototype._getEncodeBucket = function(uCode) {
var high = uCode >> 8; // This could be > 0xFF because of astral characters.
if (this.encodeTable[high] === undefined)
this.encodeTable[high] = UNASSIGNED_NODE.slice(0); // Create bucket on demand.
return this.encodeTable[high];
}
DBCSCodec.prototype._setEncodeChar = function(uCode, dbcsCode) {
var bucket = this._getEncodeBucket(uCode);
var low = uCode & 0xFF;
if (bucket[low] <= SEQ_START)
this.encodeTableSeq[SEQ_START-bucket[low]][DEF_CHAR] = dbcsCode; // There's already a sequence, set a single-char subsequence of it.
else if (bucket[low] == UNASSIGNED)
bucket[low] = dbcsCode;
}
DBCSCodec.prototype._setEncodeSequence = function(seq, dbcsCode) {
// Get the root of character tree according to first character of the sequence.
var uCode = seq[0];
var bucket = this._getEncodeBucket(uCode);
var low = uCode & 0xFF;
var node;
if (bucket[low] <= SEQ_START) {
// There's already a sequence with - use it.
node = this.encodeTableSeq[SEQ_START-bucket[low]];
}
else {
// There was no sequence object - allocate a new one.
node = {};
if (bucket[low] !== UNASSIGNED) node[DEF_CHAR] = bucket[low]; // If a char was set before - make it a single-char subsequence.
bucket[low] = SEQ_START - this.encodeTableSeq.length;
this.encodeTableSeq.push(node);
}
// Traverse the character tree, allocating new nodes as needed.
for (var j = 1; j < seq.length-1; j++) {
var oldVal = node[uCode];
if (typeof oldVal === 'object')
node = oldVal;
else {
node = node[uCode] = {}
if (oldVal !== undefined)
node[DEF_CHAR] = oldVal
}
}
// Set the leaf to given dbcsCode.
uCode = seq[seq.length-1];
node[uCode] = dbcsCode;
}
DBCSCodec.prototype._fillEncodeTable = function(nodeIdx, prefix, skipEncodeChars) {
var node = this.decodeTables[nodeIdx];
var hasValues = false;
var subNodeEmpty = {};
for (var i = 0; i < 0x100; i++) {
var uCode = node[i];
var mbCode = prefix + i;
if (skipEncodeChars[mbCode])
continue;
if (uCode >= 0) {
this._setEncodeChar(uCode, mbCode);
hasValues = true;
} else if (uCode <= NODE_START) {
var subNodeIdx = NODE_START - uCode;
if (!subNodeEmpty[subNodeIdx]) { // Skip empty subtrees (they are too large in gb18030).
var newPrefix = (mbCode << 8) >>> 0; // NOTE: '>>> 0' keeps 32-bit num positive.
if (this._fillEncodeTable(subNodeIdx, newPrefix, skipEncodeChars))
hasValues = true;
else
subNodeEmpty[subNodeIdx] = true;
}
} else if (uCode <= SEQ_START) {
this._setEncodeSequence(this.decodeTableSeq[SEQ_START - uCode], mbCode);
hasValues = true;
}
}
return hasValues;
}
// == Encoder ==================================================================
function DBCSEncoder(options, codec) {
// Encoder state
this.leadSurrogate = -1;
this.seqObj = undefined;
// Static data
this.encodeTable = codec.encodeTable;
this.encodeTableSeq = codec.encodeTableSeq;
this.defaultCharSingleByte = codec.defCharSB;
this.gb18030 = codec.gb18030;
}
DBCSEncoder.prototype.write = function(str) {
var newBuf = Buffer.alloc(str.length * (this.gb18030 ? 4 : 3)),
leadSurrogate = this.leadSurrogate,
seqObj = this.seqObj, nextChar = -1,
i = 0, j = 0;
while (true) {
// 0. Get next character.
if (nextChar === -1) {
if (i == str.length) break;
var uCode = str.charCodeAt(i++);
}
else {
var uCode = nextChar;
nextChar = -1;
}
// 1. Handle surrogates.
if (0xD800 <= uCode && uCode < 0xE000) { // Char is one of surrogates.
if (uCode < 0xDC00) { // We've got lead surrogate.
if (leadSurrogate === -1) {
leadSurrogate = uCode;
continue;
} else {
leadSurrogate = uCode;
// Double lead surrogate found.
uCode = UNASSIGNED;
}
} else { // We've got trail surrogate.
if (leadSurrogate !== -1) {
uCode = 0x10000 + (leadSurrogate - 0xD800) * 0x400 + (uCode - 0xDC00);
leadSurrogate = -1;
} else {
// Incomplete surrogate pair - only trail surrogate found.
uCode = UNASSIGNED;
}
}
}
else if (leadSurrogate !== -1) {
// Incomplete surrogate pair - only lead surrogate found.
nextChar = uCode; uCode = UNASSIGNED; // Write an error, then current char.
leadSurrogate = -1;
}
// 2. Convert uCode character.
var dbcsCode = UNASSIGNED;
if (seqObj !== undefined && uCode != UNASSIGNED) { // We are in the middle of the sequence
var resCode = seqObj[uCode];
if (typeof resCode === 'object') { // Sequence continues.
seqObj = resCode;
continue;
} else if (typeof resCode == 'number') { // Sequence finished. Write it.
dbcsCode = resCode;
} else if (resCode == undefined) { // Current character is not part of the sequence.
// Try default character for this sequence
resCode = seqObj[DEF_CHAR];
if (resCode !== undefined) {
dbcsCode = resCode; // Found. Write it.
nextChar = uCode; // Current character will be written too in the next iteration.
} else {
// TODO: What if we have no default? (resCode == undefined)
// Then, we should write first char of the sequence as-is and try the rest recursively.
// Didn't do it for now because no encoding has this situation yet.
// Currently, just skip the sequence and write current char.
}
}
seqObj = undefined;
}
else if (uCode >= 0) { // Regular character
var subtable = this.encodeTable[uCode >> 8];
if (subtable !== undefined)
dbcsCode = subtable[uCode & 0xFF];
if (dbcsCode <= SEQ_START) { // Sequence start
seqObj = this.encodeTableSeq[SEQ_START-dbcsCode];
continue;
}
if (dbcsCode == UNASSIGNED && this.gb18030) {
// Use GB18030 algorithm to find character(s) to write.
var idx = findIdx(this.gb18030.uChars, uCode);
if (idx != -1) {
var dbcsCode = this.gb18030.gbChars[idx] + (uCode - this.gb18030.uChars[idx]);
newBuf[j++] = 0x81 + Math.floor(dbcsCode / 12600); dbcsCode = dbcsCode % 12600;
newBuf[j++] = 0x30 + Math.floor(dbcsCode / 1260); dbcsCode = dbcsCode % 1260;
newBuf[j++] = 0x81 + Math.floor(dbcsCode / 10); dbcsCode = dbcsCode % 10;
newBuf[j++] = 0x30 + dbcsCode;
continue;
}
}
}
// 3. Write dbcsCode character.
if (dbcsCode === UNASSIGNED)
dbcsCode = this.defaultCharSingleByte;
if (dbcsCode < 0x100) {
newBuf[j++] = dbcsCode;
}
else if (dbcsCode < 0x10000) {
newBuf[j++] = dbcsCode >> 8; // high byte
newBuf[j++] = dbcsCode & 0xFF; // low byte
}
else if (dbcsCode < 0x1000000) {
newBuf[j++] = dbcsCode >> 16;
newBuf[j++] = (dbcsCode >> 8) & 0xFF;
newBuf[j++] = dbcsCode & 0xFF;
} else {
newBuf[j++] = dbcsCode >>> 24;
newBuf[j++] = (dbcsCode >>> 16) & 0xFF;
newBuf[j++] = (dbcsCode >>> 8) & 0xFF;
newBuf[j++] = dbcsCode & 0xFF;
}
}
this.seqObj = seqObj;
this.leadSurrogate = leadSurrogate;
return newBuf.slice(0, j);
}
DBCSEncoder.prototype.end = function() {
if (this.leadSurrogate === -1 && this.seqObj === undefined)
return; // All clean. Most often case.
var newBuf = Buffer.alloc(10), j = 0;
if (this.seqObj) { // We're in the sequence.
var dbcsCode = this.seqObj[DEF_CHAR];
if (dbcsCode !== undefined) { // Write beginning of the sequence.
if (dbcsCode < 0x100) {
newBuf[j++] = dbcsCode;
}
else {
newBuf[j++] = dbcsCode >> 8; // high byte
newBuf[j++] = dbcsCode & 0xFF; // low byte
}
} else {
// See todo above.
}
this.seqObj = undefined;
}
if (this.leadSurrogate !== -1) {
// Incomplete surrogate pair - only lead surrogate found.
newBuf[j++] = this.defaultCharSingleByte;
this.leadSurrogate = -1;
}
return newBuf.slice(0, j);
}
// Export for testing
DBCSEncoder.prototype.findIdx = findIdx;
// == Decoder ==================================================================
function DBCSDecoder(options, codec) {
// Decoder state
this.nodeIdx = 0;
this.prevBytes = [];
// Static data
this.decodeTables = codec.decodeTables;
this.decodeTableSeq = codec.decodeTableSeq;
this.defaultCharUnicode = codec.defaultCharUnicode;
this.gb18030 = codec.gb18030;
}
DBCSDecoder.prototype.write = function(buf) {
var newBuf = Buffer.alloc(buf.length*2),
nodeIdx = this.nodeIdx,
prevBytes = this.prevBytes, prevOffset = this.prevBytes.length,
seqStart = -this.prevBytes.length, // idx of the start of current parsed sequence.
uCode;
for (var i = 0, j = 0; i < buf.length; i++) {
var curByte = (i >= 0) ? buf[i] : prevBytes[i + prevOffset];
// Lookup in current trie node.
var uCode = this.decodeTables[nodeIdx][curByte];
if (uCode >= 0) {
// Normal character, just use it.
}
else if (uCode === UNASSIGNED) { // Unknown char.
// TODO: Callback with seq.
uCode = this.defaultCharUnicode.charCodeAt(0);
i = seqStart; // Skip one byte ('i' will be incremented by the for loop) and try to parse again.
}
else if (uCode === GB18030_CODE) {
if (i >= 3) {
var ptr = (buf[i-3]-0x81)*12600 + (buf[i-2]-0x30)*1260 + (buf[i-1]-0x81)*10 + (curByte-0x30);
} else {
var ptr = (prevBytes[i-3+prevOffset]-0x81)*12600 +
(((i-2 >= 0) ? buf[i-2] : prevBytes[i-2+prevOffset])-0x30)*1260 +
(((i-1 >= 0) ? buf[i-1] : prevBytes[i-1+prevOffset])-0x81)*10 +
(curByte-0x30);
}
var idx = findIdx(this.gb18030.gbChars, ptr);
uCode = this.gb18030.uChars[idx] + ptr - this.gb18030.gbChars[idx];
}
else if (uCode <= NODE_START) { // Go to next trie node.
nodeIdx = NODE_START - uCode;
continue;
}
else if (uCode <= SEQ_START) { // Output a sequence of chars.
var seq = this.decodeTableSeq[SEQ_START - uCode];
for (var k = 0; k < seq.length - 1; k++) {
uCode = seq[k];
newBuf[j++] = uCode & 0xFF;
newBuf[j++] = uCode >> 8;
}
uCode = seq[seq.length-1];
}
else
throw new Error("iconv-lite internal error: invalid decoding table value " + uCode + " at " + nodeIdx + "/" + curByte);
// Write the character to buffer, handling higher planes using surrogate pair.
if (uCode >= 0x10000) {
uCode -= 0x10000;
var uCodeLead = 0xD800 | (uCode >> 10);
newBuf[j++] = uCodeLead & 0xFF;
newBuf[j++] = uCodeLead >> 8;
uCode = 0xDC00 | (uCode & 0x3FF);
}
newBuf[j++] = uCode & 0xFF;
newBuf[j++] = uCode >> 8;
// Reset trie node.
nodeIdx = 0; seqStart = i+1;
}
this.nodeIdx = nodeIdx;
this.prevBytes = (seqStart >= 0)
? Array.prototype.slice.call(buf, seqStart)
: prevBytes.slice(seqStart + prevOffset).concat(Array.prototype.slice.call(buf));
return newBuf.slice(0, j).toString('ucs2');
}
DBCSDecoder.prototype.end = function() {
var ret = '';
// Try to parse all remaining chars.
while (this.prevBytes.length > 0) {
// Skip 1 character in the buffer.
ret += this.defaultCharUnicode;
var bytesArr = this.prevBytes.slice(1);
// Parse remaining as usual.
this.prevBytes = [];
this.nodeIdx = 0;
if (bytesArr.length > 0)
ret += this.write(bytesArr);
}
this.prevBytes = [];
this.nodeIdx = 0;
return ret;
}
// Binary search for GB18030. Returns largest i such that table[i] <= val.
function findIdx(table, val) {
if (table[0] > val)
return -1;
var l = 0, r = table.length;
while (l < r-1) { // always table[l] <= val < table[r]
var mid = l + ((r-l+1) >> 1);
if (table[mid] <= val)
l = mid;
else
r = mid;
}
return l;
}
@@ -0,0 +1,33 @@
var toInteger = require('./toInteger');
/**
* Checks if `value` is an integer.
*
* **Note:** This method is based on
* [`Number.isInteger`](https://mdn.io/Number/isInteger).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an integer, else `false`.
* @example
*
* _.isInteger(3);
* // => true
*
* _.isInteger(Number.MIN_VALUE);
* // => false
*
* _.isInteger(Infinity);
* // => false
*
* _.isInteger('3');
* // => false
*/
function isInteger(value) {
return typeof value == 'number' && value == toInteger(value);
}
module.exports = isInteger;
@@ -0,0 +1,31 @@
import { scale, alpha } from '../numbers/index.mjs';
import { degrees, px, progressPercentage } from '../numbers/units.mjs';
const transformValueTypes = {
rotate: degrees,
rotateX: degrees,
rotateY: degrees,
rotateZ: degrees,
scale,
scaleX: scale,
scaleY: scale,
scaleZ: scale,
skew: degrees,
skewX: degrees,
skewY: degrees,
distance: px,
translateX: px,
translateY: px,
translateZ: px,
x: px,
y: px,
z: px,
perspective: px,
transformPerspective: px,
opacity: alpha,
originX: progressPercentage,
originY: progressPercentage,
originZ: px,
};
export { transformValueTypes };
@@ -0,0 +1 @@
{"name":"@npmcli/move-file","version":"2.0.1","requiresBuild":false,"files":{"lib/index.js":{"checkedAt":1794532120975,"integrity":"sha512-6nUmDGAZbdu9xcwSgq5co0LmnI3J652eIYxRwdfBe18eu4m1MoBg51Jbfz8+jEWTpSKlTG3IRaOS8CIPjbLgCw==","mode":420,"size":4967},"package.json":{"checkedAt":1794532120975,"integrity":"sha512-hY17I7j6pwmkjqBmckkJODzQfnYAPQKLuAN+fypcbB+JMFIkSoKfYLAEkICTnhxJghUYtMJXxo6rJrNrthkPjw==","mode":420,"size":1159},"LICENSE.md":{"checkedAt":1794532120975,"integrity":"sha512-RivZN6RyM/ebUtndkXX8KZjRIjvnR6EhX0EHXqa6V+GoTvJI49gMrzCcnLtg4x8DUVEdWBYVXkT1AIyvTO3xRg==","mode":420,"size":1141},"README.md":{"checkedAt":1794532120975,"integrity":"sha512-Ku9Bpw7rsnMjPJcWg0WRb0+8VaYAxI9NHTkWEO9vZlA6++1J5uNDfk/75hmeHfEz3jFezEslG5BhpNq2958kQA==","mode":420,"size":1459}}}
@@ -0,0 +1,6 @@
import { BaseDecoratorInfo } from './BaseDecoratorInfo';
import { DecoratorInfoKind } from './DecoratorInfoKind';
export interface MethodDecoratorInfo extends BaseDecoratorInfo<DecoratorInfoKind.method> {
method: string | symbol;
}
//# sourceMappingURL=MethodDecoratorInfo.d.ts.map
@@ -0,0 +1,6 @@
export type ErrorBoundaryContextType = {
didCatch: boolean;
error: any;
resetErrorBoundary: (...args: any[]) => void;
};
export declare const ErrorBoundaryContext: import("react").Context<ErrorBoundaryContextType | null>;
@@ -0,0 +1,68 @@
'use strict';
var $RangeError = require('es-errors/range');
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var isTypedArray = require('is-typed-array');
var typedArrayBuffer = require('typed-array-buffer');
var typedArrayLength = require('typed-array-length');
var whichTypedArray = require('which-typed-array');
var Get = require('./Get');
var IntegerIndexedElementSet = require('./IntegerIndexedElementSet');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var LengthOfArrayLike = require('./LengthOfArrayLike');
var ToObject = require('./ToObject');
var ToString = require('./ToString');
// https://262.ecma-international.org/14.0/#sec-settypedarrayfromarraylike
module.exports = function SetTypedArrayFromArrayLike(target, targetOffset, source) {
var whichTarget = whichTypedArray(target);
if (!whichTarget) {
throw new $TypeError('Assertion failed: target must be a TypedArray instance');
}
if (targetOffset !== Infinity && (!isInteger(targetOffset) || targetOffset < 0)) {
throw new $TypeError('Assertion failed: targetOffset must be a non-negative integer or +Infinity');
}
if (isTypedArray(source)) {
throw new $TypeError('Assertion failed: source must not be a TypedArray instance');
}
var targetBuffer = typedArrayBuffer(target); // step 1
if (IsDetachedBuffer(targetBuffer)) {
throw new $TypeError('target’s buffer is detached'); // step 2
}
var targetLength = typedArrayLength(target); // step 3
var src = ToObject(source); // step 4
var srcLength = LengthOfArrayLike(src); // step 5
if (targetOffset === Infinity) {
throw new $RangeError('targetOffset must be a finite integer'); // step 6
}
if (srcLength + targetOffset > targetLength) {
throw new $RangeError('targetOffset + srcLength must be <= target.length'); // step 7
}
var k = 0; // step 8
while (k < srcLength) { // step 9
var Pk = ToString(k); // step 9.a
var value = Get(src, Pk); // step 9.b
var targetIndex = targetOffset + k; // step 9.c
IntegerIndexedElementSet(target, targetIndex, value); // step 9.d
k += 1; // step 9.e
}
};
@@ -0,0 +1,9 @@
import { fillOffset } from './fill.mjs';
function defaultOffset(arr) {
const offset = [0];
fillOffset(offset, arr.length - 1);
return offset;
}
export { defaultOffset };
@@ -0,0 +1,987 @@
import { noop } from '@internal/listenerMiddleware/utils'
import type { PayloadAction, WithSlice } from '@reduxjs/toolkit'
import {
asyncThunkCreator,
buildCreateSlice,
combineSlices,
configureStore,
createAction,
createAsyncThunk,
createSlice,
} from '@reduxjs/toolkit'
type CreateSlice = typeof createSlice
describe('createSlice', () => {
const consoleErrorSpy = vi.spyOn(console, 'error').mockImplementation(noop)
beforeEach(() => {
vi.clearAllMocks()
})
afterAll(() => {
vi.restoreAllMocks()
})
describe('when slice is undefined', () => {
it('should throw an error', () => {
expect(() =>
// @ts-ignore
createSlice({
reducers: {
increment: (state) => state + 1,
multiply: (state, action: PayloadAction<number>) =>
state * action.payload,
},
initialState: 0,
}),
).toThrowError()
})
})
describe('when slice is an empty string', () => {
it('should throw an error', () => {
expect(() =>
createSlice({
name: '',
reducers: {
increment: (state) => state + 1,
multiply: (state, action: PayloadAction<number>) =>
state * action.payload,
},
initialState: 0,
}),
).toThrowError()
})
})
describe('when initial state is undefined', () => {
beforeEach(() => {
vi.stubEnv('NODE_ENV', 'development')
})
afterEach(() => {
vi.unstubAllEnvs()
})
it('should throw an error', () => {
createSlice({
name: 'test',
reducers: {},
initialState: undefined,
})
expect(consoleErrorSpy).toHaveBeenCalledOnce()
expect(consoleErrorSpy).toHaveBeenLastCalledWith(
'You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`',
)
})
})
describe('when passing slice', () => {
const { actions, reducer, caseReducers } = createSlice({
reducers: {
increment: (state) => state + 1,
},
initialState: 0,
name: 'cool',
})
it('should create increment action', () => {
expect(actions.hasOwnProperty('increment')).toBe(true)
})
it('should have the correct action for increment', () => {
expect(actions.increment()).toEqual({
type: 'cool/increment',
payload: undefined,
})
})
it('should return the correct value from reducer', () => {
expect(reducer(undefined, actions.increment())).toEqual(1)
})
it('should include the generated case reducers', () => {
expect(caseReducers).toBeTruthy()
expect(caseReducers.increment).toBeTruthy()
expect(typeof caseReducers.increment).toBe('function')
})
it('getInitialState should return the state', () => {
const initialState = 42
const slice = createSlice({
name: 'counter',
initialState,
reducers: {},
})
expect(slice.getInitialState()).toBe(initialState)
})
it('should allow non-draftable initial state', () => {
expect(() =>
createSlice({
name: 'params',
initialState: new URLSearchParams(),
reducers: {},
}),
).not.toThrowError()
})
})
describe('when initialState is a function', () => {
const initialState = () => ({ user: '' })
const { actions, reducer } = createSlice({
reducers: {
setUserName: (state, action) => {
state.user = action.payload
},
},
initialState,
name: 'user',
})
it('should set the username', () => {
expect(reducer(undefined, actions.setUserName('eric'))).toEqual({
user: 'eric',
})
})
it('getInitialState should return the state', () => {
const initialState = () => 42
const slice = createSlice({
name: 'counter',
initialState,
reducers: {},
})
expect(slice.getInitialState()).toBe(42)
})
it('should allow non-draftable initial state', () => {
expect(() =>
createSlice({
name: 'params',
initialState: () => new URLSearchParams(),
reducers: {},
}),
).not.toThrowError()
})
})
describe('when mutating state object', () => {
const initialState = { user: '' }
const { actions, reducer } = createSlice({
reducers: {
setUserName: (state, action) => {
state.user = action.payload
},
},
initialState,
name: 'user',
})
it('should set the username', () => {
expect(reducer(initialState, actions.setUserName('eric'))).toEqual({
user: 'eric',
})
})
})
describe('when passing extra reducers', () => {
const addMore = createAction<{ amount: number }>('ADD_MORE')
const { reducer } = createSlice({
name: 'test',
reducers: {
increment: (state) => state + 1,
multiply: (state, action) => state * action.payload,
},
extraReducers: (builder) => {
builder.addCase(
addMore,
(state, action) => state + action.payload.amount,
)
},
initialState: 0,
})
it('should call extra reducers when their actions are dispatched', () => {
const result = reducer(10, addMore({ amount: 5 }))
expect(result).toBe(15)
})
describe('builder callback for extraReducers', () => {
const increment = createAction<number, 'increment'>('increment')
test('can be used with actionCreators', () => {
const slice = createSlice({
name: 'counter',
initialState: 0,
reducers: {},
extraReducers: (builder) =>
builder.addCase(
increment,
(state, action) => state + action.payload,
),
})
expect(slice.reducer(0, increment(5))).toBe(5)
})
test('can be used with string action types', () => {
const slice = createSlice({
name: 'counter',
initialState: 0,
reducers: {},
extraReducers: (builder) =>
builder.addCase(
'increment',
(state, action: { type: 'increment'; payload: number }) =>
state + action.payload,
),
})
expect(slice.reducer(0, increment(5))).toBe(5)
})
test('prevents the same action type from being specified twice', () => {
expect(() => {
const slice = createSlice({
name: 'counter',
initialState: 0,
reducers: {},
extraReducers: (builder) =>
builder
.addCase('increment', (state) => state + 1)
.addCase('increment', (state) => state + 1),
})
slice.reducer(undefined, { type: 'unrelated' })
}).toThrowErrorMatchingInlineSnapshot(
`[Error: \`builder.addCase\` cannot be called with two reducers for the same action type 'increment']`,
)
})
test('can be used with addAsyncThunk and async thunks', () => {
const asyncThunk = createAsyncThunk('test', (n: number) => n)
const slice = createSlice({
name: 'counter',
initialState: {
loading: false,
errored: false,
value: 0,
},
reducers: {},
extraReducers: (builder) =>
builder.addAsyncThunk(asyncThunk, {
pending(state) {
state.loading = true
},
fulfilled(state, action) {
state.value = action.payload
},
rejected(state) {
state.errored = true
},
settled(state) {
state.loading = false
},
}),
})
expect(
slice.reducer(undefined, asyncThunk.pending('requestId', 5)),
).toEqual({
loading: true,
errored: false,
value: 0,
})
expect(
slice.reducer(undefined, asyncThunk.fulfilled(5, 'requestId', 5)),
).toEqual({
loading: false,
errored: false,
value: 5,
})
expect(
slice.reducer(
undefined,
asyncThunk.rejected(new Error(), 'requestId', 5),
),
).toEqual({
loading: false,
errored: true,
value: 0,
})
})
test('can be used with addMatcher and type guard functions', () => {
const slice = createSlice({
name: 'counter',
initialState: 0,
reducers: {},
extraReducers: (builder) =>
builder.addMatcher(
increment.match,
(state, action: { type: 'increment'; payload: number }) =>
state + action.payload,
),
})
expect(slice.reducer(0, increment(5))).toBe(5)
})
test('can be used with addDefaultCase', () => {
const slice = createSlice({
name: 'counter',
initialState: 0,
reducers: {},
extraReducers: (builder) =>
builder.addDefaultCase(
(state, action) =>
state + (action as PayloadAction<number>).payload,
),
})
expect(slice.reducer(0, increment(5))).toBe(5)
})
// for further tests, see the test of createReducer that goes way more into depth on this
})
})
describe('behavior with enhanced case reducers', () => {
it('should pass all arguments to the prepare function', () => {
const prepare = vi.fn((payload, somethingElse) => ({ payload }))
const testSlice = createSlice({
name: 'test',
initialState: 0,
reducers: {
testReducer: {
reducer: (s) => s,
prepare,
},
},
})
expect(testSlice.actions.testReducer('a', 1)).toEqual({
type: 'test/testReducer',
payload: 'a',
})
expect(prepare).toHaveBeenCalledWith('a', 1)
})
it('should call the reducer function', () => {
const reducer = vi.fn(() => 5)
const testSlice = createSlice({
name: 'test',
initialState: 0,
reducers: {
testReducer: {
reducer,
prepare: (payload: any) => ({ payload }),
},
},
})
testSlice.reducer(0, testSlice.actions.testReducer('testPayload'))
expect(reducer).toHaveBeenCalledWith(
0,
expect.objectContaining({ payload: 'testPayload' }),
)
})
})
describe('circularity', () => {
test('extraReducers can reference each other circularly', () => {
const first = createSlice({
name: 'first',
initialState: 'firstInitial',
reducers: {
something() {
return 'firstSomething'
},
},
extraReducers(builder) {
// eslint-disable-next-line @typescript-eslint/no-use-before-define
builder.addCase(second.actions.other, () => {
return 'firstOther'
})
},
})
const second = createSlice({
name: 'second',
initialState: 'secondInitial',
reducers: {
other() {
return 'secondOther'
},
},
extraReducers(builder) {
builder.addCase(first.actions.something, () => {
return 'secondSomething'
})
},
})
expect(first.reducer(undefined, { type: 'unrelated' })).toBe(
'firstInitial',
)
expect(first.reducer(undefined, first.actions.something())).toBe(
'firstSomething',
)
expect(first.reducer(undefined, second.actions.other())).toBe(
'firstOther',
)
expect(second.reducer(undefined, { type: 'unrelated' })).toBe(
'secondInitial',
)
expect(second.reducer(undefined, first.actions.something())).toBe(
'secondSomething',
)
expect(second.reducer(undefined, second.actions.other())).toBe(
'secondOther',
)
})
})
describe('Deprecation warnings', () => {
beforeEach(() => {
vi.resetModules()
})
afterEach(() => {
vi.unstubAllEnvs()
})
// NOTE: This needs to be in front of the later `createReducer` call to check the one-time warning
it('Throws an error if the legacy object notation is used', async () => {
const { createSlice } = await import('../createSlice')
let dummySlice = (createSlice as CreateSlice)({
name: 'dummy',
initialState: [],
reducers: {},
extraReducers: {
// @ts-ignore
a: () => [],
},
})
let reducer: any
// Have to trigger the lazy creation
const wrapper = () => {
reducer = dummySlice.reducer
reducer(undefined, { type: 'dummy' })
}
expect(wrapper).toThrowError(
/The object notation for `createSlice.extraReducers` has been removed/,
)
dummySlice = (createSlice as CreateSlice)({
name: 'dummy',
initialState: [],
reducers: {},
extraReducers: {
// @ts-ignore
a: () => [],
},
})
expect(wrapper).toThrowError(
/The object notation for `createSlice.extraReducers` has been removed/,
)
})
// TODO Determine final production behavior here
it.todo('Crashes in production', () => {
vi.stubEnv('NODE_ENV', 'production')
const { createSlice } = require('../createSlice')
const dummySlice = (createSlice as CreateSlice)({
name: 'dummy',
initialState: [],
reducers: {},
// @ts-ignore
extraReducers: {},
})
const wrapper = () => {
const { reducer } = dummySlice
reducer(undefined, { type: 'dummy' })
}
expect(wrapper).toThrowError(
/The object notation for `createSlice.extraReducers` has been removed/,
)
vi.unstubAllEnvs()
})
})
describe('slice selectors', () => {
const slice = createSlice({
name: 'counter',
initialState: 42,
reducers: {},
selectors: {
selectSlice: (state) => state,
selectMultiple: Object.assign(
(state: number, multiplier: number) => state * multiplier,
{ test: 0 },
),
},
})
it('expects reducer under slice.reducerPath if no selectState callback passed', () => {
const testState = {
[slice.reducerPath]: slice.getInitialState(),
}
const { selectSlice, selectMultiple } = slice.selectors
expect(selectSlice(testState)).toBe(slice.getInitialState())
expect(selectMultiple(testState, 2)).toBe(slice.getInitialState() * 2)
})
it('allows passing a selector for a custom location', () => {
const customState = {
number: slice.getInitialState(),
}
const { selectSlice, selectMultiple } = slice.getSelectors(
(state: typeof customState) => state.number,
)
expect(selectSlice(customState)).toBe(slice.getInitialState())
expect(selectMultiple(customState, 2)).toBe(slice.getInitialState() * 2)
})
it('allows accessing properties on the selector', () => {
expect(slice.selectors.selectMultiple.unwrapped.test).toBe(0)
})
it('has selectSlice attached to slice, which can go without this', () => {
const slice = createSlice({
name: 'counter',
initialState: 42,
reducers: {},
})
const { selectSlice } = slice
expect(() => selectSlice({ counter: 42 })).not.toThrow()
expect(selectSlice({ counter: 42 })).toBe(42)
})
})
describe('slice injections', () => {
it('uses injectInto to inject slice into combined reducer', () => {
const slice = createSlice({
name: 'counter',
initialState: 42,
reducers: {
increment: (state) => ++state,
},
selectors: {
selectMultiple: (state, multiplier: number) => state * multiplier,
},
})
const { increment } = slice.actions
const combinedReducer = combineSlices({
static: slice.reducer,
}).withLazyLoadedSlices<WithSlice<typeof slice>>()
const uninjectedState = combinedReducer(undefined, increment())
expect(uninjectedState.counter).toBe(undefined)
const injectedSlice = slice.injectInto(combinedReducer)
// selector returns initial state if undefined in real state
expect(injectedSlice.selectSlice(uninjectedState)).toBe(
slice.getInitialState(),
)
expect(injectedSlice.selectors.selectMultiple({}, 1)).toBe(
slice.getInitialState(),
)
expect(injectedSlice.getSelectors().selectMultiple(undefined, 1)).toBe(
slice.getInitialState(),
)
const injectedState = combinedReducer(undefined, increment())
expect(injectedSlice.selectSlice(injectedState)).toBe(
slice.getInitialState() + 1,
)
expect(injectedSlice.selectors.selectMultiple(injectedState, 1)).toBe(
slice.getInitialState() + 1,
)
})
it('allows providing a custom name to inject under', () => {
const slice = createSlice({
name: 'counter',
reducerPath: 'injected',
initialState: 42,
reducers: {
increment: (state) => ++state,
},
selectors: {
selectMultiple: (state, multiplier: number) => state * multiplier,
},
})
const { increment } = slice.actions
const combinedReducer = combineSlices({
static: slice.reducer,
}).withLazyLoadedSlices<WithSlice<typeof slice> & { injected2: number }>()
const uninjectedState = combinedReducer(undefined, increment())
expect(uninjectedState.injected).toBe(undefined)
const injected = slice.injectInto(combinedReducer)
const injectedState = combinedReducer(undefined, increment())
expect(injected.selectSlice(injectedState)).toBe(
slice.getInitialState() + 1,
)
expect(injected.selectors.selectMultiple(injectedState, 2)).toBe(
(slice.getInitialState() + 1) * 2,
)
const injected2 = slice.injectInto(combinedReducer, {
reducerPath: 'injected2',
})
const injected2State = combinedReducer(undefined, increment())
expect(injected2.selectSlice(injected2State)).toBe(
slice.getInitialState() + 1,
)
expect(injected2.selectors.selectMultiple(injected2State, 2)).toBe(
(slice.getInitialState() + 1) * 2,
)
})
it('avoids incorrectly caching selectors', () => {
const slice = createSlice({
name: 'counter',
reducerPath: 'injected',
initialState: 42,
reducers: {
increment: (state) => ++state,
},
selectors: {
selectMultiple: (state, multiplier: number) => state * multiplier,
},
})
expect(slice.getSelectors()).toBe(slice.getSelectors())
const combinedReducer = combineSlices({
static: slice.reducer,
}).withLazyLoadedSlices<WithSlice<typeof slice>>()
const injected = slice.injectInto(combinedReducer)
expect(injected.getSelectors()).not.toBe(slice.getSelectors())
expect(injected.getSelectors().selectMultiple(undefined, 1)).toBe(42)
expect(() =>
// @ts-expect-error
slice.getSelectors().selectMultiple(undefined, 1),
).toThrowErrorMatchingInlineSnapshot(
`[Error: selectState returned undefined for an uninjected slice reducer]`,
)
const injected2 = slice.injectInto(combinedReducer, {
reducerPath: 'other',
})
// can use same cache for localised selectors
expect(injected.getSelectors()).toBe(injected2.getSelectors())
// these should be different
expect(injected.selectors).not.toBe(injected2.selectors)
})
it('caches initial states for selectors', () => {
const slice = createSlice({
name: 'counter',
initialState: () => ({ value: 0 }),
reducers: {},
selectors: {
selectObj: (state) => state,
},
})
// not cached
expect(slice.getInitialState()).not.toBe(slice.getInitialState())
expect(slice.reducer(undefined, { type: 'dummy' })).not.toBe(
slice.reducer(undefined, { type: 'dummy' }),
)
const combinedReducer = combineSlices({
static: slice.reducer,
}).withLazyLoadedSlices<WithSlice<typeof slice>>()
const injected = slice.injectInto(combinedReducer)
// still not cached
expect(injected.getInitialState()).not.toBe(injected.getInitialState())
expect(injected.reducer(undefined, { type: 'dummy' })).not.toBe(
injected.reducer(undefined, { type: 'dummy' }),
)
// cached
expect(injected.selectSlice({})).toBe(injected.selectSlice({}))
expect(injected.selectors.selectObj({})).toBe(
injected.selectors.selectObj({}),
)
})
})
describe('reducers definition with asyncThunks', () => {
it('is disabled by default', () => {
expect(() =>
createSlice({
name: 'test',
initialState: [] as any[],
reducers: (create) => ({ thunk: create.asyncThunk(() => {}) }),
}),
).toThrowErrorMatchingInlineSnapshot(
`[Error: Cannot use \`create.asyncThunk\` in the built-in \`createSlice\`. Use \`buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })\` to create a customised version of \`createSlice\`.]`,
)
})
const createAppSlice = buildCreateSlice({
creators: { asyncThunk: asyncThunkCreator },
})
function pending(state: any[], action: any) {
state.push(['pendingReducer', action])
}
function fulfilled(state: any[], action: any) {
state.push(['fulfilledReducer', action])
}
function rejected(state: any[], action: any) {
state.push(['rejectedReducer', action])
}
function settled(state: any[], action: any) {
state.push(['settledReducer', action])
}
test('successful thunk', async () => {
const slice = createAppSlice({
name: 'test',
initialState: [] as any[],
reducers: (create) => ({
thunkReducers: create.asyncThunk(
function payloadCreator(arg: string, api) {
return Promise.resolve('resolved payload')
},
{ pending, fulfilled, rejected, settled },
),
}),
})
const store = configureStore({
reducer: slice.reducer,
})
await store.dispatch(slice.actions.thunkReducers('test'))
expect(store.getState()).toMatchObject([
[
'pendingReducer',
{
type: 'test/thunkReducers/pending',
payload: undefined,
},
],
[
'fulfilledReducer',
{
type: 'test/thunkReducers/fulfilled',
payload: 'resolved payload',
},
],
[
'settledReducer',
{
type: 'test/thunkReducers/fulfilled',
payload: 'resolved payload',
},
],
])
})
test('rejected thunk', async () => {
const slice = createAppSlice({
name: 'test',
initialState: [] as any[],
reducers: (create) => ({
thunkReducers: create.asyncThunk(
// payloadCreator isn't allowed to return never
function payloadCreator(arg: string, api): any {
throw new Error('')
},
{ pending, fulfilled, rejected, settled },
),
}),
})
const store = configureStore({
reducer: slice.reducer,
})
await store.dispatch(slice.actions.thunkReducers('test'))
expect(store.getState()).toMatchObject([
[
'pendingReducer',
{
type: 'test/thunkReducers/pending',
payload: undefined,
},
],
[
'rejectedReducer',
{
type: 'test/thunkReducers/rejected',
payload: undefined,
},
],
[
'settledReducer',
{
type: 'test/thunkReducers/rejected',
payload: undefined,
},
],
])
})
test('with options', async () => {
const slice = createAppSlice({
name: 'test',
initialState: [] as any[],
reducers: (create) => ({
thunkReducers: create.asyncThunk(
function payloadCreator(arg: string, api) {
return 'should not call this'
},
{
options: {
condition() {
return false
},
dispatchConditionRejection: true,
},
pending,
fulfilled,
rejected,
settled,
},
),
}),
})
const store = configureStore({
reducer: slice.reducer,
})
await store.dispatch(slice.actions.thunkReducers('test'))
expect(store.getState()).toMatchObject([
[
'rejectedReducer',
{
type: 'test/thunkReducers/rejected',
payload: undefined,
meta: { condition: true },
},
],
[
'settledReducer',
{
type: 'test/thunkReducers/rejected',
payload: undefined,
meta: { condition: true },
},
],
])
})
test('has caseReducers for the asyncThunk', async () => {
const slice = createAppSlice({
name: 'test',
initialState: [],
reducers: (create) => ({
thunkReducers: create.asyncThunk(
function payloadCreator(arg, api) {
return Promise.resolve('resolved payload')
},
{ pending, fulfilled, settled },
),
}),
})
expect(slice.caseReducers.thunkReducers.pending).toBe(pending)
expect(slice.caseReducers.thunkReducers.fulfilled).toBe(fulfilled)
expect(slice.caseReducers.thunkReducers.settled).toBe(settled)
// even though it is not defined above, this should at least be a no-op function to match the TypeScript typings
// and should be callable as a reducer even if it does nothing
expect(() =>
slice.caseReducers.thunkReducers.rejected(
[],
slice.actions.thunkReducers.rejected(
new Error('test'),
'fakeRequestId',
),
),
).not.toThrow()
})
test('can define reducer with prepare statement using create.preparedReducer', async () => {
const slice = createSlice({
name: 'test',
initialState: [] as any[],
reducers: (create) => ({
prepared: create.preparedReducer(
(p: string, m: number, e: { message: string }) => ({
payload: p,
meta: m,
error: e,
}),
(state, action) => {
state.push(action)
},
),
}),
})
expect(
slice.reducer(
[],
slice.actions.prepared('test', 1, { message: 'err' }),
),
).toMatchInlineSnapshot(`
[
{
"error": {
"message": "err",
},
"meta": 1,
"payload": "test",
"type": "test/prepared",
},
]
`)
})
test('throws an error when invoked with a normal `prepare` object that has not gone through a `create.preparedReducer` call', async () => {
expect(() =>
createSlice({
name: 'test',
initialState: [] as any[],
reducers: (create) => ({
prepared: {
prepare: (p: string, m: number, e: { message: string }) => ({
payload: p,
meta: m,
error: e,
}),
reducer: (state, action) => {
state.push(action)
},
},
}),
}),
).toThrowErrorMatchingInlineSnapshot(
`[Error: Please use the \`create.preparedReducer\` notation for prepared action creators with the \`create\` notation.]`,
)
})
})
})
@@ -0,0 +1 @@
{"name":"mdast-util-gfm-strikethrough","version":"2.0.0","requiresBuild":false,"files":{"license":{"checkedAt":1794532115886,"integrity":"sha512-fzvkEDDVqhfCJpKNt4nSfCdql95dXnYBu6QTwaEDV5dX/EtSGYys2u3y/9LaRjp4jUgB4qbz5csHGjJjcZAb2Q==","mode":420,"size":1099},"index.js":{"checkedAt":1794532115886,"integrity":"sha512-D8ah18aignGotmfTcRBC0XRSi4OBcN/lO9cbfKw4UuAnyB1M0x9kRZkCMgiNAzys2UlGlfIDg6uDNbxqmOmmgA==","mode":420,"size":132},"lib/index.js":{"checkedAt":1794532115886,"integrity":"sha512-PCrfJydtKy0Mr6jy65U82aHxUWQGhht0oJSrneMyTWLg1fxpJMxgL8hyAxCQPd8f1Vp7oSdnNJvJLlzJHHKaPg==","mode":420,"size":2661},"package.json":{"checkedAt":1794532115887,"integrity":"sha512-gzDFY51e+x/PgvaJQu47tJe5B2f0pRF18TTKPS5yWMuBjHBADRReURGsuGvL4ENS8xHlY+sY7xyMvaaHiF4jSg==","mode":420,"size":2516},"readme.md":{"checkedAt":1794532115887,"integrity":"sha512-7d09LP8HtdHZC3RB1WZx5OIw2WQvF9VyQ4TdlaB7TlaVoNGjUdiVsDqua1pEgf9MRTzpV0PsR29J8tU5Z8TbaQ==","mode":420,"size":9962},"index.d.ts":{"checkedAt":1794532115887,"integrity":"sha512-q5D8b35Ilf1KZ7A8MjZ3ahvYZb/XAhzGalZ8teEz6Brf+Ys3YVHnc8MpKGzYoThoDFk67YKmK0onNSoYecMfGg==","mode":420,"size":388},"lib/index.d.ts":{"checkedAt":1794532115887,"integrity":"sha512-skd957jWO85DuCu3AeKHz0XSSTN37TNhpFbtDFUwjAgjc/0WvFtdmkHP5LQrblUXAjVbh8VRJ+eBQ9w8TK0uPA==","mode":420,"size":1070}}}
@@ -0,0 +1,7 @@
import * as react_jsx_runtime from 'react/jsx-runtime';
import { IconSvgProps } from './types.mjs';
import 'react';
declare const InvalidCardIcon: (props: IconSvgProps) => react_jsx_runtime.JSX.Element;
export { InvalidCardIcon };
@@ -0,0 +1 @@
{"name":"lodash-es","version":"4.17.21","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532111745,"integrity":"sha512-OVKmi0ACReW0qn9lB3gIkwOokjOEH4DTURXOynLKs5Wpgl6nWq/flVnw+Ax/jxxqj+40sAcUtOIZHvz5E4Y0NQ==","mode":420,"size":1952},"_addMapEntry.js":{"checkedAt":1794532111745,"integrity":"sha512-Lf9kFKthHdvEW7V8IgmCnMlDYJO6EkMuvIFIuc+NVJXOzQ4yiJgPksEUDdmlziDh6nqJNhl9485+UcD9RDXbEQ==","mode":420,"size":363},"_addSetEntry.js":{"checkedAt":1794532111745,"integrity":"sha512-TysltvrMMaUVyQ6ufcGZ3M74ztkNEj4wkyUFemZ9PCLOq/ZQUDdG0T59w1w0Lenam56iObvp9mlX69n75cO2iA==","mode":420,"size":328},"_apply.js":{"checkedAt":1794532111746,"integrity":"sha512-QcJiZ0ehMUO5W5HK46PSHfd7oeqFreGGEEKf66JBdntD9IgnGDjNxIOmYHUwFXuKRebgJ5WlUBRjN2hO9255tQ==","mode":420,"size":712},"_arrayAggregator.js":{"checkedAt":1794532111746,"integrity":"sha512-aE8Zuzmv2yP/Ozv6gVoA/Wk+q1MRWbSypsJegkuNj28IYlxLedu3B7uQfXDMsf+vgHQyXCkRKkim3nML0hzbcQ==","mode":420,"size":682},"_arrayEach.js":{"checkedAt":1794532111746,"integrity":"sha512-VM/KyR/Imbgc0ymp2+6Wl3obt408LA4pSmtxEHlaVLjEDxoQNBQ884fB7o0iFSaCOF5Y/ZDOgo8QZZN7wVP4AA==","mode":420,"size":535},"_arrayEachRight.js":{"checkedAt":1794532111746,"integrity":"sha512-dCrZh2fJ/f6BUfYmnuh8mAZ/AOtlVdlJzYPLclaKZFYWwELKMeg8L7rm0EwRacJ6Qwy+eSyqd3Bxrr3a2TJ++Q==","mode":420,"size":526},"_arrayEvery.js":{"checkedAt":1794532111746,"integrity":"sha512-ImnRuZ1381scTPg3KgxcHt/dIZqOiGYUdYwziuV7Cz/PBnyEYzCubujy1qIQ2TBWtaxHzqMtUZml+6mDaunENw==","mode":420,"size":595},"_arrayFilter.js":{"checkedAt":1794532111746,"integrity":"sha512-VngVnHpAMvuZF4A7klOGZcN5QXXW5PvONdhZYM1+kOt01MgRLe84iM3DLJLmWz7sOiSADPfibGpoCx7GNt1cgw==","mode":420,"size":630},"_arrayIncludes.js":{"checkedAt":1794532111747,"integrity":"sha512-0Ccd4pU6BASezuNOiTtxe6USCbjsSbhELlFSiR9HQtPdtVOa2DCszxVPnbjTvf+E985rhIpliNm/ZM3ozvD5NQ==","mode":420,"size":524},"_arrayIncludesWith.js":{"checkedAt":1794532111747,"integrity":"sha512-KvCCsF05nbiYVIZ1BBR6RgVy2qCKTcHTgGPXHnXW/mpCXWUUgU2Nbg9w8VKEVk6QcFlaTUWYg2/HN2S0344K/g==","mode":420,"size":613},"_arrayLikeKeys.js":{"checkedAt":1794532111747,"integrity":"sha512-Tfo2nHZLSaP0gl6lXAyfjcn1ppbFXGbFfTaBk5AC+bHVcedE+I8gqehw7jYycCr2RZo+0D0zckTwF1ZLZQkzhg==","mode":420,"size":1776},"_arrayMap.js":{"checkedAt":1794532111747,"integrity":"sha512-xitfsW7zq3qNDd/19z0+Vix8cbsdEJDTj5CVzjYCCfFvDnyv1QYEUdQACWEn8IP/7svJKg+lvCXrJuy+BuAd0g==","mode":420,"size":554},"_arrayPush.js":{"checkedAt":1794532111747,"integrity":"sha512-fO9qbRNUiaW8nFc1RpiFIs7L2sJpAl1XV0Acp3NV8O8hssgNEYVGX5dn2CZYVRZXotnhGyWhgBizwhk5+synEw==","mode":420,"size":435},"_arrayReduce.js":{"checkedAt":1794532111747,"integrity":"sha512-2Stz23PdMY7KkZ6sRTAxQSi+/avRUAb49t0cNsPFr5KR410om+f0Dcba7fB5/qOlXVOCbCgqedZPhMGst6vZYg==","mode":420,"size":785},"_arrayReduceRight.js":{"checkedAt":1794532111748,"integrity":"sha512-2H9aLExP/i0mj4UnkBIt9xqjS2LXTAmGy3ZzysxXbEd9H1po6nRbd8hWuNLeBPM0BE9H9kFaHt0Ji/7J9TKc0Q==","mode":420,"size":775},"_arraySample.js":{"checkedAt":1794532111748,"integrity":"sha512-rHxkp3eonNB6ILAFxbrsii7bqC1rO1/h3dCtthF51Mbj3eBgHILWdj0SFvvwU8JaWIhY52NmpXWZnzjAMKlcAw==","mode":420,"size":361},"_arraySampleSize.js":{"checkedAt":1794532111748,"integrity":"sha512-f+pYKLrVSteqCpGk3O1Vr6RBi0yNbHulSk9QICpg95FSCI43WtJDMXFPXgvasRtqHZz0cIPifcX8d3bzZF58Xw==","mode":420,"size":498},"_arrayShuffle.js":{"checkedAt":1794532111748,"integrity":"sha512-jJVTn94C5OyGLPXpNGypOlkn9YgQ+CNgeb7HSI6YEoBydSsIgNdFyNSImwizDQ9VQzgDocetOJOW0m3lTbXoYQ==","mode":420,"size":363},"_arraySome.js":{"checkedAt":1794532111748,"integrity":"sha512-Q7q8J+bgBJWgTt1g36zF1V1tiNcYKeBysDAfQDzfHh4Uf2+5IoQ8t7nH2xgOEXM2P9pLUX6DrxuRPm6rN/4OqA==","mode":420,"size":592},"_asciiSize.js":{"checkedAt":1794532111748,"integrity":"sha512-d0iYJThzOwbuomuDjW/r0IPcqIiALgX3v4m3R8bRnGTCblqzN1+8q85mcI5+73mb2sYENcaP4Jo8dGNDWotGyA==","mode":420,"size":269},"_asciiToArray.js":{"checkedAt":1794532111749,"integrity":"sha512-nq99DlgEZMaNxeV83CDlsARQouPXMWNPQooJh60mtOT3x8jxxoZKXEgtGBxZyia9AHxQjwgmhZslDMJdPBrONA==","mode":420,"size":255},"_asciiWords.js":{"checkedAt":1794532111749,"integrity":"sha512-QHJynZZQ44OhS0NbHyjzS35EDiew3VDunmFyldopKd73b0FRV4m8apHCwAKaA+1EtiukEuDkPRIPa/1Xb6L26A==","mode":420,"size":402},"_assignMergeValue.js":{"checkedAt":1794532111749,"integrity":"sha512-c7wotrzBMOdvAUACWMf4H6OY54UYStVLslmGdct3t9x+1UIPRNKvSqkNMBT0bAvY7vwvHaMDY+uyklFZ/d8OtA==","mode":420,"size":580},"_assignValue.js":{"checkedAt":1794532111749,"integrity":"sha512-tQHjP/0ow32+MG/aj+z4a1Uor+2QveQQCCpfMLsxNnYm0GAHTEMirQ6OfzIIhGmnB4+3azUi49ANzhxTRFBJKA==","mode":420,"size":897},"_assocIndexOf.js":{"checkedAt":1794532111749,"integrity":"sha512-IIcPjcgEzns3gbg9y8N3FUaG7vuqfP3dzzsmkeBaDIAfgpsOfkDVe62bjylo7VKOrK68lgrvV/e/7wufKm3TYg==","mode":420,"size":485},"_baseAggregator.js":{"checkedAt":1794532111749,"integrity":"sha512-WWahzzVu7iSgwICIQTiNfwWC4LkqrDySwGQmgc3Tq6cs6zCrItZs+P0qrNbdyBpjj7GdO5UvD6dIV3RK5maHSw==","mode":420,"size":744},"_baseAssign.js":{"checkedAt":1794532111750,"integrity":"sha512-xHg4k4Cx4u4+UNk5/kfIrAGqQ7aEl88PYrOMWLAMUlUnshLine truncated
@@ -0,0 +1,12 @@
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE:
// npx nx generate-lib repo
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2022_intl = void 0;
const base_config_1 = require("./base-config");
exports.es2022_intl = {
libs: [],
variables: [['Intl', base_config_1.TYPE_VALUE]],
};
@@ -0,0 +1,2 @@
import type { TSESTree } from '@typescript-eslint/types';
export declare const getKeys: (node: TSESTree.Node) => readonly string[];
@@ -0,0 +1,30 @@
/**
* @fileoverview Common utils for AST.
*
* This file contains only shared items for core and rules.
* If you make a utility for rules, please see `../rules/utils/ast-utils.js`.
*
* @author Toru Nagashima <https://github.com/mysticatea>
*/
"use strict";
const breakableTypePattern =
/^(?:(?:Do)?While|For(?:In|Of)?|Switch)Statement$/u;
const lineBreakPattern = /\r\n|[\r\n\u2028\u2029]/u;
const shebangPattern = /^#!([^\r\n]+)/u;
/**
* Creates a version of the `lineBreakPattern` regex with the global flag.
* Global regexes are mutable, so this needs to be a function instead of a constant.
* @returns {RegExp} A global regular expression that matches line terminators
*/
function createGlobalLinebreakMatcher() {
return new RegExp(lineBreakPattern.source, "gu");
}
module.exports = {
breakableTypePattern,
lineBreakPattern,
createGlobalLinebreakMatcher,
shebangPattern,
};
@@ -0,0 +1 @@
{"version":3,"file":"cloneDynamicValueBinding.spec.d.ts","sourceRoot":"","sources":["../../../../src/binding/calculations/cloneDynamicValueBinding.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,68 @@
/**
* @fileoverview Disallow the use of process.env()
* @author Vignesh Anand
* @deprecated in ESLint v7.0.0
*/
"use strict";
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Node.js rules were moved out of ESLint core.",
url: "https://eslint.org/docs/latest/use/migrating-to-7.0.0#deprecate-node-rules",
deprecatedSince: "7.0.0",
availableUntil: "11.0.0",
replacedBy: [
{
message:
"eslint-plugin-n now maintains deprecated Node.js-related rules.",
plugin: {
name: "eslint-plugin-n",
url: "https://github.com/eslint-community/eslint-plugin-n",
},
rule: {
name: "no-process-env",
url: "https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/no-process-env.md",
},
},
],
},
type: "suggestion",
docs: {
description: "Disallow the use of `process.env`",
recommended: false,
url: "https://eslint.org/docs/latest/rules/no-process-env",
},
schema: [],
messages: {
unexpectedProcessEnv: "Unexpected use of process.env.",
},
},
create(context) {
return {
MemberExpression(node) {
const objectName = node.object.name,
propertyName = node.property.name;
if (
objectName === "process" &&
!node.computed &&
propertyName &&
propertyName === "env"
) {
context.report({ node, messageId: "unexpectedProcessEnv" });
}
},
};
},
};
@@ -0,0 +1,6 @@
function _inherits_loose(subClass, superClass) {
subClass.prototype = Object.create(superClass.prototype);
subClass.prototype.constructor = subClass;
subClass.__proto__ = superClass;
}
export { _inherits_loose as _ };
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more