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,9 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isParentBindingConstraintsWithServiceId = isParentBindingConstraintsWithServiceId;
const isBindingConstraintsWithServiceId_1 = require("./isBindingConstraintsWithServiceId");
const isParentBindingConstraints_1 = require("./isParentBindingConstraints");
function isParentBindingConstraintsWithServiceId(serviceId) {
return (0, isParentBindingConstraints_1.isParentBindingConstraints)((0, isBindingConstraintsWithServiceId_1.isBindingConstraintsWithServiceId)(serviceId));
}
//# sourceMappingURL=isParentBindingConstraintsWithServiceId.js.map
@@ -0,0 +1 @@
{"mappings":";AAAA,4BAAiB;IAAG,kBAAkB,CAAC,OAAS,GAAG,KAAK,IAAI,CAAC,mEAAa,CAAC;IACzE,qBAAqB,CAAC,2UAAuD,CAAC;IAC9E,UAAU,CAAC,wDAAQ,CAAC;IACpB,eAAe,CAAC,qKAA2B,CAAC;IAC5C,iBAAiB,CAAC,MAAM,YAAc,GAAG,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE;YAAC,MAAM,CAAC,uIAAqB,CAAC;YAAE,KAAK,IAAM,GAAG,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,6FAAe,CAAC;YAAE,OAAO,IAAM,GAAG,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,2GAAiB,CAAC;QAAA,GAAG,CAAC,CAAC;IACvO,gBAAgB,CAAC,OAAS,GAAG,KAAK,IAAI,CAAC,4CAAQ,CAAC;AAClD","sources":["packages/@react-aria/grid/intl/bg-BG.json"],"sourcesContent":["{\n \"deselectedItem\": \"{item} не е избран.\",\n \"longPressToSelect\": \"Натиснете и задръжте за да влезете в избирателен режим.\",\n \"select\": \"Изберете\",\n \"selectedAll\": \"Всички елементи са избрани.\",\n \"selectedCount\": \"{count, plural, =0 {Няма избрани елементи} one {# избран елемент} other {# избрани елементи}}.\",\n \"selectedItem\": \"{item} избран.\"\n}\n"],"names":[],"version":3,"file":"bg-BG.module.js.map"}
@@ -0,0 +1,214 @@
// Copyright Joyent, Inc. and other Node contributors.
//
// 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.
// a transform stream is a readable/writable stream where you do
// something with the data. Sometimes it's called a "filter",
// but that's not a great name for it, since that implies a thing where
// some bits pass through, and others are simply ignored. (That would
// be a valid example of a transform, of course.)
//
// While the output is causally related to the input, it's not a
// necessarily symmetric or synchronous transformation. For example,
// a zlib stream might take multiple plain-text writes(), and then
// emit a single compressed chunk some time in the future.
//
// Here's how this works:
//
// The Transform stream has all the aspects of the readable and writable
// stream classes. When you write(chunk), that calls _write(chunk,cb)
// internally, and returns false if there's a lot of pending writes
// buffered up. When you call read(), that calls _read(n) until
// there's enough pending readable data buffered up.
//
// In a transform stream, the written data is placed in a buffer. When
// _read(n) is called, it transforms the queued up data, calling the
// buffered _write cb's as it consumes chunks. If consuming a single
// written chunk would result in multiple output chunks, then the first
// outputted bit calls the readcb, and subsequent chunks just go into
// the read buffer, and will cause it to emit 'readable' if necessary.
//
// This way, back-pressure is actually determined by the reading side,
// since _read has to be called to start processing a new chunk. However,
// a pathological inflate type of transform can cause excessive buffering
// here. For example, imagine a stream where every byte of input is
// interpreted as an integer from 0-255, and then results in that many
// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
// 1kb of data being output. In this case, you could write a very small
// amount of input, and end up with a very large amount of output. In
// such a pathological inflating mechanism, there'd be no way to tell
// the system to stop doing the transform. A single 4MB write could
// cause the system to run out of memory.
//
// However, even in such a pathological case, only a single written chunk
// would be consumed, and then the rest would wait (un-transformed) until
// the results of the previous transformed chunk were consumed.
'use strict';
module.exports = Transform;
var Duplex = require('./_stream_duplex');
/*<replacement>*/
var util = Object.create(require('core-util-is'));
util.inherits = require('inherits');
/*</replacement>*/
util.inherits(Transform, Duplex);
function afterTransform(er, data) {
var ts = this._transformState;
ts.transforming = false;
var cb = ts.writecb;
if (!cb) {
return this.emit('error', new Error('write callback called multiple times'));
}
ts.writechunk = null;
ts.writecb = null;
if (data != null) // single equals check for both `null` and `undefined`
this.push(data);
cb(er);
var rs = this._readableState;
rs.reading = false;
if (rs.needReadable || rs.length < rs.highWaterMark) {
this._read(rs.highWaterMark);
}
}
function Transform(options) {
if (!(this instanceof Transform)) return new Transform(options);
Duplex.call(this, options);
this._transformState = {
afterTransform: afterTransform.bind(this),
needTransform: false,
transforming: false,
writecb: null,
writechunk: null,
writeencoding: null
};
// start out asking for a readable event once data is transformed.
this._readableState.needReadable = true;
// we have implemented the _read method, and done the other things
// that Readable wants before the first _read call, so unset the
// sync guard flag.
this._readableState.sync = false;
if (options) {
if (typeof options.transform === 'function') this._transform = options.transform;
if (typeof options.flush === 'function') this._flush = options.flush;
}
// When the writable side finishes, then flush out anything remaining.
this.on('prefinish', prefinish);
}
function prefinish() {
var _this = this;
if (typeof this._flush === 'function') {
this._flush(function (er, data) {
done(_this, er, data);
});
} else {
done(this, null, null);
}
}
Transform.prototype.push = function (chunk, encoding) {
this._transformState.needTransform = false;
return Duplex.prototype.push.call(this, chunk, encoding);
};
// This is the part where you do stuff!
// override this function in implementation classes.
// 'chunk' is an input chunk.
//
// Call `push(newChunk)` to pass along transformed output
// to the readable side. You may call 'push' zero or more times.
//
// Call `cb(err)` when you are done with this chunk. If you pass
// an error, then that'll put the hurt on the whole operation. If you
// never call cb(), then you'll never get another chunk.
Transform.prototype._transform = function (chunk, encoding, cb) {
throw new Error('_transform() is not implemented');
};
Transform.prototype._write = function (chunk, encoding, cb) {
var ts = this._transformState;
ts.writecb = cb;
ts.writechunk = chunk;
ts.writeencoding = encoding;
if (!ts.transforming) {
var rs = this._readableState;
if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
}
};
// Doesn't matter what the args are here.
// _transform does all the work.
// That we got here means that the readable side wants more data.
Transform.prototype._read = function (n) {
var ts = this._transformState;
if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
ts.transforming = true;
this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
} else {
// mark that we need a transform, so that any data that comes in
// will get processed, now that we've asked for it.
ts.needTransform = true;
}
};
Transform.prototype._destroy = function (err, cb) {
var _this2 = this;
Duplex.prototype._destroy.call(this, err, function (err2) {
cb(err2);
_this2.emit('close');
});
};
function done(stream, er, data) {
if (er) return stream.emit('error', er);
if (data != null) // single equals check for both `null` and `undefined`
stream.push(data);
// if there's nothing in the write buffer, then that means
// that nothing more will ever be provided
if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');
if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');
return stream.push(null);
}
@@ -0,0 +1,18 @@
import { S as SnapshotStateOptions, e as SnapshotSummary, b as SnapshotResult } from './rawSnapshot.d-lFsMJFUd.js';
import '@vitest/pretty-format';
import './environment.d-DHdQ1Csl.js';
declare class SnapshotManager {
options: Omit<SnapshotStateOptions, "snapshotEnvironment">;
summary: SnapshotSummary;
extension: string;
constructor(options: Omit<SnapshotStateOptions, "snapshotEnvironment">);
clear(): void;
add(result: SnapshotResult): void;
resolvePath<T = any>(testPath: string, context?: T): string;
resolveRawPath(testPath: string, rawPath: string): string;
}
declare function emptySummary(options: Omit<SnapshotStateOptions, "snapshotEnvironment">): SnapshotSummary;
declare function addSnapshotResult(summary: SnapshotSummary, result: SnapshotResult): void;
export { SnapshotManager, addSnapshotResult, emptySummary };
@@ -0,0 +1,33 @@
import { __decorate } from "tslib";
import { AsnProp, AsnConvert, AsnPropTypes } from "@peculiar/asn1-schema";
import { AlgorithmIdentifier } from "@peculiar/asn1-x509";
import { id_mgf1, id_RSASSA_PSS } from "../object_identifiers";
import { sha1, mgf1SHA1 } from "../algorithms";
export class RsaSaPssParams {
constructor(params = {}) {
this.hashAlgorithm = new AlgorithmIdentifier(sha1);
this.maskGenAlgorithm = new AlgorithmIdentifier({
algorithm: id_mgf1,
parameters: AsnConvert.serialize(sha1),
});
this.saltLength = 20;
this.trailerField = 1;
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: AlgorithmIdentifier, context: 0, defaultValue: sha1 })
], RsaSaPssParams.prototype, "hashAlgorithm", void 0);
__decorate([
AsnProp({ type: AlgorithmIdentifier, context: 1, defaultValue: mgf1SHA1 })
], RsaSaPssParams.prototype, "maskGenAlgorithm", void 0);
__decorate([
AsnProp({ type: AsnPropTypes.Integer, context: 2, defaultValue: 20 })
], RsaSaPssParams.prototype, "saltLength", void 0);
__decorate([
AsnProp({ type: AsnPropTypes.Integer, context: 3, defaultValue: 1 })
], RsaSaPssParams.prototype, "trailerField", void 0);
export const RSASSA_PSS = new AlgorithmIdentifier({
algorithm: id_RSASSA_PSS,
parameters: AsnConvert.serialize(new RsaSaPssParams()),
});
@@ -0,0 +1,22 @@
import createMathOperation from './_createMathOperation.js';
/**
* Adds two numbers.
*
* @static
* @memberOf _
* @since 3.4.0
* @category Math
* @param {number} augend The first number in an addition.
* @param {number} addend The second number in an addition.
* @returns {number} Returns the total.
* @example
*
* _.add(6, 4);
* // => 10
*/
var add = createMathOperation(function(augend, addend) {
return augend + addend;
}, 0);
export default add;
@@ -0,0 +1,429 @@
flf2a$ 4 3 8 -1 20
Cyberfont - medium
Figlet conversion by Kent Nassen, kentn@cyberspace.org, 8-11-94
From: stock@fwi.uva.nl (Lennert Stock)
Date: 15 Jul 1994 00:04:25 GMT
Here are some fonts. Non-figlet I'm afraid, if you wanna convert them, be
my guest. I posted the isometric fonts before.
------------------------------------------------------------------------------
.x%%%%%%x. .x%%%%%%x.
,%%%%%%%%%%. .%%%%%%%%%%.
,%%%' )' \) :( `( `%%%.
,%x%)________) --------- L e n n e r t S t o c k ( _ __ (%x%.
(%%%~^88P~88P| |~=> .=-~ %%%)
(%%::. .:,\ .' `. /,:. .::%%)
`;%:`\. `-' | | `-' ./':%:'
``x`. -===.' stock@fwi.uva.nl -------- `.===- .'x''
/ `:`.__.; :.__.':' \
.d8b. ..`. .'.. .d8b.
$ $@
$ $@
$ $@
$ $@@
/@
/ @
. @
@@
..@
''@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
. @
' @
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
. @
' @@
@
__ @
@
@@
@
@
.@
@@
/ @
/ @
/ @
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
$@
.@
.@
@@
$@
.@
,@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
__.@
_]@
. @
@@
@
@
@
@@
____ @
|__| @
| | @
@@
___ @
|__] @
|__] @
@@
____ @
| @
|___ @
@@
___ @
| \ @
|__/ @
@@
____ @
|___ @
|___ @
@@
____ @
|___ @
| @
@@
____ @
| __ @
|__] @
@@
_ _ @
|__| @
| | @
@@
_ @
| @
| @
@@
_ @
| @
_| @
@@
_ _ @
|_/ @
| \_ @
@@
_ @
| @
|___ @
@@
_ _ @
|\/| @
| | @
@@
_ _ @
|\ | @
| \| @
@@
____ @
| | @
|__| @
@@
___ @
|__] @
| @
@@
____ @
| | @
|_\| @
@@
____ @
|__/ @
| \ @
@@
____ @
[__ @
___] @
@@
___ @
| @
| @
@@
_ _ @
| | @
|__| @
@@
_ _ @
| | @
\/ @
@@
_ _ _ @
| | | @
|_|_| @
@@
_ _ @
\/ @
_/\_ @
@@
_ _ @
\_/ @
| @
@@
___ @
/ @
/__ @
@@
@
@
@
@@
\ @
\ @
\ @
@@
@
@
@
@@
@
@
@
@@
@
@
___ @
@@
. @
` @
@
@@
____ @
|__| @
| | @
@@
___ @
|__] @
|__] @
@@
____ @
| @
|___ @
@@
___ @
| \ @
|__/ @
@@
____ @
|___ @
|___ @
@@
____ @
|___ @
| @
@@
____ @
| __ @
|__] @
@@
_ _ @
|__| @
| | @
@@
_ @
| @
| @
@@
_ @
| @
_| @
@@
_ _ @
|_/ @
| \_ @
@@
_ @
| @
|___ @
@@
_ _ @
|\/| @
| | @
@@
_ _ @
|\ | @
| \| @
@@
____ @
| | @
|__| @
@@
___ @
|__] @
| @
@@
____ @
| | @
|_\| @
@@
____ @
|__/ @
| \ @
@@
____ @
[__ @
___] @
@@
___ @
| @
| @
@@
_ _ @
| | @
|__| @
@@
_ _ @
| | @
\/ @
@@
_ _ _ @
| | | @
|_|_| @
@@
_ _ @
\/ @
_/\_ @
@@
_ _ @
\_/ @
| @
@@
___ @
/ @
/__ @
@@
@
@
@
@@
| @
| @
| @
| @@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@@ -0,0 +1,645 @@
"use client";
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var src_exports = {};
__export(src_exports, {
Input: () => input_default,
Textarea: () => textarea_default,
useInput: () => useInput
});
module.exports = __toCommonJS(src_exports);
// src/input.tsx
var import_shared_icons = require("@heroui/shared-icons");
var import_react2 = require("react");
var import_system2 = require("@heroui/system");
// src/use-input.ts
var import_system = require("@heroui/system");
var import_use_safe_layout_effect = require("@heroui/use-safe-layout-effect");
var import_focus = require("@react-aria/focus");
var import_theme = require("@heroui/theme");
var import_react_utils = require("@heroui/react-utils");
var import_interactions = require("@react-aria/interactions");
var import_shared_utils = require("@heroui/shared-utils");
var import_utils = require("@react-stately/utils");
var import_react = require("react");
var import_utils2 = require("@react-aria/utils");
var import_textfield = require("@react-aria/textfield");
var import_form = require("@heroui/form");
function useInput(originalProps) {
var _a, _b, _c, _d;
const globalContext = (0, import_system.useProviderContext)();
const { validationBehavior: formValidationBehavior } = (0, import_form.useSlottedContext)(import_form.FormContext) || {};
const [props, variantProps] = (0, import_system.mapPropsVariants)(originalProps, import_theme.input.variantKeys);
const {
ref,
as,
type,
label,
baseRef,
wrapperRef,
description,
className,
classNames,
autoFocus,
startContent,
endContent,
onClear,
onChange,
validationState,
validationBehavior = (_a = formValidationBehavior != null ? formValidationBehavior : globalContext == null ? void 0 : globalContext.validationBehavior) != null ? _a : "native",
innerWrapperRef: innerWrapperRefProp,
onValueChange = () => {
},
...otherProps
} = props;
const handleValueChange = (0, import_react.useCallback)(
(value) => {
onValueChange(value != null ? value : "");
},
[onValueChange]
);
const [isFocusWithin, setFocusWithin] = (0, import_react.useState)(false);
const Component = as || "div";
const disableAnimation = (_c = (_b = originalProps.disableAnimation) != null ? _b : globalContext == null ? void 0 : globalContext.disableAnimation) != null ? _c : false;
const domRef = (0, import_react_utils.useDOMRef)(ref);
const baseDomRef = (0, import_react_utils.useDOMRef)(baseRef);
const inputWrapperRef = (0, import_react_utils.useDOMRef)(wrapperRef);
const innerWrapperRef = (0, import_react_utils.useDOMRef)(innerWrapperRefProp);
const [inputValue, setInputValue] = (0, import_utils.useControlledState)(
props.value,
(_d = props.defaultValue) != null ? _d : "",
handleValueChange
);
const isFilledByDefault = ["date", "time", "month", "week", "range"].includes(type);
const isFilled = !(0, import_shared_utils.isEmpty)(inputValue) || isFilledByDefault;
const isFilledWithin = isFilled || isFocusWithin;
const isHiddenType = type === "hidden";
const isMultiline = originalProps.isMultiline;
const isFileTypeInput = type === "file";
const baseStyles = (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.base, className, isFilled ? "is-filled" : "");
const handleClear = (0, import_react.useCallback)(() => {
var _a2;
setInputValue("");
onClear == null ? void 0 : onClear();
(_a2 = domRef.current) == null ? void 0 : _a2.focus();
}, [setInputValue, onClear]);
(0, import_use_safe_layout_effect.useSafeLayoutEffect)(() => {
if (!domRef.current)
return;
setInputValue(domRef.current.value);
}, [domRef.current]);
const {
labelProps,
inputProps,
isInvalid: isAriaInvalid,
validationErrors,
validationDetails,
descriptionProps,
errorMessageProps
} = (0, import_textfield.useTextField)(
{
...originalProps,
validationBehavior,
autoCapitalize: originalProps.autoCapitalize,
value: inputValue,
"aria-label": (0, import_shared_utils.safeAriaLabel)(
originalProps["aria-label"],
originalProps.label,
originalProps.placeholder
),
inputElementType: isMultiline ? "textarea" : "input",
onChange: setInputValue
},
domRef
);
if (isFileTypeInput) {
delete inputProps.value;
delete inputProps.onChange;
}
const { isFocusVisible, isFocused, focusProps } = (0, import_focus.useFocusRing)({
autoFocus,
isTextInput: true
});
const { isHovered, hoverProps } = (0, import_interactions.useHover)({ isDisabled: !!(originalProps == null ? void 0 : originalProps.isDisabled) });
const { isHovered: isLabelHovered, hoverProps: labelHoverProps } = (0, import_interactions.useHover)({
isDisabled: !!(originalProps == null ? void 0 : originalProps.isDisabled)
});
const { focusProps: clearFocusProps, isFocusVisible: isClearButtonFocusVisible } = (0, import_focus.useFocusRing)();
const { focusWithinProps } = (0, import_interactions.useFocusWithin)({
onFocusWithinChange: setFocusWithin
});
const { pressProps: clearPressProps } = (0, import_interactions.usePress)({
isDisabled: !!(originalProps == null ? void 0 : originalProps.isDisabled) || !!(originalProps == null ? void 0 : originalProps.isReadOnly),
onPress: handleClear
});
const isInvalid = validationState === "invalid" || isAriaInvalid;
const labelPlacement = (0, import_react.useMemo)(() => {
var _a2;
if ((!originalProps.labelPlacement || originalProps.labelPlacement === "inside") && !label) {
return "outside";
}
return (_a2 = originalProps.labelPlacement) != null ? _a2 : "inside";
}, [originalProps.labelPlacement, label]);
const errorMessage = typeof props.errorMessage === "function" ? props.errorMessage({ isInvalid, validationErrors, validationDetails }) : props.errorMessage || (validationErrors == null ? void 0 : validationErrors.join(" "));
const isClearable = !!onClear || originalProps.isClearable;
const hasElements = !!label || !!description || !!errorMessage;
const hasPlaceholder = !!props.placeholder;
const hasLabel = !!label;
const hasHelper = !!description || !!errorMessage;
const shouldLabelBeOutside = labelPlacement === "outside" || labelPlacement === "outside-left";
const shouldLabelBeInside = labelPlacement === "inside";
const isPlaceholderShown = domRef.current ? (!domRef.current.value || domRef.current.value === "" || !inputValue || inputValue === "") && hasPlaceholder : false;
const isOutsideLeft = labelPlacement === "outside-left";
const hasStartContent = !!startContent;
const isLabelOutside = shouldLabelBeOutside ? labelPlacement === "outside-left" || hasPlaceholder || labelPlacement === "outside" && hasStartContent : false;
const isLabelOutsideAsPlaceholder = labelPlacement === "outside" && !hasPlaceholder && !hasStartContent;
const slots = (0, import_react.useMemo)(
() => (0, import_theme.input)({
...variantProps,
isInvalid,
labelPlacement,
isClearable,
disableAnimation
}),
[
(0, import_shared_utils.objectToDeps)(variantProps),
isInvalid,
labelPlacement,
isClearable,
hasStartContent,
disableAnimation
]
);
const getBaseProps = (0, import_react.useCallback)(
(props2 = {}) => {
return {
ref: baseDomRef,
className: slots.base({ class: baseStyles }),
"data-slot": "base",
"data-filled": (0, import_shared_utils.dataAttr)(
isFilled || hasPlaceholder || hasStartContent || isPlaceholderShown || isFileTypeInput
),
"data-filled-within": (0, import_shared_utils.dataAttr)(
isFilledWithin || hasPlaceholder || hasStartContent || isPlaceholderShown || isFileTypeInput
),
"data-focus-within": (0, import_shared_utils.dataAttr)(isFocusWithin),
"data-focus-visible": (0, import_shared_utils.dataAttr)(isFocusVisible),
"data-readonly": (0, import_shared_utils.dataAttr)(originalProps.isReadOnly),
"data-focus": (0, import_shared_utils.dataAttr)(isFocused),
"data-hover": (0, import_shared_utils.dataAttr)(isHovered || isLabelHovered),
"data-required": (0, import_shared_utils.dataAttr)(originalProps.isRequired),
"data-invalid": (0, import_shared_utils.dataAttr)(isInvalid),
"data-disabled": (0, import_shared_utils.dataAttr)(originalProps.isDisabled),
"data-has-elements": (0, import_shared_utils.dataAttr)(hasElements),
"data-has-helper": (0, import_shared_utils.dataAttr)(hasHelper),
"data-has-label": (0, import_shared_utils.dataAttr)(hasLabel),
"data-has-value": (0, import_shared_utils.dataAttr)(!isPlaceholderShown),
"data-hidden": (0, import_shared_utils.dataAttr)(isHiddenType),
...focusWithinProps,
...props2
};
},
[
slots,
baseStyles,
isFilled,
isFocused,
isHovered,
isLabelHovered,
isInvalid,
hasHelper,
hasLabel,
hasElements,
isPlaceholderShown,
hasStartContent,
isFocusWithin,
isFocusVisible,
isFilledWithin,
hasPlaceholder,
focusWithinProps,
isHiddenType,
originalProps.isReadOnly,
originalProps.isRequired,
originalProps.isDisabled
]
);
const getLabelProps = (0, import_react.useCallback)(
(props2 = {}) => {
return {
"data-slot": "label",
className: slots.label({ class: classNames == null ? void 0 : classNames.label }),
...(0, import_utils2.mergeProps)(labelProps, labelHoverProps, props2)
};
},
[slots, isLabelHovered, labelProps, classNames == null ? void 0 : classNames.label]
);
const getInputProps = (0, import_react.useCallback)(
(props2 = {}) => {
return {
"data-slot": "input",
"data-filled": (0, import_shared_utils.dataAttr)(isFilled),
"data-filled-within": (0, import_shared_utils.dataAttr)(isFilledWithin),
"data-has-start-content": (0, import_shared_utils.dataAttr)(hasStartContent),
"data-has-end-content": (0, import_shared_utils.dataAttr)(!!endContent),
className: slots.input({
class: (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.input, isFilled ? "is-filled" : "", isMultiline ? "pe-0" : "")
}),
...(0, import_utils2.mergeProps)(
focusProps,
inputProps,
(0, import_react_utils.filterDOMProps)(otherProps, {
enabled: true,
labelable: true,
omitEventNames: new Set(Object.keys(inputProps))
}),
props2
),
"aria-readonly": (0, import_shared_utils.dataAttr)(originalProps.isReadOnly),
onChange: (0, import_utils2.chain)(inputProps.onChange, onChange),
ref: domRef
};
},
[
slots,
inputValue,
focusProps,
inputProps,
otherProps,
isFilled,
isFilledWithin,
hasStartContent,
endContent,
classNames == null ? void 0 : classNames.input,
originalProps.isReadOnly,
originalProps.isRequired,
onChange
]
);
const getInputWrapperProps = (0, import_react.useCallback)(
(props2 = {}) => {
return {
ref: inputWrapperRef,
"data-slot": "input-wrapper",
"data-hover": (0, import_shared_utils.dataAttr)(isHovered || isLabelHovered),
"data-focus-visible": (0, import_shared_utils.dataAttr)(isFocusVisible),
"data-focus": (0, import_shared_utils.dataAttr)(isFocused),
className: slots.inputWrapper({
class: (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.inputWrapper, isFilled ? "is-filled" : "")
}),
...(0, import_utils2.mergeProps)(props2, hoverProps),
onClick: (e) => {
if (domRef.current && e.currentTarget === e.target) {
domRef.current.focus();
}
},
style: {
cursor: "text",
...props2.style
}
};
},
[
slots,
isHovered,
isLabelHovered,
isFocusVisible,
isFocused,
inputValue,
classNames == null ? void 0 : classNames.inputWrapper
]
);
const getInnerWrapperProps = (0, import_react.useCallback)(
(props2 = {}) => {
return {
...props2,
ref: innerWrapperRef,
"data-slot": "inner-wrapper",
onClick: (e) => {
if (domRef.current && e.currentTarget === e.target) {
domRef.current.focus();
}
},
className: slots.innerWrapper({
class: (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.innerWrapper, props2 == null ? void 0 : props2.className)
})
};
},
[slots, classNames == null ? void 0 : classNames.innerWrapper]
);
const getMainWrapperProps = (0, import_react.useCallback)(
(props2 = {}) => {
return {
...props2,
"data-slot": "main-wrapper",
className: slots.mainWrapper({
class: (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.mainWrapper, props2 == null ? void 0 : props2.className)
})
};
},
[slots, classNames == null ? void 0 : classNames.mainWrapper]
);
const getHelperWrapperProps = (0, import_react.useCallback)(
(props2 = {}) => {
return {
...props2,
"data-slot": "helper-wrapper",
className: slots.helperWrapper({
class: (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.helperWrapper, props2 == null ? void 0 : props2.className)
})
};
},
[slots, classNames == null ? void 0 : classNames.helperWrapper]
);
const getDescriptionProps = (0, import_react.useCallback)(
(props2 = {}) => {
return {
...props2,
...descriptionProps,
"data-slot": "description",
className: slots.description({ class: (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.description, props2 == null ? void 0 : props2.className) })
};
},
[slots, classNames == null ? void 0 : classNames.description]
);
const getErrorMessageProps = (0, import_react.useCallback)(
(props2 = {}) => {
return {
...props2,
...errorMessageProps,
"data-slot": "error-message",
className: slots.errorMessage({ class: (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.errorMessage, props2 == null ? void 0 : props2.className) })
};
},
[slots, errorMessageProps, classNames == null ? void 0 : classNames.errorMessage]
);
const getClearButtonProps = (0, import_react.useCallback)(
(props2 = {}) => {
return {
...props2,
type: "button",
tabIndex: -1,
disabled: originalProps.isDisabled,
"aria-label": "clear input",
"data-slot": "clear-button",
"data-focus-visible": (0, import_shared_utils.dataAttr)(isClearButtonFocusVisible),
className: slots.clearButton({
class: (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.clearButton, props2 == null ? void 0 : props2.className)
}),
...(0, import_utils2.mergeProps)(clearPressProps, clearFocusProps)
};
},
[slots, isClearButtonFocusVisible, clearPressProps, clearFocusProps, classNames == null ? void 0 : classNames.clearButton]
);
return {
Component,
classNames,
domRef,
label,
description,
startContent,
endContent,
labelPlacement,
isClearable,
hasHelper,
hasStartContent,
isLabelOutside,
isOutsideLeft,
isLabelOutsideAsPlaceholder,
shouldLabelBeOutside,
shouldLabelBeInside,
hasPlaceholder,
isInvalid,
errorMessage,
getBaseProps,
getLabelProps,
getInputProps,
getMainWrapperProps,
getInputWrapperProps,
getInnerWrapperProps,
getHelperWrapperProps,
getDescriptionProps,
getErrorMessageProps,
getClearButtonProps
};
}
// src/input.tsx
var import_jsx_runtime = require("react/jsx-runtime");
var Input = (0, import_system2.forwardRef)((props, ref) => {
const {
Component,
label,
description,
isClearable,
startContent,
endContent,
labelPlacement,
hasHelper,
isOutsideLeft,
shouldLabelBeOutside,
errorMessage,
isInvalid,
getBaseProps,
getLabelProps,
getInputProps,
getInnerWrapperProps,
getInputWrapperProps,
getMainWrapperProps,
getHelperWrapperProps,
getDescriptionProps,
getErrorMessageProps,
getClearButtonProps
} = useInput({ ...props, ref });
const labelContent = label ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", { ...getLabelProps(), children: label }) : null;
const end = (0, import_react2.useMemo)(() => {
if (isClearable) {
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { ...getClearButtonProps(), children: endContent || /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_shared_icons.CloseFilledIcon, {}) });
}
return endContent;
}, [isClearable, getClearButtonProps]);
const helperWrapper = (0, import_react2.useMemo)(() => {
const shouldShowError = isInvalid && errorMessage;
const hasContent = shouldShowError || description;
if (!hasHelper || !hasContent)
return null;
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ...getHelperWrapperProps(), children: shouldShowError ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ...getErrorMessageProps(), children: errorMessage }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ...getDescriptionProps(), children: description }) });
}, [
hasHelper,
isInvalid,
errorMessage,
description,
getHelperWrapperProps,
getErrorMessageProps,
getDescriptionProps
]);
const innerWrapper = (0, import_react2.useMemo)(() => {
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { ...getInnerWrapperProps(), children: [
startContent,
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", { ...getInputProps() }),
end
] });
}, [startContent, end, getInputProps, getInnerWrapperProps]);
const mainWrapper = (0, import_react2.useMemo)(() => {
if (shouldLabelBeOutside) {
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { ...getMainWrapperProps(), children: [
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { ...getInputWrapperProps(), children: [
!isOutsideLeft ? labelContent : null,
innerWrapper
] }),
helperWrapper
] });
}
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { ...getInputWrapperProps(), children: [
labelContent,
innerWrapper
] }),
helperWrapper
] });
}, [
labelPlacement,
helperWrapper,
shouldLabelBeOutside,
labelContent,
innerWrapper,
errorMessage,
description,
getMainWrapperProps,
getInputWrapperProps,
getErrorMessageProps,
getDescriptionProps
]);
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Component, { ...getBaseProps(), children: [
isOutsideLeft ? labelContent : null,
mainWrapper
] });
});
Input.displayName = "HeroUI.Input";
var input_default = Input;
// src/textarea.tsx
var import_shared_utils2 = require("@heroui/shared-utils");
var import_system3 = require("@heroui/system");
var import_utils3 = require("@react-aria/utils");
var import_react3 = require("react");
var import_react_textarea_autosize = __toESM(require("react-textarea-autosize"));
var import_shared_icons2 = require("@heroui/shared-icons");
var import_jsx_runtime2 = require("react/jsx-runtime");
var Textarea = (0, import_system3.forwardRef)(
({
style,
minRows = 3,
maxRows = 8,
cacheMeasurements = false,
disableAutosize = false,
onHeightChange,
...otherProps
}, ref) => {
const {
Component,
label,
description,
startContent,
endContent,
hasHelper,
shouldLabelBeOutside,
shouldLabelBeInside,
isInvalid,
errorMessage,
getBaseProps,
getLabelProps,
getInputProps,
getInnerWrapperProps,
getInputWrapperProps,
getHelperWrapperProps,
getDescriptionProps,
getErrorMessageProps,
isClearable,
getClearButtonProps
} = useInput({ ...otherProps, ref, isMultiline: true });
const [hasMultipleRows, setIsHasMultipleRows] = (0, import_react3.useState)(minRows > 1);
const [isLimitReached, setIsLimitReached] = (0, import_react3.useState)(false);
const labelContent = label ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("label", { ...getLabelProps(), children: label }) : null;
const inputProps = getInputProps();
const handleHeightChange = (height, meta) => {
if (minRows === 1) {
setIsHasMultipleRows(height >= meta.rowHeight * 2);
}
if (maxRows > minRows) {
const limitReached = height >= maxRows * meta.rowHeight;
setIsLimitReached(limitReached);
}
onHeightChange == null ? void 0 : onHeightChange(height, meta);
};
const content = disableAutosize ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("textarea", { ...inputProps, style: (0, import_utils3.mergeProps)(inputProps.style, style != null ? style : {}) }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
import_react_textarea_autosize.default,
{
...inputProps,
cacheMeasurements,
"data-hide-scroll": (0, import_shared_utils2.dataAttr)(!isLimitReached),
maxRows,
minRows,
style: (0, import_utils3.mergeProps)(inputProps.style, style != null ? style : {}),
onHeightChange: handleHeightChange
}
);
const clearButtonContent = (0, import_react3.useMemo)(() => {
return isClearable ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("button", { ...getClearButtonProps(), children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_shared_icons2.CloseFilledIcon, {}) }) : null;
}, [isClearable, getClearButtonProps]);
const innerWrapper = (0, import_react3.useMemo)(() => {
if (startContent || endContent) {
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { ...getInnerWrapperProps(), children: [
startContent,
content,
endContent
] });
}
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { ...getInnerWrapperProps(), children: content });
}, [startContent, inputProps, endContent, getInnerWrapperProps]);
const shouldShowError = isInvalid && errorMessage;
const hasHelperContent = shouldShowError || description;
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Component, { ...getBaseProps(), children: [
shouldLabelBeOutside ? labelContent : null,
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { ...getInputWrapperProps(), "data-has-multiple-rows": (0, import_shared_utils2.dataAttr)(hasMultipleRows), children: [
shouldLabelBeInside ? labelContent : null,
innerWrapper,
clearButtonContent
] }),
hasHelper && hasHelperContent ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { ...getHelperWrapperProps(), children: shouldShowError ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { ...getErrorMessageProps(), children: errorMessage }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { ...getDescriptionProps(), children: description }) }) : null
] });
}
);
Textarea.displayName = "HeroUI.Textarea";
var textarea_default = Textarea;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
Input,
Textarea,
useInput
});
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,gEAAgE;AAChE,gGAAgG;;;AAMhG,MAAM,sCAAgB;AAEtB,wEAAwE;AACxE,MAAM,oCAAc;IAClB;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,IAAK,SAAS;CACf;AAQM,MAAM;IAGX,cAAc,EAAU,EAAgB;QACtC,IAAI,iBAAiB,KAAK;QAC1B,IAAI,OAAO,IAAI,KAAK,KAAK,CAAC,AAAC,CAAA,KAAK,iBAAiB,CAAA,IAAK;QACtD,IAAI,aAAa,MAAO,CAAA,OAAO,CAAA,IAAK,KAAK,KAAK,CAAC,AAAC,CAAA,IAAI,OAAO,EAAC,IAAK;QACjE,IAAI,YAAY,iBAAiB;QACjC,IAAI,QAAQ,YAAY,MACpB,KAAK,KAAK,CAAC,YAAY,MACvB,KAAK,KAAK,CAAC,AAAC,CAAA,YAAY,CAAA,IAAK;QACjC,IAAI,MAAM,YAAY,iCAAW,CAAC,MAAM,GAAG;QAC3C,OAAO,IAAI,CAAA,GAAA,sCAAW,EAAE,IAAI,EAAE,MAAM,QAAQ,GAAG;IACjD;IAEA,YAAY,IAAqB,EAAU;QACzC,IAAI,KAAK,sCAAgB,IAAI,MAAO,CAAA,KAAK,IAAI,GAAG,CAAA,IAAK,KAAK,KAAK,CAAC,AAAC,CAAA,IAAI,KAAK,IAAI,GAAG,EAAC,IAAK;QACvF,MAAM,iCAAW,CAAC,KAAK,KAAK,GAAG,EAAE;QACjC,MAAM,KAAK,GAAG;QACd,OAAO;IACT;IAEA,kBAA0B;QACxB,OAAO;IACT;IAEA,eAAe,IAAqB,EAAU;QAC5C,IAAI,KAAK,KAAK,IAAI,GAChB,OAAO;QAGT,IAAI,KAAK,KAAK,IAAI,IAChB,OAAO;QAGT,IAAI,aAAa,CAAA,GAAA,6BAAE,EAAE,KAAK,KAAK,IAAI,GAAG,IAAI,MAAM;QAChD,OAAO,aAAa,KAAK;IAC3B;IAEA,UAAoB;QAClB,OAAO;YAAC;SAAK;IACf;IAEA,gBAAwB;QACtB,8CAA8C;QAC9C,mDAAmD;QACnD,OAAO;IACT;;aA9CA,aAAiC;;AA+CnC","sources":["packages/@internationalized/date/src/calendars/PersianCalendar.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// Portions of the code in this file are based on code from ICU.\n// Original licensing can be found in the NOTICE file in the root directory of this source tree.\n\nimport {AnyCalendarDate, Calendar, CalendarIdentifier} from '../types';\nimport {CalendarDate} from '../CalendarDate';\nimport {mod} from '../utils';\n\nconst PERSIAN_EPOCH = 1948320;\n\n// Number of days from the start of the year to the start of each month.\nconst MONTH_START = [\n 0, // Farvardin\n 31, // Ordibehesht\n 62, // Khordad\n 93, // Tir\n 124, // Mordad\n 155, // Shahrivar\n 186, // Mehr\n 216, // Aban\n 246, // Azar\n 276, // Dey\n 306, // Bahman\n 336 // Esfand\n];\n\n/**\n * The Persian calendar is the main calendar used in Iran and Afghanistan. It has 12 months\n * in each year, the first 6 of which have 31 days, and the next 5 have 30 days. The 12th month\n * has either 29 or 30 days depending on whether it is a leap year. The Persian year starts\n * around the March equinox.\n */\nexport class PersianCalendar implements Calendar {\n identifier: CalendarIdentifier = 'persian';\n\n fromJulianDay(jd: number): CalendarDate {\n let daysSinceEpoch = jd - PERSIAN_EPOCH;\n let year = 1 + Math.floor((33 * daysSinceEpoch + 3) / 12053);\n let farvardin1 = 365 * (year - 1) + Math.floor((8 * year + 21) / 33);\n let dayOfYear = daysSinceEpoch - farvardin1;\n let month = dayOfYear < 216\n ? Math.floor(dayOfYear / 31)\n : Math.floor((dayOfYear - 6) / 30);\n let day = dayOfYear - MONTH_START[month] + 1;\n return new CalendarDate(this, year, month + 1, day);\n }\n\n toJulianDay(date: AnyCalendarDate): number {\n let jd = PERSIAN_EPOCH - 1 + 365 * (date.year - 1) + Math.floor((8 * date.year + 21) / 33);\n jd += MONTH_START[date.month - 1];\n jd += date.day;\n return jd;\n }\n\n getMonthsInYear(): number {\n return 12;\n }\n\n getDaysInMonth(date: AnyCalendarDate): number {\n if (date.month <= 6) {\n return 31;\n }\n\n if (date.month <= 11) {\n return 30;\n }\n\n let isLeapYear = mod(25 * date.year + 11, 33) < 8;\n return isLeapYear ? 30 : 29;\n }\n\n getEras(): string[] {\n return ['AP'];\n }\n\n getYearsInEra(): number {\n // 9378-10-10 persian is 9999-12-31 gregorian.\n // Round down to 9377 to set the maximum full year.\n return 9377;\n }\n}\n"],"names":[],"version":3,"file":"PersianCalendar.main.js.map"}
@@ -0,0 +1,9 @@
export default (function (o, c, d) {
var proto = c.prototype;
proto.isTomorrow = function () {
var comparisonTemplate = 'YYYY-MM-DD';
var tomorrow = d().add(1, 'day');
return this.format(comparisonTemplate) === tomorrow.format(comparisonTemplate);
};
});
@@ -0,0 +1,16 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _superPropGet;
var _get = require("./get.js");
var _getPrototypeOf = require("./getPrototypeOf.js");
function _superPropGet(classArg, property, receiver, flags) {
var result = (0, _get.default)((0, _getPrototypeOf.default)(flags & 1 ? classArg.prototype : classArg), property, receiver);
return flags & 2 && typeof result === "function" ? function (args) {
return result.apply(receiver, args);
} : result;
}
//# sourceMappingURL=superPropGet.js.map
@@ -0,0 +1,268 @@
/**
* @fileoverview Rule to require grouped accessor pairs in object literals and classes
* @author Milos Djermanovic
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Typedefs
//------------------------------------------------------------------------------
/**
* Property name if it can be computed statically, otherwise the list of the tokens of the key node.
* @typedef {string|Token[]} Key
*/
/**
* Accessor nodes with the same key.
* @typedef {Object} AccessorData
* @property {Key} key Accessor's key
* @property {ASTNode[]} getters List of getter nodes.
* @property {ASTNode[]} setters List of setter nodes.
*/
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
/**
* Checks whether or not the given lists represent the equal tokens in the same order.
* Tokens are compared by their properties, not by instance.
* @param {Token[]} left First list of tokens.
* @param {Token[]} right Second list of tokens.
* @returns {boolean} `true` if the lists have same tokens.
*/
function areEqualTokenLists(left, right) {
if (left.length !== right.length) {
return false;
}
for (let i = 0; i < left.length; i++) {
const leftToken = left[i],
rightToken = right[i];
if (
leftToken.type !== rightToken.type ||
leftToken.value !== rightToken.value
) {
return false;
}
}
return true;
}
/**
* Checks whether or not the given keys are equal.
* @param {Key} left First key.
* @param {Key} right Second key.
* @returns {boolean} `true` if the keys are equal.
*/
function areEqualKeys(left, right) {
if (typeof left === "string" && typeof right === "string") {
// Statically computed names.
return left === right;
}
if (Array.isArray(left) && Array.isArray(right)) {
// Token lists.
return areEqualTokenLists(left, right);
}
return false;
}
/**
* Checks whether or not a given node is of an accessor kind ('get' or 'set').
* @param {ASTNode} node A node to check.
* @returns {boolean} `true` if the node is of an accessor kind.
*/
function isAccessorKind(node) {
return node.kind === "get" || node.kind === "set";
}
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
defaultOptions: [
"anyOrder",
{
enforceForTSTypes: false,
},
],
docs: {
description:
"Require grouped accessor pairs in object literals and classes",
recommended: false,
url: "https://eslint.org/docs/latest/rules/grouped-accessor-pairs",
},
schema: [
{ enum: ["anyOrder", "getBeforeSet", "setBeforeGet"] },
{
type: "object",
properties: {
enforceForTSTypes: {
type: "boolean",
},
},
additionalProperties: false,
},
],
messages: {
notGrouped:
"Accessor pair {{ formerName }} and {{ latterName }} should be grouped.",
invalidOrder:
"Expected {{ latterName }} to be before {{ formerName }}.",
},
},
create(context) {
const [order, { enforceForTSTypes }] = context.options;
const { sourceCode } = context;
/**
* Reports the given accessor pair.
* @param {string} messageId messageId to report.
* @param {ASTNode} formerNode getter/setter node that is defined before `latterNode`.
* @param {ASTNode} latterNode getter/setter node that is defined after `formerNode`.
* @returns {void}
* @private
*/
function report(messageId, formerNode, latterNode) {
context.report({
node: latterNode,
messageId,
loc: astUtils.getFunctionHeadLoc(
latterNode.type !== "TSMethodSignature"
? latterNode.value
: latterNode,
sourceCode,
),
data: {
formerName: astUtils.getFunctionNameWithKind(
formerNode.type !== "TSMethodSignature"
? formerNode.value
: formerNode,
),
latterName: astUtils.getFunctionNameWithKind(
latterNode.type !== "TSMethodSignature"
? latterNode.value
: latterNode,
),
},
});
}
/**
* Checks accessor pairs in the given list of nodes.
* @param {ASTNode[]} nodes The list to check.
* @param {Function} shouldCheck – Predicate that returns `true` if the node should be checked.
* @returns {void}
* @private
*/
function checkList(nodes, shouldCheck) {
const accessors = [];
let found = false;
for (let i = 0; i < nodes.length; i++) {
const node = nodes[i];
if (shouldCheck(node) && isAccessorKind(node)) {
// Creates a new `AccessorData` object for the given getter or setter node.
const name = astUtils.getStaticPropertyName(node);
const key =
name !== null ? name : sourceCode.getTokens(node.key);
// Merges the given `AccessorData` object into the given accessors list.
for (let j = 0; j < accessors.length; j++) {
const accessor = accessors[j];
if (areEqualKeys(accessor.key, key)) {
accessor.getters.push(
...(node.kind === "get" ? [node] : []),
);
accessor.setters.push(
...(node.kind === "set" ? [node] : []),
);
found = true;
break;
}
}
if (!found) {
accessors.push({
key,
getters: node.kind === "get" ? [node] : [],
setters: node.kind === "set" ? [node] : [],
});
}
found = false;
}
}
for (const { getters, setters } of accessors) {
// Don't report accessor properties that have duplicate getters or setters.
if (getters.length === 1 && setters.length === 1) {
const [getter] = getters,
[setter] = setters,
getterIndex = nodes.indexOf(getter),
setterIndex = nodes.indexOf(setter),
formerNode =
getterIndex < setterIndex ? getter : setter,
latterNode =
getterIndex < setterIndex ? setter : getter;
if (Math.abs(getterIndex - setterIndex) > 1) {
report("notGrouped", formerNode, latterNode);
} else if (
(order === "getBeforeSet" &&
getterIndex > setterIndex) ||
(order === "setBeforeGet" && getterIndex < setterIndex)
) {
report("invalidOrder", formerNode, latterNode);
}
}
}
}
return {
ObjectExpression(node) {
checkList(node.properties, n => n.type === "Property");
},
ClassBody(node) {
checkList(
node.body,
n => n.type === "MethodDefinition" && !n.static,
);
checkList(
node.body,
n => n.type === "MethodDefinition" && n.static,
);
},
"TSTypeLiteral, TSInterfaceBody"(node) {
if (enforceForTSTypes) {
checkList(
node.type === "TSTypeLiteral"
? node.members
: node.body,
n => n.type === "TSMethodSignature",
);
}
},
};
},
};
@@ -0,0 +1 @@
{"version":3,"sources":["../../src/react/index.ts","../../src/dynamicMiddleware/react/index.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 '@reduxjs/toolkit';\nexport * from '@reduxjs/toolkit';\nexport { createDynamicMiddleware } from '../dynamicMiddleware/react';\nexport type { CreateDispatchWithMiddlewareHook } from '../dynamicMiddleware/react/index';","import type { DynamicMiddlewareInstance, GetDispatch, GetState, MiddlewareApiConfig, TSHelpersExtractDispatchExtensions } from '@reduxjs/toolkit';\nimport { createDynamicMiddleware as cDM } from '@reduxjs/toolkit';\nimport type { Context } from 'react';\nimport type { ReactReduxContextValue } from 'react-redux';\nimport { createDispatchHook, ReactReduxContext, useDispatch as useDefaultDispatch } from 'react-redux';\nimport type { Action, Dispatch, Middleware, UnknownAction } from 'redux';\nexport type UseDispatchWithMiddlewareHook<Middlewares extends Middleware<any, State, DispatchType>[] = [], State = any, DispatchType extends Dispatch<UnknownAction> = Dispatch<UnknownAction>> = () => TSHelpersExtractDispatchExtensions<Middlewares> & DispatchType;\nexport type CreateDispatchWithMiddlewareHook<State = any, DispatchType extends Dispatch<UnknownAction> = Dispatch<UnknownAction>> = {\n <Middlewares extends [Middleware<any, State, DispatchType>, ...Middleware<any, State, DispatchType>[]]>(...middlewares: Middlewares): UseDispatchWithMiddlewareHook<Middlewares, State, DispatchType>;\n withTypes<MiddlewareConfig extends MiddlewareApiConfig>(): CreateDispatchWithMiddlewareHook<GetState<MiddlewareConfig>, GetDispatch<MiddlewareConfig>>;\n};\ntype ActionFromDispatch<DispatchType extends Dispatch<Action>> = DispatchType extends Dispatch<infer Action> ? Action : never;\ntype ReactDynamicMiddlewareInstance<State = any, DispatchType extends Dispatch<UnknownAction> = Dispatch<UnknownAction>> = DynamicMiddlewareInstance<State, DispatchType> & {\n createDispatchWithMiddlewareHookFactory: (context?: Context<ReactReduxContextValue<State, ActionFromDispatch<DispatchType>> | null>) => CreateDispatchWithMiddlewareHook<State, DispatchType>;\n createDispatchWithMiddlewareHook: CreateDispatchWithMiddlewareHook<State, DispatchType>;\n};\nexport const createDynamicMiddleware = <State = any, DispatchType extends Dispatch<UnknownAction> = Dispatch<UnknownAction>>(): ReactDynamicMiddlewareInstance<State, DispatchType> => {\n const instance = cDM<State, DispatchType>();\n const createDispatchWithMiddlewareHookFactory = (\n // @ts-ignore\n context: Context<ReactReduxContextValue<State, ActionFromDispatch<DispatchType>> | null> = ReactReduxContext) => {\n const useDispatch = context === ReactReduxContext ? useDefaultDispatch : createDispatchHook(context);\n function createDispatchWithMiddlewareHook<Middlewares extends Middleware<any, State, DispatchType>[]>(...middlewares: Middlewares) {\n instance.addMiddleware(...middlewares);\n return useDispatch;\n }\n createDispatchWithMiddlewareHook.withTypes = () => createDispatchWithMiddlewareHook;\n return createDispatchWithMiddlewareHook as CreateDispatchWithMiddlewareHook<State, DispatchType>;\n };\n const createDispatchWithMiddlewareHook = createDispatchWithMiddlewareHookFactory();\n return {\n ...instance,\n createDispatchWithMiddlewareHookFactory,\n createDispatchWithMiddlewareHook\n };\n};"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAGA,cAAc;;;ACFd,SAAS,2BAA2B,WAAW;AAG/C,SAAS,oBAAoB,mBAAmB,eAAe,0BAA0B;AAYlF,IAAM,0BAA0B,MAAgJ;AACrL,QAAM,WAAW,IAAyB;AAC1C,QAAM,0CAA0C,CAEhD,UAA2F,sBAAsB;AAC/G,UAAM,cAAc,YAAY,oBAAoB,qBAAqB,mBAAmB,OAAO;AACnG,aAASA,qCAAgG,aAA0B;AACjI,eAAS,cAAc,GAAG,WAAW;AACrC,aAAO;AAAA,IACT;AACA,IAAAA,kCAAiC,YAAY,MAAMA;AACnD,WAAOA;AAAA,EACT;AACA,QAAM,mCAAmC,wCAAwC;AACjF,SAAO,iCACF,WADE;AAAA,IAEL;AAAA,IACA;AAAA,EACF;AACF;","names":["createDispatchWithMiddlewareHook"]}
@@ -0,0 +1,50 @@
# Change Log
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## 2.0.0
* Add custom error classes
<a name="1.0.2"></a>
## [1.0.2](https://github.com/npm/json-parse-even-better-errors/compare/v1.0.1...v1.0.2) (2018-03-30)
### Bug Fixes
* **messages:** More friendly messages for non-string ([#1](https://github.com/npm/json-parse-even-better-errors/issues/1)) ([a476d42](https://github.com/npm/json-parse-even-better-errors/commit/a476d42))
<a name="1.0.1"></a>
## [1.0.1](https://github.com/npm/json-parse-even-better-errors/compare/v1.0.0...v1.0.1) (2017-08-16)
### Bug Fixes
* **license:** oops. Forgot to update license.md ([efe2958](https://github.com/npm/json-parse-even-better-errors/commit/efe2958))
<a name="1.0.0"></a>
# 1.0.0 (2017-08-15)
### Features
* **init:** Initial Commit ([562c977](https://github.com/npm/json-parse-even-better-errors/commit/562c977))
### BREAKING CHANGES
* **init:** This is the first commit!
<a name="0.1.0"></a>
# 0.1.0 (2017-08-15)
### Features
* **init:** Initial Commit ([9dd1a19](https://github.com/npm/json-parse-even-better-errors/commit/9dd1a19))
@@ -0,0 +1 @@
{"name":"trim-lines","version":"3.0.1","requiresBuild":false,"files":{"license":{"checkedAt":1794532113709,"integrity":"sha512-/K09pNWImuBVTJ2A+gUfekgh9tJOuoTRLfingHc68N+KlN6BuDnrqk0Jf4wtnKQF3dYLYjZOWI4xcGjGHKIu7w==","mode":420,"size":1106},"index.js":{"checkedAt":1794532114700,"integrity":"sha512-PDzv0NnHBxGFu4BeYbzFzw4hp06wweNU86mJr3zyDzVV8aJ0ORI7HwPQEOq74/WZFPqutJKgfN4t1loiOY0ieg==","mode":420,"size":1530},"package.json":{"checkedAt":1794532114700,"integrity":"sha512-OkFvrE52Jg1Ta8hSnezfiWYKE/op313BqlN5Di1ibpI/vuKXAhzR2zEKw+4u/AUi/TWhr4yrpP4FThpFN00Luw==","mode":420,"size":1679},"readme.md":{"checkedAt":1794532114700,"integrity":"sha512-eFvu5EjVBDi+mCn32QIwZUMYabEin71LiTT08XVN4JR/ej7vD5h7j58sjQ3yOJndv4UKjTfnzEjxjKOsBFs8gA==","mode":420,"size":2885},"index.d.ts":{"checkedAt":1794532114700,"integrity":"sha512-w5f16bUu4XUudrhQ9D1n0j2PYtOCyR2r8KNXgPGmUeQW35YLrhdMoCw1DWmUVrlkJD8/YQKtmDRjTPzZtYqWNA==","mode":420,"size":293}}}
@@ -0,0 +1,21 @@
var concat = require('concat-stream')
function MemoryStorage (opts) {}
MemoryStorage.prototype._handleFile = function _handleFile (req, file, cb) {
file.stream.pipe(concat({ encoding: 'buffer' }, function (data) {
cb(null, {
buffer: data,
size: data.length
})
}))
}
MemoryStorage.prototype._removeFile = function _removeFile (req, file, cb) {
delete file.buffer
cb(null)
}
module.exports = function (opts) {
return new MemoryStorage(opts)
}
@@ -0,0 +1,229 @@
import { UnknownFieldHandler, WireType } from "./binary-format-contract";
import { RepeatType, ScalarType } from "./reflection-info";
import { assert } from "./assert";
import { PbLong, PbULong } from "./pb-long";
/**
* Writes proto3 messages in binary format using reflection information.
*
* https://developers.google.com/protocol-buffers/docs/encoding
*/
export class ReflectionBinaryWriter {
constructor(info) {
this.info = info;
}
prepare() {
if (!this.fields) {
const fieldsInput = this.info.fields ? this.info.fields.concat() : [];
this.fields = fieldsInput.sort((a, b) => a.no - b.no);
}
}
/**
* Writes the message to binary format.
*/
write(message, writer, options) {
this.prepare();
for (const field of this.fields) {
let value, // this will be our field value, whether it is member of a oneof or not
emitDefault, // whether we emit the default value (only true for oneof members)
repeated = field.repeat, localName = field.localName;
// handle oneof ADT
if (field.oneof) {
const group = message[field.oneof];
if (group.oneofKind !== localName)
continue; // if field is not selected, skip
value = group[localName];
emitDefault = true;
}
else {
value = message[localName];
emitDefault = false;
}
// we have handled oneof above. we just have to honor `emitDefault`.
switch (field.kind) {
case "scalar":
case "enum":
let T = field.kind == "enum" ? ScalarType.INT32 : field.T;
if (repeated) {
assert(Array.isArray(value));
if (repeated == RepeatType.PACKED)
this.packed(writer, T, field.no, value);
else
for (const item of value)
this.scalar(writer, T, field.no, item, true);
}
else if (value === undefined)
assert(field.opt);
else
this.scalar(writer, T, field.no, value, emitDefault || field.opt);
break;
case "message":
if (repeated) {
assert(Array.isArray(value));
for (const item of value)
this.message(writer, options, field.T(), field.no, item);
}
else {
this.message(writer, options, field.T(), field.no, value);
}
break;
case "map":
assert(typeof value == 'object' && value !== null);
for (const [key, val] of Object.entries(value))
this.mapEntry(writer, options, field, key, val);
break;
}
}
let u = options.writeUnknownFields;
if (u !== false)
(u === true ? UnknownFieldHandler.onWrite : u)(this.info.typeName, message, writer);
}
mapEntry(writer, options, field, key, value) {
writer.tag(field.no, WireType.LengthDelimited);
writer.fork();
// javascript only allows number or string for object properties
// we convert from our representation to the protobuf type
let keyValue = key;
switch (field.K) {
case ScalarType.INT32:
case ScalarType.FIXED32:
case ScalarType.UINT32:
case ScalarType.SFIXED32:
case ScalarType.SINT32:
keyValue = Number.parseInt(key);
break;
case ScalarType.BOOL:
assert(key == 'true' || key == 'false');
keyValue = key == 'true';
break;
}
// write key, expecting key field number = 1
this.scalar(writer, field.K, 1, keyValue, true);
// write value, expecting value field number = 2
switch (field.V.kind) {
case 'scalar':
this.scalar(writer, field.V.T, 2, value, true);
break;
case 'enum':
this.scalar(writer, ScalarType.INT32, 2, value, true);
break;
case 'message':
this.message(writer, options, field.V.T(), 2, value);
break;
}
writer.join();
}
message(writer, options, handler, fieldNo, value) {
if (value === undefined)
return;
handler.internalBinaryWrite(value, writer.tag(fieldNo, WireType.LengthDelimited).fork(), options);
writer.join();
}
/**
* Write a single scalar value.
*/
scalar(writer, type, fieldNo, value, emitDefault) {
let [wireType, method, isDefault] = this.scalarInfo(type, value);
if (!isDefault || emitDefault) {
writer.tag(fieldNo, wireType);
writer[method](value);
}
}
/**
* Write an array of scalar values in packed format.
*/
packed(writer, type, fieldNo, value) {
if (!value.length)
return;
assert(type !== ScalarType.BYTES && type !== ScalarType.STRING);
// write tag
writer.tag(fieldNo, WireType.LengthDelimited);
// begin length-delimited
writer.fork();
// write values without tags
let [, method,] = this.scalarInfo(type);
for (let i = 0; i < value.length; i++)
writer[method](value[i]);
// end length delimited
writer.join();
}
/**
* Get information for writing a scalar value.
*
* Returns tuple:
* [0]: appropriate WireType
* [1]: name of the appropriate method of IBinaryWriter
* [2]: whether the given value is a default value
*
* If argument `value` is omitted, [2] is always false.
*/
scalarInfo(type, value) {
let t = WireType.Varint;
let m;
let i = value === undefined;
let d = value === 0;
switch (type) {
case ScalarType.INT32:
m = "int32";
break;
case ScalarType.STRING:
d = i || !value.length;
t = WireType.LengthDelimited;
m = "string";
break;
case ScalarType.BOOL:
d = value === false;
m = "bool";
break;
case ScalarType.UINT32:
m = "uint32";
break;
case ScalarType.DOUBLE:
t = WireType.Bit64;
m = "double";
break;
case ScalarType.FLOAT:
t = WireType.Bit32;
m = "float";
break;
case ScalarType.INT64:
d = i || PbLong.from(value).isZero();
m = "int64";
break;
case ScalarType.UINT64:
d = i || PbULong.from(value).isZero();
m = "uint64";
break;
case ScalarType.FIXED64:
d = i || PbULong.from(value).isZero();
t = WireType.Bit64;
m = "fixed64";
break;
case ScalarType.BYTES:
d = i || !value.byteLength;
t = WireType.LengthDelimited;
m = "bytes";
break;
case ScalarType.FIXED32:
t = WireType.Bit32;
m = "fixed32";
break;
case ScalarType.SFIXED32:
t = WireType.Bit32;
m = "sfixed32";
break;
case ScalarType.SFIXED64:
d = i || PbLong.from(value).isZero();
t = WireType.Bit64;
m = "sfixed64";
break;
case ScalarType.SINT32:
m = "sint32";
break;
case ScalarType.SINT64:
d = i || PbLong.from(value).isZero();
m = "sint64";
break;
}
return [t, m, i || d];
}
}
@@ -0,0 +1,85 @@
/**
* @fileoverview Rule to flag references to the undefined variable.
* @author Michael Ficarra
*/
"use strict";
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
docs: {
description: "Disallow the use of `undefined` as an identifier",
recommended: false,
frozen: true,
url: "https://eslint.org/docs/latest/rules/no-undefined",
},
schema: [],
messages: {
unexpectedUndefined: "Unexpected use of undefined.",
},
},
create(context) {
const sourceCode = context.sourceCode;
/**
* Report an invalid "undefined" identifier node.
* @param {ASTNode} node The node to report.
* @returns {void}
*/
function report(node) {
context.report({
node,
messageId: "unexpectedUndefined",
});
}
/**
* Checks the given scope for references to `undefined` and reports
* all references found.
* @param {eslint-scope.Scope} scope The scope to check.
* @returns {void}
*/
function checkScope(scope) {
const undefinedVar = scope.set.get("undefined");
if (!undefinedVar) {
return;
}
const references = undefinedVar.references;
const defs = undefinedVar.defs;
// Report non-initializing references (those are covered in defs below)
references
.filter(ref => !ref.init)
.forEach(ref => report(ref.identifier));
defs.forEach(def => report(def.name));
}
return {
"Program:exit"(node) {
const globalScope = sourceCode.getScope(node);
const stack = [globalScope];
while (stack.length) {
const scope = stack.pop();
stack.push(...scope.childScopes);
checkScope(scope);
}
},
};
},
};
@@ -0,0 +1,158 @@
function RetryOperation(timeouts, options) {
// Compatibility for the old (timeouts, retryForever) signature
if (typeof options === 'boolean') {
options = { forever: options };
}
this._originalTimeouts = JSON.parse(JSON.stringify(timeouts));
this._timeouts = timeouts;
this._options = options || {};
this._maxRetryTime = options && options.maxRetryTime || Infinity;
this._fn = null;
this._errors = [];
this._attempts = 1;
this._operationTimeout = null;
this._operationTimeoutCb = null;
this._timeout = null;
this._operationStart = null;
if (this._options.forever) {
this._cachedTimeouts = this._timeouts.slice(0);
}
}
module.exports = RetryOperation;
RetryOperation.prototype.reset = function() {
this._attempts = 1;
this._timeouts = this._originalTimeouts;
}
RetryOperation.prototype.stop = function() {
if (this._timeout) {
clearTimeout(this._timeout);
}
this._timeouts = [];
this._cachedTimeouts = null;
};
RetryOperation.prototype.retry = function(err) {
if (this._timeout) {
clearTimeout(this._timeout);
}
if (!err) {
return false;
}
var currentTime = new Date().getTime();
if (err && currentTime - this._operationStart >= this._maxRetryTime) {
this._errors.unshift(new Error('RetryOperation timeout occurred'));
return false;
}
this._errors.push(err);
var timeout = this._timeouts.shift();
if (timeout === undefined) {
if (this._cachedTimeouts) {
// retry forever, only keep last error
this._errors.splice(this._errors.length - 1, this._errors.length);
this._timeouts = this._cachedTimeouts.slice(0);
timeout = this._timeouts.shift();
} else {
return false;
}
}
var self = this;
var timer = setTimeout(function() {
self._attempts++;
if (self._operationTimeoutCb) {
self._timeout = setTimeout(function() {
self._operationTimeoutCb(self._attempts);
}, self._operationTimeout);
if (self._options.unref) {
self._timeout.unref();
}
}
self._fn(self._attempts);
}, timeout);
if (this._options.unref) {
timer.unref();
}
return true;
};
RetryOperation.prototype.attempt = function(fn, timeoutOps) {
this._fn = fn;
if (timeoutOps) {
if (timeoutOps.timeout) {
this._operationTimeout = timeoutOps.timeout;
}
if (timeoutOps.cb) {
this._operationTimeoutCb = timeoutOps.cb;
}
}
var self = this;
if (this._operationTimeoutCb) {
this._timeout = setTimeout(function() {
self._operationTimeoutCb();
}, self._operationTimeout);
}
this._operationStart = new Date().getTime();
this._fn(this._attempts);
};
RetryOperation.prototype.try = function(fn) {
console.log('Using RetryOperation.try() is deprecated');
this.attempt(fn);
};
RetryOperation.prototype.start = function(fn) {
console.log('Using RetryOperation.start() is deprecated');
this.attempt(fn);
};
RetryOperation.prototype.start = RetryOperation.prototype.try;
RetryOperation.prototype.errors = function() {
return this._errors;
};
RetryOperation.prototype.attempts = function() {
return this._attempts;
};
RetryOperation.prototype.mainError = function() {
if (this._errors.length === 0) {
return null;
}
var counts = {};
var mainError = null;
var mainErrorCount = 0;
for (var i = 0; i < this._errors.length; i++) {
var error = this._errors[i];
var message = error.message;
var count = (counts[message] || 0) + 1;
counts[message] = count;
if (count >= mainErrorCount) {
mainError = error;
mainErrorCount = count;
}
}
return mainError;
};
@@ -0,0 +1,40 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.KeyOfPropertyKeysToRest = KeyOfPropertyKeysToRest;
exports.KeyOf = KeyOf;
const type_1 = require("../create/type");
const index_1 = require("../literal/index");
const index_2 = require("../number/index");
const index_3 = require("../computed/index");
const index_4 = require("../ref/index");
const keyof_property_keys_1 = require("./keyof-property-keys");
const index_5 = require("../union/index");
const keyof_from_mapped_result_1 = require("./keyof-from-mapped-result");
// ------------------------------------------------------------------
// TypeGuard
// ------------------------------------------------------------------
const kind_1 = require("../guard/kind");
// prettier-ignore
function FromComputed(target, parameters) {
return (0, index_3.Computed)('KeyOf', [(0, index_3.Computed)(target, parameters)]);
}
// prettier-ignore
function FromRef($ref) {
return (0, index_3.Computed)('KeyOf', [(0, index_4.Ref)($ref)]);
}
// prettier-ignore
function KeyOfFromType(type, options) {
const propertyKeys = (0, keyof_property_keys_1.KeyOfPropertyKeys)(type);
const propertyKeyTypes = KeyOfPropertyKeysToRest(propertyKeys);
const result = (0, index_5.UnionEvaluated)(propertyKeyTypes);
return (0, type_1.CreateType)(result, options);
}
// prettier-ignore
function KeyOfPropertyKeysToRest(propertyKeys) {
return propertyKeys.map(L => L === '[number]' ? (0, index_2.Number)() : (0, index_1.Literal)(L));
}
/** `[Json]` Creates a KeyOf type */
function KeyOf(type, options) {
return ((0, kind_1.IsComputed)(type) ? FromComputed(type.target, type.parameters) : (0, kind_1.IsRef)(type) ? FromRef(type.$ref) : (0, kind_1.IsMappedResult)(type) ? (0, keyof_from_mapped_result_1.KeyOfFromMappedResult)(type, options) : KeyOfFromType(type, options));
}
@@ -0,0 +1,127 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _table = _interopRequireDefault(require("./table"));
var _struct = _interopRequireDefault(require("./struct"));
var _string = _interopRequireDefault(require("../util/string"));
var _unicodeName = _interopRequireDefault(require("../enum/unicodeName"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* @file post 表
* @author mengke01(kekee000@gmail.com)
*
* https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6post.html
*/
var Posthead = _table.default.create('posthead', [['format', _struct.default.Fixed], ['italicAngle', _struct.default.Fixed], ['underlinePosition', _struct.default.Int16], ['underlineThickness', _struct.default.Int16], ['isFixedPitch', _struct.default.Uint32], ['minMemType42', _struct.default.Uint32], ['maxMemType42', _struct.default.Uint32], ['minMemType1', _struct.default.Uint32], ['maxMemType1', _struct.default.Uint32]]);
var _default = exports.default = _table.default.create('post', [], {
read: function read(reader, ttf) {
var format = reader.readFixed(this.offset);
// 读取表头
var tbl = new Posthead(this.offset).read(reader, ttf);
// format2
if (format === 2) {
var numberOfGlyphs = reader.readUint16();
var glyphNameIndex = [];
for (var i = 0; i < numberOfGlyphs; ++i) {
glyphNameIndex.push(reader.readUint16());
}
var pascalStringOffset = reader.offset;
var pascalStringLength = ttf.tables.post.length - (pascalStringOffset - this.offset);
var pascalStringBytes = reader.readBytes(reader.offset, pascalStringLength);
tbl.nameIndex = glyphNameIndex; // 设置glyf名字索引
tbl.names = _string.default.getPascalString(pascalStringBytes); // glyf名字数组
}
// deprecated
else if (format === 2.5) {
tbl.format = 3;
}
return tbl;
},
write: function write(writer, ttf) {
var post = ttf.post || {
format: 3
};
// write header
writer.writeFixed(post.format); // format
writer.writeFixed(post.italicAngle || 0); // italicAngle
writer.writeInt16(post.underlinePosition || 0); // underlinePosition
writer.writeInt16(post.underlineThickness || 0); // underlineThickness
writer.writeUint32(post.isFixedPitch || 0); // isFixedPitch
writer.writeUint32(post.minMemType42 || 0); // minMemType42
writer.writeUint32(post.maxMemType42 || 0); // maxMemType42
writer.writeUint32(post.minMemType1 || 0); // minMemType1
writer.writeUint32(post.maxMemType1 || 0); // maxMemType1
// version 3 不设置post信息
if (post.format === 2) {
var numberOfGlyphs = ttf.glyf.length;
writer.writeUint16(numberOfGlyphs); // numberOfGlyphs
// write glyphNameIndex
var nameIndex = ttf.support.post.nameIndex;
for (var i = 0, l = nameIndex.length; i < l; i++) {
writer.writeUint16(nameIndex[i]);
}
// write names
ttf.support.post.names.forEach(function (name) {
writer.writeBytes(name);
});
}
},
size: function size(ttf) {
var numberOfGlyphs = ttf.glyf.length;
ttf.post = ttf.post || {};
ttf.post.format = ttf.post.format || 3;
ttf.post.maxMemType1 = numberOfGlyphs;
// version 3 不设置post信息
if (ttf.post.format === 3 || ttf.post.format === 1) {
return 32;
}
// version 2
var size = 34 + numberOfGlyphs * 2; // header + numberOfGlyphs + numberOfGlyphs * 2
var glyphNames = [];
var nameIndexArr = [];
var nameIndex = 0;
// 获取 name的大小
for (var i = 0; i < numberOfGlyphs; i++) {
// .notdef
if (i === 0) {
nameIndexArr.push(0);
} else {
var glyf = ttf.glyf[i];
var unicode = glyf.unicode ? glyf.unicode[0] : 0;
var unicodeNameIndex = _unicodeName.default[unicode];
if (undefined !== unicodeNameIndex) {
nameIndexArr.push(unicodeNameIndex);
} else {
// 这里需要注意,"" 有可能是"\3" length不为0,但是是空字符串
var name = glyf.name;
if (!name || name.charCodeAt(0) < 32) {
nameIndexArr.push(258 + nameIndex++);
glyphNames.push([0]);
size++;
} else {
nameIndexArr.push(258 + nameIndex++);
var bytes = _string.default.toPascalStringBytes(name); // pascal string bytes
glyphNames.push(bytes);
size += bytes.length;
}
}
}
}
ttf.support.post = {
nameIndex: nameIndexArr,
names: glyphNames
};
return size;
}
});
@@ -0,0 +1,18 @@
import isKeyable from './_isKeyable.js';
/**
* Gets the data for `map`.
*
* @private
* @param {Object} map The map to query.
* @param {string} key The reference key.
* @returns {*} Returns the map data.
*/
function getMapData(map, key) {
var data = map.__data__;
return isKeyable(key)
? data[typeof key == 'string' ? 'string' : 'hash']
: data.map;
}
export default getMapData;
@@ -0,0 +1,7 @@
'use strict';
var implementation = require('./implementation');
module.exports = function getPolyfill() {
return Array.prototype.flat || implementation;
};
@@ -0,0 +1,210 @@
/**
* @fileoverview Disallows multiple blank lines.
* implementation adapted from the no-trailing-spaces rule.
* @author Greg Cochard
* @deprecated in ESLint v8.53.0
*/
"use strict";
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "11.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "no-multiple-empty-lines",
url: "https://eslint.style/rules/no-multiple-empty-lines",
},
},
],
},
type: "layout",
docs: {
description: "Disallow multiple empty lines",
recommended: false,
url: "https://eslint.org/docs/latest/rules/no-multiple-empty-lines",
},
fixable: "whitespace",
schema: [
{
type: "object",
properties: {
max: {
type: "integer",
minimum: 0,
},
maxEOF: {
type: "integer",
minimum: 0,
},
maxBOF: {
type: "integer",
minimum: 0,
},
},
required: ["max"],
additionalProperties: false,
},
],
messages: {
blankBeginningOfFile:
"Too many blank lines at the beginning of file. Max of {{max}} allowed.",
blankEndOfFile:
"Too many blank lines at the end of file. Max of {{max}} allowed.",
consecutiveBlank:
"More than {{max}} blank {{pluralizedLines}} not allowed.",
},
},
create(context) {
// Use options.max or 2 as default
let max = 2,
maxEOF = max,
maxBOF = max;
if (context.options.length) {
max = context.options[0].max;
maxEOF =
typeof context.options[0].maxEOF !== "undefined"
? context.options[0].maxEOF
: max;
maxBOF =
typeof context.options[0].maxBOF !== "undefined"
? context.options[0].maxBOF
: max;
}
const sourceCode = context.sourceCode;
// Swallow the final newline, as some editors add it automatically and we don't want it to cause an issue
const allLines =
sourceCode.lines.at(-1) === ""
? sourceCode.lines.slice(0, -1)
: sourceCode.lines;
const templateLiteralLines = new Set();
//--------------------------------------------------------------------------
// Public
//--------------------------------------------------------------------------
return {
TemplateLiteral(node) {
node.quasis.forEach(literalPart => {
// Empty lines have a semantic meaning if they're inside template literals. Don't count these as empty lines.
for (
let ignoredLine = literalPart.loc.start.line;
ignoredLine < literalPart.loc.end.line;
ignoredLine++
) {
templateLiteralLines.add(ignoredLine);
}
});
},
"Program:exit"(node) {
return (
allLines
// Given a list of lines, first get a list of line numbers that are non-empty.
.reduce((nonEmptyLineNumbers, line, index) => {
if (
line.trim() ||
templateLiteralLines.has(index + 1)
) {
nonEmptyLineNumbers.push(index + 1);
}
return nonEmptyLineNumbers;
}, [])
// Add a value at the end to allow trailing empty lines to be checked.
.concat(allLines.length + 1)
// Given two line numbers of non-empty lines, report the lines between if the difference is too large.
.reduce((lastLineNumber, lineNumber) => {
let messageId, maxAllowed;
if (lastLineNumber === 0) {
messageId = "blankBeginningOfFile";
maxAllowed = maxBOF;
} else if (lineNumber === allLines.length + 1) {
messageId = "blankEndOfFile";
maxAllowed = maxEOF;
} else {
messageId = "consecutiveBlank";
maxAllowed = max;
}
if (lineNumber - lastLineNumber - 1 > maxAllowed) {
context.report({
node,
loc: {
start: {
line:
lastLineNumber + maxAllowed + 1,
column: 0,
},
end: { line: lineNumber, column: 0 },
},
messageId,
data: {
max: maxAllowed,
pluralizedLines:
maxAllowed === 1 ? "line" : "lines",
},
fix(fixer) {
const rangeStart =
sourceCode.getIndexFromLoc({
line: lastLineNumber + 1,
column: 0,
});
/*
* The end of the removal range is usually the start index of the next line.
* However, at the end of the file there is no next line, so the end of the
* range is just the length of the text.
*/
const lineNumberAfterRemovedLines =
lineNumber - maxAllowed;
const rangeEnd =
lineNumberAfterRemovedLines <=
allLines.length
? sourceCode.getIndexFromLoc({
line: lineNumberAfterRemovedLines,
column: 0,
})
: sourceCode.text.length;
return fixer.removeRange([
rangeStart,
rangeEnd,
]);
},
});
}
return lineNumber;
}, 0)
);
},
};
},
};
@@ -0,0 +1,90 @@
/**
* DON'T EDIT THIS FILE.
* This file was generated by "scripts/update-lib-configs.js" script.
*/
"use strict"
module.exports = {
plugins: ["es-x"],
rules: {
"es-x/no-array-from": "error",
"es-x/no-array-of": "error",
"es-x/no-array-prototype-copywithin": "error",
"es-x/no-array-prototype-entries": "error",
"es-x/no-array-prototype-fill": "error",
"es-x/no-array-prototype-find": "error",
"es-x/no-array-prototype-findindex": "error",
"es-x/no-array-prototype-keys": "error",
"es-x/no-array-prototype-values": "error",
"es-x/no-arrow-functions": "error",
"es-x/no-binary-numeric-literals": "error",
"es-x/no-block-scoped-functions": "error",
"es-x/no-block-scoped-variables": "error",
"es-x/no-classes": "error",
"es-x/no-computed-properties": "error",
"es-x/no-default-parameters": "error",
"es-x/no-destructuring": "error",
"es-x/no-for-of-loops": "error",
"es-x/no-generators": "error",
"es-x/no-map": "error",
"es-x/no-math-acosh": "error",
"es-x/no-math-asinh": "error",
"es-x/no-math-atanh": "error",
"es-x/no-math-cbrt": "error",
"es-x/no-math-clz32": "error",
"es-x/no-math-cosh": "error",
"es-x/no-math-expm1": "error",
"es-x/no-math-fround": "error",
"es-x/no-math-hypot": "error",
"es-x/no-math-imul": "error",
"es-x/no-math-log10": "error",
"es-x/no-math-log1p": "error",
"es-x/no-math-log2": "error",
"es-x/no-math-sign": "error",
"es-x/no-math-sinh": "error",
"es-x/no-math-tanh": "error",
"es-x/no-math-trunc": "error",
"es-x/no-modules": "error",
"es-x/no-new-target": "error",
"es-x/no-number-epsilon": "error",
"es-x/no-number-isfinite": "error",
"es-x/no-number-isinteger": "error",
"es-x/no-number-isnan": "error",
"es-x/no-number-issafeinteger": "error",
"es-x/no-number-maxsafeinteger": "error",
"es-x/no-number-minsafeinteger": "error",
"es-x/no-number-parsefloat": "error",
"es-x/no-number-parseint": "error",
"es-x/no-object-assign": "error",
"es-x/no-object-getownpropertysymbols": "error",
"es-x/no-object-is": "error",
"es-x/no-object-setprototypeof": "error",
"es-x/no-object-super-properties": "error",
"es-x/no-octal-numeric-literals": "error",
"es-x/no-promise": "error",
"es-x/no-property-shorthands": "error",
"es-x/no-proxy": "error",
"es-x/no-reflect": "error",
"es-x/no-regexp-prototype-flags": "error",
"es-x/no-regexp-u-flag": "error",
"es-x/no-regexp-y-flag": "error",
"es-x/no-rest-parameters": "error",
"es-x/no-set": "error",
"es-x/no-spread-elements": "error",
"es-x/no-string-fromcodepoint": "error",
"es-x/no-string-prototype-codepointat": "error",
"es-x/no-string-prototype-endswith": "error",
"es-x/no-string-prototype-includes": "error",
"es-x/no-string-prototype-normalize": "error",
"es-x/no-string-prototype-repeat": "error",
"es-x/no-string-prototype-startswith": "error",
"es-x/no-string-raw": "error",
"es-x/no-subclassing-builtins": "error",
"es-x/no-symbol": "error",
"es-x/no-template-literals": "error",
"es-x/no-typed-arrays": "error",
"es-x/no-unicode-codepoint-escapes": "error",
"es-x/no-weak-map": "error",
"es-x/no-weak-set": "error",
},
}
@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
function isIterable(value) {
return value != null && typeof value[Symbol.iterator] === "function";
}
exports.isIterable = isIterable;
@@ -0,0 +1,123 @@
'use strict';
class QuickLRU {
constructor(options = {}) {
if (!(options.maxSize && options.maxSize > 0)) {
throw new TypeError('`maxSize` must be a number greater than 0');
}
this.maxSize = options.maxSize;
this.onEviction = options.onEviction;
this.cache = new Map();
this.oldCache = new Map();
this._size = 0;
}
_set(key, value) {
this.cache.set(key, value);
this._size++;
if (this._size >= this.maxSize) {
this._size = 0;
if (typeof this.onEviction === 'function') {
for (const [key, value] of this.oldCache.entries()) {
this.onEviction(key, value);
}
}
this.oldCache = this.cache;
this.cache = new Map();
}
}
get(key) {
if (this.cache.has(key)) {
return this.cache.get(key);
}
if (this.oldCache.has(key)) {
const value = this.oldCache.get(key);
this.oldCache.delete(key);
this._set(key, value);
return value;
}
}
set(key, value) {
if (this.cache.has(key)) {
this.cache.set(key, value);
} else {
this._set(key, value);
}
return this;
}
has(key) {
return this.cache.has(key) || this.oldCache.has(key);
}
peek(key) {
if (this.cache.has(key)) {
return this.cache.get(key);
}
if (this.oldCache.has(key)) {
return this.oldCache.get(key);
}
}
delete(key) {
const deleted = this.cache.delete(key);
if (deleted) {
this._size--;
}
return this.oldCache.delete(key) || deleted;
}
clear() {
this.cache.clear();
this.oldCache.clear();
this._size = 0;
}
* keys() {
for (const [key] of this) {
yield key;
}
}
* values() {
for (const [, value] of this) {
yield value;
}
}
* [Symbol.iterator]() {
for (const item of this.cache) {
yield item;
}
for (const item of this.oldCache) {
const [key] = item;
if (!this.cache.has(key)) {
yield item;
}
}
}
get size() {
let oldCacheSize = 0;
for (const key of this.oldCache.keys()) {
if (!this.cache.has(key)) {
oldCacheSize++;
}
}
return Math.min(this._size + oldCacheSize, this.maxSize);
}
}
module.exports = QuickLRU;
@@ -0,0 +1,58 @@
/**
* @fileoverview Enforce ES5 or ES6 class for React Components
* @author Dan Hamilton
*/
'use strict';
const componentUtil = require('../util/componentUtil');
const docsUrl = require('../util/docsUrl');
const report = require('../util/report');
// ------------------------------------------------------------------------------
// Rule Definition
// ------------------------------------------------------------------------------
const messages = {
shouldUseES6Class: 'Component should use es6 class instead of createClass',
shouldUseCreateClass: 'Component should use createClass instead of es6 class',
};
/** @type {import('eslint').Rule.RuleModule} */
module.exports = {
meta: {
docs: {
description: 'Enforce ES5 or ES6 class for React Components',
category: 'Stylistic Issues',
recommended: false,
url: docsUrl('prefer-es6-class'),
},
messages,
schema: [{
enum: ['always', 'never'],
}],
},
create(context) {
const configuration = context.options[0] || 'always';
return {
ObjectExpression(node) {
if (componentUtil.isES5Component(node, context) && configuration === 'always') {
report(context, messages.shouldUseES6Class, 'shouldUseES6Class', {
node,
});
}
},
ClassDeclaration(node) {
if (componentUtil.isES6Component(node, context) && configuration === 'never') {
report(context, messages.shouldUseCreateClass, 'shouldUseCreateClass', {
node,
});
}
},
};
},
};
@@ -0,0 +1,18 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = createFlowUnionType;
var _index = require("../generated/index.js");
var _removeTypeDuplicates = require("../../modifications/flow/removeTypeDuplicates.js");
function createFlowUnionType(types) {
const flattened = (0, _removeTypeDuplicates.default)(types);
if (flattened.length === 1) {
return flattened[0];
} else {
return (0, _index.unionTypeAnnotation)(flattened);
}
}
//# sourceMappingURL=createFlowUnionType.js.map
@@ -0,0 +1,8 @@
export { defaultAnnouncements, defaultScreenReaderInstructions, } from './Accessibility';
export type { Announcements, ScreenReaderInstructions } from './Accessibility';
export { DndContext } from './DndContext';
export type { CancelDrop, DndContextProps, DraggableMeasuring, MeasuringConfiguration, } from './DndContext';
export { useDndMonitor } from './DndMonitor';
export type { DndMonitorListener } from './DndMonitor';
export { DragOverlay, defaultDropAnimation, defaultDropAnimationSideEffects, } from './DragOverlay';
export type { DropAnimation, DropAnimationFunction, DropAnimationFunctionArguments, DropAnimationKeyframeResolver, DropAnimationSideEffects, Props as DragOverlayProps, } from './DragOverlay';
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAwEA,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,YAgBjC"}
@@ -0,0 +1,18 @@
'use strict';
var getPolyfill = require('./polyfill');
var define = require('define-properties');
var getIteratorPolyfill = require('../Iterator/polyfill');
module.exports = function shimIteratorFrom() {
var $Iterator = getIteratorPolyfill();
var polyfill = getPolyfill();
define(
$Iterator,
{ from: polyfill },
{ from: function () { return $Iterator.from !== polyfill; } }
);
return polyfill;
};
@@ -0,0 +1,31 @@
import { OneBotAction, OneBotRequestToolkit } from '../../action/OneBotAction';
import { StreamPacket } from './StreamBasic';
export interface ResolvedFileInfo {
downloadPath: string;
fileName: string;
fileSize: number;
}
export interface DownloadResult {
file_name?: string;
file_size?: number;
chunk_size?: number;
index?: number;
data?: string;
size?: number;
progress?: number;
base64_size?: number;
total_chunks?: number;
total_bytes?: number;
message?: string;
data_type?: 'file_info' | 'file_chunk' | 'file_complete';
width?: number;
height?: number;
out_format?: string;
}
export declare abstract class BaseDownloadStream<PayloadType, ResultType> extends OneBotAction<PayloadType, StreamPacket<ResultType>> {
protected resolveDownload(file?: string): Promise<ResolvedFileInfo>;
protected streamFileChunks(req: OneBotRequestToolkit, streamPath: string, chunkSize: number, chunkDataType: string): Promise<{
totalChunks: number;
totalBytes: number;
}>;
}
@@ -0,0 +1,114 @@
'use strict'
// @ts-ignore
const { createTypeScriptImportResolver } = require('eslint-import-resolver-typescript')
const { parser, plugin } = require('typescript-eslint')
const tsRedundant = require('./configs/ts-redundant')
/**
* @typedef TypescriptifyOptions
* @property {import('typescript-eslint').ConfigWithExtends['files']} [files]
* @property {string[]|undefined} [ignores]
* @property {string} [name]
* @property {string[] | string | boolean | null} [project]
* @property {string} [tsconfigRootDir]
* @property {boolean} [typeChecking]
*/
/**
* @param {import('eslint').Linter.Config[]} configs
* @param {TypescriptifyOptions} options
* @returns {import('eslint').Linter.Config}
*/
function typescriptify (configs, options) {
if (typeof plugin.rules !== 'object') {
throw Error('Unexpected type of "plugin" export from "typescript-eslint"')
}
const {
files,
ignores,
name,
project,
tsconfigRootDir,
typeChecking = false,
} = options || {}
/** @type {Record<string, 'off'>} */
const deactivatedRules = {}
/** @type {import('eslint').Linter.RulesRecord} */
const replacementRules = {}
for (const config of configs) {
for (const ruleId in tsRedundant) {
if (config.rules?.[ruleId]) {
deactivatedRules[ruleId] = 'off'
}
}
for (const [ruleId, ruleDefinition] of Object.entries(plugin.rules)) {
const currentRule = config.rules?.[ruleId]
if (currentRule === undefined) {
continue
}
if (!('meta' in ruleDefinition) || !ruleDefinition.meta || !('docs' in ruleDefinition.meta) || !ruleDefinition.meta.docs || typeof ruleDefinition.meta.docs !== 'object') {
continue
}
const docs = ruleDefinition.meta.docs
if (!('extendsBaseRule' in docs) || !docs.extendsBaseRule) {
continue
}
if ('requiresTypeChecking' in docs && docs.requiresTypeChecking && !typeChecking) {
continue
}
deactivatedRules[ruleId] = 'off'
if (ruleId !== 'dot-notation') {
replacementRules['@typescript-eslint/' + ruleId] = currentRule
}
}
}
const result = /** @satisfies {import('eslint').Linter.Config } */ ({
...name && { name },
...files && { files },
...ignores && { ignores },
languageOptions: {
// @ts-ignore - Parser type mismatch between typescript-eslint and ESLint
parser,
parserOptions: {
project: project === undefined ? typeChecking : project,
...tsconfigRootDir ? { tsconfigRootDir } : undefined,
},
},
plugins: {
// @ts-ignore - Plugin type mismatch between typescript-eslint and ESLint
'@typescript-eslint': plugin,
},
settings: {
'import-x/resolver-next': [
createTypeScriptImportResolver(
(Array.isArray(project) || typeof project === 'string')
? { project }
: {}
),
],
},
rules: {
...deactivatedRules,
...replacementRules,
},
})
// @ts-ignore - Config type mismatch between typescript-eslint and ESLint
return result
}
module.exports = {
typescriptify,
}
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;;GAiBG;AACH,2CAPW,OAAO,MAEP,KAAK,GAEH,KAAK,CA6BjB;6BAnDgC,sBAAsB;2BAAtB,sBAAsB"}
@@ -0,0 +1,42 @@
import { IntersectEvaluated } from '../intersect/index.mjs';
import { IndexFromPropertyKeys } from '../indexed/index.mjs';
import { KeyOfPropertyKeys } from '../keyof/index.mjs';
import { Object } from '../object/index.mjs';
import { SetDistinct } from '../sets/index.mjs';
// ------------------------------------------------------------------
// TypeGuard
// ------------------------------------------------------------------
import { IsNever } from '../guard/kind.mjs';
// prettier-ignore
function CompositeKeys(T) {
const Acc = [];
for (const L of T)
Acc.push(...KeyOfPropertyKeys(L));
return SetDistinct(Acc);
}
// prettier-ignore
function FilterNever(T) {
return T.filter(L => !IsNever(L));
}
// prettier-ignore
function CompositeProperty(T, K) {
const Acc = [];
for (const L of T)
Acc.push(...IndexFromPropertyKeys(L, [K]));
return FilterNever(Acc);
}
// prettier-ignore
function CompositeProperties(T, K) {
const Acc = {};
for (const L of K) {
Acc[L] = IntersectEvaluated(CompositeProperty(T, L));
}
return Acc;
}
// prettier-ignore
export function Composite(T, options) {
const K = CompositeKeys(T);
const P = CompositeProperties(T, K);
const R = Object(P, options);
return R;
}
@@ -0,0 +1,22 @@
(The MIT License)
Copyright (c) 2015 Douglas Christopher Wilson
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,13 @@
/**
* Adapted from React: https://github.com/facebook/react/blob/master/packages/shared/formatProdErrorMessage.js
*
* Do not require this module directly! Use normal throw error calls. These messages will be replaced with error codes
* during build.
* @param {number} code
*/
export function formatProdErrorMessage(code: number) {
return (
`Minified Redux Toolkit error #${code}; visit https://redux-toolkit.js.org/Errors?code=${code} for the full message or ` +
'use the non-minified dev environment for full errors. '
)
}
@@ -0,0 +1,19 @@
(function(i){function e(){var f=i();return f.default||f}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.flow=e()}})(function(){"use strict";var hA0=Object.create;var g5=Object.defineProperty;var yA0=Object.getOwnPropertyDescriptor;var gA0=Object.getOwnPropertyNames;var _A0=Object.getPrototypeOf,wA0=Object.prototype.hasOwnProperty;var bA0=(a0,W0)=>()=>(W0||a0((W0={exports:{}}).exports,W0),W0.exports),lY=(a0,W0)=>{for(var bx in W0)g5(a0,bx,{get:W0[bx],enumerable:!0})},pY=(a0,W0,bx,Yx)=>{if(W0&&typeof W0=="object"||typeof W0=="function")for(let x1 of gA0(W0))!wA0.call(a0,x1)&&x1!==bx&&g5(a0,x1,{get:()=>W0[x1],enumerable:!(Yx=yA0(W0,x1))||Yx.enumerable});return a0};var TA0=(a0,W0,bx)=>(bx=a0!=null?hA0(_A0(a0)):{},pY(W0||!a0||!a0.__esModule?g5(bx,"default",{value:a0,enumerable:!0}):bx,a0)),EA0=a0=>pY(g5({},"__esModule",{value:!0}),a0);var kY=bA0(mj=>{(function(a0){typeof globalThis!="object"&&(this?W0():(a0.defineProperty(a0.prototype,"_T_",{configurable:!0,get:W0}),_T_));function W0(){var bx=this||self;bx.globalThis=bx,delete a0.prototype._T_}})(Object);(function(a0){"use strict";var W0="loc",bx=70416,Yx=69748,x1=163,D1=92159,Ie=43587,k2="labeled_statement",Rr="&=",_1="int_of_string",Ce=110591,Qs=92909,Qa=11559,$o="regexp",_5=43301,Qp=11703,w5=122654,Za=255,Ej="%ni",b5=68252,Aj=232,T5=42785,Kn="declare_variable",Zp="while",E5=66938,A5=70301,S5=124907,x4=126515,Sj=218,Hn="pattern_identifier",P5=67643,Vn="export_source",I5=216,C5=64279,Pj="Out_of_memory",N5=113788,Ij="comments",O5=126624,Cj="win32",$n="object_key_bigint_literal",Nj=185,Oj=283,r4=123214,Wo="constructor",j5=69955,Wn="import_declaration",D5=68437,F5="Failure",e4="Unix.Unix_error",R5=64255,M5=42539,L5=110579,Qn="export_default_declaration",Zn="jsx_attribute_name",t4=11727,q5=43002,n4=126500,x7="component_param_pattern",jj="collect_comments_opt",r7="match_unary_pattern",e7="keyof_type",Dj="Invalid binary/octal ",Fj="range",U5=170,xs="false",B5=43798,Rj=", characters ",t7="object_type_property_getter",X5=65547,G5=126467,Y5=65007,J5=42237,z5=8318,K5=71215,n7="object_property_type",u7="type_alias",H5=67742,i7="function_body",Mj=304,V5=68111,u4=120745,$5=71959,i4=43880,Lj="Match_failure",qj=280,f7="type_cast",lt=109,rs="void",W5="generator",Q5=125124,Z5=101589,f4=94179,Uj=">>>",c4=70404,c7="optional_indexed_access_type",W1="argument",a7="object_property",s7="object_type_property",xy=67004,ry=42783,ey=68850,Bj="@",ty=43741,ny=43487,a4="object",Xj="end",s4=126571,uy=71956,iy=208,fy=126566,cy=67702,Gj="EEXIST",o7="this_expression",Yj=203,ay=11507,sy=113807,o4=119893,oy=42735,Ql="rest",v7="null_literal",Zl="protected",vy=43615,m2=8231,ly=68149,py=73727,ky=72348,my=92995,Qo=224,dy=11686,hy=43013,l7="assignment_pattern",yy=12329,p7="function_type",Zo=192,k7="jsx_element_name",gy=70018,m7="catch_clause_pattern",v4=126540,d7="template_literal",_y=120654,wy=68497,by=67679,h7="readonly_type",Ty=68735,Ey="<",l4=": No such file or directory",Ay=66915,Sy="chain",Jj="!",y7="object_type",Py=43712,p4=64297,Iy=183969,Cy=43503,Ny=67591,xv=65278,Oy=67669,g7="for_of_assignment_pattern",x6="`",jy=11502,_7="catch_body",Dy=42191,Zs=-744106340,Fy=182,rv=":",zj="a string",Ry=65663,My=66978,Ly=71947,k4=43519,qy=71086,Uy=125258,By=12538,w7="expression_or_spread",Kj="Printexc.handle_uncaught_exception",m4=69956,d4=120122,h4=247,Hj=231,Xy=" : flags Open_rdonly and Open_wronly are not compatible",b7="statement_fork_point",Vj=710,$j=-692038429,ze="static",Gy=55203,Yy=64324,Jy=64111,Wj="!==",zy=120132,Ky=124903,r6="class",Hy=222,T7="pattern_number_literal",es="kind",Vy=71903,E7="variable_declarator",A7="typeof_expression",$y=126627,Wy=70084,Qj=228,y4=70480,S7="class_private_field",Qy=239,g4=120713,on=65535,P7="private_name",Zy=43137,I7="remote_identifier",x9=70161,C7="label_identifier",r9="src/parser/statement_parser.ml",e9=8335,t9=19903,n9=64310,ev="_",N7="for_init_declaration",Zj="infer",u9=64466,i9=43018,xD="tokens",f9=92735,c9=66954,a9=65473,s9=70285,O7="sequence",o9="compare: functional value",v9=69890,e6=1e3,l9=65487,p9=42653,rD="\\\\",eD="%=",j7="match_member_pattern_base",k9=72367,D7="function_rest_param",tD="/static/",m9=124911,d9=65276,_4=126558,h9=11498,nD=137,F7="export_default_declaration_decl",y9="cases",w4=126602,R7="jsx_child",Ke="continue",g9=42962,uD="importKind",o1=122,C3="Literal",M7="pattern_object_property_identifier_key",_9=42508,xo="in",w9=55238,b9=67071,T9=70831,E9=72161,A9=67462,iD="<<=",S9=43009,P9=66383,b4=67827,I9=72202,C9=69839,N9=66775,fD="-=",tv=8202,O9=70105,j9=120538,L7="for_in_left_declaration",D9="rendersType",T4=126563,F9=70708,E4=126523,cD=166,q7="match_",aD=202,R9=110951,ts="component",A4=126552,M9=66977,sD=213,U7="enum_member_identifier",oD=210,B7="enum_bigint_body",vD=">=",L9=126495,q9="specifiers",lD=-88,U9="=",Line truncated
`,ZD="**=",yu="pattern_object_property_pattern",O_="e",j_=72712,xF="Internal Error: Found object private prop",D_="ENOENT",F_=-42,gu="jsx_opening_attribute",R_=67646,_u="component_type",M_=64296,L_=43887,rF="Division_by_zero",eF="EnumDefaultedMember",wu="typeof_member_identifier",q_=43792,bu="match_member_pattern_property",Tu="declare_export_declaration_decl",U_=93026,Eu="type_annotation_hint",B_=42887,X_=43881,G_=43761,vk=8526,D3=119,Y_=43866,J_=72847,z_=8348,pe=101,K_=94026,lk=72272,tF="src/parser/flow_lexer.ml",H_=120744,av=8191,F3="implies",pk=255,kk=11711,Au="match_unary_pattern_argument",V_=71235,mk=68116,nF=261,E1=100,Su="match_expression",Pu="enum_body",dk=1114111,Iu="assignment",$_=71955,hk=43260,Cu="pattern_array_e",W_=126583,uF="prefix",Nu="class_body",f6="shorthand",yk=171,Q_=66256,gk=-97,iF=" =",Z_=94032,xw=42606,Ou="match_case",rw=71839,_k=120134,ew=55291,tw=92862,nw=43019,uw=126543,R3="function",iw=111355,fw=11389,cw=70753,aw=43249,sw=64829,wk="line",ju="function_declaration",bk="undefined",fF="([^/]+)",ow=110947,vw=70002,cF="Cygwin",Du="as_expression",lw=12591,Tk=64285,pw=2048,kw=73112,Ek=126589,aF=225,Ak=43259,mw=72817,Sk=64318,dw=172,sF=209,Fu="match_binding_pattern",Ru=" ",Mu="import_source",c6="delete",oF="Enum `",Pk=126553,hw=67001,sv="default",yw=11630,Ik=206,Lu="enum_bigint_member",gw=67504,Ck=67593,_w=113791,vF="MatchObjectPatternProperty",ww=69572,qu="typeof_type",lF=212,pF="%i",Uu="function_this_param",bw=72329,no="0x",ov=8239,Tw=75075,kF=57343,Bu="pattern_bigint_literal",Ew=12341,mF=201,vv="hook",dF=": closedir failed",Aw=42959,Nk=119970,hF=278,Sw=43560,yF="||=",Xu="member_private_name",Pw=120570,Gu="object_key_identifier",Ok=223,gF="Not_found",_F=230,Yu="jsx_element_name_member_expression",Ju="string_literal",Iw=120596,Cw=43807,Nw=69687,Ow=63743,jk=72192,zu="member_property",jw=43262,Ku="class_declaration",wF="renders*",bF="%Li",Dw=126578,Hu="jsx_attribute",M3=254,Oe="empty",a6="label",Vu="object_internal_slot_property_type",Dk=120133,Fw=43359,He="predicate",TF="??=",Rw=43697,Mw=-43,$u="default_opt",EF="the start of a statement",Lw=67826,Wu="object_",Qu="class_element",Fk=11631,Rk=70855,Zu="opaque_type",xi="number_literal",AF=", ",Mk=8319,Lk=120004,qk=133,ri="type_params",ei="pattern_object_rest_property",W2="import",qw=72e3,Uw=67413,Bw=12343,Xw=70080,ti="intersection_type",d2=-36,Gw=70005,Uk="properties",Yw=11679,Jw=8483,zw=110587,SF=43520,ni="computed_key",PF=207,ui="class_identifier",Kw="Invalid number ",ii="function_param_pattern",lv=12288,Hw=113817,Vw=70730,$w=178207,Bk=71236,IF=167,fi="object_indexer_property_type",Ww=64286,CF="TypeAnnotation",NF=220,ci="type_identifier",ai="spread_property",si="jsx_attribute_value_expression",Qw=126519,Xk=70108,Gk=126,Yk=42999,uo="prototype",Zw=" : flags Open_text and Open_binary are not compatible",OF="**",Jk=43823,xb=": Not a directory",oi="render_type",zk=72349,L3="test",rb=43776,eb=92879,tb=11263,jF=241,nb=93052,vi="nullable_type",ub=43704,ib=64321,DF="Property",fb=72191,FF=165,s6="instanceof",cb=69247,Ve="name",Kk=126634,ab=8516,Hk="typeArguments",sb=71127,li="jsx_spread_attribute",ob=66559,vb=44031,lb=43645,n2=8233,pb=71494,kb="opaque",Vk=72967,mb=70106,pi="logical",RF="@[%s =@ ",o6="0o",$k=126554,db=71351,Wk=8484,hb=72242,Qk=120687,q3=252,yb=183983,v6="%S",ki="function_this_param_type",Zk="decorators",gb=43255,mi="catch_clause",$e="-",_b=67711,MF=": file descriptor already closed",xm=64311,rm=120539,wb="arguments",em=73062,bb=173823,Tb=42124,Eb=72095,Ab=125259,Sb=42969,tm=70280,LF=12520,Pb=69749,Ib=70066,di="binary",hi="for_in_statement",Cb=43010,qF="^=",Nb=126570,yi="for_statement",nm=126584,gi="function_return_annotation",Ob=72144,jb=8505,_i="class_expression",Db=120076,Fb=69807,Rb=40981,Mb=-24976191,Lb=72768,qb=126550,um='"',wi="call_type_arg",UF="f",pv="this",im=126628,BF="===",XF=56320,bi="declare_module_exports",Ub=120512,vn=105,Bb=119974,Xb=71450,Gb=71942,GF=195,fm=120629,YF="/=",JF=">>",Ti="declare_interface",zF=4096,Ei="pattern_array_rest_element",Yb=71338,cm=126520,Ai="as_const_expression",KF="Popping lex mode from empty stack",HF="renders?",Jb=68405,Si="member",Pi="class_extends",kv=12287,am=126590,zb=66377,io="async",Ii="pattern_array_element",U3=240,Kb=69864,mv="readonly",Hb=70460,Vb=120779,$b=66378,Ci="new_",sm=126551,Ni="pattern_object_rest_property_pattern",Oi="for_statement_init",Wb=43595,om=68296,Qb=120712,Zb=64217,xT=69295,VF="||",rT=";",eT=70461,tT=66939,$F="collect_comments",WF=279,ji="generic_type",nT=68295,uT=44002,vm=72162,Di="object_call_property_type",lm=8305,pm=119995,km="with",Fi="class_property",QF="qualification",Ri="jsx_attribute_name_namespaced",Mi="if_statement",Li="typeof_qualified_identifier",ZF=238,iT=65615,xR=176,u2="expression",mm=126559,qi="jsx_attribute_value",Ui="<2>",Bi="component_param",dm="Map.bal",hm=132,fT=70412,cT=70440,rR="<<",ym="finally",eR="v",Xi="syntax_opt",Gi="meta_property",aT=12447,sT=67514,gm=12448,Yi="object_mapped_type_property",dv="operator",tR="closedir",Ji="unary_expressLine truncated
`,n8=120093,T6="column",$f="component_rest_param",MA=70451,LA=70312,qA=69967,u8=70279,UA=66463,BA=92975,i8=70286,Wf="pattern_object_property_computed_key",Qf="object_key_string_literal",XA="jsError",Zf="type_args",GA=8304,xM="==",gv=115,xc="declare_component",YA=120092,JA=43638,zA=66811,KA=43334,HA=66863,VA=77823,rM=143,rc="optional_call",$A=126562,f8=70162,We=104,WA=66963,_v="await",c8=70107,Q2="0",QA=72250,ZA=8507,eM=291,xS=100351,a8="AssignmentPattern",ec="type",tM="%u",rS="NonNullExpression",tc="function_expression_or_method",eS=43470,nM=242,uM="camlinternalMod.ml",nc="match_or_pattern",tS=72750,nS=69414,uS=65370,uc="syntax",iM=32752,iS=42963,fM="End_of_file",fS=12294,cS=8471,cM="elementType",aS=43782,aM="++",sS=43641,oS=71944,vS=126601,lS=78894,pS=-45,wv="null",kS=177,sM="satisfies",mS=131071,ic="import_specifier",fc="class_method",cc="type_",dS=126514,hS=8454,oM="inexact",yS=67807,gS=8525,_S=65470,wS=71352,ac="tuple_spread_element",vM=219,bS="abstract",TS=73458,Qe="return",E6=65536,s8=126548,sc="array_element",ES=-253313196,AS=186,o8="catch",oc="infer_type",SS=12295,lM="Invalid legacy octal ",PS=69762,IS=43311,CS=65437,vc="variable_declaration",pM=-696510241,lc="function_params",kM=307,NS=64316,mM=311,v8=11565,dM="infinity",OS="@]",jS=65908,pc="extends",DS=66204,FS=43784,RS=11742,l8=126503,Ze="debugger",MS=70457,cs=-86,A6=912068366,LS=68786,p8="keyof",k8=69415,qS=12686,dn=127343600,kc="declare_type_alias",hM="the",yM=233,mc="jsx_element_name_namespaced",US=72283,gM=161,dc="class_static_block",hc="function_param_type",Lt=128,BS=-673950933,m8=126591,_M="Sys_error",XS=74649,GS=74862,S6="is",YS=43738,JS=68479,wM=196,d8=70854,yc="enum_boolean_member",h8=72163,zS=92783,bM=281,gc="component_param_name",KS=68863,hn=32768,TM=2048,HS=64284,EM="@{",VS="\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0",y8=8455,_c="update_expression",$S=65500,P6="from",WS=68447,g8=12592,QS=92766,AM=">>=",B2=110,ZS=66431,xP=43586,wc="jsx_identifier",rP=" : file already exists",U1=128,eP=71958,tP=66717,bc="enum_boolean_body",nP=64262,$r="id",Tc="component_renders_annotation",uP=42888,iP=8584,fP=73008,SM=306,Ec="enum_symbol_body",Ac="declare_namespace",_8=72713,cP=55215,Sc="object_property_value_type",Pc="match_wildcard_pattern",Ic="for_in_assignment_pattern",w8=8485,aP=43395,PM=229,as="true",sP=43743,Cc="enum_number_member",IM=234,oP=72969,CM="expected *",E2=102,NM=200,I6="symbol",bv="source",Nc="tparam_const_modifier",vP=43714,Oc="jsx_fragment",jc="jsx_attribute_name_identifier",C6="public",lP=43442,Dc="pattern_object_property",pP=65786,kP=70783,mP=43713,dP=72160,OM="*-/",Fc="export_named_specifier",Rc="arrow_function",hP=122623,b8=70006,jM="${",yP=43814,Mc="generic_qualified_identifier_type",DM=199,Lc="jsx_spread_child",T8=8489,E8=184,FM=2047,gP=66955,qc="try_catch",_P=70497,RM=313,MM=237,wP=67431,bP=125183,LM=-602162310,yn="params",TP="consequent",EP=68029,AP=67829,SP=68095,Uc="enum_string_body",PP=93823,IP=68351,CP=65495,Bc="declare_module",Xc="match_as_pattern_target",Gc="body_expression",NP=66175,A8=191,S8=70441,P8=65141,I8="&",Yc="super_expression",C8=126564,OP=72105,tS0="fs",xt="throw",jP=68287,DP=67839,Tv=116,FP=110882,RP=69404,MP=123197,Ev=65279,K3="src/parser/type_parser.ml",LP=68115,N8=126547,O8=126556,qP=73055,Jc="member_property_expression",zc="enum_defaulted_member",UP=43071,BP=11726,Kc="component_type_rest_param",XP=68607,Hc="object_key",GP=160,Z2="variance",YP=70655,JP=70414,H3="super",zP=123583,KP=65594,N6="method",HP=73648,O6=121,VP=93951,Vc="pattern_array_element_pattern",$P=43764,WP=42993,j8=120145,QP=74879,qM=168,D8=8486,ZP=72001,$c="tagged_template",Wc="module_ref_literal",xI=65312,Av="implements",rI=43700,eI=120003,UM="Invalid_argument",BM=262,Qc=16777215,tI=83526,F8=69744,R8=12336,Zc="switch_case",XM=-61,xa="optional_member",nI=64274,M8=64322,L8=126530,uI=71998,q8=72970,iI=13311,fI=73647,cI=120074,V3="let",GM="global",ra="expression_statement",ea="component_type_params",aI=512,sI=69634,oI=67461,vI=123627,lI=64913,YM="children",JM="PropertyDefinition",zM=1026,KM="%li",ta="declare_class",pI=43258,na="indexed_access_type",kI=124926,ss=112,mI="b",ua="predicate_expression",ia="if_alternate_statement",j6="private",HM=-594953737,VM=140,dI="nan",hI=72103,U8=11735,fa="statement",yI="rmdir",B8=66512,gI="match",_I=198,wI=11734,ca="import_named_specifier",bI=69599,TI=68799,EI=194559,aa="match_array_pattern",$M=174,sa="function_",oa="bigint_literal",f1=248,X8=67638,G8=126539,AI=11557,WM=214,SI=5760,rt="break",gn="block",va="match_member_pattern",PI=123565,II=66815,A1="value",QM=1039100673,CI=69746,NI=70448,OI=74751,la="init",jI=69551,Y8=65548,pa="jsx_member_expression",J8=68096,Sv=108,z8=126521,DI=71487,ka="match_statement",FI=178205,RI=12548,ZM=" : is a directory",_n=".",MI=12348,$3=-835925911,xe="typeParameters",LI=66855,i2="typeAnnotation",Pv="bigint",ma="jsx_attribute_value_literal",qI=194,xL="T_JSX_TEXT",UI=68466,K8=126537,rL=67714067,BI=69487,H8="export",XI=43822,V8=126499,GI=55242,da="member_type_Line truncated
`,Cz="@.",Nz="@@",Oz="@%",jz=Bj,Dz="%c",Fz="%s",Rz=pF,Mz=KM,Lz=Ej,qz=bF,Uz="%f",Bz="%B",Xz="%{",Gz="%}",Yz="%(",Jz="%)",zz="%a",Kz="%t",Hz="%?",Vz="%r",$z="%_r",Wz=[0,h2,850,23],Qz=[0,h2,837,26],Zz=[0,h2,847,28],xK=[0,h2,815,21],rK=[0,h2,819,21],eK=[0,h2,823,19],tK=[0,h2,827,22],nK=[0,h2,832,30],uK=[0,h2,851,23],iK=[0,h2,836,26],fK=[0,h2,846,28],cK=[0,h2,814,21],aK=[0,h2,818,21],sK=[0,h2,822,19],oK=[0,h2,826,22],vK=[0,h2,831,30];function pN(x){return x[2]===5?12:-6}function wq(x){return[0,0,I1(x)]}function bq(x,r){var e=Bt(x[2]),t=x[1]+r|0;if(e<t){var u=e*2|0,i=t<=u?u:t,c=I1(i);sq(x[2],0,c,0,e),x[2]=c}}function pl(x,r){bq(x,1),ls(x[2],x[1],r),x[1]=x[1]+1|0}function G2(x,r){var e=Ux(r);bq(x,e),In(r,0,x[2],x[1],e),x[1]=x[1]+e|0}function Tq(x){return ol(x[2],0,x[1])}function Eq(x){if(typeof x=="number")switch(x){case 0:return Az;case 1:return Sz;case 2:return Pz;case 3:return Iz;case 4:return Cz;case 5:return Nz;default:return Oz}switch(x[0]){case 0:return x[1];case 1:return x[1];default:return Jx(jz,Sd(1,x[1]))}}function kN(x,r){for(var e=r;;){if(typeof e=="number")return;switch(e[0]){case 0:var t=e[1];G2(x,Dz);var e=t;break;case 1:var u=e[1];G2(x,Fz);var e=u;break;case 2:var i=e[1];G2(x,Rz);var e=i;break;case 3:var c=e[1];G2(x,Mz);var e=c;break;case 4:var v=e[1];G2(x,Lz);var e=v;break;case 5:var s=e[1];G2(x,qz);var e=s;break;case 6:var l=e[1];G2(x,Uz);var e=l;break;case 7:var p=e[1];G2(x,Bz);var e=p;break;case 8:var d=e[2],T=e[1];G2(x,Xz),kN(x,T),G2(x,Gz);var e=d;break;case 9:var b=e[3],C=e[1];G2(x,Yz),kN(x,C),G2(x,Jz);var e=b;break;case 10:var N=e[1];G2(x,zz);var e=N;break;case 11:var I=e[1];G2(x,Kz);var e=I;break;case 12:var F=e[1];G2(x,Hz);var e=F;break;case 13:var L=e[1];G2(x,Vz);var e=L;break;default:var X=e[1];G2(x,$z);var e=X}}}function a2(x){if(typeof x=="number")return 0;switch(x[0]){case 0:return[0,a2(x[1])];case 1:return[1,a2(x[1])];case 2:return[2,a2(x[1])];case 3:return[3,a2(x[1])];case 4:return[4,a2(x[1])];case 5:return[5,a2(x[1])];case 6:return[6,a2(x[1])];case 7:return[7,a2(x[1])];case 8:var r=x[1];return[8,r,a2(x[2])];case 9:var e=x[2],t=x[1];return[9,e,t,a2(x[3])];case 10:return[10,a2(x[1])];case 11:return[11,a2(x[1])];case 12:return[12,a2(x[1])];case 13:return[13,a2(x[1])];default:return[14,a2(x[1])]}}function Y2(x){if(typeof x=="number")return[0,function(y0){},function(y0){},function(y0){},function(y0){}];switch(x[0]){case 0:var r=Y2(x[1]),e=r[2],t=r[1];return[0,function(y0){t(j)},function(y0){e(j)},r[3],r[4]];case 1:var u=Y2(x[1]),i=u[2],c=u[1];return[0,function(y0){c(j)},function(y0){i(j)},u[3],u[4]];case 2:var v=Y2(x[1]),s=v[2],l=v[1];return[0,function(y0){l(j)},function(y0){s(j)},v[3],v[4]];case 3:var p=Y2(x[1]),d=p[2],T=p[1];return[0,function(y0){T(j)},function(y0){d(j)},p[3],p[4]];case 4:var b=Y2(x[1]),C=b[2],N=b[1];return[0,function(y0){N(j)},function(y0){C(j)},b[3],b[4]];case 5:var I=Y2(x[1]),F=I[2],L=I[1];return[0,function(y0){L(j)},function(y0){F(j)},I[3],I[4]];case 6:var X=Y2(x[1]),q=X[2],J=X[1];return[0,function(y0){J(j)},function(y0){q(j)},X[3],X[4]];case 7:var e0=Y2(x[1]),W=e0[2],x0=e0[1];return[0,function(y0){x0(j)},function(y0){W(j)},e0[3],e0[4]];case 8:var i0=Y2(x[2]),f0=i0[2],r0=i0[1];return[0,function(y0){r0(j)},function(y0){f0(j)},i0[3],i0[4]];case 9:var v0=x[2],o0=x[1],w0=Y2(x[3]),t0=w0[4],s0=w0[3],h0=w0[2],p0=w0[1],C0=Y2(g2(a2(o0),v0)),j0=C0[4],P0=C0[3],M0=C0[2],U0=C0[1];return[0,function(y0){p0(j),U0(j)},function(y0){M0(j),h0(j)},function(y0){s0(j),P0(j)},function(y0){j0(j),t0(j)}];case 10:var T0=Y2(x[1]),G0=T0[2],k0=T0[1];return[0,function(y0){k0(j)},function(y0){G0(j)},T0[3],T0[4]];case 11:var G=Y2(x[1]),S0=G[2],Z0=G[1];return[0,function(y0){Z0(j)},function(y0){S0(j)},G[3],G[4]];case 12:var N0=Y2(x[1]),ux=N0[2],ex=N0[1];return[0,function(y0){ex(j)},function(y0){ux(j)},N0[3],N0[4]];case 13:var nx=Y2(x[1]),px=nx[4],D0=nx[3],dx=nx[2],_x=nx[1];return[0,function(y0){_x(j)},function(y0){dx(j)},function(y0){D0(j)},function(y0){px(j)}];default:var K=Y2(x[1]),_0=K[4],U=K[3],m0=K[2],b0=K[1];return[0,function(y0){b0(j)},function(y0){m0(j)},function(y0){U(j)},function(y0){_0(j)}]}}function g2(x,r){x:{r:{e:{t:{n:{u:{i:{if(typeof x!="number"){switch(x[0]){case 0:var e=x[1];if(typeof r!="number")switch(r[0]){case 0:return[0,g2(e,r[1])];case 8:break u;case 9:break i;case 10:break x;case 11:break r;case 12:break e;case 13:break t;case 14:break n}break;case 1:var t=x[1];if(typeof r!="number")switch(r[0]){case 1:return[1,g2(t,r[1])];case 8:break u;case 9:break i;case 10:break x;case 11:break r;case 12:break e;case 13:break t;case 14:break n}break;case 2:var u=x[1];if(typeof r!="number")switch(r[0]){case 2:return[2,g2(u,r[1])];case 8:break u;case 9:break i;case 10:break x;case 11:break r;case 12:break e;case 13:break t;case 14:break n}break;case 3:var i=x[1];if(typeof r!="number")switch(r[0]){case 3:return[3,g2(i,r[1])];case 8:break u;case 9:break i;case 10:break x;case 11:break r;case 12:break e;case 13:break t;case 14:break n}break;case 4:var c=x[1];if(typeof r!="number")switch(r[Line truncated
`];function _N(x,r){var e=x[1+r];if(!(1-(typeof e=="number"?1:0)))return h(ar(GH),e);if(Ov(e)===q3)return h(ar(BH),e);if(Ov(e)!==_E)return XH;for(var t=YC("%.12g",e),u=0,i=Ux(t);;){if(i<=u)return Jx(t,UH);var c=B1(t,u);x:{if(48<=c){if(58>c)break x}else if(c===45)break x;return t}var u=u+1|0}}function Pq(x,r){if(x.length-1<=r)return YH;var e=Pq(x,r+1|0),t=_N(x,r);return k(ar(JH),t,e)}function tp(x){x:{r:{for(var r=rl(gN);r;){e:{var e=r[2],t=r[1];try{var u=h(t,x)}catch{break e}if(u)break r}var r=e}var i=0;break x}var i=[0,u[1]]}if(i)return i[1];if(x===xN)return $H;if(x===QL)return WH;if(x[1]===WL){var c=x[2],v=c[3],s=c[2],l=c[1];return hs(ar(rN),l,s,v,v+5|0,QH)}if(x[1]===Nr){var p=x[2],d=p[3],T=p[2],b=p[1];return hs(ar(rN),b,T,d,d+6|0,ZH)}if(x[1]===Y6){var C=x[2],N=C[3],I=C[2],F=C[1];return hs(ar(rN),F,I,N,N+6|0,xV)}if(Ov(x)===0){var L=x.length-1,X=x[1][1];if(2<L>>>0)var q=Pq(x,2),J=_N(x,1),e0=k(ar(zH),J,q);else switch(L){case 0:var e0=KH;break;case 1:var e0=HH;break;default:var W=_N(x,1),e0=h(ar(VH),W)}var x0=[0,X,[0,e0]]}else var x0=[0,x[1],0];var i0=x0[2],f0=x0[1];return i0?Jx(f0,i0[1]):f0}function wN(x,r){var e=sJ(r),t=e.length-1-1|0,u=0;if(t>=0)for(var i=u;;){var c=N1(e,i)[1+i];let e0=i;var v=function(x0){return x0?e0===0?rV:eV:e0===0?tV:nV};if(c[0]===0){if(c[3]===c[6])var s=c[3],d=h(ar(uV),s);else var l=c[6],p=c[3],d=k(ar(aV),p,l);var T=c[7],b=c[4],C=c[8]?iV:cV,N=c[2],I=c[9],F=v(c[1]),X=[0,nz(ar(fV),F,I,N,C,d,b,T)]}else if(c[1])var X=0;else var L=v(0),X=[0,h(ar(sV),L)];if(X){var q=X[1];h(Sq(x,oV),q)}var J=i+1|0;if(t===i)break;var i=J}}function bN(x){for(;;){var r=rl(gN),e=1-ud(gN,r,[0,x,r]);if(!e)return e}}var vV=[0,tx,`(Cannot print locations:
bytecode executable program file not found)`,`(Cannot print locations:
bytecode executable program file appears to be corrupt)`,`(Cannot print locations:
bytecode executable program file has wrong magic number)`,`(Cannot print locations:
bytecode executable program file cannot be opened;
-- too many open files. Try running with OCAMLRUNPARAM=b=2)`].slice(),lV=[0,[11,xA,[2,0,[12,10,0]]],ZR],pV=[0],kV="Fatal error: out of memory in uncaught exception handler",mV=[0,[11,xA,[2,0,[12,10,0]]],ZR],dV=[0,[11,"Fatal error in uncaught exception handler: exception ",[2,0,[12,10,0]]],`Fatal error in uncaught exception handler: exception %s
`];ZC(Kj,function(x,r){try{try{var e=r?pV:DL(0);try{tN(j)}catch{}try{var t=tp(x);h(yN(lV),t),wN(Sn,e);var u=RJ(0);if(u<0){var i=Td(u);tq(N1(vV,i)[1+i])}var c=bn(Sn),v=c}catch(b){var s=X1(b),l=tp(x);h(yN(mV),l),wN(Sn,e);var p=tp(s);h(yN(dV),p),wN(Sn,DL(0));var v=bn(Sn)}var d=v}catch(b){var T=X1(b);if(T!==xN)throw z0(T,0);var d=tq(kV)}return d}catch{return 0}});var hV=[f1,"Stdlib.Fun.Finally_raised",Ca(0)],yV="Fun.Finally_raised: ";bN(function(x){return x[1]===hV?[0,Jx(yV,tp(x[2]))]:0});var gV="Digest.BLAKE2: wrong hash size";function TN(x){var r=x[1]<1?1:0,e=r||(64<x[1]?1:0);e&&X2(gV)}TN([0,16]),TN([0,32]),TN([0,64]);function Iq(x){var r=S2(x);return FJ(r,0,Ux(r))}var _V=mt(1,0,0),wV=mt(0,0,0),bV=mt(0,0,0),TV=mt(2,0,0),EV=mt(1,0,0);function Cq(x){return VY(7,0,[0,4])}function Nq(x,r,e,t,u){M6(x,0,qL(r,_V)),M6(x,1,e);var i=Nv(t,wV)?t:EV;M6(x,2,i);var c=Nv(u,bV)?u:TV;M6(x,3,c)}function Oq(x,r,e,t){var u=Cq(j);return Nq(u,x,r,e,t),u}var AV=mt(14371852,15349651,22696),SV=mt(12230193,11438743,35013),PV=mt(1424933,15549263,2083),IV=mt(9492471,4696708,SF);Oa([0,function(x){var r=dd(x),e=dd(x),t=dd(x);return Oq(r,e,t,dd(x))}],function(x){return Oq(IV,PV,SV,AV)});var jd=0,jq=-1,EN=[f1,"Stdlib.Format.String_tag",Ca(0)];function np(x,r){return x[13]=x[13]+r[3]|0,cN(r,x[28])}var Dq=1000000010;function CV(x,r){return x<=r?x:r}var NV=[f1,"Stdlib.Queue.Empty",Ca(0)],OV=[0,tx,0,tx],jV=tx,DV=tx,FV=tx,RV=tx,MV=[0,tx],LV=N_;function AN(x,r){return xx(x[17],r,0,Ux(r))}function Dd(x){return h(x[19],0)}function Fq(x,r,e){x[9]=x[9]-r|0,AN(x,e),x[11]=0}function Fd(x,r){var e=P(r,tx);return e&&Fq(x,Ux(r),r)}function Mv(x,r,e){var t=r[3],u=r[2];return Fd(x,r[1]),Dd(x),x[11]=1,x[10]=CV(x[8],(x[6]-e|0)+u|0),x[9]=x[6]-x[10]|0,h(x[21],x[10]),Fd(x,t)}function Rq(x,r){return Mv(x,OV,r)}function ml(x,r){var e=r[2],t=r[3];return Fd(x,r[1]),x[9]=x[9]-e|0,h(x[20],e),Fd(x,t)}function qV(x,r,e){if(typeof e=="number")switch(e){case 0:var t=ll(x[3]);if(!t)return;var u=t[1][1],i=function(Z0,N0){if(!N0)return[0,Z0,0];var ux=N0[1],ex=N0[2];return EJ(Z0,ux)?[0,Z0,N0]:[0,ux,i(Z0,ex)]};u[1]=i(x[6]-x[9]|0,u[1]);return;case 1:vl(x[2]);return;case 2:vl(x[3]);return;case 3:var c=ll(x[2]);return c?Rq(x,c[1][2]):Dd(x);case 4:var v=x[10]!==(x[6]-x[9]|0)?1:0;if(!v)return v;var s=x[28],l=s[2];if(l){var p=l[1];if(l[2]){var d=l[2];s[1]=s[1]-1|0,s[2]=d;var T=[0,p]}else{fN(s);var T=[0,p]}}else var T=0;if(!T)return;var b=T[1],C=b[1];x[12]=x[12]-b[3]|0,x[9]=x[9]+C|0;return;default:var N=vl(x[5]);return N?AN(x,h(x[25],N[1])):void 0}switch(e[0]){case 0:return Fq(x,r,e[1]);case 1:var I=e[2],F=e[1],L=I[1],X=I[2],q=ll(x[2]);if(!q)return;var J=q[1],e0=J[2];switch(J[1]){case 0:return ml(x,F);case 1:return Mv(x,I,e0);case 2:return Mv(x,I,e0);case 3:return x[9]<(r+Ux(L)|0)?Mv(x,I,e0):ml(x,F);case 4:return x[11]?ml(x,F):x[9]<(r+Ux(L)|0)||((x[6]-e0|0)+X|0)<x[10]?Mv(x,I,e0):ml(x,F);default:return ml(x,F)}case 2:var W=x[6]-x[9]|0,x0=e[2],i0=e[1],f0=ll(x[3]);if(!f0)return;var r0=f0[1][1],v0=r0[1];if(v0)for(var o0=r0[1],w0=v0[1];;){if(o0){var t0=o0[1],s0=o0[2];if(W>t0){var o0=s0;continue}var h0=t0}else var h0=w0;var p0=h0;break}else var p0=W;var C0=p0-W|0;return 0<=C0?ml(x,[0,DV,C0+i0|0,jV]):Mv(x,[0,RV,p0+x0|0,FV],x[6]);case 3:var j0=e[2],P0=e[1];if(x[8]<(x[6]-x[9]|0)){var M0=ll(x[2]);if(M0){var U0=M0[1],T0=U0[2],G0=U0[1];x[9]<T0&&3>=G0-1>>>0&&Rq(x,T0)}else Dd(x)}var k0=x[9]-P0|0,G=j0===1?1:x[9]<r?j0:5;return Fv([0,G,k0],x[2]);case 4:return Fv(e[1],x[3]);default:var S0=e[1];return AN(x,h(x[24],S0)),Fv(S0,x[5])}}function Mq(x){for(;;){var r=x[28][2],e=r?[0,r[1]]:0;if(!e)return;var t=e[1],u=t[1],i=0<=u?1:0,c=t[3],v=t[2],s=x[13]-x[12]|0,l=i||(x[9]<=s?1:0);if(!l)return l;var p=x[28],d=p[2];if(!d)throw z0(NV,1);if(d[2]){var T=d[2];p[1]=p[1]-1|0,p[2]=T}else fN(p);var b=0<=u?u:Dq;qV(x,b,v),x[12]=c+x[12]|0}}function Lq(x,r){return np(x,r),Mq(x)}function qq(x,r,e){return Lq(x,[0,r,[0,e],r])}function SN(x){return Z6(x),Fv([0,-1,[0,jq,MV,0]],x)}function PN(x,r){var e=ll(x[1]);if(e){var t=e[1],u=t[2],i=u[1];if(t[1]<x[12])return SN(x[1]);var c=u[2];if(typeof c!="number")switch(c[0]){case 3:1-r&&(u[1]=x[13]+i|0,vl(x[1]));return;case 1:case 2:r&&(u[1]=x[13]+i|0,vl(x[1]));return}}}function Uq(x,r,e){return np(x,e),r&&PN(x,1),Fv([0,x[13],e],x[1])}function Bq(x,r,e){if(x[14]=x[14]+1|0,x[14]<x[15])return Uq(x,0,[0,-x[13]|0,[3,r,e],0]);var t=x[14]===x[15]?1:0;if(!t)return t;var u=x[16];return qq(x,Ux(u),u)}function Xq(x,r){1<x[14]&&(x[14]<x[15]&&(np(x,[0,jd,1,0]),PN(x,1),PN(x,0)),x[14]=x[14]-1|0)}function Gq(x,r){if(x[23]&&np(x,[0,jd,5,0]),x[22]){var e=vl(x[4]);if(e)return h(x[27],e[1])}}function Yq(x,r){for(P2(function(e){return Gq(x,j)},x[4][1]);!(1>=x[14]);)Xq(x,j);return x[13]=Dq,Mq(x),r&&Dd(x),x[12]=1,x[13]=1,fN(x[28]),SN(x[1]),Z6(x[2]),Z6(x[3]),Z6(x[4]),Z6(x[5]),x[10]=0,x[14]=0,x[9]=x[6],Bq(x,0,3)}function IN(x,r,e){var t=x[14]<x[15]?1:0;return t&&qq(x,r,e)}function Jq(x,r,e){return IN(x,r,e)}function up(x,r){return Jq(x,1,Sd(1,r))}function Lv(x,r){return Yq(x,0),h(x[18],0)}function CN(x,r){retuLine truncated
`,an0=N_,sn0="unreachable regexp_class",on0=rD,vn0="unreachable regexp_body",ln0=tx,pn0=tx,kn0=tx,mn0=tx,dn0=FD,hn0="{'>'}",yn0=d6,gn0="{'}'}",_n0=jm,wn0=no,bn0=rT,Tn0=I8,En0=FD,An0=no,Sn0=rT,Pn0=I8,In0="unreachable type_token wholenumber",Cn0="unreachable type_token wholebigint",Nn0="unreachable type_token floatbigint",On0="unreachable type_token scinumber",jn0="unreachable type_token scibigint",Dn0="unreachable type_token hexnumber",Fn0="unreachable type_token hexbigint",Rn0="unreachable type_token legacyoctnumber",Mn0="unreachable type_token octnumber",Ln0="unreachable type_token octbigint",qn0="unreachable type_token binnumber",Un0="unreachable type_token bigbigint",Bn0="unreachable type_token",Xn0=CM,Gn0=[11,1],Yn0=[11,0],Jn0="unreachable template_tail",zn0=tx,Kn0=tx,Hn0="unreachable jsx_child",Vn0="unreachable jsx_tag",$n0=[0,MD],Wn0=[0,913],Qn0=[0,Zo],Zn0=[0,qI],x70=[0,AD],r70=[0,_I],e70=[0,8747],t70=[0,iy],n70=[0,916],u70=[0,8225],i70=[0,935],f70=[0,DM],c70=[0,914],a70=[0,wM],s70=[0,GF],o70=[0,AR],v70=[0,915],l70=[0,Yj],p70=[0,919],k70=[0,917],m70=[0,NM],d70=[0,aD],h70=[0,sF],y70=[0,924],g70=[0,923],_70=[0,922],w70=[0,PF],b70=[0,921],T70=[0,lR],E70=[0,Ik],A70=[0,mF],S70=[0,I5],P70=[0,927],I70=[0,937],C70=[0,oD],N70=[0,lF],O70=[0,bD],j70=[0,338],D70=[0,352],F70=[0,929],R70=[0,936],M70=[0,8243],L70=[0,928],q70=[0,934],U70=[0,WM],B70=[0,sD],X70=[0,933],G70=[0,SR],Y70=[0,vM],J70=[0,Sj],z70=[0,920],K70=[0,932],H70=[0,Hy],V70=[0,RD],$70=[0,nR],W70=[0,aF],Q70=[0,918],Z70=[0,376],xu0=[0,uR],ru0=[0,926],eu0=[0,NF],tu0=[0,zR],nu0=[0,925],uu0=[0,39],iu0=[0,8736],fu0=[0,8743],cu0=[0,38],au0=[0,945],su0=[0,8501],ou0=[0,Qo],vu0=[0,8226],lu0=[0,cD],pu0=[0,946],ku0=[0,8222],mu0=[0,Qj],du0=[0,FR],hu0=[0,8776],yu0=[0,PM],gu0=[0,8773],_u0=[0,9827],wu0=[0,Vj],bu0=[0,967],Tu0=[0,WR],Eu0=[0,E8],Au0=[0,Hj],Su0=[0,xR],Pu0=[0,8595],Iu0=[0,8224],Cu0=[0,8659],Nu0=[0,SD],Ou0=[0,8746],ju0=[0,8629],Du0=[0,LD],Fu0=[0,8745],Ru0=[0,8195],Mu0=[0,8709],Lu0=[0,Aj],qu0=[0,IM],Uu0=[0,yM],Bu0=[0,h4],Xu0=[0,9830],Gu0=[0,8707],Yu0=[0,8364],Ju0=[0,qR],zu0=[0,U3],Ku0=[0,951],Hu0=[0,8801],Vu0=[0,949],$u0=[0,8194],Wu0=[0,8805],Qu0=[0,947],Zu0=[0,8260],xi0=[0,tE],ri0=[0,wD],ei0=[0,_A],ti0=[0,8704],ni0=[0,ZF],ui0=[0,MM],ii0=[0,8230],fi0=[0,9829],ci0=[0,8596],ai0=[0,8660],si0=[0,62],oi0=[0,402],vi0=[0,948],li0=[0,_F],pi0=[0,Qy],ki0=[0,8712],mi0=[0,A8],di0=[0,953],hi0=[0,8734],yi0=[0,8465],gi0=[0,BR],_i0=[0,8220],wi0=[0,8968],bi0=[0,8592],Ti0=[0,yk],Ei0=[0,10216],Ai0=[0,955],Si0=[0,8656],Pi0=[0,954],Ii0=[0,60],Ci0=[0,8216],Ni0=[0,8249],Oi0=[0,YR],ji0=[0,9674],Di0=[0,8727],Fi0=[0,8970],Ri0=[0,GP],Mi0=[0,8711],Li0=[0,956],qi0=[0,8722],Ui0=[0,O4],Bi0=[0,rA],Xi0=[0,8212],Gi0=[0,VD],Yi0=[0,8804],Ji0=[0,957],zi0=[0,jF],Ki0=[0,8836],Hi0=[0,8713],Vi0=[0,dw],$i0=[0,8715],Wi0=[0,8800],Qi0=[0,8853],Zi0=[0,959],xf0=[0,969],rf0=[0,8254],ef0=[0,nM],tf0=[0,339],nf0=[0,fv],uf0=[0,QR],if0=[0,Fy],ff0=[0,z3],cf0=[0,8855],af0=[0,iE],sf0=[0,f1],of0=[0,AS],vf0=[0,U5],lf0=[0,x1],pf0=[0,kS],kf0=[0,982],mf0=[0,960],df0=[0,966],hf0=[0,8869],yf0=[0,8240],gf0=[0,8706],_f0=[0,8744],wf0=[0,8211],bf0=[0,10217],Tf0=[0,8730],Ef0=[0,8658],Af0=[0,34],Sf0=[0,968],Pf0=[0,8733],If0=[0,8719],Cf0=[0,961],Nf0=[0,8971],Of0=[0,$M],jf0=[0,8476],Df0=[0,8221],Ff0=[0,8969],Rf0=[0,8594],Mf0=[0,M4],Lf0=[0,MR],qf0=[0,IF],Uf0=[0,8901],Bf0=[0,353],Xf0=[0,8218],Gf0=[0,8217],Yf0=[0,8250],Jf0=[0,8835],zf0=[0,8721],Kf0=[0,8838],Hf0=[0,8834],Vf0=[0,9824],$f0=[0,8764],Wf0=[0,962],Qf0=[0,963],Zf0=[0,8207],xc0=[0,952],rc0=[0,8756],ec0=[0,964],tc0=[0,Ok],nc0=[0,8839],uc0=[0,iL],ic0=[0,PD],fc0=[0,Z3],cc0=[0,8657],ac0=[0,8482],sc0=[0,jg],oc0=[0,732],vc0=[0,M3],lc0=[0,8201],pc0=[0,977],kc0=[0,_R],mc0=[0,q3],dc0=[0,965],hc0=[0,978],yc0=[0,qM],gc0=[0,tA],_c0=[0,fL],wc0=[0,_D],bc0=[0,8205],Tc0=[0,950],Ec0=[0,pk],Ac0=[0,FF],Sc0=[0,_E],Pc0=[0,958],Ic0=[0,8593],Cc0=[0,Nj],Nc0=[0,8242],Oc0=[0,gM],jc0="unreachable regexp",Dc0="unreachable token wholenumber",Fc0="unreachable token wholebigint",Rc0="unreachable token floatbigint",Mc0="unreachable token scinumber",Lc0="unreachable token scibigint",qc0="unreachable token hexnumber",Uc0="unreachable token hexbigint",Bc0="unreachable token legacyoctnumber",Xc0="unreachable token legacynonoctnumber",Gc0="unreachable token octnumber",Yc0="unreachable token octbigint",Jc0="unreachable token bignumber",zc0="unreachable token bigint",Kc0="unreachable token",Hc0=CM,Vc0=[7,"#!"],$c0="expected ?",Wc0="unreachable string_escape",Qc0=Q2,Zc0=o6,xa0=o6,ra0=Q2,ea0=mI,ta0=UF,na0="n",ua0="r",ia0="t",fa0=eR,ca0=o6,aa0=no,sa0=no,oa0="unreachable id_char",va0=no,la0=no,pa0=o6,ka0=lM,ma0=Dj,da0=Kw,ha0=[27,"token ILLEGAL"],ya0=[0,[11,"the identifier `",[2,0,[12,96,0]]],"the identifier `%s`"],ga0=[0,1],_a0=[0,1],wa0=KF,ba0=KF,Ta0=[0,[11,"an identifier. When exporting a ",[2,0,[11," as a named export, you must specify a ",[2,0,[11," name. Did you mean `export default ",[2,0,[11," ...`?",0]]]]]]],"an identifier. When exporting a %s as a named export, you must specify a %s name. Did you mean `expLine truncated
\v\x07\f\r\x1B  ! "#$%                                                                                                                                                                                            Line truncated
\v\f\r\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x1B\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07 \x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07Line truncated
\v\f\r\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\xLine truncated
\v\f\r`,t+1|0)-1|0;if(14<u>>>0)var i=w(r);else switch(u){case 0:var i=0;break;case 1:var i=16;break;case 2:var i=15;break;case 3:H(r,15);var i=Re(y(r))===0?15:w(r);break;case 4:H(r,4);var i=te(y(r))===0?e(r):w(r);break;case 5:H(r,11);var i=te(y(r))===0?e(r):w(r);break;case 6:var i=0;break;case 7:var i=5;break;case 8:var i=6;break;case 9:var i=7;break;case 10:var i=8;break;case 11:var i=9;break;case 12:H(r,14);var c=Xv(y(r));if(c===0)var i=Er(y(r))===0&&Er(y(r))===0&&Er(y(r))===0?12:w(r);else if(c===1&&Er(y(r))===0){for(;;){var v=Bv(y(r));if(v!==0)break}var i=v===1?13:w(r)}else var i=w(r);break;case 13:var i=10;break;default:H(r,14);var i=Er(y(r))===0&&Er(y(r))===0?1:w(r)}if(16<i>>>0)return Sx(Wc0);switch(i){case 0:var s=Bx(r);return[0,x,s,m1(r),0];case 1:var l=Bx(r);return[0,x,l,[0,dt(Jx(Qc0,l))],0];case 2:var p=Bx(r),d=dt(Jx(Zc0,p));return k6<=d?[0,x,p,[0,d>>>3|0,48+(d&7)|0],1]:[0,x,p,[0,d],1];case 3:var T=Bx(r);return[0,x,T,[0,dt(Jx(xa0,T))],1];case 4:return[0,x,ra0,[0,0],0];case 5:return[0,x,ea0,[0,8],0];case 6:return[0,x,ta0,[0,12],0];case 7:return[0,x,na0,[0,10],0];case 8:return[0,x,ua0,[0,13],0];case 9:return[0,x,ia0,[0,9],0];case 10:return[0,x,fa0,[0,11],0];case 11:var b=Bx(r);return[0,x,b,[0,dt(Jx(ca0,b))],1];case 12:var C=Bx(r);return[0,x,C,[0,dt(Jx(aa0,I2(C,1,Ux(C)-1|0)))],0];case 13:var N=Bx(r),I=dt(Jx(sa0,I2(N,2,Ux(N)-3|0))),F=dk<I?_t(x,Hr(x,r)):x;return[0,F,N,[0,I],0];case 14:var L=Bx(r),X=m1(r);return[0,_t(x,Hr(x,r)),L,X,0];case 15:var q=Bx(r);return[0,ne(x,r),q,[0],0];default:var J=Bx(r);return[0,x,J,m1(r),0]}}function gB(x,r,e,t,u,i){for(var c=x,v=u;;){mr(i);var s=y(i),l=92<s?1:J0("",s+1|0)-1|0;if(4<l>>>0)var p=w(i);else switch(l){case 0:var p=3;break;case 1:for(;;){H(i,4);var d=y(i),T=-1<d?91<d?92<d?0:-1:J0("\0\0\0",d)-1|0:-1;if(T!==0)break}var p=w(i);break;case 2:var p=2;break;case 3:var p=0;break;default:var p=1}if(4<p>>>0)return Sx(un0);switch(p){case 0:var b=Bx(i);if(cr(t,b),Tr(r,b))return[0,c,Me(c,i),v];cr(e,b);break;case 1:cr(t,in0);var C=yB(c,i),N=C[4],I=C[3],F=C[2],L=C[1],X=N||v;cr(t,F),kq(function(w0){return ja(e,w0)},I);var c=L,v=X;break;case 2:var q=Bx(i);cr(t,q);var J=ne(_t(c,Hr(c,i)),i);return cr(e,q),[0,J,Me(J,i),v];case 3:var e0=Bx(i);cr(t,e0);var W=_t(c,Hr(c,i));return cr(e,e0),[0,W,Me(W,i),v];default:var x0=i[6],i0=i[3]-x0|0,f0=I1(i0*4|0),r0=fp(i[1],x0,i0,f0);oN(t,f0,0,r0),oN(e,f0,0,r0)}}}function _B(x,r,e,t){for(var u=x;;){mr(t);var i=y(t),c=96<i?1:J0("\x07",i+1|0)-1|0;if(6<c>>>0)var v=w(t);else switch(c){case 0:var v=0;break;case 1:for(;;){H(t,6);var s=y(t),l=-1<s?95<s?96<s?0:-1:J0("\0\0\0\0",s)-1|0:-1;if(l!==0)break}var v=w(t);break;case 2:var v=5;break;case 3:H(t,5);var v=Re(y(t))===0?4:w(t);break;case 4:H(t,6);var p=y(t),d=o1<p?pn<p?-1:0:-1,v=d===0?2:w(t);break;case 5:var v=3;break;default:var v=1}if(6<v>>>0)return Sx(fn0);switch(v){case 0:return[0,_t(u,Hr(u,t)),1];case 1:return[0,u,1];case 2:return[0,u,0];case 3:ht(e,92);var T=yB(u,t),b=T[3],C=T[1];cr(e,T[2]),kq(function(F){return ja(r,F)},b);var u=C;break;case 4:cr(e,cn0),cr(r,an0);var u=ne(u,t);break;case 5:cr(e,Bx(t)),ht(r,10);var u=ne(u,t);break;default:var N=Bx(t);cr(e,N),cr(r,N)}}}function NT0(x,r,e){for(var t=x;;){mr(e);var u=y(e),i=92<u?n2<u?1:m2<u?2:1:J0("\x07",u+1|0)-1|0;if(6<i>>>0)var c=w(e);else switch(i){case 0:var c=0;break;case 1:for(;;){H(e,7);var v=y(e),s=-1<v?90<v?92<v?m2<v?n2<v?0:-1:0:-1:J0("\0\0\0",v)-1|0:-1;if(s!==0)break}var c=w(e);break;case 2:var c=6;break;case 3:H(e,6);var c=Re(y(e))===0?6:w(e);break;case 4:if(H(e,4),HU(y(e))===0){for(;H(e,3),HU(y(e))===0;);var c=w(e)}else var c=w(e);break;case 5:var c=5;break;default:H(e,7);var l=y(e),p=-1<l?13<l?n2<l?0:m2<l?1:0:J0("",l)-1|0:-1;if(2<p>>>0)var c=w(e);else switch(p){case 0:var c=2;break;case 1:var c=1;break;default:H(e,1);var c=Re(y(e))===0?1:w(e)}}if(7<c>>>0)return Sx(vn0);switch(c){case 0:return[0,j2(t,Hr(t,e),lt),ln0];case 1:return[0,ne(j2(t,Hr(t,e),lt),e),pn0];case 2:cr(r,Bx(e));break;case 3:var d=Bx(e);return[0,t,I2(d,1,Ux(d)-1|0)];case 4:return[0,t,kn0];case 5:ht(r,91);x:{r:{e:{t:{n:for(;;){mr(e);var T=y(e),b=93<T?n2<T?1:m2<T?2:1:J0("",T+1|0)-1|0;if(5<b>>>0)var C=w(e);else switch(b){case 0:var C=0;break;case 1:for(;;){H(e,5);var N=y(e),I=-1<N?91<N?93<N?m2<N?n2<N?0:-1:0:-1:J0("\0\0",N)-1|0:-1;iLine truncated
`);return W0.length>1&&W0.every(bx=>bx.trimStart()[0]==="*")}var yj=new WeakMap;function RA0(a0){return yj.has(a0)||yj.set(a0,FA0(a0)),yj.get(a0)}var gj=RA0;function MA0(a0){if(a0.length<2)return;let W0;for(let bx=a0.length-1;bx>=0;bx--){let Yx=a0[bx];if(W0&&V2(Yx)===Pe(W0)&&gj(Yx)&&gj(W0)&&(a0.splice(bx+1,1),Yx.value+="*//*"+W0.value,Yx.range=[Pe(Yx),V2(W0)]),!dj(Yx)&&!I3(Yx))throw new TypeError(`Unknown comment type: "${Yx.type}".`);W0=Yx}}var _Y=MA0;var $p=null;function Wp(a0){if($p!==null&&typeof $p.property){let W0=$p;return $p=Wp.prototype=null,W0}return $p=Wp.prototype=a0??Object.create(null),new Wp}var LA0=10;for(let a0=0;a0<=LA0;a0++)Wp();function _j(a0){return Wp(a0)}function qA0(a0,W0="type"){_j(a0);function bx(Yx){let x1=Yx[W0],D1=a0[x1];if(!Array.isArray(D1))throw Object.assign(new Error(`Missing visitor keys for '${x1}'.`),{node:Yx});return D1}return bx}var wY=qA0;var bY={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","typeParameters","typeArguments","arguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","typeParameters","params","predicate","returnType","body"],FunctionExpression:["id","typeParameters","params","returnType","body"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","typeParameters","typeArguments","arguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["decorators","key","typeParameters","params","returnType","body"],ObjectProperty:["decorators","key","value"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],ClassBody:["body"],ClassExpression:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body","superTypeArguments"],ClassDeclaration:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],ImportExpression:["source","options"],MetaProperty:["meta","property"],ClassMethod:["decorators","key","typeParameters","params","returnType","body"],ObjectPattern:["decorators","properties","typeAnnotation"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","typeParameters","quasi","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","typeParameters","typeArguments","arguments"],ClassProperty:["decorators","variance","key","typeAnnotation","value"],ClassAccessorProperty:["decorators","key","typeAnnotation","value"],ClassPrivateProperty:["decorators","variance","key","typeAnnotation","value"],ClassPrivateMethod:["decorators","key","typeParameters","params","returnType","body"],PrivateName:["id"],StaticBlock:["body"],ImportAttribute:["key","value"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["idLine truncated
`;a0=Wl(!1,a0.replace(YA0,"").replace(GA0,""),HA0,"$1");let bx="";for(;bx!==a0;)bx=a0,a0=Wl(!1,a0,KA0,`${W0}$1 $2${W0}`);a0=a0.replace(IY,"").trimEnd();let Yx=Object.create(null),x1=Wl(!1,a0,CY,"").replace(IY,"").trimEnd(),D1;for(;D1=CY.exec(a0);){let Ie=Wl(!1,D1[2],zA0,"");if(typeof Yx[D1[1]]=="string"||Array.isArray(Yx[D1[1]])){let k2=Yx[D1[1]];Yx[D1[1]]=[...VA0,...Array.isArray(k2)?k2:[k2],Ie]}else Yx[D1[1]]=Ie}return{comments:x1,pragmas:Yx}}var jY=["noformat","noprettier"],DY=["format","prettier"];function $A0(a0){if(!a0.startsWith("#!"))return"";let W0=a0.indexOf(`
`);return W0===-1?a0:a0.slice(0,W0)}var FY=$A0;function RY(a0){let W0=FY(a0);W0&&(a0=a0.slice(W0.length+1));let bx=NY(a0),{pragmas:Yx,comments:x1}=OY(bx);return{shebang:W0,text:a0,pragmas:Yx,comments:x1}}function MY(a0){let{pragmas:W0}=RY(a0);return DY.some(bx=>Object.prototype.hasOwnProperty.call(W0,bx))}function LY(a0){let{pragmas:W0}=RY(a0);return jY.some(bx=>Object.prototype.hasOwnProperty.call(W0,bx))}function WA0(a0){return a0=typeof a0=="function"?{parse:a0}:a0,{astFormat:"estree",hasPragma:MY,hasIgnorePragma:LY,locStart:Pe,locEnd:V2,...a0}}var qY=WA0;var QA0={comments:!1,components:!0,enums:!0,esproposal_decorators:!0,esproposal_export_star_as:!0,tokens:!1};function ZA0(a0){let{message:W0,loc:bx}=a0;if(!bx)return a0;let{start:Yx,end:x1}=bx;return mY(W0,{loc:{start:{line:Yx.line,column:Yx.column+1},end:{line:x1.line,column:x1.column+1}},cause:a0})}function xS0(a0){let W0=UY.default.parse(a0,QA0),[bx]=W0.errors;if(bx)throw ZA0(bx);return PY(W0,{parser:"flow",text:a0})}var rS0=qY(xS0);return EA0(eS0);});
@@ -0,0 +1 @@
{"version":3,"file":"MaybeClassMetadata.d.ts","sourceRoot":"","sources":["../../../../src/metadata/models/MaybeClassMetadata.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAExE,MAAM,WAAW,kBAAkB;IACjC,oBAAoB,EAAE,yBAAyB,EAAE,CAAC;IAClD,SAAS,EAAE,sBAAsB,CAAC;IAClC,UAAU,EAAE,GAAG,CAAC,MAAM,GAAG,MAAM,EAAE,yBAAyB,CAAC,CAAC;IAC5D,KAAK,EAAE,YAAY,GAAG,SAAS,CAAC;CACjC"}
@@ -0,0 +1 @@
{"version":3,"file":"curryLazyBuildPlanServiceNodeFromResolvedValueElementMetadata.spec.d.ts","sourceRoot":"","sources":["../../../../src/planning/actions/curryLazyBuildPlanServiceNodeFromResolvedValueElementMetadata.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,386 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const scope_manager_1 = require("@typescript-eslint/scope-manager");
const utils_1 = require("@typescript-eslint/utils");
const util_1 = require("../util");
const explicitReturnTypeUtils_1 = require("../util/explicitReturnTypeUtils");
exports.default = (0, util_1.createRule)({
name: 'explicit-module-boundary-types',
meta: {
type: 'problem',
docs: {
description: "Require explicit return and argument types on exported functions' and classes' public class methods",
},
messages: {
anyTypedArg: "Argument '{{name}}' should be typed with a non-any type.",
anyTypedArgUnnamed: '{{type}} argument should be typed with a non-any type.',
missingArgType: "Argument '{{name}}' should be typed.",
missingArgTypeUnnamed: '{{type}} argument should be typed.',
missingReturnType: 'Missing return type on function.',
},
schema: [
{
type: 'object',
additionalProperties: false,
properties: {
allowArgumentsExplicitlyTypedAsAny: {
type: 'boolean',
description: 'Whether to ignore arguments that are explicitly typed as `any`.',
},
allowDirectConstAssertionInArrowFunctions: {
type: 'boolean',
description: [
'Whether to ignore return type annotations on body-less arrow functions that return an `as const` type assertion.',
'You must still type the parameters of the function.',
].join('\n'),
},
allowedNames: {
type: 'array',
description: 'An array of function/method names that will not have their arguments or return values checked.',
items: {
type: 'string',
},
},
allowHigherOrderFunctions: {
type: 'boolean',
description: [
'Whether to ignore return type annotations on functions immediately returning another function expression.',
'You must still type the parameters of the function.',
].join('\n'),
},
allowOverloadFunctions: {
type: 'boolean',
description: 'Whether to ignore return type annotations on functions with overload signatures.',
},
allowTypedFunctionExpressions: {
type: 'boolean',
description: 'Whether to ignore type annotations on the variable of a function expression.',
},
},
},
],
},
defaultOptions: [
{
allowArgumentsExplicitlyTypedAsAny: false,
allowDirectConstAssertionInArrowFunctions: true,
allowedNames: [],
allowHigherOrderFunctions: true,
allowOverloadFunctions: false,
allowTypedFunctionExpressions: true,
},
],
create(context, [options]) {
// tracks all of the functions we've already checked
const checkedFunctions = new Set();
const functionStack = [];
const functionReturnsMap = new Map();
// all nodes visited, avoids infinite recursion for cyclic references
// (such as class member referring to itself)
const alreadyVisited = new Set();
function getReturnsInFunction(node) {
return functionReturnsMap.get(node) ?? [];
}
function enterFunction(node) {
functionStack.push(node);
functionReturnsMap.set(node, []);
}
function exitFunction() {
functionStack.pop();
}
/*
# How the rule works:
As the rule traverses the AST, it immediately checks every single function that it finds is exported.
"exported" means that it is either directly exported, or that its name is exported.
It also collects a list of every single function it finds on the way, but does not check them.
After it's finished traversing the AST, it then iterates through the list of found functions, and checks to see if
any of them are part of a higher-order function
*/
return {
'ArrowFunctionExpression, FunctionDeclaration, FunctionExpression': enterFunction,
'ArrowFunctionExpression:exit': exitFunction,
'ExportDefaultDeclaration:exit'(node) {
checkNode(node.declaration);
},
'ExportNamedDeclaration:not([source]):exit'(node) {
if (node.declaration) {
checkNode(node.declaration);
}
else {
for (const specifier of node.specifiers) {
followReference(specifier.local);
}
}
},
'FunctionDeclaration:exit': exitFunction,
'FunctionExpression:exit': exitFunction,
'Program:exit'() {
for (const [node, returns] of functionReturnsMap) {
if (isExportedHigherOrderFunction({ node, returns })) {
checkNode(node);
}
}
},
ReturnStatement(node) {
const current = functionStack[functionStack.length - 1];
functionReturnsMap.get(current)?.push(node);
},
'TSExportAssignment:exit'(node) {
checkNode(node.expression);
},
};
function checkParameters(node) {
function checkParameter(param) {
function report(namedMessageId, unnamedMessageId) {
if (param.type === utils_1.AST_NODE_TYPES.Identifier) {
context.report({
node: param,
messageId: namedMessageId,
data: { name: param.name },
});
}
else if (param.type === utils_1.AST_NODE_TYPES.ArrayPattern) {
context.report({
node: param,
messageId: unnamedMessageId,
data: { type: 'Array pattern' },
});
}
else if (param.type === utils_1.AST_NODE_TYPES.ObjectPattern) {
context.report({
node: param,
messageId: unnamedMessageId,
data: { type: 'Object pattern' },
});
}
else if (param.type === utils_1.AST_NODE_TYPES.RestElement) {
if (param.argument.type === utils_1.AST_NODE_TYPES.Identifier) {
context.report({
node: param,
messageId: namedMessageId,
data: { name: param.argument.name },
});
}
else {
context.report({
node: param,
messageId: unnamedMessageId,
data: { type: 'Rest' },
});
}
}
}
switch (param.type) {
case utils_1.AST_NODE_TYPES.ArrayPattern:
case utils_1.AST_NODE_TYPES.Identifier:
case utils_1.AST_NODE_TYPES.ObjectPattern:
case utils_1.AST_NODE_TYPES.RestElement:
if (!param.typeAnnotation) {
report('missingArgType', 'missingArgTypeUnnamed');
}
else if (options.allowArgumentsExplicitlyTypedAsAny !== true &&
param.typeAnnotation.typeAnnotation.type ===
utils_1.AST_NODE_TYPES.TSAnyKeyword) {
report('anyTypedArg', 'anyTypedArgUnnamed');
}
return;
case utils_1.AST_NODE_TYPES.TSParameterProperty:
return checkParameter(param.parameter);
case utils_1.AST_NODE_TYPES.AssignmentPattern: // ignored as it has a type via its assignment
return;
}
}
for (const arg of node.params) {
checkParameter(arg);
}
}
/**
* Checks if a function name is allowed and should not be checked.
*/
function isAllowedName(node) {
if (!node || !options.allowedNames || options.allowedNames.length === 0) {
return false;
}
if (node.type === utils_1.AST_NODE_TYPES.VariableDeclarator ||
node.type === utils_1.AST_NODE_TYPES.FunctionDeclaration) {
return (node.id?.type === utils_1.AST_NODE_TYPES.Identifier &&
options.allowedNames.includes(node.id.name));
}
if (node.type === utils_1.AST_NODE_TYPES.MethodDefinition ||
node.type === utils_1.AST_NODE_TYPES.TSAbstractMethodDefinition ||
(node.type === utils_1.AST_NODE_TYPES.Property && node.method) ||
node.type === utils_1.AST_NODE_TYPES.PropertyDefinition ||
node.type === utils_1.AST_NODE_TYPES.AccessorProperty) {
return (0, util_1.isStaticMemberAccessOfValue)(node, context, ...options.allowedNames);
}
return false;
}
function isExportedHigherOrderFunction({ node, }) {
let current = node.parent;
while (current) {
if (current.type === utils_1.AST_NODE_TYPES.ReturnStatement) {
// the parent of a return will always be a block statement, so we can skip over it
current = current.parent.parent;
continue;
}
if (!(0, util_1.isFunction)(current)) {
return false;
}
const returns = getReturnsInFunction(current);
if (!(0, explicitReturnTypeUtils_1.doesImmediatelyReturnFunctionExpression)({ node: current, returns })) {
return false;
}
if (checkedFunctions.has(current)) {
return true;
}
current = current.parent;
}
return false;
}
function followReference(node) {
const scope = context.sourceCode.getScope(node);
const variable = scope.set.get(node.name);
/* istanbul ignore if */ if (!variable) {
return;
}
// check all of the definitions
for (const definition of variable.defs) {
// cases we don't care about in this rule
if ([
scope_manager_1.DefinitionType.CatchClause,
scope_manager_1.DefinitionType.ImplicitGlobalVariable,
scope_manager_1.DefinitionType.ImportBinding,
scope_manager_1.DefinitionType.Parameter,
].includes(definition.type)) {
continue;
}
checkNode(definition.node);
}
// follow references to find writes to the variable
for (const reference of variable.references) {
if (
// we don't want to check the initialization ref, as this is handled by the declaration check
!reference.init &&
reference.writeExpr) {
checkNode(reference.writeExpr);
}
}
}
function checkNode(node) {
if (node == null || alreadyVisited.has(node)) {
return;
}
alreadyVisited.add(node);
switch (node.type) {
case utils_1.AST_NODE_TYPES.ArrowFunctionExpression:
case utils_1.AST_NODE_TYPES.FunctionExpression: {
const returns = getReturnsInFunction(node);
return checkFunctionExpression({ node, returns });
}
case utils_1.AST_NODE_TYPES.ArrayExpression:
for (const element of node.elements) {
checkNode(element);
}
return;
case utils_1.AST_NODE_TYPES.PropertyDefinition:
case utils_1.AST_NODE_TYPES.AccessorProperty:
case utils_1.AST_NODE_TYPES.MethodDefinition:
case utils_1.AST_NODE_TYPES.TSAbstractMethodDefinition:
if (node.accessibility === 'private' ||
node.key.type === utils_1.AST_NODE_TYPES.PrivateIdentifier) {
return;
}
return checkNode(node.value);
case utils_1.AST_NODE_TYPES.ClassDeclaration:
case utils_1.AST_NODE_TYPES.ClassExpression:
for (const element of node.body.body) {
checkNode(element);
}
return;
case utils_1.AST_NODE_TYPES.FunctionDeclaration: {
const returns = getReturnsInFunction(node);
return checkFunction({ node, returns });
}
case utils_1.AST_NODE_TYPES.Identifier:
return followReference(node);
case utils_1.AST_NODE_TYPES.ObjectExpression:
for (const property of node.properties) {
checkNode(property);
}
return;
case utils_1.AST_NODE_TYPES.Property:
return checkNode(node.value);
case utils_1.AST_NODE_TYPES.TSEmptyBodyFunctionExpression:
return checkEmptyBodyFunctionExpression(node);
case utils_1.AST_NODE_TYPES.VariableDeclaration:
for (const declaration of node.declarations) {
checkNode(declaration);
}
return;
case utils_1.AST_NODE_TYPES.VariableDeclarator:
return checkNode(node.init);
}
}
function checkEmptyBodyFunctionExpression(node) {
const isConstructor = node.parent.type === utils_1.AST_NODE_TYPES.MethodDefinition &&
node.parent.kind === 'constructor';
const isSetAccessor = (node.parent.type === utils_1.AST_NODE_TYPES.TSAbstractMethodDefinition ||
node.parent.type === utils_1.AST_NODE_TYPES.MethodDefinition) &&
node.parent.kind === 'set';
if (!isConstructor && !isSetAccessor && !node.returnType) {
context.report({
node,
messageId: 'missingReturnType',
});
}
checkParameters(node);
}
function checkFunctionExpression({ node, returns, }) {
if (checkedFunctions.has(node)) {
return;
}
checkedFunctions.add(node);
if (isAllowedName(node.parent) ||
(0, explicitReturnTypeUtils_1.isTypedFunctionExpression)(node, options) ||
(0, explicitReturnTypeUtils_1.ancestorHasReturnType)(node)) {
return;
}
if (options.allowOverloadFunctions &&
node.parent.type === utils_1.AST_NODE_TYPES.MethodDefinition &&
(0, util_1.hasOverloadSignatures)(node.parent, context)) {
return;
}
(0, explicitReturnTypeUtils_1.checkFunctionExpressionReturnType)({ node, returns }, options, context.sourceCode, loc => {
context.report({
loc,
node,
messageId: 'missingReturnType',
});
});
checkParameters(node);
}
function checkFunction({ node, returns, }) {
if (checkedFunctions.has(node)) {
return;
}
checkedFunctions.add(node);
if (isAllowedName(node) || (0, explicitReturnTypeUtils_1.ancestorHasReturnType)(node)) {
return;
}
if (options.allowOverloadFunctions &&
(0, util_1.hasOverloadSignatures)(node, context)) {
return;
}
(0, explicitReturnTypeUtils_1.checkFunctionReturnType)({ node, returns }, options, context.sourceCode, loc => {
context.report({
loc,
node,
messageId: 'missingReturnType',
});
});
checkParameters(node);
}
},
});
@@ -0,0 +1 @@
{"version":3,"file":"getClassMetadata.js","sourceRoot":"","sources":["../../../../src/metadata/calculations/getClassMetadata.ts"],"names":[],"mappings":";;AAUA,4CAYC;AArBD,gFAA4E;AAE5E,gGAA6F;AAE7F,uEAAoE;AACpE,qEAAkE;AAClE,+EAA4E;AAC5E,yFAAsF;AAEtF,SAAgB,gBAAgB,CAAC,IAAa;IAC5C,MAAM,aAAa,GACjB,IAAA,8CAAqB,EAAC,IAAI,EAAE,iDAAuB,CAAC;QACpD,IAAA,iDAAuB,GAAE,CAAC;IAE5B,IAAI,IAAA,+CAAsB,EAAC,IAAI,CAAC,EAAE,CAAC;QACjC,IAAA,yDAA2B,EAAC,IAAI,EAAE,aAAa,CAAC,CAAC;IACnD,CAAC;SAAM,CAAC;QACN,IAAA,mEAAgC,EAAC,IAAI,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;QAE3E,OAAO,aAAa,CAAC;IACvB,CAAC;AACH,CAAC"}
@@ -0,0 +1,46 @@
var baseFindIndex = require('./_baseFindIndex'),
baseIsNaN = require('./_baseIsNaN'),
strictLastIndexOf = require('./_strictLastIndexOf'),
toInteger = require('./toInteger');
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMax = Math.max,
nativeMin = Math.min;
/**
* This method is like `_.indexOf` except that it iterates over elements of
* `array` from right to left.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {Array} array The array to inspect.
* @param {*} value The value to search for.
* @param {number} [fromIndex=array.length-1] The index to search from.
* @returns {number} Returns the index of the matched value, else `-1`.
* @example
*
* _.lastIndexOf([1, 2, 1, 2], 2);
* // => 3
*
* // Search from the `fromIndex`.
* _.lastIndexOf([1, 2, 1, 2], 2, 2);
* // => 1
*/
function lastIndexOf(array, value, fromIndex) {
var length = array == null ? 0 : array.length;
if (!length) {
return -1;
}
var index = length;
if (fromIndex !== undefined) {
index = toInteger(fromIndex);
index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
}
return value === value
? strictLastIndexOf(array, value, index)
: baseFindIndex(array, baseIsNaN, index, true);
}
module.exports = lastIndexOf;
@@ -0,0 +1,180 @@
var $625ad1e1f4c43bc1$exports = require("./CalendarDate.main.js");
var $4ae0260a69729f1d$exports = require("./conversion.main.js");
var $1f0f7ebf1ae6c530$exports = require("./queries.main.js");
var $af14c9812fdceb33$exports = require("./GregorianCalendar.main.js");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "parseTime", () => $4c32e2d98e5a5134$export$c9698ec7f05a07e1);
$parcel$export(module.exports, "parseDate", () => $4c32e2d98e5a5134$export$6b862160d295c8e);
$parcel$export(module.exports, "parseDateTime", () => $4c32e2d98e5a5134$export$588937bcd60ade55);
$parcel$export(module.exports, "parseZonedDateTime", () => $4c32e2d98e5a5134$export$fd7893f06e92a6a4);
$parcel$export(module.exports, "dateTimeToString", () => $4c32e2d98e5a5134$export$4223de14708adc63);
$parcel$export(module.exports, "parseAbsolute", () => $4c32e2d98e5a5134$export$5adfdab05168c219);
$parcel$export(module.exports, "parseAbsoluteToLocal", () => $4c32e2d98e5a5134$export$8e384432362ed0f0);
$parcel$export(module.exports, "timeToString", () => $4c32e2d98e5a5134$export$f59dee82248f5ad4);
$parcel$export(module.exports, "dateToString", () => $4c32e2d98e5a5134$export$60dfd74aa96791bd);
$parcel$export(module.exports, "zonedDateTimeToString", () => $4c32e2d98e5a5134$export$bf79f1ebf4b18792);
$parcel$export(module.exports, "parseDuration", () => $4c32e2d98e5a5134$export$ecae829bb3747ea6);
/*
* 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 $4c32e2d98e5a5134$var$TIME_RE = /^(\d{2})(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/;
const $4c32e2d98e5a5134$var$DATE_RE = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/;
const $4c32e2d98e5a5134$var$DATE_TIME_RE = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/;
const $4c32e2d98e5a5134$var$ZONED_DATE_TIME_RE = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:([+-]\d{2})(?::?(\d{2}))?)?\[(.*?)\]$/;
const $4c32e2d98e5a5134$var$ABSOLUTE_RE = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;
const $4c32e2d98e5a5134$var$DATE_TIME_DURATION_RE = /^((?<negative>-)|\+)?P((?<years>\d*)Y)?((?<months>\d*)M)?((?<weeks>\d*)W)?((?<days>\d*)D)?((?<time>T)((?<hours>\d*[.,]?\d{1,9})H)?((?<minutes>\d*[.,]?\d{1,9})M)?((?<seconds>\d*[.,]?\d{1,9})S)?)?$/;
const $4c32e2d98e5a5134$var$requiredDurationTimeGroups = [
'hours',
'minutes',
'seconds'
];
const $4c32e2d98e5a5134$var$requiredDurationGroups = [
'years',
'months',
'weeks',
'days',
...$4c32e2d98e5a5134$var$requiredDurationTimeGroups
];
function $4c32e2d98e5a5134$export$c9698ec7f05a07e1(value) {
let m = value.match($4c32e2d98e5a5134$var$TIME_RE);
if (!m) throw new Error('Invalid ISO 8601 time string: ' + value);
return new (0, $625ad1e1f4c43bc1$exports.Time)($4c32e2d98e5a5134$var$parseNumber(m[1], 0, 23), m[2] ? $4c32e2d98e5a5134$var$parseNumber(m[2], 0, 59) : 0, m[3] ? $4c32e2d98e5a5134$var$parseNumber(m[3], 0, 59) : 0, m[4] ? $4c32e2d98e5a5134$var$parseNumber(m[4], 0, Infinity) * 1000 : 0);
}
function $4c32e2d98e5a5134$export$6b862160d295c8e(value) {
let m = value.match($4c32e2d98e5a5134$var$DATE_RE);
if (!m) throw new Error('Invalid ISO 8601 date string: ' + value);
let date = new (0, $625ad1e1f4c43bc1$exports.CalendarDate)($4c32e2d98e5a5134$var$parseNumber(m[1], 0, 9999), $4c32e2d98e5a5134$var$parseNumber(m[2], 1, 12), 1);
date.day = $4c32e2d98e5a5134$var$parseNumber(m[3], 0, date.calendar.getDaysInMonth(date));
return date;
}
function $4c32e2d98e5a5134$export$588937bcd60ade55(value) {
let m = value.match($4c32e2d98e5a5134$var$DATE_TIME_RE);
if (!m) throw new Error('Invalid ISO 8601 date time string: ' + value);
let year = $4c32e2d98e5a5134$var$parseNumber(m[1], -9999, 9999);
let era = year < 1 ? 'BC' : 'AD';
let date = new (0, $625ad1e1f4c43bc1$exports.CalendarDateTime)(era, year < 1 ? -year + 1 : year, $4c32e2d98e5a5134$var$parseNumber(m[2], 1, 12), 1, m[4] ? $4c32e2d98e5a5134$var$parseNumber(m[4], 0, 23) : 0, m[5] ? $4c32e2d98e5a5134$var$parseNumber(m[5], 0, 59) : 0, m[6] ? $4c32e2d98e5a5134$var$parseNumber(m[6], 0, 59) : 0, m[7] ? $4c32e2d98e5a5134$var$parseNumber(m[7], 0, Infinity) * 1000 : 0);
date.day = $4c32e2d98e5a5134$var$parseNumber(m[3], 0, date.calendar.getDaysInMonth(date));
return date;
}
function $4c32e2d98e5a5134$export$fd7893f06e92a6a4(value, disambiguation) {
let m = value.match($4c32e2d98e5a5134$var$ZONED_DATE_TIME_RE);
if (!m) throw new Error('Invalid ISO 8601 date time string: ' + value);
let year = $4c32e2d98e5a5134$var$parseNumber(m[1], -9999, 9999);
let era = year < 1 ? 'BC' : 'AD';
let date = new (0, $625ad1e1f4c43bc1$exports.ZonedDateTime)(era, year < 1 ? -year + 1 : year, $4c32e2d98e5a5134$var$parseNumber(m[2], 1, 12), 1, m[10], 0, m[4] ? $4c32e2d98e5a5134$var$parseNumber(m[4], 0, 23) : 0, m[5] ? $4c32e2d98e5a5134$var$parseNumber(m[5], 0, 59) : 0, m[6] ? $4c32e2d98e5a5134$var$parseNumber(m[6], 0, 59) : 0, m[7] ? $4c32e2d98e5a5134$var$parseNumber(m[7], 0, Infinity) * 1000 : 0);
date.day = $4c32e2d98e5a5134$var$parseNumber(m[3], 0, date.calendar.getDaysInMonth(date));
let plainDateTime = (0, $4ae0260a69729f1d$exports.toCalendarDateTime)(date);
let ms;
if (m[8]) {
var _m_;
date.offset = $4c32e2d98e5a5134$var$parseNumber(m[8], -23, 23) * 3600000 + $4c32e2d98e5a5134$var$parseNumber((_m_ = m[9]) !== null && _m_ !== void 0 ? _m_ : '0', 0, 59) * 60000;
ms = (0, $4ae0260a69729f1d$exports.epochFromDate)(date) - date.offset;
// Validate offset against parsed date.
let absolutes = (0, $4ae0260a69729f1d$exports.possibleAbsolutes)(plainDateTime, date.timeZone);
if (!absolutes.includes(ms)) throw new Error(`Offset ${$4c32e2d98e5a5134$var$offsetToString(date.offset)} is invalid for ${$4c32e2d98e5a5134$export$4223de14708adc63(date)} in ${date.timeZone}`);
} else // Convert to absolute and back to fix invalid times due to DST.
ms = (0, $4ae0260a69729f1d$exports.toAbsolute)((0, $4ae0260a69729f1d$exports.toCalendarDateTime)(plainDateTime), date.timeZone, disambiguation);
return (0, $4ae0260a69729f1d$exports.fromAbsolute)(ms, date.timeZone);
}
function $4c32e2d98e5a5134$export$5adfdab05168c219(value, timeZone) {
let m = value.match($4c32e2d98e5a5134$var$ABSOLUTE_RE);
if (!m) throw new Error('Invalid ISO 8601 date time string: ' + value);
let year = $4c32e2d98e5a5134$var$parseNumber(m[1], -9999, 9999);
let era = year < 1 ? 'BC' : 'AD';
let date = new (0, $625ad1e1f4c43bc1$exports.ZonedDateTime)(era, year < 1 ? -year + 1 : year, $4c32e2d98e5a5134$var$parseNumber(m[2], 1, 12), 1, timeZone, 0, m[4] ? $4c32e2d98e5a5134$var$parseNumber(m[4], 0, 23) : 0, m[5] ? $4c32e2d98e5a5134$var$parseNumber(m[5], 0, 59) : 0, m[6] ? $4c32e2d98e5a5134$var$parseNumber(m[6], 0, 59) : 0, m[7] ? $4c32e2d98e5a5134$var$parseNumber(m[7], 0, Infinity) * 1000 : 0);
date.day = $4c32e2d98e5a5134$var$parseNumber(m[3], 0, date.calendar.getDaysInMonth(date));
var _m_;
if (m[8]) date.offset = $4c32e2d98e5a5134$var$parseNumber(m[8], -23, 23) * 3600000 + $4c32e2d98e5a5134$var$parseNumber((_m_ = m[9]) !== null && _m_ !== void 0 ? _m_ : '0', 0, 59) * 60000;
return (0, $4ae0260a69729f1d$exports.toTimeZone)(date, timeZone);
}
function $4c32e2d98e5a5134$export$8e384432362ed0f0(value) {
return $4c32e2d98e5a5134$export$5adfdab05168c219(value, (0, $1f0f7ebf1ae6c530$exports.getLocalTimeZone)());
}
function $4c32e2d98e5a5134$var$parseNumber(value, min, max) {
let val = Number(value);
if (val < min || val > max) throw new RangeError(`Value out of range: ${min} <= ${val} <= ${max}`);
return val;
}
function $4c32e2d98e5a5134$export$f59dee82248f5ad4(time) {
return `${String(time.hour).padStart(2, '0')}:${String(time.minute).padStart(2, '0')}:${String(time.second).padStart(2, '0')}${time.millisecond ? String(time.millisecond / 1000).slice(1) : ''}`;
}
function $4c32e2d98e5a5134$export$60dfd74aa96791bd(date) {
let gregorianDate = (0, $4ae0260a69729f1d$exports.toCalendar)(date, new (0, $af14c9812fdceb33$exports.GregorianCalendar)());
let year;
if (gregorianDate.era === 'BC') year = gregorianDate.year === 1 ? '0000' : '-' + String(Math.abs(1 - gregorianDate.year)).padStart(6, '00');
else year = String(gregorianDate.year).padStart(4, '0');
return `${year}-${String(gregorianDate.month).padStart(2, '0')}-${String(gregorianDate.day).padStart(2, '0')}`;
}
function $4c32e2d98e5a5134$export$4223de14708adc63(date) {
// @ts-ignore
return `${$4c32e2d98e5a5134$export$60dfd74aa96791bd(date)}T${$4c32e2d98e5a5134$export$f59dee82248f5ad4(date)}`;
}
function $4c32e2d98e5a5134$var$offsetToString(offset) {
let sign = Math.sign(offset) < 0 ? '-' : '+';
offset = Math.abs(offset);
let offsetHours = Math.floor(offset / 3600000);
let offsetMinutes = offset % 3600000 / 60000;
return `${sign}${String(offsetHours).padStart(2, '0')}:${String(offsetMinutes).padStart(2, '0')}`;
}
function $4c32e2d98e5a5134$export$bf79f1ebf4b18792(date) {
return `${$4c32e2d98e5a5134$export$4223de14708adc63(date)}${$4c32e2d98e5a5134$var$offsetToString(date.offset)}[${date.timeZone}]`;
}
function $4c32e2d98e5a5134$export$ecae829bb3747ea6(value) {
var _match_groups, _match_groups1, _match_groups2, _match_groups3, _match_groups4, _match_groups5, _match_groups6, _match_groups7, _match_groups8;
const match = value.match($4c32e2d98e5a5134$var$DATE_TIME_DURATION_RE);
if (!match) throw new Error(`Invalid ISO 8601 Duration string: ${value}`);
const parseDurationGroup = (group, isNegative, min, max)=>{
if (!group) return 0;
try {
const sign = isNegative ? -1 : 1;
return sign * $4c32e2d98e5a5134$var$parseNumber(group.replace(',', '.'), min, max);
} catch {
throw new Error(`Invalid ISO 8601 Duration string: ${value}`);
}
};
const isNegative = !!((_match_groups = match.groups) === null || _match_groups === void 0 ? void 0 : _match_groups.negative);
const hasRequiredGroups = $4c32e2d98e5a5134$var$requiredDurationGroups.some((group)=>{
var _match_groups;
return (_match_groups = match.groups) === null || _match_groups === void 0 ? void 0 : _match_groups[group];
});
if (!hasRequiredGroups) throw new Error(`Invalid ISO 8601 Duration string: ${value}`);
const durationStringIncludesTime = (_match_groups1 = match.groups) === null || _match_groups1 === void 0 ? void 0 : _match_groups1.time;
if (durationStringIncludesTime) {
const hasRequiredDurationTimeGroups = $4c32e2d98e5a5134$var$requiredDurationTimeGroups.some((group)=>{
var _match_groups;
return (_match_groups = match.groups) === null || _match_groups === void 0 ? void 0 : _match_groups[group];
});
if (!hasRequiredDurationTimeGroups) throw new Error(`Invalid ISO 8601 Duration string: ${value}`);
}
const duration = {
years: parseDurationGroup((_match_groups2 = match.groups) === null || _match_groups2 === void 0 ? void 0 : _match_groups2.years, isNegative, 0, 9999),
months: parseDurationGroup((_match_groups3 = match.groups) === null || _match_groups3 === void 0 ? void 0 : _match_groups3.months, isNegative, 0, 12),
weeks: parseDurationGroup((_match_groups4 = match.groups) === null || _match_groups4 === void 0 ? void 0 : _match_groups4.weeks, isNegative, 0, Infinity),
days: parseDurationGroup((_match_groups5 = match.groups) === null || _match_groups5 === void 0 ? void 0 : _match_groups5.days, isNegative, 0, 31),
hours: parseDurationGroup((_match_groups6 = match.groups) === null || _match_groups6 === void 0 ? void 0 : _match_groups6.hours, isNegative, 0, 23),
minutes: parseDurationGroup((_match_groups7 = match.groups) === null || _match_groups7 === void 0 ? void 0 : _match_groups7.minutes, isNegative, 0, 59),
seconds: parseDurationGroup((_match_groups8 = match.groups) === null || _match_groups8 === void 0 ? void 0 : _match_groups8.seconds, isNegative, 0, 59)
};
if (duration.hours !== undefined && duration.hours % 1 !== 0 && (duration.minutes || duration.seconds)) throw new Error(`Invalid ISO 8601 Duration string: ${value} - only the smallest unit can be fractional`);
if (duration.minutes !== undefined && duration.minutes % 1 !== 0 && duration.seconds) throw new Error(`Invalid ISO 8601 Duration string: ${value} - only the smallest unit can be fractional`);
return duration;
}
//# sourceMappingURL=string.main.js.map
@@ -0,0 +1,20 @@
type JsOptions = {
type: 'js';
js?: Partial<HTMLScriptElement>;
keepWhenUnused?: boolean;
};
type CssOptions = {
type: 'css';
css?: Partial<HTMLStyleElement>;
keepWhenUnused?: boolean;
};
type DefaultOptions = {
type?: never;
js?: Partial<HTMLScriptElement>;
css?: Partial<HTMLStyleElement>;
keepWhenUnused?: boolean;
};
export type Options = JsOptions | CssOptions | DefaultOptions;
export type Status = 'unset' | 'loading' | 'ready' | 'error';
declare const useExternal: (path?: string, options?: Options) => Status;
export default useExternal;
@@ -0,0 +1,24 @@
# @heroui/use-aria-link
A Quick description of the component
> This is an internal utility, not intended for public usage.
## Installation
```sh
yarn add @heroui/use-aria-link
# or
npm i @heroui/use-aria-link
```
## Contribution
Yes please! See the
[contributing guidelines](https://github.com/frontio-ai/heroui/blob/master/CONTRIBUTING.md)
for details.
## License
This project is licensed under the terms of the
[MIT license](https://github.com/frontio-ai/heroui/blob/master/LICENSE).
@@ -0,0 +1,589 @@
// 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.
//
// Implementation of Brotli compressor.
#include "./encode.h"
#include <algorithm>
#include <limits>
#include "./backward_references.h"
#include "./bit_cost.h"
#include "./block_splitter.h"
#include "./brotli_bit_stream.h"
#include "./cluster.h"
#include "./context.h"
#include "./metablock.h"
#include "./transform.h"
#include "./entropy_encode.h"
#include "./fast_log.h"
#include "./hash.h"
#include "./histogram.h"
#include "./literal_cost.h"
#include "./prefix.h"
#include "./write_bits.h"
namespace brotli {
static const double kMinUTF8Ratio = 0.75;
int ParseAsUTF8(int* symbol, const uint8_t* input, int size) {
// ASCII
if ((input[0] & 0x80) == 0) {
*symbol = input[0];
if (*symbol > 0) {
return 1;
}
}
// 2-byte UTF8
if (size > 1 &&
(input[0] & 0xe0) == 0xc0 &&
(input[1] & 0xc0) == 0x80) {
*symbol = (((input[0] & 0x1f) << 6) |
(input[1] & 0x3f));
if (*symbol > 0x7f) {
return 2;
}
}
// 3-byte UFT8
if (size > 2 &&
(input[0] & 0xf0) == 0xe0 &&
(input[1] & 0xc0) == 0x80 &&
(input[2] & 0xc0) == 0x80) {
*symbol = (((input[0] & 0x0f) << 12) |
((input[1] & 0x3f) << 6) |
(input[2] & 0x3f));
if (*symbol > 0x7ff) {
return 3;
}
}
// 4-byte UFT8
if (size > 3 &&
(input[0] & 0xf8) == 0xf0 &&
(input[1] & 0xc0) == 0x80 &&
(input[2] & 0xc0) == 0x80 &&
(input[3] & 0xc0) == 0x80) {
*symbol = (((input[0] & 0x07) << 18) |
((input[1] & 0x3f) << 12) |
((input[2] & 0x3f) << 6) |
(input[3] & 0x3f));
if (*symbol > 0xffff && *symbol <= 0x10ffff) {
return 4;
}
}
// Not UTF8, emit a special symbol above the UTF8-code space
*symbol = 0x110000 | input[0];
return 1;
}
// Returns true if at least min_fraction of the data is UTF8-encoded.
bool IsMostlyUTF8(const uint8_t* data, size_t length, double min_fraction) {
size_t size_utf8 = 0;
size_t pos = 0;
while (pos < length) {
int symbol;
int bytes_read = ParseAsUTF8(&symbol, data + pos, length - pos);
pos += bytes_read;
if (symbol < 0x110000) size_utf8 += bytes_read;
}
return size_utf8 > min_fraction * length;
}
void RecomputeDistancePrefixes(Command* cmds,
size_t num_commands,
int num_direct_distance_codes,
int distance_postfix_bits) {
if (num_direct_distance_codes == 0 &&
distance_postfix_bits == 0) {
return;
}
for (int i = 0; i < num_commands; ++i) {
Command* cmd = &cmds[i];
if (cmd->copy_len_ > 0 && cmd->cmd_prefix_ >= 128) {
PrefixEncodeCopyDistance(cmd->DistanceCode(),
num_direct_distance_codes,
distance_postfix_bits,
&cmd->dist_prefix_,
&cmd->dist_extra_);
}
}
}
uint8_t* BrotliCompressor::GetBrotliStorage(size_t size) {
if (storage_size_ < size) {
storage_.reset(new uint8_t[size]);
storage_size_ = size;
}
return &storage_[0];
}
BrotliCompressor::BrotliCompressor(BrotliParams params)
: params_(params),
hashers_(new Hashers()),
input_pos_(0),
num_commands_(0),
last_insert_len_(0),
last_flush_pos_(0),
last_processed_pos_(0),
prev_byte_(0),
prev_byte2_(0),
storage_size_(0) {
// Sanitize params.
params_.quality = std::max(0, params_.quality);
if (params_.lgwin < kMinWindowBits) {
params_.lgwin = kMinWindowBits;
} else if (params_.lgwin > kMaxWindowBits) {
params_.lgwin = kMaxWindowBits;
}
if (params_.lgblock == 0) {
params_.lgblock = 16;
if (params_.quality >= 9 && params_.lgwin > params_.lgblock) {
params_.lgblock = std::min(21, params_.lgwin);
}
} else {
params_.lgblock = std::min(kMaxInputBlockBits,
std::max(kMinInputBlockBits, params_.lgblock));
}
if (params_.quality <= 9) {
params_.enable_dictionary = false;
params_.enable_transforms = false;
params_.greedy_block_split = true;
params_.enable_context_modeling = false;
}
// Set maximum distance, see section 9.1. of the spec.
max_backward_distance_ = (1 << params_.lgwin) - 16;
// Initialize input and literal cost ring buffers.
// We allocate at least lgwin + 1 bits for the ring buffer so that the newly
// added block fits there completely and we still get lgwin bits and at least
// read_block_size_bits + 1 bits because the copy tail length needs to be
// smaller than ringbuffer size.
int ringbuffer_bits = std::max(params_.lgwin + 1, params_.lgblock + 1);
ringbuffer_.reset(new RingBuffer(ringbuffer_bits, params_.lgblock));
if (params_.quality > 9) {
literal_cost_mask_ = (1 << params_.lgblock) - 1;
literal_cost_.reset(new float[literal_cost_mask_ + 1]);
}
// Allocate command buffer.
cmd_buffer_size_ = std::max(1 << 18, 1 << params_.lgblock);
commands_.reset(new brotli::Command[cmd_buffer_size_]);
// Initialize last byte with stream header.
if (params_.lgwin == 16) {
last_byte_ = 0;
last_byte_bits_ = 1;
} else {
last_byte_ = ((params_.lgwin - 17) << 1) | 1;
last_byte_bits_ = 4;
}
// Initialize distance cache.
dist_cache_[0] = 4;
dist_cache_[1] = 11;
dist_cache_[2] = 15;
dist_cache_[3] = 16;
// Initialize hashers.
switch (params_.quality) {
case 0:
case 1: hash_type_ = 1; break;
case 2:
case 3: hash_type_ = 2; break;
case 4: hash_type_ = 3; break;
case 5:
case 6: hash_type_ = 4; break;
case 7: hash_type_ = 5; break;
case 8: hash_type_ = 6; break;
case 9: hash_type_ = 7; break;
default: // quality > 9
hash_type_ = (params_.mode == BrotliParams::MODE_TEXT) ? 8 : 9;
}
hashers_->Init(hash_type_);
if (params_.mode == BrotliParams::MODE_TEXT &&
params_.enable_dictionary) {
StoreDictionaryWordHashes(params_.enable_transforms);
}
}
BrotliCompressor::~BrotliCompressor() {
}
StaticDictionary* BrotliCompressor::static_dictionary_ = NULL;
void BrotliCompressor::StoreDictionaryWordHashes(bool enable_transforms) {
if (static_dictionary_ == NULL) {
static_dictionary_ = new StaticDictionary;
static_dictionary_->Fill(enable_transforms);
}
hashers_->SetStaticDictionary(static_dictionary_);
}
void BrotliCompressor::CopyInputToRingBuffer(const size_t input_size,
const uint8_t* input_buffer) {
ringbuffer_->Write(input_buffer, input_size);
input_pos_ += input_size;
// Erase a few more bytes in the ring buffer to make hashing not
// depend on uninitialized data. This makes compression deterministic
// and it prevents uninitialized memory warnings in Valgrind. Even
// without erasing, the output would be valid (but nondeterministic).
//
// Background information: The compressor stores short (at most 8 bytes)
// substrings of the input already read in a hash table, and detects
// repetitions by looking up such substrings in the hash table. If it
// can find a substring, it checks whether the substring is really there
// in the ring buffer (or it's just a hash collision). Should the hash
// table become corrupt, this check makes sure that the output is
// still valid, albeit the compression ratio would be bad.
//
// The compressor populates the hash table from the ring buffer as it's
// reading new bytes from the input. However, at the last few indexes of
// the ring buffer, there are not enough bytes to build full-length
// substrings from. Since the hash table always contains full-length
// substrings, we erase with dummy 0s here to make sure that those
// substrings will contain 0s at the end instead of uninitialized
// data.
//
// Please note that erasing is not necessary (because the
// memory region is already initialized since he ring buffer
// has a `tail' that holds a copy of the beginning,) so we
// skip erasing if we have already gone around at least once in
// the ring buffer.
size_t pos = ringbuffer_->position();
// Only clear during the first round of ringbuffer writes. On
// subsequent rounds data in the ringbuffer would be affected.
if (pos <= ringbuffer_->mask()) {
// This is the first time when the ring buffer is being written.
// We clear 3 bytes just after the bytes that have been copied from
// the input buffer.
//
// The ringbuffer has a "tail" that holds a copy of the beginning,
// but only once the ring buffer has been fully written once, i.e.,
// pos <= mask. For the first time, we need to write values
// in this tail (where index may be larger than mask), so that
// we have exactly defined behavior and don't read un-initialized
// memory. Due to performance reasons, hashing reads data using a
// LOAD32, which can go 3 bytes beyond the bytes written in the
// ringbuffer.
memset(ringbuffer_->start() + pos, 0, 3);
}
}
bool BrotliCompressor::WriteBrotliData(const bool is_last,
const bool force_flush,
size_t* out_size,
uint8_t** output) {
const size_t bytes = input_pos_ - last_processed_pos_;
const uint8_t* data = ringbuffer_->start();
const size_t mask = ringbuffer_->mask();
if (bytes > input_block_size()) {
return false;
}
bool utf8_mode =
params_.enable_context_modeling &&
IsMostlyUTF8(&data[last_processed_pos_ & mask], bytes, kMinUTF8Ratio);
if (literal_cost_.get()) {
if (utf8_mode) {
EstimateBitCostsForLiteralsUTF8(last_processed_pos_, bytes, mask,
literal_cost_mask_, data,
literal_cost_.get());
} else {
EstimateBitCostsForLiterals(last_processed_pos_, bytes, mask,
literal_cost_mask_,
data, literal_cost_.get());
}
}
double base_min_score = params_.enable_context_modeling ? 8.115 : 4.0;
CreateBackwardReferences(bytes, last_processed_pos_, data, mask,
literal_cost_.get(),
literal_cost_mask_,
max_backward_distance_,
base_min_score,
params_.quality,
hashers_.get(),
hash_type_,
dist_cache_,
&last_insert_len_,
&commands_[num_commands_],
&num_commands_);
if (!is_last && !force_flush &&
num_commands_ + (input_block_size() >> 1) < cmd_buffer_size_ &&
input_pos_ + input_block_size() <= last_flush_pos_ + mask + 1) {
// Everything will happen later.
last_processed_pos_ = input_pos_;
*out_size = 0;
return true;
}
// Create the last insert-only command.
if (last_insert_len_ > 0) {
brotli::Command cmd(last_insert_len_);
commands_[num_commands_++] = cmd;
last_insert_len_ = 0;
}
return WriteMetaBlockInternal(is_last, utf8_mode, out_size, output);
}
bool BrotliCompressor::WriteMetaBlockInternal(const bool is_last,
const bool utf8_mode,
size_t* out_size,
uint8_t** output) {
const size_t bytes = input_pos_ - last_flush_pos_;
const uint8_t* data = ringbuffer_->start();
const size_t mask = ringbuffer_->mask();
const size_t max_out_size = 2 * bytes + 500;
uint8_t* storage = GetBrotliStorage(max_out_size);
storage[0] = last_byte_;
int storage_ix = last_byte_bits_;
bool uncompressed = false;
if (num_commands_ < (bytes >> 8) + 2) {
int num_literals = 0;
for (int i = 0; i < num_commands_; ++i) {
num_literals += commands_[i].insert_len_;
}
if (num_literals > 0.99 * bytes) {
int literal_histo[256] = { 0 };
static const int kSampleRate = 13;
static const double kMinEntropy = 7.92;
static const double kBitCostThreshold = bytes * kMinEntropy / kSampleRate;
for (int i = last_flush_pos_; i < input_pos_; i += kSampleRate) {
++literal_histo[data[i & mask]];
}
if (BitsEntropy(literal_histo, 256) > kBitCostThreshold) {
uncompressed = true;
}
}
}
if (bytes == 0) {
if (!StoreCompressedMetaBlockHeader(is_last, 0, &storage_ix, &storage[0])) {
return false;
}
storage_ix = (storage_ix + 7) & ~7;
} else if (uncompressed) {
if (!StoreUncompressedMetaBlock(is_last,
data, last_flush_pos_, mask, bytes,
&storage_ix,
&storage[0])) {
return false;
}
} else {
// Save the state of the distance cache in case we need to restore it for
// emitting an uncompressed block.
int saved_dist_cache[4];
memcpy(saved_dist_cache, dist_cache_, sizeof(dist_cache_));
int num_direct_distance_codes = 0;
int distance_postfix_bits = 0;
if (params_.quality > 9 && params_.mode == BrotliParams::MODE_FONT) {
num_direct_distance_codes = 12;
distance_postfix_bits = 1;
RecomputeDistancePrefixes(commands_.get(),
num_commands_,
num_direct_distance_codes,
distance_postfix_bits);
}
int literal_context_mode = utf8_mode ? CONTEXT_UTF8 : CONTEXT_SIGNED;
MetaBlockSplit mb;
if (params_.greedy_block_split) {
BuildMetaBlockGreedy(data, last_flush_pos_, mask,
commands_.get(), num_commands_,
&mb);
} else {
BuildMetaBlock(data, last_flush_pos_, mask,
prev_byte_, prev_byte2_,
commands_.get(), num_commands_,
literal_context_mode,
params_.enable_context_modeling,
&mb);
}
if (params_.quality >= 3) {
OptimizeHistograms(num_direct_distance_codes,
distance_postfix_bits,
&mb);
}
if (!StoreMetaBlock(data, last_flush_pos_, bytes, mask,
prev_byte_, prev_byte2_,
is_last,
num_direct_distance_codes,
distance_postfix_bits,
literal_context_mode,
commands_.get(), num_commands_,
mb,
&storage_ix,
&storage[0])) {
return false;
}
if (bytes + 4 < (storage_ix >> 3)) {
// Restore the distance cache and last byte.
memcpy(dist_cache_, saved_dist_cache, sizeof(dist_cache_));
storage[0] = last_byte_;
storage_ix = last_byte_bits_;
if (!StoreUncompressedMetaBlock(is_last, data, last_flush_pos_, mask,
bytes, &storage_ix, &storage[0])) {
return false;
}
}
}
last_byte_ = storage[storage_ix >> 3];
last_byte_bits_ = storage_ix & 7;
last_flush_pos_ = input_pos_;
last_processed_pos_ = input_pos_;
prev_byte_ = data[(last_flush_pos_ - 1) & mask];
prev_byte2_ = data[(last_flush_pos_ - 2) & mask];
num_commands_ = 0;
*output = &storage[0];
*out_size = storage_ix >> 3;
return true;
}
bool BrotliCompressor::WriteMetaBlock(const size_t input_size,
const uint8_t* input_buffer,
const bool is_last,
size_t* encoded_size,
uint8_t* encoded_buffer) {
CopyInputToRingBuffer(input_size, input_buffer);
size_t out_size = 0;
uint8_t* output;
if (!WriteBrotliData(is_last, /* force_flush = */ true, &out_size, &output) ||
out_size > *encoded_size) {
return false;
}
if (out_size > 0) {
memcpy(encoded_buffer, output, out_size);
}
*encoded_size = out_size;
return true;
}
bool BrotliCompressor::WriteMetadata(const size_t input_size,
const uint8_t* input_buffer,
const bool is_last,
size_t* encoded_size,
uint8_t* encoded_buffer) {
if (input_size > (1 << 24) || input_size + 6 > *encoded_size) {
return false;
}
int storage_ix = last_byte_bits_;
encoded_buffer[0] = last_byte_;
WriteBits(1, 0, &storage_ix, encoded_buffer);
WriteBits(2, 3, &storage_ix, encoded_buffer);
WriteBits(1, 0, &storage_ix, encoded_buffer);
if (input_size == 0) {
WriteBits(2, 0, &storage_ix, encoded_buffer);
*encoded_size = (storage_ix + 7) >> 3;
} else {
size_t nbits = Log2Floor(input_size - 1) + 1;
size_t nbytes = (nbits + 7) / 8;
WriteBits(2, nbytes, &storage_ix, encoded_buffer);
WriteBits(8 * nbytes, input_size - 1, &storage_ix, encoded_buffer);
size_t hdr_size = (storage_ix + 7) >> 3;
memcpy(&encoded_buffer[hdr_size], input_buffer, input_size);
*encoded_size = hdr_size + input_size;
}
if (is_last) {
encoded_buffer[(*encoded_size)++] = 3;
}
last_byte_ = 0;
last_byte_bits_ = 0;
return true;
}
bool BrotliCompressor::FinishStream(
size_t* encoded_size, uint8_t* encoded_buffer) {
return WriteMetaBlock(0, NULL, true, encoded_size, encoded_buffer);
}
int BrotliCompressBuffer(BrotliParams params,
size_t input_size,
const uint8_t* input_buffer,
size_t* encoded_size,
uint8_t* encoded_buffer) {
if (*encoded_size == 0) {
// Output buffer needs at least one byte.
return 0;
}
BrotliCompressor compressor(params);
BrotliMemIn in(input_buffer, input_size);
BrotliMemOut out(encoded_buffer, *encoded_size);
if (!BrotliCompress(params, &in, &out)) {
return 0;
}
*encoded_size = out.position();
return 1;
}
size_t CopyOneBlockToRingBuffer(BrotliIn* r, BrotliCompressor* compressor) {
const size_t block_size = compressor->input_block_size();
size_t bytes_read = 0;
const uint8_t* data = reinterpret_cast<const uint8_t*>(
r->Read(block_size, &bytes_read));
if (data == NULL) {
return 0;
}
compressor->CopyInputToRingBuffer(bytes_read, data);
// Read more bytes until block_size is filled or an EOF (data == NULL) is
// received. This is useful to get deterministic compressed output for the
// same input no matter how r->Read splits the input to chunks.
for (size_t remaining = block_size - bytes_read; remaining > 0; ) {
size_t more_bytes_read = 0;
data = reinterpret_cast<const uint8_t*>(
r->Read(remaining, &more_bytes_read));
if (data == NULL) {
break;
}
compressor->CopyInputToRingBuffer(more_bytes_read, data);
bytes_read += more_bytes_read;
remaining -= more_bytes_read;
}
return bytes_read;
}
bool BrotliInIsFinished(BrotliIn* r) {
size_t read_bytes;
return r->Read(0, &read_bytes) == NULL;
}
int BrotliCompress(BrotliParams params, BrotliIn* in, BrotliOut* out) {
size_t in_bytes = 0;
size_t out_bytes = 0;
uint8_t* output;
bool final_block = false;
BrotliCompressor compressor(params);
while (!final_block) {
in_bytes = CopyOneBlockToRingBuffer(in, &compressor);
final_block = in_bytes == 0 || BrotliInIsFinished(in);
out_bytes = 0;
if (!compressor.WriteBrotliData(final_block,
/* force_flush = */ false,
&out_bytes, &output)) {
return false;
}
if (out_bytes > 0 && !out->Write(output, out_bytes)) {
return false;
}
}
return true;
}
} // namespace brotli
@@ -0,0 +1,37 @@
"use client";
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/dropdown-context.ts
var dropdown_context_exports = {};
__export(dropdown_context_exports, {
DropdownProvider: () => DropdownProvider,
useDropdownContext: () => useDropdownContext
});
module.exports = __toCommonJS(dropdown_context_exports);
var import_react_utils = require("@heroui/react-utils");
var [DropdownProvider, useDropdownContext] = (0, import_react_utils.createContext)({
name: "DropdownContext",
errorMessage: "useDropdownContext: `context` is undefined. Seems you forgot to wrap all popover components within `<Dropdown />`"
});
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
DropdownProvider,
useDropdownContext
});
@@ -0,0 +1,399 @@
/*!
* MIT License
*
* Copyright (c) 2017-2024 Peculiar Ventures, LLC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
'use strict';
const ARRAY_BUFFER_NAME = "[object ArrayBuffer]";
class BufferSourceConverter {
static isArrayBuffer(data) {
return Object.prototype.toString.call(data) === ARRAY_BUFFER_NAME;
}
static toArrayBuffer(data) {
if (this.isArrayBuffer(data)) {
return data;
}
if (data.byteLength === data.buffer.byteLength) {
return data.buffer;
}
if (data.byteOffset === 0 && data.byteLength === data.buffer.byteLength) {
return data.buffer;
}
return this.toUint8Array(data.buffer)
.slice(data.byteOffset, data.byteOffset + data.byteLength)
.buffer;
}
static toUint8Array(data) {
return this.toView(data, Uint8Array);
}
static toView(data, type) {
if (data.constructor === type) {
return data;
}
if (this.isArrayBuffer(data)) {
return new type(data);
}
if (this.isArrayBufferView(data)) {
return new type(data.buffer, data.byteOffset, data.byteLength);
}
throw new TypeError("The provided value is not of type '(ArrayBuffer or ArrayBufferView)'");
}
static isBufferSource(data) {
return this.isArrayBufferView(data)
|| this.isArrayBuffer(data);
}
static isArrayBufferView(data) {
return ArrayBuffer.isView(data)
|| (data && this.isArrayBuffer(data.buffer));
}
static isEqual(a, b) {
const aView = BufferSourceConverter.toUint8Array(a);
const bView = BufferSourceConverter.toUint8Array(b);
if (aView.length !== bView.byteLength) {
return false;
}
for (let i = 0; i < aView.length; i++) {
if (aView[i] !== bView[i]) {
return false;
}
}
return true;
}
static concat(...args) {
let buffers;
if (Array.isArray(args[0]) && !(args[1] instanceof Function)) {
buffers = args[0];
}
else if (Array.isArray(args[0]) && args[1] instanceof Function) {
buffers = args[0];
}
else {
if (args[args.length - 1] instanceof Function) {
buffers = args.slice(0, args.length - 1);
}
else {
buffers = args;
}
}
let size = 0;
for (const buffer of buffers) {
size += buffer.byteLength;
}
const res = new Uint8Array(size);
let offset = 0;
for (const buffer of buffers) {
const view = this.toUint8Array(buffer);
res.set(view, offset);
offset += view.length;
}
if (args[args.length - 1] instanceof Function) {
return this.toView(res, args[args.length - 1]);
}
return res.buffer;
}
}
const STRING_TYPE = "string";
const HEX_REGEX = /^[0-9a-f\s]+$/i;
const BASE64_REGEX = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;
const BASE64URL_REGEX = /^[a-zA-Z0-9-_]+$/;
class Utf8Converter {
static fromString(text) {
const s = unescape(encodeURIComponent(text));
const uintArray = new Uint8Array(s.length);
for (let i = 0; i < s.length; i++) {
uintArray[i] = s.charCodeAt(i);
}
return uintArray.buffer;
}
static toString(buffer) {
const buf = BufferSourceConverter.toUint8Array(buffer);
let encodedString = "";
for (let i = 0; i < buf.length; i++) {
encodedString += String.fromCharCode(buf[i]);
}
const decodedString = decodeURIComponent(escape(encodedString));
return decodedString;
}
}
class Utf16Converter {
static toString(buffer, littleEndian = false) {
const arrayBuffer = BufferSourceConverter.toArrayBuffer(buffer);
const dataView = new DataView(arrayBuffer);
let res = "";
for (let i = 0; i < arrayBuffer.byteLength; i += 2) {
const code = dataView.getUint16(i, littleEndian);
res += String.fromCharCode(code);
}
return res;
}
static fromString(text, littleEndian = false) {
const res = new ArrayBuffer(text.length * 2);
const dataView = new DataView(res);
for (let i = 0; i < text.length; i++) {
dataView.setUint16(i * 2, text.charCodeAt(i), littleEndian);
}
return res;
}
}
class Convert {
static isHex(data) {
return typeof data === STRING_TYPE
&& HEX_REGEX.test(data);
}
static isBase64(data) {
return typeof data === STRING_TYPE
&& BASE64_REGEX.test(data);
}
static isBase64Url(data) {
return typeof data === STRING_TYPE
&& BASE64URL_REGEX.test(data);
}
static ToString(buffer, enc = "utf8") {
const buf = BufferSourceConverter.toUint8Array(buffer);
switch (enc.toLowerCase()) {
case "utf8":
return this.ToUtf8String(buf);
case "binary":
return this.ToBinary(buf);
case "hex":
return this.ToHex(buf);
case "base64":
return this.ToBase64(buf);
case "base64url":
return this.ToBase64Url(buf);
case "utf16le":
return Utf16Converter.toString(buf, true);
case "utf16":
case "utf16be":
return Utf16Converter.toString(buf);
default:
throw new Error(`Unknown type of encoding '${enc}'`);
}
}
static FromString(str, enc = "utf8") {
if (!str) {
return new ArrayBuffer(0);
}
switch (enc.toLowerCase()) {
case "utf8":
return this.FromUtf8String(str);
case "binary":
return this.FromBinary(str);
case "hex":
return this.FromHex(str);
case "base64":
return this.FromBase64(str);
case "base64url":
return this.FromBase64Url(str);
case "utf16le":
return Utf16Converter.fromString(str, true);
case "utf16":
case "utf16be":
return Utf16Converter.fromString(str);
default:
throw new Error(`Unknown type of encoding '${enc}'`);
}
}
static ToBase64(buffer) {
const buf = BufferSourceConverter.toUint8Array(buffer);
if (typeof btoa !== "undefined") {
const binary = this.ToString(buf, "binary");
return btoa(binary);
}
else {
return Buffer.from(buf).toString("base64");
}
}
static FromBase64(base64) {
const formatted = this.formatString(base64);
if (!formatted) {
return new ArrayBuffer(0);
}
if (!Convert.isBase64(formatted)) {
throw new TypeError("Argument 'base64Text' is not Base64 encoded");
}
if (typeof atob !== "undefined") {
return this.FromBinary(atob(formatted));
}
else {
return new Uint8Array(Buffer.from(formatted, "base64")).buffer;
}
}
static FromBase64Url(base64url) {
const formatted = this.formatString(base64url);
if (!formatted) {
return new ArrayBuffer(0);
}
if (!Convert.isBase64Url(formatted)) {
throw new TypeError("Argument 'base64url' is not Base64Url encoded");
}
return this.FromBase64(this.Base64Padding(formatted.replace(/\-/g, "+").replace(/\_/g, "/")));
}
static ToBase64Url(data) {
return this.ToBase64(data).replace(/\+/g, "-").replace(/\//g, "_").replace(/\=/g, "");
}
static FromUtf8String(text, encoding = Convert.DEFAULT_UTF8_ENCODING) {
switch (encoding) {
case "ascii":
return this.FromBinary(text);
case "utf8":
return Utf8Converter.fromString(text);
case "utf16":
case "utf16be":
return Utf16Converter.fromString(text);
case "utf16le":
case "usc2":
return Utf16Converter.fromString(text, true);
default:
throw new Error(`Unknown type of encoding '${encoding}'`);
}
}
static ToUtf8String(buffer, encoding = Convert.DEFAULT_UTF8_ENCODING) {
switch (encoding) {
case "ascii":
return this.ToBinary(buffer);
case "utf8":
return Utf8Converter.toString(buffer);
case "utf16":
case "utf16be":
return Utf16Converter.toString(buffer);
case "utf16le":
case "usc2":
return Utf16Converter.toString(buffer, true);
default:
throw new Error(`Unknown type of encoding '${encoding}'`);
}
}
static FromBinary(text) {
const stringLength = text.length;
const resultView = new Uint8Array(stringLength);
for (let i = 0; i < stringLength; i++) {
resultView[i] = text.charCodeAt(i);
}
return resultView.buffer;
}
static ToBinary(buffer) {
const buf = BufferSourceConverter.toUint8Array(buffer);
let res = "";
for (let i = 0; i < buf.length; i++) {
res += String.fromCharCode(buf[i]);
}
return res;
}
static ToHex(buffer) {
const buf = BufferSourceConverter.toUint8Array(buffer);
let result = "";
const len = buf.length;
for (let i = 0; i < len; i++) {
const byte = buf[i];
if (byte < 16) {
result += "0";
}
result += byte.toString(16);
}
return result;
}
static FromHex(hexString) {
let formatted = this.formatString(hexString);
if (!formatted) {
return new ArrayBuffer(0);
}
if (!Convert.isHex(formatted)) {
throw new TypeError("Argument 'hexString' is not HEX encoded");
}
if (formatted.length % 2) {
formatted = `0${formatted}`;
}
const res = new Uint8Array(formatted.length / 2);
for (let i = 0; i < formatted.length; i = i + 2) {
const c = formatted.slice(i, i + 2);
res[i / 2] = parseInt(c, 16);
}
return res.buffer;
}
static ToUtf16String(buffer, littleEndian = false) {
return Utf16Converter.toString(buffer, littleEndian);
}
static FromUtf16String(text, littleEndian = false) {
return Utf16Converter.fromString(text, littleEndian);
}
static Base64Padding(base64) {
const padCount = 4 - (base64.length % 4);
if (padCount < 4) {
for (let i = 0; i < padCount; i++) {
base64 += "=";
}
}
return base64;
}
static formatString(data) {
return (data === null || data === void 0 ? void 0 : data.replace(/[\n\r\t ]/g, "")) || "";
}
}
Convert.DEFAULT_UTF8_ENCODING = "utf8";
function assign(target, ...sources) {
const res = arguments[0];
for (let i = 1; i < arguments.length; i++) {
const obj = arguments[i];
for (const prop in obj) {
res[prop] = obj[prop];
}
}
return res;
}
function combine(...buf) {
const totalByteLength = buf.map((item) => item.byteLength).reduce((prev, cur) => prev + cur);
const res = new Uint8Array(totalByteLength);
let currentPos = 0;
buf.map((item) => new Uint8Array(item)).forEach((arr) => {
for (const item2 of arr) {
res[currentPos++] = item2;
}
});
return res.buffer;
}
function isEqual(bytes1, bytes2) {
if (!(bytes1 && bytes2)) {
return false;
}
if (bytes1.byteLength !== bytes2.byteLength) {
return false;
}
const b1 = new Uint8Array(bytes1);
const b2 = new Uint8Array(bytes2);
for (let i = 0; i < bytes1.byteLength; i++) {
if (b1[i] !== b2[i]) {
return false;
}
}
return true;
}
exports.BufferSourceConverter = BufferSourceConverter;
exports.Convert = Convert;
exports.assign = assign;
exports.combine = combine;
exports.isEqual = isEqual;
@@ -0,0 +1,11 @@
import { Block, BlockMarkers } from '../primitives.js';
import { Tokenizer } from './tokenizers/index.js';
export interface Options {
startLine: number;
fence: string;
spacing: 'compact' | 'preserve';
markers: BlockMarkers;
tokenizers: Tokenizer[];
}
export type Parser = (source: string) => Block[];
export default function getParser({ startLine, fence, spacing, markers, tokenizers, }?: Partial<Options>): Parser;
@@ -0,0 +1,18 @@
# @codemirror/state [![NPM version](https://img.shields.io/npm/v/@codemirror/state.svg)](https://www.npmjs.org/package/@codemirror/state)
[ [**WEBSITE**](https://codemirror.net/) | [**DOCS**](https://codemirror.net/docs/ref/#state) | [**ISSUES**](https://github.com/codemirror/dev/issues) | [**FORUM**](https://discuss.codemirror.net/c/next/) | [**CHANGELOG**](https://github.com/codemirror/state/blob/main/CHANGELOG.md) ]
This package implements the editor state data structures for the
[CodeMirror](https://codemirror.net/) code editor.
The [project page](https://codemirror.net/) has more information, a
number of [examples](https://codemirror.net/examples/) and the
[documentation](https://codemirror.net/docs/).
This code is released under an
[MIT license](https://github.com/codemirror/state/tree/main/LICENSE).
We aim to be an inclusive, welcoming community. To make that explicit,
we have a [code of
conduct](http://contributor-covenant.org/version/1/1/0/) that applies
to communication around the project.
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('omit', require('../omit'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1 @@
{"version":3,"file":"DynamicValueBuilder.d.ts","sourceRoot":"","sources":["../../../../src/binding/models/DynamicValueBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAE5D,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAAI,CACnC,OAAO,EAAE,iBAAiB,KACvB,QAAQ,CAAC,CAAC,CAAC,CAAC"}
@@ -0,0 +1 @@
{"mappings":"AAAA,iBAAiB;IAAG,aAAa,CAAC,SAAS,CAAC;IAC1C,iBAAiB,CAAC,OAAS,CAAC,8CAA+B,EAAE,KAAK,UAAU,EAAE;IAC9E,cAAc,CAAC,OAAS,CAAC,qBAAe,EAAE,KAAK,KAAK,EAAE;IACtD,cAAc,CAAC,QAAQ,CAAC;IACxB,kBAAkB,CAAC,OAAS,CAAC,8CAA+B,EAAE,KAAK,UAAU,EAAE;IAC/E,sBAAsB,CAAC,sEAA8C,CAAC;IACtE,UAAU,CAAC,YAAM,CAAC;IAClB,aAAa,CAAC,yBAAa,CAAC;IAC5B,YAAY,CAAC,iCAAkB,CAAC;AAClC","sources":["packages/@react-aria/table/intl/sk-SK.json"],"sourcesContent":["{\n \"ascending\": \"vzostupne\",\n \"ascendingSort\": \"zoradené zostupne podľa stĺpca {columnName}\",\n \"columnSize\": \"Počet pixelov: {value}\",\n \"descending\": \"zostupne\",\n \"descendingSort\": \"zoradené zostupne podľa stĺpca {columnName}\",\n \"resizerDescription\": \"Stlačením klávesu Enter začnete zmenu veľkosti\",\n \"select\": \"Vybrať\",\n \"selectAll\": \"Vybrať všetko\",\n \"sortable\": \"zoraditeľný stĺpec\"\n}\n"],"names":[],"version":3,"file":"sk-SK.main.js.map"}
@@ -0,0 +1 @@
{"name":"esutils","version":"2.0.3","requiresBuild":false,"files":{"package.json":{"checkedAt":1794532094351,"integrity":"sha512-1mlz5NybrieBNHlJSVPRr4eAK76hZf9vSvplZuFpl5f4BVfOg3IBdMuFYJdXCxZna3JWv7JpJC+jieH5oyVdsg==","mode":436,"size":1042},"LICENSE.BSD":{"checkedAt":1794532094351,"integrity":"sha512-YKl79smr20vdIKCy+fyP+zscyQHwyqDMNEZOwVLEOjQxIxgts1z0klBrcDsCIR2JPrcB00nhm8bCz47uCx24SA==","mode":436,"size":1231},"README.md":{"checkedAt":1794532094351,"integrity":"sha512-T+jGkavhsLU5RAU5ZpRiBiC51xRRDgCyk9uoUA7wqZ0EkMnUNjkjhFA+i8TmkoeZ/gJXjufdaiSQ9Rcg7zgl2Q==","mode":436,"size":6828},"lib/ast.js":{"checkedAt":1794532094351,"integrity":"sha512-2lZL9pJc4VOCmPRzXzhLB0glv39caZ0dJjiWRhBnu6IqehAQxJx7Phze6Lw9jpw0z27K7MCADVOV+qoOr/JpLQ==","mode":436,"size":4728},"lib/code.js":{"checkedAt":1794532094352,"integrity":"sha512-uje1C/JI4uJYDzfiI9IK1I5Hq8SJ1BLAnTR/m27S727u+6Q9I2+mbkfHI3sQEy0OZINSL4+WKszDxDANi/nUxA==","mode":436,"size":29610},"lib/keyword.js":{"checkedAt":1794532094352,"integrity":"sha512-DbpOV9su9XbrdRFfKUj95zQzLSKEA9ozRnxLYlUswbebfZKSu86+hKfBBz4sdYKUyelI+skBfvCzwPgP932QFQ==","mode":436,"size":5616},"lib/utils.js":{"checkedAt":1794532094352,"integrity":"sha512-GIGvC8jeExPreTDGAI8R4H58i5ujMEFvILYm3vjKwH8k8CyA+i2oJAq+qcCgbN1Win70R3qtJJJHmHSORV1qVA==","mode":436,"size":1527}}}
@@ -0,0 +1,48 @@
/**
* @author Yosuke Ota
* See LICENSE file in root directory for full license.
*/
"use strict"
const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
const { getSourceCode } = require("eslint-compat-utils")
module.exports = {
meta: {
docs: {
description:
"disallow `Promise.any` function and `AggregateError` class",
category: "ES2021",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-promise-any.html",
},
fixable: null,
messages: {
forbidden: "ES2021 '{{name}}' is forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return {
"Program:exit"(program) {
const sourceCode = getSourceCode(context)
const tracker = new ReferenceTracker(
sourceCode.getScope(program),
)
for (const { node, path } of tracker.iterateGlobalReferences({
AggregateError: { [READ]: true },
Promise: {
any: { [READ]: true },
},
})) {
context.report({
node,
messageId: "forbidden",
data: { name: path.join(".") },
})
}
},
}
},
}
@@ -0,0 +1 @@
{"version":3,"file":"PlanServiceNode.js","sourceRoot":"","sources":["../../../../src/planning/models/PlanServiceNode.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
{"version":3,"file":"ResolvedValueBinding.d.ts","sourceRoot":"","sources":["../../../../src/binding/models/ResolvedValueBinding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AACpF,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,WAAW,oBAAoB,CAAC,UAAU,CAC9C,SAAQ,aAAa,CACnB,OAAO,iBAAiB,CAAC,aAAa,EACtC,YAAY,EACZ,UAAU,CACX;IAED,QAAQ,CAAC,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IACvE,QAAQ,CAAC,QAAQ,EAAE,qBAAqB,CAAC;CAC1C"}
@@ -0,0 +1,147 @@
'use strict';var _messages;function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}
var isCoreModule = require('is-core-module');var _require =
require('../docsUrl'),docsUrl = _require['default'];
var DO_PREFER_MESSAGE_ID = 'requireNodeProtocol';
var NEVER_PREFER_MESSAGE_ID = 'forbidNodeProtocol';
var messages = (_messages = {}, _defineProperty(_messages,
DO_PREFER_MESSAGE_ID, 'Prefer `node:{{moduleName}}` over `{{moduleName}}`.'), _defineProperty(_messages,
NEVER_PREFER_MESSAGE_ID, 'Prefer `{{moduleName}}` over `node:{{moduleName}}`.'), _messages);
function replaceStringLiteral(
fixer,
node,
text,
relativeRangeStart,
relativeRangeEnd)
{
var firstCharacterIndex = node.range[0] + 1;
var start = Number.isInteger(relativeRangeEnd) ?
relativeRangeStart + firstCharacterIndex :
firstCharacterIndex;
var end = Number.isInteger(relativeRangeEnd) ?
relativeRangeEnd + firstCharacterIndex :
node.range[1] - 1;
return fixer.replaceTextRange([start, end], text);
}
function isStringLiteral(node) {
return node && node.type === 'Literal' && typeof node.value === 'string';
}
function isStaticRequireWith1Param(node) {
return !node.optional &&
node.callee.type === 'Identifier' &&
node.callee.name === 'require'
// check for only 1 argument
&& node.arguments.length === 1 &&
node.arguments[0] &&
isStringLiteral(node.arguments[0]);
}
function checkAndReport(src, context) {
// TODO use src.quasis[0].value.raw
if (!src || src.type === 'TemplateLiteral') {return;}
var moduleName = 'value' in src ? src.value : src.name;
if (typeof moduleName !== 'string') {console.log(src, moduleName);}var
settings = context.settings;
var nodeVersion = settings && settings['import/node-version'];
if (
typeof nodeVersion !== 'undefined' && (
typeof nodeVersion !== 'string' ||
!/^[0-9]+\.[0-9]+\.[0-9]+$/.test(nodeVersion)))
{
throw new TypeError('`import/node-version` setting must be a string in the format "10.23.45" (a semver version, with no leading zero)');
}
if (context.options[0] === 'never') {
if (!moduleName.startsWith('node:')) {return;}
var actualModuleName = moduleName.slice(5);
if (!isCoreModule(actualModuleName, nodeVersion || undefined)) {return;}
context.report({
node: src,
message: messages[NEVER_PREFER_MESSAGE_ID],
data: { moduleName: actualModuleName },
/** @param {import('eslint').Rule.RuleFixer} fixer */
fix: function () {function fix(fixer) {
return replaceStringLiteral(fixer, src, '', 0, 5);
}return fix;}() });
} else if (context.options[0] === 'always') {
if (
moduleName.startsWith('node:') ||
!isCoreModule(moduleName, nodeVersion || undefined) ||
!isCoreModule('node:' + String(moduleName), nodeVersion || undefined))
{
return;
}
context.report({
node: src,
message: messages[DO_PREFER_MESSAGE_ID],
data: { moduleName: moduleName },
/** @param {import('eslint').Rule.RuleFixer} fixer */
fix: function () {function fix(fixer) {
return replaceStringLiteral(fixer, src, 'node:', 0, 0);
}return fix;}() });
} else if (typeof context.options[0] === 'undefined') {
throw new Error('Missing option');
} else {
throw new Error('Unexpected option: ' + String(context.options[0]));
}
}
/** @type {import('eslint').Rule.RuleModule} */
module.exports = {
meta: {
type: 'suggestion',
docs: {
description: 'Enforce either using, or omitting, the `node:` protocol when importing Node.js builtin modules.',
recommended: true,
category: 'Static analysis',
url: docsUrl('enforce-node-protocol-usage') },
fixable: 'code',
schema: {
type: 'array',
minItems: 1,
maxItems: 1,
items: [
{
'enum': ['always', 'never'] }] },
messages: messages },
create: function () {function create(context) {
return {
CallExpression: function () {function CallExpression(node) {
if (!isStaticRequireWith1Param(node)) {return;}
var arg = node.arguments[0];
return checkAndReport(arg, context);
}return CallExpression;}(),
ExportNamedDeclaration: function () {function ExportNamedDeclaration(node) {
return checkAndReport(node.source, context);
}return ExportNamedDeclaration;}(),
ImportDeclaration: function () {function ImportDeclaration(node) {
return checkAndReport(node.source, context);
}return ImportDeclaration;}(),
ImportExpression: function () {function ImportExpression(node) {
if (!isStringLiteral(node.source)) {return;}
return checkAndReport(node.source, context);
}return ImportExpression;}() };
}return create;}() };
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9lbmZvcmNlLW5vZGUtcHJvdG9jb2wtdXNhZ2UuanMiXSwibmFtZXMiOlsiaXNDb3JlTW9kdWxlIiwicmVxdWlyZSIsImRvY3NVcmwiLCJET19QUkVGRVJfTUVTU0FHRV9JRCIsIk5FVkVSX1BSRUZFUl9NRVNTQUdFX0lEIiwibWVzc2FnZXMiLCJyZXBsYWNlU3RyaW5nTGl0ZXJhbCIsImZpeGVyIiwibm9kZSIsInRleHQiLCJyZWxhdGl2ZVJhbmdlU3RhcnQiLCJyZWxhdGl2ZVJhbmdlRW5kIiwiZmlyc3RDaGFyYWN0ZXJJbmRleCIsInJhbmdlIiwic3RhcnQiLCJOdW1iZXIiLCJpc0ludGVnZXIiLCJlbmQiLCJyZXBsYWNlVGV4dFJhbmdlIiwiaXNTdHJpbmdMaXRlcmFsIiwidHlwZSIsInZhbHVlIiwiaXNTdGF0aWNSZXF1aXJlV2l0aDFQYXJhbSIsIm9wdGlvbmFsIiwiY2FsbGVlIiwibmFtZSIsImFyZ3VtZW50cyIsImxlbmd0aCIsImNoZWNrQW5kUmVwb3J0Iiwic3JjIiwiY29udGV4dCIsIm1vZHVsZU5hbWUiLCJjb25zb2xlIiwibG9nIiwic2V0dGluZ3MiLCJub2RlVmVyc2lvbiIsInRlc3QiLCJUeXBlRXJyb3IiLCJvcHRpb25zIiwic3RhcnRzV2l0aCIsImFjdHVhbE1vZHVsZU5hbWUiLCJzbGljZSIsInVuZGVmaW5lZCIsInJlcG9ydCIsIm1lc3NhZ2UiLCJkYXRhIiwiZml4IiwiRXJyb3IiLCJtb2R1bGUiLCJleHBvcnRzIiwibWV0YSIsImRvY3MiLCJkZXNjcmlwdGlvbiIsInJlY29tbWVuZGVkIiwiY2F0ZWdvcnkiLCJ1cmwiLCJmaXhhYmxlIiwic2NoZW1hIiwibWluSXRlbXMiLCJtYXhJdGVtcyIsIml0ZW1zIiwiY3JlYXRlIiwiQ2FsbEV4cHJlc3Npb24iLCJhcmciLCJFeHBvcnROYW1lZERlY2xhcmF0aW9uIiwic291cmNlIiwiSW1wb3J0RGVjbGFyYXRpb24iLCJJbXBvcnRFeHByZXNzaW9uIl0sIm1hcHBpbmdzIjoiQUFBQSxhOztBQUVBLElBQU1BLGVBQWVDLFFBQVEsZ0JBQVIsQ0FBckIsQztBQUM2QkEsUUFBUSxZQUFSLEMsQ0FBWkMsTzs7QUFFakIsSUFBTUMsdUJBQXVCLHFCQUE3QjtBQUNBLElBQU1DLDBCQUEwQixvQkFBaEM7QUFDQSxJQUFNQztBQUNIRixvQkFERyxFQUNvQixxREFEcEI7QUFFSEMsdUJBRkcsRUFFdUIscURBRnZCLGFBQU47OztBQUtBLFNBQVNFLG9CQUFUO0FBQ0VDLEtBREY7QUFFRUMsSUFGRjtBQUdFQyxJQUhGO0FBSUVDLGtCQUpGO0FBS0VDLGdCQUxGO0FBTUU7QUFDQSxNQUFNQyxzQkFBc0JKLEtBQUtLLEtBQUwsQ0FBVyxDQUFYLElBQWdCLENBQTVDO0FBQ0EsTUFBTUMsUUFBUUMsT0FBT0MsU0FBUCxDQUFpQkwsZ0JBQWpCO0FBQ1ZELHVCQUFxQkUsbUJBRFg7QUFFVkEscUJBRko7QUFHQSxNQUFNSyxNQUFNRixPQUFPQyxTQUFQLENBQWlCTCxnQkFBakI7QUFDUkEscUJBQW1CQyxtQkFEWDtBQUVSSixPQUFLSyxLQUFMLENBQVcsQ0FBWCxJQUFnQixDQUZwQjs7QUFJQSxTQUFPTixNQUFNVyxnQkFBTixDQUF1QixDQUFDSixLQUFELEVBQVFHLEdBQVIsQ0FBdkIsRUFBcUNSLElBQXJDLENBQVA7QUFDRDs7QUFFRCxTQUFTVSxlQUFULENBQXlCWCxJQUF6QixFQUErQjtBQUM3QixTQUFPQSxRQUFRQSxLQUFLWSxJQUFMLEtBQWMsU0FBdEIsSUFBbUMsT0FBT1osS0FBS2EsS0FBWixLQUFzQixRQUFoRTtBQUNEOztBQUVELFNBQVNDLHlCQUFULENBQW1DZCxJQUFuQyxFQUF5QztBQUN2QyxTQUFPLENBQUNBLEtBQUtlLFFBQU47QUFDRmYsT0FBS2dCLE1BQUwsQ0FBWUosSUFBWixLQUFxQixZQURuQjtBQUVGWixPQUFLZ0IsTUFBTCxDQUFZQyxJQUFaLEtBQXFCO0FBQ3hCO0FBSEssS0FJRmpCLEtBQUtrQixTQUFMLENBQWVDLE1BQWYsS0FBMEIsQ0FKeEI7QUFLRm5CLE9BQUtrQixTQUFMLENBQWUsQ0FBZixDQUxFO0FBTUZQLGtCQUFnQlgsS0FBS2tCLFNBQUwsQ0FBZSxDQUFmLENBQWhCLENBTkw7QUFPRDs7QUFFRCxTQUFTRSxjQUFULENBQXdCQyxHQUF4QixFQUE2QkMsT0FBN0IsRUFBc0M7QUFDcEM7QUFDQSxNQUFJLENBQUNELEdBQUQsSUFBUUEsSUFBSVQsSUFBSixLQUFhLGlCQUF6QixFQUE0QyxDQUFFLE9BQVM7QUFDdkQsTUFBTVcsYUFBYSxXQUFXRixHQUFYLEdBQWlCQSxJQUFJUixLQUFyQixHQUE2QlEsSUFBSUosSUFBcEQ7QUFDQSxNQUFJLE9BQU9NLFVBQVAsS0FBc0IsUUFBMUIsRUFBb0MsQ0FBRUMsUUFBUUMsR0FBUixDQUFZSixHQUFaLEVBQWlCRSxVQUFqQixFQUErQixDQUpqQztBQUs1QkcsVUFMNEIsR0FLZkosT0FMZSxDQUs1QkksUUFMNEI7QUFNcEMsTUFBTUMsY0FBY0QsWUFBWUEsU0FBUyxxQkFBVCxDQUFoQztBQUNBO0FBQ0UsU0FBT0MsV0FBUCxLQUF1QixXQUF2Qjs7QUFFRSxTQUFPQSxXQUFQLEtBQXVCLFFBQXZCO0FBQ0csR0FBRSwwQkFBRCxDQUE2QkMsSUFBN0IsQ0FBa0NELFdBQWxDLENBSE4sQ0FERjs7QUFNRTtBQUNBLFVBQU0sSUFBSUUsU0FBSixDQUFjLGtIQUFkLENBQU47QUFDRDs7QUFFRCxNQUFJUCxRQUFRUSxPQUFSLENBQWdCLENBQWhCLE1BQXVCLE9BQTNCLEVBQW9DO0FBQ2xDLFFBQUksQ0FBQ1AsV0FBV1EsVUFBWCxDQUFzQixPQUF0QixDQUFMLEVBQXFDLENBQUUsT0FBUzs7QUFFaEQsUUFBTUMsbUJBQW1CVCxXQUFXVSxLQUFYLENBQWlCLENBQWpCLENBQXpCO0FBQ0EsUUFBSSxDQUFDekMsYUFBYXdDLGdCQUFiLEVBQStCTCxlQUFlTyxTQUE5QyxDQUFMLEVBQStELENBQUUsT0FBUzs7QUFFMUVaLFlBQVFhLE1BQVIsQ0FBZTtBQUNibkMsWUFBTXFCLEdBRE87QUFFYmUsZUFBU3ZDLFNBQVNELHVCQUFULENBRkk7QUFHYnlDLFlBQU0sRUFBRWQsWUFBWVMsZ0JBQWQsRUFITztBQUliO0FBQ0FNLFNBTGEsNEJBS1R2QyxLQUxTLEVBS0Y7QUFDVCxpQkFBT0QscUJBQXFCQyxLQUFyQixFQUE0QnNCLEdBQTVCLEVBQWlDLEVBQWpDLEVBQXFDLENBQXJDLEVBQXdDLENBQXhDLENBQVA7QUFDRCxTQVBZLGdCQUFmOztBQVNELEdBZkQsTUFlTyxJQUFJQyxRQUFRUSxPQUFSLENBQWdCLENBQWhCLE1BQXVCLFFBQTNCLEVBQXFDO0FBQzFDO0FBQ0VQLGVBQVdRLFVBQVgsQ0FBc0IsT0FBdEI7QUFDRyxLQUFDdkMsYUFBYStCLFVBQWIsRUFBeUJJLGVBQWVPLFNBQXhDLENBREo7QUFFRyxLQUFDMUMsOEJBQXFCK0IsVUFBckIsR0FBbUNJLGVBQWVPLFNBQWxELENBSE47QUFJRTtBQUNBO0FBQ0Q7O0FBRURaLFlBQVFhLE1BQVIsQ0FBZTtBQUNibkMsWUFBTXFCLEdBRE87QUFFYmUsZUFBU3ZDLFNBQVNGLG9CQUFULENBRkk7QUFHYjBDLFlBQU0sRUFBRWQsc0JBQUYsRUFITztBQUliO0FBQ0FlLFNBTGEsNEJBS1R2QyxLQUxTLEVBS0Y7QUFDVCxpQkFBT0QscUJBQXFCQyxLQUFyQixFQUE0QnNCLEdBQTVCLEVBQWlDLE9BQWpDLEVBQTBDLENBQTFDLEVBQTZDLENBQTdDLENBQVA7QUFDRCxTQVBZLGdCQUFmOztBQVNELEdBbEJNLE1Ba0JBLElBQUksT0FBT0MsUUFBUVEsT0FBUixDQUFnQixDQUFoQixDQUFQLEtBQThCLFdBQWxDLEVBQStDO0FBQ3BELFVBQU0sSUFBSVMsS0FBSixDQUFVLGdCQUFWLENBQU47QUFDRCxHQUZNLE1BRUE7QUFDTCxVQUFNLElBQUlBLEtBQUosZ0NBQWdDakIsUUFBUVEsT0FBUixDQUFnQixDQUFoQixDQUFoQyxFQUFOO0FBQ0Q7QUFDRjs7QUFFRDtBQUNBVSxPQUFPQyxPQUFQLEdBQWlCO0FBQ2ZDLFFBQU07QUFDSjlCLFVBQU0sWUFERjtBQUVKK0IsVUFBTTtBQUNKQyxtQkFBYSxpR0FEVDtBQUVKQyxtQkFBYSxJQUZUO0FBR0pDLGdCQUFVLGlCQUhOO0FBSUpDLFdBQUtyRCxRQUFRLDZCQUFSLENBSkQsRUFGRjs7QUFRSnNELGFBQVMsTUFSTDtBQVNKQyxLine truncated
@@ -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/call-bind-apply-helpers
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
@@ -0,0 +1,7 @@
// @ts-ignore -- @vitest/browser-playwright might not be installed
export * from '@vitest/browser-playwright/context'
// @ts-ignore -- @vitest/browser-webdriverio might not be installed
export * from '@vitest/browser-webdriverio/context'
// @ts-ignore -- @vitest/browser-preview might not be installed
export * from '@vitest/browser-preview/context'
export { BrowserCommands, FsOptions } from 'vitest/internal/browser'
@@ -0,0 +1 @@
{"version":3,"names":["_t","require","VISITOR_KEYS","findParent","callback","path","parentPath","find","getFunctionParent","p","isFunction","getStatementParent","Array","isArray","container","isStatement","isProgram","isFile","Error","getEarliestCommonAncestorFrom","paths","getDeepestCommonAncestorFrom","deepest","i","ancestries","earliest","keys","type","ancestry","listKey","key","earliestKeyIndex","indexOf","parentKey","currentKeyIndex","filter","length","minDepth","Infinity","lastCommonIndex","lastCommon","map","unshift","first","depthLoop","shouldMatch","getAncestry","push","isAncestor","maybeDescendant","isDescendant","maybeAncestor","parent","inType","candidateTypes","includes","node"],"sources":["../../src/path/ancestry.ts"],"sourcesContent":["// This file contains that retrieve or validate anything related to the current paths ancestry.\n\nimport { VISITOR_KEYS } from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport type NodePath from \"./index.ts\";\n\n/**\n * Starting at the parent path of the current `NodePath` and going up the\n * tree, return the first `NodePath` that causes the provided `callback`\n * to return a truthy value, or `null` if the `callback` never returns a\n * truthy value.\n */\n\nexport function findParent(\n this: NodePath,\n callback: (path: NodePath) => boolean,\n): NodePath | null {\n let path = this;\n while ((path = path.parentPath)) {\n if (callback(path)) return path;\n }\n return null;\n}\n\n/**\n * Starting at current `NodePath` and going up the tree, return the first\n * `NodePath` that causes the provided `callback` to return a truthy value,\n * or `null` if the `callback` never returns a truthy value.\n */\n\nexport function find(\n this: NodePath,\n callback: (path: NodePath) => boolean,\n): NodePath | null {\n let path = this;\n do {\n if (callback(path)) return path;\n } while ((path = path.parentPath));\n return null;\n}\n\n/**\n * Get the parent function of the current path.\n */\n\nexport function getFunctionParent(this: NodePath): NodePath<t.Function> | null {\n return this.findParent(p => p.isFunction()) as NodePath<t.Function> | null;\n}\n\n/**\n * Walk up the tree until we hit a parent node path in a list.\n */\n\nexport function getStatementParent(this: NodePath): NodePath<t.Statement> {\n let path = this;\n\n do {\n if (\n !path.parentPath ||\n (Array.isArray(path.container) && path.isStatement())\n ) {\n break;\n } else {\n path = path.parentPath;\n }\n } while (path);\n\n if (path && (path.isProgram() || path.isFile())) {\n throw new Error(\n \"File/Program node, we can't possibly find a statement parent to this\",\n );\n }\n\n return path as NodePath<t.Statement>;\n}\n\n/**\n * Get the deepest common ancestor and then from it, get the earliest relationship path\n * to that ancestor.\n *\n * Earliest is defined as being \"before\" all the other nodes in terms of list container\n * position and visiting key.\n */\n\nexport function getEarliestCommonAncestorFrom(\n this: NodePath,\n paths: Array<NodePath>,\n): NodePath {\n return this.getDeepestCommonAncestorFrom(\n paths,\n function (deepest, i, ancestries) {\n let earliest;\n const keys = VISITOR_KEYS[deepest.type];\n\n for (const ancestry of ancestries) {\n const path = ancestry[i + 1];\n\n // first path\n if (!earliest) {\n earliest = path;\n continue;\n }\n\n // handle containers\n if (path.listKey && earliest.listKey === path.listKey) {\n // we're in the same container so check if we're earlier\n if (path.key! < earliest.key!) {\n earliest = path;\n continue;\n }\n }\n\n // handle keys\n const earliestKeyIndex = keys.indexOf(earliest.parentKey);\n const currentKeyIndex = keys.indexOf(path.parentKey);\n if (earliestKeyIndex > currentKeyIndex) {\n // key appears before so it's earlier\n earliest = path;\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n return earliest!;\n },\n );\n}\n\n/**\n * Get the earliest path in the tree where the provided `paths` intersect.\n *\n * TODO: Possible optimisation target.\n */\n\nexport function getDeepestCommonAncestorFrom(\n this: NodePath,\n paths: Array<NodePath>,\n filter?: (deepest: NodePath, i: number, ancestries: NodePath[][]) => NodePath,\n): NodePath {\n if (!paths.length) {\n return this;\n }\n\n if (paths.length === 1) {\n return paths[0];\n }\n\n // minimum depth of the tree so we know the highest node\n let minDepth = Infinity;\n\n // last common ancestor\n let lastCommonIndex, lastCommon;\n\n // get the ancestors of the path, breaking when the parent exceeds ourselves\n const ancestries = paths.map(path => {\n const ancestry: NodePath[] = [];\n\n do {\n ancestry.unshift(path);\n } Line truncated
@@ -0,0 +1,10 @@
"use strict";
const absFloor = require("./absFloor-CImRXpov.js");
const constants = require("./constants-DR3SPJ7u.js");
const parse = require("./parse.js");
function diffInSeconds(date, input, asFloat) {
const parsed = parse(input);
const output = (+date - +parsed) / constants.MS_IN_SECOND;
return asFloat ? output : absFloor.absFloor(output);
}
module.exports = diffInSeconds;
@@ -0,0 +1,88 @@
declare global {
// Declare empty stub interfaces for environments where "dom" lib is not included
// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface EventSource {}
// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface EventSourceInit {}
}
export interface EventSourcePolyfillInit {
withCredentials?: boolean;
lastEventIdQueryParameterName?: string;
heartbeatTimeout?: number;
headers?: { [name: string]: string };
Transport?: new() => any;
}
export interface Event {
type: string;
target: any;
}
export interface EventListener {
(evt: Event): void;
}
export interface EventListenerObject {
handleEvent(evt: Event): void;
}
export type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
export interface EventSourceEventMap {
"error": Event;
"message": MessageEvent;
"open": Event;
}
export interface MessageEvent extends Event {
data: any;
lastEventId: string;
}
export class EventSourcePolyfill {
static readonly CLOSED: 2;
static readonly CONNECTING: 0;
static readonly OPEN: 1;
constructor(url: string, options?: EventSourcePolyfillInit);
onerror: ((this: EventSource, ev: Event) => any) | null;
onmessage: ((this: EventSource, ev: MessageEvent) => any) | null;
onopen: ((this: EventSource, ev: Event) => any) | null;
readonly readyState: number;
readonly url: string;
readonly withCredentials: boolean;
readonly CLOSED: 2;
readonly CONNECTING: 0;
readonly OPEN: 1;
close(): void;
dispatchEvent(event: Event): boolean;
addEventListener<K extends keyof EventSourceEventMap>(
type: K,
listener: (this: EventSource, ev: EventSourceEventMap[K]) => any,
options?: any,
): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: any): void;
removeEventListener<K extends keyof EventSourceEventMap>(
type: K,
listener: (this: EventSource, ev: EventSourceEventMap[K]) => any,
options?: any,
): void;
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: any): void;
}
// defined as `type` to be compatible with typescript's lib.dom.d.ts
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
export type EventSourceConstructor = {
prototype: any;
new(url: string, eventSourceInitDict?: EventSourceInit): EventSource;
readonly CLOSED: number;
readonly CONNECTING: number;
readonly OPEN: number;
};
export const EventSource: EventSourceConstructor;
export const NativeEventSource: EventSourceConstructor;
@@ -0,0 +1,336 @@
'use strict';
var has = Object.prototype.hasOwnProperty
, prefix = '~';
/**
* Constructor to create a storage for our `EE` objects.
* An `Events` instance is a plain object whose properties are event names.
*
* @constructor
* @private
*/
function Events() {}
//
// We try to not inherit from `Object.prototype`. In some engines creating an
// instance in this way is faster than calling `Object.create(null)` directly.
// If `Object.create(null)` is not supported we prefix the event names with a
// character to make sure that the built-in object properties are not
// overridden or used as an attack vector.
//
if (Object.create) {
Events.prototype = Object.create(null);
//
// This hack is needed because the `__proto__` property is still inherited in
// some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.
//
if (!new Events().__proto__) prefix = false;
}
/**
* Representation of a single event listener.
*
* @param {Function} fn The listener function.
* @param {*} context The context to invoke the listener with.
* @param {Boolean} [once=false] Specify if the listener is a one-time listener.
* @constructor
* @private
*/
function EE(fn, context, once) {
this.fn = fn;
this.context = context;
this.once = once || false;
}
/**
* Add a listener for a given event.
*
* @param {EventEmitter} emitter Reference to the `EventEmitter` instance.
* @param {(String|Symbol)} event The event name.
* @param {Function} fn The listener function.
* @param {*} context The context to invoke the listener with.
* @param {Boolean} once Specify if the listener is a one-time listener.
* @returns {EventEmitter}
* @private
*/
function addListener(emitter, event, fn, context, once) {
if (typeof fn !== 'function') {
throw new TypeError('The listener must be a function');
}
var listener = new EE(fn, context || emitter, once)
, evt = prefix ? prefix + event : event;
if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;
else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);
else emitter._events[evt] = [emitter._events[evt], listener];
return emitter;
}
/**
* Clear event by name.
*
* @param {EventEmitter} emitter Reference to the `EventEmitter` instance.
* @param {(String|Symbol)} evt The Event name.
* @private
*/
function clearEvent(emitter, evt) {
if (--emitter._eventsCount === 0) emitter._events = new Events();
else delete emitter._events[evt];
}
/**
* Minimal `EventEmitter` interface that is molded against the Node.js
* `EventEmitter` interface.
*
* @constructor
* @public
*/
function EventEmitter() {
this._events = new Events();
this._eventsCount = 0;
}
/**
* Return an array listing the events for which the emitter has registered
* listeners.
*
* @returns {Array}
* @public
*/
EventEmitter.prototype.eventNames = function eventNames() {
var names = []
, events
, name;
if (this._eventsCount === 0) return names;
for (name in (events = this._events)) {
if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);
}
if (Object.getOwnPropertySymbols) {
return names.concat(Object.getOwnPropertySymbols(events));
}
return names;
};
/**
* Return the listeners registered for a given event.
*
* @param {(String|Symbol)} event The event name.
* @returns {Array} The registered listeners.
* @public
*/
EventEmitter.prototype.listeners = function listeners(event) {
var evt = prefix ? prefix + event : event
, handlers = this._events[evt];
if (!handlers) return [];
if (handlers.fn) return [handlers.fn];
for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {
ee[i] = handlers[i].fn;
}
return ee;
};
/**
* Return the number of listeners listening to a given event.
*
* @param {(String|Symbol)} event The event name.
* @returns {Number} The number of listeners.
* @public
*/
EventEmitter.prototype.listenerCount = function listenerCount(event) {
var evt = prefix ? prefix + event : event
, listeners = this._events[evt];
if (!listeners) return 0;
if (listeners.fn) return 1;
return listeners.length;
};
/**
* Calls each of the listeners registered for a given event.
*
* @param {(String|Symbol)} event The event name.
* @returns {Boolean} `true` if the event had listeners, else `false`.
* @public
*/
EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {
var evt = prefix ? prefix + event : event;
if (!this._events[evt]) return false;
var listeners = this._events[evt]
, len = arguments.length
, args
, i;
if (listeners.fn) {
if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);
switch (len) {
case 1: return listeners.fn.call(listeners.context), true;
case 2: return listeners.fn.call(listeners.context, a1), true;
case 3: return listeners.fn.call(listeners.context, a1, a2), true;
case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;
case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;
case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;
}
for (i = 1, args = new Array(len -1); i < len; i++) {
args[i - 1] = arguments[i];
}
listeners.fn.apply(listeners.context, args);
} else {
var length = listeners.length
, j;
for (i = 0; i < length; i++) {
if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);
switch (len) {
case 1: listeners[i].fn.call(listeners[i].context); break;
case 2: listeners[i].fn.call(listeners[i].context, a1); break;
case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;
case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;
default:
if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {
args[j - 1] = arguments[j];
}
listeners[i].fn.apply(listeners[i].context, args);
}
}
}
return true;
};
/**
* Add a listener for a given event.
*
* @param {(String|Symbol)} event The event name.
* @param {Function} fn The listener function.
* @param {*} [context=this] The context to invoke the listener with.
* @returns {EventEmitter} `this`.
* @public
*/
EventEmitter.prototype.on = function on(event, fn, context) {
return addListener(this, event, fn, context, false);
};
/**
* Add a one-time listener for a given event.
*
* @param {(String|Symbol)} event The event name.
* @param {Function} fn The listener function.
* @param {*} [context=this] The context to invoke the listener with.
* @returns {EventEmitter} `this`.
* @public
*/
EventEmitter.prototype.once = function once(event, fn, context) {
return addListener(this, event, fn, context, true);
};
/**
* Remove the listeners of a given event.
*
* @param {(String|Symbol)} event The event name.
* @param {Function} fn Only remove the listeners that match this function.
* @param {*} context Only remove the listeners that have this context.
* @param {Boolean} once Only remove one-time listeners.
* @returns {EventEmitter} `this`.
* @public
*/
EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {
var evt = prefix ? prefix + event : event;
if (!this._events[evt]) return this;
if (!fn) {
clearEvent(this, evt);
return this;
}
var listeners = this._events[evt];
if (listeners.fn) {
if (
listeners.fn === fn &&
(!once || listeners.once) &&
(!context || listeners.context === context)
) {
clearEvent(this, evt);
}
} else {
for (var i = 0, events = [], length = listeners.length; i < length; i++) {
if (
listeners[i].fn !== fn ||
(once && !listeners[i].once) ||
(context && listeners[i].context !== context)
) {
events.push(listeners[i]);
}
}
//
// Reset the array, or remove it completely if we have no more listeners.
//
if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;
else clearEvent(this, evt);
}
return this;
};
/**
* Remove all listeners, or those of the specified event.
*
* @param {(String|Symbol)} [event] The event name.
* @returns {EventEmitter} `this`.
* @public
*/
EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {
var evt;
if (event) {
evt = prefix ? prefix + event : event;
if (this._events[evt]) clearEvent(this, evt);
} else {
this._events = new Events();
this._eventsCount = 0;
}
return this;
};
//
// Alias methods names because people roll like that.
//
EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
EventEmitter.prototype.addListener = EventEmitter.prototype.on;
//
// Expose the prefix.
//
EventEmitter.prefixed = prefix;
//
// Allow `EventEmitter` to be imported as module namespace.
//
EventEmitter.EventEmitter = EventEmitter;
//
// Expose the module.
//
if ('undefined' !== typeof module) {
module.exports = EventEmitter;
}
@@ -0,0 +1 @@
{"mappings":";;AAmBA;IACE,8CAA8C;IAC9C,WAAW,EAAE,aAAa,CAAC;IAE3B,0CAA0C;IAC1C,UAAU,EAAE,aAAa,CAAA;CAC1B;AAED;;;GAGG;AACH,0BAA0B,KAAK,EAAE,eAAe,EAAE,GAAG,EAAE,UAAU,gBAAgB,GAAG,IAAI,CAAC,GAAG,UAAU,CA0DrG;AC7ED,YAAY,EAAC,eAAe,EAAC,MAAM,qBAAqB,CAAC","sources":["packages/@react-aria/dialog/src/packages/@react-aria/dialog/src/useDialog.ts","packages/@react-aria/dialog/src/packages/@react-aria/dialog/src/index.ts","packages/@react-aria/dialog/src/index.ts"],"sourcesContent":[null,null,"/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nexport {useDialog} from './useDialog';\nexport type {AriaDialogProps} from '@react-types/dialog';\nexport type {DialogAria} from './useDialog';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=ActivationsService.spec.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"chain.d.ts","sourceRoot":"","sources":["../../../../src/common/calculations/chain.ts"],"names":[],"mappings":"AAAA,wBAAiB,KAAK,CAAC,CAAC,EAAE,GAAG,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,QAAQ,CAAC,CAAC,CAAC,CAIlE"}
@@ -0,0 +1,68 @@
{
"name": "@borewit/text-codec",
"version": "0.1.1",
"description": "Text Decoder",
"type": "module",
"exports": "./lib/index.js",
"types": "lib/index.d.ts",
"files": [
"lib/index.js",
"lib/index.d.ts"
],
"scripts": {
"clean": "del-cli lib/**/*.js lib/***.js.map test/**/*.d.ts test/**/*.js test/**/*.js.map",
"build": "npm run compile",
"compile:src": "tsc --p lib --sourceMap false",
"compile:test": "tsc --p test",
"compile": "npm run compile:src && npm run compile:test",
"lint": "biome check",
"test": "mocha",
"update-biome": "npm install --save-dev --save-exact @biomejs/biome && npx @biomejs/biome migrate --write"
},
"devDependencies": {
"@biomejs/biome": "2.1.4",
"@types/chai": "^5.2.2",
"@types/mocha": "^10.0.10",
"chai": "^5.2.1",
"mocha": "^11.7.1",
"ts-node": "^10.9.2",
"typescript": "^5.9.2"
},
"keywords": [
"TextDecoder",
"TextEncoder",
"decoder",
"decoding",
"encod",
"encoding",
"decode",
"text",
"ascii",
"utf-8",
"utf8",
"utf-16le",
"latin1",
"iso-8859-1",
"windows-1252",
"charset",
"encoding",
"decoding",
"polyfill",
"character-set",
"latin",
"hermes"
],
"repository": {
"type": "git",
"url": "https://github.com/Borewit/text-codec"
},
"author": {
"name": "Borewit",
"url": "https://github.com/Borewit"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/Borewit"
},
"license": "MIT"
}
@@ -0,0 +1,100 @@
export { AsyncMotionValueAnimation } from './animation/AsyncMotionValueAnimation.mjs';
export { GroupAnimation } from './animation/GroupAnimation.mjs';
export { GroupAnimationWithThen } from './animation/GroupAnimationWithThen.mjs';
export { JSAnimation, animateValue } from './animation/JSAnimation.mjs';
export { NativeAnimation } from './animation/NativeAnimation.mjs';
export { NativeAnimationExtended } from './animation/NativeAnimationExtended.mjs';
export { NativeAnimationWrapper } from './animation/NativeAnimationWrapper.mjs';
export { animationMapKey, getAnimationMap } from './animation/utils/active-animations.mjs';
export { getVariableValue, parseCSSVariable } from './animation/utils/css-variables-conversion.mjs';
export { getValueTransition } from './animation/utils/get-value-transition.mjs';
export { isCSSVariableName, isCSSVariableToken } from './animation/utils/is-css-variable.mjs';
export { makeAnimationInstant } from './animation/utils/make-animation-instant.mjs';
export { inertia } from './animation/generators/inertia.mjs';
export { defaultEasing, keyframes } from './animation/generators/keyframes.mjs';
export { spring } from './animation/generators/spring/index.mjs';
export { calcGeneratorDuration, maxGeneratorDuration } from './animation/generators/utils/calc-duration.mjs';
export { createGeneratorEasing } from './animation/generators/utils/create-generator-easing.mjs';
export { isGenerator } from './animation/generators/utils/is-generator.mjs';
export { DOMKeyframesResolver } from './animation/keyframes/DOMKeyframesResolver.mjs';
export { KeyframeResolver, flushKeyframeResolvers } from './animation/keyframes/KeyframesResolver.mjs';
export { defaultOffset } from './animation/keyframes/offsets/default.mjs';
export { fillOffset } from './animation/keyframes/offsets/fill.mjs';
export { convertOffsetToTimes } from './animation/keyframes/offsets/time.mjs';
export { applyPxDefaults } from './animation/keyframes/utils/apply-px-defaults.mjs';
export { fillWildcards } from './animation/keyframes/utils/fill-wildcards.mjs';
export { cubicBezierAsString } from './animation/waapi/easing/cubic-bezier.mjs';
export { isWaapiSupportedEasing } from './animation/waapi/easing/is-supported.mjs';
export { mapEasingToNativeEasing } from './animation/waapi/easing/map-easing.mjs';
export { supportedWaapiEasing } from './animation/waapi/easing/supported.mjs';
export { startWaapiAnimation } from './animation/waapi/start-waapi-animation.mjs';
export { supportsPartialKeyframes } from './animation/waapi/supports/partial-keyframes.mjs';
export { supportsBrowserAnimation } from './animation/waapi/supports/waapi.mjs';
export { acceleratedValues } from './animation/waapi/utils/accelerated-values.mjs';
export { applyGeneratorOptions } from './animation/waapi/utils/apply-generator.mjs';
export { generateLinearEasing } from './animation/waapi/utils/linear.mjs';
export { addAttrValue, attrEffect } from './effects/attr/index.mjs';
export { propEffect } from './effects/prop/index.mjs';
export { addStyleValue, styleEffect } from './effects/style/index.mjs';
export { svgEffect } from './effects/svg/index.mjs';
export { createRenderBatcher } from './frameloop/batcher.mjs';
export { cancelMicrotask, microtask } from './frameloop/microtask.mjs';
export { time } from './frameloop/sync-time.mjs';
export { isDragActive, isDragging } from './gestures/drag/state/is-active.mjs';
export { setDragLock } from './gestures/drag/state/set-active.mjs';
export { hover } from './gestures/hover.mjs';
export { press } from './gestures/press/index.mjs';
export { isNodeOrChild } from './gestures/utils/is-node-or-child.mjs';
export { isPrimaryPointer } from './gestures/utils/is-primary-pointer.mjs';
export { defaultTransformValue, parseValueFromTransform, readTransformValue } from './render/dom/parse-transform.mjs';
export { getComputedStyle } from './render/dom/style-computed.mjs';
export { setStyle } from './render/dom/style-set.mjs';
export { positionalKeys } from './render/utils/keys-position.mjs';
export { transformPropOrder, transformProps } from './render/utils/keys-transform.mjs';
export { resize } from './resize/index.mjs';
export { observeTimeline } from './scroll/observe.mjs';
export { recordStats } from './stats/index.mjs';
export { activeAnimations } from './stats/animation-count.mjs';
export { statsBuffer } from './stats/buffer.mjs';
export { interpolate } from './utils/interpolate.mjs';
export { isHTMLElement } from './utils/is-html-element.mjs';
export { isSVGElement } from './utils/is-svg-element.mjs';
export { isSVGSVGElement } from './utils/is-svg-svg-element.mjs';
export { mix } from './utils/mix/index.mjs';
export { mixColor, mixLinearColor } from './utils/mix/color.mjs';
export { getMixer, mixArray, mixComplex, mixObject } from './utils/mix/complex.mjs';
export { mixImmediate } from './utils/mix/immediate.mjs';
export { mixNumber } from './utils/mix/number.mjs';
export { invisibleValues, mixVisibility } from './utils/mix/visibility.mjs';
export { resolveElements } from './utils/resolve-elements.mjs';
export { getOriginIndex, stagger } from './utils/stagger.mjs';
export { supportsFlags } from './utils/supports/flags.mjs';
export { supportsLinearEasing } from './utils/supports/linear-easing.mjs';
export { supportsScrollTimeline } from './utils/supports/scroll-timeline.mjs';
export { transform } from './utils/transform.mjs';
export { MotionValue, collectMotionValues, motionValue } from './value/index.mjs';
export { mapValue } from './value/map-value.mjs';
export { attachSpring, springValue } from './value/spring-value.mjs';
export { transformValue } from './value/transform-value.mjs';
export { color } from './value/types/color/index.mjs';
export { hex } from './value/types/color/hex.mjs';
export { hsla } from './value/types/color/hsla.mjs';
export { hslaToRgba } from './value/types/color/hsla-to-rgba.mjs';
export { rgbUnit, rgba } from './value/types/color/rgba.mjs';
export { analyseComplexValue, complex } from './value/types/complex/index.mjs';
export { dimensionValueTypes, findDimensionValueType } from './value/types/dimensions.mjs';
export { defaultValueTypes, getDefaultValueType } from './value/types/maps/defaults.mjs';
export { numberValueTypes } from './value/types/maps/number.mjs';
export { transformValueTypes } from './value/types/maps/transform.mjs';
export { alpha, number, scale } from './value/types/numbers/index.mjs';
export { degrees, percent, progressPercentage, px, vh, vw } from './value/types/numbers/units.mjs';
export { testValueType } from './value/types/test.mjs';
export { getAnimatableNone } from './value/types/utils/animatable-none.mjs';
export { findValueType } from './value/types/utils/find.mjs';
export { getValueAsType } from './value/types/utils/get-as-type.mjs';
export { isMotionValue } from './value/utils/is-motion-value.mjs';
export { ViewTransitionBuilder, animateView } from './view/index.mjs';
export { getViewAnimationLayerInfo } from './view/utils/get-layer-info.mjs';
export { getViewAnimations } from './view/utils/get-view-animations.mjs';
export { cancelSync, sync } from './frameloop/index-legacy.mjs';
export { cancelFrame, frame, frameData, frameSteps } from './frameloop/frame.mjs';
@@ -0,0 +1,51 @@
'use strict';
var through = require('through2');
var removeBom = require('remove-bom-buffer');
var SafeBuffer = require('safe-buffer').Buffer;
function removeBomStream() {
var completed = false;
var buffer = SafeBuffer.alloc(0);
return through(onChunk, onFlush);
function removeAndCleanup(data) {
completed = true;
buffer = null;
return removeBom(data);
}
function onChunk(data, enc, cb) {
if (completed) {
return cb(null, data);
}
if (data.length >= 7) {
return cb(null, removeAndCleanup(data));
}
var bufferLength = buffer.length;
var chunkLength = data.length;
var totalLength = bufferLength + chunkLength;
buffer = SafeBuffer.concat([buffer, data], totalLength);
if (totalLength >= 7) {
return cb(null, removeAndCleanup(buffer));
}
cb();
}
function onFlush(cb) {
if (completed || !buffer) {
return cb();
}
cb(null, removeAndCleanup(buffer));
}
}
module.exports = removeBomStream;
@@ -0,0 +1,20 @@
import type { CredentialDeviceType } from '../types/index.js';
/**
* Make sense of Bits 3 and 4 in authenticator indicating:
*
* - Whether the credential can be used on multiple devices
* - Whether the credential is backed up or not
*
* Invalid configurations will raise an `Error`
*/
export declare function parseBackupFlags({ be, bs }: {
be: boolean;
bs: boolean;
}): {
credentialDeviceType: CredentialDeviceType;
credentialBackedUp: boolean;
};
export declare class InvalidBackupFlags extends Error {
constructor(message: string);
}
//# sourceMappingURL=parseBackupFlags.d.ts.map
@@ -0,0 +1,14 @@
module.exports = {
"ascending": `aufsteigend`,
"ascendingSort": (args)=>`sortiert nach Spalte ${args.columnName} in aufsteigender Reihenfolge`,
"columnSize": (args)=>`${args.value} Pixel`,
"descending": `absteigend`,
"descendingSort": (args)=>`sortiert nach Spalte ${args.columnName} in absteigender Reihenfolge`,
"resizerDescription": `Eingabetaste zum Starten der Gr\xf6\xdfen\xe4nderung dr\xfccken`,
"select": `Ausw\xe4hlen`,
"selectAll": `Alles ausw\xe4hlen`,
"sortable": `sortierbare Spalte`
};
//# sourceMappingURL=de-DE.main.js.map
@@ -0,0 +1,28 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
/**
* @file 复合图元标记位
* @author mengke01(kekee000@gmail.com)
*
* 复合图元标记位
* https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6glyf.html
*/
var _default = exports.default = {
ARG_1_AND_2_ARE_WORDS: 0x01,
ARGS_ARE_XY_VALUES: 0x02,
ROUND_XY_TO_GRID: 0x04,
WE_HAVE_A_SCALE: 0x08,
RESERVED: 0x10,
MORE_COMPONENTS: 0x20,
WE_HAVE_AN_X_AND_Y_SCALE: 0x40,
WE_HAVE_A_TWO_BY_TWO: 0x80,
WE_HAVE_INSTRUCTIONS: 0x100,
USE_MY_METRICS: 0x200,
OVERLAP_COMPOUND: 0x400,
SCALED_COMPONENT_OFFSET: 0x800,
UNSCALED_COMPONENT_OFFSET: 0x1000
};
@@ -0,0 +1,121 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/// <reference no-default-lib="true"/>
interface Array<T> {
/**
* Returns the item located at the specified index.
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
*/
at(index: number): T | undefined;
}
interface ReadonlyArray<T> {
/**
* Returns the item located at the specified index.
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
*/
at(index: number): T | undefined;
}
interface Int8Array<TArrayBuffer extends ArrayBufferLike> {
/**
* Returns the item located at the specified index.
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
*/
at(index: number): number | undefined;
}
interface Uint8Array<TArrayBuffer extends ArrayBufferLike> {
/**
* Returns the item located at the specified index.
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
*/
at(index: number): number | undefined;
}
interface Uint8ClampedArray<TArrayBuffer extends ArrayBufferLike> {
/**
* Returns the item located at the specified index.
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
*/
at(index: number): number | undefined;
}
interface Int16Array<TArrayBuffer extends ArrayBufferLike> {
/**
* Returns the item located at the specified index.
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
*/
at(index: number): number | undefined;
}
interface Uint16Array<TArrayBuffer extends ArrayBufferLike> {
/**
* Returns the item located at the specified index.
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
*/
at(index: number): number | undefined;
}
interface Int32Array<TArrayBuffer extends ArrayBufferLike> {
/**
* Returns the item located at the specified index.
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
*/
at(index: number): number | undefined;
}
interface Uint32Array<TArrayBuffer extends ArrayBufferLike> {
/**
* Returns the item located at the specified index.
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
*/
at(index: number): number | undefined;
}
interface Float32Array<TArrayBuffer extends ArrayBufferLike> {
/**
* Returns the item located at the specified index.
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
*/
at(index: number): number | undefined;
}
interface Float64Array<TArrayBuffer extends ArrayBufferLike> {
/**
* Returns the item located at the specified index.
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
*/
at(index: number): number | undefined;
}
interface BigInt64Array<TArrayBuffer extends ArrayBufferLike> {
/**
* Returns the item located at the specified index.
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
*/
at(index: number): bigint | undefined;
}
interface BigUint64Array<TArrayBuffer extends ArrayBufferLike> {
/**
* Returns the item located at the specified index.
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
*/
at(index: number): bigint | undefined;
}
@@ -0,0 +1,36 @@
"use strict"
const {
definePrototypeMethodHandler,
} = require("../util/define-prototype-method-handler")
module.exports = {
meta: {
docs: {
description:
"disallow the `DateTimeFormat.prototype.formatToParts` method.",
category: "ES2017-Intl-API",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-intl-datetimeformat-prototype-formattoparts.html",
},
fixable: null,
messages: {
forbidden: "ES2017 Intl API '{{name}}' method is forbidden.",
},
schema: [
{
type: "object",
properties: {
aggressive: { type: "boolean" },
},
additionalProperties: false,
},
],
type: "problem",
},
create(context) {
return definePrototypeMethodHandler(context, {
"Intl.DateTimeFormat": ["formatToParts"],
})
},
}
@@ -0,0 +1,53 @@
/*
* 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.
*/ const $6db58dc88e78b024$var$pluralRulesCache = new Map();
const $6db58dc88e78b024$var$numberFormatCache = new Map();
class $6db58dc88e78b024$export$2f817fcdc4b89ae0 {
/** Formats a localized string for the given key with the provided variables. */ format(key, variables) {
let message = this.strings.getStringForLocale(key, this.locale);
return typeof message === 'function' ? message(variables, this) : message;
}
plural(count, options, type = 'cardinal') {
let opt = options['=' + count];
if (opt) return typeof opt === 'function' ? opt() : opt;
let key = this.locale + ':' + type;
let pluralRules = $6db58dc88e78b024$var$pluralRulesCache.get(key);
if (!pluralRules) {
pluralRules = new Intl.PluralRules(this.locale, {
type: type
});
$6db58dc88e78b024$var$pluralRulesCache.set(key, pluralRules);
}
let selected = pluralRules.select(count);
opt = options[selected] || options.other;
return typeof opt === 'function' ? opt() : opt;
}
number(value) {
let numberFormat = $6db58dc88e78b024$var$numberFormatCache.get(this.locale);
if (!numberFormat) {
numberFormat = new Intl.NumberFormat(this.locale);
$6db58dc88e78b024$var$numberFormatCache.set(this.locale, numberFormat);
}
return numberFormat.format(value);
}
select(options, value) {
let opt = options[value] || options.other;
return typeof opt === 'function' ? opt() : opt;
}
constructor(locale, strings){
this.locale = locale;
this.strings = strings;
}
}
export {$6db58dc88e78b024$export$2f817fcdc4b89ae0 as LocalizedStringFormatter};
//# sourceMappingURL=LocalizedStringFormatter.module.js.map
@@ -0,0 +1,120 @@
// Czech [cs]
import dayjs from '../index';
function plural(n) {
return n > 1 && n < 5 && ~~(n / 10) !== 1; // eslint-disable-line
}
/* eslint-disable */
function translate(number, withoutSuffix, key, isFuture) {
var result = number + " ";
switch (key) {
case 's':
// a few seconds / in a few seconds / a few seconds ago
return withoutSuffix || isFuture ? 'pár sekund' : 'pár sekundami';
case 'm':
// a minute / in a minute / a minute ago
return withoutSuffix ? 'minuta' : isFuture ? 'minutu' : 'minutou';
case 'mm':
// 9 minutes / in 9 minutes / 9 minutes ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'minuty' : 'minut');
}
return result + "minutami";
case 'h':
// an hour / in an hour / an hour ago
return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';
case 'hh':
// 9 hours / in 9 hours / 9 hours ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'hodiny' : 'hodin');
}
return result + "hodinami";
case 'd':
// a day / in a day / a day ago
return withoutSuffix || isFuture ? 'den' : 'dnem';
case 'dd':
// 9 days / in 9 days / 9 days ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'dny' : 'dní');
}
return result + "dny";
case 'M':
// a month / in a month / a month ago
return withoutSuffix || isFuture ? 'měsíc' : 'měsícem';
case 'MM':
// 9 months / in 9 months / 9 months ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'měsíce' : 'měsíců');
}
return result + "m\u011Bs\xEDci";
case 'y':
// a year / in a year / a year ago
return withoutSuffix || isFuture ? 'rok' : 'rokem';
case 'yy':
// 9 years / in 9 years / 9 years ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'roky' : 'let');
}
return result + "lety";
}
}
/* eslint-enable */
var locale = {
name: 'cs',
weekdays: 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'),
weekdaysShort: 'ne_po_út_st_čt_pá_so'.split('_'),
weekdaysMin: 'ne_po_út_st_čt_pá_so'.split('_'),
months: 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split('_'),
monthsShort: 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_'),
weekStart: 1,
yearStart: 4,
ordinal: function ordinal(n) {
return n + ".";
},
formats: {
LT: 'H:mm',
LTS: 'H:mm:ss',
L: 'DD.MM.YYYY',
LL: 'D. MMMM YYYY',
LLL: 'D. MMMM YYYY H:mm',
LLLL: 'dddd D. MMMM YYYY H:mm',
l: 'D. M. YYYY'
},
relativeTime: {
future: 'za %s',
past: 'před %s',
s: translate,
m: translate,
mm: translate,
h: translate,
hh: translate,
d: translate,
dd: translate,
M: translate,
MM: translate,
y: translate,
yy: translate
}
};
dayjs.locale(locale, null, true);
export default locale;
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;GAkBG;AACH,2CALW,MAAM,GAEJ,MAAM,CAmBlB"}
@@ -0,0 +1,12 @@
# `@typescript-eslint/parser`
> An ESLint parser which leverages <a href="https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/typescript-estree">TypeScript ESTree</a> to allow for ESLint to lint TypeScript source code.
[![NPM Version](https://img.shields.io/npm/v/@typescript-eslint/parser.svg?style=flat-square)](https://www.npmjs.com/package/@typescript-eslint/parser)
[![NPM Downloads](https://img.shields.io/npm/dm/@typescript-eslint/parser.svg?style=flat-square)](https://www.npmjs.com/package/@typescript-eslint/parser)
👉 See **https://typescript-eslint.io/packages/parser** for documentation on this package.
> See https://typescript-eslint.io for general documentation on typescript-eslint, the tooling that allows you to run ESLint and Prettier on TypeScript code.
<!-- Local path for docs: docs/packages/Parser.mdx -->
@@ -0,0 +1,26 @@
'use strict';
var $TypeError = require('es-errors/type');
var substring = require('./substring');
var isMatchRecord = require('../helpers/records/match-record');
// https://262.ecma-international.org/13.0/#sec-getmatchstring
module.exports = function GetMatchString(S, match) {
if (typeof S !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a String');
}
if (!isMatchRecord(match)) {
throw new $TypeError('Assertion failed: `match` must be a Match Record');
}
if (!(match['[[StartIndex]]'] <= S.length)) {
throw new $TypeError('`match` [[StartIndex]] must be a non-negative integer <= the length of S');
}
if (!(match['[[EndIndex]]'] <= S.length)) {
throw new $TypeError('`match` [[EndIndex]] must be an integer between [[StartIndex]] and the length of S, inclusive');
}
return substring(S, match['[[StartIndex]]'], match['[[EndIndex]]']);
};
@@ -0,0 +1,84 @@
/**
* @file ttf2eot
* @author junmer
*/
/* eslint-env node */
var isTtf = require('is-ttf');
var through = require('through2');
var ttf2eot = require('fonteditor-core').ttf2eot;
var b2ab = require('b3b').b2ab;
var ab2b = require('b3b').ab2b;
var replaceExt = require('replace-ext');
var _ = require('lodash');
function compileTtf(buffer, cb) {
var output;
try {
output = ab2b(ttf2eot(b2ab(buffer)));
}
catch (ex) {
cb(ex);
}
output && cb(null, output);
}
/**
* ttf2eot fontmin plugin
*
* @param {Object} opts opts
* @return {Object} stream.Transform instance
* @api public
*/
module.exports = function (opts) {
opts = _.extend({clone: true}, opts);
return through.ctor({
objectMode: true
}, function (file, enc, cb) {
// check null
if (file.isNull()) {
cb(null, file);
return;
}
// check stream
if (file.isStream()) {
cb(new Error('Streaming is not supported'));
return;
}
// check ttf
if (!isTtf(file.contents)) {
cb(null, file);
return;
}
// clone
if (opts.clone) {
this.push(file.clone(false));
}
// replace ext
file.path = replaceExt(file.path, '.eot');
compileTtf(file.contents, function (err, buffer) {
if (err) {
cb(err);
return;
}
file.contents = buffer;
cb(null, file);
});
});
};
@@ -0,0 +1 @@
{"version":3,"names":["TSTypeAnnotation","node","parent","token","type","typeAnnotation","space","optional","print","TSTypeParameterInstantiation","printTrailingSeparator","params","length","tokenMap","start","end","find","t","matchesOriginal","shouldPrintTrailingComma","printList","TSTypeParameter","const","word","in","out","name","constraint","default","TSParameterProperty","accessibility","readonly","_param","parameter","TSDeclareFunction","declare","_functionHead","semicolon","TSDeclareMethod","_classMethodHead","TSQualifiedName","left","right","TSCallSignatureDeclaration","tsPrintSignatureDeclarationBase","maybePrintTrailingCommaOrSemicolon","printer","endMatches","TSConstructSignatureDeclaration","TSPropertySignature","tsPrintPropertyOrMethodName","computed","key","TSMethodSignature","kind","TSIndexSignature","static","isStatic","_parameters","parameters","TSAnyKeyword","TSBigIntKeyword","TSUnknownKeyword","TSNumberKeyword","TSObjectKeyword","TSBooleanKeyword","TSStringKeyword","TSSymbolKeyword","TSVoidKeyword","TSUndefinedKeyword","TSNullKeyword","TSNeverKeyword","TSIntrinsicKeyword","TSThisType","TSFunctionType","tsPrintFunctionOrConstructorType","TSConstructorType","abstract","typeParameters","returnType","TSTypeReference","typeArguments","typeName","TSTypePredicate","asserts","parameterName","TSTypeQuery","exprName","TSTypeLiteral","printBraced","printJoin","members","TSArrayType","elementType","TSTupleType","elementTypes","TSOptionalType","TSRestType","TSNamedTupleMember","label","TSUnionType","tsPrintUnionOrIntersectionType","TSIntersectionType","sep","_printer$tokenMap","hasLeadingToken","startMatches","types","undefined","i","TSConditionalType","checkType","extendsType","trueType","falseType","TSInferType","typeParameter","TSParenthesizedType","TSTypeOperator","operator","TSIndexedAccessType","objectType","indexType","TSMappedType","nameType","exit","enterDelimited","tokenIfPlusMinus","self","tok","TSTemplateLiteralType","_printTemplate","TSLiteralType","literal","TSClassImplements","expression","TSInterfaceDeclaration","id","extends","extendz","body","TSInterfaceBody","TSTypeAliasDeclaration","TSTypeExpression","TSTypeAssertion","TSInstantiationExpression","TSEnumDeclaration","isConst","TSEnumBody","call","_this$shouldPrintTrai","TSEnumMember","initializer","TSModuleDeclaration","global","TSModuleBlock","printSequence","TSImportType","argument","qualifier","options","TSImportEqualsDeclaration","moduleReference","isExport","TSExternalModuleReference","TSNonNullExpression","TSExportAssignment","TSNamespaceExportDeclaration","tsPrintClassMemberModifiers","isPrivateField","isPublicField","printModifiersList","override","cb","rightBrace","modifiers","_printer$tokenMap2","modifiersSet","Set","modifier","add","has","value","delete","size"],"sources":["../../src/generators/typescript.ts"],"sourcesContent":["import type Printer from \"../printer.ts\";\nimport type * as t from \"@babel/types\";\n\nexport function TSTypeAnnotation(\n this: Printer,\n node: t.TSTypeAnnotation,\n parent: t.Node,\n) {\n // TODO(@nicolo-ribaudo): investigate not including => in the range\n // of the return type of an arrow function type\n this.token(\n (parent.type === \"TSFunctionType\" || parent.type === \"TSConstructorType\") &&\n (process.env.BABEL_8_BREAKING\n ? // @ts-ignore(Babel 7 vs Babel 8) Babel 8 AST shape\n parent.returnType\n : // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST shape\n parent.typeAnnotation) === node\n ? \"=>\"\n : \":\",\n );\n this.space();\n // @ts-expect-error todo(flow->ts) can this be removed? `.optional` looks to be not existing property\n if (node.optional) this.token(\"?\");\n this.print(node.typeAnnotation);\n}\n\nexport function TSTypeParameterInstantiation(\n this: Printer,\n node: t.TSTypeParameterInstantiation,\n parent: t.Node,\n): void {\n this.token(\"<\");\n\n let printTrailingSeparator: boolean | null =\n parent.type === \"ArrowFunctionExpression\" && node.params.length === 1;\n if (this.tokenMap && node.start != null && node.end != null) {\n // Only force the trailing comma for pre-existing nodes if they\n // already had a comma (either because they were multi-param, or\n // because they had a trailing comma)\n printTrailingSeparator &&= !!this.tokenMap.find(node, t =>\n this.tokenMap!.matchesOriginal(t, \",\"),\n );\n // Preserve the trailing comma if it was there before\n printTrailingSeparator ||= this.shouldPrintTrailingComma(\">\");\n }\n\n this.printList(node.params, printTrailingSeparator);\n this.token(\">\");\n}\n\nexport { TSTypeParameterInstantiation as TSTypeParameterDeclaration };\n\nexport function TSTypeParameter(this: Printer, node: t.TSTypeParameter) {\n if (node.const) {\n this.word(\"const\");\n this.space();\n }\n\n if (node.in) {\n this.word(\"in\");\n this.space();\n }\n\n if (node.out) {\n this.word(\"out\");\n this.space();\n }\n\n Line truncated
@@ -0,0 +1,49 @@
import createPadding from './_createPadding.js';
import stringSize from './_stringSize.js';
import toInteger from './toInteger.js';
import toString from './toString.js';
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeCeil = Math.ceil,
nativeFloor = Math.floor;
/**
* Pads `string` on the left and right sides if it's shorter than `length`.
* Padding characters are truncated if they can't be evenly divided by `length`.
*
* @static
* @memberOf _
* @since 3.0.0
* @category String
* @param {string} [string=''] The string to pad.
* @param {number} [length=0] The padding length.
* @param {string} [chars=' '] The string used as padding.
* @returns {string} Returns the padded string.
* @example
*
* _.pad('abc', 8);
* // => ' abc '
*
* _.pad('abc', 8, '_-');
* // => '_-abc_-_'
*
* _.pad('abc', 3);
* // => 'abc'
*/
function pad(string, length, chars) {
string = toString(string);
length = toInteger(length);
var strLength = length ? stringSize(string) : 0;
if (!length || strLength >= length) {
return string;
}
var mid = (length - strLength) / 2;
return (
createPadding(nativeFloor(mid), chars) +
string +
createPadding(nativeCeil(mid), chars)
);
}
export default pad;
@@ -0,0 +1,47 @@
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<HTMLCodeStyleSettings>
<option name="HTML_SPACE_INSIDE_EMPTY_TAG" value="true" />
<option name="HTML_ENFORCE_QUOTES" value="true" />
</HTMLCodeStyleSettings>
<JSCodeStyleSettings version="0">
<option name="FORCE_SEMICOLON_STYLE" value="true" />
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
<option name="FORCE_QUOTE_STYlE" value="true" />
<option name="ENFORCE_TRAILING_COMMA" value="Remove" />
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
<option name="SPACES_WITHIN_IMPORTS" value="true" />
</JSCodeStyleSettings>
<TypeScriptCodeStyleSettings version="0">
<option name="FORCE_SEMICOLON_STYLE" value="true" />
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
<option name="FORCE_QUOTE_STYlE" value="true" />
<option name="ENFORCE_TRAILING_COMMA" value="Remove" />
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
<option name="SPACES_WITHIN_IMPORTS" value="true" />
</TypeScriptCodeStyleSettings>
<VueCodeStyleSettings>
<option name="INTERPOLATION_NEW_LINE_AFTER_START_DELIMITER" value="false" />
<option name="INTERPOLATION_NEW_LINE_BEFORE_END_DELIMITER" value="false" />
</VueCodeStyleSettings>
<codeStyleSettings language="HTML">
<option name="SOFT_MARGINS" value="100" />
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="JavaScript">
<option name="SOFT_MARGINS" value="100" />
</codeStyleSettings>
<codeStyleSettings language="TypeScript">
<option name="SOFT_MARGINS" value="100" />
</codeStyleSettings>
<codeStyleSettings language="Vue">
<option name="SOFT_MARGINS" value="100" />
<indentOptions>
<option name="INDENT_SIZE" value="4" />
<option name="TAB_SIZE" value="4" />
</indentOptions>
</codeStyleSettings>
</code_scheme>
</component>
@@ -0,0 +1,17 @@
import { ClassList } from "./class_list";
import { SecurityCategory } from "./security_category";
/**
* ```asn1
* Clearance ::= SEQUENCE {
* policyId OBJECT IDENTIFIER,
* classList ClassList DEFAULT {unclassified},
* securityCategories SET OF SecurityCategory OPTIONAL
* }
* ```
*/
export declare class Clearance {
policyId: string;
classList: ClassList;
securityCategories?: SecurityCategory[];
constructor(params?: Partial<Clearance>);
}
@@ -0,0 +1,22 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Op;
(function (Op) {
function length(op) {
if (typeof op.delete === 'number') {
return op.delete;
}
else if (typeof op.retain === 'number') {
return op.retain;
}
else if (typeof op.retain === 'object' && op.retain !== null) {
return 1;
}
else {
return typeof op.insert === 'string' ? op.insert.length : 1;
}
}
Op.length = length;
})(Op || (Op = {}));
exports.default = Op;
//# sourceMappingURL=Op.js.map
@@ -0,0 +1,63 @@
import {TreeCollection as $05ca4cd7c4a5a999$export$863faf230ee2118a} from "./TreeCollection.module.js";
import {useMultipleSelectionState as $75HV2$useMultipleSelectionState, SelectionManager as $75HV2$SelectionManager} from "@react-stately/selection";
import {useMemo as $75HV2$useMemo, useCallback as $75HV2$useCallback, useEffect as $75HV2$useEffect} from "react";
import {useCollection as $75HV2$useCollection} from "@react-stately/collections";
import {useControlledState as $75HV2$useControlledState} from "@react-stately/utils";
/*
* 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 $875d6693e12af071$export$728d6ba534403756(props) {
let { onExpandedChange: onExpandedChange } = props;
let [expandedKeys, setExpandedKeys] = (0, $75HV2$useControlledState)(props.expandedKeys ? new Set(props.expandedKeys) : undefined, props.defaultExpandedKeys ? new Set(props.defaultExpandedKeys) : new Set(), onExpandedChange);
let selectionState = (0, $75HV2$useMultipleSelectionState)(props);
let disabledKeys = (0, $75HV2$useMemo)(()=>props.disabledKeys ? new Set(props.disabledKeys) : new Set(), [
props.disabledKeys
]);
let tree = (0, $75HV2$useCollection)(props, (0, $75HV2$useCallback)((nodes)=>new (0, $05ca4cd7c4a5a999$export$863faf230ee2118a)(nodes, {
expandedKeys: expandedKeys
}), [
expandedKeys
]), null);
// Reset focused key if that item is deleted from the collection.
(0, $75HV2$useEffect)(()=>{
if (selectionState.focusedKey != null && !tree.getItem(selectionState.focusedKey)) selectionState.setFocusedKey(null);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [
tree,
selectionState.focusedKey
]);
let onToggle = (key)=>{
setExpandedKeys($875d6693e12af071$var$toggleKey(expandedKeys, key));
};
return {
collection: tree,
expandedKeys: expandedKeys,
disabledKeys: disabledKeys,
toggleKey: onToggle,
setExpandedKeys: setExpandedKeys,
selectionManager: new (0, $75HV2$SelectionManager)(tree, selectionState)
};
}
function $875d6693e12af071$var$toggleKey(set, key) {
let res = new Set(set);
if (res.has(key)) res.delete(key);
else res.add(key);
return res;
}
export {$875d6693e12af071$export$728d6ba534403756 as useTreeState};
//# sourceMappingURL=useTreeState.module.js.map
@@ -0,0 +1,205 @@
import { __assign, __read, __rest, __spreadArray } from "tslib";
import { useEffect, useRef, useState } from 'react';
import useMemoizedFn from '../useMemoizedFn';
import usePagination from '../usePagination';
import useUpdateEffect from '../useUpdateEffect';
var useAntdTable = function (service, options) {
var _a;
if (options === void 0) { options = {}; }
var form = options.form, _b = options.defaultType, defaultType = _b === void 0 ? 'simple' : _b, defaultParams = options.defaultParams, _c = options.manual, manual = _c === void 0 ? false : _c, _d = options.refreshDeps, refreshDeps = _d === void 0 ? [] : _d, _e = options.ready, ready = _e === void 0 ? true : _e, rest = __rest(options, ["form", "defaultType", "defaultParams", "manual", "refreshDeps", "ready"]);
var result = usePagination(service, __assign(__assign({ ready: ready, manual: true }, rest), { onSuccess: function () {
var _a;
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
// eslint-disable-next-line @typescript-eslint/no-use-before-define
runSuccessRef.current = true;
(_a = rest.onSuccess) === null || _a === void 0 ? void 0 : _a.call.apply(_a, __spreadArray([rest], __read(args), false));
} }));
var _f = result.params, params = _f === void 0 ? [] : _f, run = result.run;
var cacheFormTableData = params[2] || {};
var _g = __read(useState((cacheFormTableData === null || cacheFormTableData === void 0 ? void 0 : cacheFormTableData.type) || defaultType), 2), type = _g[0], setType = _g[1];
var allFormDataRef = useRef({});
var defaultDataSourceRef = useRef([]);
var runSuccessRef = useRef(false);
var isAntdV4 = !!(form === null || form === void 0 ? void 0 : form.getInternalHooks);
// get current active field values
var getActiveFieldValues = function () {
if (!form) {
return {};
}
// antd 4
if (isAntdV4) {
return form.getFieldsValue(null, function () { return true; });
}
// antd 3
var allFieldsValue = form.getFieldsValue();
var activeFieldsValue = {};
Object.keys(allFieldsValue).forEach(function (key) {
if (form.getFieldInstance ? form.getFieldInstance(key) : true) {
activeFieldsValue[key] = allFieldsValue[key];
}
});
return activeFieldsValue;
};
var validateFields = function () {
if (!form) {
return Promise.resolve({});
}
var activeFieldsValue = getActiveFieldValues();
var fields = Object.keys(activeFieldsValue);
// antd 4
if (isAntdV4) {
return form.validateFields(fields);
}
// antd 3
return new Promise(function (resolve, reject) {
form.validateFields(fields, function (errors, values) {
if (errors) {
reject(errors);
}
else {
resolve(values);
}
});
});
};
var restoreForm = function () {
if (!form) {
return;
}
// antd v4
if (isAntdV4) {
return form.setFieldsValue(allFormDataRef.current);
}
// antd v3
var activeFieldsValue = {};
Object.keys(allFormDataRef.current).forEach(function (key) {
if (form.getFieldInstance ? form.getFieldInstance(key) : true) {
activeFieldsValue[key] = allFormDataRef.current[key];
}
});
form.setFieldsValue(activeFieldsValue);
};
var changeType = function () {
var activeFieldsValue = getActiveFieldValues();
allFormDataRef.current = __assign(__assign({}, allFormDataRef.current), activeFieldsValue);
setType(function (t) { return (t === 'simple' ? 'advance' : 'simple'); });
};
var _submit = function (initPagination) {
if (!ready) {
return;
}
setTimeout(function () {
validateFields()
.then(function (values) {
if (values === void 0) { values = {}; }
var pagination = initPagination || __assign(__assign({ pageSize: options.defaultPageSize || 10 }, ((params === null || params === void 0 ? void 0 : params[0]) || {})), { current: 1 });
if (!form) {
// @ts-ignore
run(pagination);
return;
}
// record all form data
allFormDataRef.current = __assign(__assign({}, allFormDataRef.current), values);
// @ts-ignore
run(pagination, values, {
allFormData: allFormDataRef.current,
type: type,
});
})
.catch(function (err) { return err; });
});
};
var reset = function () {
var _a, _b;
if (form) {
form.resetFields();
}
_submit(__assign(__assign({}, ((defaultParams === null || defaultParams === void 0 ? void 0 : defaultParams[0]) || {})), { pageSize: options.defaultPageSize || ((_b = (_a = options.defaultParams) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.pageSize) || 10, current: 1 }));
};
var submit = function (e) {
var _a, _b, _c;
(_a = e === null || e === void 0 ? void 0 : e.preventDefault) === null || _a === void 0 ? void 0 : _a.call(e);
_submit(runSuccessRef.current
? undefined
: __assign({ pageSize: options.defaultPageSize || ((_c = (_b = options.defaultParams) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.pageSize) || 10, current: 1 }, ((defaultParams === null || defaultParams === void 0 ? void 0 : defaultParams[0]) || {})));
};
var onTableChange = function (pagination, filters, sorter, extra) {
var _a = __read(params || []), oldPaginationParams = _a[0], restParams = _a.slice(1);
run.apply(void 0, __spreadArray([__assign(__assign({}, oldPaginationParams), { current: pagination.current, pageSize: pagination.pageSize, filters: filters, sorter: sorter, extra: extra })], __read(restParams), false));
};
// init
useEffect(function () {
// if has cache, use cached params. ignore manual and ready.
if (params.length > 0) {
allFormDataRef.current = (cacheFormTableData === null || cacheFormTableData === void 0 ? void 0 : cacheFormTableData.allFormData) || {};
restoreForm();
// @ts-ignore
run.apply(void 0, __spreadArray([], __read(params), false));
return;
}
if (ready) {
allFormDataRef.current = (defaultParams === null || defaultParams === void 0 ? void 0 : defaultParams[1]) || {};
restoreForm();
if (!manual) {
_submit(defaultParams === null || defaultParams === void 0 ? void 0 : defaultParams[0]);
}
}
}, []);
// change search type, restore form data
useUpdateEffect(function () {
if (!ready) {
return;
}
restoreForm();
}, [type]);
// refresh & ready change on the same time
var hasAutoRun = useRef(false);
hasAutoRun.current = false;
useUpdateEffect(function () {
if (!manual && ready) {
hasAutoRun.current = true;
if (form) {
form.resetFields();
}
allFormDataRef.current = (defaultParams === null || defaultParams === void 0 ? void 0 : defaultParams[1]) || {};
restoreForm();
_submit(defaultParams === null || defaultParams === void 0 ? void 0 : defaultParams[0]);
}
}, [ready]);
useUpdateEffect(function () {
if (hasAutoRun.current) {
return;
}
if (!ready) {
return;
}
if (!manual) {
hasAutoRun.current = true;
if (options.refreshDepsAction) {
options.refreshDepsAction();
}
else {
result.pagination.changeCurrent(1);
}
}
}, __spreadArray([], __read(refreshDeps), false));
return __assign(__assign({}, result), { tableProps: {
dataSource: ((_a = result.data) === null || _a === void 0 ? void 0 : _a.list) || defaultDataSourceRef.current,
loading: result.loading,
onChange: useMemoizedFn(onTableChange),
pagination: {
current: result.pagination.current,
pageSize: result.pagination.pageSize,
total: result.pagination.total,
},
}, search: {
submit: useMemoizedFn(submit),
type: type,
changeType: useMemoizedFn(changeType),
reset: useMemoizedFn(reset),
} });
};
export default useAntdTable;
@@ -0,0 +1,233 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v1.2.1](https://github.com/inspect-js/is-regex/compare/v1.2.0...v1.2.1) - 2024-12-11
### Commits
- [Refactor] use `call-bound` directly [`dbabfe3`](https://github.com/inspect-js/is-regex/commit/dbabfe369261f4940f8ca059e9d452fed01e6969)
- [Deps] update `call-bind`, `gopd` [`d5343a0`](https://github.com/inspect-js/is-regex/commit/d5343a0e05ac3c65243b29f740c7540480ad23e7)
- [Dev Deps] update `@arethetypeswrong/cli`, `@ljharb/tsconfig` [`cc081eb`](https://github.com/inspect-js/is-regex/commit/cc081eb891b075440188c3f5240b2051090f1036)
## [v1.2.0](https://github.com/inspect-js/is-regex/compare/v1.1.4...v1.2.0) - 2024-11-29
### Fixed
- [Tests] allow tests to pass if zero traps are triggered [`#35`](https://github.com/inspect-js/is-regex/issues/35)
### Commits
- [actions] reuse common workflows [`be7bf6a`](https://github.com/inspect-js/is-regex/commit/be7bf6af175271e9db74e092d636307f6cf5e848)
- [New] add types [`39066a4`](https://github.com/inspect-js/is-regex/commit/39066a426da0f0c597b888c3c839fb2efc2bf613)
- [meta] use `npmignore` to autogenerate an npmignore file [`8938588`](https://github.com/inspect-js/is-regex/commit/89385885c2da891644e07220b4407f760c3dd629)
- [Refactor] reorganize code [`2f76f26`](https://github.com/inspect-js/is-regex/commit/2f76f26e0008a01a2f9a849dc2687cf3e3146f3e)
- [actions] split out node 10-20, and 20+ [`8c9aedf`](https://github.com/inspect-js/is-regex/commit/8c9aedf2cd9b3fd4ee045d747580265de223b4b2)
- [meta] better `eccheck` command [`6b39408`](https://github.com/inspect-js/is-regex/commit/6b39408bc4cce49ac85de70fba4a843da4b78b84)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`e38cf3c`](https://github.com/inspect-js/is-regex/commit/e38cf3c4e5b234c9a0d64fcf75e45df9b2416557)
- [actions] update codecov uploader [`487c75d`](https://github.com/inspect-js/is-regex/commit/487c75da7bbc2d977c2aed68815e7a58d269011f)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `core-js`, `foreach`, `tape` [`0d7da87`](https://github.com/inspect-js/is-regex/commit/0d7da87be90b637c094abfd9e68568097d391e38)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `core-js`, `tape` [`c1c1198`](https://github.com/inspect-js/is-regex/commit/c1c1198143feaadee0370b78f7fd878e64e57a58)
- [actions] update rebase action to use reusable workflow [`213646e`](https://github.com/inspect-js/is-regex/commit/213646e1e9b5211bf621ccaaaa29f03b706b139c)
- [Dev Deps] update `@ljharb/eslint-config`, `auto-changelog`, `core-js`, `npmignore`, `tape` [`0a44e77`](https://github.com/inspect-js/is-regex/commit/0a44e77855db0ee8077f8b4351164fa500ba0d1f)
- [Refactor] use `hasown` [`d939332`](https://github.com/inspect-js/is-regex/commit/d939332c57cf46b95bc45e721fb66db64cf4743a)
- [Deps] update `call-bind`, `has-tostringtag` [`46bfdc9`](https://github.com/inspect-js/is-regex/commit/46bfdc9226df0495b5eb4e753e3f61e9a648cf44)
- [Tests] use `for-each` instead of `foreach` [`138b3f2`](https://github.com/inspect-js/is-regex/commit/138b3f2e6340eb4b6caf62981b0a1f59e960cbc9)
- [Tests] replace `aud` with `npm audit` [`37ed80a`](https://github.com/inspect-js/is-regex/commit/37ed80a3a5eeec2312f45956bc928fc7937480b8)
- [Deps] update `gopd` [`6fd4097`](https://github.com/inspect-js/is-regex/commit/6fd4097f23c3f031d0e659b29174216bed7b4f0f)
- [Dev Deps] update `core-js` [`97c1c60`](https://github.com/inspect-js/is-regex/commit/97c1c6044684f8a661055f4614ab2dd58fbfcc2b)
- [Dev Deps] add missing peer dep [`7329b8e`](https://github.com/inspect-js/is-regex/commit/7329b8edc9d9440439f190704f03740c853d15da)
## [v1.1.4](https://github.com/inspect-js/is-regex/compare/v1.1.3...v1.1.4) - 2021-08-05
### Commits
- [Dev Deps] update `auto-changelog`, `core-js`, `eslint`, `tape` [`4b17cad`](https://github.com/inspect-js/is-regex/commit/4b17cad8496b1ae621b18335fa3afe94d0c65e83)
- [Refactor] use `has-tostringtag` to behave correctly in the presence of symbol shams [`2dad4af`](https://github.com/inspect-js/is-regex/commit/2dad4afffa15f07cbbf7675b77d1f650c92652c4)
## [v1.1.3](https://github.com/inspect-js/is-regex/compare/v1.1.2...v1.1.3) - 2021-05-07
### Commits
- [actions] use `node/install` instead of `node/run`; use `codecov` action [`c681ab9`](https://github.com/inspect-js/is-regex/commit/c681ab99c07f8b3b7ae5f652b3105a30bce94f69)
- [Fix] do not use `Object.prototype.toString` when `Symbol.toStringTag` is shammed [`ca019fd`](https://github.com/inspect-js/is-regex/commit/ca019fdb828dc7d32e323213403ac9995d8604e3)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`605a66f`](https://github.com/inspect-js/is-regex/commit/605a66f278900f1c8ae9d1dfcec31e5f61b10ad3)
- [readme] add actions and codecov badges [`8d7c6f0`](https://github.com/inspect-js/is-regex/commit/8d7c6f0e007bd982f21b958e0abc98b8a84e2a24)
- [meta] use `prepublishOnly` script for npm 7+ [`8e50e91`](https://github.com/inspect-js/is-regex/commit/8e50e91f51aa5038745526710ef2e030527982a7)
- [Deps] update `has-symbols` [`4742c81`](https://github.com/inspect-js/is-regex/commit/4742c81260c3db9a8c9ef57110981fb6175f58e0)
## [v1.1.2](https://github.com/inspect-js/is-regex/compare/v1.1.1...v1.1.2) - 2021-02-01
### Commits
- [Tests] migrate tests to Github Actions [`cc1686e`](https://github.com/inspect-js/is-regex/commit/cc1686e25f446ca6948f43b3f180d6e55e31fb4e)
- [readme] fix repo URLs; remove travis badge [`d1d1da6`](https://github.com/inspect-js/is-regex/commit/d1d1da647bb4e91589606f12470cd27a47b3bb81)
- [meta] do not publish github action workflow files [`9f84b99`](https://github.com/inspect-js/is-regex/commit/9f84b993a995f057b4d2d097ef47b1ff9c84115d)
- [Tests] run `nyc` on all tests [`c37aab9`](https://github.com/inspect-js/is-regex/commit/c37aab9d332c4834b08ada94736c45ab1d39cd2f)
- [Robustness] use `call-bind` [`fbb61bf`](https://github.com/inspect-js/is-regex/commit/fbb61bf3e19ccc178e6ed1e0d7ab9cc7c7167393)
- [actions] add "Allow Edits" workflow [`9022b53`](https://github.com/inspect-js/is-regex/commit/9022b53cb05b0f105cd179800cf96e055b249f08)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog` [`d60f28f`](https://github.com/inspect-js/is-regex/commit/d60f28f7f2fb21dade7bce302b3e0246206423d3)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`2c35c43`](https://github.com/inspect-js/is-regex/commit/2c35c437edf3eeb37129eea2404d8f465d27620f)
- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`1009e25`](https://github.com/inspect-js/is-regex/commit/1009e259d49a63753dc6e79e2b876a30c00c6de6)
- [meta] gitignore coverage output [`3b5fa9e`](https://github.com/inspect-js/is-regex/commit/3b5fa9ed2882c65ee81dff979f79f1a2751d3772)
- [actions] update workflows [`1843ef6`](https://github.com/inspect-js/is-regex/commit/1843ef65b8b8c24a44e91bc4ed5ee60dffc31c2d)
## [v1.1.1](https://github.com/inspect-js/is-regex/compare/v1.1.0...v1.1.1) - 2020-08-03
### Commits
- [Performance] Re-add lastIndex check to improve performance [`d8495cd`](https://github.com/inspect-js/is-regex/commit/d8495cd22d475ddca250818921b6088f631c1972)
- [Dev Deps] update `auto-changelog`, `eslint` [`778fa6b`](https://github.com/inspect-js/is-regex/commit/778fa6b9d2b182ee6d73993e103532855e956f85)
## [v1.1.0](https://github.com/inspect-js/is-regex/compare/v1.0.5...v1.1.0) - 2020-06-03
### Commits
- [New] use `badStringifier`‑based RegExp detection [`31eff67`](https://github.com/inspect-js/is-regex/commit/31eff673243d65c3d6c05848c0eb52f5380f1be3)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`fc91458`](https://github.com/inspect-js/is-regex/commit/fc914588187b8bb00d8d792c84f06a6e15d883c1)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`; add `safe-publish-latest` [`d43ed83`](https://github.com/inspect-js/is-regex/commit/d43ed83db54ea727bb0b1b77a50af79d1edb8a6d)
- [Dev Deps] update `auto-changelog`, `tape`; add `aud` [`56647d1`](https://github.com/inspect-js/is-regex/commit/56647d196be34ef3c118ad67726e75169fbcb875)
- [meta] only run `aud` on prod deps [`e0865b8`](https://github.com/inspect-js/is-regex/commit/e0865b8360b0ac1b9d17b7b81ae5f339e5c9036b)
## [v1.0.5](https://github.com/inspect-js/is-regex/compare/v1.0.4...v1.0.5) - 2019-12-15
### Commits
- [Tests] use shared travis-ci configs [`af728b2`](https://github.com/inspect-js/is-regex/commit/af728b21c5cc9e41234fb4015594bffdcfff597c)
- [Tests] remove `jscs` [`1b8cfe8`](https://github.com/inspect-js/is-regex/commit/1b8cfe8cfb14820c196775f19d370276e4034791)
- [meta] add `auto-changelog` [`c3131d8`](https://github.com/inspect-js/is-regex/commit/c3131d8ab5d06ea5fa05a4bb2ad28bbfb81668ad)
- [Tests] up to `node` `v8.1`, `v7.10`, `v6.11`, `v4.8`; newer npm fails on older nodes [`660b658`](https://github.com/inspect-js/is-regex/commit/660b6585d1a9607dbdae879b70ce2f6a5684616c)
- [Tests] up to `node` `v9.3`, `v8.9`, `v6.12`; use `nvm install-latest-npm`; pin included builds to LTS [`7c25218`](https://github.com/inspect-js/is-regex/commit/7c25218d540ab17c18e4ae333677c5725806a778)
- [Tests] up to `node` `v12.10`, `v11.15`, `v10.16`, `v8.16`, `v6.17` [`fa95547`](https://github.com/inspect-js/is-regex/commit/fa955478950a5ba0a920010d5daaa29487500b30)
- [meta] remove unused Makefile and associated utilities [`9fd2a29`](https://github.com/inspect-js/is-regex/commit/9fd2a29dc57ed125f3d61e94f6254a9dd8ee0044)
- [Tests] up to `node` `v11.3`, `v10.14`, `v8.14`, `v6.15` [`7f2ac41`](https://github.com/inspect-js/is-regex/commit/7f2ac41ef5dc4d53bfe2fb1c24486c688a2537bd)
- [Tests] up to `node` `v10.0`, `v9.11`, `v8.11`, `v6.14`, `v4.9` [`6fa2b0f`](https://github.com/inspect-js/is-regex/commit/6fa2b0fe171a5b02086a06679a92d989e83a8b8e)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`697e1de`](https://github.com/inspect-js/is-regex/commit/697e1de1c9e69f08e591cc0040d81fdbbde6fe4e)
- [actions] add automatic rebasing / merge commit blocking [`ad86dc9`](https://github.com/inspect-js/is-regex/commit/ad86dc97a52e4f66fbfb3b8c9c78da3963588b54)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `jscs`, `nsp`, `replace`, `semver`, `tape` [`5c99c8e`](https://github.com/inspect-js/is-regex/commit/5c99c8e384d5ce2ef434be5853c301477cf35456)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `replace`, `semver`, `tape` [`bb63686`](https://github.com/inspect-js/is-regex/commit/bb63686a9d0fc586d121549cf484da95edec3b0a)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config@`, `replace`, `semver`, `tape` [`ddf3670`](https://github.com/inspect-js/is-regex/commit/ddf36705e5f7bd29832721e4a23abf06195032c6)
- [Dev Deps] update `tape`, `nsp`, `eslint`, `@ljharb/eslint-config` [`e7b5a62`](https://github.com/inspect-js/is-regex/commit/e7b5a626eef3b9648c7d52d4620ce2e2a98a9ab8)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `tape` [`c803db5`](https://github.com/inspect-js/is-regex/commit/c803db5cd94cf9e0a559617adbc1e4c9d22007ff)
- [Tests] switch from `nsp` to `npm audit` [`b7239be`](https://github.com/inspect-js/is-regex/commit/b7239be9da263a0f7066f79d087eaf700a9613e9)
- [Dev Deps] update `eslint`, `nsp`, `semver`, `tape` [`347ee6c`](https://github.com/inspect-js/is-regex/commit/347ee6c67ba0f56b03f21a5abe743658f6515963)
- Only apps should have lockfiles. [`3866575`](https://github.com/inspect-js/is-regex/commit/38665755ecf028061f15816059e26023890a0dc7)
- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`d099a39`](https://github.com/inspect-js/is-regex/commit/d099a3943eb7e156a3e64fb8b74e11d7c83a4bec)
- [meta] add `funding` field [`741aecd`](https://github.com/inspect-js/is-regex/commit/741aecd92cd49868b3606c8cc99ce299e5f3c7d5)
- [Tests] use `eclint` instead of `editorconfig-tools` [`bc6aa75`](https://github.com/inspect-js/is-regex/commit/bc6aa7539e506788709b96f7bf3d7549850a81c3)
- [Tests] on `node` `v10.1` [`262226f`](https://github.com/inspect-js/is-regex/commit/262226f08fa34dff9a8dffd16daabb3dc6e262eb)
- [Dev Deps] update `eslint` [`31fd719`](https://github.com/inspect-js/is-regex/commit/31fd719dd59a6111ca710cdb0d19a8adadf9b8c6)
- [Deps] update `has` [`e9e25a3`](https://github.com/inspect-js/is-regex/commit/e9e25a3de7e89faaa6aadf5010477074140e8218)
- [Dev Deps] update `replace` [`aeeb968`](https://github.com/inspect-js/is-regex/commit/aeeb968bf5a4fc07f0fa6905f2c699fc563b6c32)
- [Tests] set audit level [`2a6290e`](https://github.com/inspect-js/is-regex/commit/2a6290e78b58bf14b734d7998fe53b4a84db5e44)
- [Tests] remove `nsp` [`fc74c2b`](https://github.com/inspect-js/is-regex/commit/fc74c2bb6970a7f3280abe6eff3b492d77d89c9f)
## [v1.0.4](https://github.com/inspect-js/is-regex/compare/v1.0.3...v1.0.4) - 2017-02-18
### Fixed
- [Fix] ensure that `lastIndex` is not mutated [`#3`](https://github.com/inspect-js/is-regex/issues/3)
### Commits
- Update `eslint`, `tape`, `semver`; use my personal shared `eslint` config [`c4a41c3`](https://github.com/inspect-js/is-regex/commit/c4a41c3a8203a3919b01cd0d1b577daadf30a452)
- [Tests] on all node minors; improve test matrix [`58d7508`](https://github.com/inspect-js/is-regex/commit/58d7508a36eb92bd76717486b9e78bde502ffe3e)
- [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver` [`7290076`](https://github.com/inspect-js/is-regex/commit/729007606e9ed162953d1f5812c37eb06c554ec2)
- Update `covert`, `jscs`, `eslint`, `semver` [`dabc729`](https://github.com/inspect-js/is-regex/commit/dabc729cfc4458264c6f7642004d41dd5c214bfd)
- Update `eslint` [`a946b05`](https://github.com/inspect-js/is-regex/commit/a946b051159396b4311c564880f96e3d00e8b8e2)
- Update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`1744dde`](https://github.com/inspect-js/is-regex/commit/1744dde77526841f216fa2c1c866c5a82b1638c0)
- [Refactor] when try/catch is needed, bail early if the value lacks an own `lastIndex` data property. [`288ad93`](https://github.com/inspect-js/is-regex/commit/288ad93dbfed9f6828de20de67105ee6d6504425)
- Update `editorconfig-tools`, `eslint`, `semver`, `replace` [`4d895c6`](https://github.com/inspect-js/is-regex/commit/4d895c68a0cdbb5803185928963c15147aad0404)
- Update `eslint`, `tape`, `semver` [`f387f03`](https://github.com/inspect-js/is-regex/commit/f387f03b260b56372bfca301d4e79c4067633854)
- All grade A-supported `node`/`iojs` versions now ship with an `npm` that understands `^`. [`55e480f`](https://github.com/inspect-js/is-regex/commit/55e480f407cafb6c21a6c32aef04ccaa3ba4216c)
- [Dev Deps] update `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver` [`89d9528`](https://github.com/inspect-js/is-regex/commit/89d95285b364913ebcd8ac7e0872570fe009a5d3)
- [Dev Deps] update `jscs` [`eb222a8`](https://github.com/inspect-js/is-regex/commit/eb222a8435e59909354f3700fd4880e4ce1cb13e)
- [Tests] up to `io.js` `v3.3`, `node` `v4.1` [`c65429c`](https://github.com/inspect-js/is-regex/commit/c65429cea0366508c10ad2ab773af7b83a34fc81)
- Update `nsp`, `eslint` [`c60fbd8`](https://github.com/inspect-js/is-regex/commit/c60fbd8680f7fb3508ec3c5be8ebb788672516c8)
- Update `eslint`, `semver` [`6a62116`](https://github.com/inspect-js/is-regex/commit/6a621168c63616bf004ca8b1f885b4eb8a58a3e5)
- [Tests] on `node` `v7.5`, `v4.7` [`e764651`](https://github.com/inspect-js/is-regex/commit/e764651336f5da5e239e9fe8869f3a3201c19d2b)
- Test up to `io.js` `v2.1` [`3bf326a`](https://github.com/inspect-js/is-regex/commit/3bf326a9bcd530fd16c9fc806e249a68e25ab7e3)
- Test on the latest `io.js` versions. [`693d047`](https://github.com/inspect-js/is-regex/commit/693d0477631c5d7671f6c99eca5594ffffa75771)
- [Refactor] use an early return instead of a ternary. [`31eaca2`](https://github.com/inspect-js/is-regex/commit/31eaca28b7d0aaac0599fe7a569b93b842f8ab16)
- Test on `io.js` `v2.2` [`c18c55a`](https://github.com/inspect-js/is-regex/commit/c18c55aee6358d70531f935e98851e42b698d93c)
- Run `travis-ci` tests on `iojs` and `node` v0.12; speed up builds; allow 0.8 failures. [`a1c237d`](https://github.com/inspect-js/is-regex/commit/a1c237d35f880fe0bcbc9275254611a6a2300aaf)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`aa3ea0f`](https://github.com/inspect-js/is-regex/commit/aa3ea0f148af31d75f7ef8a800412729d82def04)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`d97831d`](https://github.com/inspect-js/is-regex/commit/d97831d0e2ccd3d00d1f7354b7f81e2575f90953)
- [Dev Deps] Update `tape`, `eslint` [`95e6def`](https://github.com/inspect-js/is-regex/commit/95e6defe3178c45dc9df16e474e558979d5f5c05)
- Update `eslint`, `nsp` [`3844c93`](https://github.com/inspect-js/is-regex/commit/3844c935cfe7c52fae0dc74d27e884c417cb4616)
- Update `tape`, `jscs` [`0d6dac8`](https://github.com/inspect-js/is-regex/commit/0d6dac818ed251910171965932f021291919e770)
- Fix tests for faked @@toStringTag [`2ebef9f`](https://github.com/inspect-js/is-regex/commit/2ebef9f0759843e9a063de7a512b46e3e7daea7e)
- Test up to `io.js` `v3.0` [`ec1d2d4`](https://github.com/inspect-js/is-regex/commit/ec1d2d44481fa0fa11448527da8030c99fe47a12)
- [Refactor] bail earlier when the value is falsy. [`a9e333e`](https://github.com/inspect-js/is-regex/commit/a9e333e2ac8912ca05b7e31d30e4eea683c0da4b)
- [Dev Deps] update `tape` [`8cdcaae`](https://github.com/inspect-js/is-regex/commit/8cdcaae07be8c790cdb99849e6076ea7702a4c84)
- Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG. [`281c4ef`](https://github.com/inspect-js/is-regex/commit/281c4efeb71c86dd380e741bcaee3f7dbf956151)
- Test on `io.js` `v2.4` [`4d54c68`](https://github.com/inspect-js/is-regex/commit/4d54c68a81b5332a3b76259d8aa8f514be5efd13)
- Test on `io.js` `v2.3` [`23170f5`](https://github.com/inspect-js/is-regex/commit/23170f5cae632d0377de73bd2febc53db8aebbc9)
- Test on `iojs-v1.6` [`4487ad0`](https://github.com/inspect-js/is-regex/commit/4487ad0194a5684223bfa2690da4e0a441f7132a)
## [v1.0.3](https://github.com/inspect-js/is-regex/compare/v1.0.2...v1.0.3) - 2015-01-29
### Commits
- Update npm run scripts. [`dc528dd`](https://github.com/inspect-js/is-regex/commit/dc528dd25e775089bc0a3f5a8f7ae7ffc4cdf52a)
- Add toStringTag tests. [`f48a83a`](https://github.com/inspect-js/is-regex/commit/f48a83a78720b78ab60ca586c16f6f3dbcfec825)
- If @@toStringTag is not present, use the old-school Object#toString test. [`50b0ffd`](https://github.com/inspect-js/is-regex/commit/50b0ffd9c7fdbd54aee8cde1b07e680ae84f6a0d)
## [v1.0.2](https://github.com/inspect-js/is-regex/compare/v1.0.1...v1.0.2) - 2015-01-29
### Commits
- `make release` [`a1de7ec`](https://github.com/inspect-js/is-regex/commit/a1de7eca4cecc8015fd27804669f8fc61bd16a68)
- Improve optimization by separating the try/catch, and bailing out early when not typeof "object". [`5ab7632`](https://github.com/inspect-js/is-regex/commit/5ab76322a348487fa8b16761e83f6824c3c27d11)
## [v1.0.1](https://github.com/inspect-js/is-regex/compare/v1.0.0...v1.0.1) - 2015-01-28
### Commits
- Using my standard jscs.json file [`1f1733a`](https://github.com/inspect-js/is-regex/commit/1f1733ac8433cdcceb25356f86b74136a4477cb9)
- Adding `npm run lint` [`51ea70f`](https://github.com/inspect-js/is-regex/commit/51ea70fa7e461d022f611c195f343ea8d0333d71)
- Use RegExp#exec to test if something is a regex, which works even with ES6 @@toStringTag. [`042c8c7`](https://github.com/inspect-js/is-regex/commit/042c8c734faade9015932b61f1e8ea4f3a93b1b3)
- Adding license and downloads badges [`366d619`](https://github.com/inspect-js/is-regex/commit/366d61965d3a4119126e78e09b2166bbcddd0c5a)
- Use SVG badges instead of PNG [`6a32e4f`](https://github.com/inspect-js/is-regex/commit/6a32e4fc87d7d3a3787b800dd033c9293aead6df)
- Update `tape`, `jscs` [`f1b9462`](https://github.com/inspect-js/is-regex/commit/f1b9462f86d1b69de07176e7f277f668757ba964)
- Update `jscs` [`1bff23f`](https://github.com/inspect-js/is-regex/commit/1bff23ff0fe88c8263e8bf04cf99e290af96d5b0)
- Update `tape`, `jscs` [`c22ea2e`](https://github.com/inspect-js/is-regex/commit/c22ea2e7967f45618deed01ff5ea483f918be216)
- Update `tape`, `jscs` [`b0479db`](https://github.com/inspect-js/is-regex/commit/b0479db99a1b1b872d1618fb0a71f0c74a78b29b)
- Use consistent quotes [`1a6e347`](https://github.com/inspect-js/is-regex/commit/1a6e34730d9270f3f20519139faa4c4e6ec2e1f5)
- Make travis builds faster. [`090a4ea`](https://github.com/inspect-js/is-regex/commit/090a4ea7c5fa709d108d596e3bc304e6ce973dec)
- Update `tape` [`7d76129`](https://github.com/inspect-js/is-regex/commit/7d7612928bdd43230fbd835db71797249ca24f35)
- Lock covert to v1.0.0. [`9a90b03`](https://github.com/inspect-js/is-regex/commit/9a90b03fb390e66f874223a34c58ba2bb109edd3)
- Updating tape [`bfbc7f5`](https://github.com/inspect-js/is-regex/commit/bfbc7f593a007acd0411152bbb55f724dc4ca935)
- Updating jscs [`13ad511`](https://github.com/inspect-js/is-regex/commit/13ad511d80cd67300c2c0c5387fc4b3b423e2768)
- Updating jscs [`cda1945`](https://github.com/inspect-js/is-regex/commit/cda1945d603dfe99e24d5a909a931d366451bc4d)
- Updating jscs [`de96c99`](https://github.com/inspect-js/is-regex/commit/de96c99d4bf5787df671de6df9138b6547a6545b)
- Running linter as part of tests [`2cb6567`](https://github.com/inspect-js/is-regex/commit/2cb656733b1ed0af14ad11fb584006d22de0c69d)
- Updating covert [`a56ae74`](https://github.com/inspect-js/is-regex/commit/a56ae74ec8d5f0473295a8b10519a18580f16624)
- Updating tape [`ffe47f7`](https://github.com/inspect-js/is-regex/commit/ffe47f7fe9cf6d16896b4bdc286bd1d0805d5c49)
## [v1.0.0](https://github.com/inspect-js/is-regex/compare/v0.0.0...v1.0.0) - 2014-05-19
### Commits
- Make sure old and unstable nodes don't break Travis [`05da747`](https://github.com/inspect-js/is-regex/commit/05da7478f960dc131ec3ad864e27e8c6b7d74a80)
- toString is a reserved var name in old Opera [`885c48c`](https://github.com/inspect-js/is-regex/commit/885c48c120f921a55f1842b0607d3e7875379821)
- Updating deps [`2ca0e79`](https://github.com/inspect-js/is-regex/commit/2ca0e79a2443ca34d85e8b2ea2e26f55855b74a7)
- Updating tape. [`9678435`](https://github.com/inspect-js/is-regex/commit/96784355611deb0c23b9064be774216d76e3e457)
- Updating covert [`c3bb898`](https://github.com/inspect-js/is-regex/commit/c3bb8985a422e3e0c81f9c43899b6c19a72c755f)
- Updating tape [`7811708`](https://github.com/inspect-js/is-regex/commit/78117089688258b8f939b397b37897b5b3e30f74)
- Testing on node 0.6 again [`dec36ae`](https://github.com/inspect-js/is-regex/commit/dec36ae58a39a3f80e832b702c3e19406363c160)
- Run code coverage as part of tests [`e6f4ebe`](https://github.com/inspect-js/is-regex/commit/e6f4ebec26894543747603f2cb360e839f2ca290)
## v0.0.0 - 2014-01-15
### Commits
- package.json [`aa60d43`](https://github.com/inspect-js/is-regex/commit/aa60d43d2c8adb9fdd47f5898e5e1e570bd238d8)
- read me [`861e944`](https://github.com/inspect-js/is-regex/commit/861e944de88e84010eaa662ea9ea9f17c90cff8c)
- Initial commit [`d0cdd71`](https://github.com/inspect-js/is-regex/commit/d0cdd71a637d8490b7ee3eaaf75c7e31d0f9242f)
- Tests. [`b533f74`](https://github.com/inspect-js/is-regex/commit/b533f741a88dff002790fb7af054b2a74e72d4da)
- Implementation. [`3c9a8c0`](https://github.com/inspect-js/is-regex/commit/3c9a8c06994003cdfffeb3620f251f4c4cae7755)
- Travis CI [`742c440`](https://github.com/inspect-js/is-regex/commit/742c4407015f9108875fd108fde137f5245e9e7a)
@@ -0,0 +1 @@
{"version":3,"file":"PlanParamsOperations.js","sourceRoot":"","sources":["../../../../src/planning/models/PlanParamsOperations.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAkED,MAAM,mDAAe,CAAA,GAAA,sCAAI,EAAE,aAAa,CAAuB;AAC/D,MAAM,4CAAsB;AAE5B,IAAI,oCAAwB;AAYrB,SAAS,0CAAW,KAAsB;IAC/C,IAAI,YAAC,QAAQ,WAAE,OAAO,gBAAE,YAAY,aAAE,SAAS,EAAC,GAAG;IACnD,IAAI,WAAW,CAAA,GAAA,mBAAK,EAAmB;IACvC,IAAI,SAAS,CAAA,GAAA,mBAAK,EAAmB;IACrC,IAAI,WAAW,CAAA,GAAA,mBAAK,EAAa,EAAE;IACnC,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uBAAS,EAAE,uCAAiB,CAAC;IAEhD,4FAA4F;IAC5F,IAAI,OAAO,CAAA,GAAA,oBAAM,EAAE,IAAM,IAAI,+BAAS;sBAAC;QAAQ,IAAI;QAAC;KAAS;IAE7D,CAAA,GAAA,qCAAc,EAAE;QACd,+FAA+F;QAC/F,mGAAmG;QACnG,mGAAmG;QACnG,gEAAgE;QAChE,IAAI,SAAS,cAAc,0CAAe,IAAI;QAC9C,IAAI,0CAAe,WAAW,CAAC,OAAO,QAAQ,KAAK,qCAAe,CAAC,sCAAgB,mCAAa,OAAO,QAAQ,GAAG;YAChH,IAAI,aAAa,0CAAe,WAAW,CAAC;YAC5C,IAAI,YACF,SAAS;QAEb;QAEA,+CAA+C;QAC/C,OAAO,QAAQ,CAAC;QAChB,0CAAe,OAAO,CAAC;IACzB,GAAG;QAAC;QAAM;KAAW;IAErB,CAAA,GAAA,qCAAc,EAAE;QACd,IAAI,OAAO,0CAAe,WAAW,CAAC;QACtC,IAAI,MACF,KAAK,OAAO,GAAG,CAAC,CAAC;IAErB,GAAG;QAAC;KAAQ;IAEZ,CAAA,GAAA,qCAAc,EAAE;YAEH;QADX,2EAA2E;QAC3E,IAAI,QAAO,oBAAA,SAAS,OAAO,cAAhB,wCAAA,kBAAkB,WAAW;QACxC,IAAI,QAAmB,EAAE;QACzB,IAAI,kBAAkB,CAAA,IAAK,EAAE,eAAe;QAC5C,MAAO,QAAQ,SAAS,OAAO,OAAO,CAAE;YACtC,MAAM,IAAI,CAAC;YACX,2EAA2E;YAC3E,KAAK,gBAAgB,CAAC,2CAAqB;YAC3C,OAAO,KAAK,WAAW;QACzB;QAEA,SAAS,OAAO,GAAG;QAEnB,OAAO;YACL,KAAK,IAAI,QAAQ,MACf,KAAK,mBAAmB,CAAC,2CAAqB;QAElD;IACF,GAAG;QAAC;KAAS;IAEb,4CAAsB,UAAU,cAAc;IAC9C,0CAAoB,UAAU;IAC9B,sCAAgB,UAAU,cAAc;IACxC,mCAAa,UAAU;IAEvB,mGAAmG;IACnG,uGAAuG;IACvG,CAAA,GAAA,sBAAQ,EAAE;QACR,MAAM,gBAAgB,CAAA,GAAA,sCAAe,EAAE,CAAA,GAAA,sCAAe,EAAE,SAAS,OAAO,GAAG,SAAS,OAAO,CAAC,EAAE,GAAG;QACjG,IAAI,QAAyB;QAE7B,IAAI,uCAAiB,eAAe,SAAS,OAAO,GAAG;YACrD,8EAA8E;YAC9E,+DAA+D;YAC/D,KAAK,IAAI,QAAQ,0CAAe,QAAQ,GACtC,IAAI,KAAK,QAAQ,IAAI,uCAAiB,eAAe,KAAK,QAAQ,CAAC,OAAO,GACxE,QAAQ;YAIZ,IAAI,UAAU,0CAAe,WAAW,CAAC,WACvC,oCAAc,MAAM,QAAQ;QAEhC;IACF,GAAG;QAAC;KAAS;IAEb,yGAAyG;IACzG,mCAAmC;IACnC,CAAA,GAAA,qCAAc,EAAE;QACd,OAAO;gBAEa,oCAAA;gBAAA;YADlB,mCAAmC;YACnC,IAAI,cAAc,CAAA,+CAAA,8BAAA,0CAAe,WAAW,CAAC,uBAA3B,mDAAA,qCAAA,4BAAsC,MAAM,cAA5C,yDAAA,mCAA8C,QAAQ,cAAtD,yDAAA,8CAA0D;YAE5E,IACE,AAAC,CAAA,aAAa,qCAAe,sCAAgB,UAAU,kCAAW,KACjE,CAAA,CAAC,eAAe,0CAAe,WAAW,CAAC,YAAW,GAEvD,oCAAc;YAEhB,0CAAe,cAAc,CAAC;QAChC;IACF,GAAG;QAAC;KAAS;IAEb,IAAI,eAAe,CAAA,GAAA,oBAAM,EAAE,IAAM,iDAA2B,WAAW,EAAE;IACzE,IAAI,QAAQ,CAAA,GAAA,oBAAM,EAAE,IAAO,CAAA;0BACzB;YACA,YAAY;QACd,CAAA,GAAI;QAAC;QAAM;KAAa;IAExB,qBACE,0DAAC,mCAAa,QAAQ;QAAC,OAAO;qBAC5B,0DAAC;QAAK,0BAAA;QAAuB,QAAA;QAAO,KAAK;QACxC,wBACD,0DAAC;QAAK,wBAAA;QAAqB,QAAA;QAAO,KAAK;;AAG7C;AAOO,SAAS;QACP;IAAP,QAAO,cAAA,CAAA,GAAA,uBAAS,EAAE,iDAAX,kCAAA,YAA0B,YAAY;AAC/C;AAEA,SAAS,iDAA2B,QAA2C;IAC7E,OAAO;QACL,WAAU,OAA4B,CAAC,CAAC;YACtC,IAAI,QAAQ,SAAS,OAAO;YAC5B,IAAI,QAAC,IAAI,YAAE,QAAQ,QAAE,IAAI,UAAE,MAAM,EAAC,GAAG;gBACgB;YAArD,IAAI,OAAO,QAAQ,CAAA,GAAA,sCAAe,EAAE,CAAA,GAAA,sCAAe,EAAE,CAAA,UAAA,KAAK,CAAC,EAAE,cAAR,qBAAA,UAAY;YACjE,IAAI,WAAW,KAAK,CAAC,EAAE,CAAC,sBAAsB;YAC9C,IAAI,YAAY,mCAAa;YAC7B,IAAI,SAAS,0CAAuB,WAAW;0BAAC;wBAAU;YAAM,GAAG;YACnE,OAAO,WAAW,GAAG,uCAAiB,MAAM,SAAS,OAAO;YAC5D,IAAI,WAAW,OAAO,QAAQ;YAC9B,IAAI,CAAC,YAAY,MAAM;gBACrB,OAAO,WAAW,GAAG;gBACrB,WAAW,OAAO,QAAQ;YAC5B;YACA,IAAI,UACF,mCAAa,UAAU;YAEzB,OAAO;QACT;QACA,eAAc,OAA4B,CAAC,CAAC;YAC1C,IAAI,QAAQ,SAAS,OAAO;YAC5B,IAAI,QAAC,IAAI,YAAE,QAAQ,QAAE,IAAI,UAAE,MAAM,EAAC,GAAG;gBACgB;YAArD,IAAI,OAAO,QAAQ,CAAA,GAAA,sCAAe,EAAE,CAAA,GAAA,sCAAe,EAAE,CAAA,UAAA,KAAK,CAAC,EAAE,cAAR,qBAAA,UAAY;YACjE,IAAI,WAAW,KAAK,CAAC,MAAM,MAAM,GAAG,EAAE,CAAC,kBAAkB;YACzD,IAAI,YAAY,mCAAa;YAC7B,IAAI,SAAS,0CAAuB,WAAW;0BAAC;wBAAU;YAAM,GAAG;YACnE,OAAO,WAAW,GAAG,uCAAiB,MAAM,SAAS,OAAQ;YAC7D,IAAI,eAAe,OAAO,YAAY;YACtC,IAAI,CAAC,gBAAgB,MAAM;gBACzB,OAAO,WAAW,GAAG;gBACrB,eAAe,OAAO,YAAY;YACpC;YACA,IAAI,cACF,mCAAa,cAAc;YAE7B,OAAO;QACT;QACA,YAAW,OAAO,CAAC,CAAC;YAClB,IAAI,QAAQ,SAAS,OAAO;YAC5B,IAAI,YAAC,QAAQ,UAAE,MAAM,EAAC,GAAG;YACzB,IAAI,YAAY,mCAAa;YAC7B,IAAI,SAAS,0CAAuB,WAAW;0BAAC;wBAAU;YAAM,GAAG;YACnE,OAAO,WAAW,GAAG,KAAK,CAAC,EAAE,CAAC,sBAAsB;YACpD,IAAI,WAAW,OAAO,QAAQ;YAC9B,IAAI,UACF,mCAAa,UAAU;YAEzB,OAAO;QACT;QACA,WAAU,OAAO,CAAC,CAAC;YACjB,IAAI,QAAQ,SAAS,OAAO;YAC5B,IAAI,YAAC,QAAQ,UAAE,MAAM,EAAC,GAAG;YACzB,IAAI,YAAY,mCAAa;YAC7B,IAAI,SAAS,0CAAuB,WAAW;0BAAC;wBAAU;YAAM,GAAG;YACnE,OAAO,WAAW,GAAG,KAAK,CAAC,MAAM,MAAM,GAAG,EAAE,CAAC,kBAAkB;YAC/D,IAAI,eAAe,OAAO,YAAY;YACtC,IAAI,cACF,mCAAa,cAAc;YAE7B,OAAO;QACT;IACF;AACF;AAEA,SAAS,mCAAa,KAAgB;IACpC,OAAO,KAAK,CAAC,EAAE,CAAC,aAAa;AAC/B;AAEA,SAAS,yCAAmB,QAAkB;IAC5C,IAAI,QAAQ,0CAAe,WAAW,CAAC;IACvC,MAAO,SAAS,MAAM,QAAQ,KAAK,SAAU;QAC3C,IAAI,MAAM,OAAO,EACf,OAAO;QAGT,QAAQ,MAAM,MAAM;IACtB;IAEA,OAAO;AACT;AAEA,SAAS,sCAAgB,OAAyB;IAChD,IAAI,QAAQ,OAAO,EACjB,OAAO;IAET,IAAI,SAA6B,EAAE;IACnC,IAAI,CAAC,QAAQ,IAAI,EACf,SAAS,AAAC;WAAI,CAAA,GAAA,sCAAe,EAAE,SAAS,gBAAgB,CAAC,CAAC,0BAA0B,EAAE,IAAI,MAAM,CAAC,QAAQ,IAAI,EAAE,EAAE,CAAC;KAAE,CAAwB,MAAM,CAAC,CAAA,QAAS,CAAC,MAAM,IAAI;SAClK;YACW,wBAAA;QAAhB,IAAI,aAAY,gBAAA,QAAQ,IAAI,cAAZ,qCAAA,yBAAA,cAAc,QAAQ,cAAtB,6CAAA,uBAAwB,SAAS,CAAC,QAAQ,IAAI;QAC9D,SAAS;eAAK,sBAAA,uBAAA,YAAa,EAAE;SAAE;IACjC;IACA,IAAI,CAAC,QACH,OAAO;IAET,IAAI,aAAa,OAAO,IAAI,CAAC,CAAA,QAAS,MAAM,OAAO;IAEnD,OAALine truncated
@@ -0,0 +1,17 @@
/**
* @flow
*/
export type JSXTextMockType = {|
type: 'JSXText',
value: string,
raw: string,
|};
export default function JSXTextMock(value: string): JSXTextMockType {
return {
type: 'JSXText',
value,
raw: value,
};
}
@@ -0,0 +1,7 @@
var stringify = require('../');
var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 };
var s = stringify(obj, function (a, b) {
return a.key < b.key ? 1 : -1;
});
console.log(s);
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more