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,59 @@
## 6.0.2 (2025-06-19)
### Bug fixes
Add a .d.cts file to make TypeScript happy.
## 6.0.1 (2022-10-24)
### Bug fixes
Make sure the language object has a name.
## 6.0.0 (2022-06-08)
### Breaking changes
Update dependencies to 6.0.0
## 0.20.0 (2022-04-20)
### Breaking changes
Update dependencies to 0.20.0
## 0.19.2 (2022-02-15)
### Bug fixes
Fix highlighting of `null` tokens.
## 0.19.1 (2021-08-11)
### Bug fixes
Fix incorrect versions for @lezer dependencies.
## 0.19.0 (2021-08-11)
### Breaking changes
Update dependencies to 0.19.0
## 0.18.0 (2021-03-03)
### Breaking changes
Update dependencies to 0.18.
## 0.17.1 (2021-01-06)
### New features
The package now also exports a CommonJS module.
## 0.17.0 (2020-12-29)
### Breaking changes
First numbered release.
@@ -0,0 +1,21 @@
Copyright (c) 2011 Alexander Shtuchkin
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,71 @@
import { isScalar, isCollection } from '../nodes/identity.js';
import { visit } from '../visit.js';
/**
* Verify that the input string is a valid anchor.
*
* Will throw on errors.
*/
function anchorIsValid(anchor) {
if (/[\x00-\x19\s,[\]{}]/.test(anchor)) {
const sa = JSON.stringify(anchor);
const msg = `Anchor must not contain whitespace or control characters: ${sa}`;
throw new Error(msg);
}
return true;
}
function anchorNames(root) {
const anchors = new Set();
visit(root, {
Value(_key, node) {
if (node.anchor)
anchors.add(node.anchor);
}
});
return anchors;
}
/** Find a new anchor name with the given `prefix` and a one-indexed suffix. */
function findNewAnchor(prefix, exclude) {
for (let i = 1; true; ++i) {
const name = `${prefix}${i}`;
if (!exclude.has(name))
return name;
}
}
function createNodeAnchors(doc, prefix) {
const aliasObjects = [];
const sourceObjects = new Map();
let prevAnchors = null;
return {
onAnchor: (source) => {
aliasObjects.push(source);
prevAnchors ?? (prevAnchors = anchorNames(doc));
const anchor = findNewAnchor(prefix, prevAnchors);
prevAnchors.add(anchor);
return anchor;
},
/**
* With circular references, the source node is only resolved after all
* of its child nodes are. This is why anchors are set only after all of
* the nodes have been created.
*/
setAnchors: () => {
for (const source of aliasObjects) {
const ref = sourceObjects.get(source);
if (typeof ref === 'object' &&
ref.anchor &&
(isScalar(ref.node) || isCollection(ref.node))) {
ref.node.anchor = ref.anchor;
}
else {
const error = new Error('Failed to resolve repeated object (this should not happen)');
error.source = source;
throw error;
}
}
},
sourceObjects
};
}
export { anchorIsValid, anchorNames, createNodeAnchors, findNewAnchor };
@@ -0,0 +1,28 @@
import baseAssignValue from './_baseAssignValue.js';
import eq from './eq.js';
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Assigns `value` to `key` of `object` if the existing value is not equivalent
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* for equality comparisons.
*
* @private
* @param {Object} object The object to modify.
* @param {string} key The key of the property to assign.
* @param {*} value The value to assign.
*/
function assignValue(object, key, value) {
var objValue = object[key];
if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
(value === undefined && !(key in object))) {
baseAssignValue(object, key, value);
}
}
export default assignValue;
@@ -0,0 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.KeyOfFromMappedResult = KeyOfFromMappedResult;
const index_1 = require("../mapped/index");
const keyof_1 = require("./keyof");
const value_1 = require("../clone/value");
// prettier-ignore
function FromProperties(properties, options) {
const result = {};
for (const K2 of globalThis.Object.getOwnPropertyNames(properties))
result[K2] = (0, keyof_1.KeyOf)(properties[K2], (0, value_1.Clone)(options));
return result;
}
// prettier-ignore
function FromMappedResult(mappedResult, options) {
return FromProperties(mappedResult.properties, options);
}
// prettier-ignore
function KeyOfFromMappedResult(mappedResult, options) {
const properties = FromMappedResult(mappedResult, options);
return (0, index_1.MappedResult)(properties);
}
@@ -0,0 +1,61 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
import {DOMAttributes} from '@react-types/shared';
import {ReactNode} from 'react';
import {useId} from '@react-aria/utils';
export interface AriaListBoxSectionProps {
/** The heading for the section. */
heading?: ReactNode,
/** An accessibility label for the section. Required if `heading` is not present. */
'aria-label'?: string
}
export interface ListBoxSectionAria {
/** Props for the wrapper list item. */
itemProps: DOMAttributes,
/** Props for the heading element, if any. */
headingProps: DOMAttributes,
/** Props for the group element. */
groupProps: DOMAttributes
}
/**
* Provides the behavior and accessibility implementation for a section in a listbox.
* See `useListBox` for more details about listboxes.
* @param props - Props for the section.
*/
export function useListBoxSection(props: AriaListBoxSectionProps): ListBoxSectionAria {
let {heading, 'aria-label': ariaLabel} = props;
let headingId = useId();
return {
itemProps: {
role: 'presentation'
},
headingProps: heading ? {
// Techincally, listbox cannot contain headings according to ARIA.
// We hide the heading from assistive technology, using role="presentation",
// and only use it as a visual label for the nested group.
id: headingId,
role: 'presentation'
} : {},
groupProps: {
role: 'group',
'aria-label': ariaLabel,
'aria-labelledby': heading ? headingId : undefined
}
};
}
@@ -0,0 +1,171 @@
import { startWaapiAnimation } from 'motion-dom';
import { noop } from 'motion-utils';
import { optimizedAppearDataId } from './data-id.mjs';
import { getOptimisedAppearId } from './get-appear-id.mjs';
import { handoffOptimizedAppearAnimation } from './handoff.mjs';
import { appearAnimationStore, appearComplete } from './store.mjs';
import { appearStoreId } from './store-id.mjs';
/**
* A single time to use across all animations to manually set startTime
* and ensure they're all in sync.
*/
let startFrameTime;
/**
* A dummy animation to detect when Chrome is ready to start
* painting the page and hold off from triggering the real animation
* until then. We only need one animation to detect paint ready.
*
* https://bugs.chromium.org/p/chromium/issues/detail?id=1406850
*/
let readyAnimation;
/**
* Keep track of animations that were suspended vs cancelled so we
* can easily resume them when we're done measuring layout.
*/
const suspendedAnimations = new Set();
function resumeSuspendedAnimations() {
suspendedAnimations.forEach((data) => {
data.animation.play();
data.animation.startTime = data.startTime;
});
suspendedAnimations.clear();
}
function startOptimizedAppearAnimation(element, name, keyframes, options, onReady) {
// Prevent optimised appear animations if Motion has already started animating.
if (window.MotionIsMounted) {
return;
}
const id = element.dataset[optimizedAppearDataId];
if (!id)
return;
window.MotionHandoffAnimation = handoffOptimizedAppearAnimation;
const storeId = appearStoreId(id, name);
if (!readyAnimation) {
readyAnimation = startWaapiAnimation(element, name, [keyframes[0], keyframes[0]],
/**
* 10 secs is basically just a super-safe duration to give Chrome
* long enough to get the animation ready.
*/
{ duration: 10000, ease: "linear" });
appearAnimationStore.set(storeId, {
animation: readyAnimation,
startTime: null,
});
/**
* If there's no readyAnimation then there's been no instantiation
* of handoff animations.
*/
window.MotionHandoffAnimation = handoffOptimizedAppearAnimation;
window.MotionHasOptimisedAnimation = (elementId, valueName) => {
if (!elementId)
return false;
/**
* Keep a map of elementIds that have started animating. We check
* via ID instead of Element because of hydration errors and
* pre-hydration checks. We also actively record IDs as they start
* animating rather than simply checking for data-appear-id as
* this attrbute might be present but not lead to an animation, for
* instance if the element's appear animation is on a different
* breakpoint.
*/
if (!valueName) {
return appearComplete.has(elementId);
}
const animationId = appearStoreId(elementId, valueName);
return Boolean(appearAnimationStore.get(animationId));
};
window.MotionHandoffMarkAsComplete = (elementId) => {
if (appearComplete.has(elementId)) {
appearComplete.set(elementId, true);
}
};
window.MotionHandoffIsComplete = (elementId) => {
return appearComplete.get(elementId) === true;
};
/**
* We only need to cancel transform animations as
* they're the ones that will interfere with the
* layout animation measurements.
*/
window.MotionCancelOptimisedAnimation = (elementId, valueName, frame, canResume) => {
const animationId = appearStoreId(elementId, valueName);
const data = appearAnimationStore.get(animationId);
if (!data)
return;
if (frame && canResume === undefined) {
/**
* Wait until the end of the subsequent frame to cancel the animation
* to ensure we don't remove the animation before the main thread has
* had a chance to resolve keyframes and render.
*/
frame.postRender(() => {
frame.postRender(() => {
data.animation.cancel();
});
});
}
else {
data.animation.cancel();
}
if (frame && canResume) {
suspendedAnimations.add(data);
frame.render(resumeSuspendedAnimations);
}
else {
appearAnimationStore.delete(animationId);
/**
* If there are no more animations left, we can remove the cancel function.
* This will let us know when we can stop checking for conflicting layout animations.
*/
if (!appearAnimationStore.size) {
window.MotionCancelOptimisedAnimation = undefined;
}
}
};
window.MotionCheckAppearSync = (visualElement, valueName, value) => {
const appearId = getOptimisedAppearId(visualElement);
if (!appearId)
return;
const valueIsOptimised = window.MotionHasOptimisedAnimation?.(appearId, valueName);
const externalAnimationValue = visualElement.props.values?.[valueName];
if (!valueIsOptimised || !externalAnimationValue)
return;
const removeSyncCheck = value.on("change", (latestValue) => {
if (externalAnimationValue.get() !== latestValue) {
window.MotionCancelOptimisedAnimation?.(appearId, valueName);
removeSyncCheck();
}
});
return removeSyncCheck;
};
}
const startAnimation = () => {
readyAnimation.cancel();
const appearAnimation = startWaapiAnimation(element, name, keyframes, options);
/**
* Record the time of the first started animation. We call performance.now() once
* here and once in handoff to ensure we're getting
* close to a frame-locked time. This keeps all animations in sync.
*/
if (startFrameTime === undefined) {
startFrameTime = performance.now();
}
appearAnimation.startTime = startFrameTime;
appearAnimationStore.set(storeId, {
animation: appearAnimation,
startTime: startFrameTime,
});
if (onReady)
onReady(appearAnimation);
};
appearComplete.set(id, false);
if (readyAnimation.ready) {
readyAnimation.ready.then(startAnimation).catch(noop);
}
else {
startAnimation();
}
}
export { startOptimizedAppearAnimation };
@@ -0,0 +1 @@
!function(e){var t;"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define(e):("undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.objectHash=e())}(function(){return function r(o,i,u){function s(n,e){if(!i[n]){if(!o[n]){var t="function"==typeof require&&require;if(!e&&t)return t(n,!0);if(a)return a(n,!0);throw new Error("Cannot find module '"+n+"'")}e=i[n]={exports:{}};o[n][0].call(e.exports,function(e){var t=o[n][1][e];return s(t||e)},e,e.exports,r,o,i,u)}return i[n].exports}for(var a="function"==typeof require&&require,e=0;e<u.length;e++)s(u[e]);return s}({1:[function(w,b,m){!function(e,n,s,c,d,h,p,g,y){"use strict";var r=w("crypto");function t(e,t){t=u(e,t);var n;return void 0===(n="passthrough"!==t.algorithm?r.createHash(t.algorithm):new l).write&&(n.write=n.update,n.end=n.update),f(t,n).dispatch(e),n.update||n.end(""),n.digest?n.digest("buffer"===t.encoding?void 0:t.encoding):(e=n.read(),"buffer"!==t.encoding?e.toString(t.encoding):e)}(m=b.exports=t).sha1=function(e){return t(e)},m.keys=function(e){return t(e,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})},m.MD5=function(e){return t(e,{algorithm:"md5",encoding:"hex"})},m.keysMD5=function(e){return t(e,{algorithm:"md5",encoding:"hex",excludeValues:!0})};var o=r.getHashes?r.getHashes().slice():["sha1","md5"],i=(o.push("passthrough"),["buffer","hex","binary","base64"]);function u(e,t){var n={};if(n.algorithm=(t=t||{}).algorithm||"sha1",n.encoding=t.encoding||"hex",n.excludeValues=!!t.excludeValues,n.algorithm=n.algorithm.toLowerCase(),n.encoding=n.encoding.toLowerCase(),n.ignoreUnknown=!0===t.ignoreUnknown,n.respectType=!1!==t.respectType,n.respectFunctionNames=!1!==t.respectFunctionNames,n.respectFunctionProperties=!1!==t.respectFunctionProperties,n.unorderedArrays=!0===t.unorderedArrays,n.unorderedSets=!1!==t.unorderedSets,n.unorderedObjects=!1!==t.unorderedObjects,n.replacer=t.replacer||void 0,n.excludeKeys=t.excludeKeys||void 0,void 0===e)throw new Error("Object argument required.");for(var r=0;r<o.length;++r)o[r].toLowerCase()===n.algorithm.toLowerCase()&&(n.algorithm=o[r]);if(-1===o.indexOf(n.algorithm))throw new Error('Algorithm "'+n.algorithm+'" not supported. supported values: '+o.join(", "));if(-1===i.indexOf(n.encoding)&&"passthrough"!==n.algorithm)throw new Error('Encoding "'+n.encoding+'" not supported. supported values: '+i.join(", "));return n}function a(e){if("function"==typeof e)return null!=/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i.exec(Function.prototype.toString.call(e))}function f(o,t,i){i=i||[];function u(e){return t.update?t.update(e,"utf8"):t.write(e,"utf8")}return{dispatch:function(e){return this["_"+(null===(e=o.replacer?o.replacer(e):e)?"null":typeof e)](e)},_object:function(t){var n,e=Object.prototype.toString.call(t),r=/\[object (.*)\]/i.exec(e);r=(r=r?r[1]:"unknown:["+e+"]").toLowerCase();if(0<=(e=i.indexOf(t)))return this.dispatch("[CIRCULAR:"+e+"]");if(i.push(t),void 0!==s&&s.isBuffer&&s.isBuffer(t))return u("buffer:"),u(t);if("object"===r||"function"===r||"asyncfunction"===r)return e=Object.keys(t),o.unorderedObjects&&(e=e.sort()),!1===o.respectType||a(t)||e.splice(0,0,"prototype","__proto__","constructor"),o.excludeKeys&&(e=e.filter(function(e){return!o.excludeKeys(e)})),u("object:"+e.length+":"),n=this,e.forEach(function(e){n.dispatch(e),u(":"),o.excludeValues||n.dispatch(t[e]),u(",")});if(!this["_"+r]){if(o.ignoreUnknown)return u("["+r+"]");throw new Error('Unknown object type "'+r+'"')}this["_"+r](t)},_array:function(e,t){t=void 0!==t?t:!1!==o.unorderedArrays;var n=this;if(u("array:"+e.length+":"),!t||e.length<=1)return e.forEach(function(e){return n.dispatch(e)});var r=[],t=e.map(function(e){var t=new l,n=i.slice();return f(o,t,n).dispatch(e),r=r.concat(n.slice(i.length)),t.read().toString()});return i=i.concat(r),t.sort(),this._array(t,!1)},_date:function(e){return u("date:"+e.toJSON())},_symbol:function(e){return u("symbol:"+e.toString())},_error:function(e){return u("error:"+e.toString())},_boolean:function(e){return u("bool:"+e.toString())},_string:function(e){u("string:"+e.length+":"),u(e.toString())},_function:function(e){u("fn:"),a(e)?this.dispatch("[native]"):this.dispatch(e.toString()),!1!==o.respectFunctionNames&&this.dispatch("function-name:"+String(e.name)),o.respectFunctionProperties&&this._object(e)},_number:function(e){return u("number:"+e.toString())},_xml:function(e){return u("xml:"+e.toString())},_null:function(){return u("Null")},_undefined:function(){return u("Undefined")},_regexp:function(e){return u("regex:"+e.toString())},_uint8array:function(e){return u("uint8array:"),this.dispatch(Array.prototype.slice.call(e))},_uint8clampedarray:function(e){return u("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(e))},_int8array:function(e){return u("int8array:"),this.dispatch(Array.prototype.slice.call(e))},_uint16array:function(e){return u("uint16array:"),this.dispatch(Array.prototLine truncated
@@ -0,0 +1,20 @@
import { File } from "../index";
import { type TokenType } from "../tokenizer/types";
export declare function parseTopLevel(): File;
export declare function parseStatement(declaration: boolean): void;
export declare function parseDecorators(): void;
export declare function baseParseMaybeDecoratorArguments(): void;
export declare function parseVarStatement(isBlockScope: boolean): void;
export declare function parseBlock(isFunctionScope?: boolean, contextId?: number): void;
export declare function parseBlockBody(end: TokenType): void;
export declare function parseFunction(functionStart: number, isStatement: boolean, optionalId?: boolean): void;
export declare function parseFunctionParams(allowModifiers?: boolean, funcContextId?: number): void;
export declare function parseClass(isStatement: boolean, optionalId?: boolean): void;
export declare function parseClassPropertyName(classContextId: number): void;
export declare function parsePostMemberNameModifiers(): void;
export declare function parseClassProperty(): void;
export declare function parseExport(): void;
export declare function parseExportFrom(): void;
export declare function baseParseExportStar(): void;
export declare function parseExportSpecifiers(): void;
export declare function parseImport(): void;
@@ -0,0 +1,50 @@
import {useState as $fuDHA$useState, useEffect as $fuDHA$useEffect} from "react";
import {useIsSSR as $fuDHA$useIsSSR} from "@react-aria/ssr";
/*
* 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.
*/
let $5df64b3807dc15ee$var$visualViewport = typeof document !== 'undefined' && window.visualViewport;
function $5df64b3807dc15ee$export$d699905dd57c73ca() {
let isSSR = (0, $fuDHA$useIsSSR)();
let [size, setSize] = (0, $fuDHA$useState)(()=>isSSR ? {
width: 0,
height: 0
} : $5df64b3807dc15ee$var$getViewportSize());
(0, $fuDHA$useEffect)(()=>{
// Use visualViewport api to track available height even on iOS virtual keyboard opening
let onResize = ()=>{
setSize((size)=>{
let newSize = $5df64b3807dc15ee$var$getViewportSize();
if (newSize.width === size.width && newSize.height === size.height) return size;
return newSize;
});
};
if (!$5df64b3807dc15ee$var$visualViewport) window.addEventListener('resize', onResize);
else $5df64b3807dc15ee$var$visualViewport.addEventListener('resize', onResize);
return ()=>{
if (!$5df64b3807dc15ee$var$visualViewport) window.removeEventListener('resize', onResize);
else $5df64b3807dc15ee$var$visualViewport.removeEventListener('resize', onResize);
};
}, []);
return size;
}
function $5df64b3807dc15ee$var$getViewportSize() {
return {
width: $5df64b3807dc15ee$var$visualViewport && ($5df64b3807dc15ee$var$visualViewport === null || $5df64b3807dc15ee$var$visualViewport === void 0 ? void 0 : $5df64b3807dc15ee$var$visualViewport.width) || window.innerWidth,
height: $5df64b3807dc15ee$var$visualViewport && ($5df64b3807dc15ee$var$visualViewport === null || $5df64b3807dc15ee$var$visualViewport === void 0 ? void 0 : $5df64b3807dc15ee$var$visualViewport.height) || window.innerHeight
};
}
export {$5df64b3807dc15ee$export$d699905dd57c73ca as useViewportSize};
//# sourceMappingURL=useViewportSize.module.js.map
@@ -0,0 +1 @@
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var _typeof=typeof Symbol==='function'&&typeof Symbol.iterator==='symbol'?function(obj){return typeof obj}:function(obj){return obj&&typeof Symbol==='function'&&obj.constructor===Symbol&&obj!==Symbol.prototype?'symbol':typeof obj};exports.default=parse;var _util=require('./util');var util=_interopRequireWildcard(_util);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}var source=void 0;var parseState=void 0;var stack=void 0;var pos=void 0;var line=void 0;var column=void 0;var token=void 0;var key=void 0;var root=void 0;function parse(text,reviver){source=String(text);parseState='start';stack=[];pos=0;line=1;column=0;token=undefined;key=undefined;root=undefined;do{token=lex();parseStates[parseState]()}while(token.type!=='eof');if(typeof reviver==='function'){return internalize({'':root},'',reviver)}return root}function internalize(holder,name,reviver){var value=holder[name];if(value!=null&&(typeof value==='undefined'?'undefined':_typeof(value))==='object'){if(Array.isArray(value)){for(var i=0;i<value.length;i++){var _key=String(i);var replacement=internalize(value,_key,reviver);if(replacement===undefined){delete value[_key]}else{Object.defineProperty(value,_key,{value:replacement,writable:true,enumerable:true,configurable:true})}}}else{for(var _key2 in value){var _replacement=internalize(value,_key2,reviver);if(_replacement===undefined){delete value[_key2]}else{Object.defineProperty(value,_key2,{value:_replacement,writable:true,enumerable:true,configurable:true})}}}}return reviver.call(holder,name,value)}var lexState=void 0;var buffer=void 0;var doubleQuote=void 0;var _sign=void 0;var c=void 0;function lex(){lexState='default';buffer='';doubleQuote=false;_sign=1;for(;;){c=peek();var _token=lexStates[lexState]();if(_token){return _token}}}function peek(){if(source[pos]){return String.fromCodePoint(source.codePointAt(pos))}}function read(){var c=peek();if(c==='\n'){line++;column=0}else if(c){column+=c.length}else{column++}if(c){pos+=c.length}return c}var lexStates={default:function _default(){switch(c){case'\t':case'\x0B':case'\f':case' ':case'\xA0':case'\uFEFF':case'\n':case'\r':case'\u2028':case'\u2029':read();return;case'/':read();lexState='comment';return;case undefined:read();return newToken('eof');}if(util.isSpaceSeparator(c)){read();return}return lexStates[parseState]()},comment:function comment(){switch(c){case'*':read();lexState='multiLineComment';return;case'/':read();lexState='singleLineComment';return;}throw invalidChar(read())},multiLineComment:function multiLineComment(){switch(c){case'*':read();lexState='multiLineCommentAsterisk';return;case undefined:throw invalidChar(read());}read()},multiLineCommentAsterisk:function multiLineCommentAsterisk(){switch(c){case'*':read();return;case'/':read();lexState='default';return;case undefined:throw invalidChar(read());}read();lexState='multiLineComment'},singleLineComment:function singleLineComment(){switch(c){case'\n':case'\r':case'\u2028':case'\u2029':read();lexState='default';return;case undefined:read();return newToken('eof');}read()},value:function value(){switch(c){case'{':case'[':return newToken('punctuator',read());case'n':read();literal('ull');return newToken('null',null);case't':read();literal('rue');return newToken('boolean',true);case'f':read();literal('alse');return newToken('boolean',false);case'-':case'+':if(read()==='-'){_sign=-1}lexState='sign';return;case'.':buffer=read();lexState='decimalPointLeading';return;case'0':buffer=read();lexState='zero';return;case'1':case'2':case'3':case'4':case'5':case'6':case'7':case'8':case'9':buffer=read();lexState='decimalInteger';return;case'I':read();literal('nfinity');return newToken('numeric',Infinity);case'N':read();literal('aN');return newToken('numeric',NaN);case'"':case'\'':doubleQuote=read()==='"';buffer='';lexState='string';return;}throw invalidChar(read())},identifierNameStartEscape:function identifierNameStartEscape(){if(c!=='u'){throw invalidChar(read())}read();var u=unicodeEscape();switch(u){case'$':case'_':break;default:if(!util.isIdStartChar(u)){throw invalidIdentifier()}break;}buffer+=u;lexState='identifierName'},identifierName:function identifierName(){switch(c){case'$':case'_':case'\u200C':case'\u200D':buffer+=read();return;case'\\':read();lexState='identifierNameEscape';return;}if(util.isIdContinueChar(c)){buffer+=read();return}return newToken('identifier',buffer)},identifierNameEscape:function identifierNameEscape(){if(c!=='u'){throw invalidChar(read())}read();var u=unicodeEscape();switch(u){case'$':case'_':case'\u200C':case'\u200D':break;default:if(!util.isIdContinueChar(u)){throw invalidIdentifier()}break;}buffer+=u;lexState='identifierName'},sign:function sign(){switch(c){case'.':buffer=read();lexState='decimalPointLeading';return;caseLine truncated
@@ -0,0 +1,43 @@
### Versions
## 1.0.7
###### *Jan 7, 2021*
- package: add jsdelivr source path
## 1.0.6
###### *Jan 3, 2021*
- use default export in the entry file
- fix library import in `spec.js`
## 1.0.5
###### *Jan 3, 2021*
- replace `webpack` with `rollup`
- add cjs/es bundles
## 1.0.4
###### *Nov 15, 2020*
- revert "corrected moudles"
## 1.0.3
###### *Nov 15, 2020*
- remove `src` from `.npmignore` and refer it to `package.module`
## 1.0.2
###### *Nov 14, 2020*
- fix `module` path in package.json
## 1.0.1
###### *Aug 6, 2020*
- add default export into the index point
## 1.0.0
###### *Aug 6, 2020*
🎉 First stable version of the library
@@ -0,0 +1,5 @@
import type { TSchema } from '../schema/index';
import { TExclude } from './exclude';
import { type TTemplateLiteral, type TTemplateLiteralToUnion } from '../template-literal/index';
export type TExcludeFromTemplateLiteral<L extends TTemplateLiteral, R extends TSchema> = (TExclude<TTemplateLiteralToUnion<L>, R>);
export declare function ExcludeFromTemplateLiteral<L extends TTemplateLiteral, R extends TSchema>(L: L, R: R): TExcludeFromTemplateLiteral<L, R>;
@@ -0,0 +1 @@
!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],a):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_en_il=a(e.dayjs)}(this,(function(e){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var _=a(e),t={name:"en-il",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"}};return _.default.locale(t,null,!0),t}));
@@ -0,0 +1,17 @@
import {useLink as $298d61e98472621b$export$dcf14c9974fe2767} from "./useLink.mjs";
/*
* 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.
*/
export {$298d61e98472621b$export$dcf14c9974fe2767 as useLink};
//# sourceMappingURL=module.js.map
@@ -0,0 +1,93 @@
{
"name": "react-error-boundary",
"version": "5.0.0",
"description": "Simple reusable React error boundary component",
"author": "Brian Vaughn <brian.david.vaughn@gmail.com>",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/bvaughn/react-error-boundary"
},
"packageManager": "pnpm@9.6.0",
"main": "dist/react-error-boundary.cjs.js",
"module": "dist/react-error-boundary.esm.js",
"exports": {
".": {
"types": {
"import": "./dist/react-error-boundary.cjs.mjs",
"default": "./dist/react-error-boundary.cjs.js"
},
"development": {
"module": "./dist/react-error-boundary.development.esm.js",
"import": "./dist/react-error-boundary.development.cjs.mjs",
"default": "./dist/react-error-boundary.development.cjs.js"
},
"module": "./dist/react-error-boundary.esm.js",
"import": "./dist/react-error-boundary.cjs.mjs",
"default": "./dist/react-error-boundary.cjs.js"
},
"./package.json": "./package.json"
},
"imports": {
"#is-development": {
"development": "./src/env-conditions/development.ts",
"default": "./src/env-conditions/production.ts"
}
},
"types": "dist/react-error-boundary.cjs.d.ts",
"files": [
"dist"
],
"sideEffects": false,
"scripts": {
"clear": "pnpm clear:builds & pnpm clear:node_modules",
"clear:builds": "rimraf ./dist",
"clear:node_modules": "rimraf ./node_modules",
"prerelease": "preconstruct build",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"test": "jest",
"test:watch": "jest --watch",
"typescript": "tsc --noEmit",
"typescript:watch": "tsc --noEmit --watch"
},
"dependencies": {
"@babel/runtime": "^7.12.5"
},
"devDependencies": {
"@babel/preset-env": "^7.22.5",
"@babel/preset-typescript": "^7.21.5",
"@preconstruct/cli": "^2.8.1",
"@types/assert": "^1.5.10",
"@types/jest": "^26.0.15",
"@types/react": "^18.3.17",
"@types/react-dom": "^18",
"assert": "^2.0.0",
"eslint": "^9.13.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.37.2",
"globals": "^15.11.0",
"jest": "^29.4.3",
"jest-environment-jsdom": "^29.4.3",
"prettier": "^3.0.1",
"react": "^18",
"react-dom": "^18",
"rimraf": "^6.0.1",
"ts-jest": "^29.0.5",
"typescript": "^5.1.6",
"typescript-eslint": "^8.18.0"
},
"peerDependencies": {
"react": ">=16.13.1"
},
"preconstruct": {
"exports": {
"importConditionDefaultExport": "default"
},
"___experimentalFlags_WILL_CHANGE_IN_PATCH": {
"importsConditions": true
}
}
}
@@ -0,0 +1 @@
{"version":3,"sources":["../../src/index.ts","../../src/immerImports.ts","../../src/reselectImports.ts","../../src/createDraftSafeSelector.ts","../../src/reduxImports.ts","../../src/devtoolsExtension.ts","../../src/getDefaultMiddleware.ts","../../src/tsHelpers.ts","../../src/createAction.ts","../../src/actionCreatorInvariantMiddleware.ts","../../src/utils.ts","../../src/immutableStateInvariantMiddleware.ts","../../src/serializableStateInvariantMiddleware.ts","../../src/autoBatchEnhancer.ts","../../src/getDefaultEnhancers.ts","../../src/configureStore.ts","../../src/mapBuilders.ts","../../src/createReducer.ts","../../src/matchers.ts","../../src/nanoid.ts","../../src/createAsyncThunk.ts","../../src/createSlice.ts","../../src/entities/entity_state.ts","../../src/entities/state_selectors.ts","../../src/entities/state_adapter.ts","../../src/entities/utils.ts","../../src/entities/unsorted_state_adapter.ts","../../src/entities/sorted_state_adapter.ts","../../src/entities/create_adapter.ts","../../src/listenerMiddleware/exceptions.ts","../../src/listenerMiddleware/utils.ts","../../src/listenerMiddleware/task.ts","../../src/listenerMiddleware/index.ts","../../src/dynamicMiddleware/index.ts","../../src/combineSlices.ts","../../src/formatProdErrorMessage.ts"],"sourcesContent":["// This must remain here so that the `mangleErrors.cjs` build script\n// does not have to import this into each source file it rewrites.\nimport { formatProdErrorMessage } from './formatProdErrorMessage';\nexport * from 'redux';\nexport { freeze, original } from 'immer';\nexport { createNextState, current, isDraft } from './immerImports';\nexport type { Draft, WritableDraft } from 'immer';\nexport { createSelector, lruMemoize } from 'reselect';\nexport { createSelectorCreator, weakMapMemoize } from './reselectImports';\nexport type { Selector, OutputSelector } from 'reselect';\nexport { createDraftSafeSelector, createDraftSafeSelectorCreator } from './createDraftSafeSelector';\nexport type { ThunkAction, ThunkDispatch, ThunkMiddleware } from 'redux-thunk';\nexport {\n// js\nconfigureStore } from './configureStore';\nexport type {\n// types\nConfigureStoreOptions, EnhancedStore } from './configureStore';\nexport type { DevToolsEnhancerOptions } from './devtoolsExtension';\nexport {\n// js\ncreateAction, isActionCreator, isFSA as isFluxStandardAction } from './createAction';\nexport type {\n// types\nPayloadAction, PayloadActionCreator, ActionCreatorWithNonInferrablePayload, ActionCreatorWithOptionalPayload, ActionCreatorWithPayload, ActionCreatorWithoutPayload, ActionCreatorWithPreparedPayload, PrepareAction } from './createAction';\nexport {\n// js\ncreateReducer } from './createReducer';\nexport type {\n// types\nActions, CaseReducer, CaseReducers } from './createReducer';\nexport {\n// js\ncreateSlice, buildCreateSlice, asyncThunkCreator, ReducerType } from './createSlice';\nexport type {\n// types\nCreateSliceOptions, Slice, CaseReducerActions, SliceCaseReducers, ValidateSliceCaseReducers, CaseReducerWithPrepare, ReducerCreators, SliceSelectors } from './createSlice';\nexport type { ActionCreatorInvariantMiddlewareOptions } from './actionCreatorInvariantMiddleware';\nexport { createActionCreatorInvariantMiddleware } from './actionCreatorInvariantMiddleware';\nexport {\n// js\ncreateImmutableStateInvariantMiddleware, isImmutableDefault } from './immutableStateInvariantMiddleware';\nexport type {\n// types\nImmutableStateInvariantMiddlewareOptions } from './immutableStateInvariantMiddleware';\nexport {\n// js\ncreateSerializableStateInvariantMiddleware, findNonSerializableValue, isPlain } from './serializableStateInvariantMiddleware';\nexport type {\n// types\nSerializableStateInvariantMiddlewareOptions } from './serializableStateInvariantMiddleware';\nexport type {\n// types\nActionReducerMapBuilder, AsyncThunkReducers } from './mapBuilders';\nexport { Tuple } from './utils';\nexport { createEntityAdapter } from './entities/create_adapter';\nexport type { EntityState, EntityAdapter, EntitySelectors, EntityStateAdapter, EntityId, Update, IdSelector, Comparer } from './entities/models';\nexport { createAsyncThunk, unwrapResult, miniSerializeError } from './createAsyncThunk';\nexport type { AsyncThunk, AsyncThunkConfig, AsyncThunkDispatchConfig, AsyncThunkOptions, AsyncThunkAction, AsyncThunkPayloadCreatorReturnValue, AsyncThunkPayloadCreator, GetState, GetThunkAPI, SerializedError, CreateAsyncThunkFunction } from './createAsyncThunk';\nexport {\n// js\nisAllOf, isAnyOf, isPending, isRejected, isFulfilled, isAsyncThunkAction, isRejectedWithValue } from './matchers';\nexport type {\n// types\nActionMatchingAllOf, ActionMatchingAnyOf } from './matchers';\nexport { nanoid } from './nanoid';\nexport type { ListenerEffect, ListenerMiddleware, ListenerEffectAPI, ListenerMiddlewareInstance, CreateListenerMiddlewareOptions, ListenerErrorHandler, TypedStartListening, TypedAddListener, TypedStopListening, TypedRemoveListener, UnsubscribeListener, UnsubscLine truncated
@@ -0,0 +1,5 @@
declare module 'emoji-regex/RGI_Emoji' {
function emojiRegex(): RegExp;
export = emojiRegex;
}
@@ -0,0 +1,60 @@
import { transformPropOrder, getValueAsType, numberValueTypes } from 'motion-dom';
const translateAlias = {
x: "translateX",
y: "translateY",
z: "translateZ",
transformPerspective: "perspective",
};
const numTransforms = transformPropOrder.length;
/**
* Build a CSS transform style from individual x/y/scale etc properties.
*
* This outputs with a default order of transforms/scales/rotations, this can be customised by
* providing a transformTemplate function.
*/
function buildTransform(latestValues, transform, transformTemplate) {
// The transform string we're going to build into.
let transformString = "";
let transformIsDefault = true;
/**
* Loop over all possible transforms in order, adding the ones that
* are present to the transform string.
*/
for (let i = 0; i < numTransforms; i++) {
const key = transformPropOrder[i];
const value = latestValues[key];
if (value === undefined)
continue;
let valueIsDefault = true;
if (typeof value === "number") {
valueIsDefault = value === (key.startsWith("scale") ? 1 : 0);
}
else {
valueIsDefault = parseFloat(value) === 0;
}
if (!valueIsDefault || transformTemplate) {
const valueAsType = getValueAsType(value, numberValueTypes[key]);
if (!valueIsDefault) {
transformIsDefault = false;
const transformName = translateAlias[key] || key;
transformString += `${transformName}(${valueAsType}) `;
}
if (transformTemplate) {
transform[key] = valueAsType;
}
}
}
transformString = transformString.trim();
// If we have a custom `transform` template, pass our transform values and
// generated transformString to that before returning
if (transformTemplate) {
transformString = transformTemplate(transform, transformIsDefault ? "" : transformString);
}
else if (transformIsDefault) {
transformString = "none";
}
return transformString;
}
export { buildTransform };
@@ -0,0 +1 @@
{"name":"@types/serve-static","version":"1.15.10","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532101858,"integrity":"sha512-HQaIQk9pwOcyKutyDk4o2a87WnotwYuLGYFW43emGm4FvIJFKPyg+OYaw5sTegKAKf+C5SKa1ACjzCLivbaHrQ==","mode":420,"size":1141},"README.md":{"checkedAt":1794532101859,"integrity":"sha512-hewpCT1xmINF0uCKY3wkj2ylal+F/ag3bVCsvyo3SxgZEjKI0nEq8Ej2QZxZ2ByrH5SIELrAUu2SIOf766Iwgw==","mode":420,"size":814},"index.d.ts":{"checkedAt":1794532101859,"integrity":"sha512-/wBPUQpfDnSXZWf7c4RGbRGGk4+zp8ovAfYIv5yxgJL6PeKo0LMNsN8HLddmO63I0Y0c4nf//wbzSXPoSLmXNA==","mode":420,"size":4680},"package.json":{"checkedAt":1794532101859,"integrity":"sha512-86P6OCr9zQZB0blAi5D+JE/hnxQHQN8hWawkxURcNJTgcHjLNvqm18//xw1GREg1Xa3TTjbykUmoW2bGEHeReA==","mode":420,"size":1398}}}
@@ -0,0 +1,226 @@
import { NodeIKernelGroupListener } from '../listeners/NodeIKernelGroupListener';
import { GroupExt0xEF0InfoFilter, GroupExtParam, GroupInfoSource, GroupMember, NTGroupMemberRole, GroupNotifyMsgType, NTGroupRequestOperateTypes, KickMemberV2Req, GroupDetailInfoV2Param, GroupExtInfo, GroupExtFilter } from '../types';
import { GeneralCallResult } from '../services/common';
export interface NodeIKernelGroupService {
modifyGroupExtInfoV2(groupExtInfo: GroupExtInfo, groupExtFilter: GroupExtFilter): Promise<GeneralCallResult & {
result: {
groupCode: string;
result: number;
};
}>;
getGroupMemberMaxNum(groupCode: string, serviceType: number): Promise<unknown>;
getAllGroupPrivilegeFlag(troopUinList: string[], serviceType: number): Promise<unknown>;
getGroupExt0xEF0Info(enableGroupCodes: string[], bannedGroupCodes: string[], filter: GroupExt0xEF0InfoFilter, forceFetch: boolean): Promise<GeneralCallResult & {
result: {
groupExtInfos: Map<string, unknown>;
};
}>;
kickMemberV2(param: KickMemberV2Req): Promise<GeneralCallResult>;
quitGroupV2(param: {
groupCode: string;
needDeleteLocalMsg: boolean;
}): Promise<GeneralCallResult>;
getMemberCommonInfo(Req: {
groupCode: string;
startUin: string;
identifyFlag: string;
uinList: string[];
memberCommonFilter: {
memberUin: number;
uinFlag: number;
uinFlagExt: number;
uinMobileFlag: number;
shutUpTime: number;
privilege: number;
};
memberNum: number;
filterMethod: string;
onlineFlag: string;
realSpecialTitleFlag: number;
}): Promise<unknown>;
getGroupMemberLevelInfo(groupCode: string): Promise<unknown>;
getGroupInfoForJoinGroup(groupCode: string, needPrivilegeFlag: boolean, serviceType: number): Promise<unknown>;
getGroupHonorList(req: {
groupCodes: Array<string>;
}): Promise<unknown>;
getUinByUids(uins: string[]): Promise<{
errCode: number;
errMsg: string;
uins: Map<string, string>;
}>;
getUidByUins(uins: string[]): Promise<{
errCode: number;
errMsg: string;
uids: Map<string, string>;
}>;
checkGroupMemberCache(arrayList: Array<string>): Promise<unknown>;
getGroupLatestEssenceList(groupCode: string): Promise<unknown>;
shareDigest(Req: {
appId: string;
appType: number;
msgStyle: number;
recvUin: string;
sendType: number;
clientInfo: {
platform: number;
};
richMsg: {
usingArk: boolean;
title: string;
summary: string;
url: string;
pictureUrl: string;
brief: string;
};
}): Promise<unknown>;
isEssenceMsg(req: {
groupCode: string;
msgRandom: number;
msgSeq: number;
}): Promise<unknown>;
queryCachedEssenceMsg(req: {
groupCode: string;
msgRandom: number;
msgSeq: number;
}): Promise<{
items: Array<unknown>;
}>;
fetchGroupEssenceList(req: {
groupCode: string;
pageStart: number;
pageLimit: number;
}, Arg: unknown): Promise<unknown>;
getAllMemberList(groupCode: string, forceFetch: boolean): Promise<{
errCode: number;
errMsg: string;
result: {
ids: Array<{
uid: string;
index: number;
}>;
infos: Map<string, GroupMember>;
finish: true;
hasRobot: false;
};
}>;
setHeader(uid: string, path: string): Promise<GeneralCallResult>;
addKernelGroupListener(listener: NodeIKernelGroupListener): number;
removeKernelGroupListener(listenerId: number): void;
createMemberListScene(groupCode: string, scene: string): string;
destroyMemberListScene(SceneId: string): void;
getNextMemberList(sceneId: string, groupMemberInfoListId: {
index: number;
uid: string;
} | undefined, num: number): Promise<{
errCode: number;
errMsg: string;
result: {
ids: string[];
infos: Map<string, GroupMember>;
finish: boolean;
hasRobot: boolean;
};
}>;
getPrevMemberList(): unknown;
monitorMemberList(): unknown;
searchMember(sceneId: string, keywords: string[]): unknown;
getMemberInfo(group_id: string, uids: string[], forceFetch: boolean): Promise<GeneralCallResult>;
kickMember(groupCode: string, memberUids: string[], refuseForever: boolean, kickReason: string): Promise<void>;
modifyMemberRole(groupCode: string, uid: string, role: NTGroupMemberRole): void;
modifyMemberCardName(groupCode: string, uid: string, cardName: string): void;
getTransferableMemberInfo(groupCode: string): unknown;
transferGroup(uid: string): void;
getGroupList(force: boolean): Promise<GeneralCallResult>;
getGroupExtList(force: boolean): Promise<GeneralCallResult>;
getGroupDetailInfo(groupCode: string, groupInfoSource: GroupInfoSource): Promise<GeneralCallResult>;
getMemberExtInfo(param: GroupExtParam): Promise<unknown>;
getGroupAllInfo(groupId: string, sourceId: number): Promise<unknown>;
getDiscussExistInfo(): unknown;
getGroupConfMember(): unknown;
getGroupMsgMask(): unknown;
getGroupPortrait(): void;
modifyGroupName(groupCode: string, groupName: string, isNormalMember: boolean): Promise<GeneralCallResult>;
modifyGroupRemark(groupCode: string, remark: string): Promise<GeneralCallResult>;
modifyGroupDetailInfo(groupCode: string, arg: unknown): void;
modifyGroupDetailInfoV2(param: GroupDetailInfoV2Param, arg: number): Promise<GeneralCallResult>;
setGroupMsgMask(groupCode: string, arg: unknown): void;
changeGroupShieldSettingTemp(groupCode: string, arg: unknown): void;
inviteToGroup(arg: unknown): void;
inviteMembersToGroup(args: unknown[]): void;
inviteMembersToGroupWithMsg(args: unknown): void;
createGroup(arg: unknown): void;
createGroupWithMembers(arg: unknown): void;
quitGroup(groupCode: string): void;
destroyGroup(groupCode: string): void;
getSingleScreenNotifies(doubt: boolean, startSeq: string, count: number): Promise<GeneralCallResult>;
clearGroupNotifies(groupCode: string): void;
getGroupNotifiesUnreadCount(doubt: boolean): Promise<GeneralCallResult>;
clearGroupNotifiesUnreadCount(doubt: boolean): void;
operateSysNotify(doubt: boolean, operateMsg: {
operateType: NTGroupRequestOperateTypes;
targetMsg: {
seq: string;
type: GroupNotifyMsgType;
groupCode: string;
postscript: string;
};
}): Promise<void>;
setTop(groupCode: string, isTop: boolean): void;
getGroupBulletin(groupCode: string): unknown;
deleteGroupBulletin(groupCode: string, seq: string, noticeId: string): void;
publishGroupBulletin(groupCode: string, pskey: string, data: unknown): Promise<GeneralCallResult>;
publishInstructionForNewcomers(groupCode: string, arg: unknown): void;
uploadGroupBulletinPic(groupCode: string, pskey: string, imagePath: string): Promise<GeneralCallResult & {
errCode: number;
picInfo?: {
id: string;
width: number;
height: number;
};
}>;
downloadGroupBulletinRichMedia(groupCode: string): unknown;
getGroupBulletinList(groupCode: string): unknown;
getGroupStatisticInfo(groupCode: string): unknown;
getGroupRemainAtTimes(groupCode: string): Promise<Omit<GeneralCallResult, 'result'> & {
errCode: number;
atInfo: {
canAtAll: boolean;
RemainAtAllCountForUin: number;
RemainAtAllCountForGroup: number;
atTimesMsg: string;
canNotAtAllMsg: '';
};
}>;
getJoinGroupNoVerifyFlag(groupCode: string): unknown;
getGroupArkInviteState(groupCode: string): unknown;
reqToJoinGroup(groupCode: string, arg: unknown): void;
setGroupShutUp(groupCode: string, shutUp: boolean): Promise<GeneralCallResult>;
getGroupShutUpMemberList(groupCode: string): Promise<GeneralCallResult>;
setMemberShutUp(groupCode: string, memberTimes: {
uid: string;
timeStamp: number;
}[]): Promise<GeneralCallResult>;
getGroupRecommendContactArkJson(groupCode: string): Promise<GeneralCallResult & {
arkJson: string;
}>;
getJoinGroupLink(param: {
groupCode: string;
srcId: number;
needShortUrl: boolean;
additionalParam: string;
}): Promise<GeneralCallResult & {
url?: string;
}>;
modifyGroupExtInfo(groupCode: string, arg: unknown): void;
addGroupEssence(param: {
groupCode: string;
msgRandom: number;
msgSeq: number;
}): Promise<unknown>;
removeGroupEssence(param: {
groupCode: string;
msgRandom: number;
msgSeq: number;
}): Promise<unknown>;
isNull(): boolean;
}
@@ -0,0 +1,7 @@
declare class BrowserslistError extends Error {
constructor(message: any)
name: 'BrowserslistError'
browserslist: true
}
export = BrowserslistError
@@ -0,0 +1,41 @@
import arrayMap from './_arrayMap.js';
import baseIntersection from './_baseIntersection.js';
import baseRest from './_baseRest.js';
import castArrayLikeObject from './_castArrayLikeObject.js';
import last from './last.js';
/**
* This method is like `_.intersection` except that it accepts `comparator`
* which is invoked to compare elements of `arrays`. The order and references
* of result values are determined by the first array. The comparator is
* invoked with two arguments: (arrVal, othVal).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {...Array} [arrays] The arrays to inspect.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns the new array of intersecting values.
* @example
*
* var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
* var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
*
* _.intersectionWith(objects, others, _.isEqual);
* // => [{ 'x': 1, 'y': 2 }]
*/
var intersectionWith = baseRest(function(arrays) {
var comparator = last(arrays),
mapped = arrayMap(arrays, castArrayLikeObject);
comparator = typeof comparator == 'function' ? comparator : undefined;
if (comparator) {
mapped.pop();
}
return (mapped.length && mapped[0] === arrays[0])
? baseIntersection(mapped, undefined, comparator)
: [];
});
export default intersectionWith;
@@ -0,0 +1,19 @@
import {useGridState as $62967d126f3aa823$export$4007ac09ff9c68ed} from "./useGridState.module.js";
import {GridCollection as $16805b1b18093c5f$export$de3fdf6493c353d} from "./GridCollection.module.js";
/*
* 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.
*/
export {$62967d126f3aa823$export$4007ac09ff9c68ed as useGridState, $16805b1b18093c5f$export$de3fdf6493c353d as GridCollection};
//# sourceMappingURL=module.js.map
@@ -0,0 +1 @@
{"version":3,"file":"optional.js","sourceRoot":"","sources":["../../../../src/metadata/decorators/optional.ts"],"names":[],"mappings":";;AAQA,4BAWC;AAnBD,sGAAmG;AACnG,8EAA2E;AAC3E,6JAA0J;AAI1J,6CAA0C;AAE1C,SAAgB,QAAQ;IAGtB,MAAM,cAAc,GAGlB,IAAA,yHAA2D,EACzD,+CAAsB,CACvB,CAAC;IAEJ,OAAO,IAAA,uBAAU,EAAC,cAAc,EAAE,uEAAkC,CAAC,CAAC;AACxE,CAAC"}
@@ -0,0 +1,6 @@
/**
* Convert camelCase to dash-case properties.
*/
const camelToDash = (str) => str.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase();
export { camelToDash };
@@ -0,0 +1,400 @@
// Copyright 2013 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Font management utilities
#include "./font.h"
#include <algorithm>
#include "./buffer.h"
#include "./port.h"
#include "./store_bytes.h"
#include "./table_tags.h"
#include "./woff2_common.h"
namespace woff2 {
Font::Table* Font::FindTable(uint32_t tag) {
std::map<uint32_t, Font::Table>::iterator it = tables.find(tag);
return it == tables.end() ? 0 : &it->second;
}
const Font::Table* Font::FindTable(uint32_t tag) const {
std::map<uint32_t, Font::Table>::const_iterator it = tables.find(tag);
return it == tables.end() ? 0 : &it->second;
}
std::vector<uint32_t> Font::OutputOrderedTags() const {
std::vector<uint32_t> output_order;
for (const auto& i : tables) {
const Font::Table& table = i.second;
// This is a transformed table, we will write it together with the
// original version.
if (table.tag & 0x80808080) {
continue;
}
output_order.push_back(table.tag);
}
// Alphabetize and do not put loca immediately after glyf
// This violates woff2 spec but results in a font that passes OTS
std::sort(output_order.begin(), output_order.end());
// TODO(user): change to match spec once browsers are on newer OTS
/*
auto glyf_loc = std::find(output_order.begin(), output_order.end(),
kGlyfTableTag);
auto loca_loc = std::find(output_order.begin(), output_order.end(),
kLocaTableTag);
if (glyf_loc != output_order.end() && loca_loc != output_order.end()) {
output_order.erase(loca_loc);
output_order.insert(std::find(output_order.begin(), output_order.end(),
kGlyfTableTag) + 1, kLocaTableTag);
}*/
return output_order;
}
bool ReadTrueTypeFont(Buffer* file, const uint8_t* data, size_t len,
Font* font) {
// We don't care about the search_range, entry_selector and range_shift
// fields, they will always be computed upon writing the font.
if (!file->ReadU16(&font->num_tables) ||
!file->Skip(6)) {
return FONT_COMPRESSION_FAILURE();
}
std::map<uint32_t, uint32_t> intervals;
for (uint16_t i = 0; i < font->num_tables; ++i) {
Font::Table table;
table.reuse_of = NULL;
if (!file->ReadU32(&table.tag) ||
!file->ReadU32(&table.checksum) ||
!file->ReadU32(&table.offset) ||
!file->ReadU32(&table.length)) {
return FONT_COMPRESSION_FAILURE();
}
if ((table.offset & 3) != 0 ||
table.length > len ||
len - table.length < table.offset) {
return FONT_COMPRESSION_FAILURE();
}
intervals[table.offset] = table.length;
table.data = data + table.offset;
if (font->tables.find(table.tag) != font->tables.end()) {
return FONT_COMPRESSION_FAILURE();
}
font->tables[table.tag] = table;
}
// Check that tables are non-overlapping.
uint32_t last_offset = 12UL + 16UL * font->num_tables;
for (const auto& i : intervals) {
if (i.first < last_offset || i.first + i.second < i.first) {
return FONT_COMPRESSION_FAILURE();
}
last_offset = i.first + i.second;
}
return true;
}
bool ReadCollectionFont(Buffer* file, const uint8_t* data, size_t len,
Font* font,
std::map<uint32_t, Font::Table*>* all_tables) {
if (!file->ReadU32(&font->flavor)) {
return FONT_COMPRESSION_FAILURE();
}
if (!ReadTrueTypeFont(file, data, len, font)) {
return FONT_COMPRESSION_FAILURE();
}
for (auto& entry : font->tables) {
Font::Table& table = entry.second;
if (all_tables->find(table.offset) == all_tables->end()) {
(*all_tables)[table.offset] = font->FindTable(table.tag);
} else {
table.reuse_of = (*all_tables)[table.offset];
}
}
return true;
}
bool ReadTrueTypeCollection(Buffer* file, const uint8_t* data, size_t len,
FontCollection* font_collection) {
uint32_t num_fonts;
if (!file->ReadU32(&font_collection->header_version) ||
!file->ReadU32(&num_fonts)) {
return FONT_COMPRESSION_FAILURE();
}
std::vector<uint32_t> offsets;
for (auto i = 0; i < num_fonts; i++) {
uint32_t offset;
if (!file->ReadU32(&offset)) {
return FONT_COMPRESSION_FAILURE();
}
offsets.push_back(offset);
}
font_collection->fonts.resize(offsets.size());
std::vector<Font>::iterator font_it = font_collection->fonts.begin();
std::map<uint32_t, Font::Table*> all_tables;
for (const auto offset : offsets) {
file->set_offset(offset);
Font& font = *font_it++;
if (!ReadCollectionFont(file, data, len, &font, &all_tables)) {
return FONT_COMPRESSION_FAILURE();
}
}
return true;
}
bool ReadFont(const uint8_t* data, size_t len, Font* font) {
Buffer file(data, len);
if (!file.ReadU32(&font->flavor)) {
return FONT_COMPRESSION_FAILURE();
}
if (font->flavor == kTtcFontFlavor) {
return FONT_COMPRESSION_FAILURE();
}
return ReadTrueTypeFont(&file, data, len, font);
}
bool ReadFontCollection(const uint8_t* data, size_t len,
FontCollection* font_collection) {
Buffer file(data, len);
uint32_t flavor;
if (!file.ReadU32(&flavor)) {
return FONT_COMPRESSION_FAILURE();
}
if (flavor != kTtcFontFlavor) {
font_collection->fonts.resize(1);
Font& font = font_collection->fonts[0];
font.flavor = flavor;
return ReadTrueTypeFont(&file, data, len, &font);
}
return ReadTrueTypeCollection(&file, data, len, font_collection);
}
size_t FontFileSize(const Font& font) {
size_t max_offset = 12ULL + 16ULL * font.num_tables;
for (const auto& i : font.tables) {
const Font::Table& table = i.second;
size_t padding_size = (4 - (table.length & 3)) & 3;
size_t end_offset = (padding_size + table.offset) + table.length;
max_offset = std::max(max_offset, end_offset);
}
return max_offset;
}
size_t FontCollectionFileSize(const FontCollection& font_collection) {
size_t max_offset = 0;
for (auto& font : font_collection.fonts) {
// font file size actually just finds max offset
max_offset = std::max(max_offset, FontFileSize(font));
}
return max_offset;
}
bool WriteFont(const Font& font, uint8_t* dst, size_t dst_size) {
size_t offset = 0;
return WriteFont(font, &offset, dst, dst_size);
}
bool WriteTableRecord(const Font::Table* table, size_t* offset, uint8_t* dst,
size_t dst_size) {
if (dst_size < *offset + kSfntEntrySize) {
return FONT_COMPRESSION_FAILURE();
}
if (table->IsReused()) {
table = table->reuse_of;
}
StoreU32(table->tag, offset, dst);
StoreU32(table->checksum, offset, dst);
StoreU32(table->offset, offset, dst);
StoreU32(table->length, offset, dst);
return true;
}
bool WriteTable(const Font::Table& table, size_t* offset, uint8_t* dst,
size_t dst_size) {
if (!WriteTableRecord(&table, offset, dst, dst_size)) {
return false;
}
// Write the actual table data if it's the first time we've seen it
if (!table.IsReused()) {
if (table.offset + table.length < table.offset ||
dst_size < table.offset + table.length) {
return FONT_COMPRESSION_FAILURE();
}
memcpy(dst + table.offset, table.data, table.length);
size_t padding_size = (4 - (table.length & 3)) & 3;
if (table.offset + table.length + padding_size < padding_size ||
dst_size < table.offset + table.length + padding_size) {
return FONT_COMPRESSION_FAILURE();
}
memset(dst + table.offset + table.length, 0, padding_size);
}
return true;
}
bool WriteFont(const Font& font, size_t* offset, uint8_t* dst,
size_t dst_size) {
if (dst_size < 12ULL + 16ULL * font.num_tables) {
return FONT_COMPRESSION_FAILURE();
}
StoreU32(font.flavor, offset, dst);
Store16(font.num_tables, offset, dst);
uint16_t max_pow2 = font.num_tables ? Log2Floor(font.num_tables) : 0;
uint16_t search_range = max_pow2 ? 1 << (max_pow2 + 4) : 0;
uint16_t range_shift = (font.num_tables << 4) - search_range;
Store16(search_range, offset, dst);
Store16(max_pow2, offset, dst);
Store16(range_shift, offset, dst);
for (const auto& i : font.tables) {
if (!WriteTable(i.second, offset, dst, dst_size)) {
return false;
}
}
return true;
}
bool WriteFontCollection(const FontCollection& font_collection, uint8_t* dst,
size_t dst_size) {
size_t offset = 0;
// It's simpler if this just a simple sfnt
if (font_collection.fonts.size() == 1) {
return WriteFont(font_collection.fonts[0], &offset, dst, dst_size);
}
// Write TTC header
StoreU32(kTtcFontFlavor, &offset, dst);
StoreU32(font_collection.header_version, &offset, dst);
StoreU32(font_collection.fonts.size(), &offset, dst);
// Offset Table, zeroed for now
size_t offset_table = offset; // where to write offsets later
for (int i = 0; i < font_collection.fonts.size(); i++) {
StoreU32(0, &offset, dst);
}
if (font_collection.header_version == 0x00020000) {
StoreU32(0, &offset, dst); // ulDsigTag
StoreU32(0, &offset, dst); // ulDsigLength
StoreU32(0, &offset, dst); // ulDsigOffset
}
// Write fonts and their offsets.
for (int i = 0; i < font_collection.fonts.size(); i++) {
const auto& font = font_collection.fonts[i];
StoreU32(offset, &offset_table, dst);
if (!WriteFont(font, &offset, dst, dst_size)) {
return false;
}
}
return true;
}
int NumGlyphs(const Font& font) {
const Font::Table* head_table = font.FindTable(kHeadTableTag);
const Font::Table* loca_table = font.FindTable(kLocaTableTag);
if (head_table == NULL || loca_table == NULL || head_table->length < 52) {
return 0;
}
int index_fmt = IndexFormat(font);
int num_glyphs = (loca_table->length / (index_fmt == 0 ? 2 : 4)) - 1;
return num_glyphs;
}
int IndexFormat(const Font& font) {
const Font::Table* head_table = font.FindTable(kHeadTableTag);
if (head_table == NULL) {
return 0;
}
return head_table->data[51];
}
bool Font::Table::IsReused() const {
return this->reuse_of != NULL;
}
bool GetGlyphData(const Font& font, int glyph_index,
const uint8_t** glyph_data, size_t* glyph_size) {
if (glyph_index < 0) {
return FONT_COMPRESSION_FAILURE();
}
const Font::Table* head_table = font.FindTable(kHeadTableTag);
const Font::Table* loca_table = font.FindTable(kLocaTableTag);
const Font::Table* glyf_table = font.FindTable(kGlyfTableTag);
if (head_table == NULL || loca_table == NULL || glyf_table == NULL ||
head_table->length < 52) {
return FONT_COMPRESSION_FAILURE();
}
int index_fmt = IndexFormat(font);
Buffer loca_buf(loca_table->data, loca_table->length);
if (index_fmt == 0) {
uint16_t offset1, offset2;
if (!loca_buf.Skip(2 * glyph_index) ||
!loca_buf.ReadU16(&offset1) ||
!loca_buf.ReadU16(&offset2) ||
offset2 < offset1 ||
2 * offset2 > glyf_table->length) {
return FONT_COMPRESSION_FAILURE();
}
*glyph_data = glyf_table->data + 2 * offset1;
*glyph_size = 2 * (offset2 - offset1);
} else {
uint32_t offset1, offset2;
if (!loca_buf.Skip(4 * glyph_index) ||
!loca_buf.ReadU32(&offset1) ||
!loca_buf.ReadU32(&offset2) ||
offset2 < offset1 ||
offset2 > glyf_table->length) {
return FONT_COMPRESSION_FAILURE();
}
*glyph_data = glyf_table->data + offset1;
*glyph_size = offset2 - offset1;
}
return true;
}
bool RemoveDigitalSignature(Font* font) {
std::map<uint32_t, Font::Table>::iterator it =
font->tables.find(kDsigTableTag);
if (it != font->tables.end()) {
font->tables.erase(it);
font->num_tables = font->tables.size();
}
return true;
}
} // namespace woff2
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2014 Mathias Buus
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,59 @@
'use strict';
var test = require('tape');
var debug = require('object-inspect');
var forEach = require('for-each');
var whichCollection = require('..');
test('non-collections', function (t) {
forEach([
null,
undefined,
true,
false,
42,
0,
-0,
NaN,
Infinity,
'',
'foo',
/a/g,
[],
{},
function () {}
], function (nonCollection) {
t.equal(whichCollection(nonCollection), false, debug(nonCollection) + ' is not a collection');
});
t.end();
});
test('Maps', { skip: typeof Map !== 'function' }, function (t) {
var m = new Map();
t.equal(whichCollection(m), 'Map', debug(m) + ' is a Map');
t.end();
});
test('Sets', { skip: typeof Set !== 'function' }, function (t) {
var s = new Set();
t.equal(whichCollection(s), 'Set', debug(s) + ' is a Set');
t.end();
});
test('WeakMaps', { skip: typeof WeakMap !== 'function' }, function (t) {
var wm = new WeakMap();
t.equal(whichCollection(wm), 'WeakMap', debug(wm) + ' is a WeakMap');
t.end();
});
test('WeakSets', { skip: typeof WeakSet !== 'function' }, function (t) {
var ws = new WeakSet();
t.equal(whichCollection(ws), 'WeakSet', debug(ws) + ' is a WeakSet');
t.end();
});
@@ -0,0 +1,59 @@
import "../chunk-GQGYXTXM.mjs";
import {
ClockSquareBoldIcon
} from "../chunk-C4AGHOLG.mjs";
import {
PetBoldIcon
} from "../chunk-AZSWQWCV.mjs";
import {
PlusFilledIcon
} from "../chunk-OG4N5BYW.mjs";
import {
SendFilledIcon
} from "../chunk-DIGVROZI.mjs";
import {
ShoppingCartBoldIcon
} from "../chunk-TAQLMOFL.mjs";
import {
VolumeHighBoldIcon
} from "../chunk-BJ4U5HLX.mjs";
import {
VolumeLowBoldIcon
} from "../chunk-CQZP7JER.mjs";
import {
AlignBottomBoldIcon
} from "../chunk-NDD37WXM.mjs";
import {
AlignHorizontallyBoldIcon
} from "../chunk-GWSPO6AT.mjs";
import {
AlignLeftBoldIcon
} from "../chunk-VRKAJVF2.mjs";
import {
AlignRightBoldIcon
} from "../chunk-M4HZWITS.mjs";
import {
AlignTopBoldIcon
} from "../chunk-4CUIXA2N.mjs";
import {
AlignVerticallyBoldIcon
} from "../chunk-74IIVLS4.mjs";
import {
CalendarBoldIcon
} from "../chunk-LUENRYJZ.mjs";
export {
AlignBottomBoldIcon,
AlignHorizontallyBoldIcon,
AlignLeftBoldIcon,
AlignRightBoldIcon,
AlignTopBoldIcon,
AlignVerticallyBoldIcon,
CalendarBoldIcon,
ClockSquareBoldIcon,
PetBoldIcon,
PlusFilledIcon,
SendFilledIcon,
ShoppingCartBoldIcon,
VolumeHighBoldIcon,
VolumeLowBoldIcon
};
@@ -0,0 +1,56 @@
export declare const MsgActionsExamples: {
DeleteMsg: {
payload: {
message_id: number;
};
response: {};
};
GetMsg: {
payload: {
message_id: number;
};
response: {
time: number;
message_type: string;
message_id: number;
real_id: number;
sender: {
user_id: number;
nickname: string;
};
message: string;
};
};
MarkMsgAsRead: {
payload: {
group_id: string;
};
response: {};
};
SendMsg: {
payload: {
message_type: string;
group_id: string;
message: string;
};
response: {
message_id: number;
};
};
SendPrivateMsg: {
payload: {
user_id: string;
message: string;
};
response: {
message_id: number;
};
};
SetMsgEmojiLike: {
payload: {
message_id: number;
emoji_id: string;
};
response: {};
};
};
@@ -0,0 +1,122 @@
import {getChildNodes, getFirstItem, getLastItem} from '@react-stately/collections';
import {GridCollection, GridNode} from '@react-types/grid';
import {Key} from '@react-types/shared';
import {MultipleSelectionState, MultipleSelectionStateProps, SelectionManager, useMultipleSelectionState} from '@react-stately/selection';
import {useEffect, useMemo, useRef} from 'react';
export interface GridState<T, C extends GridCollection<T>> {
collection: C,
/** A set of keys for rows that are disabled. */
disabledKeys: Set<Key>,
/** A selection manager to read and update row selection state. */
selectionManager: SelectionManager,
/** Whether keyboard navigation is disabled, such as when the arrow keys should be handled by a component within a cell. */
isKeyboardNavigationDisabled: boolean
}
export interface GridStateOptions<T, C extends GridCollection<T>> extends MultipleSelectionStateProps {
collection: C,
disabledKeys?: Iterable<Key>,
focusMode?: 'row' | 'cell',
/** @private - do not use unless you know what you're doing. */
UNSAFE_selectionState?: MultipleSelectionState
}
/**
* Provides state management for a grid component. Handles row selection and focusing a grid cell's focusable child if applicable.
*/
export function useGridState<T extends object, C extends GridCollection<T>>(props: GridStateOptions<T, C>): GridState<T, C> {
let {collection, focusMode} = props;
// eslint-disable-next-line react-hooks/rules-of-hooks
let selectionState = props.UNSAFE_selectionState || useMultipleSelectionState(props);
let disabledKeys = useMemo(() =>
props.disabledKeys ? new Set(props.disabledKeys) : new Set<Key>()
, [props.disabledKeys]);
let setFocusedKey = selectionState.setFocusedKey;
selectionState.setFocusedKey = (key, child) => {
// If focusMode is cell and an item is focused, focus a child cell instead.
if (focusMode === 'cell' && key != null) {
let item = collection.getItem(key);
if (item?.type === 'item') {
let children = getChildNodes(item, collection);
if (child === 'last') {
key = getLastItem(children)?.key ?? null;
} else {
key = getFirstItem(children)?.key ?? null;
}
}
}
setFocusedKey(key, child);
};
let selectionManager = useMemo(() =>
new SelectionManager(collection, selectionState)
, [collection, selectionState]
);
// Reset focused key if that item is deleted from the collection.
const cachedCollection = useRef<C | null>(null);
useEffect(() => {
if (selectionState.focusedKey != null && cachedCollection.current && !collection.getItem(selectionState.focusedKey)) {
const node = cachedCollection.current.getItem(selectionState.focusedKey);
const parentNode =
node?.parentKey != null && (node.type === 'cell' || node.type === 'rowheader' || node.type === 'column') ?
cachedCollection.current.getItem(node.parentKey) :
node;
if (!parentNode) {
selectionState.setFocusedKey(null);
return;
}
const cachedRows = cachedCollection.current.rows;
const rows = collection.rows;
const diff = cachedRows.length - rows.length;
let index = Math.min(
(
diff > 1 ?
Math.max(parentNode.index - diff + 1, 0) :
parentNode.index
),
rows.length - 1);
let newRow: GridNode<T> | null = null;
while (index >= 0) {
if (!selectionManager.isDisabled(rows[index].key) && rows[index].type !== 'headerrow') {
newRow = rows[index];
break;
}
// Find next, not disabled row.
if (index < rows.length - 1) {
index++;
// Otherwise, find previous, not disabled row.
} else {
if (index > parentNode.index) {
index = parentNode.index;
}
index--;
}
}
if (newRow) {
const childNodes = newRow.hasChildNodes ? [...getChildNodes(newRow, collection)] : [];
const keyToFocus =
newRow.hasChildNodes &&
parentNode !== node &&
node &&
node.index < childNodes.length ?
childNodes[node.index].key :
newRow.key;
selectionState.setFocusedKey(keyToFocus);
} else {
selectionState.setFocusedKey(null);
}
}
cachedCollection.current = collection;
}, [collection, selectionManager, selectionState, selectionState.focusedKey]);
return {
collection,
disabledKeys,
isKeyboardNavigationDisabled: false,
selectionManager
};
}
@@ -0,0 +1,20 @@
'use strict';
var flatMap = require('../implementation');
var callBind = require('call-bind');
var test = require('tape');
var hasStrictMode = require('has-strict-mode')();
var runTests = require('./tests');
test('as a function', function (t) {
t.test('bad array/this value', { skip: !hasStrictMode }, function (st) {
/* eslint no-useless-call: 0 */
st['throws'](function () { flatMap.call(undefined); }, TypeError, 'undefined is not an object');
st['throws'](function () { flatMap.call(null); }, TypeError, 'null is not an object');
st.end();
});
runTests(callBind(flatMap), t);
t.end();
});
@@ -0,0 +1,581 @@
const { default: getParser } = require('../../lib/parser/index.cjs');
test('fenced description', () => {
const parsed = getParser({ spacing: 'preserve' })(`
/**
* @example "" \`\`\`ts
@transient()
class Foo { }
\`\`\`
*/`);
const source = [
{
number: 1,
source: ' /**',
tokens: {
start: ' ',
delimiter: '/**',
postDelimiter: '',
tag: '',
postTag: '',
name: '',
postName: '',
type: '',
postType: '',
description: '',
end: '',
lineEnd: '',
},
},
{
number: 2,
source: ' * @example "" ```ts',
tokens: {
start: ' ',
delimiter: '*',
postDelimiter: ' ',
tag: '@example',
postTag: ' ',
name: '""',
postName: ' ',
type: '',
postType: '',
description: '```ts',
end: '',
lineEnd: '',
},
},
{
number: 3,
source: '@transient()',
tokens: {
start: '',
delimiter: '',
postDelimiter: '',
tag: '',
postTag: '',
name: '',
postName: '',
type: '',
postType: '',
description: '@transient()',
end: '',
lineEnd: '',
},
},
{
number: 4,
source: 'class Foo { }',
tokens: {
start: '',
delimiter: '',
postDelimiter: '',
tag: '',
postTag: '',
name: '',
postName: '',
type: '',
postType: '',
description: 'class Foo { }',
end: '',
lineEnd: '',
},
},
{
number: 5,
source: '```',
tokens: {
start: '',
delimiter: '',
postDelimiter: '',
tag: '',
postTag: '',
name: '',
postName: '',
type: '',
postType: '',
description: '```',
end: '',
lineEnd: '',
},
},
{
number: 6,
source: ' */',
tokens: {
start: ' ',
delimiter: '',
postDelimiter: '',
tag: '',
postTag: '',
name: '',
postName: '',
type: '',
postType: '',
description: '',
end: '*/',
lineEnd: '',
},
},
];
expect(parsed).toEqual([
{
description: '',
tags: [
{
tag: 'example',
name: '',
type: '',
optional: false,
description: '```ts\n@transient()\nclass Foo { }\n```',
problems: [],
source: source.slice(1),
},
],
source,
problems: [],
},
]);
});
test('fenced one-liner', () => {
const parsed = getParser({ spacing: 'preserve' })(
'/** @example "" ```ts @transient() class Foo { } ```*/'
);
const source = [
{
number: 0,
source: '/** @example "" ```ts @transient() class Foo { } ```*/',
tokens: {
start: '',
delimiter: '/**',
postDelimiter: ' ',
tag: '@example',
postTag: ' ',
name: '""',
postName: ' ',
type: '',
postType: '',
description: '```ts @transient() class Foo { } ```',
end: '*/',
lineEnd: '',
},
},
];
expect(parsed).toEqual([
{
description: '',
tags: [
{
tag: 'example',
name: '',
type: '',
optional: false,
description: '```ts @transient() class Foo { } ```',
problems: [],
source,
},
],
source,
problems: [],
},
]);
});
test('multiple fences', () => {
const parsed = getParser({ spacing: 'preserve' })(`
/**
* @example "" \`\`\`ts
@one
\`\`\`
text
\`\`\`
@two
\`\`\`
*/`);
const source = [
{
number: 1,
source: ' /**',
tokens: {
start: ' ',
delimiter: '/**',
postDelimiter: '',
tag: '',
postTag: '',
name: '',
postName: '',
type: '',
postType: '',
description: '',
end: '',
lineEnd: '',
},
},
{
number: 2,
source: ' * @example "" ```ts',
tokens: {
start: ' ',
delimiter: '*',
postDelimiter: ' ',
tag: '@example',
postTag: ' ',
name: '""',
postName: ' ',
type: '',
postType: '',
description: '```ts',
end: '',
lineEnd: '',
},
},
{
number: 3,
source: '@one',
tokens: {
start: '',
delimiter: '',
postDelimiter: '',
tag: '',
postTag: '',
name: '',
postName: '',
type: '',
postType: '',
description: '@one',
end: '',
lineEnd: '',
},
},
{
number: 4,
source: '```',
tokens: {
start: '',
delimiter: '',
postDelimiter: '',
tag: '',
postTag: '',
name: '',
postName: '',
type: '',
postType: '',
description: '```',
end: '',
lineEnd: '',
},
},
{
number: 5,
source: 'text',
tokens: {
start: '',
delimiter: '',
postDelimiter: '',
tag: '',
postTag: '',
name: '',
postName: '',
type: '',
postType: '',
description: 'text',
end: '',
lineEnd: '',
},
},
{
number: 6,
source: '```',
tokens: {
start: '',
delimiter: '',
postDelimiter: '',
tag: '',
postTag: '',
name: '',
postName: '',
type: '',
postType: '',
description: '```',
end: '',
lineEnd: '',
},
},
{
number: 7,
source: '@two',
tokens: {
start: '',
delimiter: '',
postDelimiter: '',
tag: '',
postTag: '',
name: '',
postName: '',
type: '',
postType: '',
description: '@two',
end: '',
lineEnd: '',
},
},
{
number: 8,
source: '```',
tokens: {
start: '',
delimiter: '',
postDelimiter: '',
tag: '',
postTag: '',
name: '',
postName: '',
type: '',
postType: '',
description: '```',
end: '',
lineEnd: '',
},
},
{
number: 9,
source: ' */',
tokens: {
start: ' ',
delimiter: '',
postDelimiter: '',
tag: '',
postTag: '',
name: '',
postName: '',
type: '',
postType: '',
description: '',
end: '*/',
lineEnd: '',
},
},
];
expect(parsed).toEqual([
{
description: '',
tags: [
{
tag: 'example',
name: '',
type: '',
optional: false,
description: '```ts\n@one\n```\ntext\n```\n@two\n```',
source: source.slice(1),
problems: [],
},
],
source,
problems: [],
},
]);
});
test('custom fences', () => {
const parsed = getParser({ spacing: 'preserve', fence: '###' })(`
/**
* @example "" ###ts
@one
###
text
###
@two
###
*/`);
const source = [
{
number: 1,
source: ' /**',
tokens: {
start: ' ',
delimiter: '/**',
postDelimiter: '',
tag: '',
postTag: '',
name: '',
postName: '',
type: '',
postType: '',
description: '',
end: '',
lineEnd: '',
},
},
{
number: 2,
source: ' * @example "" ###ts',
tokens: {
start: ' ',
delimiter: '*',
postDelimiter: ' ',
tag: '@example',
postTag: ' ',
name: '""',
postName: ' ',
type: '',
postType: '',
description: '###ts',
end: '',
lineEnd: '',
},
},
{
number: 3,
source: '@one',
tokens: {
start: '',
delimiter: '',
postDelimiter: '',
tag: '',
postTag: '',
name: '',
postName: '',
type: '',
postType: '',
description: '@one',
end: '',
lineEnd: '',
},
},
{
number: 4,
source: '###',
tokens: {
start: '',
delimiter: '',
postDelimiter: '',
tag: '',
postTag: '',
name: '',
postName: '',
type: '',
postType: '',
description: '###',
end: '',
lineEnd: '',
},
},
{
number: 5,
source: 'text',
tokens: {
start: '',
delimiter: '',
postDelimiter: '',
tag: '',
postTag: '',
name: '',
postName: '',
type: '',
postType: '',
description: 'text',
end: '',
lineEnd: '',
},
},
{
number: 6,
source: '###',
tokens: {
start: '',
delimiter: '',
postDelimiter: '',
tag: '',
postTag: '',
name: '',
postName: '',
type: '',
postType: '',
description: '###',
end: '',
lineEnd: '',
},
},
{
number: 7,
source: '@two',
tokens: {
start: '',
delimiter: '',
postDelimiter: '',
tag: '',
postTag: '',
name: '',
postName: '',
type: '',
postType: '',
description: '@two',
end: '',
lineEnd: '',
},
},
{
number: 8,
source: '###',
tokens: {
start: '',
delimiter: '',
postDelimiter: '',
tag: '',
postTag: '',
name: '',
postName: '',
type: '',
postType: '',
description: '###',
end: '',
lineEnd: '',
},
},
{
number: 9,
source: ' */',
tokens: {
start: ' ',
delimiter: '',
postDelimiter: '',
tag: '',
postTag: '',
name: '',
postName: '',
type: '',
postType: '',
description: '',
end: '*/',
lineEnd: '',
},
},
];
expect(parsed).toEqual([
{
description: '',
tags: [
{
tag: 'example',
name: '',
type: '',
optional: false,
description: '###ts\n@one\n###\ntext\n###\n@two\n###',
source: source.slice(1),
problems: [],
},
],
source,
problems: [],
},
]);
});
@@ -0,0 +1,6 @@
import {
ShoppingCartBoldIcon
} from "../chunk-TAQLMOFL.mjs";
export {
ShoppingCartBoldIcon
};
@@ -0,0 +1,55 @@
{
"name": "ansi-regex",
"version": "5.0.1",
"description": "Regular expression for matching ANSI escape codes",
"license": "MIT",
"repository": "chalk/ansi-regex",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=8"
},
"scripts": {
"test": "xo && ava && tsd",
"view-supported": "node fixtures/view-codes.js"
},
"files": [
"index.js",
"index.d.ts"
],
"keywords": [
"ansi",
"styles",
"color",
"colour",
"colors",
"terminal",
"console",
"cli",
"string",
"tty",
"escape",
"formatting",
"rgb",
"256",
"shell",
"xterm",
"command-line",
"text",
"regex",
"regexp",
"re",
"match",
"test",
"find",
"pattern"
],
"devDependencies": {
"ava": "^2.4.0",
"tsd": "^0.9.0",
"xo": "^0.25.3"
}
}
@@ -0,0 +1,67 @@
var $08ef1685902b6011$exports = require("./ariaHideOutside.main.js");
var $cd94b4896dd97759$exports = require("./useOverlayPosition.main.js");
var $82711f9cb668ecdb$exports = require("./useOverlay.main.js");
var $5c2f5cd01815d369$exports = require("./usePreventScroll.main.js");
var $jkVOI$reactariautils = require("@react-aria/utils");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "usePopover", () => $6c2dfcdee3e15e20$export$542a6fd13ac93354);
/*
* Copyright 2022 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
function $6c2dfcdee3e15e20$export$542a6fd13ac93354(props, state) {
let { triggerRef: triggerRef, popoverRef: popoverRef, isNonModal: isNonModal, isKeyboardDismissDisabled: isKeyboardDismissDisabled, shouldCloseOnInteractOutside: shouldCloseOnInteractOutside, ...otherProps } = props;
let { overlayProps: overlayProps, underlayProps: underlayProps } = (0, $82711f9cb668ecdb$exports.useOverlay)({
// If popover is in the top layer, it should not prevent other popovers from being dismissed.
isOpen: state.isOpen && !otherProps['data-react-aria-top-layer'],
onClose: state.close,
shouldCloseOnBlur: true,
isDismissable: !isNonModal,
isKeyboardDismissDisabled: isKeyboardDismissDisabled,
shouldCloseOnInteractOutside: shouldCloseOnInteractOutside
}, popoverRef);
let { overlayProps: positionProps, arrowProps: arrowProps, placement: placement } = (0, $cd94b4896dd97759$exports.useOverlayPosition)({
...otherProps,
targetRef: triggerRef,
overlayRef: popoverRef,
isOpen: state.isOpen,
onClose: isNonModal ? state.close : undefined
});
(0, $5c2f5cd01815d369$exports.usePreventScroll)({
isDisabled: isNonModal || !state.isOpen
});
(0, $jkVOI$reactariautils.useLayoutEffect)(()=>{
if (state.isOpen && !isNonModal && popoverRef.current) return (0, $08ef1685902b6011$exports.ariaHideOutside)([
popoverRef.current
]);
}, [
isNonModal,
state.isOpen,
popoverRef
]);
return {
popoverProps: (0, $jkVOI$reactariautils.mergeProps)(overlayProps, positionProps),
arrowProps: arrowProps,
underlayProps: underlayProps,
placement: placement
};
}
//# sourceMappingURL=usePopover.main.js.map
@@ -0,0 +1,42 @@
{
"name": "@peculiar/asn1-pkcs8",
"version": "2.6.0",
"description": "ASN.1 schema of `Public-Key Cryptography Standards (PKCS) #8: Private-Key Information Syntax Specification Version 1.2` (RFC5208)",
"files": [
"build/**/*.{js,d.ts}",
"LICENSE",
"README.md"
],
"bugs": {
"url": "https://github.com/PeculiarVentures/asn1-schema/issues"
},
"homepage": "https://github.com/PeculiarVentures/asn1-schema/tree/master/packages/pkcs8#readme",
"keywords": [
"asn"
],
"author": "PeculiarVentures, LLC",
"license": "MIT",
"main": "build/cjs/index.js",
"module": "build/es2015/index.js",
"types": "build/types/index.d.ts",
"publishConfig": {
"access": "public"
},
"scripts": {
"clear": "rimraf build",
"build": "npm run build:module && npm run build:types",
"build:module": "npm run build:cjs && npm run build:es2015",
"build:cjs": "tsc -p tsconfig.compile.json --removeComments --module commonjs --outDir build/cjs",
"build:es2015": "tsc -p tsconfig.compile.json --removeComments --module ES2015 --outDir build/es2015",
"prebuild:types": "rimraf build/types",
"build:types": "tsc -p tsconfig.compile.json --outDir build/types --declaration --emitDeclarationOnly",
"rebuild": "npm run clear && npm run build"
},
"dependencies": {
"@peculiar/asn1-schema": "^2.6.0",
"@peculiar/asn1-x509": "^2.6.0",
"asn1js": "^3.0.6",
"tslib": "^2.8.1"
},
"gitHead": "84379a0671b1312b01fd3b9f1ef038d10560ea4a"
}
@@ -0,0 +1,18 @@
"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("./default"), exports);
@@ -0,0 +1,9 @@
"use client";
import {
AvatarGroupProvider,
useAvatarGroupContext
} from "./chunk-JUJ53SJZ.mjs";
export {
AvatarGroupProvider,
useAvatarGroupContext
};
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=updateMetadataName.spec.d.ts.map
@@ -0,0 +1,3 @@
import { MultipleResolvedValueMetadataInjectOptions, ResolvedValueInjectOptions } from '../models/ResolvedValueInjectOptions';
export declare function isMultipleResolvedValueMetadataInjectOptions<T>(options: ResolvedValueInjectOptions<T>): options is ResolvedValueInjectOptions<T> & MultipleResolvedValueMetadataInjectOptions<T>;
//# sourceMappingURL=isMultipleResolvedValueMetadataInjectOptions.d.ts.map
@@ -0,0 +1,28 @@
{
"name": "arg",
"version": "5.0.2",
"description": "Unopinionated, no-frills CLI argument parser",
"main": "index.js",
"types": "index.d.ts",
"repository": "vercel/arg",
"author": "Josh Junon <junon@wavetilt.com>",
"license": "MIT",
"files": [
"index.js",
"index.d.ts"
],
"scripts": {
"test": "WARN_EXIT=1 jest --coverage -w 2"
},
"devDependencies": {
"chai": "^4.1.1",
"jest": "^27.0.6",
"prettier": "^2.3.2"
},
"prettier": {
"arrowParens": "always",
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "none"
}
}
@@ -0,0 +1,52 @@
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var hasOwn = require('hasown');
var $charCodeAt = callBound('String.prototype.charCodeAt');
var $toUpperCase = callBound('String.prototype.toUpperCase');
var isRegExpRecord = require('../helpers/records/regexp-record');
var caseFolding = require('../helpers/caseFolding.json');
// https://262.ecma-international.org/14.0/#sec-runtime-semantics-canonicalize-ch
module.exports = function Canonicalize(rer, ch) {
if (!isRegExpRecord(rer)) {
throw new $TypeError('Assertion failed: `rer` must be a RegExp Record');
}
if (typeof ch !== 'string') {
throw new $TypeError('Assertion failed: `ch` must be a character');
}
if (rer['[[Unicode]]'] && rer['[[IgnoreCase]]']) { // step 1
if (hasOwn(caseFolding.C, ch)) {
return caseFolding.C[ch];
}
if (hasOwn(caseFolding.S, ch)) {
return caseFolding.S[ch];
}
return ch; // step 1.b
}
if (!rer['[[IgnoreCase]]']) {
return ch; // step 2
}
var u = $toUpperCase(ch); // step 5
if (u.length !== 1) {
return ch; // step 7
}
var cu = u; // step 8
if ($charCodeAt(ch, 0) >= 128 && $charCodeAt(cu, 0) < 128) {
return ch; // step 9
}
return cu; // step 10
};
@@ -0,0 +1 @@
{"version":3,"file":"SingleInjectionResolvedValueElementMetadata.js","sourceRoot":"","sources":["../../../../src/metadata/models/SingleInjectionResolvedValueElementMetadata.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
function DiscardKey(value, key) {
const { [key]: _, ...rest } = value;
return rest;
}
/** Discards property keys from the given value. This function returns a shallow Clone. */
export function Discard(value, keys) {
return keys.reduce((acc, key) => DiscardKey(acc, key), value);
}
@@ -0,0 +1,3 @@
declare const _default: <TValue>(value: TValue[]) => TValue[];
export default _default;
//# sourceMappingURL=compact.d.ts.map
@@ -0,0 +1,12 @@
'use strict';
/* globals lockdown */
// requiring ses exposes "lockdown" on the global
require('ses');
// lockdown freezes the primordials
lockdown({ errorTaming: 'unsafe' });
// initialize the module
require('./');
@@ -0,0 +1,296 @@
/**
* @import {Node, Parent} from 'unist'
*/
/**
* @template Fn
* @template Fallback
* @typedef {Fn extends (value: any) => value is infer Thing ? Thing : Fallback} Predicate
*/
/**
* @callback Check
* Check that an arbitrary value is a node.
* @param {unknown} this
* The given context.
* @param {unknown} [node]
* Anything (typically a node).
* @param {number | null | undefined} [index]
* The node’s position in its parent.
* @param {Parent | null | undefined} [parent]
* The node’s parent.
* @returns {boolean}
* Whether this is a node and passes a test.
*
* @typedef {Record<string, unknown> | Node} Props
* Object to check for equivalence.
*
* Note: `Node` is included as it is common but is not indexable.
*
* @typedef {Array<Props | TestFunction | string> | ReadonlyArray<Props | TestFunction | string> | Props | TestFunction | string | null | undefined} Test
* Check for an arbitrary node.
*
* @callback TestFunction
* Check if a node passes a test.
* @param {unknown} this
* The given context.
* @param {Node} node
* A node.
* @param {number | undefined} [index]
* The node’s position in its parent.
* @param {Parent | undefined} [parent]
* The node’s parent.
* @returns {boolean | undefined | void}
* Whether this node passes the test.
*
* Note: `void` is included until TS sees no return as `undefined`.
*/
/**
* Check if `node` is a `Node` and whether it passes the given test.
*
* @param {unknown} node
* Thing to check, typically `Node`.
* @param {Test} test
* A check for a specific node.
* @param {number | null | undefined} index
* The node’s position in its parent.
* @param {Parent | null | undefined} parent
* The node’s parent.
* @param {unknown} context
* Context object (`this`) to pass to `test` functions.
* @returns {boolean}
* Whether `node` is a node and passes a test.
*/
export const is =
// Note: overloads in JSDoc can’t yet use different `@template`s.
/**
* @type {(
* (<Condition extends ReadonlyArray<string>>(node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition[number]}) &
* (<Condition extends Array<string>>(node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition[number]}) &
* (<Condition extends string>(node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition}) &
* (<Condition extends Props>(node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Condition) &
* (<Condition extends TestFunction>(node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Predicate<Condition, Node>) &
* ((node?: null | undefined) => false) &
* ((node: unknown, test?: null | undefined, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node) &
* ((node: unknown, test?: Test, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => boolean)
* )}
*/
(
/**
* @param {unknown} [node]
* @param {Test} [test]
* @param {number | null | undefined} [index]
* @param {Parent | null | undefined} [parent]
* @param {unknown} [context]
* @returns {boolean}
*/
// eslint-disable-next-line max-params
function (node, test, index, parent, context) {
const check = convert(test)
if (
index !== undefined &&
index !== null &&
(typeof index !== 'number' ||
index < 0 ||
index === Number.POSITIVE_INFINITY)
) {
throw new Error('Expected positive finite index')
}
if (
parent !== undefined &&
parent !== null &&
(!is(parent) || !parent.children)
) {
throw new Error('Expected parent node')
}
if (
(parent === undefined || parent === null) !==
(index === undefined || index === null)
) {
throw new Error('Expected both parent and index')
}
return looksLikeANode(node)
? check.call(context, node, index, parent)
: false
}
)
/**
* Generate an assertion from a test.
*
* Useful if you’re going to test many nodes, for example when creating a
* utility where something else passes a compatible test.
*
* The created function is a bit faster because it expects valid input only:
* a `node`, `index`, and `parent`.
*
* @param {Test} test
* * when nullish, checks if `node` is a `Node`.
* * when `string`, works like passing `(node) => node.type === test`.
* * when `function` checks if function passed the node is true.
* * when `object`, checks that all keys in test are in node, and that they have (strictly) equal values.
* * when `array`, checks if any one of the subtests pass.
* @returns {Check}
* An assertion.
*/
export const convert =
// Note: overloads in JSDoc can’t yet use different `@template`s.
/**
* @type {(
* (<Condition extends string>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition}) &
* (<Condition extends Props>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Condition) &
* (<Condition extends TestFunction>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Predicate<Condition, Node>) &
* ((test?: null | undefined) => (node?: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node) &
* ((test?: Test) => Check)
* )}
*/
(
/**
* @param {Test} [test]
* @returns {Check}
*/
function (test) {
if (test === null || test === undefined) {
return ok
}
if (typeof test === 'function') {
return castFactory(test)
}
if (typeof test === 'object') {
return Array.isArray(test)
? anyFactory(test)
: // Cast because `ReadonlyArray` goes into the above but `isArray`
// narrows to `Array`.
propertiesFactory(/** @type {Props} */ (test))
}
if (typeof test === 'string') {
return typeFactory(test)
}
throw new Error('Expected function, string, or object as test')
}
)
/**
* @param {Array<Props | TestFunction | string>} tests
* @returns {Check}
*/
function anyFactory(tests) {
/** @type {Array<Check>} */
const checks = []
let index = -1
while (++index < tests.length) {
checks[index] = convert(tests[index])
}
return castFactory(any)
/**
* @this {unknown}
* @type {TestFunction}
*/
function any(...parameters) {
let index = -1
while (++index < checks.length) {
if (checks[index].apply(this, parameters)) return true
}
return false
}
}
/**
* Turn an object into a test for a node with a certain fields.
*
* @param {Props} check
* @returns {Check}
*/
function propertiesFactory(check) {
const checkAsRecord = /** @type {Record<string, unknown>} */ (check)
return castFactory(all)
/**
* @param {Node} node
* @returns {boolean}
*/
function all(node) {
const nodeAsRecord = /** @type {Record<string, unknown>} */ (
/** @type {unknown} */ (node)
)
/** @type {string} */
let key
for (key in check) {
if (nodeAsRecord[key] !== checkAsRecord[key]) return false
}
return true
}
}
/**
* Turn a string into a test for a node with a certain type.
*
* @param {string} check
* @returns {Check}
*/
function typeFactory(check) {
return castFactory(type)
/**
* @param {Node} node
*/
function type(node) {
return node && node.type === check
}
}
/**
* Turn a custom test into a test for a node that passes that test.
*
* @param {TestFunction} testFunction
* @returns {Check}
*/
function castFactory(testFunction) {
return check
/**
* @this {unknown}
* @type {Check}
*/
function check(value, index, parent) {
return Boolean(
looksLikeANode(value) &&
testFunction.call(
this,
value,
typeof index === 'number' ? index : undefined,
parent || undefined
)
)
}
}
function ok() {
return true
}
/**
* @param {unknown} value
* @returns {value is Node}
*/
function looksLikeANode(value) {
return value !== null && typeof value === 'object' && 'type' in value
}
@@ -0,0 +1,30 @@
var baseGet = require('./_baseGet');
/**
* The opposite of `_.property`; this method creates a function that returns
* the value at a given path of `object`.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Util
* @param {Object} object The object to query.
* @returns {Function} Returns the new accessor function.
* @example
*
* var array = [0, 1, 2],
* object = { 'a': array, 'b': array, 'c': array };
*
* _.map(['a[2]', 'c[0]'], _.propertyOf(object));
* // => [2, 0]
*
* _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
* // => [2, 0]
*/
function propertyOf(object) {
return function(path) {
return object == null ? undefined : baseGet(object, path);
};
}
module.exports = propertyOf;
@@ -0,0 +1,212 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
function helpers() {
const data = require("@babel/helpers");
helpers = function () {
return data;
};
return data;
}
function _traverse() {
const data = require("@babel/traverse");
_traverse = function () {
return data;
};
return data;
}
function _codeFrame() {
const data = require("@babel/code-frame");
_codeFrame = function () {
return data;
};
return data;
}
function _t() {
const data = require("@babel/types");
_t = function () {
return data;
};
return data;
}
function _semver() {
const data = require("semver");
_semver = function () {
return data;
};
return data;
}
var _babel7Helpers = require("./babel-7-helpers.cjs");
const {
cloneNode,
interpreterDirective,
traverseFast
} = _t();
class File {
constructor(options, {
code,
ast,
inputMap
}) {
this._map = new Map();
this.opts = void 0;
this.declarations = {};
this.path = void 0;
this.ast = void 0;
this.scope = void 0;
this.metadata = {};
this.code = "";
this.inputMap = void 0;
this.hub = {
file: this,
getCode: () => this.code,
getScope: () => this.scope,
addHelper: this.addHelper.bind(this),
buildError: this.buildCodeFrameError.bind(this)
};
this.opts = options;
this.code = code;
this.ast = ast;
this.inputMap = inputMap;
this.path = _traverse().NodePath.get({
hub: this.hub,
parentPath: null,
parent: this.ast,
container: this.ast,
key: "program"
}).setContext();
this.scope = this.path.scope;
}
get shebang() {
const {
interpreter
} = this.path.node;
return interpreter ? interpreter.value : "";
}
set shebang(value) {
if (value) {
this.path.get("interpreter").replaceWith(interpreterDirective(value));
} else {
this.path.get("interpreter").remove();
}
}
set(key, val) {
{
if (key === "helpersNamespace") {
throw new Error("Babel 7.0.0-beta.56 has dropped support for the 'helpersNamespace' utility." + "If you are using @babel/plugin-external-helpers you will need to use a newer " + "version than the one you currently have installed. " + "If you have your own implementation, you'll want to explore using 'helperGenerator' " + "alongside 'file.availableHelper()'.");
}
}
this._map.set(key, val);
}
get(key) {
return this._map.get(key);
}
has(key) {
return this._map.has(key);
}
availableHelper(name, versionRange) {
if (helpers().isInternal(name)) return false;
let minVersion;
try {
minVersion = helpers().minVersion(name);
} catch (err) {
if (err.code !== "BABEL_HELPER_UNKNOWN") throw err;
return false;
}
if (typeof versionRange !== "string") return true;
if (_semver().valid(versionRange)) versionRange = `^${versionRange}`;
{
return !_semver().intersects(`<${minVersion}`, versionRange) && !_semver().intersects(`>=8.0.0`, versionRange);
}
}
addHelper(name) {
if (helpers().isInternal(name)) {
throw new Error("Cannot use internal helper " + name);
}
return this._addHelper(name);
}
_addHelper(name) {
const declar = this.declarations[name];
if (declar) return cloneNode(declar);
const generator = this.get("helperGenerator");
if (generator) {
const res = generator(name);
if (res) return res;
}
helpers().minVersion(name);
const uid = this.declarations[name] = this.scope.generateUidIdentifier(name);
const dependencies = {};
for (const dep of helpers().getDependencies(name)) {
dependencies[dep] = this._addHelper(dep);
}
const {
nodes,
globals
} = helpers().get(name, dep => dependencies[dep], uid.name, Object.keys(this.scope.getAllBindings()));
globals.forEach(name => {
if (this.path.scope.hasBinding(name, true)) {
this.path.scope.rename(name);
}
});
nodes.forEach(node => {
node._compact = true;
});
const added = this.path.unshiftContainer("body", nodes);
for (const path of added) {
if (path.isVariableDeclaration()) this.scope.registerDeclaration(path);
}
return uid;
}
buildCodeFrameError(node, msg, _Error = SyntaxError) {
let loc = node == null ? void 0 : node.loc;
if (!loc && node) {
traverseFast(node, function (node) {
if (node.loc) {
loc = node.loc;
return traverseFast.stop;
}
});
let txt = "This is an error on an internal node. Probably an internal error.";
if (loc) txt += " Location has been estimated.";
msg += ` (${txt})`;
}
if (loc) {
const {
highlightCode = true
} = this.opts;
msg += "\n" + (0, _codeFrame().codeFrameColumns)(this.code, {
start: {
line: loc.start.line,
column: loc.start.column + 1
},
end: loc.end && loc.start.line === loc.end.line ? {
line: loc.end.line,
column: loc.end.column + 1
} : undefined
}, {
highlightCode
});
}
return new _Error(msg);
}
}
exports.default = File;
{
File.prototype.addImport = function addImport() {
throw new Error("This API has been removed. If you're looking for this " + "functionality in Babel 7, you should import the " + "'@babel/helper-module-imports' module and use the functions exposed " + " from that module, such as 'addNamed' or 'addDefault'.");
};
File.prototype.addTemplateObject = function addTemplateObject() {
throw new Error("This function has been moved into the template literal transform itself.");
};
{
File.prototype.getModuleName = function getModuleName() {
return _babel7Helpers.getModuleName()(this.opts, this.opts);
};
}
}
0 && 0;
//# sourceMappingURL=file.js.map
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"1":"0 1 2 3 4 5 Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I","2":"C L M G N O P"},C:{"1":"0 1 2 3 4 5 jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB 0C 1C"},D:{"1":"0 1 2 3 4 5 zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB 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"},E:{"1":"cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"J ZB K D E F A B C L M G 2C ZC 3C 4C 5C 6C aC NC OC 7C 8C 9C bC"},F:{"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 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":"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 FD GD HD ID NC uC JD OC"},G:{"1":"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":"E ZC KD vC LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC"},H:{"2":"hD"},I:{"1":"I","2":"TC J iD jD kD lD vC mD nD"},J:{"2":"D A"},K:{"1":"H","2":"A B C NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"2":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 AB BB CB DB EB FB qD rD sD aC tD uD vD wD xD QC RC SC yD","2":"J oD pD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"1D 2D"}},B:1,C:"BroadcastChannel",D:true};
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D wC","132":"E F A B"},B:{"1":"0 1 2 3 4 5 Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I","132":"C L M G N O P"},C:{"1":"0 1 2 3 4 5 hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","132":"6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB 0C 1C"},D:{"1":"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","132":"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"},E:{"1":"QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"J ZB 2C ZC","132":"K D E F A B C L M G 3C 4C 5C 6C aC NC OC 7C 8C 9C bC cC PC AD"},F:{"1":"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","2":"F FD GD HD ID","16":"B NC uC","132":"6 7 8 9 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 JD OC"},G:{"1":"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","132":"E LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD"},H:{"2":"hD"},I:{"1":"I","16":"iD jD","132":"TC J kD lD vC mD nD"},J:{"132":"D A"},K:{"1":"H","132":"A B C NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"132":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 AB BB CB DB EB FB rD sD aC tD uD vD wD xD QC RC SC yD","132":"J oD pD qD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"1D 2D"}},B:5,C:"scrollIntoView",D:true};
@@ -0,0 +1,99 @@
{
"name": "object.values",
"version": "1.2.1",
"author": "Jordan Harband <ljharb@gmail.com>",
"funding": {
"url": "https://github.com/sponsors/ljharb"
},
"description": "ES2017 spec-compliant Object.values shim.",
"license": "MIT",
"main": "index.js",
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prepublishOnly": "safe-publish-latest",
"pretest": "npm run lint",
"test": "npm run tests-only",
"posttest": "npx npm@'>= 10.2' audit --production",
"tests-only": "nyc tape 'test/**/*.js'",
"lint": "eslint --ext=js,mjs .",
"postlint": "es-shim-api --bound",
"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://github.com/es-shims/Object.values.git"
},
"keywords": [
"Object.values",
"Object.keys",
"Object.entries",
"values",
"ES7",
"ES8",
"ES2017",
"shim",
"object",
"keys",
"entries",
"polyfill",
"es-shim API"
],
"dependencies": {
"call-bind": "^1.0.8",
"call-bound": "^1.0.3",
"define-properties": "^1.2.1",
"es-object-atoms": "^1.0.0"
},
"devDependencies": {
"@es-shims/api": "^2.5.1",
"@ljharb/eslint-config": "^21.1.1",
"array.prototype.map": "^1.0.7",
"auto-changelog": "^2.5.0",
"encoding": "^0.1.13",
"eslint": "=8.8.0",
"functions-have-names": "^1.2.3",
"has-strict-mode": "^1.0.1",
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"object-keys": "^1.1.1",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0"
},
"testling": {
"files": "test/index.js",
"browsers": [
"iexplore/9.0..latest",
"firefox/4.0..6.0",
"firefox/15.0..latest",
"firefox/nightly",
"chrome/4.0..10.0",
"chrome/20.0..latest",
"chrome/canary",
"opera/11.6..latest",
"opera/next",
"safari/5.0..latest",
"ipad/6.0..latest",
"iphone/6.0..latest",
"android-browser/4.2"
]
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
}
}
@@ -0,0 +1,9 @@
import type { TSchema } from '../schema/index';
import type { TProperties } from '../object/index';
import { Kind } from '../symbols/index';
export interface TMappedResult<T extends TProperties = TProperties> extends TSchema {
[Kind]: 'MappedResult';
properties: T;
static: unknown;
}
export declare function MappedResult<T extends TProperties>(properties: T): TMappedResult<T>;
@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = iterationDecorator;
var _iteratorProxy = _interopRequireDefault(require("./iteratorProxy"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
function iterationDecorator(collection, entries) {
if (typeof Symbol === 'function' && _typeof(Symbol.iterator) === 'symbol') {
Object.defineProperty(collection, Symbol.iterator, {
value: _iteratorProxy.default.bind(entries)
});
}
return collection;
}
@@ -0,0 +1,142 @@
import type { $ZodStringFormats } from "../core/checks.js";
import type * as errors from "../core/errors.js";
import * as util from "../core/util.js";
const error: () => errors.$ZodErrorMap = () => {
const Sizable: Record<string, { unit: string; verb: string }> = {
string: { unit: "znaků", verb: "mít" },
file: { unit: "bajtů", verb: "mít" },
array: { unit: "prvků", verb: "mít" },
set: { unit: "prvků", verb: "mít" },
};
function getSizing(origin: string): { unit: string; verb: string } | null {
return Sizable[origin] ?? null;
}
const parsedType = (data: any): string => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "NaN" : "číslo";
}
case "string": {
return "řetězec";
}
case "boolean": {
return "boolean";
}
case "bigint": {
return "bigint";
}
case "function": {
return "funkce";
}
case "symbol": {
return "symbol";
}
case "undefined": {
return "undefined";
}
case "object": {
if (Array.isArray(data)) {
return "pole";
}
if (data === null) {
return "null";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns: {
[k in $ZodStringFormats | (string & {})]?: string;
} = {
regex: "regulární výraz",
email: "e-mailová adresa",
url: "URL",
emoji: "emoji",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "datum a čas ve formátu ISO",
date: "datum ve formátu ISO",
time: "čas ve formátu ISO",
duration: "doba trvání ISO",
ipv4: "IPv4 adresa",
ipv6: "IPv6 adresa",
cidrv4: "rozsah IPv4",
cidrv6: "rozsah IPv6",
base64: "řetězec zakódovaný ve formátu base64",
base64url: "řetězec zakódovaný ve formátu base64url",
json_string: "řetězec ve formátu JSON",
e164: "číslo E.164",
jwt: "JWT",
template_literal: "vstup",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `Neplatný vstup: očekáváno ${issue.expected}, obdrženo ${parsedType(issue.input)}`;
case "invalid_value":
if (issue.values.length === 1) return `Neplatný vstup: očekáváno ${util.stringifyPrimitive(issue.values[0])}`;
return `Neplatná možnost: očekávána jedna z hodnot ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing) {
return `Hodnota je příliš velká: ${issue.origin ?? "hodnota"} musí mít ${adj}${issue.maximum.toString()} ${sizing.unit ?? "prvků"}`;
}
return `Hodnota je příliš velká: ${issue.origin ?? "hodnota"} musí být ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `Hodnota je příliš malá: ${issue.origin ?? "hodnota"} musí mít ${adj}${issue.minimum.toString()} ${sizing.unit ?? "prvků"}`;
}
return `Hodnota je příliš malá: ${issue.origin ?? "hodnota"} musí být ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue as errors.$ZodStringFormatIssues;
if (_issue.format === "starts_with") return `Neplatný řetězec: musí začínat na "${_issue.prefix}"`;
if (_issue.format === "ends_with") return `Neplatný řetězec: musí končit na "${_issue.suffix}"`;
if (_issue.format === "includes") return `Neplatný řetězec: musí obsahovat "${_issue.includes}"`;
if (_issue.format === "regex") return `Neplatný řetězec: musí odpovídat vzoru ${_issue.pattern}`;
return `Neplatný formát ${Nouns[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Neplatné číslo: musí být násobkem ${issue.divisor}`;
case "unrecognized_keys":
return `Neznámé klíče: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `Neplatný klíč v ${issue.origin}`;
case "invalid_union":
return "Neplatný vstup";
case "invalid_element":
return `Neplatná hodnota v ${issue.origin}`;
default:
return `Neplatný vstup`;
}
};
};
export default function (): { localeError: errors.$ZodErrorMap } {
return {
localeError: error(),
};
}
@@ -0,0 +1 @@
{"version":3,"file":"updateMetadataTag.spec.d.ts","sourceRoot":"","sources":["../../../../src/metadata/actions/updateMetadataTag.spec.ts"],"names":[],"mappings":""}
@@ -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/qs
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 a single custom sponsorship URL
@@ -0,0 +1,79 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/sort.tsx
var sort_exports = {};
__export(sort_exports, {
SortIcon: () => SortIcon
});
module.exports = __toCommonJS(sort_exports);
var import_jsx_runtime = require("react/jsx-runtime");
var SortIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
"svg",
{
fill: "none",
height: "15",
viewBox: "0 0 16 15",
width: "16",
xmlns: "http://www.w3.org/2000/svg",
...props,
children: [
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"path",
{
clipRule: "evenodd",
d: "M7.89789 10.0175C8.19079 9.72463 8.66566 9.72463 8.95855 10.0175L11.4282 12.4872L13.8979 10.0175C14.1908 9.72463 14.6657 9.72463 14.9586 10.0175C15.2514 10.3104 15.2514 10.7853 14.9586 11.0782L11.9586 14.0782C11.6657 14.3711 11.1908 14.3711 10.8979 14.0782L7.89789 11.0782C7.605 10.7853 7.605 10.3104 7.89789 10.0175Z",
fill: "#71717A",
fillRule: "evenodd"
}
),
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"path",
{
clipRule: "evenodd",
d: "M11.4282 0.797852C11.8424 0.797852 12.1782 1.13364 12.1782 1.54785V13.5479C12.1782 13.9621 11.8424 14.2979 11.4282 14.2979C11.014 14.2979 10.6782 13.9621 10.6782 13.5479V1.54785C10.6782 1.13364 11.014 0.797852 11.4282 0.797852Z",
fill: "#71717A",
fillRule: "evenodd"
}
),
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"path",
{
clipRule: "evenodd",
d: "M3.39789 1.01752C3.69079 0.724628 4.16566 0.724628 4.45855 1.01752L7.45855 4.01752C7.75145 4.31041 7.75145 4.78529 7.45855 5.07818C7.16566 5.37107 6.69079 5.37107 6.39789 5.07818L3.92822 2.60851L1.45855 5.07818C1.16566 5.37107 0.690786 5.37107 0.397893 5.07818C0.104999 4.78529 0.104999 4.31041 0.397893 4.01752L3.39789 1.01752Z",
fill: "#71717A",
fillRule: "evenodd"
}
),
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"path",
{
clipRule: "evenodd",
d: "M3.92822 0.797852C4.34244 0.797852 4.67822 1.13364 4.67822 1.54785V13.5479C4.67822 13.9621 4.34244 14.2979 3.92822 14.2979C3.51401 14.2979 3.17822 13.9621 3.17822 13.5479V1.54785C3.17822 1.13364 3.51401 0.797852 3.92822 0.797852Z",
fill: "#71717A",
fillRule: "evenodd"
}
)
]
}
);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
SortIcon
});
@@ -0,0 +1 @@
{"uChars":[128,165,169,178,184,216,226,235,238,244,248,251,253,258,276,284,300,325,329,334,364,463,465,467,469,471,473,475,477,506,594,610,712,716,730,930,938,962,970,1026,1104,1106,8209,8215,8218,8222,8231,8241,8244,8246,8252,8365,8452,8454,8458,8471,8482,8556,8570,8596,8602,8713,8720,8722,8726,8731,8737,8740,8742,8748,8751,8760,8766,8777,8781,8787,8802,8808,8816,8854,8858,8870,8896,8979,9322,9372,9548,9588,9616,9622,9634,9652,9662,9672,9676,9680,9702,9735,9738,9793,9795,11906,11909,11913,11917,11928,11944,11947,11951,11956,11960,11964,11979,12284,12292,12312,12319,12330,12351,12436,12447,12535,12543,12586,12842,12850,12964,13200,13215,13218,13253,13263,13267,13270,13384,13428,13727,13839,13851,14617,14703,14801,14816,14964,15183,15471,15585,16471,16736,17208,17325,17330,17374,17623,17997,18018,18212,18218,18301,18318,18760,18811,18814,18820,18823,18844,18848,18872,19576,19620,19738,19887,40870,59244,59336,59367,59413,59417,59423,59431,59437,59443,59452,59460,59478,59493,63789,63866,63894,63976,63986,64016,64018,64021,64025,64034,64037,64042,65074,65093,65107,65112,65127,65132,65375,65510,65536],"gbChars":[0,36,38,45,50,81,89,95,96,100,103,104,105,109,126,133,148,172,175,179,208,306,307,308,309,310,311,312,313,341,428,443,544,545,558,741,742,749,750,805,819,820,7922,7924,7925,7927,7934,7943,7944,7945,7950,8062,8148,8149,8152,8164,8174,8236,8240,8262,8264,8374,8380,8381,8384,8388,8390,8392,8393,8394,8396,8401,8406,8416,8419,8424,8437,8439,8445,8482,8485,8496,8521,8603,8936,8946,9046,9050,9063,9066,9076,9092,9100,9108,9111,9113,9131,9162,9164,9218,9219,11329,11331,11334,11336,11346,11361,11363,11366,11370,11372,11375,11389,11682,11686,11687,11692,11694,11714,11716,11723,11725,11730,11736,11982,11989,12102,12336,12348,12350,12384,12393,12395,12397,12510,12553,12851,12962,12973,13738,13823,13919,13933,14080,14298,14585,14698,15583,15847,16318,16434,16438,16481,16729,17102,17122,17315,17320,17402,17418,17859,17909,17911,17915,17916,17936,17939,17961,18664,18703,18814,18962,19043,33469,33470,33471,33484,33485,33490,33497,33501,33505,33513,33520,33536,33550,37845,37921,37948,38029,38038,38064,38065,38066,38069,38075,38076,38078,39108,39109,39113,39114,39115,39116,39265,39394,189000]}
@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const d=r=>r!==null&&typeof r=="object",s=(r,t)=>Object.assign(new Error(`[${r}]: ${t}`),{code:r}),g="ERR_INVALID_PACKAGE_CONFIG",E="ERR_INVALID_PACKAGE_TARGET",I="ERR_PACKAGE_PATH_NOT_EXPORTED",P="ERR_PACKAGE_IMPORT_NOT_DEFINED",R=/^\d+$/,O=/^(\.{1,2}|node_modules)$/i,u=/\/|\\/;var h=(r=>(r.Export="exports",r.Import="imports",r))(h||{});const f=(r,t,n,o,c)=>{if(t==null)return[];if(typeof t=="string"){const[e,...i]=t.split(u);if(e===".."||i.some(l=>O.test(l)))throw s(E,`Invalid "${r}" target "${t}" defined in the package config`);return[c?t.replace(/\*/g,c):t]}if(Array.isArray(t))return t.flatMap(e=>f(r,e,n,o,c));if(d(t)){for(const e of Object.keys(t)){if(R.test(e))throw s(g,"Cannot contain numeric property keys");if(e==="default"||o.includes(e))return f(r,t[e],n,o,c)}return[]}throw s(E,`Invalid "${r}" target "${t}"`)},a="*",v=(r,t)=>{const n=r.indexOf(a),o=t.indexOf(a);return n===o?t.length>r.length:o>n};function A(r,t){if(!t.includes(a)&&r.hasOwnProperty(t))return[t];let n,o;for(const c of Object.keys(r))if(c.includes(a)){const[e,i,l]=c.split(a);if(l===void 0&&t.startsWith(e)&&t.endsWith(i)){const _=t.slice(e.length,-i.length||void 0);_&&(!n||v(n,c))&&(n=c,o=_)}}return[n,o]}const p=r=>Object.keys(r).reduce((t,n)=>{const o=n===""||n[0]!==".";if(t===void 0||t===o)return o;throw s(g,'"exports" cannot contain some keys starting with "." and some not')},void 0),w=/^\w+:/,m=(r,t,n)=>{if(!r)throw new Error('"exports" is required');t=t===""?".":`./${t}`,(typeof r=="string"||Array.isArray(r)||d(r)&&p(r))&&(r={".":r});const[o,c]=A(r,t),e=f(h.Export,r[o],t,n,c);if(e.length===0)throw s(I,t==="."?'No "exports" main defined':`Package subpath '${t}' is not defined by "exports"`);for(const i of e)if(!i.startsWith("./")&&!w.test(i))throw s(E,`Invalid "exports" target "${i}" defined in the package config`);return e},T=(r,t,n)=>{if(!r)throw new Error('"imports" is required');const[o,c]=A(r,t),e=f(h.Import,r[o],t,n,c);if(e.length===0)throw s(P,`Package import specifier "${t}" is not defined in package`);return e};exports.resolveExports=m,exports.resolveImports=T;
@@ -0,0 +1,102 @@
import {isElementInChildOfActiveScope as $jtpZv$isElementInChildOfActiveScope} from "@react-aria/focus";
import {useEffect as $jtpZv$useEffect} from "react";
import {useInteractOutside as $jtpZv$useInteractOutside, useFocusWithin as $jtpZv$useFocusWithin} from "@react-aria/interactions";
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
const $a11501f3d1d39e6c$var$visibleOverlays = [];
function $a11501f3d1d39e6c$export$ea8f71083e90600f(props, ref) {
let { onClose: onClose, shouldCloseOnBlur: shouldCloseOnBlur, isOpen: isOpen, isDismissable: isDismissable = false, isKeyboardDismissDisabled: isKeyboardDismissDisabled = false, shouldCloseOnInteractOutside: shouldCloseOnInteractOutside } = props;
// Add the overlay ref to the stack of visible overlays on mount, and remove on unmount.
(0, $jtpZv$useEffect)(()=>{
if (isOpen && !$a11501f3d1d39e6c$var$visibleOverlays.includes(ref)) {
$a11501f3d1d39e6c$var$visibleOverlays.push(ref);
return ()=>{
let index = $a11501f3d1d39e6c$var$visibleOverlays.indexOf(ref);
if (index >= 0) $a11501f3d1d39e6c$var$visibleOverlays.splice(index, 1);
};
}
}, [
isOpen,
ref
]);
// Only hide the overlay when it is the topmost visible overlay in the stack
let onHide = ()=>{
if ($a11501f3d1d39e6c$var$visibleOverlays[$a11501f3d1d39e6c$var$visibleOverlays.length - 1] === ref && onClose) onClose();
};
let onInteractOutsideStart = (e)=>{
if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(e.target)) {
if ($a11501f3d1d39e6c$var$visibleOverlays[$a11501f3d1d39e6c$var$visibleOverlays.length - 1] === ref) {
e.stopPropagation();
e.preventDefault();
}
}
};
let onInteractOutside = (e)=>{
if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(e.target)) {
if ($a11501f3d1d39e6c$var$visibleOverlays[$a11501f3d1d39e6c$var$visibleOverlays.length - 1] === ref) {
e.stopPropagation();
e.preventDefault();
}
onHide();
}
};
// Handle the escape key
let onKeyDown = (e)=>{
if (e.key === 'Escape' && !isKeyboardDismissDisabled && !e.nativeEvent.isComposing) {
e.stopPropagation();
e.preventDefault();
onHide();
}
};
// Handle clicking outside the overlay to close it
(0, $jtpZv$useInteractOutside)({
ref: ref,
onInteractOutside: isDismissable && isOpen ? onInteractOutside : undefined,
onInteractOutsideStart: onInteractOutsideStart
});
let { focusWithinProps: focusWithinProps } = (0, $jtpZv$useFocusWithin)({
isDisabled: !shouldCloseOnBlur,
onBlurWithin: (e)=>{
// Do not close if relatedTarget is null, which means focus is lost to the body.
// That can happen when switching tabs, or due to a VoiceOver/Chrome bug with Control+Option+Arrow navigation.
// Clicking on the body to close the overlay should already be handled by useInteractOutside.
// https://github.com/adobe/react-spectrum/issues/4130
// https://github.com/adobe/react-spectrum/issues/4922
//
// If focus is moving into a child focus scope (e.g. menu inside a dialog),
// do not close the outer overlay. At this point, the active scope should
// still be the outer overlay, since blur events run before focus.
if (!e.relatedTarget || (0, $jtpZv$isElementInChildOfActiveScope)(e.relatedTarget)) return;
if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(e.relatedTarget)) onClose === null || onClose === void 0 ? void 0 : onClose();
}
});
let onPointerDownUnderlay = (e)=>{
// fixes a firefox issue that starts text selection https://bugzilla.mozilla.org/show_bug.cgi?id=1675846
if (e.target === e.currentTarget) e.preventDefault();
};
return {
overlayProps: {
onKeyDown: onKeyDown,
...focusWithinProps
},
underlayProps: {
onPointerDown: onPointerDownUnderlay
}
};
}
export {$a11501f3d1d39e6c$export$ea8f71083e90600f as useOverlay};
//# sourceMappingURL=useOverlay.module.js.map
@@ -0,0 +1,18 @@
type Assertiveness = 'assertive' | 'polite';
type Message = string | {
'aria-labelledby': string;
};
/**
* Announces the message using screen reader technology.
*/
export function announce(message: Message, assertiveness?: Assertiveness, timeout?: number): void;
/**
* Stops all queued announcements.
*/
export function clearAnnouncer(assertiveness: Assertiveness): void;
/**
* Removes the announcer from the DOM.
*/
export function destroyAnnouncer(): void;
//# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,625 @@
export default `flf2a$ 6 5 20 15 11
Letters by Sriram J. Gollapalli, July 10, 1994
o__ +----------------------+ __o
_.>/)_ | Sriram J. Gollapalli | _(\\<._
(_) \\(_) +----------------------+ (_)/ (_)
<sriram@capaccess.org>
---
Font modified June 17, 2007 (without permission) by patorjk
This was to widen "space" character.
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@@
!!!$@
!!!$@
!!!$@
$@
!!!$@
$@@
"""""$@
"""""$@
""" $@
$@
$@
$@@
$@
## ## $@
#######$@
#######$@
## ## $@
$@@
/|-\\$@
/ | $@
\\-|-\\$@
| |$@
\\-|-/$@
$@@
%% %%$@
%% %% $@
%% $@
%% %%$@
%% %%$@
$@@
&&& $@
&& && $@
&&&&&&&$@
&&& && $@
&&&&&&&$@
$@@
' $@
'''$@
'' $@
$@
$@
$@@
$@
((($@
((( $@
((( $@
((( $@
((($@@
$@
))) $@
)))$@
)))$@
)))$@
))) $@@
$@
* *$@
*** $@
*** $@
* *$@
$@@
$@
+++ $@
+++++++$@
+++++++$@
+++ $@
$@@
$@
$@
$@
, $@
,,,$@
,, $@@
$@
$@
_____ $@
$@
$@
$@@
$@
$@
$@
...$@
...$@
$@@
//$@
///$@
/// $@
/// $@
/// $@
$@@
00000 $@
00 00$@
00 00$@
00 00$@
00000 $@
$@@
1 $@
111$@
11$@
11$@
111$@
$@@
2222 $@
222222 $@
222$@
2222 $@
2222222$@
$@@
333333 $@
3333$@
3333 $@
333$@
333333 $@
$@@
44 $@
444 $@
44 4 $@
44444444$@
444 $@
$@@
555555 $@
55 $@
555555 $@
5555$@
555555 $@
$@@
666 $@
66 $@
666666 $@
66 66$@
66666 $@
$@@
7777777$@
777$@
777 $@
777 $@
777 $@
$@@
88888 $@
88 88$@
88888 $@
88 88$@
88888 $@
$@@
$@
99999 $@
99 99$@
999999$@
99 $@
999 $@@
$@
$@
:::$@
$@
:::$@
$@@
$@
$@
;;;$@
$@
;;;$@
;; $@@
$@
<<<$@
<<< $@
<<< $@
<<<$@
$@@
$@
$@
=======$@
=======$@
$@
$@@
$@
>>> $@
>>>$@
>>>$@
>>> $@
$@@
??? $@
?? ??$@
??$@
?? $@
?? $@
$@@
@@@@ $@
@ @@ @$@
@ @ @@$@
@ @@@ $@
@@@@@ $@
$@@
AAA $@
AAAAA $@
AA AA$@
AAAAAAA$@
AA AA$@
$@@
BBBBB $@
BB B $@
BBBBBB $@
BB BB$@
BBBBBB $@
$@@
CCCCC $@
CC C$@
CC $@
CC C$@
CCCCC $@
$@@
DDDDD $@
DD DD $@
DD DD$@
DD DD$@
DDDDDD $@
$@@
EEEEEEE$@
EE $@
EEEEE $@
EE $@
EEEEEEE$@
$@@
FFFFFFF$@
FF $@
FFFF $@
FF $@
FF $@
$@@
GGGG $@
GG GG$@
GG $@
GG GG$@
GGGGGG$@
$@@
HH HH$@
HH HH$@
HHHHHHH$@
HH HH$@
HH HH$@
$@@
IIIII$@
III $@
III $@
III $@
IIIII$@
$@@
JJJ$@
JJJ$@
JJJ$@
JJ JJJ$@
JJJJJ $@
$@@
KK KK$@
KK KK $@
KKKK $@
KK KK $@
KK KK$@
$@@
LL $@
LL $@
LL $@
LL $@
LLLLLLL$@
$@@
MM MM$@
MMM MMM$@
MM MM MM$@
MM MM$@
MM MM$@
$@@
NN NN$@
NNN NN$@
NN N NN$@
NN NNN$@
NN NN$@
$@@
OOOOO $@
OO OO$@
OO OO$@
OO OO$@
OOOO0 $@
$@@
PPPPPP $@
PP PP$@
PPPPPP $@
PP $@
PP $@
$@@
QQQQQ $@
QQ QQ$@
QQ QQ$@
QQ QQ $@
QQQQ Q$@
$@@
RRRRRR $@
RR RR$@
RRRRRR $@
RR RR $@
RR RR$@
$@@
SSSSS $@
SS $@
SSSSS $@
SS$@
SSSSS $@
$@@
TTTTTTT$@
TTT $@
TTT $@
TTT $@
TTT $@
$@@
UU UU$@
UU UU$@
UU UU$@
UU UU$@
UUUUU $@
$@@
VV VV$@
VV VV$@
VV VV $@
VV VV $@
VVV $@
$@@
WW WW$@
WW WW$@
WW W WW$@
WW WWW WW$@
WW WW $@
$@@
XX XX$@
XX XX $@
XXXX $@
XX XX $@
XX XX$@
$@@
YY YY$@
YY YY$@
YYYYY $@
YYY $@
YYY $@
$@@
ZZZZZ$@
ZZ$@
ZZ $@
ZZ $@
ZZZZZ$@
$@@
[[[[$@
[[ $@
[[ $@
[[ $@
[[[[$@
$@@
\\\\ $@
\\\\ $@
\\\\ $@
\\\\ $@
\\\\$@
$@@
]]]]$@
]]$@
]]$@
]]$@
]]]]$@
$@@
^^ $@
^^^^$@
^ ^$@
$@
$@
$@@
$@
$@
$@
$@
_______$@
$@@
\` $@
\`\`\`$@
\`\`$@
$@
$@
$@@
$@
aa aa$@
aa aaa$@
aa aaa$@
aaa aa$@
$@@
bb $@
bb $@
bbbbbb $@
bb bb$@
bbbbbb $@
$@@
$@
cccc$@
cc $@
cc $@
ccccc$@
$@@
dd$@
dd$@
dddddd$@
dd dd$@
dddddd$@
$@@
$@
eee $@
ee e$@
eeeee $@
eeeee$@
$@@
fff$@
ff $@
ffff$@
ff $@
ff $@
$@@
$@
gggggg$@
gg gg$@
ggggggg$@
gg$@
ggggg $@@
hh $@
hh $@
hhhhhh $@
hh hh$@
hh hh$@
$@@
iii$@
$@
iii$@
iii$@
iii$@
$@@
jjj$@
$@
jjj$@
jjj$@
jjj$@
jjjj $@@
kk $@
kk kk$@
kkkkk $@
kk kk $@
kk kk$@
$@@
lll$@
lll$@
lll$@
lll$@
lll$@
$@@
$@
mm mm mmmm $@
mmm mm mm$@
mmm mm mm$@
mmm mm mm$@
$@@
$@
nn nnn $@
nnn nn$@
nn nn$@
nn nn$@
$@@
$@
oooo $@
oo oo$@
oo oo$@
oooo $@
$@@
$@
pp pp $@
ppp pp$@
pppppp $@
pp $@
pp $@@
$@
qqqqq$@
qq qq$@
qqqqqq$@
qq$@
qq$@@
$@
rr rr $@
rrr r$@
rr $@
rr $@
$@@
$@
sss $@
s $@
sss $@
s$@
sss $@@
tt $@
tt $@
tttt $@
tt $@
tttt$@
$@@
$@
uu uu$@
uu uu$@
uu uu$@
uuuu u$@
$@@
$@
vv vv$@
vv vv $@
vvv $@
v $@
$@@
$@
ww ww$@
ww ww$@
ww ww ww $@
ww ww $@
$@@
$@
xx xx$@
xx $@
xx $@
xx xx$@
$@@
$@
yy yy$@
yy yy$@
yyyyyy$@
yy$@
yyyyy $@@
$@
zzzzz$@
zz $@
zz $@
zzzzz$@
$@@
{{$@
{{ $@
{{{ $@
{{{ $@
{{ $@
{{$@@
$@
||$@
||$@
||$@
||$@
||$@@
}} $@
}} $@
}}}$@
}}}$@
}} $@
}} $@@
$@
~~ ~~$@
~ ~ $@
$@
$@
$@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
`
@@ -0,0 +1,16 @@
var $c7df6686b4189d56$exports = {};
$c7df6686b4189d56$exports = {
"ascending": `augo\u{161}\u{101} sec\u{12B}b\u{101}`,
"ascendingSort": (args)=>`k\u{101}rtots p\u{113}c kolonnas ${args.columnName} augo\u{161}\u{101} sec\u{12B}b\u{101}`,
"columnSize": (args)=>`${args.value} pikse\u{13C}i`,
"descending": `dilsto\u{161}\u{101} sec\u{12B}b\u{101}`,
"descendingSort": (args)=>`k\u{101}rtots p\u{113}c kolonnas ${args.columnName} dilsto\u{161}\u{101} sec\u{12B}b\u{101}`,
"resizerDescription": `Nospiediet Enter, lai s\u{101}ktu izm\u{113}ru main\u{12B}\u{161}anu`,
"select": `Atlas\u{12B}t`,
"selectAll": `Atlas\u{12B}t visu`,
"sortable": `k\u{101}rtojam\u{101} kolonna`
};
export {$c7df6686b4189d56$exports as default};
//# sourceMappingURL=lv-LV.module.js.map
@@ -0,0 +1,47 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _head = _interopRequireDefault(require("./head"));
var _maxp = _interopRequireDefault(require("./maxp"));
var _loca = _interopRequireDefault(require("./loca"));
var _cmap = _interopRequireDefault(require("./cmap"));
var _glyf = _interopRequireDefault(require("./glyf"));
var _name = _interopRequireDefault(require("./name"));
var _hhea = _interopRequireDefault(require("./hhea"));
var _hmtx = _interopRequireDefault(require("./hmtx"));
var _post = _interopRequireDefault(require("./post"));
var _OS = _interopRequireDefault(require("./OS2"));
var _fpgm = _interopRequireDefault(require("./fpgm"));
var _cvt = _interopRequireDefault(require("./cvt"));
var _prep = _interopRequireDefault(require("./prep"));
var _gasp = _interopRequireDefault(require("./gasp"));
var _GPOS = _interopRequireDefault(require("./GPOS"));
var _kern = _interopRequireDefault(require("./kern"));
var _kerx = _interopRequireDefault(require("./kerx"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* @file ttf读取和写入支持的表
* @author mengke01(kekee000@gmail.com)
*/
var _default = exports.default = {
head: _head.default,
maxp: _maxp.default,
loca: _loca.default,
cmap: _cmap.default,
glyf: _glyf.default,
name: _name.default,
hhea: _hhea.default,
hmtx: _hmtx.default,
post: _post.default,
'OS/2': _OS.default,
fpgm: _fpgm.default,
cvt: _cvt.default,
prep: _prep.default,
gasp: _gasp.default,
GPOS: _GPOS.default,
kern: _kern.default,
kerx: _kerx.default
};
@@ -0,0 +1 @@
{"name":"redent","version":"4.0.0","requiresBuild":false,"files":{"license":{"checkedAt":1794532093291,"integrity":"sha512-0fM2/ycrxrltyaBKfQ748Ck23VlPUUBgNAR47ldf4B1V/HoXTfWBSk+vcshGKwEpmOynu4mOP5o+hyBfuRNa8g==","mode":420,"size":1117},"index.js":{"checkedAt":1794532120218,"integrity":"sha512-fGilqBPk+Usqc6Tqcjv/c+WAqBSm4Y3wcawOQ3BTJ0Es7gfFoA2TWA4MZfptP6J03XyhkH7MkzhES4vOcqZ4NA==","mode":420,"size":210},"package.json":{"checkedAt":1794532120218,"integrity":"sha512-rqCbGQm8wnZYLOdrvfNSxqulP9t5APMsuWaMoONFhStCEBldQl+xUXT+6k3bTIrMxd+b2pdh2pN9kGfNy9UYrA==","mode":420,"size":834},"readme.md":{"checkedAt":1794532120218,"integrity":"sha512-uHjRv/Hxiz/Dwp891w8fwNLXbu81ukqIz0otsYvcs7fL/er6SVIrm87Km38TeSFKThIODwqqWCf+cwfgF1Ak+Q==","mode":420,"size":1143},"index.d.ts":{"checkedAt":1794532120218,"integrity":"sha512-mpp6N4fEryFt6lenmbhLBnR+rNsh76qQAR6qBVCCFpHqOpWpJLH5mPGrV61qhiLZpwJU2jmhMKJgm/k17Y+pQw==","mode":420,"size":549}}}
@@ -0,0 +1,15 @@
/// <reference types="node" />
import { IncomingMessage } from "http";
export = typeIs;
declare function typeIs(request: IncomingMessage, types: string[]): string | false | null;
declare function typeIs(request: IncomingMessage, ...types: string[]): string | false | null;
declare namespace typeIs {
function normalize(type: string): string | false;
function hasBody(request: IncomingMessage): boolean;
function is(mediaType: string, types: string[]): string | false;
function is(mediaType: string, ...types: string[]): string | false;
function match(expected: false | string, actual: string): boolean;
}
@@ -0,0 +1,44 @@
{
"name": "unique-slug",
"version": "3.0.0",
"description": "Generate a unique character string suitible for use in files and URLs.",
"main": "lib/index.js",
"scripts": {
"test": "tap",
"lint": "eslint \"**/*.js\"",
"postlint": "template-oss-check",
"template-oss-apply": "template-oss-apply --force",
"lintfix": "npm run lint -- --fix",
"preversion": "npm test",
"postversion": "npm publish",
"prepublishOnly": "git push origin --follow-tags",
"snap": "tap",
"posttest": "npm run lint"
},
"keywords": [],
"author": "GitHub Inc.",
"license": "ISC",
"devDependencies": {
"@npmcli/eslint-config": "^3.1.0",
"@npmcli/template-oss": "3.5.0",
"tap": "^16.3.0"
},
"repository": {
"type": "git",
"url": "https://github.com/npm/unique-slug.git"
},
"dependencies": {
"imurmurhash": "^0.1.4"
},
"files": [
"bin/",
"lib/"
],
"engines": {
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
},
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"version": "3.5.0"
}
}
@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
function getType(value) {
return Object.prototype.toString.call(value).slice(8, -1);
}
exports.getType = getType;
@@ -0,0 +1,289 @@
'use strict'
var Plumbing = require('./plumbing.js')
var hasUnicode = require('has-unicode')
var hasColor = require('./has-color.js')
var onExit = require('signal-exit')
var defaultThemes = require('./themes')
var setInterval = require('./set-interval.js')
var process = require('./process.js')
var setImmediate = require('./set-immediate')
module.exports = Gauge
function callWith (obj, method) {
return function () {
return method.call(obj)
}
}
function Gauge (arg1, arg2) {
var options, writeTo
if (arg1 && arg1.write) {
writeTo = arg1
options = arg2 || {}
} else if (arg2 && arg2.write) {
writeTo = arg2
options = arg1 || {}
} else {
writeTo = process.stderr
options = arg1 || arg2 || {}
}
this._status = {
spun: 0,
section: '',
subsection: '',
}
this._paused = false // are we paused for back pressure?
this._disabled = true // are all progress bar updates disabled?
this._showing = false // do we WANT the progress bar on screen
this._onScreen = false // IS the progress bar on screen
this._needsRedraw = false // should we print something at next tick?
this._hideCursor = options.hideCursor == null ? true : options.hideCursor
this._fixedFramerate = options.fixedFramerate == null
? !(/^v0\.8\./.test(process.version))
: options.fixedFramerate
this._lastUpdateAt = null
this._updateInterval = options.updateInterval == null ? 50 : options.updateInterval
this._themes = options.themes || defaultThemes
this._theme = options.theme
var theme = this._computeTheme(options.theme)
var template = options.template || [
{ type: 'progressbar', length: 20 },
{ type: 'activityIndicator', kerning: 1, length: 1 },
{ type: 'section', kerning: 1, default: '' },
{ type: 'subsection', kerning: 1, default: '' },
]
this.setWriteTo(writeTo, options.tty)
var PlumbingClass = options.Plumbing || Plumbing
this._gauge = new PlumbingClass(theme, template, this.getWidth())
this._$$doRedraw = callWith(this, this._doRedraw)
this._$$handleSizeChange = callWith(this, this._handleSizeChange)
this._cleanupOnExit = options.cleanupOnExit == null || options.cleanupOnExit
this._removeOnExit = null
if (options.enabled || (options.enabled == null && this._tty && this._tty.isTTY)) {
this.enable()
} else {
this.disable()
}
}
Gauge.prototype = {}
Gauge.prototype.isEnabled = function () {
return !this._disabled
}
Gauge.prototype.setTemplate = function (template) {
this._gauge.setTemplate(template)
if (this._showing) {
this._requestRedraw()
}
}
Gauge.prototype._computeTheme = function (theme) {
if (!theme) {
theme = {}
}
if (typeof theme === 'string') {
theme = this._themes.getTheme(theme)
} else if (
Object.keys(theme).length === 0 || theme.hasUnicode != null || theme.hasColor != null
) {
var useUnicode = theme.hasUnicode == null ? hasUnicode() : theme.hasUnicode
var useColor = theme.hasColor == null ? hasColor : theme.hasColor
theme = this._themes.getDefault({
hasUnicode: useUnicode,
hasColor: useColor,
platform: theme.platform,
})
}
return theme
}
Gauge.prototype.setThemeset = function (themes) {
this._themes = themes
this.setTheme(this._theme)
}
Gauge.prototype.setTheme = function (theme) {
this._gauge.setTheme(this._computeTheme(theme))
if (this._showing) {
this._requestRedraw()
}
this._theme = theme
}
Gauge.prototype._requestRedraw = function () {
this._needsRedraw = true
if (!this._fixedFramerate) {
this._doRedraw()
}
}
Gauge.prototype.getWidth = function () {
return ((this._tty && this._tty.columns) || 80) - 1
}
Gauge.prototype.setWriteTo = function (writeTo, tty) {
var enabled = !this._disabled
if (enabled) {
this.disable()
}
this._writeTo = writeTo
this._tty = tty ||
(writeTo === process.stderr && process.stdout.isTTY && process.stdout) ||
(writeTo.isTTY && writeTo) ||
this._tty
if (this._gauge) {
this._gauge.setWidth(this.getWidth())
}
if (enabled) {
this.enable()
}
}
Gauge.prototype.enable = function () {
if (!this._disabled) {
return
}
this._disabled = false
if (this._tty) {
this._enableEvents()
}
if (this._showing) {
this.show()
}
}
Gauge.prototype.disable = function () {
if (this._disabled) {
return
}
if (this._showing) {
this._lastUpdateAt = null
this._showing = false
this._doRedraw()
this._showing = true
}
this._disabled = true
if (this._tty) {
this._disableEvents()
}
}
Gauge.prototype._enableEvents = function () {
if (this._cleanupOnExit) {
this._removeOnExit = onExit(callWith(this, this.disable))
}
this._tty.on('resize', this._$$handleSizeChange)
if (this._fixedFramerate) {
this.redrawTracker = setInterval(this._$$doRedraw, this._updateInterval)
if (this.redrawTracker.unref) {
this.redrawTracker.unref()
}
}
}
Gauge.prototype._disableEvents = function () {
this._tty.removeListener('resize', this._$$handleSizeChange)
if (this._fixedFramerate) {
clearInterval(this.redrawTracker)
}
if (this._removeOnExit) {
this._removeOnExit()
}
}
Gauge.prototype.hide = function (cb) {
if (this._disabled) {
return cb && process.nextTick(cb)
}
if (!this._showing) {
return cb && process.nextTick(cb)
}
this._showing = false
this._doRedraw()
cb && setImmediate(cb)
}
Gauge.prototype.show = function (section, completed) {
this._showing = true
if (typeof section === 'string') {
this._status.section = section
} else if (typeof section === 'object') {
var sectionKeys = Object.keys(section)
for (var ii = 0; ii < sectionKeys.length; ++ii) {
var key = sectionKeys[ii]
this._status[key] = section[key]
}
}
if (completed != null) {
this._status.completed = completed
}
if (this._disabled) {
return
}
this._requestRedraw()
}
Gauge.prototype.pulse = function (subsection) {
this._status.subsection = subsection || ''
this._status.spun++
if (this._disabled) {
return
}
if (!this._showing) {
return
}
this._requestRedraw()
}
Gauge.prototype._handleSizeChange = function () {
this._gauge.setWidth(this._tty.columns - 1)
this._requestRedraw()
}
Gauge.prototype._doRedraw = function () {
if (this._disabled || this._paused) {
return
}
if (!this._fixedFramerate) {
var now = Date.now()
if (this._lastUpdateAt && now - this._lastUpdateAt < this._updateInterval) {
return
}
this._lastUpdateAt = now
}
if (!this._showing && this._onScreen) {
this._onScreen = false
var result = this._gauge.hide()
if (this._hideCursor) {
result += this._gauge.showCursor()
}
return this._writeTo.write(result)
}
if (!this._showing && !this._onScreen) {
return
}
if (this._showing && !this._onScreen) {
this._onScreen = true
this._needsRedraw = true
if (this._hideCursor) {
this._writeTo.write(this._gauge.hideCursor())
}
}
if (!this._needsRedraw) {
return
}
if (!this._writeTo.write(this._gauge.show(this._status))) {
this._paused = true
this._writeTo.on('drain', callWith(this, function () {
this._paused = false
this._doRedraw()
}))
}
}
@@ -0,0 +1 @@
{"version":3,"names":["module","exports","import_","filepath"],"sources":["../../../src/config/files/import.cjs"],"sourcesContent":["// We keep this in a separate file so that in older node versions, where\n// import() isn't supported, we can try/catch around the require() call\n// when loading this file.\n\nmodule.exports = function import_(filepath) {\n return import(filepath);\n};\n"],"mappings":"AAIAA,MAAM,CAACC,OAAO,GAAG,SAASC,OAAOA,CAACC,QAAQ,EAAE;EAC1C,OAAO,OAAOA,QAAQ,CAAC;AACzB,CAAC;AAAC","ignoreList":[]}
@@ -0,0 +1,8 @@
import {
drawer
} from "../chunk-EP7KPCL3.mjs";
import "../chunk-UWE6H66T.mjs";
import "../chunk-GIXI35A3.mjs";
export {
drawer
};
@@ -0,0 +1,113 @@
import type { Middleware, UnknownAction } from 'redux'
import type { ThunkMiddleware } from 'redux-thunk'
import { thunk as thunkMiddleware, withExtraArgument } from 'redux-thunk'
import type { ActionCreatorInvariantMiddlewareOptions } from './actionCreatorInvariantMiddleware'
import { createActionCreatorInvariantMiddleware } from './actionCreatorInvariantMiddleware'
import type { ImmutableStateInvariantMiddlewareOptions } from './immutableStateInvariantMiddleware'
/* PROD_START_REMOVE_UMD */
import { createImmutableStateInvariantMiddleware } from './immutableStateInvariantMiddleware'
/* PROD_STOP_REMOVE_UMD */
import type { SerializableStateInvariantMiddlewareOptions } from './serializableStateInvariantMiddleware'
import { createSerializableStateInvariantMiddleware } from './serializableStateInvariantMiddleware'
import type { ExcludeFromTuple } from './tsHelpers'
import { Tuple } from './utils'
function isBoolean(x: any): x is boolean {
return typeof x === 'boolean'
}
interface ThunkOptions<E = any> {
extraArgument: E
}
interface GetDefaultMiddlewareOptions {
thunk?: boolean | ThunkOptions
immutableCheck?: boolean | ImmutableStateInvariantMiddlewareOptions
serializableCheck?: boolean | SerializableStateInvariantMiddlewareOptions
actionCreatorCheck?: boolean | ActionCreatorInvariantMiddlewareOptions
}
export type ThunkMiddlewareFor<
S,
O extends GetDefaultMiddlewareOptions = {},
> = O extends {
thunk: false
}
? never
: O extends { thunk: { extraArgument: infer E } }
? ThunkMiddleware<S, UnknownAction, E>
: ThunkMiddleware<S, UnknownAction>
export type GetDefaultMiddleware<S = any> = <
O extends GetDefaultMiddlewareOptions = {
thunk: true
immutableCheck: true
serializableCheck: true
actionCreatorCheck: true
},
>(
options?: O,
) => Tuple<ExcludeFromTuple<[ThunkMiddlewareFor<S, O>], never>>
export const buildGetDefaultMiddleware = <S = any>(): GetDefaultMiddleware<S> =>
function getDefaultMiddleware(options) {
const {
thunk = true,
immutableCheck = true,
serializableCheck = true,
actionCreatorCheck = true,
} = options ?? {}
let middlewareArray = new Tuple<Middleware[]>()
if (thunk) {
if (isBoolean(thunk)) {
middlewareArray.push(thunkMiddleware)
} else {
middlewareArray.push(withExtraArgument(thunk.extraArgument))
}
}
if (process.env.NODE_ENV !== 'production') {
if (immutableCheck) {
/* PROD_START_REMOVE_UMD */
let immutableOptions: ImmutableStateInvariantMiddlewareOptions = {}
if (!isBoolean(immutableCheck)) {
immutableOptions = immutableCheck
}
middlewareArray.unshift(
createImmutableStateInvariantMiddleware(immutableOptions),
)
/* PROD_STOP_REMOVE_UMD */
}
if (serializableCheck) {
let serializableOptions: SerializableStateInvariantMiddlewareOptions =
{}
if (!isBoolean(serializableCheck)) {
serializableOptions = serializableCheck
}
middlewareArray.push(
createSerializableStateInvariantMiddleware(serializableOptions),
)
}
if (actionCreatorCheck) {
let actionCreatorOptions: ActionCreatorInvariantMiddlewareOptions = {}
if (!isBoolean(actionCreatorCheck)) {
actionCreatorOptions = actionCreatorCheck
}
middlewareArray.unshift(
createActionCreatorInvariantMiddleware(actionCreatorOptions),
)
}
}
return middlewareArray as any
}
@@ -0,0 +1,19 @@
var basePickBy = require('./_basePickBy'),
hasIn = require('./hasIn');
/**
* The base implementation of `_.pick` without support for individual
* property identifiers.
*
* @private
* @param {Object} object The source object.
* @param {string[]} paths The property paths to pick.
* @returns {Object} Returns the new object.
*/
function basePick(object, paths) {
return basePickBy(object, paths, function(value, path) {
return hasIn(object, path);
});
}
module.exports = basePick;
@@ -0,0 +1,209 @@
/**
* @fileoverview Tracks performance of individual rules.
* @author Brandon Mills
*/
"use strict";
const { startTime, endTime } = require("../shared/stats");
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
/* c8 ignore next */
/**
* Align the string to left
* @param {string} str string to evaluate
* @param {number} len length of the string
* @param {string} ch delimiter character
* @returns {string} modified string
* @private
*/
function alignLeft(str, len, ch) {
return str + new Array(len - str.length + 1).join(ch || " ");
}
/* c8 ignore next */
/**
* Align the string to right
* @param {string} str string to evaluate
* @param {number} len length of the string
* @param {string} ch delimiter character
* @returns {string} modified string
* @private
*/
function alignRight(str, len, ch) {
return new Array(len - str.length + 1).join(ch || " ") + str;
}
//------------------------------------------------------------------------------
// Module definition
//------------------------------------------------------------------------------
const enabled = !!process.env.TIMING;
const HEADERS = ["Rule", "Time (ms)", "Relative"];
const ALIGN = [alignLeft, alignRight, alignRight];
/**
* Decide how many rules to show in the output list.
* @returns {number} the number of rules to show
*/
function getListSize() {
const MINIMUM_SIZE = 10;
if (typeof process.env.TIMING !== "string") {
return MINIMUM_SIZE;
}
if (process.env.TIMING.toLowerCase() === "all") {
return Number.POSITIVE_INFINITY;
}
const TIMING_ENV_VAR_AS_INTEGER = Number.parseInt(process.env.TIMING, 10);
return TIMING_ENV_VAR_AS_INTEGER > 10
? TIMING_ENV_VAR_AS_INTEGER
: MINIMUM_SIZE;
}
/* c8 ignore next */
/**
* display the data
* @param {Object} data Data object to be displayed
* @returns {void} prints modified string with console.log
* @private
*/
function display(data) {
let total = 0;
const rows = Object.keys(data)
.map(key => {
const time = data[key];
total += time;
return [key, time];
})
.sort((a, b) => b[1] - a[1])
.slice(0, getListSize());
rows.forEach(row => {
row.push(`${((row[1] * 100) / total).toFixed(1)}%`);
row[1] = row[1].toFixed(3);
});
rows.unshift(HEADERS);
const widths = [];
rows.forEach(row => {
const len = row.length;
for (let i = 0; i < len; i++) {
const n = row[i].length;
if (!widths[i] || n > widths[i]) {
widths[i] = n;
}
}
});
const table = rows.map(row =>
row.map((cell, index) => ALIGN[index](cell, widths[index])).join(" | "),
);
table.splice(
1,
0,
widths
.map((width, index) => {
const extraAlignment =
index !== 0 && index !== widths.length - 1 ? 2 : 1;
return ALIGN[index](":", width + extraAlignment, "-");
})
.join("|"),
);
console.log(table.join("\n")); // eslint-disable-line no-console -- Debugging function
}
/* c8 ignore next */
module.exports = (function () {
const data = Object.create(null);
let displayEnabled = true;
/**
* Time the run
* @param {any} key key from the data object
* @param {Function} fn function to be called
* @param {boolean} stats if 'stats' is true, return the result and the time difference
* @returns {Function} function to be executed
* @private
*/
function time(key, fn, stats) {
return function (...args) {
const t = startTime();
const result = fn(...args);
const tdiff = endTime(t);
if (enabled) {
if (typeof data[key] === "undefined") {
data[key] = 0;
}
data[key] += tdiff;
}
return stats ? { result, tdiff } : result;
};
}
/**
* Returns a shallow copy of the collected timings data.
* @returns {Record<string, number>} mapping of ruleId to total time in ms
*/
function getData() {
return { ...data };
}
/**
* Merges rule timing totals collected elsewhere into this process' totals.
* @param {Record<string, number>} dataToMerge mapping of ruleId to total time in ms
* @returns {void}
*/
function mergeData(dataToMerge) {
for (const [key, value] of Object.entries(dataToMerge)) {
if (typeof data[key] === "undefined") {
data[key] = 0;
}
data[key] += value;
}
}
/**
* Disables printing of timing data on process exit.
* Intended for worker threads or non-main contexts.
* @returns {void}
*/
function disableDisplay() {
displayEnabled = false;
}
if (enabled) {
process.on("exit", () => {
if (displayEnabled && Object.keys(data).length > 0) {
display(data);
}
});
}
return {
time,
enabled,
getListSize,
getData,
mergeData,
disableDisplay,
};
})();
@@ -0,0 +1,8 @@
import Decimal from 'decimal.js';
import { NumberFormatInternal } from '../types/number';
/**
* The abstract operation ComputeExponentForMagnitude computes an exponent by which to scale a
* number of the given magnitude (power of ten of the most significant digit) according to the
* locale and the desired notation (scientific, engineering, or compact).
*/
export declare function ComputeExponentForMagnitude(internalSlots: NumberFormatInternal, magnitude: Decimal): number;
@@ -0,0 +1,359 @@
/**
* @fileoverview HTML reporter
* @author Julian Laval
*/
"use strict";
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
const encodeHTML = (function () {
const encodeHTMLRules = {
"&": "&#38;",
"<": "&#60;",
">": "&#62;",
'"': "&#34;",
"'": "&#39;",
};
const matchHTML = /[&<>"']/gu;
return function (code) {
return code
? code.toString().replace(matchHTML, m => encodeHTMLRules[m] || m)
: "";
};
})();
/**
* Get the final HTML document.
* @param {Object} it data for the document.
* @returns {string} HTML document.
*/
function pageTemplate(it) {
const { reportColor, reportSummary, date, results } = it;
return `
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>ESLint Report</title>
<link rel="icon" type="image/png" sizes="any" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAHaAAAB2gGFomX7AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAABD1JREFUWMPFl11sk2UUx3/nbYtjxS1MF7MLMTECMgSTtSSyrQkLhAj7UBPnDSEGoxegGzMwojhXVpmTAA5iYpSoMQa8GBhFOrMFk03buei6yRAlcmOM0SEmU9d90b19jxcM1o5+sGnsc/e+z/l6ztf/HFFVMnns6QieeOCHBePGsHM+wrOtvLG2C4WRVDSSygNV7sCjlspxwDnPB44aols/DXk+mbMBmx/6OseITF1CuOtfevkPh2Uu+/jbdX8lujSScRlT5r7/QDlAfsRmfzmpnkQ/H3H13gf6bBrBn1uqK8WylgEnU8eZmk1repbfchJG1TyKyIKEwuBHFd3lD3naY3O1siiwXsVoBV2VgM1ht/QQUJk2ByqKghsQziYQ8ifKgexIXmuyzC4r67Y7R+xPAfuB/Nn3Cpva+0s7khpQVtZtd4bt51BWxtBYAiciprG7c7D4SixzU9PYalDL6110Ifb/w8W9eY7JqFeFHbO8fPGyLHwwFHJNJTSgwtVTB9oaw9BlQ+tO93vOxypoaQnfEYlI43SeCHDC4TDq9+51/h5fxr33q0ZfV9g04wat9Q943rjJgCp3952W2i8Bi6eDvdsfKj0cK/DYMRyXL4/sUJUmIHd2zYMezsvLaamp4WpcWN3BXSiHpuMwbGbZlnZ8tXY4rgosy+G7oRwQ0cAsd28YGgqfU5UjCZQDLALxDg+Hv/P5Rqvj4hwrS8izXzWb4spwc1GgENFnkpWRzxeuB+ssUHgLdb9UVdt8vpGdKQpze7n7y1U3DBChNRUuqOo9c+0+qpKKxyZqtAIYla7gY4JszAAQri93BSsMRZoyBcUC+w3Q3AyOA4sNhAOZ0q7Iq0b2vUNvK5zPgP+/H8+Zetdoa6uOikhdGurxebwvJY8Iz3V1rTMNAH+opEuQj5KTT/qA1yC+wyUjBm12OidaUtCcPNNX2h0Hx2JG69VulANZAJZJwfU7rzd/FHixuXniTdM0m4GtSQT7bTartqEh9yfImUEzkwKZmTwmo5a5JwkYBfcDL01/RkR5y8iWhtPBknB8ZxwtU9UjwOrrKCeizzc25nTGg1F/turEHoU9wMLpDvWKf8DTmNCAKnd/tqUTF4ElMXJ+A5rWDJS+41WsGWzALhJ+ErBWrLj9g+pqojHxlXJX8HGUg0BsR/x1yhxf3jm4cSzpQFLp6tmi6PEE7g1ZhtZ91ufpSZUAFa6gC+UoQslNaSmypT1U8mHKiUgEKS8KfgF4EpYunFI16tsHin+OG0LcgQK7yj7g6cSzpva2D3hKVNG0Y3mVO1BkqfSlmJrHBQ4uvM12gJHc6ETW8HZVfMRmXvyxxNC1Z/o839zyXlDuCr4nsC11J+MXueaVJWn6yPv+/pJtc9oLTNN4AeTvNGByd3rlhE2x9s5pLwDoHCy+grDzWmOZ95lUtLYj5Bma126Y8eX0/zj/ADxGyViSg4BXAAAAAElFTkSuQmCC">
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PScwIDAgMjk0LjgyNSAyNTguOTgyJyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnPg0KPHBhdGggZmlsbD0nIzgwODBGMicgZD0nTTk3LjAyMSw5OS4wMTZsNDguNDMyLTI3Ljk2MmMxLjIxMi0wLjcsMi43MDYtMC43LDMuOTE4LDBsNDguNDMzLDI3Ljk2MiBjMS4yMTEsMC43LDEuOTU5LDEuOTkzLDEuOTU5LDMuMzkzdjU1LjkyNGMwLDEuMzk5LTAuNzQ4LDIuNjkzLTEuOTU5LDMuMzk0bC00OC40MzMsMjcuOTYyYy0xLjIxMiwwLjctMi43MDYsMC43LTMuOTE4LDAgbC00OC40MzItMjcuOTYyYy0xLjIxMi0wLjctMS45NTktMS45OTQtMS45NTktMy4zOTR2LTU1LjkyNEM5NS4wNjMsMTAxLjAwOSw5NS44MSw5OS43MTYsOTcuMDIxLDk5LjAxNicvPg0KPHBhdGggZmlsbD0nIzRCMzJDMycgZD0nTTI3My4zMzYsMTI0LjQ4OEwyMTUuNDY5LDIzLjgxNmMtMi4xMDItMy42NC01Ljk4NS02LjMyNS0xMC4xODgtNi4zMjVIODkuNTQ1IGMtNC4yMDQsMC04LjA4OCwyLjY4NS0xMC4xOSw2LjMyNWwtNTcuODY3LDEwMC40NWMtMi4xMDIsMy42NDEtMi4xMDIsOC4yMzYsMCwxMS44NzdsNTcuODY3LDk5Ljg0NyBjMi4xMDIsMy42NCw1Ljk4Niw1LjUwMSwxMC4xOSw1LjUwMWgxMTUuNzM1YzQuMjAzLDAsOC4wODctMS44MDUsMTAuMTg4LTUuNDQ2bDU3Ljg2Ny0xMDAuMDEgQzI3NS40MzksMTMyLjM5NiwyNzUuNDM5LDEyOC4xMjgsMjczLjMzNiwxMjQuNDg4IE0yMjUuNDE5LDE3Mi44OThjMCwxLjQ4LTAuODkxLDIuODQ5LTIuMTc0LDMuNTlsLTczLjcxLDQyLjUyNyBjLTEuMjgyLDAuNzQtMi44ODgsMC43NC00LjE3LDBsLTczLjc2Ny00Mi41MjdjLTEuMjgyLTAuNzQxLTIuMTc5LTIuMTA5LTIuMTc5LTMuNTlWODcuODQzYzAtMS40ODEsMC44ODQtMi44NDksMi4xNjctMy41OSBsNzMuNzA3LTQyLjUyN2MxLjI4Mi0wLjc0MSwyLjg4Ni0wLjc0MSw0LjE2OCwwbDczLjc3Miw0Mi41MjdjMS4yODMsMC43NDEsMi4xODYsMi4xMDksMi4xODYsMy41OVYxNzIuODk4eicvPg0KPC9zdmc+">
<style>
body {
font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
font-size: 16px;
font-weight: normal;
margin: 0;
padding: 0;
color: #333;
}
#overview {
padding: 20px 30px;
}
td,
th {
padding: 5px 10px;
}
h1 {
margin: 0;
}
table {
margin: 30px;
width: calc(100% - 60px);
max-width: 1000px;
border-radius: 5px;
border: 1px solid #ddd;
border-spacing: 0;
}
th {
font-weight: 400;
font-size: medium;
text-align: left;
cursor: pointer;
}
td.clr-1,
td.clr-2,
th span {
font-weight: 700;
}
th span {
float: right;
margin-left: 20px;
}
th span::after {
content: "";
clear: both;
display: block;
}
tr:last-child td {
border-bottom: none;
}
tr td:first-child,
tr td:last-child {
color: #9da0a4;
}
#overview.bg-0,
tr.bg-0 th {
color: #468847;
background: #dff0d8;
border-bottom: 1px solid #d6e9c6;
}
#overview.bg-1,
tr.bg-1 th {
color: #f0ad4e;
background: #fcf8e3;
border-bottom: 1px solid #fbeed5;
}
#overview.bg-2,
tr.bg-2 th {
color: #b94a48;
background: #f2dede;
border-bottom: 1px solid #eed3d7;
}
td {
border-bottom: 1px solid #ddd;
}
td.clr-1 {
color: #f0ad4e;
}
td.clr-2 {
color: #b94a48;
}
td a {
color: #3a33d1;
text-decoration: none;
}
td a:hover {
color: #272296;
text-decoration: underline;
}
</style>
</head>
<body>
<div id="overview" class="bg-${reportColor}">
<h1>ESLint Report</h1>
<div>
<span>${reportSummary}</span> - Generated on ${date}
</div>
</div>
<table>
<tbody>
${results}
</tbody>
</table>
<script type="text/javascript">
var groups = document.querySelectorAll("tr[data-group]");
for (i = 0; i < groups.length; i++) {
groups[i].addEventListener("click", function() {
var inGroup = document.getElementsByClassName(this.getAttribute("data-group"));
this.innerHTML = (this.innerHTML.indexOf("+") > -1) ? this.innerHTML.replace("+", "-") : this.innerHTML.replace("-", "+");
for (var j = 0; j < inGroup.length; j++) {
inGroup[j].style.display = (inGroup[j].style.display !== "none") ? "none" : "table-row";
}
});
}
</script>
</body>
</html>
`.trimStart();
}
/**
* Given a word and a count, append an s if count is not one.
* @param {string} word A word in its singular form.
* @param {number} count A number controlling whether word should be pluralized.
* @returns {string} The original word with an s on the end if count is not one.
*/
function pluralize(word, count) {
return count === 1 ? word : `${word}s`;
}
/**
* Renders text along the template of x problems (x errors, x warnings)
* @param {string} totalErrors Total errors
* @param {string} totalWarnings Total warnings
* @returns {string} The formatted string, pluralized where necessary
*/
function renderSummary(totalErrors, totalWarnings) {
const totalProblems = totalErrors + totalWarnings;
let renderedText = `${totalProblems} ${pluralize("problem", totalProblems)}`;
if (totalProblems !== 0) {
renderedText += ` (${totalErrors} ${pluralize("error", totalErrors)}, ${totalWarnings} ${pluralize("warning", totalWarnings)})`;
}
return renderedText;
}
/**
* Get the color based on whether there are errors/warnings...
* @param {string} totalErrors Total errors
* @param {string} totalWarnings Total warnings
* @returns {number} The color code (0 = green, 1 = yellow, 2 = red)
*/
function renderColor(totalErrors, totalWarnings) {
if (totalErrors !== 0) {
return 2;
}
if (totalWarnings !== 0) {
return 1;
}
return 0;
}
/**
* Get HTML (table row) describing a single message.
* @param {Object} it data for the message.
* @returns {string} HTML (table row) describing the message.
*/
function messageTemplate(it) {
const {
parentIndex,
lineNumber,
columnNumber,
severityNumber,
severityName,
message,
ruleUrl,
ruleId,
} = it;
return `
<tr style="display: none;" class="f-${parentIndex}">
<td>${lineNumber}:${columnNumber}</td>
<td class="clr-${severityNumber}">${severityName}</td>
<td>${encodeHTML(message)}</td>
<td>
<a href="${ruleUrl ? ruleUrl : ""}" target="_blank" rel="noopener noreferrer">${ruleId ? ruleId : ""}</a>
</td>
</tr>
`.trimStart();
}
/**
* Get HTML (table rows) describing the messages.
* @param {Array} messages Messages.
* @param {number} parentIndex Index of the parent HTML row.
* @param {Object} rulesMeta Dictionary containing metadata for each rule executed by the analysis.
* @returns {string} HTML (table rows) describing the messages.
*/
function renderMessages(messages, parentIndex, rulesMeta) {
/**
* Get HTML (table row) describing a message.
* @param {Object} message Message.
* @returns {string} HTML (table row) describing a message.
*/
return messages
.map(message => {
const lineNumber = message.line || 0;
const columnNumber = message.column || 0;
let ruleUrl;
if (rulesMeta) {
const meta = rulesMeta[message.ruleId];
if (meta && meta.docs && meta.docs.url) {
ruleUrl = meta.docs.url;
}
}
return messageTemplate({
parentIndex,
lineNumber,
columnNumber,
severityNumber: message.severity,
severityName: message.severity === 1 ? "Warning" : "Error",
message: message.message,
ruleId: message.ruleId,
ruleUrl,
});
})
.join("\n");
}
/**
* Get HTML (table row) describing the result for a single file.
* @param {Object} it data for the file.
* @returns {string} HTML (table row) describing the result for the file.
*/
function resultTemplate(it) {
const { color, index, filePath, summary } = it;
return `
<tr class="bg-${color}" data-group="f-${index}">
<th colspan="4">
[+] ${encodeHTML(filePath)}
<span>${encodeHTML(summary)}</span>
</th>
</tr>
`.trimStart();
}
/**
* Render the results.
* @param {Array} results Test results.
* @param {Object} rulesMeta Dictionary containing metadata for each rule executed by the analysis.
* @returns {string} HTML string describing the results.
*/
function renderResults(results, rulesMeta) {
return results
.map(
(result, index) =>
resultTemplate({
index,
color: renderColor(result.errorCount, result.warningCount),
filePath: result.filePath,
summary: renderSummary(
result.errorCount,
result.warningCount,
),
}) + renderMessages(result.messages, index, rulesMeta),
)
.join("\n");
}
//------------------------------------------------------------------------------
// Public Interface
//------------------------------------------------------------------------------
module.exports = function (results, data) {
let totalErrors, totalWarnings;
const metaData = data ? data.rulesMeta : {};
totalErrors = 0;
totalWarnings = 0;
// Iterate over results to get totals
results.forEach(result => {
totalErrors += result.errorCount;
totalWarnings += result.warningCount;
});
return pageTemplate({
date: new Date(),
reportColor: renderColor(totalErrors, totalWarnings),
reportSummary: renderSummary(totalErrors, totalWarnings),
results: renderResults(results, metaData),
});
};
@@ -0,0 +1,11 @@
import {
spacer_default
} from "./chunk-AWMMSYR4.mjs";
import {
useSpacer
} from "./chunk-BRFD4NXM.mjs";
import "./chunk-CH7FQ62Q.mjs";
export {
spacer_default as Spacer,
useSpacer
};
@@ -0,0 +1,12 @@
import * as react from 'react';
import { UseDropdownReturn } from './use-dropdown.js';
import '@heroui/popover';
import '@react-types/menu';
import '@heroui/system';
import '@heroui/react-utils';
import '@heroui/menu';
declare const DropdownProvider: react.Provider<UseDropdownReturn>;
declare const useDropdownContext: () => UseDropdownReturn;
export { DropdownProvider, useDropdownContext };
@@ -0,0 +1,41 @@
var baseIsEqual = require('./_baseIsEqual');
/**
* This method is like `_.isEqual` except that it accepts `customizer` which
* is invoked to compare values. If `customizer` returns `undefined`, comparisons
* are handled by the method instead. The `customizer` is invoked with up to
* six arguments: (objValue, othValue [, index|key, object, other, stack]).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @param {Function} [customizer] The function to customize comparisons.
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
* @example
*
* function isGreeting(value) {
* return /^h(?:i|ello)$/.test(value);
* }
*
* function customizer(objValue, othValue) {
* if (isGreeting(objValue) && isGreeting(othValue)) {
* return true;
* }
* }
*
* var array = ['hello', 'goodbye'];
* var other = ['hi', 'goodbye'];
*
* _.isEqualWith(array, other, customizer);
* // => true
*/
function isEqualWith(value, other, customizer) {
customizer = typeof customizer == 'function' ? customizer : undefined;
var result = customizer ? customizer(value, other) : undefined;
return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;
}
module.exports = isEqualWith;
@@ -0,0 +1,26 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var RowHeaderRole = {
relatedConcepts: [{
module: 'ARIA',
concept: {
name: 'rowheader'
}
}, {
module: 'HTML',
concept: {
name: 'th',
attributes: [{
name: 'scope',
value: 'row'
}]
}
}],
type: 'widget'
};
var _default = RowHeaderRole;
exports.default = _default;
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_class_apply_descriptor_get.cjs",
"module": "../../esm/_class_apply_descriptor_get.js"
}
@@ -0,0 +1,17 @@
"use strict";
function _iterable_to_array_limit_loose(arr, i) {
var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]);
if (_i == null) return;
var _arr = [];
for (_i = _i.call(arr), _step; !(_step = _i.next()).done;) {
_arr.push(_step.value);
if (i && _arr.length === i) break;
}
return _arr;
}
exports._ = _iterable_to_array_limit_loose;
@@ -0,0 +1,39 @@
import {CollectionBuilder as $eb2240fc39a57fa5$export$bf788dd355e3a401} from "./CollectionBuilder.mjs";
import {useMemo as $lbNth$useMemo} from "react";
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
function $7613b1592d41b092$export$6cd28814d92fa9c9(props, factory, context) {
let builder = (0, $lbNth$useMemo)(()=>new (0, $eb2240fc39a57fa5$export$bf788dd355e3a401)(), []);
let { children: children, items: items, collection: collection } = props;
let result = (0, $lbNth$useMemo)(()=>{
if (collection) return collection;
let nodes = builder.build({
children: children,
items: items
}, context);
return factory(nodes);
}, [
builder,
children,
items,
collection,
context,
factory
]);
return result;
}
export {$7613b1592d41b092$export$6cd28814d92fa9c9 as useCollection};
//# sourceMappingURL=useCollection.module.js.map
@@ -0,0 +1,9 @@
/**
* https://tc39.es/ecma402/#sec-getnumberoption
* @param options
* @param property
* @param min
* @param max
* @param fallback
*/
export declare function GetNumberOption<T extends object, K extends keyof T, F extends number | undefined>(options: T, property: K, minimum: number, maximum: number, fallback: F): F extends number ? number : number | undefined;
@@ -0,0 +1,11 @@
describe('text-hex', function () {
'use strict';
var assume = require('assume')
, hex = require('./');
it('is a 6 digit hex', function () {
assume(hex('a')).to.have.length(7); // including a #
assume(hex('a244fdafadfa4 adfau8fa a u adf8a0')).to.have.length(7);
});
});
@@ -0,0 +1,19 @@
const fs = require('./fs.js')
const getOptions = require('./common/get-options.js')
const withOwner = require('./with-owner.js')
// extends mkdir with the ability to specify an owner of the new dir
const mkdir = async (path, opts) => {
const options = getOptions(opts, {
copy: ['mode', 'recursive'],
wrap: 'mode',
})
return withOwner(
path,
() => fs.mkdir(path, options),
opts
)
}
module.exports = mkdir
@@ -0,0 +1,352 @@
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
var _keywords = require('../parser/tokenizer/keywords');
var _types = require('../parser/tokenizer/types');
/**
* Get information about the class fields for this class, given a token processor pointing to the
* open-brace at the start of the class.
*/
function getClassInfo(
rootTransformer,
tokens,
nameManager,
disableESTransforms,
) {
const snapshot = tokens.snapshot();
const headerInfo = processClassHeader(tokens);
let constructorInitializerStatements = [];
const instanceInitializerNames = [];
const staticInitializerNames = [];
let constructorInsertPos = null;
const fields = [];
const rangesToRemove = [];
const classContextId = tokens.currentToken().contextId;
if (classContextId == null) {
throw new Error("Expected non-null class context ID on class open-brace.");
}
tokens.nextToken();
while (!tokens.matchesContextIdAndLabel(_types.TokenType.braceR, classContextId)) {
if (tokens.matchesContextual(_keywords.ContextualKeyword._constructor) && !tokens.currentToken().isType) {
({constructorInitializerStatements, constructorInsertPos} = processConstructor(tokens));
} else if (tokens.matches1(_types.TokenType.semi)) {
if (!disableESTransforms) {
rangesToRemove.push({start: tokens.currentIndex(), end: tokens.currentIndex() + 1});
}
tokens.nextToken();
} else if (tokens.currentToken().isType) {
tokens.nextToken();
} else {
// Either a method or a field. Skip to the identifier part.
const statementStartIndex = tokens.currentIndex();
let isStatic = false;
let isESPrivate = false;
let isDeclareOrAbstract = false;
while (isAccessModifier(tokens.currentToken())) {
if (tokens.matches1(_types.TokenType._static)) {
isStatic = true;
}
if (tokens.matches1(_types.TokenType.hash)) {
isESPrivate = true;
}
if (tokens.matches1(_types.TokenType._declare) || tokens.matches1(_types.TokenType._abstract)) {
isDeclareOrAbstract = true;
}
tokens.nextToken();
}
if (isStatic && tokens.matches1(_types.TokenType.braceL)) {
// This is a static block, so don't process it in any special way.
skipToNextClassElement(tokens, classContextId);
continue;
}
if (isESPrivate) {
// Sucrase doesn't attempt to transpile private fields; just leave them as-is.
skipToNextClassElement(tokens, classContextId);
continue;
}
if (
tokens.matchesContextual(_keywords.ContextualKeyword._constructor) &&
!tokens.currentToken().isType
) {
({constructorInitializerStatements, constructorInsertPos} = processConstructor(tokens));
continue;
}
const nameStartIndex = tokens.currentIndex();
skipFieldName(tokens);
if (tokens.matches1(_types.TokenType.lessThan) || tokens.matches1(_types.TokenType.parenL)) {
// This is a method, so nothing to process.
skipToNextClassElement(tokens, classContextId);
continue;
}
// There might be a type annotation that we need to skip.
while (tokens.currentToken().isType) {
tokens.nextToken();
}
if (tokens.matches1(_types.TokenType.eq)) {
const equalsIndex = tokens.currentIndex();
// This is an initializer, so we need to wrap in an initializer method.
const valueEnd = tokens.currentToken().rhsEndIndex;
if (valueEnd == null) {
throw new Error("Expected rhsEndIndex on class field assignment.");
}
tokens.nextToken();
while (tokens.currentIndex() < valueEnd) {
rootTransformer.processToken();
}
let initializerName;
if (isStatic) {
initializerName = nameManager.claimFreeName("__initStatic");
staticInitializerNames.push(initializerName);
} else {
initializerName = nameManager.claimFreeName("__init");
instanceInitializerNames.push(initializerName);
}
// Fields start at the name, so `static x = 1;` has a field range of `x = 1;`.
fields.push({
initializerName,
equalsIndex,
start: nameStartIndex,
end: tokens.currentIndex(),
});
} else if (!disableESTransforms || isDeclareOrAbstract) {
// This is a regular field declaration, like `x;`. With the class transform enabled, we just
// remove the line so that no output is produced. With the class transform disabled, we
// usually want to preserve the declaration (but still strip types), but if the `declare`
// or `abstract` keyword is specified, we should remove the line to avoid initializing the
// value to undefined.
rangesToRemove.push({start: statementStartIndex, end: tokens.currentIndex()});
}
}
}
tokens.restoreToSnapshot(snapshot);
if (disableESTransforms) {
// With ES transforms disabled, we don't want to transform regular class
// field declarations, and we don't need to do any additional tricks to
// reference the constructor for static init, but we still need to transform
// TypeScript field initializers defined as constructor parameters and we
// still need to remove `declare` fields. For now, we run the same code
// path but omit any field information, as if the class had no field
// declarations. In the future, when we fully drop the class fields
// transform, we can simplify this code significantly.
return {
headerInfo,
constructorInitializerStatements,
instanceInitializerNames: [],
staticInitializerNames: [],
constructorInsertPos,
fields: [],
rangesToRemove,
};
} else {
return {
headerInfo,
constructorInitializerStatements,
instanceInitializerNames,
staticInitializerNames,
constructorInsertPos,
fields,
rangesToRemove,
};
}
} exports.default = getClassInfo;
/**
* Move the token processor to the next method/field in the class.
*
* To do that, we seek forward to the next start of a class name (either an open
* bracket or an identifier, or the closing curly brace), then seek backward to
* include any access modifiers.
*/
function skipToNextClassElement(tokens, classContextId) {
tokens.nextToken();
while (tokens.currentToken().contextId !== classContextId) {
tokens.nextToken();
}
while (isAccessModifier(tokens.tokenAtRelativeIndex(-1))) {
tokens.previousToken();
}
}
function processClassHeader(tokens) {
const classToken = tokens.currentToken();
const contextId = classToken.contextId;
if (contextId == null) {
throw new Error("Expected context ID on class token.");
}
const isExpression = classToken.isExpression;
if (isExpression == null) {
throw new Error("Expected isExpression on class token.");
}
let className = null;
let hasSuperclass = false;
tokens.nextToken();
if (tokens.matches1(_types.TokenType.name)) {
className = tokens.identifierName();
}
while (!tokens.matchesContextIdAndLabel(_types.TokenType.braceL, contextId)) {
// If this has a superclass, there will always be an `extends` token. If it doesn't have a
// superclass, only type parameters and `implements` clauses can show up here, all of which
// consist only of type tokens. A declaration like `class A<B extends C> {` should *not* count
// as having a superclass.
if (tokens.matches1(_types.TokenType._extends) && !tokens.currentToken().isType) {
hasSuperclass = true;
}
tokens.nextToken();
}
return {isExpression, className, hasSuperclass};
}
/**
* Extract useful information out of a constructor, starting at the "constructor" name.
*/
function processConstructor(tokens)
{
const constructorInitializerStatements = [];
tokens.nextToken();
const constructorContextId = tokens.currentToken().contextId;
if (constructorContextId == null) {
throw new Error("Expected context ID on open-paren starting constructor params.");
}
// Advance through parameters looking for access modifiers.
while (!tokens.matchesContextIdAndLabel(_types.TokenType.parenR, constructorContextId)) {
if (tokens.currentToken().contextId === constructorContextId) {
// Current token is an open paren or comma just before a param, so check
// that param for access modifiers.
tokens.nextToken();
if (isAccessModifier(tokens.currentToken())) {
tokens.nextToken();
while (isAccessModifier(tokens.currentToken())) {
tokens.nextToken();
}
const token = tokens.currentToken();
if (token.type !== _types.TokenType.name) {
throw new Error("Expected identifier after access modifiers in constructor arg.");
}
const name = tokens.identifierNameForToken(token);
constructorInitializerStatements.push(`this.${name} = ${name}`);
}
} else {
tokens.nextToken();
}
}
// )
tokens.nextToken();
// Constructor type annotations are invalid, but skip them anyway since
// they're easy to skip.
while (tokens.currentToken().isType) {
tokens.nextToken();
}
let constructorInsertPos = tokens.currentIndex();
// Advance through body looking for a super call.
let foundSuperCall = false;
while (!tokens.matchesContextIdAndLabel(_types.TokenType.braceR, constructorContextId)) {
if (!foundSuperCall && tokens.matches2(_types.TokenType._super, _types.TokenType.parenL)) {
tokens.nextToken();
const superCallContextId = tokens.currentToken().contextId;
if (superCallContextId == null) {
throw new Error("Expected a context ID on the super call");
}
while (!tokens.matchesContextIdAndLabel(_types.TokenType.parenR, superCallContextId)) {
tokens.nextToken();
}
constructorInsertPos = tokens.currentIndex();
foundSuperCall = true;
}
tokens.nextToken();
}
// }
tokens.nextToken();
return {constructorInitializerStatements, constructorInsertPos};
}
/**
* Determine if this is any token that can go before the name in a method/field.
*/
function isAccessModifier(token) {
return [
_types.TokenType._async,
_types.TokenType._get,
_types.TokenType._set,
_types.TokenType.plus,
_types.TokenType.minus,
_types.TokenType._readonly,
_types.TokenType._static,
_types.TokenType._public,
_types.TokenType._private,
_types.TokenType._protected,
_types.TokenType._override,
_types.TokenType._abstract,
_types.TokenType.star,
_types.TokenType._declare,
_types.TokenType.hash,
].includes(token.type);
}
/**
* The next token or set of tokens is either an identifier or an expression in square brackets, for
* a method or field name.
*/
function skipFieldName(tokens) {
if (tokens.matches1(_types.TokenType.bracketL)) {
const startToken = tokens.currentToken();
const classContextId = startToken.contextId;
if (classContextId == null) {
throw new Error("Expected class context ID on computed name open bracket.");
}
while (!tokens.matchesContextIdAndLabel(_types.TokenType.bracketR, classContextId)) {
tokens.nextToken();
}
tokens.nextToken();
} else {
tokens.nextToken();
}
}
@@ -0,0 +1 @@
{"name":"browserslist","version":"4.28.0","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532117115,"integrity":"sha512-Raflz5KmAUGw9dAUGxBwDPV0ySHb6JSlDNzIY6mO5xPEEAavPsYHfvjKFFSuRFm8PbOlDJhipjTFu4dv3hfbnA==","mode":420,"size":1118},"browser.js":{"checkedAt":1794532117115,"integrity":"sha512-2zHCONkN44agl7hJ0BURLxM6kpApbmVa8gk/74ifX3f2awionwDc9FbxN6/IFREl/kdZD6qOB/7nCDPtn6q3FA==","mode":420,"size":1117},"cli.js":{"checkedAt":1794532117115,"integrity":"sha512-mB9Mp5ZJUB7G6FZS5lewSxL76dKRWfiWIgrreMPgi9QFEYdbL/niuCBaCffJHGq8UHhfmoUAd1ISXB/tfKxEgw==","mode":493,"size":4347},"error.js":{"checkedAt":1794532117115,"integrity":"sha512-eM5bCMkbyNv85gmZB4fBn+oEKkZ6PjzIPUwsD2EENjePQjdNd3fGa22/SG9aaOITfJg/Dv9ZZwg/aJ6zF/k/6g==","mode":420,"size":299},"index.js":{"checkedAt":1794532117116,"integrity":"sha512-/hJND3NwucV4PEoeJ8C9byqs/+7w8Lb+Nxko2/NAKeFqNVmaAkdV7iYl1t3kwA+vA8dl/eTXV5wFLctJD4qdJQ==","mode":420,"size":37878},"node.js":{"checkedAt":1794532117116,"integrity":"sha512-qtJPONUs9V3x08GdRascK0JT3B4vZJjk3ejkgDl0MzpBN2U/QduoxaXw4rmMhGgkfD8SgxAOE1TMiFORUbDi3A==","mode":420,"size":13481},"parse.js":{"checkedAt":1794532117116,"integrity":"sha512-LRmT79ySvnlS/zj00LvEmtpeQzTplLG4/jDW/Ku2LA/5xFyOVEMZzj9A5ptpE4DF0miMUegN61dCX6PDvK8ynw==","mode":420,"size":1789},"package.json":{"checkedAt":1794532117116,"integrity":"sha512-CDWwKXzRjgOzN1pMsTmr7MzL+ybNa/FwChZ3V8bC9gSNytAAeJ5Clho/X8IRZunWS2FHpU3KjFfuswfQtMw1ow==","mode":420,"size":1111},"README.md":{"checkedAt":1794532117116,"integrity":"sha512-hwFbTQ/4I16IqYynRFBdV0TGDd25k8+8j5Iz7v/chrN9GtwFgO93QR6i5sh/DfKELfsEVFhhYi1NG11fcHBUCA==","mode":420,"size":2761},"error.d.ts":{"checkedAt":1794532117116,"integrity":"sha512-tSP37G4+NgmRdRil9O9QyP39O9F4ch3Az+ysTR+WotGTOC8L2menH30xBv5OpUauwxPs9+rxO4higfsZ3BpzUA==","mode":420,"size":155},"index.d.ts":{"checkedAt":1794532117116,"integrity":"sha512-YBxlnOMpSN9wxHn+2hQFNwQWt9Wr/SF/n/04lbnpHtT5gOAtJ8z54exA0NiARYgOksWkgf7zlwNf6IWnxRjiOQ==","mode":420,"size":4961}}}
@@ -0,0 +1,73 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _table = _interopRequireDefault(require("./table"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* @file hmtx 表
* @author mengke01(kekee000@gmail.com)
*
* https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6hmtx.html
*/
var _default = exports.default = _table.default.create('hmtx', [], {
read: function read(reader, ttf) {
var offset = this.offset;
reader.seek(offset);
var numOfLongHorMetrics = ttf.hhea.numOfLongHorMetrics;
var hMetrics = [];
var i;
var hMetric;
for (i = 0; i < numOfLongHorMetrics; ++i) {
hMetric = {};
hMetric.advanceWidth = reader.readUint16();
hMetric.leftSideBearing = reader.readInt16();
hMetrics.push(hMetric);
}
// 最后一个宽度
var advanceWidth = hMetrics[numOfLongHorMetrics - 1].advanceWidth;
var numOfLast = ttf.maxp.numGlyphs - numOfLongHorMetrics;
// 获取后续的hmetrics
for (i = 0; i < numOfLast; ++i) {
hMetric = {};
hMetric.advanceWidth = advanceWidth;
hMetric.leftSideBearing = reader.readInt16();
hMetrics.push(hMetric);
}
return hMetrics;
},
write: function write(writer, ttf) {
var i;
var numOfLongHorMetrics = ttf.hhea.numOfLongHorMetrics;
for (i = 0; i < numOfLongHorMetrics; ++i) {
writer.writeUint16(ttf.glyf[i].advanceWidth);
writer.writeInt16(ttf.glyf[i].leftSideBearing);
}
// 最后一个宽度
var numOfLast = ttf.glyf.length - numOfLongHorMetrics;
for (i = 0; i < numOfLast; ++i) {
writer.writeInt16(ttf.glyf[numOfLongHorMetrics + i].leftSideBearing);
}
return writer;
},
size: function size(ttf) {
// 计算同最后一个advanceWidth相等的元素个数
var numOfLast = 0;
// 最后一个advanceWidth
var advanceWidth = ttf.glyf[ttf.glyf.length - 1].advanceWidth;
for (var i = ttf.glyf.length - 2; i >= 0; i--) {
if (advanceWidth === ttf.glyf[i].advanceWidth) {
numOfLast++;
} else {
break;
}
}
ttf.hhea.numOfLongHorMetrics = ttf.glyf.length - numOfLast;
return 4 * ttf.hhea.numOfLongHorMetrics + 2 * numOfLast;
}
});
@@ -0,0 +1,74 @@
export enum JsonGrayBusiId {
AIO_AV_C2C_NOTICE = 2021,
AIO_AV_GROUP_NOTICE = 2022,
AIO_C2C_DONT_DISTURB = 2100,
AIO_CRM_FLAGS_TIPS = 2050,
AIO_GROUP_ESSENCE_MSG_TIP = 2401,
AIO_NUDGE_CUSTOM_GUIDE = 2041,
AIO_PUSH_GUIDE_GRAY_TIPS = 2701,
AIO_RECALL_MSGCUSTOM_WORDINGGUIDE = 2000,
AIO_ROBOT_SAFETY_TIP = 2201,
AIO_ZPLAN_EMOTICON_GUIDE = 2301,
AIO_ZPLAN_SCENE_LINKAGE = 2302,
AIO_ZPLAN_SEND_MEME = 2300,
DISBAND_DISCUSSION_GRAY_TIP_ID = 2603,
FILE_SENDING_SIZE_4GB_LIMIT = 3003,
GROUP_AIO_CONFIGURABLE_GRAY_TIPS = 2407,
GROUP_AIO_HOME_SCHOOL_WELCOME_GRAY_TIP_ID = 2404,
GROUP_AIO_MSG_FREQUENCY_GRAY_TIP_ID = 2406,
GROUP_AIO_SHUTUP_GRAY_TIP_ID = 2402,
GROUP_AIO_TEMPORARY_GRAY_TIP_ID = 2405,
GROUP_AIO_UNREAD_MSG_AI_SUMMARY = 2408,
GROUP_AIO_UPLOAD_PERMISSIONS_GRAY_TIP_ID = 2403,
LITE_ACTION = 86,
ONLINE_FILE_CANCEL_RECV_ON_RECVING = 4,
ONLINE_FILE_GO_OFFLINE = 11,
ONLINE_FILE_GO_OFFLINE_ALL = 12,
ONLINE_FILE_RECV_BY_MOBILE = 13,
ONLINE_FILE_RECV_ERROR = 10,
ONLINE_FILE_REFUSE_ALL_RECV = 7,
ONLINE_FILE_REFUSE_ALL_RECV_ON_RECVING = 8,
ONLINE_FILE_REFUSE_RECV = 3,
ONLINE_FILE_SEND_ERROR = 9,
ONLINE_FILE_STOP_ALL_SEND = 5,
ONLINE_FILE_STOP_ALL_SEND_ON_SENDING = 6,
ONLINE_FILE_STOP_SEND = 1,
ONLINE_FILE_STOP_SEND_ON_SENDING = 2,
ONLINE_GROUP_HOME_WORK = 51,
PTT_AUTO_CHANGE_GUIDE = 2060,
QCIRCLE_SHOW_FULE_TIPS = 2601,
QWALLET_GRAY_TIP_ID = 2602,
RED_BAG = 81,
RELATION_C2C_GROUP_AIO_SETUP_GROUP_AND_REMARK = 1005,
RELATION_C2C_LOVER_BONUS = 1003,
RELATION_C2C_MEMBER_ADD = 1017,
RELATION_C2C_REACTIVE_DEGRADE_MSG = 1019,
RELATION_C2C_REACTIVE_UPGRADE_MSG = 1018,
RELATION_C2C_SAY_HELLO = 1004,
RELATION_CHAIN_BLACKED = 1000,
RELATION_CHAIN_MATCH_FRIEND = 1007,
RELATION_CREATE_GROUP_GRAY_TIP_ID = 1009,
RELATION_EMOJIEGG_SHOW = 1001,
RELATION_EMOJIEGG_WILL_DEGRADE = 1002,
RELATION_FRIEND_CLONE_INFO = 1006,
RELATION_GROUP_BATCH_ADD_FRIEND = 1020,
RELATION_GROUP_MEMBER_ADD = 1022,
RELATION_GROUP_MEMBER_ADD_WITH_MODIFY_NAME = 1015,
RELATION_GROUP_MEMBER_ADD_WITH_WELCOME = 1016,
RELATION_GROUP_MEMBER_RECOMMEND = 1021,
RELATION_GROUP_SHUT_UP = 1014,
RELATION_LIMIT_TMP_CONVERSATION_SET = 1011,
RELATION_NEARBY_GOTO_VERIFY = 1008,
RELATION_ONEWAY_FRIEND_GRAY_TIP_ID = 1012,
RELATION_ONEWAY_FRIEND_NEW_GRAY_TIP_ID = 1013,
RELATION_YQT = 1010,
TROOP_ADD_FRIEND_ACTIVE = 19264,
TROOP_ADD_FRIEND_HOT_CHAT = 19265,
TROOP_ADD_FRIEND_NEW_MEMBER = 19267,
TROOP_ADD_FRIEND_REPLY_OR_AT = 19266,
TROOP_BREAK_ICE = 10405,
TROOP_FLAME_IGNITED = 19273,
UI_RESERVE_100000_110000 = 100000,
VAS_FILE_UPLOAD_OVER_1G = 3002,
VAS_FILE_UPLOAD_OVER_LIMIT = 3001
}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=getBindingId.spec.d.ts.map
@@ -0,0 +1,24 @@
var common = require('../common');
var assert = common.assert;
var retry = require(common.dir.lib + '/retry');
(function testForeverUsesFirstTimeout() {
var operation = retry.operation({
retries: 0,
minTimeout: 100,
maxTimeout: 100,
forever: true
});
operation.attempt(function(numAttempt) {
console.log('>numAttempt', numAttempt);
var err = new Error("foo");
if (numAttempt == 10) {
operation.stop();
}
if (operation.retry(err)) {
return;
}
});
})();
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('findKey', require('../findKey'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,19 @@
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var _types = require('../parser/tokenizer/types');
var _Transformer = require('./Transformer'); var _Transformer2 = _interopRequireDefault(_Transformer);
class OptionalCatchBindingTransformer extends _Transformer2.default {
constructor( tokens, nameManager) {
super();this.tokens = tokens;this.nameManager = nameManager;;
}
process() {
if (this.tokens.matches2(_types.TokenType._catch, _types.TokenType.braceL)) {
this.tokens.copyToken();
this.tokens.appendCode(` (${this.nameManager.claimFreeName("e")})`);
return true;
}
return false;
}
} exports.default = OptionalCatchBindingTransformer;
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more