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

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

No files matched your search

@@ -0,0 +1 @@
module.exports={C:{"52":0.07484,"56":0.01604,"78":0.00535,"88":0.00535,"113":0.00535,"115":0.4651,"117":0.00535,"118":0.02673,"125":0.00535,"127":0.06415,"128":0.05346,"129":0.00535,"131":0.00535,"132":0.01069,"133":0.01069,"134":0.00535,"135":0.00535,"136":0.02138,"137":0.02138,"138":0.01604,"139":0.01604,"140":0.11227,"141":0.02673,"142":0.10157,"143":2.44847,"144":2.56073,"145":0.00535,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 53 54 55 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 79 80 81 82 83 84 85 86 87 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 114 116 119 120 121 122 123 124 126 130 146 147 3.5 3.6"},D:{"39":0.01604,"40":0.01604,"41":0.01604,"42":0.01604,"43":0.01604,"44":0.01604,"45":0.01604,"46":0.01604,"47":0.01604,"48":0.01604,"49":0.02138,"50":0.01604,"51":0.01604,"52":0.01604,"53":0.01604,"54":0.01604,"55":0.01604,"56":0.01604,"57":0.01069,"58":0.01604,"59":0.01069,"60":0.01604,"78":0.09088,"79":0.04277,"80":0.00535,"84":0.00535,"87":0.02138,"91":0.00535,"97":0.00535,"98":0.00535,"99":0.00535,"100":0.00535,"102":0.01069,"103":0.03208,"104":0.02138,"105":0.00535,"108":0.01069,"109":0.74844,"111":0.00535,"112":0.29403,"114":0.03208,"115":0.03208,"116":0.03208,"117":0.00535,"118":0.00535,"119":0.01604,"120":0.03208,"121":0.01069,"122":0.05881,"123":0.02138,"124":0.02138,"125":2.64092,"126":0.03208,"127":0.02138,"128":0.04277,"129":0.01069,"130":0.02138,"131":0.10692,"132":0.03208,"133":0.03742,"134":0.03742,"135":0.05881,"136":0.05346,"137":0.10692,"138":0.27265,"139":0.94624,"140":7.38283,"141":16.02731,"142":0.17107,"143":0.00535,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 81 83 85 86 88 89 90 92 93 94 95 96 101 106 107 110 113 144 145"},F:{"46":0.00535,"84":0.00535,"85":0.02138,"90":0.00535,"91":0.02138,"92":0.04811,"95":0.08554,"105":0.00535,"114":0.00535,"117":0.00535,"119":0.00535,"120":0.24057,"121":0.17642,"122":2.20255,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 86 87 88 89 93 94 96 97 98 99 100 101 102 103 104 106 107 108 109 110 111 112 113 115 116 118 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"92":0.00535,"107":0.00535,"108":0.01069,"109":0.05346,"114":0.00535,"120":0.00535,"122":0.00535,"128":0.00535,"129":0.00535,"131":0.02673,"132":0.00535,"133":0.00535,"134":0.03742,"135":0.01069,"136":0.04277,"137":0.01069,"138":0.14969,"139":0.04277,"140":1.28304,"141":5.75764,"142":0.01604,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 110 111 112 113 115 116 117 118 119 121 123 124 125 126 127 130"},E:{"8":0.00535,"14":0.00535,_:"0 4 5 6 7 9 10 11 12 13 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 15.1 15.2-15.3 15.4 16.0 16.4 26.2","13.1":0.00535,"14.1":0.01069,"15.5":0.02138,"15.6":0.07484,"16.1":0.01069,"16.2":0.00535,"16.3":0.01069,"16.5":0.01069,"16.6":0.09088,"17.0":0.01069,"17.1":0.05881,"17.2":0.01604,"17.3":0.01604,"17.4":0.02138,"17.5":0.04277,"17.6":0.10157,"18.0":0.01069,"18.1":0.02138,"18.2":0.01604,"18.3":0.04277,"18.4":0.04277,"18.5-18.6":0.13365,"26.0":0.50252,"26.1":0.01604},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00088,"5.0-5.1":0,"6.0-6.1":0.00352,"7.0-7.1":0.00264,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.00793,"10.0-10.2":0.00088,"10.3":0.01497,"11.0-11.2":0.22194,"11.3-11.4":0.00528,"12.0-12.1":0.00176,"12.2-12.5":0.04316,"13.0-13.1":0,"13.2":0.0044,"13.3":0.00176,"13.4-13.7":0.00705,"14.0-14.4":0.01497,"14.5-14.8":0.01585,"15.0-15.1":0.01497,"15.2-15.3":0.01145,"15.4":0.01321,"15.5":0.01497,"15.6-15.8":0.19552,"16.0":0.02642,"16.1":0.04932,"16.2":0.02554,"16.3":0.0458,"16.4":0.01145,"16.5":0.02026,"16.6-16.7":0.26158,"17.0":0.0185,"17.1":0.02818,"17.2":0.02026,"17.3":0.02994,"17.4":0.05284,"17.5":0.09071,"17.6-17.7":0.22899,"18.0":0.05196,"18.1":0.10745,"18.2":0.05813,"18.3":0.18671,"18.4":0.096,"18.5-18.6":4.89508,"26.0":0.60506,"26.1":0.02202},P:{"4":0.02083,"20":0.01041,"21":0.01041,"22":0.01041,"23":0.03124,"24":0.01041,"25":0.01041,"26":0.03124,"27":0.04165,"28":2.23879,"29":0.16661,_:"5.0-5.4 6.2-6.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0","7.2-7.4":0.01041},I:{"0":0.06973,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0.00001,"4.4":0,"4.4.3-4.4.4":0.00003},K:{"0":0.53067,_:"10 11 12 11.1 11.5 12.1"},A:{"11":0.02673,_:"6 7 8 9 10 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},R:{_:"0"},M:{"0":0.42826},Q:{"14.9":0.00466},O:{"0":0.13034},H:{"0":0},L:{"0":36.22239}};
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2019 Cristian Bote
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,27 @@
import memoizeCapped from './_memoizeCapped.js';
/** Used to match property names within property paths. */
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
/** Used to match backslashes in property paths. */
var reEscapeChar = /\\(\\)?/g;
/**
* Converts `string` to a property path array.
*
* @private
* @param {string} string The string to convert.
* @returns {Array} Returns the property path array.
*/
var stringToPath = memoizeCapped(function(string) {
var result = [];
if (string.charCodeAt(0) === 46 /* . */) {
result.push('');
}
string.replace(rePropName, function(match, number, quote, subString) {
result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
});
return result;
});
export default stringToPath;
@@ -0,0 +1,30 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
import {AriaLabelingProps, FocusableProps, LinkDOMProps, PressEvents, StyleProps} from '@react-types/shared';
import {ReactNode} from 'react';
export interface LinkProps extends PressEvents, FocusableProps {}
export interface AriaLinkProps extends LinkProps, LinkDOMProps, AriaLabelingProps { }
export interface SpectrumLinkProps extends AriaLinkProps, StyleProps {
/** The content to display in the link. */
children: ReactNode,
/**
* The [visual style](https://spectrum.adobe.com/page/link/#Options) of the link.
* @default 'primary'
*/
variant?: 'primary' | 'secondary' | 'overBackground',
/** Whether the link should be displayed with a quiet style. */
isQuiet?: boolean
}
@@ -0,0 +1 @@
{"version":3,"file":"Delta.js","sourceRoot":"","sources":["../src/Delta.ts"],"names":[],"mappings":";;;AAAA,kCAAkC;AAClC,8CAA+C;AAC/C,0CAA2C;AAC3C,iDAA0C;AAojBjB,uBApjBlB,sBAAY,CAojBkB;AAnjBrC,6BAAsB;AAmjBb,aAnjBF,YAAE,CAmjBE;AAljBX,6CAAsC;AAkjBzB,qBAljBN,oBAAU,CAkjBM;AAhjBvB,MAAM,cAAc,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,uCAAuC;AAQtF,MAAM,mBAAmB,GAAG,CAC1B,CAA8B,EAC9B,CAAe,EACa,EAAE;IAC9B,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI,EAAE;QACvC,MAAM,IAAI,KAAK,CAAC,mBAAmB,OAAO,CAAC,EAAE,CAAC,CAAC;KAChD;IACD,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI,EAAE;QACvC,MAAM,IAAI,KAAK,CAAC,mBAAmB,OAAO,CAAC,EAAE,CAAC,CAAC;KAChD;IACD,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACpC,IAAI,CAAC,SAAS,IAAI,SAAS,KAAK,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;QACjD,MAAM,IAAI,KAAK,CACb,4BAA4B,SAAS,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAChE,CAAC;KACH;IACD,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;AACjD,CAAC,CAAC;AAEF,MAAM,KAAK;IAuBT,YAAY,GAA0B;QACpC,wCAAwC;QACxC,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;YACtB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;SAChB;aAAM,IAAI,GAAG,IAAI,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;YAChD,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC;SACpB;aAAM;YACL,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;SACf;IACH,CAAC;IA1BD,MAAM,CAAC,aAAa,CAAI,SAAiB,EAAE,OAAwB;QACjE,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,OAAO,CAAC;IACrC,CAAC;IAED,MAAM,CAAC,eAAe,CAAC,SAAiB;QACtC,OAAO,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IAClC,CAAC;IAEO,MAAM,CAAC,UAAU,CAAC,SAAiB;QACzC,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QACzC,IAAI,CAAC,OAAO,EAAE;YACZ,MAAM,IAAI,KAAK,CAAC,+BAA+B,SAAS,GAAG,CAAC,CAAC;SAC9D;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;IAcD,MAAM,CACJ,GAAqC,EACrC,UAAgC;QAEhC,MAAM,KAAK,GAAO,EAAE,CAAC;QACrB,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;YAC/C,OAAO,IAAI,CAAC;SACb;QACD,KAAK,CAAC,MAAM,GAAG,GAAG,CAAC;QACnB,IACE,UAAU,IAAI,IAAI;YAClB,OAAO,UAAU,KAAK,QAAQ;YAC9B,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,GAAG,CAAC,EAClC;YACA,KAAK,CAAC,UAAU,GAAG,UAAU,CAAC;SAC/B;QACD,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC1B,CAAC;IAED,MAAM,CAAC,MAAc;QACnB,IAAI,MAAM,IAAI,CAAC,EAAE;YACf,OAAO,IAAI,CAAC;SACb;QACD,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACvC,CAAC;IAED,MAAM,CACJ,MAAwC,EACxC,UAAgC;QAEhC,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,IAAI,CAAC,EAAE;YAC7C,OAAO,IAAI,CAAC;SACb;QACD,MAAM,KAAK,GAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;QACrC,IACE,UAAU,IAAI,IAAI;YAClB,OAAO,UAAU,KAAK,QAAQ;YAC9B,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,GAAG,CAAC,EAClC;YACA,KAAK,CAAC,UAAU,GAAG,UAAU,CAAC;SAC/B;QACD,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC1B,CAAC;IAED,IAAI,CAAC,KAAS;QACZ,IAAI,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC;QAC5B,IAAI,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;QACjC,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;QACzB,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;YAC9B,IACE,OAAO,KAAK,CAAC,MAAM,KAAK,QAAQ;gBAChC,OAAO,MAAM,CAAC,MAAM,KAAK,QAAQ,EACjC;gBACA,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;gBAC/D,OAAO,IAAI,CAAC;aACb;YACD,oFAAoF;YACpF,gCAAgC;YAChC,IAAI,OAAO,MAAM,CAAC,MAAM,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,IAAI,IAAI,EAAE;gBAC7D,KAAK,IAAI,CAAC,CAAC;gBACX,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;gBAC7B,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;oBAC9B,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;oBACxB,OAAO,IAAI,CAAC;iBACb;aACF;YACD,IAAI,OAAO,CAAC,KAAK,CAAC,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC,EAAE;gBAChD,IACE,OAAO,KAAK,CAAC,MAAM,KAAK,QAAQ;oBAChC,OAAO,MAAM,CAAC,MAAM,KAAK,QAAQ,EACjC;oBACA,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;oBAC/D,IAAI,OAAO,KAAK,CAAC,UAAU,KAAK,QAAQ,EAAE;wBACxC,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC;qBACnD;oBACD,OAAO,IAAI,CAAC;iBACb;qBAAM,IACL,OAAO,KAAK,CAAC,MAAM,KAAK,QAAQ;oBAChC,OAAO,MAAM,CAAC,MAAM,KAAK,QAAQ,EACjC;oBACA,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;oBAC/D,IAAI,OAAO,KAAK,CAAC,UAAU,KAAK,QAAQ,EAAE;wBACxC,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC;qBACnD;oBACD,OAAO,IAAI,CAAC;iBACb;aACF;SACF;QACD,IAAI,KAAK,KAAK,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE;YAC7B,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SACtB;aAAM;YACL,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC;SAClC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI;QACF,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAC7C,IAAI,MAAM,IAAI,OAAO,MAAM,CAAC,MAAM,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE;YACrE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;SAChB;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,CAAC,SAA6C;QAClD,OAAO,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IACpC,CAAC;IAED,OAAO,CAAC,SAA0C;QAChD,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAC9B,CAAC;IAED,GAAG,CAAI,SAAuC;QAC5C,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IACjC,CAAC;IAED,SAAS,CAAC,SAA8B;QACtC,MAAM,MAAM,GAAS,EAAE,CAAC;QACxB,MAAM,MAAM,GAAS,EAAE,CAAC;QACxB,IAAI,CALine truncated
@@ -0,0 +1,19 @@
# @babel/helper-module-transforms
> Babel helper functions for implementing ES6 module transformations
See our website [@babel/helper-module-transforms](https://babeljs.io/docs/babel-helper-module-transforms) for more information.
## Install
Using npm:
```sh
npm install --save @babel/helper-module-transforms
```
or using yarn:
```sh
yarn add @babel/helper-module-transforms
```
@@ -0,0 +1,292 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = exports.SHOULD_STOP = exports.SHOULD_SKIP = exports.REMOVED = void 0;
var virtualTypes = require("./lib/virtual-types.js");
var _debug = require("debug");
var _index = require("../index.js");
var _index2 = require("../scope/index.js");
var _t = require("@babel/types");
var t = _t;
var cache = require("../cache.js");
var _generator = require("@babel/generator");
var NodePath_ancestry = require("./ancestry.js");
var NodePath_inference = require("./inference/index.js");
var NodePath_replacement = require("./replacement.js");
var NodePath_evaluation = require("./evaluation.js");
var NodePath_conversion = require("./conversion.js");
var NodePath_introspection = require("./introspection.js");
var _context = require("./context.js");
var NodePath_context = _context;
var NodePath_removal = require("./removal.js");
var NodePath_modification = require("./modification.js");
var NodePath_family = require("./family.js");
var NodePath_comments = require("./comments.js");
var NodePath_virtual_types_validator = require("./lib/virtual-types-validator.js");
const {
validate
} = _t;
const debug = _debug("babel");
const REMOVED = exports.REMOVED = 1 << 0;
const SHOULD_STOP = exports.SHOULD_STOP = 1 << 1;
const SHOULD_SKIP = exports.SHOULD_SKIP = 1 << 2;
const NodePath_Final = exports.default = class NodePath {
constructor(hub, parent) {
this.contexts = [];
this.state = null;
this._traverseFlags = 0;
this.skipKeys = null;
this.parentPath = null;
this.container = null;
this.listKey = null;
this.key = null;
this.node = null;
this.type = null;
this._store = null;
this.parent = parent;
this.hub = hub;
this.data = null;
this.context = null;
this.scope = null;
}
get removed() {
return (this._traverseFlags & 1) > 0;
}
set removed(v) {
if (v) this._traverseFlags |= 1;else this._traverseFlags &= -2;
}
get shouldStop() {
return (this._traverseFlags & 2) > 0;
}
set shouldStop(v) {
if (v) this._traverseFlags |= 2;else this._traverseFlags &= -3;
}
get shouldSkip() {
return (this._traverseFlags & 4) > 0;
}
set shouldSkip(v) {
if (v) this._traverseFlags |= 4;else this._traverseFlags &= -5;
}
static get({
hub,
parentPath,
parent,
container,
listKey,
key
}) {
if (!hub && parentPath) {
hub = parentPath.hub;
}
if (!parent) {
throw new Error("To get a node path the parent needs to exist");
}
const targetNode = container[key];
const paths = cache.getOrCreateCachedPaths(parent, parentPath);
let path = paths.get(targetNode);
if (!path) {
path = new NodePath(hub, parent);
if (targetNode) paths.set(targetNode, path);
}
_context.setup.call(path, parentPath, container, listKey, key);
return path;
}
getScope(scope) {
return this.isScope() ? new _index2.default(this) : scope;
}
setData(key, val) {
if (this.data == null) {
this.data = Object.create(null);
}
return this.data[key] = val;
}
getData(key, def) {
if (this.data == null) {
this.data = Object.create(null);
}
let val = this.data[key];
if (val === undefined && def !== undefined) val = this.data[key] = def;
return val;
}
hasNode() {
return this.node != null;
}
buildCodeFrameError(msg, Error = SyntaxError) {
return this.hub.buildError(this.node, msg, Error);
}
traverse(visitor, state) {
(0, _index.default)(this.node, visitor, this.scope, state, this);
}
set(key, node) {
validate(this.node, key, node);
this.node[key] = node;
}
getPathLocation() {
const parts = [];
let path = this;
do {
let key = path.key;
if (path.inList) key = `${path.listKey}[${key}]`;
parts.unshift(key);
} while (path = path.parentPath);
return parts.join(".");
}
debug(message) {
if (!debug.enabled) return;
debug(`${this.getPathLocation()} ${this.type}: ${message}`);
}
toString() {
return (0, _generator.default)(this.node).code;
}
get inList() {
return !!this.listKey;
}
set inList(inList) {
if (!inList) {
this.listKey = null;
}
}
get parentKey() {
return this.listKey || this.key;
}
};
const methods = {
findParent: NodePath_ancestry.findParent,
find: NodePath_ancestry.find,
getFunctionParent: NodePath_ancestry.getFunctionParent,
getStatementParent: NodePath_ancestry.getStatementParent,
getEarliestCommonAncestorFrom: NodePath_ancestry.getEarliestCommonAncestorFrom,
getDeepestCommonAncestorFrom: NodePath_ancestry.getDeepestCommonAncestorFrom,
getAncestry: NodePath_ancestry.getAncestry,
isAncestor: NodePath_ancestry.isAncestor,
isDescendant: NodePath_ancestry.isDescendant,
inType: NodePath_ancestry.inType,
getTypeAnnotation: NodePath_inference.getTypeAnnotation,
isBaseType: NodePath_inference.isBaseType,
couldBeBaseType: NodePath_inference.couldBeBaseType,
baseTypeStrictlyMatches: NodePath_inference.baseTypeStrictlyMatches,
isGenericType: NodePath_inference.isGenericType,
replaceWithMultiple: NodePath_replacement.replaceWithMultiple,
replaceWithSourceString: NodePath_replacement.replaceWithSourceString,
replaceWith: NodePath_replacement.replaceWith,
replaceExpressionWithStatements: NodePath_replacement.replaceExpressionWithStatements,
replaceInline: NodePath_replacement.replaceInline,
evaluateTruthy: NodePath_evaluation.evaluateTruthy,
evaluate: NodePath_evaluation.evaluate,
toComputedKey: NodePath_conversion.toComputedKey,
ensureBlock: NodePath_conversion.ensureBlock,
unwrapFunctionEnvironment: NodePath_conversion.unwrapFunctionEnvironment,
arrowFunctionToExpression: NodePath_conversion.arrowFunctionToExpression,
splitExportDeclaration: NodePath_conversion.splitExportDeclaration,
ensureFunctionName: NodePath_conversion.ensureFunctionName,
matchesPattern: NodePath_introspection.matchesPattern,
isStatic: NodePath_introspection.isStatic,
isNodeType: NodePath_introspection.isNodeType,
canHaveVariableDeclarationOrExpression: NodePath_introspection.canHaveVariableDeclarationOrExpression,
canSwapBetweenExpressionAndStatement: NodePath_introspection.canSwapBetweenExpressionAndStatement,
isCompletionRecord: NodePath_introspection.isCompletionRecord,
isStatementOrBlock: NodePath_introspection.isStatementOrBlock,
referencesImport: NodePath_introspection.referencesImport,
getSource: NodePath_introspection.getSource,
willIMaybeExecuteBefore: NodePath_introspection.willIMaybeExecuteBefore,
_guessExecutionStatusRelativeTo: NodePath_introspection._guessExecutionStatusRelativeTo,
resolve: NodePath_introspection.resolve,
isConstantExpression: NodePath_introspection.isConstantExpression,
isInStrictMode: NodePath_introspection.isInStrictMode,
isDenylisted: NodePath_context.isDenylisted,
visit: NodePath_context.visit,
skip: NodePath_context.skip,
skipKey: NodePath_context.skipKey,
stop: NodePath_context.stop,
setContext: NodePath_context.setContext,
requeue: NodePath_context.requeue,
requeueComputedKeyAndDecorators: NodePath_context.requeueComputedKeyAndDecorators,
remove: NodePath_removal.remove,
insertBefore: NodePath_modification.insertBefore,
insertAfter: NodePath_modification.insertAfter,
unshiftContainer: NodePath_modification.unshiftContainer,
pushContainer: NodePath_modification.pushContainer,
getOpposite: NodePath_family.getOpposite,
getCompletionRecords: NodePath_family.getCompletionRecords,
getSibling: NodePath_family.getSibling,
getPrevSibling: NodePath_family.getPrevSibling,
getNextSibling: NodePath_family.getNextSibling,
getAllNextSiblings: NodePath_family.getAllNextSiblings,
getAllPrevSiblings: NodePath_family.getAllPrevSiblings,
get: NodePath_family.get,
getAssignmentIdentifiers: NodePath_family.getAssignmentIdentifiers,
getBindingIdentifiers: NodePath_family.getBindingIdentifiers,
getOuterBindingIdentifiers: NodePath_family.getOuterBindingIdentifiers,
getBindingIdentifierPaths: NodePath_family.getBindingIdentifierPaths,
getOuterBindingIdentifierPaths: NodePath_family.getOuterBindingIdentifierPaths,
shareCommentsWithSiblings: NodePath_comments.shareCommentsWithSiblings,
addComment: NodePath_comments.addComment,
addComments: NodePath_comments.addComments
};
Object.assign(NodePath_Final.prototype, methods);
{
NodePath_Final.prototype.arrowFunctionToShadowed = NodePath_conversion[String("arrowFunctionToShadowed")];
Object.assign(NodePath_Final.prototype, {
has: NodePath_introspection[String("has")],
is: NodePath_introspection[String("is")],
isnt: NodePath_introspection[String("isnt")],
equals: NodePath_introspection[String("equals")],
hoist: NodePath_modification[String("hoist")],
updateSiblingKeys: NodePath_modification.updateSiblingKeys,
call: NodePath_context.call,
isBlacklisted: NodePath_context[String("isBlacklisted")],
setScope: NodePath_context.setScope,
resync: NodePath_context.resync,
popContext: NodePath_context.popContext,
pushContext: NodePath_context.pushContext,
setup: NodePath_context.setup,
setKey: NodePath_context.setKey
});
}
{
NodePath_Final.prototype._guessExecutionStatusRelativeToDifferentFunctions = NodePath_introspection._guessExecutionStatusRelativeTo;
NodePath_Final.prototype._guessExecutionStatusRelativeToDifferentFunctions = NodePath_introspection._guessExecutionStatusRelativeTo;
Object.assign(NodePath_Final.prototype, {
_getTypeAnnotation: NodePath_inference._getTypeAnnotation,
_replaceWith: NodePath_replacement._replaceWith,
_resolve: NodePath_introspection._resolve,
_call: NodePath_context._call,
_resyncParent: NodePath_context._resyncParent,
_resyncKey: NodePath_context._resyncKey,
_resyncList: NodePath_context._resyncList,
_resyncRemoved: NodePath_context._resyncRemoved,
_getQueueContexts: NodePath_context._getQueueContexts,
_removeFromScope: NodePath_removal._removeFromScope,
_callRemovalHooks: NodePath_removal._callRemovalHooks,
_remove: NodePath_removal._remove,
_markRemoved: NodePath_removal._markRemoved,
_assertUnremoved: NodePath_removal._assertUnremoved,
_containerInsert: NodePath_modification._containerInsert,
_containerInsertBefore: NodePath_modification._containerInsertBefore,
_containerInsertAfter: NodePath_modification._containerInsertAfter,
_verifyNodeList: NodePath_modification._verifyNodeList,
_getKey: NodePath_family._getKey,
_getPattern: NodePath_family._getPattern
});
}
for (const type of t.TYPES) {
const typeKey = `is${type}`;
const fn = t[typeKey];
NodePath_Final.prototype[typeKey] = function (opts) {
return fn(this.node, opts);
};
NodePath_Final.prototype[`assert${type}`] = function (opts) {
if (!fn(this.node, opts)) {
throw new TypeError(`Expected node path of type ${type}`);
}
};
}
Object.assign(NodePath_Final.prototype, NodePath_virtual_types_validator);
for (const type of Object.keys(virtualTypes)) {
if (type[0] === "_") continue;
if (!t.TYPES.includes(type)) t.TYPES.push(type);
}
//# sourceMappingURL=index.js.map
@@ -0,0 +1,58 @@
var test = require('tape');
var v = require('es-value-fixtures');
var forEach = require('for-each');
var inspect = require('../');
test('negative zero', function (t) {
t.equal(inspect(0), '0', 'inspect(0) === "0"');
t.equal(inspect(Object(0)), 'Object(0)', 'inspect(Object(0)) === "Object(0)"');
t.equal(inspect(-0), '-0', 'inspect(-0) === "-0"');
t.equal(inspect(Object(-0)), 'Object(-0)', 'inspect(Object(-0)) === "Object(-0)"');
t.end();
});
test('numericSeparator', function (t) {
forEach(v.nonBooleans, function (nonBoolean) {
t['throws'](
function () { inspect(true, { numericSeparator: nonBoolean }); },
TypeError,
inspect(nonBoolean) + ' is not a boolean'
);
});
t.test('3 digit numbers', function (st) {
var failed = false;
for (var i = -999; i < 1000; i += 1) {
var actual = inspect(i);
var actualSepNo = inspect(i, { numericSeparator: false });
var actualSepYes = inspect(i, { numericSeparator: true });
var expected = String(i);
if (actual !== expected || actualSepNo !== expected || actualSepYes !== expected) {
failed = true;
t.equal(actual, expected);
t.equal(actualSepNo, expected);
t.equal(actualSepYes, expected);
}
}
st.notOk(failed, 'all 3 digit numbers passed');
st.end();
});
t.equal(inspect(1e3), '1000', '1000');
t.equal(inspect(1e3, { numericSeparator: false }), '1000', '1000, numericSeparator false');
t.equal(inspect(1e3, { numericSeparator: true }), '1_000', '1000, numericSeparator true');
t.equal(inspect(-1e3), '-1000', '-1000');
t.equal(inspect(-1e3, { numericSeparator: false }), '-1000', '-1000, numericSeparator false');
t.equal(inspect(-1e3, { numericSeparator: true }), '-1_000', '-1000, numericSeparator true');
t.equal(inspect(1234.5678, { numericSeparator: true }), '1_234.567_8', 'fractional numbers get separators');
t.equal(inspect(1234.56789, { numericSeparator: true }), '1_234.567_89', 'fractional numbers get separators');
t.equal(inspect(1234.567891, { numericSeparator: true }), '1_234.567_891', 'fractional numbers get separators');
t.end();
});
@@ -0,0 +1 @@
module.exports={C:{"126":0.01387,"137":0.01387,"140":0.02774,"142":0.02774,"143":0.71657,"144":0.73043,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 127 128 129 130 131 132 133 134 135 136 138 139 141 145 146 147 3.5 3.6"},D:{"39":0.02774,"42":0.01387,"45":0.01387,"48":0.01387,"55":0.02774,"87":0.04161,"93":0.01387,"94":0.04161,"97":0.05548,"102":0.01387,"103":0.05548,"109":2.11733,"114":0.04161,"125":2.9957,"126":0.01387,"128":0.02774,"131":0.01387,"132":0.02774,"133":0.01387,"137":0.10633,"138":0.78591,"139":0.25427,"140":4.44733,"141":7.42916,"142":0.07859,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 40 41 43 44 46 47 49 50 51 52 53 54 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 83 84 85 86 88 89 90 91 92 95 96 98 99 100 101 104 105 106 107 108 110 111 112 113 115 116 117 118 119 120 121 122 123 124 127 129 130 134 135 136 143 144 145"},F:{"91":0.33286,"92":0.2404,"120":0.09246,"122":0.2404,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 121 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"104":0.02774,"109":0.01387,"126":0.01387,"135":0.01387,"137":0.01387,"138":0.05548,"139":0.06472,"140":2.28839,"141":7.99779,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 105 106 107 108 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 127 128 129 130 131 132 133 134 136 142"},E:{"13":0.01387,_:"0 4 5 6 7 8 9 10 11 12 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 14.1 15.1 15.2-15.3 15.4 15.5 16.0 16.1 16.3 16.4 16.5 17.3 17.4 17.5 18.0 26.1 26.2","13.1":0.16181,"15.6":0.05548,"16.2":0.09246,"16.6":0.07859,"17.0":0.01387,"17.1":0.01387,"17.2":0.02774,"17.6":0.01387,"18.1":0.04161,"18.2":0.05548,"18.3":0.02774,"18.4":0.04161,"18.5-18.6":0.06472,"26.0":0.16181},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00077,"5.0-5.1":0,"6.0-6.1":0.0031,"7.0-7.1":0.00232,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.00697,"10.0-10.2":0.00077,"10.3":0.01317,"11.0-11.2":0.19529,"11.3-11.4":0.00465,"12.0-12.1":0.00155,"12.2-12.5":0.03797,"13.0-13.1":0,"13.2":0.00387,"13.3":0.00155,"13.4-13.7":0.0062,"14.0-14.4":0.01317,"14.5-14.8":0.01395,"15.0-15.1":0.01317,"15.2-15.3":0.01007,"15.4":0.01162,"15.5":0.01317,"15.6-15.8":0.17204,"16.0":0.02325,"16.1":0.0434,"16.2":0.02247,"16.3":0.0403,"16.4":0.01007,"16.5":0.01782,"16.6-16.7":0.23017,"17.0":0.01627,"17.1":0.0248,"17.2":0.01782,"17.3":0.02635,"17.4":0.0465,"17.5":0.07982,"17.6-17.7":0.20149,"18.0":0.04572,"18.1":0.09455,"18.2":0.05115,"18.3":0.16429,"18.4":0.08447,"18.5-18.6":4.30728,"26.0":0.5324,"26.1":0.01937},P:{"20":0.22745,"21":0.01083,"22":0.11914,"25":0.1733,"27":0.20579,"28":2.0904,"29":0.18413,_:"4 23 24 26 5.0-5.4 6.2-6.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 17.0 18.0","7.2-7.4":0.69319,"16.0":0.16247,"19.0":0.01083},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0},K:{"0":0.10218,_:"10 11 12 11.1 11.5 12.1"},A:{_:"6 7 8 9 10 11 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},R:{_:"0"},M:{_:"0"},Q:{_:"14.9"},O:{_:"0"},H:{"0":0},L:{"0":53.05497}};
@@ -0,0 +1,10 @@
import { PluginFunc } from 'dayjs/esm'
declare const plugin: PluginFunc
export = plugin
declare module 'dayjs/esm' {
export function isMoment(input: any): boolean
}
@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _classStaticPrivateMethodGet;
var _assertClassBrand = require("./assertClassBrand.js");
function _classStaticPrivateMethodGet(receiver, classConstructor, method) {
(0, _assertClassBrand.default)(classConstructor, receiver);
return method;
}
//# sourceMappingURL=classStaticPrivateMethodGet.js.map
@@ -0,0 +1,16 @@
import type { TSchema, SchemaOptions } from '../schema/index';
import type { Static } from '../static/index';
import { Kind } from '../symbols/index';
type TupleStatic<T extends TSchema[], P extends unknown[], Acc extends unknown[] = []> = T extends [infer L extends TSchema, ...infer R extends TSchema[]] ? TupleStatic<R, P, [...Acc, Static<L, P>]> : Acc;
export interface TTuple<T extends TSchema[] = TSchema[]> extends TSchema {
[Kind]: 'Tuple';
static: TupleStatic<T, this['params']>;
type: 'array';
items?: T;
additionalItems?: false;
minItems: number;
maxItems: number;
}
/** `[Json]` Creates a Tuple type */
export declare function Tuple<Types extends TSchema[]>(types: [...Types], options?: SchemaOptions): TTuple<Types>;
export {};
@@ -0,0 +1,175 @@
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/extend-variants.js
var extend_variants_exports = {};
__export(extend_variants_exports, {
extendVariants: () => extendVariants
});
module.exports = __toCommonJS(extend_variants_exports);
var React = __toESM(require("react"));
var import_theme = require("@heroui/theme");
var import_clsx = __toESM(require("clsx"));
// src/utils.ts
var import_react = require("react");
var mapPropsVariants = (props, variantKeys, removeVariantProps = true) => {
if (!variantKeys) {
return [props, {}];
}
const picked = variantKeys.reduce((acc, key) => {
if (key in props) {
return { ...acc, [key]: props[key] };
} else {
return acc;
}
}, {});
if (removeVariantProps) {
const omitted = Object.keys(props).filter((key) => !variantKeys.includes(key)).reduce((acc, key) => ({ ...acc, [key]: props[key] }), {});
return [omitted, picked];
} else {
return [props, picked];
}
};
// src/extend-variants.js
function getSlots(variants) {
return variants ? Object.values(variants).flatMap(Object.values).reduce((acc, slot) => {
if (typeof slot === "object" && slot !== null && !(slot instanceof String)) {
Object.keys(slot).forEach((key) => {
if (!acc.hasOwnProperty(key)) {
acc[key] = "";
}
});
}
return acc;
}, {}) : {};
}
function getClassNamesWithProps({
props = {},
variants,
slots,
defaultVariants,
compoundVariants,
hasSlots,
opts
}) {
var _a, _b, _c;
const keys = [];
if (defaultVariants && typeof defaultVariants === "object") {
for (const key in defaultVariants) {
const value = defaultVariants[key];
const propValue = props == null ? void 0 : props[key];
if (propValue && propValue !== value) {
keys.push(key);
}
}
}
const customTv = (0, import_theme.tv)(
{
variants,
defaultVariants: defaultVariants && typeof defaultVariants === "object" ? (
// Do not apply default variants when the props variant is different
Object.keys(defaultVariants).filter((k) => !keys.includes(k)).reduce((o, k) => {
o[k] = defaultVariants[k];
return o;
}, [])
) : defaultVariants,
compoundVariants,
...hasSlots && { slots }
},
{
twMerge: (_a = opts.twMerge) != null ? _a : true,
twMergeConfig: (_b = opts.twMergeConfig) != null ? _b : {}
}
);
const [baseProps, variantProps] = mapPropsVariants(props, customTv.variantKeys, false);
const newProps = { ...defaultVariants, ...baseProps };
let classNames = {};
const result = customTv(variantProps);
if (!hasSlots) {
newProps.className = (0, import_clsx.default)(result, props.className);
} else {
Object.entries(result).forEach(([key, value]) => {
const slotResult = value();
if (typeof slotResult === "string") {
classNames[key] = slotResult;
}
});
Object.entries((_c = props.classNames) != null ? _c : {}).forEach(([key, value]) => {
classNames[key] = (0, import_clsx.default)(classNames[key], value);
});
}
if (Object.keys(classNames).length !== 0) {
newProps.classNames = classNames;
}
return newProps;
}
function extendVariants(BaseComponent, styles = {}, opts = {}) {
const { variants, defaultVariants, compoundVariants } = styles || {};
const slots = getSlots(variants);
const hasSlots = typeof slots === "object" && Object.keys(slots).length !== 0;
const ForwardedComponent = React.forwardRef((originalProps = {}, ref) => {
const newProps = React.useMemo(
() => getClassNamesWithProps(
{
slots,
variants,
compoundVariants,
props: originalProps,
defaultVariants,
hasSlots,
opts
},
[originalProps]
)
);
return React.createElement(BaseComponent, { ...originalProps, ...newProps, ref });
});
if (BaseComponent.getCollectionNode) {
ForwardedComponent.getCollectionNode = (itemProps) => {
const newProps = getClassNamesWithProps({
slots,
variants,
compoundVariants,
props: itemProps,
defaultVariants,
hasSlots,
opts
});
return BaseComponent.getCollectionNode({ ...itemProps, ...newProps });
};
}
ForwardedComponent.displayName = `Extended(${BaseComponent.displayName || BaseComponent.name})`;
return ForwardedComponent;
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
extendVariants
});
@@ -0,0 +1,25 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var compositeRole = {
abstract: true,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-activedescendant': null,
'aria-disabled': null
},
relatedConcepts: [],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'widget']]
};
var _default = exports.default = compositeRole;
@@ -0,0 +1,370 @@
import type {ClassNameValue as ClassValue} from "tailwind-merge";
import {TVConfig, TWMConfig} from "./config";
import {TVGeneratedScreens} from "./generated";
/**
* ----------------------------------------
* Base Types
* ----------------------------------------
*/
export type {ClassValue};
export type ClassProp<V extends unknown = ClassValue> =
| {class?: V; className?: never}
| {class?: never; className?: V};
type TVBaseName = "base";
type TVScreens = "initial" | TVGeneratedScreens;
type TVSlots = Record<string, ClassValue> | undefined;
/**
* ----------------------------------------------------------------------
* Utils
* ----------------------------------------------------------------------
*/
export type OmitUndefined<T> = T extends undefined ? never : T;
export type StringToBoolean<T> = T extends "true" | "false" ? boolean : T;
export type CnOptions = ClassValue[];
export type CnReturn = string | undefined;
export declare const cnBase: <T extends CnOptions>(...classes: T) => CnReturn;
export declare const cn: <T extends CnOptions>(...classes: T) => (config?: TWMConfig) => CnReturn;
// compare if the value is true or array of values
export type isTrueOrArray<T> = T extends true | unknown[] ? true : false;
export type WithInitialScreen<T extends Array<string>> = ["initial", ...T];
/**
* ----------------------------------------------------------------------
* TV Types
* ----------------------------------------------------------------------
*/
type TVSlotsWithBase<S extends TVSlots, B extends ClassValue> = B extends undefined
? keyof S
: keyof S | TVBaseName;
type SlotsClassValue<S extends TVSlots, B extends ClassValue> = {
[K in TVSlotsWithBase<S, B>]?: ClassValue;
};
type TVVariantsDefault<S extends TVSlots, B extends ClassValue> = S extends undefined
? {}
: {
[key: string]: {
[key: string]: S extends TVSlots ? SlotsClassValue<S, B> | ClassValue : ClassValue;
};
};
export type TVVariants<
S extends TVSlots | undefined,
B extends ClassValue | undefined = undefined,
EV extends TVVariants<ES> | undefined = undefined,
ES extends TVSlots | undefined = undefined,
> = EV extends undefined
? TVVariantsDefault<S, B>
:
| {
[K in keyof EV]: {
[K2 in keyof EV[K]]: S extends TVSlots
? SlotsClassValue<S, B> | ClassValue
: ClassValue;
};
}
| TVVariantsDefault<S, B>;
export type TVCompoundVariants<
V extends TVVariants<S>,
S extends TVSlots,
B extends ClassValue,
EV extends TVVariants<ES>,
ES extends TVSlots,
> = Array<
{
[K in keyof V | keyof EV]?:
| (K extends keyof V ? StringToBoolean<keyof V[K]> : never)
| (K extends keyof EV ? StringToBoolean<keyof EV[K]> : never)
| (K extends keyof V ? StringToBoolean<keyof V[K]>[] : never);
} & ClassProp<SlotsClassValue<S, B> | ClassValue>
>;
export type TVCompoundSlots<
V extends TVVariants<S>,
S extends TVSlots,
B extends ClassValue,
> = Array<
V extends undefined
? {
slots: Array<TVSlotsWithBase<S, B>>;
} & ClassProp
: {
slots: Array<TVSlotsWithBase<S, B>>;
} & {
[K in keyof V]?: StringToBoolean<keyof V[K]> | StringToBoolean<keyof V[K]>[];
} & ClassProp
>;
export type TVDefaultVariants<
V extends TVVariants<S>,
S extends TVSlots,
EV extends TVVariants<ES>,
ES extends TVSlots,
> = {
[K in keyof V | keyof EV]?:
| (K extends keyof V ? StringToBoolean<keyof V[K]> : never)
| (K extends keyof EV ? StringToBoolean<keyof EV[K]> : never);
};
export type TVScreenPropsValue<
V extends TVVariants<S>,
S extends TVSlots,
K extends keyof V,
C extends TVConfig,
> = C["responsiveVariants"] extends string[]
? {
[Screen in WithInitialScreen<C["responsiveVariants"]>[number]]?: StringToBoolean<keyof V[K]>;
}
: {
[Screen in TVScreens]?: StringToBoolean<keyof V[K]>;
};
export type TVProps<
V extends TVVariants<S>,
S extends TVSlots,
C extends TVConfig<V, EV>,
EV extends TVVariants<ES>,
ES extends TVSlots,
> = EV extends undefined
? V extends undefined
? ClassProp<ClassValue>
: {
[K in keyof V]?: isTrueOrArray<C["responsiveVariants"]> extends true
? StringToBoolean<keyof V[K]> | TVScreenPropsValue<V, S, K, C> | undefined
: StringToBoolean<keyof V[K]> | undefined;
} & ClassProp<ClassValue>
: V extends undefined
? {
[K in keyof EV]?: isTrueOrArray<C["responsiveVariants"]> extends true
? StringToBoolean<keyof EV[K]> | TVScreenPropsValue<EV, ES, K, C> | undefined
: StringToBoolean<keyof EV[K]> | undefined;
} & ClassProp<ClassValue>
: {
[K in keyof V | keyof EV]?: isTrueOrArray<C["responsiveVariants"]> extends true
?
| (K extends keyof V ? StringToBoolean<keyof V[K]> : never)
| (K extends keyof EV ? StringToBoolean<keyof EV[K]> : never)
| TVScreenPropsValue<EV & V, S, K, C>
| undefined
:
| (K extends keyof V ? StringToBoolean<keyof V[K]> : never)
| (K extends keyof EV ? StringToBoolean<keyof EV[K]> : never)
| undefined;
} & ClassProp<ClassValue>;
export type TVVariantKeys<V extends TVVariants<S>, S extends TVSlots> = V extends Object
? Array<keyof V>
: undefined;
export type TVReturnProps<
V extends TVVariants<S>,
S extends TVSlots,
B extends ClassValue,
EV extends TVVariants<ES>,
ES extends TVSlots,
// @ts-expect-error
E extends TVReturnType = undefined,
> = {
extend: E;
base: B;
slots: S;
variants: V;
defaultVariants: TVDefaultVariants<V, S, EV, ES>;
compoundVariants: TVCompoundVariants<V, S, B, EV, ES>;
compoundSlots: TVCompoundSlots<V, S, B>;
variantKeys: TVVariantKeys<V, S>;
};
type HasSlots<S extends TVSlots, ES extends TVSlots> = S extends undefined
? ES extends undefined
? false
: true
: true;
export type TVReturnType<
V extends TVVariants<S>,
S extends TVSlots,
B extends ClassValue,
C extends TVConfig<V, EV>,
EV extends TVVariants<ES>,
ES extends TVSlots,
// @ts-expect-error
E extends TVReturnType = undefined,
> = {
(props?: TVProps<V, S, C, EV, ES>): HasSlots<S, ES> extends true
? {
[K in keyof (ES extends undefined ? {} : ES)]: (
slotProps?: TVProps<V, S, C, EV, ES>,
) => string;
} & {
[K in keyof (S extends undefined ? {} : S)]: (
slotProps?: TVProps<V, S, C, EV, ES>,
) => string;
} & {
[K in TVSlotsWithBase<{}, B>]: (slotProps?: TVProps<V, S, C, EV, ES>) => string;
}
: string;
} & TVReturnProps<V, S, B, EV, ES, E>;
export type TV = {
<
V extends TVVariants<S, B, EV>,
CV extends TVCompoundVariants<V, S, B, EV, ES>,
DV extends TVDefaultVariants<V, S, EV, ES>,
C extends TVConfig<V, EV>,
B extends ClassValue = undefined,
S extends TVSlots = undefined,
// @ts-expect-error
E extends TVReturnType = TVReturnType<
V,
S,
B,
C,
// @ts-expect-error
EV extends undefined ? {} : EV,
// @ts-expect-error
ES extends undefined ? {} : ES
>,
EV extends TVVariants<ES, B, E["variants"], ES> = E["variants"],
ES extends TVSlots = E["slots"] extends TVSlots ? E["slots"] : undefined,
>(
options: {
/**
* Extend allows for easy composition of components.
* @see https://www.tailwind-variants.org/docs/composing-components
*/
extend?: E;
/**
* Base allows you to set a base class for a component.
*/
base?: B;
/**
* Slots allow you to separate a component into multiple parts.
* @see https://www.tailwind-variants.org/docs/slots
*/
slots?: S;
/**
* Variants allow you to create multiple versions of the same component.
* @see https://www.tailwind-variants.org/docs/variants#adding-variants
*/
variants?: V;
/**
* Compound variants allow you to apply classes to multiple variants at once.
* @see https://www.tailwind-variants.org/docs/variants#compound-variants
*/
compoundVariants?: CV;
/**
* Compound slots allow you to apply classes to multiple slots at once.
*/
compoundSlots?: TVCompoundSlots<V, S, B>;
/**
* Default variants allow you to set default variants for a component.
* @see https://www.tailwind-variants.org/docs/variants#default-variants
*/
defaultVariants?: DV;
},
/**
* The config object allows you to modify the default configuration.
* @see https://www.tailwind-variants.org/docs/api-reference#config-optional
*/
config?: C,
): TVReturnType<V, S, B, C, EV, ES, E>;
};
export type CreateTV<RV extends TVConfig["responsiveVariants"] = undefined> = {
<
V extends TVVariants<S, B, EV>,
CV extends TVCompoundVariants<V, S, B, EV, ES>,
DV extends TVDefaultVariants<V, S, EV, ES>,
C extends TVConfig<V, EV>,
B extends ClassValue = undefined,
S extends TVSlots = undefined,
// @ts-expect-error
E extends TVReturnType = TVReturnType<
V,
S,
B,
C,
// @ts-expect-error
EV extends undefined ? {} : EV,
// @ts-expect-error
ES extends undefined ? {} : ES
>,
EV extends TVVariants<ES, B, E["variants"], ES> = E["variants"],
ES extends TVSlots = E["slots"] extends TVSlots ? E["slots"] : undefined,
>(
options: {
/**
* Extend allows for easy composition of components.
* @see https://www.tailwind-variants.org/docs/composing-components
*/
extend?: E;
/**
* Base allows you to set a base class for a component.
*/
base?: B;
/**
* Slots allow you to separate a component into multiple parts.
* @see https://www.tailwind-variants.org/docs/slots
*/
slots?: S;
/**
* Variants allow you to create multiple versions of the same component.
* @see https://www.tailwind-variants.org/docs/variants#adding-variants
*/
variants?: V;
/**
* Compound variants allow you to apply classes to multiple variants at once.
* @see https://www.tailwind-variants.org/docs/variants#compound-variants
*/
compoundVariants?: CV;
/**
* Compound slots allow you to apply classes to multiple slots at once.
*/
compoundSlots?: TVCompoundSlots<V, S, B>;
/**
* Default variants allow you to set default variants for a component.
* @see https://www.tailwind-variants.org/docs/variants#default-variants
*/
defaultVariants?: DV;
},
/**
* The config object allows you to modify the default configuration.
* @see https://www.tailwind-variants.org/docs/api-reference#config-optional
*/
config?: C,
): TVReturnType<V, S, B, C & RV, EV, ES, E>;
};
// main function
export declare const tv: TV;
export declare function createTV<T extends TVConfig["responsiveVariants"]>(
config: TVConfig & T,
): CreateTV<T>;
export declare const defaultConfig: TVConfig;
export type VariantProps<Component extends (...args: any) => any> = Omit<
OmitUndefined<Parameters<Component>[0]>,
"class" | "className"
>;
@@ -0,0 +1,38 @@
var baseGetTag = require('./_baseGetTag'),
isObjectLike = require('./isObjectLike');
/** `Object#toString` result references. */
var numberTag = '[object Number]';
/**
* Checks if `value` is classified as a `Number` primitive or object.
*
* **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
* classified as numbers, use the `_.isFinite` method.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a number, else `false`.
* @example
*
* _.isNumber(3);
* // => true
*
* _.isNumber(Number.MIN_VALUE);
* // => true
*
* _.isNumber(Infinity);
* // => true
*
* _.isNumber('3');
* // => false
*/
function isNumber(value) {
return typeof value == 'number' ||
(isObjectLike(value) && baseGetTag(value) == numberTag);
}
module.exports = isNumber;
@@ -0,0 +1,33 @@
import baseIteratee from './_baseIteratee.js';
import baseSortedIndexBy from './_baseSortedIndexBy.js';
/**
* This method is like `_.sortedIndex` except that it accepts `iteratee`
* which is invoked for `value` and each element of `array` to compute their
* sort ranking. The iteratee is invoked with one argument: (value).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The sorted array to inspect.
* @param {*} value The value to evaluate.
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
* @returns {number} Returns the index at which `value` should be inserted
* into `array`.
* @example
*
* var objects = [{ 'x': 4 }, { 'x': 5 }];
*
* _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
* // => 0
*
* // The `_.property` iteratee shorthand.
* _.sortedIndexBy(objects, { 'x': 4 }, 'x');
* // => 0
*/
function sortedIndexBy(array, value, iteratee) {
return baseSortedIndexBy(array, value, baseIteratee(iteratee, 2));
}
export default sortedIndexBy;
@@ -0,0 +1,16 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.KeyOfPropertyEntries = KeyOfPropertyEntries;
const indexed_1 = require("../indexed/indexed");
const keyof_property_keys_1 = require("./keyof-property-keys");
/**
* `[Utility]` Resolves an array of keys and schemas from the given schema. This method is faster
* than obtaining the keys and resolving each individually via indexing. This method was written
* accellerate Intersect and Union encoding.
*/
function KeyOfPropertyEntries(schema) {
const keys = (0, keyof_property_keys_1.KeyOfPropertyKeys)(schema);
const schemas = (0, indexed_1.IndexFromPropertyKeys)(schema, keys);
return keys.map((_, index) => [keys[index], schemas[index]]);
}
@@ -0,0 +1,17 @@
export * from './user';
export * from './group';
export * from './msg';
export * from './notify';
export * from './cache';
export * from './system';
export * from './webapi';
export * from './sign';
export * from './element';
export * from './constant';
export * from './graytip';
export * from './emoji';
export * from './service';
export * from './adapter';
export * from './contact';
export * from './file';
export * from './flashfile';
@@ -0,0 +1,18 @@
import { isMotionValue, transformPropOrder } from 'motion-dom';
import { scrapeMotionValuesFromProps as scrapeMotionValuesFromProps$1 } from '../../html/utils/scrape-motion-values.mjs';
function scrapeMotionValuesFromProps(props, prevProps, visualElement) {
const newValues = scrapeMotionValuesFromProps$1(props, prevProps, visualElement);
for (const key in props) {
if (isMotionValue(props[key]) ||
isMotionValue(prevProps[key])) {
const targetKey = transformPropOrder.indexOf(key) !== -1
? "attr" + key.charAt(0).toUpperCase() + key.substring(1)
: key;
newValues[targetKey] = props[key];
}
}
return newValues;
}
export { scrapeMotionValuesFromProps };
@@ -0,0 +1,99 @@
'use strict'
const path = require('path')
const fs = require('graceful-fs')
const pathExists = require('../path-exists').pathExists
/**
* Function that returns two types of paths, one relative to symlink, and one
* relative to the current working directory. Checks if path is absolute or
* relative. If the path is relative, this function checks if the path is
* relative to symlink or relative to current working directory. This is an
* initiative to find a smarter `srcpath` to supply when building symlinks.
* This allows you to determine which path to use out of one of three possible
* types of source paths. The first is an absolute path. This is detected by
* `path.isAbsolute()`. When an absolute path is provided, it is checked to
* see if it exists. If it does it's used, if not an error is returned
* (callback)/ thrown (sync). The other two options for `srcpath` are a
* relative url. By default Node's `fs.symlink` works by creating a symlink
* using `dstpath` and expects the `srcpath` to be relative to the newly
* created symlink. If you provide a `srcpath` that does not exist on the file
* system it results in a broken symlink. To minimize this, the function
* checks to see if the 'relative to symlink' source file exists, and if it
* does it will use it. If it does not, it checks if there's a file that
* exists that is relative to the current working directory, if does its used.
* This preserves the expectations of the original fs.symlink spec and adds
* the ability to pass in `relative to current working direcotry` paths.
*/
function symlinkPaths (srcpath, dstpath, callback) {
if (path.isAbsolute(srcpath)) {
return fs.lstat(srcpath, (err) => {
if (err) {
err.message = err.message.replace('lstat', 'ensureSymlink')
return callback(err)
}
return callback(null, {
toCwd: srcpath,
toDst: srcpath
})
})
} else {
const dstdir = path.dirname(dstpath)
const relativeToDst = path.join(dstdir, srcpath)
return pathExists(relativeToDst, (err, exists) => {
if (err) return callback(err)
if (exists) {
return callback(null, {
toCwd: relativeToDst,
toDst: srcpath
})
} else {
return fs.lstat(srcpath, (err) => {
if (err) {
err.message = err.message.replace('lstat', 'ensureSymlink')
return callback(err)
}
return callback(null, {
toCwd: srcpath,
toDst: path.relative(dstdir, srcpath)
})
})
}
})
}
}
function symlinkPathsSync (srcpath, dstpath) {
let exists
if (path.isAbsolute(srcpath)) {
exists = fs.existsSync(srcpath)
if (!exists) throw new Error('absolute srcpath does not exist')
return {
toCwd: srcpath,
toDst: srcpath
}
} else {
const dstdir = path.dirname(dstpath)
const relativeToDst = path.join(dstdir, srcpath)
exists = fs.existsSync(relativeToDst)
if (exists) {
return {
toCwd: relativeToDst,
toDst: srcpath
}
} else {
exists = fs.existsSync(srcpath)
if (!exists) throw new Error('relative srcpath does not exist')
return {
toCwd: srcpath,
toDst: path.relative(dstdir, srcpath)
}
}
}
}
module.exports = {
symlinkPaths,
symlinkPathsSync
}
@@ -0,0 +1,6 @@
import { createRequire } from 'node:module';
const importMetaUrl = import.meta.url;
export const cjsRequire = importMetaUrl
? createRequire(importMetaUrl)
: require;
//# sourceMappingURL=require.js.map
@@ -0,0 +1 @@
{"version":3,"file":"injectBase.spec.d.ts","sourceRoot":"","sources":["../../../../src/metadata/decorators/injectBase.spec.ts"],"names":[],"mappings":"AAUA,OAAO,kBAAkB,CAAC"}
@@ -0,0 +1,31 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var presentationRole = {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['prohibited'],
prohibitedProps: ['aria-label', 'aria-labelledby'],
props: {},
relatedConcepts: [{
concept: {
attributes: [{
name: 'alt',
value: ''
}],
name: 'img'
},
module: 'HTML'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure']]
};
var _default = exports.default = presentationRole;
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AA2BM,SAAS,0CAAiB,KAA6B,EAAE,KAAyB;IACvF,IAAI,cAAC,UAAU,QAAE,IAAI,sBAAE,qBAAqB,QAAO,GAAG;IACtD,IAAI,aAAC,SAAS,oBAAE,gBAAgB,qBAAE,iBAAiB,EAAC,GAAG,MAAM,iBAAiB;IAE9E,IAAI,cAAC,UAAU,cAAE,UAAU,oBAAE,gBAAgB,qBAAE,iBAAiB,EAAC,GAAG,CAAA,GAAA,8BAAO,EAAE;QAC3E,GAAG,KAAK;QACR,oDAAoD;QACpD,6CAA6C;QAC7C,kBAAkB;mBAClB;QACA,cAAc,MAAM,YAAY,IAAI;IACtC;IAEA,CAAA,GAAA,2CAAgB,EAAE,GAAG,CAAC,OAAO;cAC3B;QACA,eAAe,iBAAiB,EAAE;QAClC,gBAAgB,kBAAkB,EAAE;4BACpC;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,oCAAa,EAAE,OAAO;QAAC,WAAW;IAAI;IAErD,IAAI,oBAAC,gBAAgB,EAAC,GAAG,CAAA,GAAA,2CAAa,EAAE;QACtC,cAAc,MAAM,MAAM;QAC1B,eAAe,MAAM,OAAO;QAC5B,qBAAqB,MAAM,aAAa;IAC1C;IAEA,OAAO;QACL,YAAY,CAAA,GAAA,gCAAS,EAAE,UAAU;YAC/B,MAAM;YACN,iBAAiB,cAAc;YAC/B,GAAG,UAAU;YACb,GAAG,gBAAgB;QACrB;oBACA;0BACA;2BACA;mBACA;0BACA;2BACA;IACF;AACF","sources":["packages/@react-aria/checkbox/src/useCheckboxGroup.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 {AriaCheckboxGroupProps} from '@react-types/checkbox';\nimport {checkboxGroupData} from './utils';\nimport {CheckboxGroupState} from '@react-stately/checkbox';\nimport {DOMAttributes, ValidationResult} from '@react-types/shared';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {useField} from '@react-aria/label';\nimport {useFocusWithin} from '@react-aria/interactions';\n\nexport interface CheckboxGroupAria extends ValidationResult {\n /** Props for the checkbox group wrapper element. */\n groupProps: DOMAttributes,\n /** Props for the checkbox group's visible label (if any). */\n labelProps: DOMAttributes,\n /** Props for the checkbox group description element, if any. */\n descriptionProps: DOMAttributes,\n /** Props for the checkbox group error message element, if any. */\n errorMessageProps: DOMAttributes\n}\n\n/**\n * Provides the behavior and accessibility implementation for a checkbox group component.\n * Checkbox groups allow users to select multiple items from a list of options.\n * @param props - Props for the checkbox group.\n * @param state - State for the checkbox group, as returned by `useCheckboxGroupState`.\n */\nexport function useCheckboxGroup(props: AriaCheckboxGroupProps, state: CheckboxGroupState): CheckboxGroupAria {\n let {isDisabled, name, validationBehavior = 'aria'} = props;\n let {isInvalid, validationErrors, validationDetails} = state.displayValidation;\n\n let {labelProps, fieldProps, descriptionProps, errorMessageProps} = useField({\n ...props,\n // Checkbox group is not an HTML input element so it\n // shouldn't be labeled by a <label> element.\n labelElementType: 'span',\n isInvalid,\n errorMessage: props.errorMessage || validationErrors\n });\n\n checkboxGroupData.set(state, {\n name,\n descriptionId: descriptionProps.id,\n errorMessageId: errorMessageProps.id,\n validationBehavior\n });\n\n let domProps = filterDOMProps(props, {labelable: true});\n\n let {focusWithinProps} = useFocusWithin({\n onBlurWithin: props.onBlur,\n onFocusWithin: props.onFocus,\n onFocusWithinChange: props.onFocusChange\n });\n\n return {\n groupProps: mergeProps(domProps, {\n role: 'group',\n 'aria-disabled': isDisabled || undefined,\n ...fieldProps,\n ...focusWithinProps\n }),\n labelProps,\n descriptionProps,\n errorMessageProps,\n isInvalid,\n validationErrors,\n validationDetails\n };\n}\n"],"names":[],"version":3,"file":"useCheckboxGroup.main.js.map"}
@@ -0,0 +1,3 @@
declare function _exports(context: Context, node: ASTNode, variable: string, ...args: any[]): boolean;
export = _exports;
//# sourceMappingURL=isDestructuredFromPragmaImport.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"uri.all.js","sources":["../../src/index.ts","../../src/schemes/urn-uuid.ts","../../src/schemes/urn.ts","../../src/schemes/mailto.ts","../../src/schemes/wss.ts","../../src/schemes/ws.ts","../../src/schemes/https.ts","../../src/schemes/http.ts","../../src/uri.ts","../../node_modules/punycode/punycode.es6.js","../../src/regexps-iri.ts","../../src/regexps-uri.ts","../../src/util.ts"],"sourcesContent":["import { SCHEMES } from \"./uri\";\n\nimport http from \"./schemes/http\";\nSCHEMES[http.scheme] = http;\n\nimport https from \"./schemes/https\";\nSCHEMES[https.scheme] = https;\n\nimport ws from \"./schemes/ws\";\nSCHEMES[ws.scheme] = ws;\n\nimport wss from \"./schemes/wss\";\nSCHEMES[wss.scheme] = wss;\n\nimport mailto from \"./schemes/mailto\";\nSCHEMES[mailto.scheme] = mailto;\n\nimport urn from \"./schemes/urn\";\nSCHEMES[urn.scheme] = urn;\n\nimport uuid from \"./schemes/urn-uuid\";\nSCHEMES[uuid.scheme] = uuid;\n\nexport * from \"./uri\";\n","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { URNComponents } from \"./urn\";\nimport { SCHEMES } from \"../uri\";\n\nexport interface UUIDComponents extends URNComponents {\n\tuuid?: string;\n}\n\nconst UUID = /^[0-9A-Fa-f]{8}(?:\\-[0-9A-Fa-f]{4}){3}\\-[0-9A-Fa-f]{12}$/;\nconst UUID_PARSE = /^[0-9A-Fa-f\\-]{36}/;\n\n//RFC 4122\nconst handler:URISchemeHandler<UUIDComponents, URIOptions, URNComponents> = {\n\tscheme : \"urn:uuid\",\n\n\tparse : function (urnComponents:URNComponents, options:URIOptions):UUIDComponents {\n\t\tconst uuidComponents = urnComponents as UUIDComponents;\n\t\tuuidComponents.uuid = uuidComponents.nss;\n\t\tuuidComponents.nss = undefined;\n\n\t\tif (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) {\n\t\t\tuuidComponents.error = uuidComponents.error || \"UUID is not valid.\";\n\t\t}\n\n\t\treturn uuidComponents;\n\t},\n\n\tserialize : function (uuidComponents:UUIDComponents, options:URIOptions):URNComponents {\n\t\tconst urnComponents = uuidComponents as URNComponents;\n\t\t//normalize UUID\n\t\turnComponents.nss = (uuidComponents.uuid || \"\").toLowerCase();\n\t\treturn urnComponents;\n\t},\n};\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { pctEncChar, SCHEMES } from \"../uri\";\n\nexport interface URNComponents extends URIComponents {\n\tnid?:string;\n\tnss?:string;\n}\n\nexport interface URNOptions extends URIOptions {\n\tnid?:string;\n}\n\nconst NID$ = \"(?:[0-9A-Za-z][0-9A-Za-z\\\\-]{1,31})\";\nconst PCT_ENCODED$ = \"(?:\\\\%[0-9A-Fa-f]{2})\";\nconst TRANS$$ = \"[0-9A-Za-z\\\\(\\\\)\\\\+\\\\,\\\\-\\\\.\\\\:\\\\=\\\\@\\\\;\\\\$\\\\_\\\\!\\\\*\\\\'\\\\/\\\\?\\\\#]\";\nconst NSS$ = \"(?:(?:\" + PCT_ENCODED$ + \"|\" + TRANS$$ + \")+)\";\nconst URN_SCHEME = new RegExp(\"^urn\\\\:(\" + NID$ + \")$\");\nconst URN_PATH = new RegExp(\"^(\" + NID$ + \")\\\\:(\" + NSS$ + \")$\");\nconst URN_PARSE = /^([^\\:]+)\\:(.*)/;\nconst URN_EXCLUDED = /[\\x00-\\x20\\\\\\\"\\&\\<\\>\\[\\]\\^\\`\\{\\|\\}\\~\\x7F-\\xFF]/g;\n\n//RFC 2141\nconst handler:URISchemeHandler<URNComponents,URNOptions> = {\n\tscheme : \"urn\",\n\n\tparse : function (components:URIComponents, options:URNOptions):URNComponents {\n\t\tconst matches = components.path && components.path.match(URN_PARSE);\n\t\tlet urnComponents = components as URNComponents;\n\n\t\tif (matches) {\n\t\t\tconst scheme = options.scheme || urnComponents.scheme || \"urn\";\n\t\t\tconst nid = matches[1].toLowerCase();\n\t\t\tconst nss = matches[2];\n\t\t\tconst urnScheme = `${scheme}:${options.nid || nid}`;\n\t\t\tconst schemeHandler = SCHEMES[urnScheme];\n\n\t\t\turnComponents.nid = nid;\n\t\t\turnComponents.nss = nss;\n\t\t\turnComponents.path = undefined;\n\n\t\t\tif (schemeHandler) {\n\t\t\t\turnComponents = schemeHandler.parse(urnComponents, options) as URNComponents;\n\t\t\t}\n\t\t} else {\n\t\t\turnComponents.error = urnComponents.error || \"URN can not be parsed.\";\n\t\t}\n\n\t\treturn urnComponents;\n\t},\n\n\tserialize : function (urnComponents:URNComponents, options:URNOptions):URIComponents {\n\t\tconst scheme = options.scheme || urnComponents.scheme || \"urn\";\n\t\tconst nid = urnComponents.nid;\n\t\tconst urnScheme = `${scheme}:${options.nid || nid}`;\n\t\tconst schemeHandler = SCHEMES[urnScheme];\n\n\t\tif (schemeHandler) {\n\t\t\turnComponents = schemeHandler.serialize(urnComponents, options) as URNComponents;\n\t\t}\n\n\t\tconst uriComponents = urnComponents as URIComponents;\n\t\tconst nss = urnComponents.nss;\n\t\turiComponents.path = `${nid || options.nid}:${nss}`;\n\n\t\treturn uriComponents;\n\t},\n};\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { pctEncChar, pctDecChars, unescapeComponent } from \"../uri\";\nimport punycode from \"punycode\";\nimport { merge, subexp, toUpperCase, toArray } from \"../util\";\n\nexport interface MailtoHeaders {\n\t[hfname:string]:string\n}\n\nexportLine truncated
@@ -0,0 +1,6 @@
"use strict";
const addMonths = require("./addMonths.js");
function subYears(date, years) {
return addMonths(date, -years * 12);
}
module.exports = subYears;
@@ -0,0 +1 @@
{"name":"prelude-ls","version":"1.2.1","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532093672,"integrity":"sha512-FkymZYtx329CmIaO3HdzaHZ6WrL5BZj/NGLWVaM6TuNvsbYcBnTjOd6Yzvi6lJfLVAW0oJGhl8mK9EKILopYDg==","mode":420,"size":1054},"lib/Func.js":{"checkedAt":1794532093672,"integrity":"sha512-oDTNVl4177+mvgGpgdIDeA8RxhKt3I+ynZzFD8VkwH8GpYR/72G8XRsEowB9g/ydub+yUKUL9UWQ3cCHf5epag==","mode":420,"size":1654},"lib/index.js":{"checkedAt":1794532093673,"integrity":"sha512-a1hiTjEfF9NTblVCB9QknHZgGAFFcUx5AvBTbHmdNtOt/o74rHFUZjXns3GXYrusYUIqezbPQUh2KuMCcNA99g==","mode":420,"size":4932},"lib/List.js":{"checkedAt":1794532093673,"integrity":"sha512-JMqyiKNhXKFPypEuWChu3Ezk6d5YwZOMMu8RYf1P2eywSApXf3FR5pLP6tiGwT21q3F4r6sgP+24LHZSOc8N3w==","mode":420,"size":15544},"lib/Num.js":{"checkedAt":1794532093673,"integrity":"sha512-Sn1B5AIxXdUZOUK8tFSoZtCnUPbwFMxKniUG2/PQjJEPakZTZTIyQAsthjLTCvuwwpnKy1tl192OOLspghSO9Q==","mode":420,"size":2469},"lib/Obj.js":{"checkedAt":1794532093673,"integrity":"sha512-4Q1y3qqlIRwq7GDI2/IktQKv19dpMZJxSFu4GesJ9Mbe2d2yUYfqQAb5jX7OP6IEXCtKze6evpd/5Zorfesh+w==","mode":420,"size":3201},"lib/Str.js":{"checkedAt":1794532093673,"integrity":"sha512-v0efqr8drBilumq/8ayoS4ssghYlP9ChihF3HKNObtAozyd708r5MEtAnynd5DB001jYrALVcP9NHPmYIUIm5A==","mode":420,"size":2104},"package.json":{"checkedAt":1794532093673,"integrity":"sha512-024Ai5qwidIktsC8W59LNqKW34fslnVCCFw3jhCV8NjCnddNQaf4k6UPEtRfpZOjdcmNYTMKwlHxvXRHWE/WCw==","mode":420,"size":1047},"CHANGELOG.md":{"checkedAt":1794532093673,"integrity":"sha512-95uU6PkXVq7Mo5z/LW7pyg+k/e+k+T1Y2lHW3VoZDuyOdAscX+Mg4hqF6ELHLgq6E+kmD5ShP7fJVfX3yMYFhA==","mode":420,"size":4123},"README.md":{"checkedAt":1794532093674,"integrity":"sha512-L3Aznq431aUYGYkTwUhq9ryR8gZVnNfeqoDif4U8j4h/p/svccmxftmlMj+TM3TM+lTFnXI7ANAPSokqrZtRew==","mode":420,"size":613}}}
@@ -0,0 +1,24 @@
import { AsnArray } from "@peculiar/asn1-schema";
/**
* ```asn1
* OtherPrimeInfo ::= SEQUENCE {
* prime INTEGER, -- ri
* exponent INTEGER, -- di
* coefficient INTEGER -- ti
* }
* ```
*/
export declare class OtherPrimeInfo {
prime: ArrayBuffer;
exponent: ArrayBuffer;
coefficient: ArrayBuffer;
constructor(params?: Partial<OtherPrimeInfo>);
}
/**
* ```asn1
* OtherPrimeInfos ::= SEQUENCE SIZE(1..MAX) OF OtherPrimeInfo
* ```
*/
export declare class OtherPrimeInfos extends AsnArray<OtherPrimeInfo> {
constructor(items?: OtherPrimeInfo[]);
}
@@ -0,0 +1,28 @@
"use strict"
module.exports = {
meta: {
docs: {
description: "disallow initializers in for-in heads.",
category: "legacy",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-initializers-in-for-in.html",
},
fixable: null,
messages: {
forbidden:
"Annex B feature the initializers in for-in heads are forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return {
"ForInStatement > VariableDeclaration.left > VariableDeclarator.declarations > *.init"(
node,
) {
context.report({ node, messageId: "forbidden" })
},
}
},
}
@@ -0,0 +1,63 @@
// Copyright (c) 2015 Ryan Prichard
//
// 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.
#ifndef WINPTY_SHARED_OS_MODULE_H
#define WINPTY_SHARED_OS_MODULE_H
#include <windows.h>
#include <string>
#include "DebugClient.h"
#include "WinptyAssert.h"
#include "WinptyException.h"
class OsModule {
HMODULE m_module;
public:
enum class LoadErrorBehavior { Abort, Throw };
OsModule(const wchar_t *fileName,
LoadErrorBehavior behavior=LoadErrorBehavior::Abort) {
m_module = LoadLibraryW(fileName);
if (behavior == LoadErrorBehavior::Abort) {
ASSERT(m_module != NULL);
} else {
if (m_module == nullptr) {
const auto err = GetLastError();
throwWindowsError(
(L"LoadLibraryW error: " + std::wstring(fileName)).c_str(),
err);
}
}
}
~OsModule() {
FreeLibrary(m_module);
}
HMODULE handle() const { return m_module; }
FARPROC proc(const char *funcName) {
FARPROC ret = GetProcAddress(m_module, funcName);
if (ret == NULL) {
trace("GetProcAddress: %s is missing", funcName);
}
return ret;
}
};
#endif // WINPTY_SHARED_OS_MODULE_H
@@ -0,0 +1,33 @@
var arrayMap = require('./_arrayMap'),
copyArray = require('./_copyArray'),
isArray = require('./isArray'),
isSymbol = require('./isSymbol'),
stringToPath = require('./_stringToPath'),
toKey = require('./_toKey'),
toString = require('./toString');
/**
* Converts `value` to a property path array.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Util
* @param {*} value The value to convert.
* @returns {Array} Returns the new property path array.
* @example
*
* _.toPath('a.b.c');
* // => ['a', 'b', 'c']
*
* _.toPath('a[0].b.c');
* // => ['a', '0', 'b', 'c']
*/
function toPath(value) {
if (isArray(value)) {
return arrayMap(value, toKey);
}
return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
}
module.exports = toPath;
@@ -0,0 +1,24 @@
# @heroui/dropdown
Displays a list of actions or options that a user can choose.
Please refer to the [documentation](https://heroui.com/docs/components/dropdown) for more information.
## Installation
```sh
yarn add @heroui/dropdown
# or
npm i @heroui/dropdown
```
## Contribution
Yes please! See the
[contributing guidelines](https://github.com/frontio-ai/heroui/blob/master/CONTRIBUTING.md)
for details.
## License
This project is licensed under the terms of the
[MIT license](https://github.com/frontio-ai/heroui/blob/master/LICENSE).
@@ -0,0 +1,3 @@
# NapCat-Types
NapCat 类型定义包,包含 NapCat 及其插件开发所需的所有类型定义。
@@ -0,0 +1,12 @@
# These are supported funding model platforms
github: [ljharb]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: npm/stop-iteration-iterator
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
@@ -0,0 +1 @@
{"mappings":";;;;;;;AAQO,MAAM,4CAAa,IAAI;AAEvB,SAAS,0CAAiB,KAAkB,EAAE,KAAa;IAChE,IAAI,OAAO,0CAAW,GAAG,CAAC;IAC1B,IAAI,CAAC,MACH,MAAM,IAAI,MAAM;IAGlB,OAAO,GAAG,KAAK,EAAE,CAAC,CAAC,EAAE,OAAO;AAC9B","sources":["packages/@react-aria/slider/src/utils.ts"],"sourcesContent":["import {SliderState} from '@react-stately/slider';\n\ninterface SliderData {\n id: string,\n 'aria-describedby'?: string,\n 'aria-details'?: string\n}\n\nexport const sliderData = new WeakMap<SliderState, SliderData>();\n\nexport function getSliderThumbId(state: SliderState, index: number) {\n let data = sliderData.get(state);\n if (!data) {\n throw new Error('Unknown slider state');\n }\n\n return `${data.id}-${index}`;\n}\n"],"names":[],"version":3,"file":"utils.main.js.map"}
@@ -0,0 +1,26 @@
{
"name": "media-typer",
"description": "Simple RFC 6838 media type parser and formatter",
"version": "0.3.0",
"author": "Douglas Christopher Wilson <doug@somethingdoug.com>",
"license": "MIT",
"repository": "jshttp/media-typer",
"devDependencies": {
"istanbul": "0.3.2",
"mocha": "~1.21.4",
"should": "~4.0.4"
},
"files": [
"LICENSE",
"HISTORY.md",
"index.js"
],
"engines": {
"node": ">= 0.6"
},
"scripts": {
"test": "mocha --reporter spec --check-leaks --bail test/",
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
}
}
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"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 0C 1C","2":"xC","4":"TC"},D:{"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 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"},E:{"1":"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 sC tC DD ED"},F:{"1":"0 1 2 3 4 5 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 m n o p q r s t u v w x y z FD GD HD ID NC uC JD OC"},G:{"1":"E LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"ZC KD vC"},H:{"2":"hD"},I:{"1":"TC J I lD vC mD nD","2":"iD jD kD"},J:{"1":"D A"},K:{"1":"H OC","2":"A B C NC uC"},L:{"1":"I"},M:{"1":"MC"},N:{"1":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"1D 2D"}},B:1,C:"contenteditable attribute (basic support)",D:true};
@@ -0,0 +1,338 @@
import { ElementType, isTag as isTagRaw } from "domelementtype";
/**
* This object will be used as the prototype for Nodes when creating a
* DOM-Level-1-compliant structure.
*/
export class Node {
constructor() {
/** Parent of the node */
this.parent = null;
/** Previous sibling */
this.prev = null;
/** Next sibling */
this.next = null;
/** The start index of the node. Requires `withStartIndices` on the handler to be `true. */
this.startIndex = null;
/** The end index of the node. Requires `withEndIndices` on the handler to be `true. */
this.endIndex = null;
}
// Read-write aliases for properties
/**
* Same as {@link parent}.
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
*/
get parentNode() {
return this.parent;
}
set parentNode(parent) {
this.parent = parent;
}
/**
* Same as {@link prev}.
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
*/
get previousSibling() {
return this.prev;
}
set previousSibling(prev) {
this.prev = prev;
}
/**
* Same as {@link next}.
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
*/
get nextSibling() {
return this.next;
}
set nextSibling(next) {
this.next = next;
}
/**
* Clone this node, and optionally its children.
*
* @param recursive Clone child nodes as well.
* @returns A clone of the node.
*/
cloneNode(recursive = false) {
return cloneNode(this, recursive);
}
}
/**
* A node that contains some data.
*/
export class DataNode extends Node {
/**
* @param data The content of the data node
*/
constructor(data) {
super();
this.data = data;
}
/**
* Same as {@link data}.
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
*/
get nodeValue() {
return this.data;
}
set nodeValue(data) {
this.data = data;
}
}
/**
* Text within the document.
*/
export class Text extends DataNode {
constructor() {
super(...arguments);
this.type = ElementType.Text;
}
get nodeType() {
return 3;
}
}
/**
* Comments within the document.
*/
export class Comment extends DataNode {
constructor() {
super(...arguments);
this.type = ElementType.Comment;
}
get nodeType() {
return 8;
}
}
/**
* Processing instructions, including doc types.
*/
export class ProcessingInstruction extends DataNode {
constructor(name, data) {
super(data);
this.name = name;
this.type = ElementType.Directive;
}
get nodeType() {
return 1;
}
}
/**
* A `Node` that can have children.
*/
export class NodeWithChildren extends Node {
/**
* @param children Children of the node. Only certain node types can have children.
*/
constructor(children) {
super();
this.children = children;
}
// Aliases
/** First child of the node. */
get firstChild() {
var _a;
return (_a = this.children[0]) !== null && _a !== void 0 ? _a : null;
}
/** Last child of the node. */
get lastChild() {
return this.children.length > 0
? this.children[this.children.length - 1]
: null;
}
/**
* Same as {@link children}.
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
*/
get childNodes() {
return this.children;
}
set childNodes(children) {
this.children = children;
}
}
export class CDATA extends NodeWithChildren {
constructor() {
super(...arguments);
this.type = ElementType.CDATA;
}
get nodeType() {
return 4;
}
}
/**
* The root node of the document.
*/
export class Document extends NodeWithChildren {
constructor() {
super(...arguments);
this.type = ElementType.Root;
}
get nodeType() {
return 9;
}
}
/**
* An element within the DOM.
*/
export class Element extends NodeWithChildren {
/**
* @param name Name of the tag, eg. `div`, `span`.
* @param attribs Object mapping attribute names to attribute values.
* @param children Children of the node.
*/
constructor(name, attribs, children = [], type = name === "script"
? ElementType.Script
: name === "style"
? ElementType.Style
: ElementType.Tag) {
super(children);
this.name = name;
this.attribs = attribs;
this.type = type;
}
get nodeType() {
return 1;
}
// DOM Level 1 aliases
/**
* Same as {@link name}.
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
*/
get tagName() {
return this.name;
}
set tagName(name) {
this.name = name;
}
get attributes() {
return Object.keys(this.attribs).map((name) => {
var _a, _b;
return ({
name,
value: this.attribs[name],
namespace: (_a = this["x-attribsNamespace"]) === null || _a === void 0 ? void 0 : _a[name],
prefix: (_b = this["x-attribsPrefix"]) === null || _b === void 0 ? void 0 : _b[name],
});
});
}
}
/**
* @param node Node to check.
* @returns `true` if the node is a `Element`, `false` otherwise.
*/
export function isTag(node) {
return isTagRaw(node);
}
/**
* @param node Node to check.
* @returns `true` if the node has the type `CDATA`, `false` otherwise.
*/
export function isCDATA(node) {
return node.type === ElementType.CDATA;
}
/**
* @param node Node to check.
* @returns `true` if the node has the type `Text`, `false` otherwise.
*/
export function isText(node) {
return node.type === ElementType.Text;
}
/**
* @param node Node to check.
* @returns `true` if the node has the type `Comment`, `false` otherwise.
*/
export function isComment(node) {
return node.type === ElementType.Comment;
}
/**
* @param node Node to check.
* @returns `true` if the node has the type `ProcessingInstruction`, `false` otherwise.
*/
export function isDirective(node) {
return node.type === ElementType.Directive;
}
/**
* @param node Node to check.
* @returns `true` if the node has the type `ProcessingInstruction`, `false` otherwise.
*/
export function isDocument(node) {
return node.type === ElementType.Root;
}
/**
* @param node Node to check.
* @returns `true` if the node has children, `false` otherwise.
*/
export function hasChildren(node) {
return Object.prototype.hasOwnProperty.call(node, "children");
}
/**
* Clone a node, and optionally its children.
*
* @param recursive Clone child nodes as well.
* @returns A clone of the node.
*/
export function cloneNode(node, recursive = false) {
let result;
if (isText(node)) {
result = new Text(node.data);
}
else if (isComment(node)) {
result = new Comment(node.data);
}
else if (isTag(node)) {
const children = recursive ? cloneChildren(node.children) : [];
const clone = new Element(node.name, { ...node.attribs }, children);
children.forEach((child) => (child.parent = clone));
if (node.namespace != null) {
clone.namespace = node.namespace;
}
if (node["x-attribsNamespace"]) {
clone["x-attribsNamespace"] = { ...node["x-attribsNamespace"] };
}
if (node["x-attribsPrefix"]) {
clone["x-attribsPrefix"] = { ...node["x-attribsPrefix"] };
}
result = clone;
}
else if (isCDATA(node)) {
const children = recursive ? cloneChildren(node.children) : [];
const clone = new CDATA(children);
children.forEach((child) => (child.parent = clone));
result = clone;
}
else if (isDocument(node)) {
const children = recursive ? cloneChildren(node.children) : [];
const clone = new Document(children);
children.forEach((child) => (child.parent = clone));
if (node["x-mode"]) {
clone["x-mode"] = node["x-mode"];
}
result = clone;
}
else if (isDirective(node)) {
const instruction = new ProcessingInstruction(node.name, node.data);
if (node["x-name"] != null) {
instruction["x-name"] = node["x-name"];
instruction["x-publicId"] = node["x-publicId"];
instruction["x-systemId"] = node["x-systemId"];
}
result = instruction;
}
else {
throw new Error(`Not implemented yet: ${node.type}`);
}
result.startIndex = node.startIndex;
result.endIndex = node.endIndex;
if (node.sourceCodeLocation != null) {
result.sourceCodeLocation = node.sourceCodeLocation;
}
return result;
}
function cloneChildren(childs) {
const children = childs.map((child) => cloneNode(child, true));
for (let i = 1; i < children.length; i++) {
children[i].prev = children[i - 1];
children[i - 1].next = children[i];
}
return children;
}
@@ -0,0 +1,24 @@
'use strict';
/***
* Convert string to hex color.
*
* @param {String} str Text to hash and convert to hex.
* @returns {String}
* @api public
*/
module.exports = function hex(str) {
for (
var i = 0, hash = 0;
i < str.length;
hash = str.charCodeAt(i++) + ((hash << 5) - hash)
);
var color = Math.floor(
Math.abs(
(Math.sin(hash) * 10000) % 1 * 16777216
)
).toString(16);
return '#' + Array(6 - color.length + 1).join('0') + color;
};
@@ -0,0 +1,15 @@
module.exports = {
"deselectedItem": (args)=>`${args.item} pole valitud.`,
"longPressToSelect": `Valikure\u{17E}iimi sisenemiseks vajutage pikalt.`,
"select": `Vali`,
"selectedAll": `K\xf5ik \xfcksused valitud.`,
"selectedCount": (args, formatter)=>`${formatter.plural(args.count, {
"=0": `\xdcksusi pole valitud`,
one: ()=>`${formatter.number(args.count)} \xfcksus valitud`,
other: ()=>`${formatter.number(args.count)} \xfcksust valitud`
})}.`,
"selectedItem": (args)=>`${args.item} valitud.`
};
//# sourceMappingURL=et-EE.main.js.map
@@ -0,0 +1,14 @@
module.exports = {
"ascending": `artan s\u{131}rada`,
"ascendingSort": (args)=>`${args.columnName} s\xfctuna g\xf6re artan d\xfczende s\u{131}rala`,
"columnSize": (args)=>`${args.value} piksel`,
"descending": `azalan s\u{131}rada`,
"descendingSort": (args)=>`${args.columnName} s\xfctuna g\xf6re azalan d\xfczende s\u{131}rala`,
"resizerDescription": `Yeniden boyutland\u{131}rmak i\xe7in Enter'a bas\u{131}n`,
"select": `Se\xe7`,
"selectAll": `T\xfcm\xfcn\xfc Se\xe7`,
"sortable": `S\u{131}ralanabilir s\xfctun`
};
//# sourceMappingURL=tr-TR.main.js.map
@@ -0,0 +1 @@
{"mappings":";AAAA,4BAAiB;IAAG,eAAe,CAAC,WAAW,CAAC;AAChD","sources":["packages/@react-aria/breadcrumbs/intl/cs-CZ.json"],"sourcesContent":["{\n \"breadcrumbs\": \"Popis cesty\"\n}\n"],"names":[],"version":3,"file":"cs-CZ.module.js.map"}
@@ -0,0 +1,25 @@
var $38effb299000faaf$exports = require("./useTreeState.main.js");
var $fae56b53b03726ff$exports = require("./TreeCollection.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, "useTreeState", () => $38effb299000faaf$exports.useTreeState);
$parcel$export(module.exports, "TreeCollection", () => $fae56b53b03726ff$exports.TreeCollection);
/*
* 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.
*/
//# sourceMappingURL=main.js.map
@@ -0,0 +1,368 @@
/**
* @fileoverview enforce consistent line breaks inside function parentheses
* @author Teddy Katz
* @deprecated in ESLint v8.53.0
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "11.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "function-paren-newline",
url: "https://eslint.style/rules/function-paren-newline",
},
},
],
},
type: "layout",
docs: {
description:
"Enforce consistent line breaks inside function parentheses",
recommended: false,
url: "https://eslint.org/docs/latest/rules/function-paren-newline",
},
fixable: "whitespace",
schema: [
{
oneOf: [
{
enum: [
"always",
"never",
"consistent",
"multiline",
"multiline-arguments",
],
},
{
type: "object",
properties: {
minItems: {
type: "integer",
minimum: 0,
},
},
additionalProperties: false,
},
],
},
],
messages: {
expectedBefore: "Expected newline before ')'.",
expectedAfter: "Expected newline after '('.",
expectedBetween: "Expected newline between arguments/params.",
unexpectedBefore: "Unexpected newline before ')'.",
unexpectedAfter: "Unexpected newline after '('.",
},
},
create(context) {
const sourceCode = context.sourceCode;
const rawOption = context.options[0] || "multiline";
const multilineOption = rawOption === "multiline";
const multilineArgumentsOption = rawOption === "multiline-arguments";
const consistentOption = rawOption === "consistent";
let minItems;
if (typeof rawOption === "object") {
minItems = rawOption.minItems;
} else if (rawOption === "always") {
minItems = 0;
} else if (rawOption === "never") {
minItems = Infinity;
} else {
minItems = null;
}
//----------------------------------------------------------------------
// Helpers
//----------------------------------------------------------------------
/**
* Determines whether there should be newlines inside function parens
* @param {ASTNode[]} elements The arguments or parameters in the list
* @param {boolean} hasLeftNewline `true` if the left paren has a newline in the current code.
* @returns {boolean} `true` if there should be newlines inside the function parens
*/
function shouldHaveNewlines(elements, hasLeftNewline) {
if (multilineArgumentsOption && elements.length === 1) {
return hasLeftNewline;
}
if (multilineOption || multilineArgumentsOption) {
return elements.some(
(element, index) =>
index !== elements.length - 1 &&
element.loc.end.line !==
elements[index + 1].loc.start.line,
);
}
if (consistentOption) {
return hasLeftNewline;
}
return elements.length >= minItems;
}
/**
* Validates parens
* @param {Object} parens An object with keys `leftParen` for the left paren token, and `rightParen` for the right paren token
* @param {ASTNode[]} elements The arguments or parameters in the list
* @returns {void}
*/
function validateParens(parens, elements) {
const leftParen = parens.leftParen;
const rightParen = parens.rightParen;
const tokenAfterLeftParen = sourceCode.getTokenAfter(leftParen);
const tokenBeforeRightParen = sourceCode.getTokenBefore(rightParen);
const hasLeftNewline = !astUtils.isTokenOnSameLine(
leftParen,
tokenAfterLeftParen,
);
const hasRightNewline = !astUtils.isTokenOnSameLine(
tokenBeforeRightParen,
rightParen,
);
const needsNewlines = shouldHaveNewlines(elements, hasLeftNewline);
if (hasLeftNewline && !needsNewlines) {
context.report({
node: leftParen,
messageId: "unexpectedAfter",
fix(fixer) {
return sourceCode
.getText()
.slice(
leftParen.range[1],
tokenAfterLeftParen.range[0],
)
.trim()
? // If there is a comment between the ( and the first element, don't do a fix.
null
: fixer.removeRange([
leftParen.range[1],
tokenAfterLeftParen.range[0],
]);
},
});
} else if (!hasLeftNewline && needsNewlines) {
context.report({
node: leftParen,
messageId: "expectedAfter",
fix: fixer => fixer.insertTextAfter(leftParen, "\n"),
});
}
if (hasRightNewline && !needsNewlines) {
context.report({
node: rightParen,
messageId: "unexpectedBefore",
fix(fixer) {
return sourceCode
.getText()
.slice(
tokenBeforeRightParen.range[1],
rightParen.range[0],
)
.trim()
? // If there is a comment between the last element and the ), don't do a fix.
null
: fixer.removeRange([
tokenBeforeRightParen.range[1],
rightParen.range[0],
]);
},
});
} else if (!hasRightNewline && needsNewlines) {
context.report({
node: rightParen,
messageId: "expectedBefore",
fix: fixer => fixer.insertTextBefore(rightParen, "\n"),
});
}
}
/**
* Validates a list of arguments or parameters
* @param {Object} parens An object with keys `leftParen` for the left paren token, and `rightParen` for the right paren token
* @param {ASTNode[]} elements The arguments or parameters in the list
* @returns {void}
*/
function validateArguments(parens, elements) {
const leftParen = parens.leftParen;
const tokenAfterLeftParen = sourceCode.getTokenAfter(leftParen);
const hasLeftNewline = !astUtils.isTokenOnSameLine(
leftParen,
tokenAfterLeftParen,
);
const needsNewlines = shouldHaveNewlines(elements, hasLeftNewline);
for (let i = 0; i <= elements.length - 2; i++) {
const currentElement = elements[i];
const nextElement = elements[i + 1];
const hasNewLine =
currentElement.loc.end.line !== nextElement.loc.start.line;
if (!hasNewLine && needsNewlines) {
context.report({
node: currentElement,
messageId: "expectedBetween",
fix: fixer => fixer.insertTextBefore(nextElement, "\n"),
});
}
}
}
/**
* Gets the left paren and right paren tokens of a node.
* @param {ASTNode} node The node with parens
* @throws {TypeError} Unexpected node type.
* @returns {Object} An object with keys `leftParen` for the left paren token, and `rightParen` for the right paren token.
* Can also return `null` if an expression has no parens (e.g. a NewExpression with no arguments, or an ArrowFunctionExpression
* with a single parameter)
*/
function getParenTokens(node) {
switch (node.type) {
case "NewExpression":
if (
!node.arguments.length &&
!(
astUtils.isOpeningParenToken(
sourceCode.getLastToken(node, { skip: 1 }),
) &&
astUtils.isClosingParenToken(
sourceCode.getLastToken(node),
) &&
node.callee.range[1] < node.range[1]
)
) {
// If the NewExpression does not have parens (e.g. `new Foo`), return null.
return null;
}
// falls through
case "CallExpression":
return {
leftParen: sourceCode.getTokenAfter(
node.callee,
astUtils.isOpeningParenToken,
),
rightParen: sourceCode.getLastToken(node),
};
case "FunctionDeclaration":
case "FunctionExpression": {
const leftParen = sourceCode.getFirstToken(
node,
astUtils.isOpeningParenToken,
);
const rightParen = node.params.length
? sourceCode.getTokenAfter(
node.params.at(-1),
astUtils.isClosingParenToken,
)
: sourceCode.getTokenAfter(leftParen);
return { leftParen, rightParen };
}
case "ArrowFunctionExpression": {
const firstToken = sourceCode.getFirstToken(node, {
skip: node.async ? 1 : 0,
});
if (!astUtils.isOpeningParenToken(firstToken)) {
// If the ArrowFunctionExpression has a single param without parens, return null.
return null;
}
const rightParen = node.params.length
? sourceCode.getTokenAfter(
node.params.at(-1),
astUtils.isClosingParenToken,
)
: sourceCode.getTokenAfter(firstToken);
return {
leftParen: firstToken,
rightParen,
};
}
case "ImportExpression": {
const leftParen = sourceCode.getFirstToken(node, 1);
const rightParen = sourceCode.getLastToken(node);
return { leftParen, rightParen };
}
default:
throw new TypeError(
`unexpected node with type ${node.type}`,
);
}
}
//----------------------------------------------------------------------
// Public
//----------------------------------------------------------------------
return {
[[
"ArrowFunctionExpression",
"CallExpression",
"FunctionDeclaration",
"FunctionExpression",
"ImportExpression",
"NewExpression",
]](node) {
const parens = getParenTokens(node);
let params;
if (node.type === "ImportExpression") {
params = [node.source];
} else if (astUtils.isFunction(node)) {
params = node.params;
} else {
params = node.arguments;
}
if (parens) {
validateParens(parens, params);
if (multilineArgumentsOption) {
validateArguments(parens, params);
}
}
},
};
},
};
@@ -0,0 +1,22 @@
The MIT License
Copyright (c) 2015 Kyle E. Mitchell & other authors listed in AUTHORS
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,93 @@
var $468c774d7db917b7$exports = require("./useCheckbox.main.js");
var $64fc3370e682155f$exports = require("./utils.main.js");
var $2Rh3D$reactstatelyform = require("@react-stately/form");
var $2Rh3D$react = require("react");
var $2Rh3D$reactstatelytoggle = require("@react-stately/toggle");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "useCheckboxGroupItem", () => $07e03121d6ac83c8$export$353b32fc6898d37d);
/*
* 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 $07e03121d6ac83c8$export$353b32fc6898d37d(props, state, inputRef) {
const toggleState = (0, $2Rh3D$reactstatelytoggle.useToggleState)({
isReadOnly: props.isReadOnly || state.isReadOnly,
isSelected: state.isSelected(props.value),
defaultSelected: state.defaultValue.includes(props.value),
onChange (isSelected) {
if (isSelected) state.addValue(props.value);
else state.removeValue(props.value);
if (props.onChange) props.onChange(isSelected);
}
});
let { name: name, form: form, descriptionId: descriptionId, errorMessageId: errorMessageId, validationBehavior: validationBehavior } = (0, $64fc3370e682155f$exports.checkboxGroupData).get(state);
var _props_validationBehavior;
validationBehavior = (_props_validationBehavior = props.validationBehavior) !== null && _props_validationBehavior !== void 0 ? _props_validationBehavior : validationBehavior;
// Local validation for this checkbox.
let { realtimeValidation: realtimeValidation } = (0, $2Rh3D$reactstatelyform.useFormValidationState)({
...props,
value: toggleState.isSelected,
// Server validation is handled at the group level.
name: undefined,
validationBehavior: 'aria'
});
// Update the checkbox group state when realtime validation changes.
let nativeValidation = (0, $2Rh3D$react.useRef)((0, $2Rh3D$reactstatelyform.DEFAULT_VALIDATION_RESULT));
let updateValidation = ()=>{
state.setInvalid(props.value, realtimeValidation.isInvalid ? realtimeValidation : nativeValidation.current);
};
(0, $2Rh3D$react.useEffect)(updateValidation);
// Combine group and checkbox level validation.
let combinedRealtimeValidation = state.realtimeValidation.isInvalid ? state.realtimeValidation : realtimeValidation;
let displayValidation = validationBehavior === 'native' ? state.displayValidation : combinedRealtimeValidation;
var _props_isRequired;
let res = (0, $468c774d7db917b7$exports.useCheckbox)({
...props,
isReadOnly: props.isReadOnly || state.isReadOnly,
isDisabled: props.isDisabled || state.isDisabled,
name: props.name || name,
form: props.form || form,
isRequired: (_props_isRequired = props.isRequired) !== null && _props_isRequired !== void 0 ? _props_isRequired : state.isRequired,
validationBehavior: validationBehavior,
[(0, $2Rh3D$reactstatelyform.privateValidationStateProp)]: {
realtimeValidation: combinedRealtimeValidation,
displayValidation: displayValidation,
resetValidation: state.resetValidation,
commitValidation: state.commitValidation,
updateValidation (v) {
nativeValidation.current = v;
updateValidation();
}
}
}, toggleState, inputRef);
return {
...res,
inputProps: {
...res.inputProps,
'aria-describedby': [
props['aria-describedby'],
state.isInvalid ? errorMessageId : null,
descriptionId
].filter(Boolean).join(' ') || undefined
}
};
}
//# sourceMappingURL=useCheckboxGroupItem.main.js.map
@@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _buildMatchMemberExpression = require("../buildMatchMemberExpression.js");
const isReactComponent = (0, _buildMatchMemberExpression.default)("React.Component");
var _default = exports.default = isReactComponent;
//# sourceMappingURL=isReactComponent.js.map
@@ -0,0 +1,39 @@
import { OneBotAction } from '../../action/OneBotAction';
import { Static } from '@sinclair/typebox';
declare const PayloadSchema: import("@sinclair/typebox").TObject<{
group_id: import("@sinclair/typebox").TString;
album_id: import("@sinclair/typebox").TString;
attach_info: import("@sinclair/typebox").TString;
}>;
type PayloadType = Static<typeof PayloadSchema>;
declare const ReturnSchema: import("@sinclair/typebox").TAny;
type ReturnType = Static<typeof ReturnSchema>;
export declare class GetGroupAlbumMediaList extends OneBotAction<PayloadType, ReturnType> {
actionName: "get_group_album_media_list";
actionSummary: string;
actionTags: string[];
payloadExample: {
group_id: string;
album_id: string;
};
returnExample: {
media_list: {
media_id: string;
url: string;
}[];
};
payloadSchema: import("@sinclair/typebox").TObject<{
group_id: import("@sinclair/typebox").TString;
album_id: import("@sinclair/typebox").TString;
attach_info: import("@sinclair/typebox").TString;
}>;
returnSchema: import("@sinclair/typebox").TAny;
_handle(payload: PayloadType): Promise<{
seq: number;
result: number;
errMs: string;
trace_id: string;
request_time_line: unknown;
}>;
}
export {};
@@ -0,0 +1,195 @@
const flagSymbol = Symbol('arg flag');
class ArgError extends Error {
constructor(msg, code) {
super(msg);
this.name = 'ArgError';
this.code = code;
Object.setPrototypeOf(this, ArgError.prototype);
}
}
function arg(
opts,
{
argv = process.argv.slice(2),
permissive = false,
stopAtPositional = false
} = {}
) {
if (!opts) {
throw new ArgError(
'argument specification object is required',
'ARG_CONFIG_NO_SPEC'
);
}
const result = { _: [] };
const aliases = {};
const handlers = {};
for (const key of Object.keys(opts)) {
if (!key) {
throw new ArgError(
'argument key cannot be an empty string',
'ARG_CONFIG_EMPTY_KEY'
);
}
if (key[0] !== '-') {
throw new ArgError(
`argument key must start with '-' but found: '${key}'`,
'ARG_CONFIG_NONOPT_KEY'
);
}
if (key.length === 1) {
throw new ArgError(
`argument key must have a name; singular '-' keys are not allowed: ${key}`,
'ARG_CONFIG_NONAME_KEY'
);
}
if (typeof opts[key] === 'string') {
aliases[key] = opts[key];
continue;
}
let type = opts[key];
let isFlag = false;
if (
Array.isArray(type) &&
type.length === 1 &&
typeof type[0] === 'function'
) {
const [fn] = type;
type = (value, name, prev = []) => {
prev.push(fn(value, name, prev[prev.length - 1]));
return prev;
};
isFlag = fn === Boolean || fn[flagSymbol] === true;
} else if (typeof type === 'function') {
isFlag = type === Boolean || type[flagSymbol] === true;
} else {
throw new ArgError(
`type missing or not a function or valid array type: ${key}`,
'ARG_CONFIG_VAD_TYPE'
);
}
if (key[1] !== '-' && key.length > 2) {
throw new ArgError(
`short argument keys (with a single hyphen) must have only one character: ${key}`,
'ARG_CONFIG_SHORTOPT_TOOLONG'
);
}
handlers[key] = [type, isFlag];
}
for (let i = 0, len = argv.length; i < len; i++) {
const wholeArg = argv[i];
if (stopAtPositional && result._.length > 0) {
result._ = result._.concat(argv.slice(i));
break;
}
if (wholeArg === '--') {
result._ = result._.concat(argv.slice(i + 1));
break;
}
if (wholeArg.length > 1 && wholeArg[0] === '-') {
/* eslint-disable operator-linebreak */
const separatedArguments =
wholeArg[1] === '-' || wholeArg.length === 2
? [wholeArg]
: wholeArg
.slice(1)
.split('')
.map((a) => `-${a}`);
/* eslint-enable operator-linebreak */
for (let j = 0; j < separatedArguments.length; j++) {
const arg = separatedArguments[j];
const [originalArgName, argStr] =
arg[1] === '-' ? arg.split(/=(.*)/, 2) : [arg, undefined];
let argName = originalArgName;
while (argName in aliases) {
argName = aliases[argName];
}
if (!(argName in handlers)) {
if (permissive) {
result._.push(arg);
continue;
} else {
throw new ArgError(
`unknown or unexpected option: ${originalArgName}`,
'ARG_UNKNOWN_OPTION'
);
}
}
const [type, isFlag] = handlers[argName];
if (!isFlag && j + 1 < separatedArguments.length) {
throw new ArgError(
`option requires argument (but was followed by another short argument): ${originalArgName}`,
'ARG_MISSING_REQUIRED_SHORTARG'
);
}
if (isFlag) {
result[argName] = type(true, argName, result[argName]);
} else if (argStr === undefined) {
if (
argv.length < i + 2 ||
(argv[i + 1].length > 1 &&
argv[i + 1][0] === '-' &&
!(
argv[i + 1].match(/^-?\d*(\.(?=\d))?\d*$/) &&
(type === Number ||
// eslint-disable-next-line no-undef
(typeof BigInt !== 'undefined' && type === BigInt))
))
) {
const extended =
originalArgName === argName ? '' : ` (alias for ${argName})`;
throw new ArgError(
`option requires argument: ${originalArgName}${extended}`,
'ARG_MISSING_REQUIRED_LONGARG'
);
}
result[argName] = type(argv[i + 1], argName, result[argName]);
++i;
} else {
result[argName] = type(argStr, argName, result[argName]);
}
}
} else {
result._.push(wholeArg);
}
}
return result;
}
arg.flag = (fn) => {
fn[flagSymbol] = true;
return fn;
};
// Utility types
arg.COUNT = arg.flag((v, name, existingCount) => (existingCount || 0) + 1);
// Expose error class
arg.ArgError = ArgError;
module.exports = arg;
@@ -0,0 +1 @@
{"version":3,"file":"parchment.js","sources":["../src/scope.ts","../src/attributor/attributor.ts","../src/error.ts","../src/registry.ts","../src/attributor/class.ts","../src/attributor/style.ts","../src/attributor/store.ts","../src/blot/abstract/shadow.ts","../src/blot/abstract/leaf.ts","../src/collection/linked-list.ts","../src/blot/abstract/parent.ts","../src/blot/inline.ts","../src/blot/block.ts","../src/blot/abstract/container.ts","../src/blot/embed.ts","../src/blot/scroll.ts","../src/blot/text.ts"],"sourcesContent":["enum Scope {\n TYPE = (1 << 2) - 1, // 0011 Lower two bits\n LEVEL = ((1 << 2) - 1) << 2, // 1100 Higher two bits\n\n ATTRIBUTE = (1 << 0) | LEVEL, // 1101\n BLOT = (1 << 1) | LEVEL, // 1110\n INLINE = (1 << 2) | TYPE, // 0111\n BLOCK = (1 << 3) | TYPE, // 1011\n\n BLOCK_BLOT = BLOCK & BLOT, // 1010\n INLINE_BLOT = INLINE & BLOT, // 0110\n BLOCK_ATTRIBUTE = BLOCK & ATTRIBUTE, // 1001\n INLINE_ATTRIBUTE = INLINE & ATTRIBUTE, // 0101\n\n ANY = TYPE | LEVEL,\n}\n\nexport default Scope;\n","import Scope from '../scope.js';\n\nexport interface AttributorOptions {\n scope?: Scope;\n whitelist?: string[];\n}\n\nexport default class Attributor {\n public static keys(node: HTMLElement): string[] {\n return Array.from(node.attributes).map((item: Attr) => item.name);\n }\n\n public scope: Scope;\n public whitelist: string[] | undefined;\n\n constructor(\n public readonly attrName: string,\n public readonly keyName: string,\n options: AttributorOptions = {},\n ) {\n const attributeBit = Scope.TYPE & Scope.ATTRIBUTE;\n this.scope =\n options.scope != null\n ? // Ignore type bits, force attribute bit\n (options.scope & Scope.LEVEL) | attributeBit\n : Scope.ATTRIBUTE;\n if (options.whitelist != null) {\n this.whitelist = options.whitelist;\n }\n }\n\n public add(node: HTMLElement, value: any): boolean {\n if (!this.canAdd(node, value)) {\n return false;\n }\n node.setAttribute(this.keyName, value);\n return true;\n }\n\n public canAdd(_node: HTMLElement, value: any): boolean {\n if (this.whitelist == null) {\n return true;\n }\n if (typeof value === 'string') {\n return this.whitelist.indexOf(value.replace(/[\"']/g, '')) > -1;\n } else {\n return this.whitelist.indexOf(value) > -1;\n }\n }\n\n public remove(node: HTMLElement): void {\n node.removeAttribute(this.keyName);\n }\n\n public value(node: HTMLElement): any {\n const value = node.getAttribute(this.keyName);\n if (this.canAdd(node, value) && value) {\n return value;\n }\n return '';\n }\n}\n","export default class ParchmentError extends Error {\n public message: string;\n public name: string;\n public stack!: string;\n\n constructor(message: string) {\n message = '[Parchment] ' + message;\n super(message);\n this.message = message;\n this.name = this.constructor.name;\n }\n}\n","import Attributor from './attributor/attributor.js';\nimport {\n type Blot,\n type BlotConstructor,\n type Root,\n} from './blot/abstract/blot.js';\nimport ParchmentError from './error.js';\nimport Scope from './scope.js';\n\nexport type RegistryDefinition = Attributor | BlotConstructor;\n\nexport interface RegistryInterface {\n create(scroll: Root, input: Node | string | Scope, value?: any): Blot;\n query(query: string | Node | Scope, scope: Scope): RegistryDefinition | null;\n register(...definitions: any[]): any;\n}\n\nexport default class Registry implements RegistryInterface {\n public static blots = new WeakMap<Node, Blot>();\n\n public static find(node?: Node | null, bubble = false): Blot | null {\n if (node == null) {\n return null;\n }\n if (this.blots.has(node)) {\n return this.blots.get(node) || null;\n }\n if (bubble) {\n let parentNode: Node | null = null;\n try {\n parentNode = node.parentNode;\n } catch (err) {\n // Probably hit a permission denied error.\n // A known case is in Firefox, event targets can be anonymous DIVs\n // inside an input element.\n // https://bugzilla.mozilla.org/show_bug.cgi?id=208427\n return null;\n }\n return this.find(parentNode, bubble);\n }\n return null;\n }\n\n private attributes: { [key: string]: Attributor } = {};\n private classes: { [key: string]: BlotConstructor } = {};\n private tags: { [key: string]: BlotConstructor } = {};\n private types: { [key: string]: RegistryDefinition } = {};\n\n public create(scroll: Root, input: Node | string | Scope, value?: any): Blot {\n const match = this.query(input);\n if (match == null) {\n throw new ParchmentError(`Unable to create ${input} blot`);\n }\n const blotClass = match as BlotConstructor;\n const node =\n // @ts-expect-error Fix me later\n input instanceof Node || input.nodeType === Node.TEXT_NODE\n ? input\n : blotClass.create(value);\n\n const blot = nLine truncated
@@ -0,0 +1,46 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
const { getSourceCode } = require("eslint-compat-utils")
module.exports = {
meta: {
docs: {
description: "disallow the `Array.from` method.",
category: "ES2015",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-array-from.html",
},
fixable: null,
messages: {
forbidden: "ES2015 '{{name}}' method is forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return {
"Program:exit"(program) {
const sourceCode = getSourceCode(context)
const tracker = new ReferenceTracker(
sourceCode.getScope(program),
)
for (const { node, path } of tracker.iterateGlobalReferences({
Array: {
from: { [READ]: true },
},
})) {
context.report({
node,
messageId: "forbidden",
data: { name: path.join(".") },
})
}
},
}
},
}
@@ -0,0 +1,26 @@
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
export {
__commonJS,
__toESM
};
@@ -0,0 +1,75 @@
const getParentElement = element => element.parentElement || element.getRootNode().host || null;
const getElementRect = element => {
const rect = element.getBoundingClientRect();
const scaleX = 'offsetWidth' in element && Math.abs(rect.width) / element.offsetWidth || 1;
const scaleY = 'offsetHeight' in element && Math.abs(rect.height) / element.offsetHeight || 1;
return {
top: rect.top,
right: rect.left + element.clientWidth * scaleX,
bottom: rect.top + element.clientHeight * scaleY,
left: rect.left
};
};
const paddingValueToInt = value => {
const number = parseInt(value, 10);
return Number.isNaN(number) ? 0 : number;
};
// Follow the steps described in https://www.w3.org/TR/cssom-view-1/#element-scrolling-members,
// assuming that the scroll option is set to 'nearest'.
const getScrollDistance = (targetStart, targetEnd, scrollStart, scrollEnd, scrollPaddingStart, scrollPaddingEnd) => {
if (targetStart < scrollStart && targetEnd > scrollEnd) {
return 0;
}
if (targetStart < scrollStart) {
return -(scrollStart - targetStart + scrollPaddingStart);
}
if (targetEnd > scrollEnd) {
return targetEnd - targetStart > scrollEnd - scrollStart ? targetStart + scrollPaddingStart - scrollStart : targetEnd - scrollEnd + scrollPaddingEnd;
}
return 0;
};
const scrollRectIntoView = (root, targetRect) => {
const document = root.ownerDocument;
let rect = targetRect;
let current = root;
while (current) {
const isDocumentBody = current === document.body;
const bounding = isDocumentBody ? {
top: 0,
right: window.visualViewport?.width ?? document.documentElement.clientWidth,
bottom: window.visualViewport?.height ?? document.documentElement.clientHeight,
left: 0
} : getElementRect(current);
const style = getComputedStyle(current);
const scrollDistanceX = getScrollDistance(rect.left, rect.right, bounding.left, bounding.right, paddingValueToInt(style.scrollPaddingLeft), paddingValueToInt(style.scrollPaddingRight));
const scrollDistanceY = getScrollDistance(rect.top, rect.bottom, bounding.top, bounding.bottom, paddingValueToInt(style.scrollPaddingTop), paddingValueToInt(style.scrollPaddingBottom));
if (scrollDistanceX || scrollDistanceY) {
if (isDocumentBody) {
document.defaultView?.scrollBy(scrollDistanceX, scrollDistanceY);
} else {
const {
scrollLeft,
scrollTop
} = current;
if (scrollDistanceY) {
current.scrollTop += scrollDistanceY;
}
if (scrollDistanceX) {
current.scrollLeft += scrollDistanceX;
}
const scrolledLeft = current.scrollLeft - scrollLeft;
const scrolledTop = current.scrollTop - scrollTop;
rect = {
left: rect.left - scrolledLeft,
top: rect.top - scrolledTop,
right: rect.right - scrolledLeft,
bottom: rect.bottom - scrolledTop
};
}
}
current = isDocumentBody || style.position === 'fixed' ? null : getParentElement(current);
}
};
export default scrollRectIntoView;
//# sourceMappingURL=scrollRectIntoView.js.map
@@ -0,0 +1,76 @@
## Nan::Callback
`Nan::Callback` makes it easier to use `v8::Function` handles as callbacks. A class that wraps a `v8::Function` handle, protecting it from garbage collection and making it particularly useful for storage and use across asynchronous execution.
- <a href="#api_nan_callback"><b><code>Nan::Callback</code></b></a>
<a name="api_nan_callback"></a>
### Nan::Callback
```c++
class Callback {
public:
Callback();
explicit Callback(const v8::Local<v8::Function> &fn);
~Callback();
bool operator==(const Callback &other) const;
bool operator!=(const Callback &other) const;
v8::Local<v8::Function> operator*() const;
MaybeLocal<v8::Value> operator()(AsyncResource* async_resource,
v8::Local<v8::Object> target,
int argc = 0,
v8::Local<v8::Value> argv[] = 0) const;
MaybeLocal<v8::Value> operator()(AsyncResource* async_resource,
int argc = 0,
v8::Local<v8::Value> argv[] = 0) const;
void SetFunction(const v8::Local<v8::Function> &fn);
v8::Local<v8::Function> GetFunction() const;
bool IsEmpty() const;
void Reset(const v8::Local<v8::Function> &fn);
void Reset();
MaybeLocal<v8::Value> Call(v8::Local<v8::Object> target,
int argc,
v8::Local<v8::Value> argv[],
AsyncResource* async_resource) const;
MaybeLocal<v8::Value> Call(int argc,
v8::Local<v8::Value> argv[],
AsyncResource* async_resource) const;
// Deprecated versions. Use the versions that accept an async_resource instead
// as they run the callback in the correct async context as specified by the
// resource. If you want to call a synchronous JS function (i.e. on a
// non-empty JS stack), you can use Nan::Call instead.
v8::Local<v8::Value> operator()(v8::Local<v8::Object> target,
int argc = 0,
v8::Local<v8::Value> argv[] = 0) const;
v8::Local<v8::Value> operator()(int argc = 0,
v8::Local<v8::Value> argv[] = 0) const;
v8::Local<v8::Value> Call(v8::Local<v8::Object> target,
int argc,
v8::Local<v8::Value> argv[]) const;
v8::Local<v8::Value> Call(int argc, v8::Local<v8::Value> argv[]) const;
};
```
Example usage:
```c++
v8::Local<v8::Function> function;
Nan::Callback callback(function);
callback.Call(0, 0);
```
@@ -0,0 +1 @@
{"version":3,"file":"PluginContext.js","sourceRoot":"","sources":["../../../../src/plugin/models/PluginContext.ts"],"names":[],"mappings":""}
@@ -0,0 +1,45 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
const { getSourceCode } = require("eslint-compat-utils")
const { getRegExpCalls } = require("../utils")
module.exports = {
meta: {
docs: {
description: "disallow RegExp `y` flag.",
category: "ES2015",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-regexp-y-flag.html",
},
fixable: null,
messages: {
forbidden: "ES2015 RegExp 'y' flag is forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return {
"Literal[regex]"(node) {
if (node.regex.flags.includes("y")) {
context.report({ node, messageId: "forbidden" })
}
},
"Program:exit"(program) {
const sourceCode = getSourceCode(context)
const scope = sourceCode.getScope(program)
for (const { node, flags } of getRegExpCalls(scope)) {
if (flags && flags.includes("y")) {
context.report({ node, messageId: "forbidden" })
}
}
},
}
},
}
@@ -0,0 +1,17 @@
import { ClientRect } from '../../types';
interface PositionalCoordinates extends Pick<ClientRect, 'top' | 'left' | 'right' | 'bottom'> {
}
export declare function getScrollDirectionAndSpeed(scrollContainer: Element, scrollContainerRect: ClientRect, { top, left, right, bottom }: PositionalCoordinates, acceleration?: number, thresholdPercentage?: {
x: number;
y: number;
}): {
direction: {
x: number;
y: number;
};
speed: {
x: number;
y: number;
};
};
export {};
@@ -0,0 +1,257 @@
'use strict'
const util = require('util')
const pMap = require('p-map')
const contentPath = require('./content/path')
const fixOwner = require('./util/fix-owner')
const fs = require('@npmcli/fs')
const fsm = require('fs-minipass')
const glob = util.promisify(require('glob'))
const index = require('./entry-index')
const path = require('path')
const rimraf = util.promisify(require('rimraf'))
const ssri = require('ssri')
const globify = pattern => pattern.split('\\').join('/')
const hasOwnProperty = (obj, key) =>
Object.prototype.hasOwnProperty.call(obj, key)
const verifyOpts = (opts) => ({
concurrency: 20,
log: { silly () {} },
...opts,
})
module.exports = verify
async function verify (cache, opts) {
opts = verifyOpts(opts)
opts.log.silly('verify', 'verifying cache at', cache)
const steps = [
markStartTime,
fixPerms,
garbageCollect,
rebuildIndex,
cleanTmp,
writeVerifile,
markEndTime,
]
const stats = {}
for (const step of steps) {
const label = step.name
const start = new Date()
const s = await step(cache, opts)
if (s) {
Object.keys(s).forEach((k) => {
stats[k] = s[k]
})
}
const end = new Date()
if (!stats.runTime) {
stats.runTime = {}
}
stats.runTime[label] = end - start
}
stats.runTime.total = stats.endTime - stats.startTime
opts.log.silly(
'verify',
'verification finished for',
cache,
'in',
`${stats.runTime.total}ms`
)
return stats
}
async function markStartTime (cache, opts) {
return { startTime: new Date() }
}
async function markEndTime (cache, opts) {
return { endTime: new Date() }
}
async function fixPerms (cache, opts) {
opts.log.silly('verify', 'fixing cache permissions')
await fixOwner.mkdirfix(cache, cache)
// TODO - fix file permissions too
await fixOwner.chownr(cache, cache)
return null
}
// Implements a naive mark-and-sweep tracing garbage collector.
//
// The algorithm is basically as follows:
// 1. Read (and filter) all index entries ("pointers")
// 2. Mark each integrity value as "live"
// 3. Read entire filesystem tree in `content-vX/` dir
// 4. If content is live, verify its checksum and delete it if it fails
// 5. If content is not marked as live, rimraf it.
//
async function garbageCollect (cache, opts) {
opts.log.silly('verify', 'garbage collecting content')
const indexStream = index.lsStream(cache)
const liveContent = new Set()
indexStream.on('data', (entry) => {
if (opts.filter && !opts.filter(entry)) {
return
}
liveContent.add(entry.integrity.toString())
})
await new Promise((resolve, reject) => {
indexStream.on('end', resolve).on('error', reject)
})
const contentDir = contentPath.contentDir(cache)
const files = await glob(globify(path.join(contentDir, '**')), {
follow: false,
nodir: true,
nosort: true,
})
const stats = {
verifiedContent: 0,
reclaimedCount: 0,
reclaimedSize: 0,
badContentCount: 0,
keptSize: 0,
}
await pMap(
files,
async (f) => {
const split = f.split(/[/\\]/)
const digest = split.slice(split.length - 3).join('')
const algo = split[split.length - 4]
const integrity = ssri.fromHex(digest, algo)
if (liveContent.has(integrity.toString())) {
const info = await verifyContent(f, integrity)
if (!info.valid) {
stats.reclaimedCount++
stats.badContentCount++
stats.reclaimedSize += info.size
} else {
stats.verifiedContent++
stats.keptSize += info.size
}
} else {
// No entries refer to this content. We can delete.
stats.reclaimedCount++
const s = await fs.stat(f)
await rimraf(f)
stats.reclaimedSize += s.size
}
return stats
},
{ concurrency: opts.concurrency }
)
return stats
}
async function verifyContent (filepath, sri) {
const contentInfo = {}
try {
const { size } = await fs.stat(filepath)
contentInfo.size = size
contentInfo.valid = true
await ssri.checkStream(new fsm.ReadStream(filepath), sri)
} catch (err) {
if (err.code === 'ENOENT') {
return { size: 0, valid: false }
}
if (err.code !== 'EINTEGRITY') {
throw err
}
await rimraf(filepath)
contentInfo.valid = false
}
return contentInfo
}
async function rebuildIndex (cache, opts) {
opts.log.silly('verify', 'rebuilding index')
const entries = await index.ls(cache)
const stats = {
missingContent: 0,
rejectedEntries: 0,
totalEntries: 0,
}
const buckets = {}
for (const k in entries) {
/* istanbul ignore else */
if (hasOwnProperty(entries, k)) {
const hashed = index.hashKey(k)
const entry = entries[k]
const excluded = opts.filter && !opts.filter(entry)
excluded && stats.rejectedEntries++
if (buckets[hashed] && !excluded) {
buckets[hashed].push(entry)
} else if (buckets[hashed] && excluded) {
// skip
} else if (excluded) {
buckets[hashed] = []
buckets[hashed]._path = index.bucketPath(cache, k)
} else {
buckets[hashed] = [entry]
buckets[hashed]._path = index.bucketPath(cache, k)
}
}
}
await pMap(
Object.keys(buckets),
(key) => {
return rebuildBucket(cache, buckets[key], stats, opts)
},
{ concurrency: opts.concurrency }
)
return stats
}
async function rebuildBucket (cache, bucket, stats, opts) {
await fs.truncate(bucket._path)
// This needs to be serialized because cacache explicitly
// lets very racy bucket conflicts clobber each other.
for (const entry of bucket) {
const content = contentPath(cache, entry.integrity)
try {
await fs.stat(content)
await index.insert(cache, entry.key, entry.integrity, {
metadata: entry.metadata,
size: entry.size,
})
stats.totalEntries++
} catch (err) {
if (err.code === 'ENOENT') {
stats.rejectedEntries++
stats.missingContent++
} else {
throw err
}
}
}
}
function cleanTmp (cache, opts) {
opts.log.silly('verify', 'cleaning tmp directory')
return rimraf(path.join(cache, 'tmp'))
}
function writeVerifile (cache, opts) {
const verifile = path.join(cache, '_lastverified')
opts.log.silly('verify', 'writing verifile to ' + verifile)
try {
return fs.writeFile(verifile, `${Date.now()}`)
} finally {
fixOwner.chownr.sync(cache, verifile)
}
}
module.exports.lastRun = lastRun
async function lastRun (cache) {
const data = await fs.readFile(path.join(cache, '_lastverified'), { encoding: 'utf8' })
return new Date(+data)
}
@@ -0,0 +1,93 @@
{
"name": "call-bind",
"version": "1.0.8",
"description": "Robustly `.call.bind()` a function",
"main": "index.js",
"exports": {
".": "./index.js",
"./callBound": "./callBound.js",
"./package.json": "./package.json"
},
"scripts": {
"prepack": "npmignore --auto --commentLines=auto",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prepublishOnly": "safe-publish-latest",
"lint": "eslint --ext=.js,.mjs .",
"postlint": "evalmd README.md",
"pretest": "npm run lint",
"tests-only": "nyc tape 'test/**/*.js'",
"test": "npm run tests-only",
"posttest": "npx npm@'>=10.2' audit --production",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
},
"repository": {
"type": "git",
"url": "git+https://github.com/ljharb/call-bind.git"
},
"keywords": [
"javascript",
"ecmascript",
"es",
"js",
"callbind",
"callbound",
"call",
"bind",
"bound",
"call-bind",
"call-bound",
"function",
"es-abstract"
],
"author": "Jordan Harband <ljharb@gmail.com>",
"funding": {
"url": "https://github.com/sponsors/ljharb"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/ljharb/call-bind/issues"
},
"homepage": "https://github.com/ljharb/call-bind#readme",
"dependencies": {
"call-bind-apply-helpers": "^1.0.0",
"es-define-property": "^1.0.0",
"get-intrinsic": "^1.2.4",
"set-function-length": "^1.2.2"
},
"devDependencies": {
"@ljharb/eslint-config": "^21.1.1",
"auto-changelog": "^2.5.0",
"encoding": "^0.1.13",
"es-value-fixtures": "^1.5.0",
"eslint": "=8.8.0",
"evalmd": "^0.0.19",
"for-each": "^0.3.3",
"has-strict-mode": "^1.0.1",
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"object-inspect": "^1.13.3",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0"
},
"testling": {
"files": "test/index.js"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
},
"engines": {
"node": ">= 0.4"
}
}
@@ -0,0 +1 @@
{"version":3,"names":["_OverloadYield","require","_asyncGeneratorDelegate","inner","iter","waiting","pump","key","value","Promise","resolve","done","OverloadYield","Symbol","iterator","next"],"sources":["../../src/helpers/asyncGeneratorDelegate.ts"],"sourcesContent":["/* @minVersion 7.0.0-beta.0 */\n\nimport OverloadYield from \"./OverloadYield.ts\";\n\nexport default function _asyncGeneratorDelegate<T>(inner: Generator<T>) {\n var iter = {} as Generator<T>,\n // See the comment in AsyncGenerator to understand what this is.\n waiting = false;\n\n function pump(\n key: \"next\" | \"throw\" | \"return\",\n value: any,\n ): IteratorYieldResult<any> {\n waiting = true;\n value = new Promise(function (resolve) {\n resolve(inner[key](value));\n });\n return {\n done: false,\n value: new OverloadYield(value, /* kind: delegate */ 1),\n };\n }\n\n iter[\n ((typeof Symbol !== \"undefined\" && Symbol.iterator) ||\n \"@@iterator\") as typeof Symbol.iterator\n ] = function () {\n return this;\n };\n\n iter.next = function (value: any) {\n if (waiting) {\n waiting = false;\n return value;\n }\n return pump(\"next\", value);\n };\n\n if (typeof inner[\"throw\"] === \"function\") {\n iter[\"throw\"] = function (value: any) {\n if (waiting) {\n waiting = false;\n throw value;\n }\n return pump(\"throw\", value);\n };\n }\n\n if (typeof inner[\"return\"] === \"function\") {\n iter[\"return\"] = function (value: any) {\n if (waiting) {\n waiting = false;\n return value;\n }\n return pump(\"return\", value);\n };\n }\n\n return iter;\n}\n"],"mappings":";;;;;;AAEA,IAAAA,cAAA,GAAAC,OAAA;AAEe,SAASC,uBAAuBA,CAAIC,KAAmB,EAAE;EACtE,IAAIC,IAAI,GAAG,CAAC,CAAiB;IAE3BC,OAAO,GAAG,KAAK;EAEjB,SAASC,IAAIA,CACXC,GAAgC,EAChCC,KAAU,EACgB;IAC1BH,OAAO,GAAG,IAAI;IACdG,KAAK,GAAG,IAAIC,OAAO,CAAC,UAAUC,OAAO,EAAE;MACrCA,OAAO,CAACP,KAAK,CAACI,GAAG,CAAC,CAACC,KAAK,CAAC,CAAC;IAC5B,CAAC,CAAC;IACF,OAAO;MACLG,IAAI,EAAE,KAAK;MACXH,KAAK,EAAE,IAAII,sBAAa,CAACJ,KAAK,EAAuB,CAAC;IACxD,CAAC;EACH;EAEAJ,IAAI,CACA,OAAOS,MAAM,KAAK,WAAW,IAAIA,MAAM,CAACC,QAAQ,IAChD,YAAY,CACf,GAAG,YAAY;IACd,OAAO,IAAI;EACb,CAAC;EAEDV,IAAI,CAACW,IAAI,GAAG,UAAUP,KAAU,EAAE;IAChC,IAAIH,OAAO,EAAE;MACXA,OAAO,GAAG,KAAK;MACf,OAAOG,KAAK;IACd;IACA,OAAOF,IAAI,CAAC,MAAM,EAAEE,KAAK,CAAC;EAC5B,CAAC;EAED,IAAI,OAAOL,KAAK,CAAC,OAAO,CAAC,KAAK,UAAU,EAAE;IACxCC,IAAI,CAAC,OAAO,CAAC,GAAG,UAAUI,KAAU,EAAE;MACpC,IAAIH,OAAO,EAAE;QACXA,OAAO,GAAG,KAAK;QACf,MAAMG,KAAK;MACb;MACA,OAAOF,IAAI,CAAC,OAAO,EAAEE,KAAK,CAAC;IAC7B,CAAC;EACH;EAEA,IAAI,OAAOL,KAAK,CAAC,QAAQ,CAAC,KAAK,UAAU,EAAE;IACzCC,IAAI,CAAC,QAAQ,CAAC,GAAG,UAAUI,KAAU,EAAE;MACrC,IAAIH,OAAO,EAAE;QACXA,OAAO,GAAG,KAAK;QACf,OAAOG,KAAK;MACd;MACA,OAAOF,IAAI,CAAC,QAAQ,EAAEE,KAAK,CAAC;IAC9B,CAAC;EACH;EAEA,OAAOJ,IAAI;AACb","ignoreList":[]}
@@ -0,0 +1 @@
module.exports={A:{A:{"132":"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 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":"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 0C 1C","322":"hB iB jB kB lB"},D:{"1":"0 1 2 3 4 5 tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"J ZB K","16":"D","33":"6 7 8 9 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"},E:{"1":"B C L M G NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"J 2C ZC","16":"ZB","33":"K D E F A 3C 4C 5C 6C aC"},F:{"1":"0 1 2 3 4 5 gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"F B C FD GD HD ID NC uC JD OC","33":"6 7 8 9 G N O P aB AB BB CB DB EB FB bB cB dB eB fB"},G:{"1":"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","33":"E LD MD ND OD PD QD RD SD"},H:{"2":"hD"},I:{"1":"I","2":"iD jD kD","33":"TC J lD vC mD nD"},J:{"33":"D A"},K:{"1":"H","2":"A B C NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"36":"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","33":"J"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"1D 2D"}},B:2,C:"CSS writing-mode property",D:true};
@@ -0,0 +1,103 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _jsxAstUtils = require("jsx-ast-utils");
var _arrayIncludes = _interopRequireDefault(require("array-includes"));
var _schemas = require("../util/schemas");
var _getElementType = _interopRequireDefault(require("../util/getElementType"));
var _isDOMElement = _interopRequireDefault(require("../util/isDOMElement"));
var _isHiddenFromScreenReader = _interopRequireDefault(require("../util/isHiddenFromScreenReader"));
var _isInteractiveElement = _interopRequireDefault(require("../util/isInteractiveElement"));
var _isInteractiveRole = _interopRequireDefault(require("../util/isInteractiveRole"));
var _mayHaveAccessibleLabel = _interopRequireDefault(require("../util/mayHaveAccessibleLabel"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
/**
* @fileoverview Enforce controls are associated with a text label.
* @author Jesse Beach
*
*
*/
// ----------------------------------------------------------------------------
// Rule Definition
// ----------------------------------------------------------------------------
var errorMessage = 'A control must be associated with a text label.';
var ignoreList = ['link'];
var schema = (0, _schemas.generateObjSchema)({
labelAttributes: _schemas.arraySchema,
controlComponents: _schemas.arraySchema,
ignoreElements: _schemas.arraySchema,
ignoreRoles: _schemas.arraySchema,
depth: {
description: 'JSX tree depth limit to check for accessible label',
type: 'integer',
minimum: 0
}
});
var _default = exports["default"] = {
meta: {
docs: {
description: 'Enforce that a control (an interactive element) has a text label.',
url: 'https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/control-has-associated-label.md'
},
schema: [schema]
},
create: function create(context) {
var elementType = (0, _getElementType["default"])(context);
var options = context.options[0] || {};
var _options$labelAttribu = options.labelAttributes,
labelAttributes = _options$labelAttribu === void 0 ? [] : _options$labelAttribu,
_options$controlCompo = options.controlComponents,
controlComponents = _options$controlCompo === void 0 ? [] : _options$controlCompo,
_options$ignoreElemen = options.ignoreElements,
ignoreElements = _options$ignoreElemen === void 0 ? [] : _options$ignoreElemen,
_options$ignoreRoles = options.ignoreRoles,
ignoreRoles = _options$ignoreRoles === void 0 ? [] : _options$ignoreRoles;
var newIgnoreElements = new Set([].concat(ignoreElements, ignoreList));
var rule = function rule(node) {
var tag = elementType(node.openingElement);
var role = (0, _jsxAstUtils.getLiteralPropValue)((0, _jsxAstUtils.getProp)(node.openingElement.attributes, 'role'));
// Ignore interactive elements that might get their label from a source
// that cannot be discerned from static analysis, like
// <label><input />Save</label>
if (newIgnoreElements.has(tag)) {
return;
}
// Ignore roles that are "interactive" but should not require a label.
if ((0, _arrayIncludes["default"])(ignoreRoles, role)) {
return;
}
var props = node.openingElement.attributes;
var nodeIsDOMElement = (0, _isDOMElement["default"])(tag);
var nodeIsHiddenFromScreenReader = (0, _isHiddenFromScreenReader["default"])(tag, props);
var nodeIsInteractiveElement = (0, _isInteractiveElement["default"])(tag, props);
var nodeIsInteractiveRole = (0, _isInteractiveRole["default"])(tag, props);
var nodeIsControlComponent = controlComponents.indexOf(tag) > -1;
if (nodeIsHiddenFromScreenReader) {
return;
}
var hasAccessibleLabel = true;
if (nodeIsInteractiveElement || nodeIsDOMElement && nodeIsInteractiveRole || nodeIsControlComponent) {
// Prevent crazy recursion.
var recursionDepth = Math.min(options.depth === undefined ? 2 : options.depth, 25);
hasAccessibleLabel = (0, _mayHaveAccessibleLabel["default"])(node, recursionDepth, labelAttributes, elementType, controlComponents);
}
if (!hasAccessibleLabel) {
context.report({
node: node.openingElement,
message: errorMessage
});
}
};
// Create visitor selectors.
return {
JSXElement: rule
};
}
};
module.exports = exports.default;
@@ -0,0 +1,10 @@
export * from "./stringify.js";
export * from "./traversal.js";
export * from "./manipulation.js";
export * from "./querying.js";
export * from "./legacy.js";
export * from "./helpers.js";
export * from "./feeds.js";
/** @deprecated Use these methods from `domhandler` directly. */
export { isTag, isCDATA, isText, isComment, isDocument, hasChildren, } from "domhandler";
//# sourceMappingURL=index.js.map
@@ -0,0 +1,19 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./optional-from-mapped-result"), exports);
__exportStar(require("./optional"), exports);
@@ -0,0 +1,363 @@
/**
* @fileoverview Rule to flag non-matching identifiers
* @author Matthieu Larcher
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
defaultOptions: [
"^.+$",
{
classFields: false,
ignoreDestructuring: false,
onlyDeclarations: false,
properties: false,
},
],
docs: {
description:
"Require identifiers to match a specified regular expression",
recommended: false,
frozen: true,
url: "https://eslint.org/docs/latest/rules/id-match",
},
schema: [
{
type: "string",
},
{
type: "object",
properties: {
properties: {
type: "boolean",
},
classFields: {
type: "boolean",
},
onlyDeclarations: {
type: "boolean",
},
ignoreDestructuring: {
type: "boolean",
},
},
additionalProperties: false,
},
],
messages: {
notMatch:
"Identifier '{{name}}' does not match the pattern '{{pattern}}'.",
notMatchPrivate:
"Identifier '#{{name}}' does not match the pattern '{{pattern}}'.",
},
},
create(context) {
//--------------------------------------------------------------------------
// Options
//--------------------------------------------------------------------------
const [
pattern,
{
classFields: checkClassFields,
ignoreDestructuring,
onlyDeclarations,
properties: checkProperties,
},
] = context.options;
const regexp = new RegExp(pattern, "u");
const sourceCode = context.sourceCode;
let globalScope;
//--------------------------------------------------------------------------
// Helpers
//--------------------------------------------------------------------------
// contains reported nodes to avoid reporting twice on destructuring with shorthand notation
const reportedNodes = new Set();
const ALLOWED_PARENT_TYPES = new Set([
"CallExpression",
"NewExpression",
]);
const DECLARATION_TYPES = new Set([
"FunctionDeclaration",
"VariableDeclarator",
]);
const IMPORT_TYPES = new Set([
"ImportSpecifier",
"ImportNamespaceSpecifier",
"ImportDefaultSpecifier",
]);
/**
* Checks whether the given node represents a reference to a global variable that is not declared in the source code.
* These identifiers will be allowed, as it is assumed that user has no control over the names of external global variables.
* @param {ASTNode} node `Identifier` node to check.
* @returns {boolean} `true` if the node is a reference to a global variable.
*/
function isReferenceToGlobalVariable(node) {
const variable = globalScope.set.get(node.name);
return (
variable &&
variable.defs.length === 0 &&
variable.references.some(ref => ref.identifier === node)
);
}
/**
* Checks if a string matches the provided pattern
* @param {string} name The string to check.
* @returns {boolean} if the string is a match
* @private
*/
function isInvalid(name) {
return !regexp.test(name);
}
/**
* Checks if a parent of a node is an ObjectPattern.
* @param {ASTNode} node The node to check.
* @returns {boolean} if the node is inside an ObjectPattern
* @private
*/
function isInsideObjectPattern(node) {
let { parent } = node;
while (parent) {
if (parent.type === "ObjectPattern") {
return true;
}
parent = parent.parent;
}
return false;
}
/**
* Verifies if we should report an error or not based on the effective
* parent node and the identifier name.
* @param {ASTNode} effectiveParent The effective parent node of the node to be reported
* @param {string} name The identifier name of the identifier node
* @returns {boolean} whether an error should be reported or not
*/
function shouldReport(effectiveParent, name) {
return (
(!onlyDeclarations ||
DECLARATION_TYPES.has(effectiveParent.type)) &&
!ALLOWED_PARENT_TYPES.has(effectiveParent.type) &&
isInvalid(name)
);
}
/**
* Reports an AST node as a rule violation.
* @param {ASTNode} node The node to report.
* @returns {void}
* @private
*/
function report(node) {
/*
* We used the range instead of the node because it's possible
* for the same identifier to be represented by two different
* nodes, with the most clear example being shorthand properties:
* { foo }
* In this case, "foo" is represented by one node for the name
* and one for the value. The only way to know they are the same
* is to look at the range.
*/
if (!reportedNodes.has(node.range.toString())) {
const messageId =
node.type === "PrivateIdentifier"
? "notMatchPrivate"
: "notMatch";
context.report({
node,
messageId,
data: {
name: node.name,
pattern,
},
});
reportedNodes.add(node.range.toString());
}
}
return {
Program(node) {
globalScope = sourceCode.getScope(node);
},
Identifier(node) {
const name = node.name,
parent = node.parent,
effectiveParent =
parent.type === "MemberExpression"
? parent.parent
: parent;
if (
isReferenceToGlobalVariable(node) ||
astUtils.isImportAttributeKey(node)
) {
return;
}
if (parent.type === "MemberExpression") {
if (!checkProperties) {
return;
}
// Always check object names
if (
parent.object.type === "Identifier" &&
parent.object.name === name
) {
if (isInvalid(name)) {
report(node);
}
// Report AssignmentExpressions left side's assigned variable id
} else if (
effectiveParent.type === "AssignmentExpression" &&
effectiveParent.left.type === "MemberExpression" &&
effectiveParent.left.property.name === node.name
) {
if (isInvalid(name)) {
report(node);
}
// Report AssignmentExpressions only if they are the left side of the assignment
} else if (
effectiveParent.type === "AssignmentExpression" &&
effectiveParent.right.type !== "MemberExpression"
) {
if (isInvalid(name)) {
report(node);
}
}
// For https://github.com/eslint/eslint/issues/15123
} else if (
parent.type === "Property" &&
parent.parent.type === "ObjectExpression" &&
parent.key === node &&
!parent.computed
) {
if (checkProperties && isInvalid(name)) {
report(node);
}
/*
* Properties have their own rules, and
* AssignmentPattern nodes can be treated like Properties:
* e.g.: const { no_camelcased = false } = bar;
*/
} else if (
parent.type === "Property" ||
parent.type === "AssignmentPattern"
) {
if (
parent.parent &&
parent.parent.type === "ObjectPattern"
) {
if (
!ignoreDestructuring &&
parent.shorthand &&
parent.value.left &&
isInvalid(name)
) {
report(node);
}
const assignmentKeyEqualsValue =
parent.key.name === parent.value.name;
// prevent checking righthand side of destructured object
if (!assignmentKeyEqualsValue && parent.key === node) {
return;
}
const valueIsInvalid =
parent.value.name && isInvalid(name);
// ignore destructuring if the option is set, unless a new identifier is created
if (
valueIsInvalid &&
!(assignmentKeyEqualsValue && ignoreDestructuring)
) {
report(node);
}
}
// never check properties or always ignore destructuring
if (
(!checkProperties && !parent.computed) ||
(ignoreDestructuring && isInsideObjectPattern(node))
) {
return;
}
// don't check right hand side of AssignmentExpression to prevent duplicate warnings
if (
parent.right !== node &&
shouldReport(effectiveParent, name)
) {
report(node);
}
// Check if it's an import specifier
} else if (IMPORT_TYPES.has(parent.type)) {
// Report only if the local imported identifier is invalid
if (
parent.local &&
parent.local.name === node.name &&
isInvalid(name)
) {
report(node);
}
} else if (parent.type === "PropertyDefinition") {
if (checkClassFields && isInvalid(name)) {
report(node);
}
// Report anything that is invalid that isn't a CallExpression
} else if (shouldReport(effectiveParent, name)) {
report(node);
}
},
PrivateIdentifier(node) {
const isClassField = node.parent.type === "PropertyDefinition";
if (isClassField && !checkClassFields) {
return;
}
if (isInvalid(node.name)) {
report(node);
}
},
};
},
};
@@ -0,0 +1,15 @@
import { __decorate } from "tslib";
import { AsnProp, AsnPropTypes } from "@peculiar/asn1-schema";
export class Attribute {
constructor(params = {}) {
this.attrType = "";
this.attrValues = [];
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: AsnPropTypes.ObjectIdentifier })
], Attribute.prototype, "attrType", void 0);
__decorate([
AsnProp({ type: AsnPropTypes.Any, repeated: "set" })
], Attribute.prototype, "attrValues", void 0);
@@ -0,0 +1 @@
{"version":3,"file":"resolveServiceDeactivations.d.ts","sourceRoot":"","sources":["../../../../src/resolution/actions/resolveServiceDeactivations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAGlE,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,kBAAkB,EAC1B,iBAAiB,EAAE,iBAAiB,GACnC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAKtB"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=LazyPlanServiceNode.spec.d.ts.map
@@ -0,0 +1,39 @@
describe('enabled', function () {
'use strict';
var assume = require('assume')
, enabled = require('./');
it('supports wildcards', function () {
var variable = 'b*';
assume(enabled('bigpipe', variable)).to.be.true();
assume(enabled('bro-fist', variable)).to.be.true();
assume(enabled('ro-fist', variable)).to.be.false();
});
it('is disabled by default', function () {
assume(enabled('bigpipe', '')).to.be.false();
assume(enabled('bigpipe', 'bigpipe')).to.be.true();
});
it('can ignore loggers using a -', function () {
var variable = 'bigpipe,-primus,sack,-other';
assume(enabled('bigpipe', variable)).to.be.true();
assume(enabled('sack', variable)).to.be.true();
assume(enabled('primus', variable)).to.be.false();
assume(enabled('other', variable)).to.be.false();
assume(enabled('unknown', variable)).to.be.false();
});
it('supports multiple ranges', function () {
var variable = 'bigpipe*,primus*';
assume(enabled('bigpipe:', variable)).to.be.true();
assume(enabled('bigpipes', variable)).to.be.true();
assume(enabled('primus:', variable)).to.be.true();
assume(enabled('primush', variable)).to.be.true();
assume(enabled('unknown', variable)).to.be.false();
});
});
@@ -0,0 +1,47 @@
var baseToString = require('./_baseToString'),
baseTrim = require('./_baseTrim'),
castSlice = require('./_castSlice'),
charsEndIndex = require('./_charsEndIndex'),
charsStartIndex = require('./_charsStartIndex'),
stringToArray = require('./_stringToArray'),
toString = require('./toString');
/**
* Removes leading and trailing whitespace or specified characters from `string`.
*
* @static
* @memberOf _
* @since 3.0.0
* @category String
* @param {string} [string=''] The string to trim.
* @param {string} [chars=whitespace] The characters to trim.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {string} Returns the trimmed string.
* @example
*
* _.trim(' abc ');
* // => 'abc'
*
* _.trim('-_-abc-_-', '_-');
* // => 'abc'
*
* _.map([' foo ', ' bar '], _.trim);
* // => ['foo', 'bar']
*/
function trim(string, chars, guard) {
string = toString(string);
if (string && (guard || chars === undefined)) {
return baseTrim(string);
}
if (!string || !(chars = baseToString(chars))) {
return string;
}
var strSymbols = stringToArray(string),
chrSymbols = stringToArray(chars),
start = charsStartIndex(strSymbols, chrSymbols),
end = charsEndIndex(strSymbols, chrSymbols) + 1;
return castSlice(strSymbols, start, end).join('');
}
module.exports = trim;
@@ -0,0 +1,3 @@
Like `chown -R`.
Takes the same arguments as `fs.chown()`
@@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MappedTypeScope = void 0;
const ScopeBase_1 = require("./ScopeBase");
const ScopeType_1 = require("./ScopeType");
class MappedTypeScope extends ScopeBase_1.ScopeBase {
constructor(scopeManager, upperScope, block) {
super(scopeManager, ScopeType_1.ScopeType.mappedType, upperScope, block, false);
}
}
exports.MappedTypeScope = MappedTypeScope;
@@ -0,0 +1,7 @@
import constructor from "../types/constructor";
import Provider from "./provider";
import { DelayedConstructor } from "../lazy-helpers";
export default interface ClassProvider<T> {
useClass: constructor<T> | DelayedConstructor<T>;
}
export declare function isClassProvider<T>(provider: Provider<T>): provider is ClassProvider<any>;
@@ -0,0 +1,26 @@
'use strict';
var $TypeError = require('es-errors/type');
var ToInt32 = require('./ToInt32');
var ToUint32 = require('./ToUint32');
// https://262.ecma-international.org/11.0/#sec-numberbitwiseop
module.exports = function NumberBitwiseOp(op, x, y) {
if (op !== '&' && op !== '|' && op !== '^') {
throw new $TypeError('Assertion failed: `op` must be `&`, `|`, or `^`');
}
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
var lnum = ToInt32(x);
var rnum = ToUint32(y);
if (op === '&') {
return lnum & rnum;
}
if (op === '|') {
return lnum | rnum;
}
return lnum ^ rnum;
};
@@ -0,0 +1 @@
{"name":"@nodelib/fs.scandir","version":"2.1.5","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532125078,"integrity":"sha512-klyzttd362E9inpFU2X0jkZ+kaWZ+PhDEXJfMgfuWDKwC4dCmwlGbdsDCsQjWPUstsuss2EizcqjeZNZs2Qp9A==","mode":436,"size":1079},"out/providers/async.js":{"checkedAt":1794532125078,"integrity":"sha512-WoXtp+p3ulXXpPUp4ayKdwDajXX2a1CASRlhjBhbLtwbxPDv2Fj2ZmQfk1Nw6JZftZMgos4bc1I8um65JX9KJA==","mode":436,"size":3686},"out/providers/common.js":{"checkedAt":1794532125078,"integrity":"sha512-c8f1MPG/Zpy1D02SMSnd6zAZIIbhgRxr5ScHe3s5kpHsiK0wV402i0b9HPz1+44fy6SI7Znq7+nZDvvjcvy+ug==","mode":436,"size":419},"out/constants.js":{"checkedAt":1794532125078,"integrity":"sha512-hOasK2QIaKbiVffIWbV3725ImW9LofOqyTBqlFoid/HqQ1bsHHLl4T4K0Z6qrk7H7pvG62nGzSYQ6FJRz0o63g==","mode":436,"size":990},"out/adapters/fs.js":{"checkedAt":1794532125078,"integrity":"sha512-J3OVy+G4zkvhVMkZKL7uE7nvKpN70jw+aoKLDUtvhrx3ztZp9qt6fQBKxUYTLkQi/xQmDg6OXlfSl2FLT26Uaw==","mode":436,"size":640},"out/utils/fs.js":{"checkedAt":1794532125078,"integrity":"sha512-3LkfRe5//+zfyugzjeuBoUSscu4sr16O2nmiOH4ohiqxwkljkZniKmAmY4OGwceZD4V6YBrFgIWERcrgSqWidA==","mode":436,"size":756},"out/index.js":{"checkedAt":1794532125078,"integrity":"sha512-JKsfkFHNMvmQXjHGdwAzlRctClFw80DpjPNMxWPQ+9aWBWeGgUAixpRFdOuiQaUKf74D2G6xyNpFzI716DO80g==","mode":436,"size":1009},"out/types/index.js":{"checkedAt":1794532125079,"integrity":"sha512-f2XGQDoj2T+xSOglmwEtZVKrO/8Xj0p9ap2c7A9gQp/BiZ45tLyozAivx12afHv9sT/DcspjyF6yKwNV601gAA==","mode":436,"size":77},"out/utils/index.js":{"checkedAt":1794532125079,"integrity":"sha512-t+LUPOCYROQRHNicHMHrfxDo9sN8CFWBKBLPIPKgVO88L31zWa6IVlBBcRQkALtYNNpXMMGS7remr2Gd+GZD7w==","mode":436,"size":143},"out/settings.js":{"checkedAt":1794532125079,"integrity":"sha512-qL9hScbtABPUxoRBjcOMG5oBxTUKMdKAPjSa4vDxhPZSyOTQi8BRzAHZRmQ6iiOmRy2NaHAl7e7PzDnTlV3EBg==","mode":436,"size":1076},"out/providers/sync.js":{"checkedAt":1794532125079,"integrity":"sha512-/j3lNK6wREF2QRyrFoFJFwm6ao4PjRzyYpiZXVKBxlnL5gaiQbT91vEy5I4kxGMnV9GPh/Fk9BfI2OEM6vx0Jg==","mode":436,"size":1990},"package.json":{"checkedAt":1794532125079,"integrity":"sha512-9vEv5ALUbpNc/TlA8wsz3I56OZXWd11jVJwpoKOKFLHgQNXqDhdAo/aM8oALESe8kMSpEI+/qPM8CsXImdtsFQ==","mode":436,"size":1163},"README.md":{"checkedAt":1794532125079,"integrity":"sha512-B4CTgoodxUVqnkm1QOfox0KwSNpdK6yQzbHJ3gPn7YFZfCyTcBcmJRp58yq9IqILQeVW+tToX77C1RWvlJ1D2w==","mode":436,"size":4959},"out/providers/async.d.ts":{"checkedAt":1794532125079,"integrity":"sha512-2QYez1e7s+ilgSeWaDkimRcAZL0oav4bZkW++tbMAZ+D3GzUHRVmupqW9AUIXKZ0Wvv5nTpESptTjxciX1DNkg==","mode":436,"size":524},"out/providers/common.d.ts":{"checkedAt":1794532125079,"integrity":"sha512-e1xA23XUkWGB0bRVMXmZAsiUwE1xi6YHG4M8ihHZqrtYOOWlKFAMtqSZsTIYCww+3uSs9apehXLzZXXlAxeIMg==","mode":436,"size":91},"out/constants.d.ts":{"checkedAt":1794532125079,"integrity":"sha512-6nSr8OZ+BQwYRITkY0+LvqDC64UEeBjg98PgqyUZVT/8aojfOs8l49L857V4qIPLLFN54162cBa1HeYG1GT5Eg==","mode":436,"size":118},"out/adapters/fs.d.ts":{"checkedAt":1794532125080,"integrity":"sha512-5dhxcHwYuqsqXlzJ5GeVtrmCaAidi8o7Wr4qcZRSl9ZZJlB32A/ZNEi4bcnym97IGlM/pPfIVDmqwgLFUSyeSg==","mode":436,"size":878},"out/utils/fs.d.ts":{"checkedAt":1794532125080,"integrity":"sha512-RPK/1QV2BVgaBPDDvus1vL1j6m9GBdznugtyFJ6EGkah5a6X+WQ2HNSJAPzsldRX44rR37qJk4gZQlPlXB7oMg==","mode":436,"size":130},"out/index.d.ts":{"checkedAt":1794532125080,"integrity":"sha512-80usDP6yeHPYtvbS7oeptypqMG1TT/M2cbNHRvNkVsJ7do3R8gMcZP0s1zNFv42kst/i04WuubgyPOAnbCxtlQ==","mode":436,"size":855},"out/types/index.d.ts":{"checkedAt":1794532125080,"integrity":"sha512-T2eiVwYcoNhNh2m1wzm+CfljO8cTzQZjBK0xRRCzyJ9tecGyR4e5lhbky5DlUD/fMyhKW3oheTx+d/+tAOPc8A==","mode":436,"size":530},"out/utils/index.d.ts":{"checkedAt":1794532125080,"integrity":"sha512-EmwWEbPFZ0r0VYLkjD2NcHO28/5ZtGXtosQlWEmFl4qytY0bqZQP3dfV6uHe0ZuVvtlS5Gn6+kZSG/CEJUMOvg==","mode":436,"size":43},"out/settings.d.ts":{"checkedAt":1794532125080,"integrity":"sha512-Hb5diIC1qtKxHqhSzcW0/bUN2yG0VJm8YVivdYlh6LII83v5Ds00mVA4aLsPTPrmFkDxm+8GCnkL2YfNHVcuFg==","mode":436,"size":666},"out/providers/sync.d.ts":{"checkedAt":1794532125080,"integrity":"sha512-DHSzT+TkHBHFg/3srj1f4BX/N/LmA6ii+thXWPJG7ipn/TLe58NYCQTanTz5lqyEEjCbRJC+jPrHzKkcAPriwQ==","mode":436,"size":333}}}
@@ -0,0 +1,719 @@
flf2a$ 7 6 22 15 4
starwars.flf by Ryan Youck (youck@cs.uregina.ca) Dec 25/1994
I am not responsible for use of this font
Based on Big.flf by Glenn Chappell
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@@
__ $@
| |$@
| |$@
| |$@
|__|$@
(__)$@
$@@
_ _ @
( | )@
V V @
$ @
$ @
$ @
@@
_ _ @
_| || |_$@
|_ __ _|@
_| || |_ @
|_ __ _|@
|_||_| $@
@@
__,--,_.@
/ |@
| (----`@
\ \ $@
.----) | $@
|_ __/ $@
'--' $@@
_ ___$ @
/ \ / /$ @
( o ) / / $ @
\_/ / / _$ @
/ / / \ @
/ / ( o )@
/__/ \_/ @@
@
___ @
( _ ) $@
/ _ \/\@
| (_> <@
\___/\/@
$@@
__ @
(_ )@
|/ @
$ @
$ @
$ @
@@
___@
/ /@
| |$@
| |$@
| |$@
| |$@
\__\@@
___ @
\ \ @
| |@
| |@
| |@
| |@
/__/ @@
_ @
/\| |/\ @
\ ` ' /$@
|_ _|@
/ , . \$@
\/|_|\/ @
@@
@
_ @
_| |_$@
|_ _|@
|_| $@
$ @
@@
@
@
$ @
$ @
__ @
(_ )@
|/ @@
@
@
______ @
|______|@
$ @
$ @
@@
@
@
@
$ @
__ @
(__)@
@@
___@
/ /@
/ / @
/ /$ @
/ /$ @
/__/$ @
@@
___ $@
/ _ \ $@
| | | |$@
| | | |$@
| |_| |$@
\___/ $@
$@@
__ $@
/_ |$@
| |$@
| |$@
| |$@
|_|$@
$@@
___ $@
|__ \ $@
$) |$@
/ / $@
/ /_ $@
|____|$@
$@@
____ $@
|___ \ $@
__) |$@
|__ < $@
___) |$@
|____/ $@
$@@
_ _ $@
| || | $@
| || |_ $@
|__ _|$@
| | $@
|_| $@
$@@
_____ $@
| ____|$@
| |__ $@
|___ \ $@
___) |$@
|____/ $@
$@@
__ $@
/ / $@
/ /_ $@
| '_ \ $@
| (_) |$@
\___/ $@
$@@
______ $@
|____ |$@
$/ / $@
/ / $@
/ / $@
/_/ $@
$@@
___ $@
/ _ \ $@
| (_) |$@
> _ < $@
| (_) |$@
\___/ $@
$@@
___ $@
/ _ \ $@
| (_) |$@
\__, |$@
/ / $@
/_/ $@
$@@
@
_ @
(_)@
$ @
_ @
(_)@
@@
@
_ @
(_)@
$ @
_ @
( )@
|/ @@
___@
/ /@
/ /$@
< <$ @
\ \$@
\__\@
@@
@
______ @
|______|@
______ @
|______|@
@
@@
___ @
\ \$ @
\ \ @
> >@
/ / @
/__/$ @
@@
______ $@
| \ $@
`----) |$@
/ / $@
|__| $@
__ $@
(__) $@@
____ @
/ __ \ @
/ / _` |@
| | (_| |@
\ \__,_|@
\____/ @
@@
___ $ @
/ \ $ @
/ ^ \$ @
/ /_\ \$ @
/ _____ \$ @
/__/ \__\$@
$@@
.______ $@
| _ \ $@
| |_) |$@
| _ < $@
| |_) |$@
|______/ $@
$@@
______$@
/ |@
| ,----'@
| | $@
| `----.@
\______|@
$@@
_______ $@
| \$@
| .--. |@
| | | |@
| '--' |@
|_______/$@
$@@
_______ @
| ____|@
| |__ $@
| __| $@
| |____ @
|_______|@
@@
_______ @
| ____|@
| |__ $@
| __| $@
| | $ @
|__| @
@@
_______ @
/ _____|@
| | __ $@
| | |_ |$@
| |__| |$@
\______|$@
$@@
__ __ $@
| | | |$@
| |__| |$@
| __ |$@
| | | |$@
|__| |__|$@
$@@
__ $@
| |$@
| |$@
| |$@
| |$@
|__|$@
$@@
__ $@
| |$@
| |$@
.--. | |$@
| `--' |$@
\______/ $@
$@@
__ ___$@
| |/ /$@
| ' / $@
| < $@
| . \ $@
|__|\__\$@
$@@
__ $@
| | $@
| | $@
| | $@
| `----.@
|_______|@
$@@
.___ ___.$@
| \/ |$@
| \ / |$@
| |\/| |$@
| | | |$@
|__| |__|$@
$@@
.__ __.$@
| \ | |$@
| \| |$@
| . ` |$@
| |\ |$@
|__| \__|$@
$@@
______ $@
/ __ \ $@
| | | |$@
| | | |$@
| `--' |$@
\______/ $@
$@@
.______ $@
| _ \ $@
| |_) |$@
| ___/ $@
| | $ @
| _| $ @
$ @@
______ $ @
/ __ \ $ @
| | | | $ @
| | | | $ @
| `--' '--. @
\_____\_____\@
$ @@
.______ $ @
| _ \ $ @
| |_) | $ @
| / $ @
| |\ \----.@
| _| `._____|@
$@@
_______.@
/ |@
| (----`@
\ \ $@
.----) | $@
|_______/ $@
$@@
.___________.@
| |@
`---| |----`@
| | $ @
| | $ @
|__| $ @
$ @@
__ __ $@
| | | |$@
| | | |$@
| | | |$@
| `--' |$@
\______/ $@
$@@
____ ____$@
\ \ / /$@
\ \/ /$ @
\ /$ @
\ /$ @
\__/$ @
$ @@
____ __ ____$@
\ \ / \ / /$@
\ \/ \/ /$ @
\ /$ @
\ /\ /$ @
\__/ \__/$ @
$ @@
___ ___$@
\ \ / /$@
\ V / $@
> < $@
/ . \ $@
/__/ \__\$@
$@@
____ ____$@
\ \ / /$@
\ \/ /$ @
\_ _/$ @
| |$ @
|__|$ @
$ @@
________ $@
| / $@
`---/ / $@
/ / $@
/ /----.@
/________|@
$@@
____ @
| |@
| |-`@
| | $@
| | $@
| |-.@
|____|@@
___ @
\ \ $ @
\ \$ @
\ \$ @
\ \$@
\__\@
@@
____ @
| |@
`-| |@
| |@
| |@
.-| |@
|____|@@
___ @
/ \ @
/--^--\@
$@
$@
$@
$@@
@
@
@
$ @
$ @
______ @
|______|@@
__ @
( _)@
\| @
$ @
$ @
$ @
@@
___ $ @
/ \ $ @
/ ^ \$ @
/ /_\ \$ @
/ _____ \$ @
/__/ \__\$@
$@@
.______ $@
| _ \ $@
| |_) |$@
| _ < $@
| |_) |$@
|______/ $@
$@@
______$@
/ |@
| ,----'@
| | $@
| `----.@
\______|@
$@@
_______ $@
| \$@
| .--. |@
| | | |@
| '--' |@
|_______/$@
$@@
_______ @
| ____|@
| |__ $@
| __| $@
| |____ @
|_______|@
@@
_______ @
| ____|@
| |__ $@
| __| $@
| | $ @
|__| @
@@
_______ @
/ _____|@
| | __ $@
| | |_ |$@
| |__| |$@
\______|$@
$@@
__ __ $@
| | | |$@
| |__| |$@
| __ |$@
| | | |$@
|__| |__|$@
$@@
__ $@
| |$@
| |$@
| |$@
| |$@
|__|$@
$@@
__ $@
| |$@
| |$@
.--. | |$@
| `--' |$@
\______/ $@
$@@
__ ___$@
| |/ /$@
| ' / $@
| < $@
| . \ $@
|__|\__\$@
$@@
__ $@
| | $@
| | $@
| | $@
| `----.@
|_______|@
$@@
.___ ___.$@
| \/ |$@
| \ / |$@
| |\/| |$@
| | | |$@
|__| |__|$@
$@@
.__ __.$@
| \ | |$@
| \| |$@
| . ` |$@
| |\ |$@
|__| \__|$@
$@@
______ $@
/ __ \ $@
| | | |$@
| | | |$@
| `--' |$@
\______/ $@
$@@
.______ $@
| _ \ $@
| |_) |$@
| ___/ $@
| | $ @
| _| $ @
$ @@
______ $ @
/ __ \ $ @
| | | | $ @
| | | | $ @
| `--' '--. @
\_____\_____\@
$ @@
.______ $ @
| _ \ $ @
| |_) | $ @
| / $ @
| |\ \----.@
| _| `._____|@
$@@
_______.@
/ |@
| (----`@
\ \ $@
.----) | $@
|_______/ $@
$@@
.___________.@
| |@
`---| |----`@
| | $ @
| | $ @
|__| $ @
$ @@
__ __ $@
| | | |$@
| | | |$@
| | | |$@
| `--' |$@
\______/ $@
$@@
____ ____$@
\ \ / /$@
\ \/ /$ @
\ /$ @
\ /$ @
\__/$ @
$ @@
____ __ ____$@
\ \ / \ / /$@
\ \/ \/ /$ @
\ /$ @
\ /\ /$ @
\__/ \__/$ @
$ @@
___ ___$@
\ \ / /$@
\ V / $@
> < $@
/ . \ $@
/__/ \__\$@
$@@
____ ____$@
\ \ / /$@
\ \/ /$ @
\_ _/$ @
| |$ @
|__|$ @
$ @@
________ $@
| / $@
`---/ / $@
/ / $@
/ /----.@
/________|@
$@@
___@
/ /@
| |$@
/ /$ @
\ \$ @
| |$@
\__\@@
__ $@
| |$@
| |$@
| |$@
| |$@
| |$@
|__|$@@
___ @
\ \$ @
| | @
\ \@
/ /@
| | @
/__/$ @@
__ _ @
/ \/ |@
|_/\__/ @
$ @
$ @
$ @
@@
_ _ @
(_)_(_) @
/ \ @
/ _ \ @
/ ___ \ @
/_/ \_\@
@@
_ _ @
(_)_(_)@
/ _ \ @
| | | |@
| |_| |@
\___/ @
@@
_ _ @
(_) (_)@
| | | |@
| | | |@
| |_| |@
\___/ @
@@
_ _ @
(_) (_)@
__ _ @
/ _` |@
| (_| |@
\__,_|@
@@
_ _ @
(_) (_)@
___ @
/ _ \ @
| (_) |@
\___/ @
@@
_ _ @
(_) (_)@
_ _ @
| | | |@
| |_| |@
\__,_|@
@@
___ @
/ _ \ @
| | ) |@
| |< < @
| | ) |@
| ||_/ @
|_| @@
@@ -0,0 +1 @@
{"version":3,"file":"isPlanServiceRedirectionBindingNode.spec.d.ts","sourceRoot":"","sources":["../../../../src/planning/calculations/isPlanServiceRedirectionBindingNode.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
{"version":3,"file":"InstanceBinding.js","sourceRoot":"","sources":["../../../../src/binding/models/InstanceBinding.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
{"name":"strnum","version":"1.1.2","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532101610,"integrity":"sha512-6lkwQgMNgKESsa2vwQwHAqCR3XvayJb7KYfQ4s1arO6ksgiU5SJzS8v06W5J/prIVu+XFwCVvKiyn0nhmzFa4g==","mode":420,"size":1077},"strnum.js":{"checkedAt":1794532101610,"integrity":"sha512-GH5W2YfKL1oY+QPV0jJzpKSUcqIpqUNIb29eeKuNjXvEqtqwans0TF3YMRoeTr+AMddeAXsR0uLFtn1vtdLbjw==","mode":420,"size":4333},"strnum.test.js":{"checkedAt":1794532101610,"integrity":"sha512-IiAzAhoRhSiAigwx+gP6/PjcJjA1ZhnxpYol8Gnu9GtXkavPqXFmnsUgEoAPlLyDgGEyY2FX9lFmYgs3qGUQRg==","mode":420,"size":8296},".vscode/launch.json":{"checkedAt":1794532101611,"integrity":"sha512-TW8PU2AjlwmpF1EAvpy+R+hLRIasCvMUlmPImNaN3GEi8RPawDwmEXw0l1hqRFfX8425jYNPUjQYaMDh3kuh7Q==","mode":420,"size":742},"package.json":{"checkedAt":1794532101611,"integrity":"sha512-yCtfdFUElZDNVCdQMaPcDDSdByfQJiECP1QZnptdQUm1nndQYuCUP2hTzBvsWEYhjm2TvN/P96w790SPQ23bAw==","mode":420,"size":616},"CHANGELOG.md":{"checkedAt":1794532101611,"integrity":"sha512-QAAv7rrxpr/AymXDa4pk7rVKmDc69jtN2PL+Vj24WJiVqiyHpKPJAhTVAoakiGydzm1RA6MIeUP0ctFZgH440g==","mode":420,"size":472},"README.md":{"checkedAt":1794532101611,"integrity":"sha512-GvL37eb3zSCuHQDnB47yGL6+HgVzqyvQoLUWDis1CwMGU5J8uEffuDyuHQ0cCdT51rFyQtijPrOFXECGtT6ztA==","mode":420,"size":3711}}}
@@ -0,0 +1 @@
{"version":3,"file":"named.js","sourceRoot":"","sources":["../../../../src/metadata/decorators/named.ts"],"names":[],"mappings":";;AASA,sBAWC;AApBD,sGAAmG;AACnG,sEAAmE;AACnE,6JAA0J;AAK1J,6CAA0C;AAE1C,SAAgB,KAAK,CACnB,IAAkB;IAElB,MAAM,cAAc,GAGlB,IAAA,yHAA2D,EACzD,IAAA,uCAAkB,EAAC,IAAI,CAAC,CACzB,CAAC;IAEJ,OAAO,IAAA,uBAAU,EAAC,cAAc,EAAE,uEAAkC,CAAC,CAAC;AACxE,CAAC"}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F wC","132":"A B"},B:{"132":"C L M G N O P","1028":"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"},C:{"2":"6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB 0C 1C","1028":"0 1 2 3 4 5 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","2564":"eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB","3076":"uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC"},D:{"16":"J ZB K D","132":"6 7 8 9 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","388":"E","1028":"0 1 2 3 4 5 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"},E:{"16":"J 2C ZC","132":"ZB K D E F A 3C 4C 5C 6C aC","1028":"B C L M G 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"},F:{"2":"F B C FD GD HD ID NC uC JD OC","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","1028":"0 1 2 3 4 5 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"},G:{"16":"ZC KD vC","132":"E LD MD ND OD PD QD RD SD","1028":"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"},H:{"2":"hD"},I:{"132":"J lD vC mD nD","292":"TC iD jD kD","1028":"I"},J:{"16":"D","132":"A"},K:{"2":"A B C NC uC OC","1028":"H"},L:{"1028":"I"},M:{"1028":"MC"},N:{"132":"A B"},O:{"1028":"PC"},P:{"132":"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:{"1028":"zD"},R:{"1028":"0D"},S:{"1028":"2D","2564":"1D"}},B:4,C:"DOMMatrix",D:true};
@@ -0,0 +1,34 @@
/**
* Queue
* @implements Iterable<Value>
* @template Value
*/
export class Queue<Value> implements Iterable<Value> {
/**
* clear
* @returns {void}
*/
clear(): void;
/**
* push
* @param {Value} value
* @returns {number}
*/
push(value: Value): number;
/**
* pop
* @returns {Value | undefined}
*/
pop(): Value | undefined;
/**
* size
* @returns {number}
*/
get size(): number;
/**
* Iterator
* @returns {IterableIterator<Value>}
*/
[Symbol.iterator](): IterableIterator<Value>;
#private;
}
@@ -0,0 +1,10 @@
interface Arguments {
callback: ResizeObserverCallback;
disabled?: boolean;
}
/**
* Returns a new ResizeObserver instance bound to the `onResize` callback.
* If `ResizeObserver` is undefined in the execution environment, returns `undefined`.
*/
export declare function useResizeObserver({ callback, disabled }: Arguments): ResizeObserver | undefined;
export {};
@@ -0,0 +1 @@
{"name":"micromark-extension-gfm","version":"3.0.0","requiresBuild":false,"files":{"license":{"checkedAt":1794532115952,"integrity":"sha512-fzvkEDDVqhfCJpKNt4nSfCdql95dXnYBu6QTwaEDV5dX/EtSGYys2u3y/9LaRjp4jUgB4qbz5csHGjJjcZAb2Q==","mode":420,"size":1099},"index.js":{"checkedAt":1794532115953,"integrity":"sha512-R2fW1qqk/z3ARx5zcDc0RAElYsg6tri39FD80hPqXT/m7GJ00I+D2qcOBnGr4GO9uwScMzZgoyynm1dfhWgdBA==","mode":420,"size":2031},"package.json":{"checkedAt":1794532115953,"integrity":"sha512-iGVT88/q+gVrYU6v8YcgwxSXU7mifkZoC2jPJcDQWHbGkBYC7hxa3xRyId7Xjh+3InG27l1Z9YX8TLjOq3AuVg==","mode":420,"size":2936},"readme.md":{"checkedAt":1794532115953,"integrity":"sha512-uNWNKvKCek3CcETT6PkhTmYzgDjUb6sURdrR3Gr3/6s3mpweLX/obtNRrllYvrB04EqTW2JXAixh7IfK/uz6VQ==","mode":420,"size":13113},"index.d.ts":{"checkedAt":1794532115953,"integrity":"sha512-yqh+pTToT5kda6hpN9z+e0RO3swmww23OPoE6iIXwf9fEOxU+WYeJwN36nAoX9xSIv0phEGNHVCMDs6H4mP2+w==","mode":420,"size":1142}}}
@@ -0,0 +1,518 @@
# yargs-parser
![ci](https://github.com/yargs/yargs-parser/workflows/ci/badge.svg)
[![NPM version](https://img.shields.io/npm/v/yargs-parser.svg)](https://www.npmjs.com/package/yargs-parser)
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)
![nycrc config on GitHub](https://img.shields.io/nycrc/yargs/yargs-parser)
The mighty option parser used by [yargs](https://github.com/yargs/yargs).
visit the [yargs website](http://yargs.js.org/) for more examples, and thorough usage instructions.
<img width="250" src="https://raw.githubusercontent.com/yargs/yargs-parser/main/yargs-logo.png">
## Example
```sh
npm i yargs-parser --save
```
```js
const argv = require('yargs-parser')(process.argv.slice(2))
console.log(argv)
```
```console
$ node example.js --foo=33 --bar hello
{ _: [], foo: 33, bar: 'hello' }
```
_or parse a string!_
```js
const argv = require('yargs-parser')('--foo=99 --bar=33')
console.log(argv)
```
```console
{ _: [], foo: 99, bar: 33 }
```
Convert an array of mixed types before passing to `yargs-parser`:
```js
const parse = require('yargs-parser')
parse(['-f', 11, '--zoom', 55].join(' ')) // <-- array to string
parse(['-f', 11, '--zoom', 55].map(String)) // <-- array of strings
```
## Deno Example
As of `v19` `yargs-parser` supports [Deno](https://github.com/denoland/deno):
```typescript
import parser from "https://deno.land/x/yargs_parser/deno.ts";
const argv = parser('--foo=99 --bar=9987930', {
string: ['bar']
})
console.log(argv)
```
## ESM Example
As of `v19` `yargs-parser` supports ESM (_both in Node.js and in the browser_):
**Node.js:**
```js
import parser from 'yargs-parser'
const argv = parser('--foo=99 --bar=9987930', {
string: ['bar']
})
console.log(argv)
```
**Browsers:**
```html
<!doctype html>
<body>
<script type="module">
import parser from "https://unpkg.com/yargs-parser@19.0.0/browser.js";
const argv = parser('--foo=99 --bar=9987930', {
string: ['bar']
})
console.log(argv)
</script>
</body>
```
## API
### parser(args, opts={})
Parses command line arguments returning a simple mapping of keys and values.
**expects:**
* `args`: a string or array of strings representing the options to parse.
* `opts`: provide a set of hints indicating how `args` should be parsed:
* `opts.alias`: an object representing the set of aliases for a key: `{alias: {foo: ['f']}}`.
* `opts.array`: indicate that keys should be parsed as an array: `{array: ['foo', 'bar']}`.<br>
Indicate that keys should be parsed as an array and coerced to booleans / numbers:<br>
`{array: [{ key: 'foo', boolean: true }, {key: 'bar', number: true}]}`.
* `opts.boolean`: arguments should be parsed as booleans: `{boolean: ['x', 'y']}`.
* `opts.coerce`: provide a custom synchronous function that returns a coerced value from the argument provided
(or throws an error). For arrays the function is called only once for the entire array:<br>
`{coerce: {foo: function (arg) {return modifiedArg}}}`.
* `opts.config`: indicate a key that represents a path to a configuration file (this file will be loaded and parsed).
* `opts.configObjects`: configuration objects to parse, their properties will be set as arguments:<br>
`{configObjects: [{'x': 5, 'y': 33}, {'z': 44}]}`.
* `opts.configuration`: provide configuration options to the yargs-parser (see: [configuration](#configuration)).
* `opts.count`: indicate a key that should be used as a counter, e.g., `-vvv` = `{v: 3}`.
* `opts.default`: provide default values for keys: `{default: {x: 33, y: 'hello world!'}}`.
* `opts.envPrefix`: environment variables (`process.env`) with the prefix provided should be parsed.
* `opts.narg`: specify that a key requires `n` arguments: `{narg: {x: 2}}`.
* `opts.normalize`: `path.normalize()` will be applied to values set to this key.
* `opts.number`: keys should be treated as numbers.
* `opts.string`: keys should be treated as strings (even if they resemble a number `-x 33`).
**returns:**
* `obj`: an object representing the parsed value of `args`
* `key/value`: key value pairs for each argument and their aliases.
* `_`: an array representing the positional arguments.
* [optional] `--`: an array with arguments after the end-of-options flag `--`.
### require('yargs-parser').detailed(args, opts={})
Parses a command line string, returning detailed information required by the
yargs engine.
**expects:**
* `args`: a string or array of strings representing options to parse.
* `opts`: provide a set of hints indicating how `args`, inputs are identical to `require('yargs-parser')(args, opts={})`.
**returns:**
* `argv`: an object representing the parsed value of `args`
* `key/value`: key value pairs for each argument and their aliases.
* `_`: an array representing the positional arguments.
* [optional] `--`: an array with arguments after the end-of-options flag `--`.
* `error`: populated with an error object if an exception occurred during parsing.
* `aliases`: the inferred list of aliases built by combining lists in `opts.alias`.
* `newAliases`: any new aliases added via camel-case expansion:
* `boolean`: `{ fooBar: true }`
* `defaulted`: any new argument created by `opts.default`, no aliases included.
* `boolean`: `{ foo: true }`
* `configuration`: given by default settings and `opts.configuration`.
<a name="configuration"></a>
### Configuration
The yargs-parser applies several automated transformations on the keys provided
in `args`. These features can be turned on and off using the `configuration` field
of `opts`.
```js
var parsed = parser(['--no-dice'], {
configuration: {
'boolean-negation': false
}
})
```
### short option groups
* default: `true`.
* key: `short-option-groups`.
Should a group of short-options be treated as boolean flags?
```console
$ node example.js -abc
{ _: [], a: true, b: true, c: true }
```
_if disabled:_
```console
$ node example.js -abc
{ _: [], abc: true }
```
### camel-case expansion
* default: `true`.
* key: `camel-case-expansion`.
Should hyphenated arguments be expanded into camel-case aliases?
```console
$ node example.js --foo-bar
{ _: [], 'foo-bar': true, fooBar: true }
```
_if disabled:_
```console
$ node example.js --foo-bar
{ _: [], 'foo-bar': true }
```
### dot-notation
* default: `true`
* key: `dot-notation`
Should keys that contain `.` be treated as objects?
```console
$ node example.js --foo.bar
{ _: [], foo: { bar: true } }
```
_if disabled:_
```console
$ node example.js --foo.bar
{ _: [], "foo.bar": true }
```
### parse numbers
* default: `true`
* key: `parse-numbers`
Should keys that look like numbers be treated as such?
```console
$ node example.js --foo=99.3
{ _: [], foo: 99.3 }
```
_if disabled:_
```console
$ node example.js --foo=99.3
{ _: [], foo: "99.3" }
```
### parse positional numbers
* default: `true`
* key: `parse-positional-numbers`
Should positional keys that look like numbers be treated as such.
```console
$ node example.js 99.3
{ _: [99.3] }
```
_if disabled:_
```console
$ node example.js 99.3
{ _: ['99.3'] }
```
### boolean negation
* default: `true`
* key: `boolean-negation`
Should variables prefixed with `--no` be treated as negations?
```console
$ node example.js --no-foo
{ _: [], foo: false }
```
_if disabled:_
```console
$ node example.js --no-foo
{ _: [], "no-foo": true }
```
### combine arrays
* default: `false`
* key: `combine-arrays`
Should arrays be combined when provided by both command line arguments and
a configuration file.
### duplicate arguments array
* default: `true`
* key: `duplicate-arguments-array`
Should arguments be coerced into an array when duplicated:
```console
$ node example.js -x 1 -x 2
{ _: [], x: [1, 2] }
```
_if disabled:_
```console
$ node example.js -x 1 -x 2
{ _: [], x: 2 }
```
### flatten duplicate arrays
* default: `true`
* key: `flatten-duplicate-arrays`
Should array arguments be coerced into a single array when duplicated:
```console
$ node example.js -x 1 2 -x 3 4
{ _: [], x: [1, 2, 3, 4] }
```
_if disabled:_
```console
$ node example.js -x 1 2 -x 3 4
{ _: [], x: [[1, 2], [3, 4]] }
```
### greedy arrays
* default: `true`
* key: `greedy-arrays`
Should arrays consume more than one positional argument following their flag.
```console
$ node example --arr 1 2
{ _: [], arr: [1, 2] }
```
_if disabled:_
```console
$ node example --arr 1 2
{ _: [2], arr: [1] }
```
**Note: in `v18.0.0` we are considering defaulting greedy arrays to `false`.**
### nargs eats options
* default: `false`
* key: `nargs-eats-options`
Should nargs consume dash options as well as positional arguments.
### negation prefix
* default: `no-`
* key: `negation-prefix`
The prefix to use for negated boolean variables.
```console
$ node example.js --no-foo
{ _: [], foo: false }
```
_if set to `quux`:_
```console
$ node example.js --quuxfoo
{ _: [], foo: false }
```
### populate --
* default: `false`.
* key: `populate--`
Should unparsed flags be stored in `--` or `_`.
_If disabled:_
```console
$ node example.js a -b -- x y
{ _: [ 'a', 'x', 'y' ], b: true }
```
_If enabled:_
```console
$ node example.js a -b -- x y
{ _: [ 'a' ], '--': [ 'x', 'y' ], b: true }
```
### set placeholder key
* default: `false`.
* key: `set-placeholder-key`.
Should a placeholder be added for keys not set via the corresponding CLI argument?
_If disabled:_
```console
$ node example.js -a 1 -c 2
{ _: [], a: 1, c: 2 }
```
_If enabled:_
```console
$ node example.js -a 1 -c 2
{ _: [], a: 1, b: undefined, c: 2 }
```
### halt at non-option
* default: `false`.
* key: `halt-at-non-option`.
Should parsing stop at the first positional argument? This is similar to how e.g. `ssh` parses its command line.
_If disabled:_
```console
$ node example.js -a run b -x y
{ _: [ 'b' ], a: 'run', x: 'y' }
```
_If enabled:_
```console
$ node example.js -a run b -x y
{ _: [ 'b', '-x', 'y' ], a: 'run' }
```
### strip aliased
* default: `false`
* key: `strip-aliased`
Should aliases be removed before returning results?
_If disabled:_
```console
$ node example.js --test-field 1
{ _: [], 'test-field': 1, testField: 1, 'test-alias': 1, testAlias: 1 }
```
_If enabled:_
```console
$ node example.js --test-field 1
{ _: [], 'test-field': 1, testField: 1 }
```
### strip dashed
* default: `false`
* key: `strip-dashed`
Should dashed keys be removed before returning results? This option has no effect if
`camel-case-expansion` is disabled.
_If disabled:_
```console
$ node example.js --test-field 1
{ _: [], 'test-field': 1, testField: 1 }
```
_If enabled:_
```console
$ node example.js --test-field 1
{ _: [], testField: 1 }
```
### unknown options as args
* default: `false`
* key: `unknown-options-as-args`
Should unknown options be treated like regular arguments? An unknown option is one that is not
configured in `opts`.
_If disabled_
```console
$ node example.js --unknown-option --known-option 2 --string-option --unknown-option2
{ _: [], unknownOption: true, knownOption: 2, stringOption: '', unknownOption2: true }
```
_If enabled_
```console
$ node example.js --unknown-option --known-option 2 --string-option --unknown-option2
{ _: ['--unknown-option'], knownOption: 2, stringOption: '--unknown-option2' }
```
## Supported Node.js Versions
Libraries in this ecosystem make a best effort to track
[Node.js' release schedule](https://nodejs.org/en/about/releases/). Here's [a
post on why we think this is important](https://medium.com/the-node-js-collection/maintainers-should-consider-following-node-js-release-schedule-ab08ed4de71a).
## Special Thanks
The yargs project evolves from optimist and minimist. It owes its
existence to a lot of James Halliday's hard work. Thanks [substack](https://github.com/substack) **beep** **boop** \o/
## License
ISC
@@ -0,0 +1 @@
{"version":3,"file":"register.js","sourceRoot":"","sources":["../src/register.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAoD;AACpD,iDAA+D;AAC/D,qCAAoC;AAEpC,IAAM,IAAI,GAAG,cAAY,OAAA,KAAK,CAAC,EAAN,CAAM,CAAC;AAEhC,SAAS,cAAc,CACrB,cAAoC;IAEpC,cAAc,GAAG,cAAc,IAAI;QACjC,QAAQ;QACR,QAAQ;QACR,eAAe;QACf,SAAS;QACT,QAAQ;QACR,OAAO;QACP,KAAK;QACL,QAAQ;QACR,QAAQ;QACR,IAAI;QACJ,MAAM;QACN,OAAO;QACP,KAAK;QACL,IAAI;QACJ,MAAM;QACN,UAAU;QACV,aAAa;QACb,UAAU;QACV,QAAQ;QACR,gBAAgB;QAChB,KAAK;QACL,KAAK;QACL,KAAK;QACL,MAAM;QACN,IAAI;QACJ,IAAI;QACJ,MAAM;KACP,CAAC;IAEF,IAAM,WAAW,GAA+B,EAAE,CAAC;IACnD,KAAmB,UAAc,EAAd,iCAAc,EAAd,4BAAc,EAAd,IAAc,EAAE;QAA9B,IAAI,QAAM,uBAAA;QACb,WAAW,CAAC,QAAM,CAAC,GAAG,IAAI,CAAC;KAC5B;IAED,OAAO,WAAW,CAAC;AACrB,CAAC;AAED;;;GAGG;AACH,SAAgB,QAAQ,CAAC,cAA8B;IACrD,IAAM,kBAAkB,GAAG,IAAA,4BAAY,EAAC;QACtC,GAAG,EAAE,iBAAO,CAAC,GAAG;QAChB,cAAc,gBAAA;KACf,CAAC,CAAC;IAEH,IAAI,kBAAkB,CAAC,UAAU,KAAK,QAAQ,EAAE;QAC9C,OAAO,CAAC,IAAI,CACV,UAAG,kBAAkB,CAAC,OAAO,qCAAkC,CAChE,CAAC;QAEF,OAAO,IAAI,CAAC;KACb;IAED,IAAM,SAAS,GAAG,IAAA,iCAAe,EAC/B,kBAAkB,CAAC,eAAe,EAClC,kBAAkB,CAAC,KAAK,EACxB,kBAAkB,CAAC,UAAU,EAC7B,kBAAkB,CAAC,WAAW,CAC/B,CAAC;IAEF,8BAA8B;IAC9B,4DAA4D;IAC5D,IAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IACjC,IAAM,uBAAuB,GAAG,MAAM,CAAC,gBAAgB,CAAC;IACxD,IAAM,WAAW,GAAG,cAAc,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IAC1D,kCAAkC;IAClC,MAAM,CAAC,gBAAgB,GAAG,UAAU,OAAe,EAAE,OAAY;QAC/D,IAAM,YAAY,GAAG,WAAW,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QACzD,IAAI,CAAC,YAAY,EAAE;YACjB,IAAM,KAAK,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;YACjC,IAAI,KAAK,EAAE;gBACT,IAAM,iBAAiB,kBAAI,KAAK,GAAK,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,OAAC,CAAC,CAAC,gEAAgE;gBACnI,2CAA2C;gBAC3C,OAAO,uBAAuB,CAAC,KAAK,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC;aAC/D;SACF;QACD,2CAA2C;QAC3C,OAAO,uBAAuB,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IACxD,CAAC,CAAC;IAEF,OAAO;QACL,kDAAkD;QAClD,MAAM,CAAC,gBAAgB,GAAG,uBAAuB,CAAC;IACpD,CAAC,CAAC;AACJ,CAAC;AA7CD,4BA6CC"}
@@ -0,0 +1,52 @@
import { getSafeTimers } from '@vitest/utils/timers';
const NAME_WORKER_STATE = "__vitest_worker__";
function getWorkerState() {
// @ts-expect-error untyped global
const workerState = globalThis[NAME_WORKER_STATE];
if (!workerState) throw new Error("Vitest failed to access its internal state.\n\nOne of the following is possible:\n- \"vitest\" is imported directly without running \"vitest\" command\n- \"vitest\" is imported inside \"globalSetup\" (to fix this, use \"setupFiles\" instead, because \"globalSetup\" runs in a different context)\n- \"vitest\" is imported inside Vite / Vitest config file\n- Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues\n");
return workerState;
}
function provideWorkerState(context, state) {
Object.defineProperty(context, NAME_WORKER_STATE, {
value: state,
configurable: true,
writable: true,
enumerable: false
});
return state;
}
function isChildProcess() {
return typeof process !== "undefined" && !!process.send;
}
function resetModules(modules, resetMocks = false) {
const skipPaths = [
/\/vitest\/dist\//,
/vitest-virtual-\w+\/dist/,
/@vitest\/dist/,
...!resetMocks ? [/^mock:/] : []
];
modules.idToModuleMap.forEach((node, path) => {
if (skipPaths.some((re) => re.test(path))) return;
node.promise = void 0;
node.exports = void 0;
node.evaluated = false;
node.importers.clear();
});
}
function waitNextTick() {
const { setTimeout } = getSafeTimers();
return new Promise((resolve) => setTimeout(resolve, 0));
}
async function waitForImportsToResolve() {
await waitNextTick();
const state = getWorkerState();
const promises = [];
const resolvingCount = state.resolvingModules.size;
for (const [_, mod] of state.evaluatedModules.idToModuleMap) if (mod.promise && !mod.evaluated) promises.push(mod.promise);
if (!promises.length && !resolvingCount) return;
await Promise.allSettled(promises);
await waitForImportsToResolve();
}
export { getWorkerState as g, isChildProcess as i, provideWorkerState as p, resetModules as r, waitForImportsToResolve as w };
@@ -0,0 +1,13 @@
/**
* ```asn1
* Attribute ::= SEQUENCE {
* type AttributeType,
* values SET OF AttributeValue }
* -- at least one value is required
* ```
*/
export declare class Attribute {
type: string;
values: ArrayBuffer[];
constructor(params?: Partial<Attribute>);
}
@@ -0,0 +1,66 @@
'use strict'
const u = require('universalify').fromPromise
const path = require('path')
const fs = require('../fs')
const mkdir = require('../mkdirs')
async function createFile (file) {
let stats
try {
stats = await fs.stat(file)
} catch { }
if (stats && stats.isFile()) return
const dir = path.dirname(file)
let dirStats = null
try {
dirStats = await fs.stat(dir)
} catch (err) {
// if the directory doesn't exist, make it
if (err.code === 'ENOENT') {
await mkdir.mkdirs(dir)
await fs.writeFile(file, '')
return
} else {
throw err
}
}
if (dirStats.isDirectory()) {
await fs.writeFile(file, '')
} else {
// parent is not a directory
// This is just to cause an internal ENOTDIR error to be thrown
await fs.readdir(dir)
}
}
function createFileSync (file) {
let stats
try {
stats = fs.statSync(file)
} catch { }
if (stats && stats.isFile()) return
const dir = path.dirname(file)
try {
if (!fs.statSync(dir).isDirectory()) {
// parent is not a directory
// This is just to cause an internal ENOTDIR error to be thrown
fs.readdirSync(dir)
}
} catch (err) {
// If the stat call above failed because the directory doesn't exist, create it
if (err && err.code === 'ENOENT') mkdir.mkdirsSync(dir)
else throw err
}
fs.writeFileSync(file, '')
}
module.exports = {
createFile: u(createFile),
createFileSync
}
@@ -0,0 +1,2 @@
// Todo (Babel 8): remove this file as Babel 8 drop support of core-js 2
module.exports = require("./data/corejs2-built-ins.json");
@@ -0,0 +1,170 @@
/**
* @author Toru Nagashima
* See LICENSE file in root directory for full license.
*/
"use strict"
const path = require("path")
const getConvertPath = require("../util/get-convert-path")
const getPackageJson = require("../util/get-package-json")
const NODE_SHEBANG = "#!/usr/bin/env node\n"
const SHEBANG_PATTERN = /^(#!.+?)?(\r)?\n/u
const NODE_SHEBANG_PATTERN = /#!\/usr\/bin\/env node(?: [^\r\n]+?)?\n/u
function simulateNodeResolutionAlgorithm(filePath, binField) {
const possibilities = [filePath]
let newFilePath = filePath.replace(/\.js$/u, "")
possibilities.push(newFilePath)
newFilePath = newFilePath.replace(/[/\\]index$/u, "")
possibilities.push(newFilePath)
return possibilities.includes(binField)
}
/**
* Checks whether or not a given path is a `bin` file.
*
* @param {string} filePath - A file path to check.
* @param {string|object|undefined} binField - A value of the `bin` field of `package.json`.
* @param {string} basedir - A directory path that `package.json` exists.
* @returns {boolean} `true` if the file is a `bin` file.
*/
function isBinFile(filePath, binField, basedir) {
if (!binField) {
return false
}
if (typeof binField === "string") {
return simulateNodeResolutionAlgorithm(
filePath,
path.resolve(basedir, binField)
)
}
return Object.keys(binField).some(key =>
simulateNodeResolutionAlgorithm(
filePath,
path.resolve(basedir, binField[key])
)
)
}
/**
* Gets the shebang line (includes a line ending) from a given code.
*
* @param {SourceCode} sourceCode - A source code object to check.
* @returns {{length: number, bom: boolean, shebang: string, cr: boolean}}
* shebang's information.
* `retv.shebang` is an empty string if shebang doesn't exist.
*/
function getShebangInfo(sourceCode) {
const m = SHEBANG_PATTERN.exec(sourceCode.text)
return {
bom: sourceCode.hasBOM,
cr: Boolean(m && m[2]),
length: (m && m[0].length) || 0,
shebang: (m && m[1] && `${m[1]}\n`) || "",
}
}
module.exports = {
meta: {
docs: {
description: "suggest correct usage of shebang",
category: "Possible Errors",
recommended: true,
url:
"https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/shebang.md",
},
type: "problem",
fixable: "code",
schema: [
{
type: "object",
properties: {
//
convertPath: getConvertPath.schema,
},
additionalProperties: false,
},
],
},
create(context) {
const sourceCode = context.getSourceCode()
let filePath = context.getFilename()
if (filePath === "<input>") {
return {}
}
filePath = path.resolve(filePath)
const p = getPackageJson(filePath)
if (!p) {
return {}
}
const basedir = path.dirname(p.filePath)
filePath = path.join(
basedir,
getConvertPath(context)(
path.relative(basedir, filePath).replace(/\\/gu, "/")
)
)
const needsShebang = isBinFile(filePath, p.bin, basedir)
const info = getShebangInfo(sourceCode)
return {
Program(node) {
if (
needsShebang
? NODE_SHEBANG_PATTERN.test(info.shebang)
: !info.shebang
) {
// Good the shebang target.
// Checks BOM and \r.
if (needsShebang && info.bom) {
context.report({
node,
message: "This file must not have Unicode BOM.",
fix(fixer) {
return fixer.removeRange([-1, 0])
},
})
}
if (needsShebang && info.cr) {
context.report({
node,
message:
"This file must have Unix linebreaks (LF).",
fix(fixer) {
const index = sourceCode.text.indexOf("\r")
return fixer.removeRange([index, index + 1])
},
})
}
} else if (needsShebang) {
// Shebang is lacking.
context.report({
node,
message:
'This file needs shebang "#!/usr/bin/env node".',
fix(fixer) {
return fixer.replaceTextRange(
[-1, info.length],
NODE_SHEBANG
)
},
})
} else {
// Shebang is extra.
context.report({
node,
message: "This file needs no shebang.",
fix(fixer) {
return fixer.removeRange([0, info.length])
},
})
}
},
}
},
}
@@ -0,0 +1,743 @@
// src/devModeChecks/identityFunctionCheck.ts
var runIdentityFunctionCheck = (resultFunc, inputSelectorsResults, outputSelectorResult) => {
if (inputSelectorsResults.length === 1 && inputSelectorsResults[0] === outputSelectorResult) {
let isInputSameAsOutput = false;
try {
const emptyObject = {};
if (resultFunc(emptyObject) === emptyObject)
isInputSameAsOutput = true;
} catch {
}
if (isInputSameAsOutput) {
let stack = void 0;
try {
throw new Error();
} catch (e) {
;
({ stack } = e);
}
console.warn(
"The result function returned its own inputs without modification. e.g\n`createSelector([state => state.todos], todos => todos)`\nThis could lead to inefficient memoization and unnecessary re-renders.\nEnsure transformation logic is in the result function, and extraction logic is in the input selectors.",
{ stack }
);
}
}
};
// src/devModeChecks/inputStabilityCheck.ts
var runInputStabilityCheck = (inputSelectorResultsObject, options, inputSelectorArgs) => {
const { memoize, memoizeOptions } = options;
const { inputSelectorResults, inputSelectorResultsCopy } = inputSelectorResultsObject;
const createAnEmptyObject = memoize(() => ({}), ...memoizeOptions);
const areInputSelectorResultsEqual = createAnEmptyObject.apply(null, inputSelectorResults) === createAnEmptyObject.apply(null, inputSelectorResultsCopy);
if (!areInputSelectorResultsEqual) {
let stack = void 0;
try {
throw new Error();
} catch (e) {
;
({ stack } = e);
}
console.warn(
"An input selector returned a different result when passed same arguments.\nThis means your output selector will likely run more frequently than intended.\nAvoid returning a new reference inside your input selector, e.g.\n`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)`",
{
arguments: inputSelectorArgs,
firstInputs: inputSelectorResults,
secondInputs: inputSelectorResultsCopy,
stack
}
);
}
};
// src/devModeChecks/setGlobalDevModeChecks.ts
var globalDevModeChecks = {
inputStabilityCheck: "once",
identityFunctionCheck: "once"
};
var setGlobalDevModeChecks = (devModeChecks) => {
Object.assign(globalDevModeChecks, devModeChecks);
};
// src/utils.ts
var NOT_FOUND = /* @__PURE__ */ Symbol("NOT_FOUND");
function assertIsFunction(func, errorMessage = `expected a function, instead received ${typeof func}`) {
if (typeof func !== "function") {
throw new TypeError(errorMessage);
}
}
function assertIsObject(object, errorMessage = `expected an object, instead received ${typeof object}`) {
if (typeof object !== "object") {
throw new TypeError(errorMessage);
}
}
function assertIsArrayOfFunctions(array, errorMessage = `expected all items to be functions, instead received the following types: `) {
if (!array.every((item) => typeof item === "function")) {
const itemTypes = array.map(
(item) => typeof item === "function" ? `function ${item.name || "unnamed"}()` : typeof item
).join(", ");
throw new TypeError(`${errorMessage}[${itemTypes}]`);
}
}
var ensureIsArray = (item) => {
return Array.isArray(item) ? item : [item];
};
function getDependencies(createSelectorArgs) {
const dependencies = Array.isArray(createSelectorArgs[0]) ? createSelectorArgs[0] : createSelectorArgs;
assertIsArrayOfFunctions(
dependencies,
`createSelector expects all input-selectors to be functions, but received the following types: `
);
return dependencies;
}
function collectInputSelectorResults(dependencies, inputSelectorArgs) {
const inputSelectorResults = [];
const { length } = dependencies;
for (let i = 0; i < length; i++) {
inputSelectorResults.push(dependencies[i].apply(null, inputSelectorArgs));
}
return inputSelectorResults;
}
var getDevModeChecksExecutionInfo = (firstRun, devModeChecks) => {
const { identityFunctionCheck, inputStabilityCheck } = {
...globalDevModeChecks,
...devModeChecks
};
return {
identityFunctionCheck: {
shouldRun: identityFunctionCheck === "always" || identityFunctionCheck === "once" && firstRun,
run: runIdentityFunctionCheck
},
inputStabilityCheck: {
shouldRun: inputStabilityCheck === "always" || inputStabilityCheck === "once" && firstRun,
run: runInputStabilityCheck
}
};
};
// src/autotrackMemoize/autotracking.ts
var $REVISION = 0;
var CURRENT_TRACKER = null;
var Cell = class {
revision = $REVISION;
_value;
_lastValue;
_isEqual = tripleEq;
constructor(initialValue, isEqual = tripleEq) {
this._value = this._lastValue = initialValue;
this._isEqual = isEqual;
}
// Whenever a storage value is read, it'll add itself to the current tracker if
// one exists, entangling its state with that cache.
get value() {
CURRENT_TRACKER?.add(this);
return this._value;
}
// Whenever a storage value is updated, we bump the global revision clock,
// assign the revision for this storage to the new value, _and_ we schedule a
// rerender. This is important, and it's what makes autotracking _pull_
// based. We don't actively tell the caches which depend on the storage that
// anything has happened. Instead, we recompute the caches when needed.
set value(newValue) {
if (this.value === newValue)
return;
this._value = newValue;
this.revision = ++$REVISION;
}
};
function tripleEq(a, b) {
return a === b;
}
var TrackingCache = class {
_cachedValue;
_cachedRevision = -1;
_deps = [];
hits = 0;
fn;
constructor(fn) {
this.fn = fn;
}
clear() {
this._cachedValue = void 0;
this._cachedRevision = -1;
this._deps = [];
this.hits = 0;
}
get value() {
if (this.revision > this._cachedRevision) {
const { fn } = this;
const currentTracker = /* @__PURE__ */ new Set();
const prevTracker = CURRENT_TRACKER;
CURRENT_TRACKER = currentTracker;
this._cachedValue = fn();
CURRENT_TRACKER = prevTracker;
this.hits++;
this._deps = Array.from(currentTracker);
this._cachedRevision = this.revision;
}
CURRENT_TRACKER?.add(this);
return this._cachedValue;
}
get revision() {
return Math.max(...this._deps.map((d) => d.revision), 0);
}
};
function getValue(cell) {
if (!(cell instanceof Cell)) {
console.warn("Not a valid cell! ", cell);
}
return cell.value;
}
function setValue(storage, value) {
if (!(storage instanceof Cell)) {
throw new TypeError(
"setValue must be passed a tracked store created with `createStorage`."
);
}
storage.value = storage._lastValue = value;
}
function createCell(initialValue, isEqual = tripleEq) {
return new Cell(initialValue, isEqual);
}
function createCache(fn) {
assertIsFunction(
fn,
"the first parameter to `createCache` must be a function"
);
return new TrackingCache(fn);
}
// src/autotrackMemoize/tracking.ts
var neverEq = (a, b) => false;
function createTag() {
return createCell(null, neverEq);
}
function dirtyTag(tag, value) {
setValue(tag, value);
}
var consumeCollection = (node) => {
let tag = node.collectionTag;
if (tag === null) {
tag = node.collectionTag = createTag();
}
getValue(tag);
};
var dirtyCollection = (node) => {
const tag = node.collectionTag;
if (tag !== null) {
dirtyTag(tag, null);
}
};
// src/autotrackMemoize/proxy.ts
var REDUX_PROXY_LABEL = Symbol();
var nextId = 0;
var proto = Object.getPrototypeOf({});
var ObjectTreeNode = class {
constructor(value) {
this.value = value;
this.value = value;
this.tag.value = value;
}
proxy = new Proxy(this, objectProxyHandler);
tag = createTag();
tags = {};
children = {};
collectionTag = null;
id = nextId++;
};
var objectProxyHandler = {
get(node, key) {
function calculateResult() {
const { value } = node;
const childValue = Reflect.get(value, key);
if (typeof key === "symbol") {
return childValue;
}
if (key in proto) {
return childValue;
}
if (typeof childValue === "object" && childValue !== null) {
let childNode = node.children[key];
if (childNode === void 0) {
childNode = node.children[key] = createNode(childValue);
}
if (childNode.tag) {
getValue(childNode.tag);
}
return childNode.proxy;
} else {
let tag = node.tags[key];
if (tag === void 0) {
tag = node.tags[key] = createTag();
tag.value = childValue;
}
getValue(tag);
return childValue;
}
}
const res = calculateResult();
return res;
},
ownKeys(node) {
consumeCollection(node);
return Reflect.ownKeys(node.value);
},
getOwnPropertyDescriptor(node, prop) {
return Reflect.getOwnPropertyDescriptor(node.value, prop);
},
has(node, prop) {
return Reflect.has(node.value, prop);
}
};
var ArrayTreeNode = class {
constructor(value) {
this.value = value;
this.value = value;
this.tag.value = value;
}
proxy = new Proxy([this], arrayProxyHandler);
tag = createTag();
tags = {};
children = {};
collectionTag = null;
id = nextId++;
};
var arrayProxyHandler = {
get([node], key) {
if (key === "length") {
consumeCollection(node);
}
return objectProxyHandler.get(node, key);
},
ownKeys([node]) {
return objectProxyHandler.ownKeys(node);
},
getOwnPropertyDescriptor([node], prop) {
return objectProxyHandler.getOwnPropertyDescriptor(node, prop);
},
has([node], prop) {
return objectProxyHandler.has(node, prop);
}
};
function createNode(value) {
if (Array.isArray(value)) {
return new ArrayTreeNode(value);
}
return new ObjectTreeNode(value);
}
function updateNode(node, newValue) {
const { value, tags, children } = node;
node.value = newValue;
if (Array.isArray(value) && Array.isArray(newValue) && value.length !== newValue.length) {
dirtyCollection(node);
} else {
if (value !== newValue) {
let oldKeysSize = 0;
let newKeysSize = 0;
let anyKeysAdded = false;
for (const _key in value) {
oldKeysSize++;
}
for (const key in newValue) {
newKeysSize++;
if (!(key in value)) {
anyKeysAdded = true;
break;
}
}
const isDifferent = anyKeysAdded || oldKeysSize !== newKeysSize;
if (isDifferent) {
dirtyCollection(node);
}
}
}
for (const key in tags) {
const childValue = value[key];
const newChildValue = newValue[key];
if (childValue !== newChildValue) {
dirtyCollection(node);
dirtyTag(tags[key], newChildValue);
}
if (typeof newChildValue === "object" && newChildValue !== null) {
delete tags[key];
}
}
for (const key in children) {
const childNode = children[key];
const newChildValue = newValue[key];
const childValue = childNode.value;
if (childValue === newChildValue) {
continue;
} else if (typeof newChildValue === "object" && newChildValue !== null) {
updateNode(childNode, newChildValue);
} else {
deleteNode(childNode);
delete children[key];
}
}
}
function deleteNode(node) {
if (node.tag) {
dirtyTag(node.tag, null);
}
dirtyCollection(node);
for (const key in node.tags) {
dirtyTag(node.tags[key], null);
}
for (const key in node.children) {
deleteNode(node.children[key]);
}
}
// src/lruMemoize.ts
function createSingletonCache(equals) {
let entry;
return {
get(key) {
if (entry && equals(entry.key, key)) {
return entry.value;
}
return NOT_FOUND;
},
put(key, value) {
entry = { key, value };
},
getEntries() {
return entry ? [entry] : [];
},
clear() {
entry = void 0;
}
};
}
function createLruCache(maxSize, equals) {
let entries = [];
function get(key) {
const cacheIndex = entries.findIndex((entry) => equals(key, entry.key));
if (cacheIndex > -1) {
const entry = entries[cacheIndex];
if (cacheIndex > 0) {
entries.splice(cacheIndex, 1);
entries.unshift(entry);
}
return entry.value;
}
return NOT_FOUND;
}
function put(key, value) {
if (get(key) === NOT_FOUND) {
entries.unshift({ key, value });
if (entries.length > maxSize) {
entries.pop();
}
}
}
function getEntries() {
return entries;
}
function clear() {
entries = [];
}
return { get, put, getEntries, clear };
}
var referenceEqualityCheck = (a, b) => a === b;
function createCacheKeyComparator(equalityCheck) {
return function areArgumentsShallowlyEqual(prev, next) {
if (prev === null || next === null || prev.length !== next.length) {
return false;
}
const { length } = prev;
for (let i = 0; i < length; i++) {
if (!equalityCheck(prev[i], next[i])) {
return false;
}
}
return true;
};
}
function lruMemoize(func, equalityCheckOrOptions) {
const providedOptions = typeof equalityCheckOrOptions === "object" ? equalityCheckOrOptions : { equalityCheck: equalityCheckOrOptions };
const {
equalityCheck = referenceEqualityCheck,
maxSize = 1,
resultEqualityCheck
} = providedOptions;
const comparator = createCacheKeyComparator(equalityCheck);
let resultsCount = 0;
const cache = maxSize <= 1 ? createSingletonCache(comparator) : createLruCache(maxSize, comparator);
function memoized() {
let value = cache.get(arguments);
if (value === NOT_FOUND) {
value = func.apply(null, arguments);
resultsCount++;
if (resultEqualityCheck) {
const entries = cache.getEntries();
const matchingEntry = entries.find(
(entry) => resultEqualityCheck(entry.value, value)
);
if (matchingEntry) {
value = matchingEntry.value;
resultsCount !== 0 && resultsCount--;
}
}
cache.put(arguments, value);
}
return value;
}
memoized.clearCache = () => {
cache.clear();
memoized.resetResultsCount();
};
memoized.resultsCount = () => resultsCount;
memoized.resetResultsCount = () => {
resultsCount = 0;
};
return memoized;
}
// src/autotrackMemoize/autotrackMemoize.ts
function autotrackMemoize(func) {
const node = createNode(
[]
);
let lastArgs = null;
const shallowEqual = createCacheKeyComparator(referenceEqualityCheck);
const cache = createCache(() => {
const res = func.apply(null, node.proxy);
return res;
});
function memoized() {
if (!shallowEqual(lastArgs, arguments)) {
updateNode(node, arguments);
lastArgs = arguments;
}
return cache.value;
}
memoized.clearCache = () => {
return cache.clear();
};
return memoized;
}
// src/weakMapMemoize.ts
var StrongRef = class {
constructor(value) {
this.value = value;
}
deref() {
return this.value;
}
};
var Ref = typeof WeakRef !== "undefined" ? WeakRef : StrongRef;
var UNTERMINATED = 0;
var TERMINATED = 1;
function createCacheNode() {
return {
s: UNTERMINATED,
v: void 0,
o: null,
p: null
};
}
function weakMapMemoize(func, options = {}) {
let fnNode = createCacheNode();
const { resultEqualityCheck } = options;
let lastResult;
let resultsCount = 0;
function memoized() {
let cacheNode = fnNode;
const { length } = arguments;
for (let i = 0, l = length; i < l; i++) {
const arg = arguments[i];
if (typeof arg === "function" || typeof arg === "object" && arg !== null) {
let objectCache = cacheNode.o;
if (objectCache === null) {
cacheNode.o = objectCache = /* @__PURE__ */ new WeakMap();
}
const objectNode = objectCache.get(arg);
if (objectNode === void 0) {
cacheNode = createCacheNode();
objectCache.set(arg, cacheNode);
} else {
cacheNode = objectNode;
}
} else {
let primitiveCache = cacheNode.p;
if (primitiveCache === null) {
cacheNode.p = primitiveCache = /* @__PURE__ */ new Map();
}
const primitiveNode = primitiveCache.get(arg);
if (primitiveNode === void 0) {
cacheNode = createCacheNode();
primitiveCache.set(arg, cacheNode);
} else {
cacheNode = primitiveNode;
}
}
}
const terminatedNode = cacheNode;
let result;
if (cacheNode.s === TERMINATED) {
result = cacheNode.v;
} else {
result = func.apply(null, arguments);
resultsCount++;
if (resultEqualityCheck) {
const lastResultValue = lastResult?.deref?.() ?? lastResult;
if (lastResultValue != null && resultEqualityCheck(lastResultValue, result)) {
result = lastResultValue;
resultsCount !== 0 && resultsCount--;
}
const needsWeakRef = typeof result === "object" && result !== null || typeof result === "function";
lastResult = needsWeakRef ? new Ref(result) : result;
}
}
terminatedNode.s = TERMINATED;
terminatedNode.v = result;
return result;
}
memoized.clearCache = () => {
fnNode = createCacheNode();
memoized.resetResultsCount();
};
memoized.resultsCount = () => resultsCount;
memoized.resetResultsCount = () => {
resultsCount = 0;
};
return memoized;
}
// src/createSelectorCreator.ts
function createSelectorCreator(memoizeOrOptions, ...memoizeOptionsFromArgs) {
const createSelectorCreatorOptions = typeof memoizeOrOptions === "function" ? {
memoize: memoizeOrOptions,
memoizeOptions: memoizeOptionsFromArgs
} : memoizeOrOptions;
const createSelector2 = (...createSelectorArgs) => {
let recomputations = 0;
let dependencyRecomputations = 0;
let lastResult;
let directlyPassedOptions = {};
let resultFunc = createSelectorArgs.pop();
if (typeof resultFunc === "object") {
directlyPassedOptions = resultFunc;
resultFunc = createSelectorArgs.pop();
}
assertIsFunction(
resultFunc,
`createSelector expects an output function after the inputs, but received: [${typeof resultFunc}]`
);
const combinedOptions = {
...createSelectorCreatorOptions,
...directlyPassedOptions
};
const {
memoize,
memoizeOptions = [],
argsMemoize = weakMapMemoize,
argsMemoizeOptions = [],
devModeChecks = {}
} = combinedOptions;
const finalMemoizeOptions = ensureIsArray(memoizeOptions);
const finalArgsMemoizeOptions = ensureIsArray(argsMemoizeOptions);
const dependencies = getDependencies(createSelectorArgs);
const memoizedResultFunc = memoize(function recomputationWrapper() {
recomputations++;
return resultFunc.apply(
null,
arguments
);
}, ...finalMemoizeOptions);
let firstRun = true;
const selector = argsMemoize(function dependenciesChecker() {
dependencyRecomputations++;
const inputSelectorResults = collectInputSelectorResults(
dependencies,
arguments
);
lastResult = memoizedResultFunc.apply(null, inputSelectorResults);
if (process.env.NODE_ENV !== "production") {
const { identityFunctionCheck, inputStabilityCheck } = getDevModeChecksExecutionInfo(firstRun, devModeChecks);
if (identityFunctionCheck.shouldRun) {
identityFunctionCheck.run(
resultFunc,
inputSelectorResults,
lastResult
);
}
if (inputStabilityCheck.shouldRun) {
const inputSelectorResultsCopy = collectInputSelectorResults(
dependencies,
arguments
);
inputStabilityCheck.run(
{ inputSelectorResults, inputSelectorResultsCopy },
{ memoize, memoizeOptions: finalMemoizeOptions },
arguments
);
}
if (firstRun)
firstRun = false;
}
return lastResult;
}, ...finalArgsMemoizeOptions);
return Object.assign(selector, {
resultFunc,
memoizedResultFunc,
dependencies,
dependencyRecomputations: () => dependencyRecomputations,
resetDependencyRecomputations: () => {
dependencyRecomputations = 0;
},
lastResult: () => lastResult,
recomputations: () => recomputations,
resetRecomputations: () => {
recomputations = 0;
},
memoize,
argsMemoize
});
};
Object.assign(createSelector2, {
withTypes: () => createSelector2
});
return createSelector2;
}
var createSelector = /* @__PURE__ */ createSelectorCreator(weakMapMemoize);
// src/createStructuredSelector.ts
var createStructuredSelector = Object.assign(
(inputSelectorsObject, selectorCreator = createSelector) => {
assertIsObject(
inputSelectorsObject,
`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof inputSelectorsObject}`
);
const inputSelectorKeys = Object.keys(inputSelectorsObject);
const dependencies = inputSelectorKeys.map(
(key) => inputSelectorsObject[key]
);
const structuredSelector = selectorCreator(
dependencies,
(...inputSelectorResults) => {
return inputSelectorResults.reduce((composition, value, index) => {
composition[inputSelectorKeys[index]] = value;
return composition;
}, {});
}
);
return structuredSelector;
},
{ withTypes: () => createStructuredSelector }
);
export {
createSelector,
createSelectorCreator,
createStructuredSelector,
lruMemoize,
referenceEqualityCheck,
setGlobalDevModeChecks,
autotrackMemoize as unstable_autotrackMemoize,
weakMapMemoize
};
//# sourceMappingURL=reselect.mjs.map
@@ -0,0 +1 @@
{"name":"micromark-util-symbol","version":"2.0.1","requiresBuild":false,"files":{"license":{"checkedAt":1794532113106,"integrity":"sha512-ic4iF2Ap25Sn5T9MMw7nJ9C20WL6V01rybBBQi2Qx8cQC9/ERFEqGnove1HT65tK2TIKM30PZoOV3Qbz2FE//A==","mode":420,"size":1094},"lib/codes.js":{"checkedAt":1794532113106,"integrity":"sha512-AtFvcP2hU27QptbyR9kI6Aux1xXKKKNeTJnKJsVjHN5CiOjGjiCwqJfG5S/5a6omPolC4/NoHztGK5YYVeqIIA==","mode":420,"size":3707},"lib/constants.js":{"checkedAt":1794532113106,"integrity":"sha512-rIu/bjQDbV8O4yEsMBNtsHBBaVSWrD2MXhUaO0m0MVMb3pT+xfOLFjAAErz9V/BmOps9wJUJxWAgPJmbDFV3qA==","mode":420,"size":2514},"lib/default.js":{"checkedAt":1794532113106,"integrity":"sha512-fw0//hdvc1Ubx6SKbj6UqCAoKFKcElrqc1v60Lx5A+DP4xLYovqRi/+xdS5VWMWk2FWe+DIyXTDY7GIM2N+etQ==","mode":420,"size":142},"lib/types.js":{"checkedAt":1794532113106,"integrity":"sha512-0zR4QGiFbNYMfVFWme+lxUge0RWv3aWVYZKBGeZsIKsa+9gyeJzqxMQgjUOZsnRxzjdwzpHnjIOG5Wvke48aKQ==","mode":420,"size":13235},"lib/values.js":{"checkedAt":1794532113106,"integrity":"sha512-9lkXMa9Dq+svo4pS+uq64PGbC45/aBQlEyq4wAX+3Kp3R6Z6w4amCo/4ExjVQH7s6CLUtkKpd7TQ/gdrL9Y7tw==","mode":420,"size":2124},"package.json":{"checkedAt":1794532113107,"integrity":"sha512-tBZDqskADm5f7Hm+2tGr21KEGENeMfGngP+3fPJI0iyEnObYBgOodSDrL6+2P0bZQsgWjVFuJM2j0JNizmZ6Aw==","mode":420,"size":996},"lib/codes.d.ts.map":{"checkedAt":1794532113107,"integrity":"sha512-i9t2YDcHMJMfjJPpoyOBfzk8RhT5AJ42aHy3RjWoTtFUX+JaSmkgNgulU/rfB2M/8IubcnSl1SXvGSlKX80qtw==","mode":420,"size":97},"lib/constants.d.ts.map":{"checkedAt":1794532113107,"integrity":"sha512-JSA0GeY8nlCaGc61vrXrRnjtGHJFBg4fC/5gj0R4uk4QSjWI+j3G5SCC8PB2d5UVi0NfzdPLDp6GGumUtVIDOg==","mode":420,"size":105},"lib/default.d.ts.map":{"checkedAt":1794532113107,"integrity":"sha512-Vt6wre2IM3baDupkaFGYImBGwHcsOFc9cGtThI9Pm6V8+HmmHvZe7KzYq3Mw2QuaClvrh5e7krfnlYcLfuSiPA==","mode":420,"size":101},"lib/types.d.ts.map":{"checkedAt":1794532113107,"integrity":"sha512-uAU1W+eYLjjY1DIl/4XFE8yCv72Ueh4yIrf0MjXMsI+R/RXCr59bLhi62dJ2VrHWnDuCW499IE4ZfRK42nBq5w==","mode":420,"size":97},"lib/values.d.ts.map":{"checkedAt":1794532113107,"integrity":"sha512-dHZjqjn635+A0dhHU2PXIlzoQumc18VH9mh04beN1HUTZXl//iDswS5zwe6MKtYmqf4a5Cv2eoEFuEXATOhunA==","mode":420,"size":99},"readme.md":{"checkedAt":1794532113107,"integrity":"sha512-HKrHusfbKzip6DYk8Nle4ZhMY/J8wmLgAQys5+4NvF5vyG25+BZHNYQQAE836Rj/CKcH9OQpZ4cTpFcmeY0OsA==","mode":420,"size":4600},"lib/codes.d.ts":{"checkedAt":1794532113108,"integrity":"sha512-1yQC/Uh1YkJhRNSqUEiqF2aQwBsxZHS202i6m8KrsVwMMSEk0LEHozvN5dBRM3JOqKbFxP0CIb1UOeDibmu4rA==","mode":420,"size":3086},"lib/constants.d.ts":{"checkedAt":1794532113108,"integrity":"sha512-1mEAtOYLbjwzoM7722YNKnnjwRTh9udkwLwX/MMFKqksvADqmB9jFW1Hu96UZYoT0khtsibjz9DFTREFyYzKww==","mode":420,"size":1227},"lib/default.d.ts":{"checkedAt":1794532113108,"integrity":"sha512-OqJoynZStuZXK704kuXdEbnYFY4RC5ZuypVrh5G2rOF7YpN5ZSBjooxFYMyRq8n9UUVrtcDSY+vR1ARp6qPSTg==","mode":420,"size":191},"lib/types.d.ts":{"checkedAt":1794532113108,"integrity":"sha512-l4Xou47BtBQ30+sZdA0/gv1tuSECZjx9/3a7/QmYUFW53P3egEczmCUWezXoK3TJILwKUHLjVReTYcnlkYkgdQ==","mode":420,"size":4632},"lib/values.d.ts":{"checkedAt":1794532113108,"integrity":"sha512-OF67IMMD1za8jOOr3tnb/vpSw2R/I+24PVf03lvkT3YCoV6hWQsnIE+DNw+XYGawXzMYzE2MteyuTOaB6sno1g==","mode":420,"size":2483}}}
@@ -0,0 +1,19 @@
Copyright (C) 2011-2017 whitequark <whitequark@whitequark.org>
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.
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more