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

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

No files matched your search

@@ -0,0 +1,3 @@
# @react-aria/visually-hidden
This package is part of [react-spectrum](https://github.com/adobe/react-spectrum). See the repo for more details.
@@ -0,0 +1,33 @@
import test from 'tape';
import getSuggestion from '../../../src/util/getSuggestion';
test('spell check suggestion API', (t) => {
t.deepEqual([], getSuggestion('foo'), 'returns no suggestions given empty word and no dictionary');
t.deepEqual(
getSuggestion('foo'),
[],
'returns no suggestions given real word and no dictionary',
);
t.deepEqual(
getSuggestion('fo', ['foo', 'bar', 'baz']),
['foo'],
'returns correct suggestion given real word and a dictionary',
);
t.deepEqual(
getSuggestion('theer', ['there', 'their', 'foo', 'bar']),
['there', 'their'],
'returns multiple correct suggestions given real word and a dictionary',
);
t.deepEqual(
getSuggestion('theer', ['there', 'their', 'foo', 'bar'], 1),
['there'],
'returns correct # of suggestions given the limit argument',
);
t.end();
});
@@ -0,0 +1,424 @@
/**
* @license React
* react-dom.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
"production" !== process.env.NODE_ENV &&
(function () {
function noop() {}
function testStringCoercion(value) {
return "" + value;
}
function createPortal$1(children, containerInfo, implementation) {
var key =
3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
try {
testStringCoercion(key);
var JSCompiler_inline_result = !1;
} catch (e) {
JSCompiler_inline_result = !0;
}
JSCompiler_inline_result &&
(console.error(
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
("function" === typeof Symbol &&
Symbol.toStringTag &&
key[Symbol.toStringTag]) ||
key.constructor.name ||
"Object"
),
testStringCoercion(key));
return {
$$typeof: REACT_PORTAL_TYPE,
key: null == key ? null : "" + key,
children: children,
containerInfo: containerInfo,
implementation: implementation
};
}
function getCrossOriginStringAs(as, input) {
if ("font" === as) return "";
if ("string" === typeof input)
return "use-credentials" === input ? input : "";
}
function getValueDescriptorExpectingObjectForWarning(thing) {
return null === thing
? "`null`"
: void 0 === thing
? "`undefined`"
: "" === thing
? "an empty string"
: 'something with type "' + typeof thing + '"';
}
function getValueDescriptorExpectingEnumForWarning(thing) {
return null === thing
? "`null`"
: void 0 === thing
? "`undefined`"
: "" === thing
? "an empty string"
: "string" === typeof thing
? JSON.stringify(thing)
: "number" === typeof thing
? "`" + thing + "`"
: 'something with type "' + typeof thing + '"';
}
function resolveDispatcher() {
var dispatcher = ReactSharedInternals.H;
null === dispatcher &&
console.error(
"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
);
return dispatcher;
}
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
var React = require("react"),
Internals = {
d: {
f: noop,
r: function () {
throw Error(
"Invalid form element. requestFormReset must be passed a form that was rendered by React."
);
},
D: noop,
C: noop,
L: noop,
m: noop,
X: noop,
S: noop,
M: noop
},
p: 0,
findDOMNode: null
},
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
ReactSharedInternals =
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
("function" === typeof Map &&
null != Map.prototype &&
"function" === typeof Map.prototype.forEach &&
"function" === typeof Set &&
null != Set.prototype &&
"function" === typeof Set.prototype.clear &&
"function" === typeof Set.prototype.forEach) ||
console.error(
"React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"
);
exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
Internals;
exports.createPortal = function (children, container) {
var key =
2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;
if (
!container ||
(1 !== container.nodeType &&
9 !== container.nodeType &&
11 !== container.nodeType)
)
throw Error("Target container is not a DOM element.");
return createPortal$1(children, container, null, key);
};
exports.flushSync = function (fn) {
var previousTransition = ReactSharedInternals.T,
previousUpdatePriority = Internals.p;
try {
if (((ReactSharedInternals.T = null), (Internals.p = 2), fn))
return fn();
} finally {
(ReactSharedInternals.T = previousTransition),
(Internals.p = previousUpdatePriority),
Internals.d.f() &&
console.error(
"flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."
);
}
};
exports.preconnect = function (href, options) {
"string" === typeof href && href
? null != options && "object" !== typeof options
? console.error(
"ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",
getValueDescriptorExpectingEnumForWarning(options)
)
: null != options &&
"string" !== typeof options.crossOrigin &&
console.error(
"ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",
getValueDescriptorExpectingObjectForWarning(options.crossOrigin)
)
: console.error(
"ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
getValueDescriptorExpectingObjectForWarning(href)
);
"string" === typeof href &&
(options
? ((options = options.crossOrigin),
(options =
"string" === typeof options
? "use-credentials" === options
? options
: ""
: void 0))
: (options = null),
Internals.d.C(href, options));
};
exports.prefetchDNS = function (href) {
if ("string" !== typeof href || !href)
console.error(
"ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
getValueDescriptorExpectingObjectForWarning(href)
);
else if (1 < arguments.length) {
var options = arguments[1];
"object" === typeof options && options.hasOwnProperty("crossOrigin")
? console.error(
"ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
getValueDescriptorExpectingEnumForWarning(options)
)
: console.error(
"ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
getValueDescriptorExpectingEnumForWarning(options)
);
}
"string" === typeof href && Internals.d.D(href);
};
exports.preinit = function (href, options) {
"string" === typeof href && href
? null == options || "object" !== typeof options
? console.error(
"ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",
getValueDescriptorExpectingEnumForWarning(options)
)
: "style" !== options.as &&
"script" !== options.as &&
console.error(
'ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',
getValueDescriptorExpectingEnumForWarning(options.as)
)
: console.error(
"ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
getValueDescriptorExpectingObjectForWarning(href)
);
if (
"string" === typeof href &&
options &&
"string" === typeof options.as
) {
var as = options.as,
crossOrigin = getCrossOriginStringAs(as, options.crossOrigin),
integrity =
"string" === typeof options.integrity ? options.integrity : void 0,
fetchPriority =
"string" === typeof options.fetchPriority
? options.fetchPriority
: void 0;
"style" === as
? Internals.d.S(
href,
"string" === typeof options.precedence
? options.precedence
: void 0,
{
crossOrigin: crossOrigin,
integrity: integrity,
fetchPriority: fetchPriority
}
)
: "script" === as &&
Internals.d.X(href, {
crossOrigin: crossOrigin,
integrity: integrity,
fetchPriority: fetchPriority,
nonce: "string" === typeof options.nonce ? options.nonce : void 0
});
}
};
exports.preinitModule = function (href, options) {
var encountered = "";
("string" === typeof href && href) ||
(encountered +=
" The `href` argument encountered was " +
getValueDescriptorExpectingObjectForWarning(href) +
".");
void 0 !== options && "object" !== typeof options
? (encountered +=
" The `options` argument encountered was " +
getValueDescriptorExpectingObjectForWarning(options) +
".")
: options &&
"as" in options &&
"script" !== options.as &&
(encountered +=
" The `as` option encountered was " +
getValueDescriptorExpectingEnumForWarning(options.as) +
".");
if (encountered)
console.error(
"ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",
encountered
);
else
switch (
((encountered =
options && "string" === typeof options.as ? options.as : "script"),
encountered)
) {
case "script":
break;
default:
(encountered =
getValueDescriptorExpectingEnumForWarning(encountered)),
console.error(
'ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',
encountered,
href
);
}
if ("string" === typeof href)
if ("object" === typeof options && null !== options) {
if (null == options.as || "script" === options.as)
(encountered = getCrossOriginStringAs(
options.as,
options.crossOrigin
)),
Internals.d.M(href, {
crossOrigin: encountered,
integrity:
"string" === typeof options.integrity
? options.integrity
: void 0,
nonce:
"string" === typeof options.nonce ? options.nonce : void 0
});
} else null == options && Internals.d.M(href);
};
exports.preload = function (href, options) {
var encountered = "";
("string" === typeof href && href) ||
(encountered +=
" The `href` argument encountered was " +
getValueDescriptorExpectingObjectForWarning(href) +
".");
null == options || "object" !== typeof options
? (encountered +=
" The `options` argument encountered was " +
getValueDescriptorExpectingObjectForWarning(options) +
".")
: ("string" === typeof options.as && options.as) ||
(encountered +=
" The `as` option encountered was " +
getValueDescriptorExpectingObjectForWarning(options.as) +
".");
encountered &&
console.error(
'ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',
encountered
);
if (
"string" === typeof href &&
"object" === typeof options &&
null !== options &&
"string" === typeof options.as
) {
encountered = options.as;
var crossOrigin = getCrossOriginStringAs(
encountered,
options.crossOrigin
);
Internals.d.L(href, encountered, {
crossOrigin: crossOrigin,
integrity:
"string" === typeof options.integrity ? options.integrity : void 0,
nonce: "string" === typeof options.nonce ? options.nonce : void 0,
type: "string" === typeof options.type ? options.type : void 0,
fetchPriority:
"string" === typeof options.fetchPriority
? options.fetchPriority
: void 0,
referrerPolicy:
"string" === typeof options.referrerPolicy
? options.referrerPolicy
: void 0,
imageSrcSet:
"string" === typeof options.imageSrcSet
? options.imageSrcSet
: void 0,
imageSizes:
"string" === typeof options.imageSizes
? options.imageSizes
: void 0,
media: "string" === typeof options.media ? options.media : void 0
});
}
};
exports.preloadModule = function (href, options) {
var encountered = "";
("string" === typeof href && href) ||
(encountered +=
" The `href` argument encountered was " +
getValueDescriptorExpectingObjectForWarning(href) +
".");
void 0 !== options && "object" !== typeof options
? (encountered +=
" The `options` argument encountered was " +
getValueDescriptorExpectingObjectForWarning(options) +
".")
: options &&
"as" in options &&
"string" !== typeof options.as &&
(encountered +=
" The `as` option encountered was " +
getValueDescriptorExpectingObjectForWarning(options.as) +
".");
encountered &&
console.error(
'ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',
encountered
);
"string" === typeof href &&
(options
? ((encountered = getCrossOriginStringAs(
options.as,
options.crossOrigin
)),
Internals.d.m(href, {
as:
"string" === typeof options.as && "script" !== options.as
? options.as
: void 0,
crossOrigin: encountered,
integrity:
"string" === typeof options.integrity
? options.integrity
: void 0
}))
: Internals.d.m(href));
};
exports.requestFormReset = function (form) {
Internals.d.r(form);
};
exports.unstable_batchedUpdates = function (fn, a) {
return fn(a);
};
exports.useFormState = function (action, initialState, permalink) {
return resolveDispatcher().useFormState(action, initialState, permalink);
};
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.2.0";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
})();
@@ -0,0 +1,129 @@
import {useRef as $fUfeP$useRef, useState as $fUfeP$useState, useEffect as $fUfeP$useEffect} from "react";
import {useInteractionModality as $fUfeP$useInteractionModality} from "@react-aria/interactions";
import {useResizeObserver as $fUfeP$useResizeObserver} from "@react-aria/utils";
const $d275435c250248f8$var$ALLOWED_INVALID_MOVEMENTS = 2;
const $d275435c250248f8$var$THROTTLE_TIME = 50;
const $d275435c250248f8$var$TIMEOUT_TIME = 1000;
const $d275435c250248f8$var$ANGLE_PADDING = Math.PI / 12; // 15°
function $d275435c250248f8$export$85ec83e04c95f50a(options) {
let { menuRef: menuRef, submenuRef: submenuRef, isOpen: isOpen, isDisabled: isDisabled } = options;
let prevPointerPos = (0, $fUfeP$useRef)(undefined);
let submenuRect = (0, $fUfeP$useRef)(undefined);
let lastProcessedTime = (0, $fUfeP$useRef)(0);
let timeout = (0, $fUfeP$useRef)(undefined);
let autoCloseTimeout = (0, $fUfeP$useRef)(undefined);
let submenuSide = (0, $fUfeP$useRef)(undefined);
let movementsTowardsSubmenuCount = (0, $fUfeP$useRef)(2);
let [preventPointerEvents, setPreventPointerEvents] = (0, $fUfeP$useState)(false);
let updateSubmenuRect = ()=>{
if (submenuRef.current) {
submenuRect.current = submenuRef.current.getBoundingClientRect();
submenuSide.current = undefined;
}
};
(0, $fUfeP$useResizeObserver)({
ref: submenuRef,
onResize: updateSubmenuRect
});
let reset = ()=>{
setPreventPointerEvents(false);
movementsTowardsSubmenuCount.current = $d275435c250248f8$var$ALLOWED_INVALID_MOVEMENTS;
prevPointerPos.current = undefined;
};
let modality = (0, $fUfeP$useInteractionModality)();
(0, $fUfeP$useEffect)(()=>{
if (preventPointerEvents && menuRef.current) menuRef.current.style.pointerEvents = 'none';
else menuRef.current.style.pointerEvents = '';
}, [
menuRef,
preventPointerEvents
]);
(0, $fUfeP$useEffect)(()=>{
let submenu = submenuRef.current;
let menu = menuRef.current;
if (isDisabled || !submenu || !isOpen || modality !== 'pointer' || !menu) {
reset();
return;
}
submenuRect.current = submenu.getBoundingClientRect();
let onPointerMove = (e)=>{
if (e.pointerType === 'touch' || e.pointerType === 'pen') return;
let currentTime = Date.now();
// Throttle
if (currentTime - lastProcessedTime.current < $d275435c250248f8$var$THROTTLE_TIME) return;
clearTimeout(timeout.current);
clearTimeout(autoCloseTimeout.current);
let { clientX: mouseX, clientY: mouseY } = e;
if (!prevPointerPos.current) {
prevPointerPos.current = {
x: mouseX,
y: mouseY
};
return;
}
if (!submenuRect.current) return;
if (!submenuSide.current) submenuSide.current = mouseX > submenuRect.current.right ? 'left' : 'right';
// Pointer is outside of parent menu
if (mouseX < menu.getBoundingClientRect().left || mouseX > menu.getBoundingClientRect().right || mouseY < menu.getBoundingClientRect().top || mouseY > menu.getBoundingClientRect().bottom) {
reset();
return;
}
/* Check if pointer is moving towards submenu.
Uses the 2-argument arctangent (https://en.wikipedia.org/wiki/Atan2) to calculate:
- angle between previous pointer and top of submenu
- angle between previous pointer and bottom of submenu
- angle between previous pointer and current pointer (delta)
If the pointer delta angle value is between the top and bottom angle values, we know the pointer is moving towards the submenu.
*/ let prevMouseX = prevPointerPos.current.x;
let prevMouseY = prevPointerPos.current.y;
let toSubmenuX = submenuSide.current === 'right' ? submenuRect.current.left - prevMouseX : prevMouseX - submenuRect.current.right;
let angleTop = Math.atan2(prevMouseY - submenuRect.current.top, toSubmenuX) + $d275435c250248f8$var$ANGLE_PADDING;
let angleBottom = Math.atan2(prevMouseY - submenuRect.current.bottom, toSubmenuX) - $d275435c250248f8$var$ANGLE_PADDING;
let anglePointer = Math.atan2(prevMouseY - mouseY, submenuSide.current === 'left' ? -(mouseX - prevMouseX) : mouseX - prevMouseX);
let isMovingTowardsSubmenu = anglePointer < angleTop && anglePointer > angleBottom;
movementsTowardsSubmenuCount.current = isMovingTowardsSubmenu ? Math.min(movementsTowardsSubmenuCount.current + 1, $d275435c250248f8$var$ALLOWED_INVALID_MOVEMENTS) : Math.max(movementsTowardsSubmenuCount.current - 1, 0);
if (movementsTowardsSubmenuCount.current >= $d275435c250248f8$var$ALLOWED_INVALID_MOVEMENTS) setPreventPointerEvents(true);
else setPreventPointerEvents(false);
lastProcessedTime.current = currentTime;
prevPointerPos.current = {
x: mouseX,
y: mouseY
};
// If the pointer is moving towards the submenu, start a timeout to close if no other movements are made after 500ms.
if (isMovingTowardsSubmenu) timeout.current = setTimeout(()=>{
reset();
autoCloseTimeout.current = setTimeout(()=>{
// Fire a pointerover event to trigger the menu to close.
// Wait until pointer-events:none is no longer applied
let target = document.elementFromPoint(mouseX, mouseY);
if (target && menu.contains(target)) target.dispatchEvent(new PointerEvent('pointerover', {
bubbles: true,
cancelable: true
}));
}, 100);
}, $d275435c250248f8$var$TIMEOUT_TIME);
};
window.addEventListener('pointermove', onPointerMove);
return ()=>{
window.removeEventListener('pointermove', onPointerMove);
clearTimeout(timeout.current);
clearTimeout(autoCloseTimeout.current);
movementsTowardsSubmenuCount.current = $d275435c250248f8$var$ALLOWED_INVALID_MOVEMENTS;
};
}, [
isDisabled,
isOpen,
menuRef,
modality,
setPreventPointerEvents,
submenuRef
]);
}
export {$d275435c250248f8$export$85ec83e04c95f50a as useSafelyMouseToSubmenu};
//# sourceMappingURL=useSafelyMouseToSubmenu.module.js.map
@@ -0,0 +1 @@
{"name":"braces","version":"3.0.3","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532095845,"integrity":"sha512-cjkrzNiWTIjsiqPYFXRqK2pEZtnHyo9CjX0PPiuxFnTvSUyjNciyVe7lglwIene7RaXWACXzGLeKZOGb7M0jxw==","mode":420,"size":1091},"lib/compile.js":{"checkedAt":1794532095845,"integrity":"sha512-DiY+a85sXV/HyyIu9HvkqYhGgk1dfMOW7fomF3I4G1ac7BzUk2Zma/9ZPUunhlXpm5a6sxw+JP6VIgAcYlrkYw==","mode":420,"size":1501},"lib/constants.js":{"checkedAt":1794532095845,"integrity":"sha512-NGgbbPKdGMl708QWvkTkA/6zcUDla0LXbNmcQ17VFJ+OyD3xLLFsZrXwj5DvBnJ1Qc4uXPoZFNw/3mYYgEM6PQ==","mode":420,"size":1589},"lib/expand.js":{"checkedAt":1794532095845,"integrity":"sha512-6xzP4Zgbg5bw6h+hBT/cezQKRx5a9FFdnHRRc4TnvukJmBJUWmvtXNXBuk3xQXfhwxqj2UHQl7Vyts3Cosl7Og==","mode":420,"size":2797},"index.js":{"checkedAt":1794532095845,"integrity":"sha512-3pSTzuACPheQSmaXXwEPd0qco74qu1+0vkjRWMhiZGFYHMDoqwxCp4GCWoNllLvyYjpcMGoA/YtO39n3uY0cEw==","mode":420,"size":4380},"lib/parse.js":{"checkedAt":1794532095845,"integrity":"sha512-J2gKmeZxS0WEigYVh9GSTrnQ6j4aMzBJZyHRPL9sfGd0Sfa8oH2apY2Q1VxJsyjq53N5SjN17H3Ca2YZAIO0oA==","mode":420,"size":6899},"lib/stringify.js":{"checkedAt":1794532095845,"integrity":"sha512-DcoGxtqZv+cN4ipaUeeSYM23arkdrhDkQW0fKMCvdDS1xWu5Urar47o4mmVLaaG6oz/cv2wU0rChGvbF+iCpsw==","mode":420,"size":708},"lib/utils.js":{"checkedAt":1794532095846,"integrity":"sha512-Cz6YUZBhxpcj7i2Qf9NCM9pJXhjOJAuPEifyHkjjPiN4ixjbZS/aE+khXnoHG6Ca2gY/hSGZ0h5cudkITAMgXw==","mode":420,"size":2518},"package.json":{"checkedAt":1794532095846,"integrity":"sha512-1wzR00BYoEdw6UX2sudqpLoh+j83L6quDddAos5w0WlJF8y7fZXQUe3mkvbnWlS8eKWAtiugAQat5UnlZjAg1g==","mode":420,"size":1647},"README.md":{"checkedAt":1794532095846,"integrity":"sha512-+XF6NjDx8LROM61K17wrP1pzFWjmWKAAzajYfmMQ/+yUquSxzVFY6NbS7GXfPhOS0AJUB8lOEUfBYVmgHUJSDg==","mode":420,"size":21505}}}
@@ -0,0 +1,42 @@
import type { TSchema } from '../schema/index';
import type { TProperties } from '../object/index';
import type { TNever } from '../never/index';
export type TupleToIntersect<T extends any[]> = T extends [infer I] ? I : T extends [infer I, ...infer R] ? I & TupleToIntersect<R> : never;
export type TupleToUnion<T extends any[]> = {
[K in keyof T]: T[K];
}[number];
export type UnionToIntersect<U> = (U extends unknown ? (arg: U) => 0 : never) extends (arg: infer I) => 0 ? I : never;
export type UnionLast<U> = UnionToIntersect<U extends unknown ? (x: U) => 0 : never> extends (x: infer L) => 0 ? L : never;
export type UnionToTuple<U, Acc extends unknown[] = [], R = UnionLast<U>> = [U] extends [never] ? Acc : UnionToTuple<Exclude<U, R>, [Extract<U, R>, ...Acc]>;
export type Trim<T> = T extends `${' '}${infer U}` ? Trim<U> : T extends `${infer U}${' '}` ? Trim<U> : T;
export type Assert<T, E> = T extends E ? T : never;
export type Evaluate<T> = T extends infer O ? {
[K in keyof O]: O[K];
} : never;
export type Ensure<T> = T extends infer U ? U : never;
export type EmptyString = '';
export type ZeroString = '0';
type IncrementBase = {
m: '9';
t: '01';
'0': '1';
'1': '2';
'2': '3';
'3': '4';
'4': '5';
'5': '6';
'6': '7';
'7': '8';
'8': '9';
'9': '0';
};
type IncrementTake<T extends keyof IncrementBase> = IncrementBase[T];
type IncrementStep<T extends string> = T extends IncrementBase['m'] ? IncrementBase['t'] : T extends `${infer L extends keyof IncrementBase}${infer R}` ? L extends IncrementBase['m'] ? `${IncrementTake<L>}${IncrementStep<R>}` : `${IncrementTake<L>}${R}` : never;
type IncrementReverse<T extends string> = T extends `${infer L}${infer R}` ? `${IncrementReverse<R>}${L}` : T;
export type TIncrement<T extends string> = IncrementReverse<IncrementStep<IncrementReverse<T>>>;
/** Increments the given string value + 1 */
export declare function Increment<T extends string>(T: T): TIncrement<T>;
export type AssertProperties<T> = T extends TProperties ? T : TProperties;
export type AssertRest<T, E extends TSchema[] = TSchema[]> = T extends E ? T : [];
export type AssertType<T, E extends TSchema = TSchema> = T extends E ? T : TNever;
export {};
@@ -0,0 +1,124 @@
import { lineNumbers, highlightActiveLineGutter, highlightSpecialChars, drawSelection, dropCursor, rectangularSelection, crosshairCursor, highlightActiveLine, keymap } from '@codemirror/view';
import { EditorState } from '@codemirror/state';
import { history, defaultKeymap, historyKeymap } from '@codemirror/commands';
import { highlightSelectionMatches, searchKeymap } from '@codemirror/search';
import { closeBrackets, autocompletion, closeBracketsKeymap, completionKeymap } from '@codemirror/autocomplete';
import { foldGutter, indentOnInput, syntaxHighlighting, defaultHighlightStyle, bracketMatching, indentUnit, foldKeymap } from '@codemirror/language';
import { lintKeymap } from '@codemirror/lint';
/**
This is an extension value that just pulls together a number of
extensions that you might want in a basic editor. It is meant as a
convenient helper to quickly set up CodeMirror without installing
and importing a lot of separate packages.
Specifically, it includes...
- [the default command bindings](https://codemirror.net/6/docs/ref/#commands.defaultKeymap)
- [line numbers](https://codemirror.net/6/docs/ref/#view.lineNumbers)
- [special character highlighting](https://codemirror.net/6/docs/ref/#view.highlightSpecialChars)
- [the undo history](https://codemirror.net/6/docs/ref/#commands.history)
- [a fold gutter](https://codemirror.net/6/docs/ref/#language.foldGutter)
- [custom selection drawing](https://codemirror.net/6/docs/ref/#view.drawSelection)
- [drop cursor](https://codemirror.net/6/docs/ref/#view.dropCursor)
- [multiple selections](https://codemirror.net/6/docs/ref/#state.EditorState^allowMultipleSelections)
- [reindentation on input](https://codemirror.net/6/docs/ref/#language.indentOnInput)
- [the default highlight style](https://codemirror.net/6/docs/ref/#language.defaultHighlightStyle) (as fallback)
- [bracket matching](https://codemirror.net/6/docs/ref/#language.bracketMatching)
- [bracket closing](https://codemirror.net/6/docs/ref/#autocomplete.closeBrackets)
- [autocompletion](https://codemirror.net/6/docs/ref/#autocomplete.autocompletion)
- [rectangular selection](https://codemirror.net/6/docs/ref/#view.rectangularSelection) and [crosshair cursor](https://codemirror.net/6/docs/ref/#view.crosshairCursor)
- [active line highlighting](https://codemirror.net/6/docs/ref/#view.highlightActiveLine)
- [active line gutter highlighting](https://codemirror.net/6/docs/ref/#view.highlightActiveLineGutter)
- [selection match highlighting](https://codemirror.net/6/docs/ref/#search.highlightSelectionMatches)
- [search](https://codemirror.net/6/docs/ref/#search.searchKeymap)
- [linting](https://codemirror.net/6/docs/ref/#lint.lintKeymap)
(You'll probably want to add some language package to your setup
too.)
This extension does not allow customization. The idea is that,
once you decide you want to configure your editor more precisely,
you take this package's source (which is just a bunch of imports
and an array literal), copy it into your own code, and adjust it
as desired.
*/
export var basicSetup = function basicSetup(options) {
if (options === void 0) {
options = {};
}
var {
crosshairCursor: initCrosshairCursor = false
} = options;
var keymaps = [];
if (options.closeBracketsKeymap !== false) {
keymaps = keymaps.concat(closeBracketsKeymap);
}
if (options.defaultKeymap !== false) {
keymaps = keymaps.concat(defaultKeymap);
}
if (options.searchKeymap !== false) {
keymaps = keymaps.concat(searchKeymap);
}
if (options.historyKeymap !== false) {
keymaps = keymaps.concat(historyKeymap);
}
if (options.foldKeymap !== false) {
keymaps = keymaps.concat(foldKeymap);
}
if (options.completionKeymap !== false) {
keymaps = keymaps.concat(completionKeymap);
}
if (options.lintKeymap !== false) {
keymaps = keymaps.concat(lintKeymap);
}
var extensions = [];
if (options.lineNumbers !== false) extensions.push(lineNumbers());
if (options.highlightActiveLineGutter !== false) extensions.push(highlightActiveLineGutter());
if (options.highlightSpecialChars !== false) extensions.push(highlightSpecialChars());
if (options.history !== false) extensions.push(history());
if (options.foldGutter !== false) extensions.push(foldGutter());
if (options.drawSelection !== false) extensions.push(drawSelection());
if (options.dropCursor !== false) extensions.push(dropCursor());
if (options.allowMultipleSelections !== false) extensions.push(EditorState.allowMultipleSelections.of(true));
if (options.indentOnInput !== false) extensions.push(indentOnInput());
if (options.syntaxHighlighting !== false) extensions.push(syntaxHighlighting(defaultHighlightStyle, {
fallback: true
}));
if (options.bracketMatching !== false) extensions.push(bracketMatching());
if (options.closeBrackets !== false) extensions.push(closeBrackets());
if (options.autocompletion !== false) extensions.push(autocompletion());
if (options.rectangularSelection !== false) extensions.push(rectangularSelection());
if (initCrosshairCursor !== false) extensions.push(crosshairCursor());
if (options.highlightActiveLine !== false) extensions.push(highlightActiveLine());
if (options.highlightSelectionMatches !== false) extensions.push(highlightSelectionMatches());
if (options.tabSize && typeof options.tabSize === 'number') extensions.push(indentUnit.of(' '.repeat(options.tabSize)));
return extensions.concat([keymap.of(keymaps.flat())]).filter(Boolean);
};
/**
A minimal set of extensions to create a functional editor. Only
includes [the default keymap](https://codemirror.net/6/docs/ref/#commands.defaultKeymap), [undo
history](https://codemirror.net/6/docs/ref/#commands.history), [special character
highlighting](https://codemirror.net/6/docs/ref/#view.highlightSpecialChars), [custom selection
drawing](https://codemirror.net/6/docs/ref/#view.drawSelection), and [default highlight
style](https://codemirror.net/6/docs/ref/#language.defaultHighlightStyle).
*/
export var minimalSetup = function minimalSetup(options) {
if (options === void 0) {
options = {};
}
var keymaps = [];
if (options.defaultKeymap !== false) {
keymaps = keymaps.concat(defaultKeymap);
}
if (options.historyKeymap !== false) {
keymaps = keymaps.concat(historyKeymap);
}
var extensions = [];
if (options.highlightSpecialChars !== false) extensions.push(highlightSpecialChars());
if (options.history !== false) extensions.push(history());
if (options.drawSelection !== false) extensions.push(drawSelection());
if (options.syntaxHighlighting !== false) extensions.push(syntaxHighlighting(defaultHighlightStyle, {
fallback: true
}));
return extensions.concat([keymap.of(keymaps.flat())]).filter(Boolean);
};
@@ -0,0 +1,36 @@
/**
* @typedef {import('hast').Element} Element
* @typedef {import('hast').Properties} Properties
* @typedef {import('mdast').Image} Image
* @typedef {import('../state.js').State} State
*/
import {normalizeUri} from 'micromark-util-sanitize-uri'
/**
* Turn an mdast `image` node into hast.
*
* @param {State} state
* Info passed around.
* @param {Image} node
* mdast node.
* @returns {Element}
* hast node.
*/
export function image(state, node) {
/** @type {Properties} */
const properties = {src: normalizeUri(node.url)}
if (node.alt !== null && node.alt !== undefined) {
properties.alt = node.alt
}
if (node.title !== null && node.title !== undefined) {
properties.title = node.title
}
/** @type {Element} */
const result = {type: 'element', tagName: 'img', properties, children: []}
state.patch(node, result)
return state.applyData(node, result)
}
@@ -0,0 +1 @@
{"name":"@react-aria/toolbar","version":"3.0.0-beta.21","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532107045,"integrity":"sha512-cil7stSp3ik41Hdv2Dj+GMcbvUfs1q+MZ2Yte0804py9i6oJJN/diCiIr/brcQOZ5ZqwAI6dgaHA7l8FZheQBw==","mode":420,"size":11335},"dist/main.js":{"checkedAt":1794532107046,"integrity":"sha512-WEHiY6rQcf19SDrMXbHVj8Kbb7xvzAqnzYxnm5oaI75ZbmNPh1KlIWwpcPKILnGeLmUY49yTQ4k38wN1hGIPOg==","mode":420,"size":1168},"dist/module.js":{"checkedAt":1794532107046,"integrity":"sha512-5HhexBNEaAAZmWOgRge1fbIAADJd6gKY5MiEV73sU4i6Qm7IiR1SSIcwSTJgUIIGQcx/j+smW1Aarw/ozrF0TQ==","mode":420,"size":819},"dist/useToolbar.main.js":{"checkedAt":1794532107046,"integrity":"sha512-xBpPNUwmwK/PWAlFWWcEdJAbK0t1FaiTMV35AuCV2NUTtYfCOViagu9p2mDs9WosLqLROKrb5FbW1+k/Fm8s+w==","mode":420,"size":5086},"dist/useToolbar.module.js":{"checkedAt":1794532107046,"integrity":"sha512-4OnyQ8wwCZw2Fbwfo8yCJ1kij3po1Lih/3EVcISP8CYtcKKGWIq7ym7iyT3EaRGjJOyqfEjRyWiVnjJznCU1zA==","mode":420,"size":4991},"package.json":{"checkedAt":1794532107046,"integrity":"sha512-ihEpVFhOM85I0jKdXbZqNJ+Nbfu22OilexG2QVkAog5uZF833inyN4uzpHXol/F+r3BoVOrcvMYcQqqQftxokQ==","mode":420,"size":1081},"dist/main.js.map":{"checkedAt":1794532107046,"integrity":"sha512-a/xIVZFVCu2obMHKPWRmzYFc9lbbA3LHu385Nva0YnqpWIpwfkRs/5vi5g3YkhNXJQIpEk1qmLk6sEo3CnT8NQ==","mode":420,"size":842},"dist/module.js.map":{"checkedAt":1794532107046,"integrity":"sha512-3BBg9myaBtyKXzXzlbaVAa2sSc7PyATHf83S7+HGwnO2lR6NC4AHhgLaEF9bTwzdKVllShgsvN30cMUuE2Q90w==","mode":420,"size":827},"dist/types.d.ts.map":{"checkedAt":1794532107047,"integrity":"sha512-fHeUtCHtoLLrfaSlHHTOLCtR99hRkrp7+N+orVMQGrYHi5MZ+GO+lIMo+L7TVRkVDAmL4w8EIkrkR/dd8f7w9w==","mode":420,"size":1209},"dist/useToolbar.main.js.map":{"checkedAt":1794532107047,"integrity":"sha512-7FrIvCVGsKY7q4euSgxSpUCFdRhFTIQfEFoDosntLyO2RsjV8bQVX9uf9L1Charh7Ywug8sak+M9+3LfyE4mHA==","mode":420,"size":7044},"dist/useToolbar.module.js.map":{"checkedAt":1794532107047,"integrity":"sha512-ijZ6MHO3kHRr5sNGd72NGwrrkMnlte8T3JITv8ZdFtJW3fpU4RB8zj8DOSWLZBdUjSwAhv0JqHve6B4vmZDANg==","mode":420,"size":7038},"README.md":{"checkedAt":1794532107047,"integrity":"sha512-5b+05HUT6G0/Kt1BJ43TiJq3K3D4pF2Jo2b2fLanwtKucGe/UbX15nuTwKWGRnvg9X0AvbFmrtghmQ1Ig6bGJQ==","mode":420,"size":137},"dist/import.mjs":{"checkedAt":1794532107047,"integrity":"sha512-p6NFPBYo0udPsPwch1Uwzoyo+OJM0Pji9zzPbChwGJ7f7RBm8aXwinVadHX/RA9BuOFP/I7CWFB2AVcRvKIctQ==","mode":420,"size":813},"dist/useToolbar.mjs":{"checkedAt":1794532107046,"integrity":"sha512-4OnyQ8wwCZw2Fbwfo8yCJ1kij3po1Lih/3EVcISP8CYtcKKGWIq7ym7iyT3EaRGjJOyqfEjRyWiVnjJznCU1zA==","mode":420,"size":4991},"src/index.ts":{"checkedAt":1794532107047,"integrity":"sha512-tCWDK5mdpN9igDSsH6Gt2ckHyv0GNTiRdLPa4cFg84NIvL6WsIwXTMwZzBiCIfZSSVpqllSFmfJKOTsK1HuoUA==","mode":420,"size":651},"dist/types.d.ts":{"checkedAt":1794532107047,"integrity":"sha512-+a8Q5V73GPm2EIIi4fSHGmqCyOLxO3HFfQSOZRD9svPWsydDCDhZi1uhcuAmBusyF3yVzdv0/fDruTpfHUFolg==","mode":420,"size":862},"src/useToolbar.ts":{"checkedAt":1794532107047,"integrity":"sha512-VcAieASUmGzo59lcWfruLKglRwc2zUgRO/rbpYQ9KqQWmvbC619M93QefC7NFrA7kq4orL4BYNoFuPHUNvkUmg==","mode":420,"size":4968}}}
@@ -0,0 +1,256 @@
/**
* Copyright (c) 2016 The xterm.js authors. All rights reserved.
* @license MIT
*/
import { ICharset } from 'common/Types';
/**
* The character sets supported by the terminal. These enable several languages
* to be represented within the terminal with only 8-bit encoding. See ISO 2022
* for a discussion on character sets. Only VT100 character sets are supported.
*/
export const CHARSETS: { [key: string]: ICharset | undefined } = {};
/**
* The default character set, US.
*/
export const DEFAULT_CHARSET: ICharset | undefined = CHARSETS['B'];
/**
* DEC Special Character and Line Drawing Set.
* Reference: http://vt100.net/docs/vt102-ug/table5-13.html
* A lot of curses apps use this if they see TERM=xterm.
* testing: echo -e '\e(0a\e(B'
* The xterm output sometimes seems to conflict with the
* reference above. xterm seems in line with the reference
* when running vttest however.
* The table below now uses xterm's output from vttest.
*/
CHARSETS['0'] = {
'`': '\u25c6', // '◆'
'a': '\u2592', // '▒'
'b': '\u2409', // '␉' (HT)
'c': '\u240c', // '␌' (FF)
'd': '\u240d', // '␍' (CR)
'e': '\u240a', // '␊' (LF)
'f': '\u00b0', // '°'
'g': '\u00b1', // '±'
'h': '\u2424', // '␤' (NL)
'i': '\u240b', // '␋' (VT)
'j': '\u2518', // '┘'
'k': '\u2510', // '┐'
'l': '\u250c', // '┌'
'm': '\u2514', // '└'
'n': '\u253c', // '┼'
'o': '\u23ba', // '⎺'
'p': '\u23bb', // '⎻'
'q': '\u2500', // '─'
'r': '\u23bc', // '⎼'
's': '\u23bd', // '⎽'
't': '\u251c', // '├'
'u': '\u2524', // '┤'
'v': '\u2534', // '┴'
'w': '\u252c', // '┬'
'x': '\u2502', // '│'
'y': '\u2264', // '≤'
'z': '\u2265', // '≥'
'{': '\u03c0', // 'π'
'|': '\u2260', // '≠'
'}': '\u00a3', // '£'
'~': '\u00b7' // '·'
};
/**
* British character set
* ESC (A
* Reference: http://vt100.net/docs/vt220-rm/table2-5.html
*/
CHARSETS['A'] = {
'#': '£'
};
/**
* United States character set
* ESC (B
*/
CHARSETS['B'] = undefined;
/**
* Dutch character set
* ESC (4
* Reference: http://vt100.net/docs/vt220-rm/table2-6.html
*/
CHARSETS['4'] = {
'#': '£',
'@': '¾',
'[': 'ij',
'\\': '½',
']': '|',
'{': '¨',
'|': 'f',
'}': '¼',
'~': '´'
};
/**
* Finnish character set
* ESC (C or ESC (5
* Reference: http://vt100.net/docs/vt220-rm/table2-7.html
*/
CHARSETS['C'] =
CHARSETS['5'] = {
'[': 'Ä',
'\\': 'Ö',
']': 'Å',
'^': 'Ü',
'`': 'é',
'{': 'ä',
'|': 'ö',
'}': 'å',
'~': 'ü'
};
/**
* French character set
* ESC (R
* Reference: http://vt100.net/docs/vt220-rm/table2-8.html
*/
CHARSETS['R'] = {
'#': '£',
'@': 'à',
'[': '°',
'\\': 'ç',
']': '§',
'{': 'é',
'|': 'ù',
'}': 'è',
'~': '¨'
};
/**
* French Canadian character set
* ESC (Q
* Reference: http://vt100.net/docs/vt220-rm/table2-9.html
*/
CHARSETS['Q'] = {
'@': 'à',
'[': 'â',
'\\': 'ç',
']': 'ê',
'^': 'î',
'`': 'ô',
'{': 'é',
'|': 'ù',
'}': 'è',
'~': 'û'
};
/**
* German character set
* ESC (K
* Reference: http://vt100.net/docs/vt220-rm/table2-10.html
*/
CHARSETS['K'] = {
'@': '§',
'[': 'Ä',
'\\': 'Ö',
']': 'Ü',
'{': 'ä',
'|': 'ö',
'}': 'ü',
'~': 'ß'
};
/**
* Italian character set
* ESC (Y
* Reference: http://vt100.net/docs/vt220-rm/table2-11.html
*/
CHARSETS['Y'] = {
'#': '£',
'@': '§',
'[': '°',
'\\': 'ç',
']': 'é',
'`': 'ù',
'{': 'à',
'|': 'ò',
'}': 'è',
'~': 'ì'
};
/**
* Norwegian/Danish character set
* ESC (E or ESC (6
* Reference: http://vt100.net/docs/vt220-rm/table2-12.html
*/
CHARSETS['E'] =
CHARSETS['6'] = {
'@': 'Ä',
'[': 'Æ',
'\\': 'Ø',
']': 'Å',
'^': 'Ü',
'`': 'ä',
'{': 'æ',
'|': 'ø',
'}': 'å',
'~': 'ü'
};
/**
* Spanish character set
* ESC (Z
* Reference: http://vt100.net/docs/vt220-rm/table2-13.html
*/
CHARSETS['Z'] = {
'#': '£',
'@': '§',
'[': '¡',
'\\': 'Ñ',
']': '¿',
'{': '°',
'|': 'ñ',
'}': 'ç'
};
/**
* Swedish character set
* ESC (H or ESC (7
* Reference: http://vt100.net/docs/vt220-rm/table2-14.html
*/
CHARSETS['H'] =
CHARSETS['7'] = {
'@': 'É',
'[': 'Ä',
'\\': 'Ö',
']': 'Å',
'^': 'Ü',
'`': 'é',
'{': 'ä',
'|': 'ö',
'}': 'å',
'~': 'ü'
};
/**
* Swiss character set
* ESC (=
* Reference: http://vt100.net/docs/vt220-rm/table2-15.html
*/
CHARSETS['='] = {
'#': 'ù',
'@': 'à',
'[': 'é',
'\\': 'ç',
']': 'ê',
'^': 'î',
// eslint-disable-next-line @typescript-eslint/naming-convention
'_': 'è',
'`': 'ô',
'{': 'ä',
'|': 'ö',
'}': 'ü',
'~': 'û'
};
@@ -0,0 +1,6 @@
module.exports = {
"longPressMessage": `Langt tryk eller tryk p\xe5 Alt + pil ned for at \xe5bne menuen`
};
//# sourceMappingURL=da-DK.main.js.map
@@ -0,0 +1,82 @@
/* (c) 2015 Ari Porad (@ariporad) <http://ariporad.com>. License: ariporad.mit-license.org */
/**
* The hook. Accepts the code of the module and the filename.
*/
declare type Hook = (code: string, filename: string) => string;
/**
* A matcher function, will be called with path to a file.
*
* Should return truthy if the file should be hooked, falsy otherwise.
*/
declare type Matcher = (path: string) => boolean;
/**
* Reverts the hook when called.
*/
declare type RevertFunction = () => void;
interface Options {
/**
* The extensions to hook. Should start with '.' (ex. ['.js']).
*
* Takes precedence over `exts`, `extension` and `ext`.
*
* @alias exts
* @alias extension
* @alias ext
* @default ['.js']
*/
extensions?: ReadonlyArray<string> | string;
/**
* The extensions to hook. Should start with '.' (ex. ['.js']).
*
* Takes precedence over `extension` and `ext`.
*
* @alias extension
* @alias ext
* @default ['.js']
*/
exts?: ReadonlyArray<string> | string;
/**
* The extensions to hook. Should start with '.' (ex. ['.js']).
*
* Takes precedence over `ext`.
*
* @alias ext
* @default ['.js']
*/
extension?: ReadonlyArray<string> | string;
/**
* The extensions to hook. Should start with '.' (ex. ['.js']).
*
* @default ['.js']
*/
ext?: ReadonlyArray<string> | string;
/**
* A matcher function, will be called with path to a file.
*
* Should return truthy if the file should be hooked, falsy otherwise.
*/
matcher?: Matcher | null;
/**
* Auto-ignore node_modules. Independent of any matcher.
*
* @default true
*/
ignoreNodeModules?: boolean;
}
/**
* Add a require hook.
*
* @param hook The hook. Accepts the code of the module and the filename. Required.
* @returns The `revert` function. Reverts the hook when called.
*/
export declare function addHook(hook: Hook, opts?: Options): RevertFunction;
export {};
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAA;AAExD;;GAEG;AACH,MAAM,MAAM,MAAM,CAAC,CAAC,IAAI,CAAC,SAAS,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,cAAc,EAAmB,MAAM,WAAW,CAAA;AA2DpE;;;GAGG;AACH,MAAM,MAAM,UAAU,CACpB,CAAC,SAAS,UAAU,GAAG,UAAU,EACjC,CAAC,SAAS,OAAO,GAAG,OAAO,IAE3B;IAAC,CAAC;IAAE,CAAC;CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,CAAC,GAAG,MAAM,EAAE,GACxC,CAAC,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,CAAC,GAAG,MAAM,EAAE,GAC1C,CAAC,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,SAAS,EAAE,IAAI,CAAC,GAAG,OAAO,EAAE,GAC5C,CAAC,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,QAAQ,EAAE,KAAK,CAAC,GAAG,MAAM,GACzC,CAAC,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,QAAQ,EAAE,KAAK,CAAC,GAAG,MAAM,GACzC,CAAC,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,SAAS,EAAE,KAAK,CAAC,GAAG,OAAO,GAC3C,CAAC,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,QAAQ,EAAE,OAAO,CAAC,GAAG,MAAM,GAAG,MAAM,EAAE,GACtD,CAAC,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,SAAS,EAAE,OAAO,CAAC,GAAG,OAAO,GAAG,OAAO,EAAE,GACzD,CAAC,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,QAAQ,EAAE,OAAO,CAAC,GAAG,MAAM,GAAG,MAAM,EAAE,GACtD,CAAC,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,UAAU,EAAE,KAAK,CAAC,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAC9D,CAAC,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,UAAU,EAAE,IAAI,CAAC,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,OAAO,EAAE,GACnE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,OAAO,EAAE,CAAA;AAE/D;;;GAGG;AACH,MAAM,MAAM,gBAAgB,CAC1B,CAAC,SAAS,UAAU,EACpB,CAAC,SAAS,OAAO,GAAG,OAAO,EAC3B,CAAC,SACG,SAAS,GACT,CAAC,CAAC,SAAS,SAAS,GAAG,KAAK,GAC1B,CAAC,SAAS,QAAQ,GAAG,SAAS,MAAM,EAAE,GACtC,CAAC,SAAS,QAAQ,GAAG,SAAS,MAAM,EAAE,GACtC,SAAS,MAAM,EAAE,GAAG,SAAS,MAAM,EAAE,CAAC,GACxC,SAAS,GACT,CAAC,CAAC,SAAS,SAAS,GAAG,KAAK,GAC1B,CAAC,SAAS,QAAQ,GAAG,SAAS,MAAM,EAAE,GACtC,CAAC,SAAS,QAAQ,GAAG,SAAS,MAAM,EAAE,GACtC,SAAS,MAAM,EAAE,GAAG,SAAS,MAAM,EAAE,CAAC,IAC1C;IACF,OAAO,CAAC,EACJ,SAAS,GACT,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,GACf,CAAC,CAAC,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,GAC5B,CAAC,SAAS,KAAK,GACb,CAAC,CAAC,MAAM,CAAC,GACT,CAAC,CAAC,MAAM,CAAC,EAAE,GACb,OAAO,CAAC,CAAC,CAAA;IACjB,YAAY,CAAC,EAAE,CAAC,CAAA;IAChB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EACL,CAAC,CAAC,CAAC,EAAE,OAAO,KAAK,CAAC,IAAI,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GACvC,CAAC,CAAC,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,CAAA;IAC7B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,IAAI,CAAC,EAAE,CAAC,CAAA;IACR,IAAI,CAAC,EAAE,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,MAAM,CAAA;IAC3C,KAAK,CAAC,EAAE,CAAC,SAAS,IAAI,GAAG,MAAM,GAAG,KAAK,CAAA;CACxC,GAAG,CAAC,CAAC,SAAS,KAAK,GAAG;IAAE,QAAQ,CAAC,EAAE,KAAK,GAAG,SAAS,CAAA;CAAE,GACrD,CAAC,SAAS,IAAI,GAAG;IAAE,QAAQ,EAAE,IAAI,CAAA;CAAE,GACnC;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,CAAA;AAEzB;;;GAGG;AACH,MAAM,MAAM,aAAa,CACvB,CAAC,SAAS,UAAU,EACpB,CAAC,SAAS,OAAO,GAAG,OAAO,IACzB;IACF,CAAC,UAAU,EAAE,MAAM,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;CAC7C,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,oBAAoB,CAC9B,CAAC,SAAS,UAAU,EACpB,CAAC,SAAS,OAAO,EACjB,CAAC,SAAS,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,IAC3B;KACD,UAAU,IAAI,MAAM,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC;CAChD,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,OAAO,IACrC,CAAC,SAAS,IAAI,GACZ;IACE,QAAQ,EAAE,IAAI,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC3B,GACD,CAAC,SAAS,KAAK,GACf;IACE,QAAQ,CAAC,EAAE,KAAK,GAAG,SAAS,CAAA;IAC5B,KAAK,CAAC,EAAE,SAAS,CAAA;CAClB,GACD;IACE,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC9B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC3B,CAAA;AAEL;;GAEG;AACH,MAAM,MAAM,gBAAgB,CAC1B,CAAC,SAAS,UAAU,EACpB,CAAC,SAAS,OAAO,GAAG,OAAO,IACzB;IACF,IAAI,EAAE,CAAC,CAAA;IACP,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,OAAO,CAAC,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,SAAS,CAAA;IACtC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,CAAC,SAAS,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAA;IAC3D,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,CAAC,IAAI,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IAChD,YAAY,CAAC,EAAE,CAAC,SAAS,SAAS,GAAG,SAAS,GAC5C,CAAC,SAAS,QAAQ,GAAG,SAAS,MAAM,EAAE,GACtC,CAAC,SAAS,QAAQ,GAAG,SAAS,MAAM,EAAE,GACtC,SAAS,MAAM,EAAE,GAAG,SAAS,MAAM,EAAE,CAAA;CACxC,GAAG,SAAS,CAAC,CAAC,CAAC,CAAA;AAEhB,eAAO,MAAM,YAAY,MAAO,MAAM,oBAEiB,CAAA;AA8CvD,eAAO,MAAM,cAAc,+CACtB,GAAG,QACA,CAAC,SACA,CAAC,gCAcc,CAAA;AAExB;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB,CAAC,UAAU,EAAE,MAAM,GAAG,gBAAgB,CAAC,UAAU,CAAC,CAAA;CACnD,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,SAAS,IAAI;KAC/C,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,SAAS,CAC5C,SAAS,MAAM,EAAE,GAAG,SAAS,MAAM,EAAE,CACtC,GACC,CAAC,CAAC,CAAC,CAAC,SAAS,gBAAgB,CAAC,QAAQ,GAAG,QAAQ,EAAE,KAAK,CAAC,GACvD,CAAC,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,GAC5B,CAAC,CAAC,CAAC,CAAC,SAAS,gBAAgB,CAAC,QAAQ,GAAG,QAAQ,EAAE,IAAI,CAAC,GACxD,CAAC,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,EAAE,GAC9B,KAAK,GACP,CAAC,CAAC,CAAC,CAAC,SAAS,gBAAgB,CAAC,QAAQ,EAAE,KAAK,CAAC,GAAG,MAAM,GACvD,CAAC,CAAC,CAAC,CAAC,SAAS,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,GAAG,MAAM,EAAE,GACxD,CAAC,CAAC,CAAC,CAAC,SAAS,gBAAgB,CAAC,QAAQ,EAAE,KAAK,CAAC,GAAG,MAAM,GACvD,CAAC,CAAC,CAAC,CAAC,SAAS,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,GAAG,MAAM,EAAE,GACxD,CAAC,CAAC,CAAC,CAAC,SAAS,gBAAgB,Line truncated
@@ -0,0 +1,3 @@
import type { BasicTarget } from '../utils/domTarget';
declare const useMutationObserver: (callback: MutationCallback, target: BasicTarget, options?: MutationObserverInit) => void;
export default useMutationObserver;
@@ -0,0 +1 @@
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_gom_latn=t(e.dayjs)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=t(e),_={name:"gom-latn",weekdays:"Aitar_Somar_Mongllar_Budvar_Brestar_Sukrar_Son'var".split("_"),months:"Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr".split("_"),weekStart:1,weekdaysShort:"Ait._Som._Mon._Bud._Bre._Suk._Son.".split("_"),monthsShort:"Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.".split("_"),weekdaysMin:"Ai_Sm_Mo_Bu_Br_Su_Sn".split("_"),ordinal:function(e){return e},formats:{LT:"A h:mm [vazta]",LTS:"A h:mm:ss [vazta]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [vazta]",LLLL:"dddd, MMMM[achea] Do, YYYY, A h:mm [vazta]",llll:"ddd, D MMM YYYY, A h:mm [vazta]"}};return a.default.locale(_,null,!0),_}));
@@ -0,0 +1,93 @@
# socks examples
## Example for SOCKS 'associate' command
The associate command tells the SOCKS proxy server to establish a UDP relay. The server binds to a new UDP port and communicates the newly opened port back to the origin client. From here, any SOCKS UDP frame packets sent to this special UDP port on the Proxy server will be forwarded to the desired destination, and any responses will be forwarded back to the origin client (you).
This can be used for things such as DNS queries, and other UDP communicates.
**Connection Steps**
1. Client -(associate)-> Proxy (Tells the proxy to create a UDP relay and bind on a new port)
2. Client <-(port)- Proxy (Tells the origin client which port it opened and is accepting UDP frame packets on)
At this point the proxy is accepting UDP frames on the specified port.
3. Client --(udp frame) -> Proxy -> Destination (The origin client sends a UDP frame to the proxy on the UDP port, and the proxy then forwards it to the destination specified in the UDP frame.)
4. Client <--(udp frame) <-- Proxy <-- Destination (The destination client responds to the udp packet sent in #3)
## Usage
The 'associate' command can only be used by creating a new SocksClient instance and listening for the 'established' event.
**Note:** UDP packets relayed through the proxy servers are packaged in a special Socks UDP frame format. SocksClient.createUDPFrame() and SocksClient.parseUDPFrame() create and parse these special UDP packets.
```typescript
import * as dgram from 'dgram';
import { SocksClient, SocksClientOptions } from 'socks';
// Create a local UDP socket for sending/receiving packets to/from the proxy.
const udpSocket = dgram.createSocket('udp4');
udpSocket.bind();
// Listen for incoming UDP packets from the proxy server.
udpSocket.on('message', (message, rinfo) => {
console.log(SocksClient.parseUDPFrame(message));
/*
{ frameNumber: 0,
remoteHost: { host: '8.8.8.8', port: 53 }, // The remote host that replied with a UDP packet
data: <Buffer 74 65 73 74 0a> // The data
}
*/
});
const options: SocksClientOptions = {
proxy: {
host: '104.131.124.203',
port: 1081,
type: 5
},
// This should be the ip and port of the expected client that will be sending UDP frames to the newly opened UDP port on the server.
// Most SOCKS servers accept 0.0.0.0 as a wildcard address to accept UDP frames from any source.
destination: {
host: '0.0.0.0',
port: 0
},
command: 'associate'
};
const client = new SocksClient(options);
// This event is fired when the SOCKS server has started listening on a new UDP port for UDP relaying.
client.on('established', info => {
console.log(info);
/*
{
socket: <Socket ...>,
remoteHost: { // This is the remote port on the SOCKS proxy server to send UDP frame packets to.
host: '104.131.124.203',
port: 58232
}
}
*/
// Send a udp frame to 8.8.8.8 on port 53 through the proxy.
const packet = SocksClient.createUDPFrame({
remoteHost: { host: '8.8.8.8', port: 53 },
data: Buffer.from('hello') // A DNS lookup in the real world.
});
// Send packet.
udpSocket.send(packet, info.remoteHost.port, info.remoteHost.host);
});
// SOCKS proxy failed to bind.
client.on('error', () => {
// Handle errors
});
// Start connection
client.connect();
```
@@ -0,0 +1,53 @@
'use strict';
import AxiosError from '../core/AxiosError.js';
import parseProtocol from './parseProtocol.js';
import platform from '../platform/index.js';
const DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;
/**
* Parse data uri to a Buffer or Blob
*
* @param {String} uri
* @param {?Boolean} asBlob
* @param {?Object} options
* @param {?Function} options.Blob
*
* @returns {Buffer|Blob}
*/
export default function fromDataURI(uri, asBlob, options) {
const _Blob = options && options.Blob || platform.classes.Blob;
const protocol = parseProtocol(uri);
if (asBlob === undefined && _Blob) {
asBlob = true;
}
if (protocol === 'data') {
uri = protocol.length ? uri.slice(protocol.length + 1) : uri;
const match = DATA_URL_PATTERN.exec(uri);
if (!match) {
throw new AxiosError('Invalid URL', AxiosError.ERR_INVALID_URL);
}
const mime = match[1];
const isBase64 = match[2];
const body = match[3];
const buffer = Buffer.from(decodeURIComponent(body), isBase64 ? 'base64' : 'utf8');
if (asBlob) {
if (!_Blob) {
throw new AxiosError('Blob is not supported', AxiosError.ERR_NOT_SUPPORT);
}
return new _Blob([buffer], {type: mime});
}
return buffer;
}
throw new AxiosError('Unsupported protocol ' + protocol, AxiosError.ERR_NOT_SUPPORT);
}
@@ -0,0 +1 @@
{"version":3,"file":"unsetEmptyArray.d.ts","sourceRoot":"","sources":["../../src/logic/unsetEmptyArray.ts"],"names":[],"mappings":"yBAIgB,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM,MAAM;AAAvC,wBACsD"}
@@ -0,0 +1,293 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
import {AnyDateTime, DateTimeDuration, Disambiguation} from './types';
import {CalendarDate, CalendarDateTime, Time, ZonedDateTime} from './CalendarDate';
import {epochFromDate, fromAbsolute, possibleAbsolutes, toAbsolute, toCalendar, toCalendarDateTime, toTimeZone} from './conversion';
import {getLocalTimeZone} from './queries';
import {GregorianCalendar} from './calendars/GregorianCalendar';
import {Mutable} from './utils';
const TIME_RE = /^(\d{2})(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/;
const DATE_RE = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/;
const DATE_TIME_RE = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/;
const ZONED_DATE_TIME_RE = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:([+-]\d{2})(?::?(\d{2}))?(?::?(\d{2}))?)?\[(.*?)\]$/;
const ABSOLUTE_RE = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;
const 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 requiredDurationTimeGroups = ['hours', 'minutes', 'seconds'];
const requiredDurationGroups = ['years', 'months', 'weeks', 'days', ...requiredDurationTimeGroups];
/** Parses an ISO 8601 time string. */
export function parseTime(value: string): Time {
let m = value.match(TIME_RE);
if (!m) {
throw new Error('Invalid ISO 8601 time string: ' + value);
}
return new Time(
parseNumber(m[1], 0, 23),
m[2] ? parseNumber(m[2], 0, 59) : 0,
m[3] ? parseNumber(m[3], 0, 59) : 0,
m[4] ? parseNumber(m[4], 0, Infinity) * 1000 : 0
);
}
/** Parses an ISO 8601 date string, with no time components. */
export function parseDate(value: string): CalendarDate {
let m = value.match(DATE_RE);
if (!m) {
throw new Error('Invalid ISO 8601 date string: ' + value);
}
let date: Mutable<CalendarDate> = new CalendarDate(
parseNumber(m[1], 0, 9999),
parseNumber(m[2], 1, 12),
1
);
date.day = parseNumber(m[3], 1, date.calendar.getDaysInMonth(date));
return date as CalendarDate;
}
/** Parses an ISO 8601 date and time string, with no time zone. */
export function parseDateTime(value: string): CalendarDateTime {
let m = value.match(DATE_TIME_RE);
if (!m) {
throw new Error('Invalid ISO 8601 date time string: ' + value);
}
let year = parseNumber(m[1], -9999, 9999);
let era = year < 1 ? 'BC' : 'AD';
let date: Mutable<CalendarDateTime> = new CalendarDateTime(
era,
year < 1 ? -year + 1 : year,
parseNumber(m[2], 1, 12),
1,
m[4] ? parseNumber(m[4], 0, 23) : 0,
m[5] ? parseNumber(m[5], 0, 59) : 0,
m[6] ? parseNumber(m[6], 0, 59) : 0,
m[7] ? parseNumber(m[7], 0, Infinity) * 1000 : 0
);
date.day = parseNumber(m[3], 0, date.calendar.getDaysInMonth(date));
return date as CalendarDateTime;
}
/**
* Parses an ISO 8601 date and time string with a time zone extension and optional UTC offset
* (e.g. "2021-11-07T00:45[America/Los_Angeles]" or "2021-11-07T00:45-07:00[America/Los_Angeles]").
* Ambiguous times due to daylight saving time transitions are resolved according to the `disambiguation`
* parameter.
*/
export function parseZonedDateTime(value: string, disambiguation?: Disambiguation): ZonedDateTime {
let m = value.match(ZONED_DATE_TIME_RE);
if (!m) {
throw new Error('Invalid ISO 8601 date time string: ' + value);
}
let year = parseNumber(m[1], -9999, 9999);
let era = year < 1 ? 'BC' : 'AD';
let date: Mutable<ZonedDateTime> = new ZonedDateTime(
era,
year < 1 ? -year + 1 : year,
parseNumber(m[2], 1, 12),
1,
m[11],
0,
m[4] ? parseNumber(m[4], 0, 23) : 0,
m[5] ? parseNumber(m[5], 0, 59) : 0,
m[6] ? parseNumber(m[6], 0, 59) : 0,
m[7] ? parseNumber(m[7], 0, Infinity) * 1000 : 0
);
date.day = parseNumber(m[3], 0, date.calendar.getDaysInMonth(date));
let plainDateTime = toCalendarDateTime(date as ZonedDateTime);
let ms: number;
if (m[8]) {
let hourOffset = parseNumber(m[8], -23, 23);
date.offset = Math.sign(hourOffset) * (Math.abs(hourOffset) * 60 * 60 * 1000 + parseNumber(m[9] ?? '0', 0, 59) * 60 * 1000 + parseNumber(m[10] ?? '0', 0, 59) * 1000);
ms = epochFromDate(date as ZonedDateTime) - date.offset;
// Validate offset against parsed date.
let absolutes = possibleAbsolutes(plainDateTime, date.timeZone);
if (!absolutes.includes(ms)) {
throw new Error(`Offset ${offsetToString(date.offset)} is invalid for ${dateTimeToString(date)} in ${date.timeZone}`);
}
} else {
// Convert to absolute and back to fix invalid times due to DST.
ms = toAbsolute(toCalendarDateTime(plainDateTime), date.timeZone, disambiguation);
}
return fromAbsolute(ms, date.timeZone);
}
/**
* Parses an ISO 8601 date and time string with a UTC offset (e.g. "2021-11-07T07:45:00Z"
* or "2021-11-07T07:45:00-07:00"). The result is converted to the provided time zone.
*/
export function parseAbsolute(value: string, timeZone: string): ZonedDateTime {
let m = value.match(ABSOLUTE_RE);
if (!m) {
throw new Error('Invalid ISO 8601 date time string: ' + value);
}
let year = parseNumber(m[1], -9999, 9999);
let era = year < 1 ? 'BC' : 'AD';
let date: Mutable<ZonedDateTime> = new ZonedDateTime(
era,
year < 1 ? -year + 1 : year,
parseNumber(m[2], 1, 12),
1,
timeZone,
0,
m[4] ? parseNumber(m[4], 0, 23) : 0,
m[5] ? parseNumber(m[5], 0, 59) : 0,
m[6] ? parseNumber(m[6], 0, 59) : 0,
m[7] ? parseNumber(m[7], 0, Infinity) * 1000 : 0
);
date.day = parseNumber(m[3], 0, date.calendar.getDaysInMonth(date));
if (m[8]) {
date.offset = parseNumber(m[8], -23, 23) * 60 * 60 * 1000 + parseNumber(m[9] ?? '0', 0, 59) * 60 * 1000;
}
return toTimeZone(date as ZonedDateTime, timeZone);
}
/**
* Parses an ISO 8601 date and time string with a UTC offset (e.g. "2021-11-07T07:45:00Z"
* or "2021-11-07T07:45:00-07:00"). The result is converted to the user's local time zone.
*/
export function parseAbsoluteToLocal(value: string): ZonedDateTime {
return parseAbsolute(value, getLocalTimeZone());
}
function parseNumber(value: string, min: number, max: number) {
let val = Number(value);
if (val < min || val > max) {
throw new RangeError(`Value out of range: ${min} <= ${val} <= ${max}`);
}
return val;
}
export function timeToString(time: Time): string {
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) : ''}`;
}
export function dateToString(date: CalendarDate): string {
let gregorianDate = toCalendar(date, new GregorianCalendar());
let year: string;
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')}`;
}
export function dateTimeToString(date: AnyDateTime): string {
// @ts-ignore
return `${dateToString(date)}T${timeToString(date)}`;
}
function offsetToString(offset: number) {
let sign = Math.sign(offset) < 0 ? '-' : '+';
offset = Math.abs(offset);
let offsetHours = Math.floor(offset / (60 * 60 * 1000));
let offsetMinutes = Math.floor((offset % (60 * 60 * 1000)) / (60 * 1000));
let offsetSeconds = Math.floor((offset % (60 * 60 * 1000)) % (60 * 1000) / 1000);
let stringOffset = `${sign}${String(offsetHours).padStart(2, '0')}:${String(offsetMinutes).padStart(2, '0')}`;
if (offsetSeconds !== 0) {
stringOffset += `:${String(offsetSeconds).padStart(2, '0')}`;
}
return stringOffset;
}
export function zonedDateTimeToString(date: ZonedDateTime): string {
return `${dateTimeToString(date)}${offsetToString(date.offset)}[${date.timeZone}]`;
}
/**
* Parses an ISO 8601 duration string (e.g. "P3Y6M6W4DT12H30M5S").
* @param value An ISO 8601 duration string.
* @returns A DateTimeDuration object.
*/
export function parseDuration(value: string): Required<DateTimeDuration> {
const match = value.match(DATE_TIME_DURATION_RE);
if (!match) {
throw new Error(`Invalid ISO 8601 Duration string: ${value}`);
}
const parseDurationGroup = (
group: string | undefined,
isNegative: boolean
): number => {
if (!group) {
return 0;
}
try {
const sign = isNegative ? -1 : 1;
return sign * Number(group.replace(',', '.'));
} catch {
throw new Error(`Invalid ISO 8601 Duration string: ${value}`);
}
};
const isNegative = !!match.groups?.negative;
const hasRequiredGroups = requiredDurationGroups.some(group => match.groups?.[group]);
if (!hasRequiredGroups) {
throw new Error(`Invalid ISO 8601 Duration string: ${value}`);
}
const durationStringIncludesTime = match.groups?.time;
if (durationStringIncludesTime) {
const hasRequiredDurationTimeGroups = requiredDurationTimeGroups.some(group => match.groups?.[group]);
if (!hasRequiredDurationTimeGroups) {
throw new Error(`Invalid ISO 8601 Duration string: ${value}`);
}
}
const duration: Mutable<DateTimeDuration> = {
years: parseDurationGroup(match.groups?.years, isNegative),
months: parseDurationGroup(match.groups?.months, isNegative),
weeks: parseDurationGroup(match.groups?.weeks, isNegative),
days: parseDurationGroup(match.groups?.days, isNegative),
hours: parseDurationGroup(match.groups?.hours, isNegative),
minutes: parseDurationGroup(match.groups?.minutes, isNegative),
seconds: parseDurationGroup(match.groups?.seconds, isNegative)
};
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 as Required<DateTimeDuration>;
}
@@ -0,0 +1,13 @@
function _extends() {
_extends = Object.assign || function assign(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
}
return target;
};
return _extends.apply(this, arguments);
}
export { _extends as _ };
@@ -0,0 +1 @@
!function(u,D){"object"==typeof exports&&"undefined"!=typeof module?module.exports=D():"function"==typeof define&&define.amd?define(D):u.JSON5=D()}(this,function(){"use strict";var u,D,e=(function(u,D){Object.defineProperty(D,"__esModule",{value:!0});D.Space_Separator=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,D.ID_Start=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDCLine truncated
@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _classPrivateFieldBase;
function _classPrivateFieldBase(receiver, privateKey) {
if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) {
throw new TypeError("attempted to use private field on non-instance");
}
return receiver;
}
//# sourceMappingURL=classPrivateFieldLooseBase.js.map
@@ -0,0 +1,101 @@
# p-limit
> Run multiple promise-returning & async functions with limited concurrency
## Install
```
$ npm install p-limit
```
## Usage
```js
const pLimit = require('p-limit');
const limit = pLimit(1);
const input = [
limit(() => fetchSomething('foo')),
limit(() => fetchSomething('bar')),
limit(() => doSomething())
];
(async () => {
// Only one promise is run at once
const result = await Promise.all(input);
console.log(result);
})();
```
## API
### pLimit(concurrency)
Returns a `limit` function.
#### concurrency
Type: `number`\
Minimum: `1`\
Default: `Infinity`
Concurrency limit.
### limit(fn, ...args)
Returns the promise returned by calling `fn(...args)`.
#### fn
Type: `Function`
Promise-returning/async function.
#### args
Any arguments to pass through to `fn`.
Support for passing arguments on to the `fn` is provided in order to be able to avoid creating unnecessary closures. You probably don't need this optimization unless you're pushing a *lot* of functions.
### limit.activeCount
The number of promises that are currently running.
### limit.pendingCount
The number of promises that are waiting to run (i.e. their internal `fn` was not called yet).
### limit.clearQueue()
Discard pending promises that are waiting to run.
This might be useful if you want to teardown the queue at the end of your program's lifecycle or discard any function calls referencing an intermediary state of your app.
Note: This does not cancel promises that are already running.
## FAQ
### How is this different from the [`p-queue`](https://github.com/sindresorhus/p-queue) package?
This package is only about limiting the number of concurrent executions, while `p-queue` is a fully featured queue implementation with lots of different options, introspection, and ability to pause the queue.
## Related
- [p-queue](https://github.com/sindresorhus/p-queue) - Promise queue with concurrency control
- [p-throttle](https://github.com/sindresorhus/p-throttle) - Throttle promise-returning & async functions
- [p-debounce](https://github.com/sindresorhus/p-debounce) - Debounce promise-returning & async functions
- [p-all](https://github.com/sindresorhus/p-all) - Run promise-returning & async functions concurrently with optional limited concurrency
- [More…](https://github.com/sindresorhus/promise-fun)
---
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-p-limit?utm_source=npm-p-limit&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>
@@ -0,0 +1,26 @@
import createRound from './_createRound.js';
/**
* Computes `number` rounded to `precision`.
*
* @static
* @memberOf _
* @since 3.10.0
* @category Math
* @param {number} number The number to round.
* @param {number} [precision=0] The precision to round to.
* @returns {number} Returns the rounded number.
* @example
*
* _.round(4.006);
* // => 4
*
* _.round(4.006, 2);
* // => 4.01
*
* _.round(4060, -2);
* // => 4100
*/
var round = createRound('round');
export default round;
@@ -0,0 +1,10 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.buildArrayMetadataWithIndex = buildArrayMetadataWithIndex;
function buildArrayMetadataWithIndex(newMetadata, index) {
return (arrayMetadata) => {
arrayMetadata[index] = newMetadata;
return arrayMetadata;
};
}
//# sourceMappingURL=buildArrayMetadataWithIndex.js.map
@@ -0,0 +1,6 @@
import { type ChildProcess } from 'child_process';
/**
* Starts forwarding signals to `child` through `parent`.
*/
export declare const proxySignals: (child: ChildProcess) => () => void;
//# sourceMappingURL=proxy-signals.d.ts.map
@@ -0,0 +1 @@
{"version":3,"names":["_tdzError","name","ReferenceError"],"sources":["../../src/helpers/tdz.ts"],"sourcesContent":["/* @minVersion 7.5.5 */\n\nexport default function _tdzError(name: string): never {\n throw new ReferenceError(name + \" is not defined - temporal dead zone\");\n}\n"],"mappings":";;;;;;AAEe,SAASA,SAASA,CAACC,IAAY,EAAS;EACrD,MAAM,IAAIC,cAAc,CAACD,IAAI,GAAG,sCAAsC,CAAC;AACzE","ignoreList":[]}
@@ -0,0 +1 @@
{"name":"@heroui/use-is-mounted","version":"2.1.2","requiresBuild":false,"files":{"dist/index.js":{"checkedAt":1794532109972,"integrity":"sha512-jvYQVVUaG66uiYh8N3Bb0z8qIl6MZCfiEst8NsAJOGktbDgzha1Vbj1jfSS0Y/PJNpE0LTE8RHCu97Iq7UAqfA==","mode":420,"size":1859},"package.json":{"checkedAt":1794532109972,"integrity":"sha512-kEocl/8UjAgbFzP4/dyPuzLKZdOp8taS/l9Y24NN7oUtVfW46o+BxMdbobkXW4Y6ELtMdByQXgdhrp6LLWQo8g==","mode":420,"size":1320},"README.md":{"checkedAt":1794532109972,"integrity":"sha512-m7nOYq/d7f5ytthuN1hzFmxiala9ArU5zJJKj1G/qJc+pIKrAdirrDueRfhtgGQTDSN4Z35xnVu9B207P0p7JQ==","mode":420,"size":497},"dist/index.mjs":{"checkedAt":1794532109973,"integrity":"sha512-GvzgpObvCgJAbnbwDVg+uCx/PtMaMXsYnMzuETjr4bgqJwuguRTrU4Bqvt4MwCsSGHIBEAAYM2xR1yoviGBaww==","mode":420,"size":808},"dist/index.d.ts":{"checkedAt":1794532109973,"integrity":"sha512-NGy1zHwpgPRfYhqzqDqG5BM1HoIKZtZ8WlYR0pfjlHcUAxgrid2dp/RzT1Cj+8HyTFzqwVrLrMj+QRlVDGgrvQ==","mode":420,"size":287},"LICENSE":{"checkedAt":1794532109973,"integrity":"sha512-eaopHP+N4EYXlGoX9hmoxDPoVft4BqrXKmbsFTcsoBHSrJp/GWF4qVtLBzrw9h9ZrbFfPY69z+3RuDX9FdPG+Q==","mode":420,"size":1064}}}
@@ -0,0 +1,25 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isJsonObject = exports.typeofJsonValue = void 0;
/**
* Get the type of a JSON value.
* Distinguishes between array, null and object.
*/
function typeofJsonValue(value) {
let t = typeof value;
if (t == "object") {
if (Array.isArray(value))
return "array";
if (value === null)
return "null";
}
return t;
}
exports.typeofJsonValue = typeofJsonValue;
/**
* Is this a JSON object (instead of an array or null)?
*/
function isJsonObject(value) {
return value !== null && typeof value == "object" && !Array.isArray(value);
}
exports.isJsonObject = isJsonObject;
@@ -0,0 +1,6 @@
"use strict";
function addMilliseconds(date, ms) {
date.setTime(+date + ms);
return date;
}
module.exports = addMilliseconds;
@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var MenuItemRadioRole = {
relatedConcepts: [{
module: 'ARIA',
concept: {
name: 'menuitemradio'
}
}],
type: 'widget'
};
var _default = MenuItemRadioRole;
exports.default = _default;
@@ -0,0 +1 @@
{"name":"@types/fs-extra","version":"11.0.4","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532099049,"integrity":"sha512-HQaIQk9pwOcyKutyDk4o2a87WnotwYuLGYFW43emGm4FvIJFKPyg+OYaw5sTegKAKf+C5SKa1ACjzCLivbaHrQ==","mode":420,"size":1141},"README.md":{"checkedAt":1794532099049,"integrity":"sha512-uGlOe3uZOPtVaf8Wd+VBtnCA7EbTPVpNl0bO+qUUHkmmu9VrwNPiMr8zIT7GlTxdR1W2AXoZqIgrAhNmG4jxxw==","mode":420,"size":1025},"esm.d.mts":{"checkedAt":1794532099050,"integrity":"sha512-E1BtYKaci66PuBAZVKoekA/dXesMQfjmxGOeOpuSp3PnQllSUn9MtvYIkF/a1RmKV4jqpDOPLhZU+nfrmcOtUQ==","mode":420,"size":2922},"index.d.ts":{"checkedAt":1794532099050,"integrity":"sha512-D8RVS8pvP/k2EGKessV03o4Sy5XgCGJlHi0azDB00oOHNK2rGQf9HZubKStHHZTERvI7Z5DbMAFmcS3xQBjmtw==","mode":420,"size":29276},"package.json":{"checkedAt":1794532099050,"integrity":"sha512-Fi62pockeioA8865jIMPhGFa+Z8eihcF1OVR0CXB0REnmf9upTz7Y8oYN5NjdBxPfM6RbDY9z5QqUcWRvdmnEw==","mode":420,"size":2467}}}
@@ -0,0 +1,616 @@
flf2a% 6 6 21 0 3
cosmic.flf by Mike Rosulek <mjr@netins.net>, 7/11/95. Check out my
homepage at: http://www.netins.net/showcase/mikewrld/
---- Modified and corrected by Michel Eftimakis (Michel.Eftimakis@vlsi.com) ----
%%%%#
%%%%#
%%%%#
%%%%#
%%%%#
%%%%##
.:#
;;;#
'[[#
$$#
""#
MM##
%:: ::%#
%"; ;"%#
#
#
#
##
:: :: #
__,;'_,;'_#
''[[''[[''#
,$" ,$" #
o88oo88oo #
,M" ,M" ##
.: #
,;;;. #
[[,,_` #
`"""Yo#
Yo_,d"#
'M' ##
.. .:`#
; ; ,;` #
^^ ,[` #
cP ,, #
,8" 8 8#
,dP "" ##
:\ #
.;;' #
([__ #
c$"" #
"Yo,oP#
"M,##
::#
,'#
#
#
#
##
.:#
,;' #
n[ #
Y$ #
8o,#
"M##
:. #
';,#
[n#
$Y#
,o8 #
M" ##
#
\|/ #
/|\ #
#
#
##
#
#
[ #
%$$$$$%#
8 #
##
#
#
#
#
d8b#
,M"##
#
#
#
%cccc%#
#
##
#
#
#
#
d8b#
YMP##
/:`#
/;` #
n[' #
c$" #
o8" #
mM" ##
#
,;;, #
,[' [n #
$$ $$#
Y8, ,8"#
"YmmP ##
:.#
;;#
[[#
$$#
88#
MM##
.:::. #
,;'``;. #
'' ,[['#
.c$$P' #
d88 _,oo,#
MMMUP*"^^##
.::. #
;'`';;, #
.n[[ #
``"$$$.#
,,o888"#
YMMP" ##
.:: #
,;';; #
,[' [[ #
$P__$$c#
`"""88"#
MM ##
::::::::#
`;;``'';#
[[,_ #
`""*Ycc#
__,od8"#
MMP" ##
.:. #
,;' #
,[[.od8b #
$$$" "$$#
Y8b,,d8P#
"YMP" ##
...:::::#
'''``;;'#
.[' #
,$$' #
888 #
MMM ##
.::::. #
`;. ,;'#
[nn[, #
$" $c#
Yb,_,8P#
"YMP" ##
.,,. #
,;;'`';,#
[[, _,[[#
Y$$P"$$#
,,_,d8"#
"MP" ##
#
,;,#
'['#
#
d8b#
YMP##
#
,;,#
'['#
#
d8b#
,M"##
#
,,#
,[['#
c$ #
"8bo,#
"MP##
#
#
%,,,,,%#
% """"%#
%oooo%#
%""""%##
#
,, #
'[[, #
$c#
,od8"#
YM" ##
.-::::-.#
;;'```;;;#
,n[[' #
d$P" #
"" #
MM ##
.:::''''''':::. #
;;' ,;;;;;;,.; `;.#
:[[ [. .['[[ [[#
$$, 'Y$$$P'Y$$P' #
'Y8o,_ __,oo #
`"YUMMMMMMUY" ##
:::. #
;;`;; #
,[[ '[[, #
c$$$cc$$$c #
888 888,#
YMM ""` ##
:::::::. #
;;;'';;' #
[[[__[[\.#
$$""""Y$$#
_88o,,od8P#
""YUMMMP" ##
.,-::::: #
,;;;'````' #
[[[ #
$$$ #
`88bo,__,o, #
"YUMMMMMP"##
:::::::-. #
;;, `';,#
`[[ [[#
$$, $$#
888_,o8P'#
MMMMP"` ##
.,:::::: #
;;;;'''' #
[[cccc #
$$"""" #
888oo,__ #
""""YUMMM##
.-:::::'#
;;;'''' #
[[[,,== #
`$$$"`` #
888 #
"MM, ##
.,-:::::/ #
,;;-'````' #
[[[ [[[[[[/#
"$$c. "$$ #
`Y8bo,,,o88o#
`'YMUP"YMM##
:: .: #
,;; ;;, #
,[[[,,,[[[ #
"$$$"""$$$ #
888 "88o#
MMM YMM##
:::#
;;;#
[[[#
$$$#
888#
MMM##
....::::::#
;;;;;;;;;````#
''` `[[. #
,,, `$$ #
888boood88 #
"MMMMMMMM" ##
::: . #
;;; .;;,.#
[[[[[/' #
_$$$$, #
"888"88o, #
MMM "MMP"##
::: #
;;; #
[[[ #
$$' #
o88oo,.__#
""""YUMMM##
. : #
;;,. ;;; #
[[[[, ,[[[[, #
$$$$$$$$"$$$ #
888 Y88" 888o#
MMM M' "MMM##
:::. :::.#
`;;;;, `;;;#
[[[[[. '[[#
$$$ "Y$c$$#
888 Y88#
MMM YM##
... #
.;;;;;;;. #
,[[ \[[,#
$$$, $$$#
"888,_ _,88P#
"YMMMMMP" ##
::::::::::. #
`;;;```.;;;#
`]]nnn]]' #
$$$"" #
888o #
YMMMb ##
.::::::. #
,;;'```';;, #
[[[ [[[\#
"$$c cc$$$"#
"*8bo,Y88b,#
"*YP" "M"##
:::::::.. #
;;;;``;;;; #
[[[,/[[[' #
$$$$$$c #
888b "88bo,#
MMMM "W" ##
.::::::. #
;;;` ` #
'[==/[[[[,#
''' $#
88b dP#
"YMmMY" ##
::::::::::::#
;;;;;;;;''''#
[[ #
$$ #
88, #
MMM ##
... :::#
;; ;;;#
[[' [[[#
$$ $$$#
88 .d888#
"YmmMMMM""##
::: .::.#
';;, ,;;;' #
\[[ .[[/ #
Y$c.$$" #
Y88P #
MP ##
.:: . .:::#
';;, ;; ;;;' #
'[[, [[, [[' #
Y$c$$$c$P #
"88"888 #
"M "M" ##
.,:: .:#
`;;;, .,;; #
'[[,,[[' #
Y$$$P #
oP"``"Yo, #
,m" "Mm,##
.-:. ::-.#
';;. ;;;;'#
'[[,[[[' #
c$$" #
,8P"` #
mM" ##
:::::::::#
'`````;;;#
.n[['#
,$$P" #
,888bo,_ #
`""*UMM ##
::::#
;;' #
[[ #
$$ #
88, #
"YMM##
`:\ #
`;\ #
'[n #
"$c #
"8o #
"Mm##
::::#
';;#
[[#
$$#
,88#
MMP"##
.:. #
;' `;#
#
#
#
##
#
#
#
#
#
mmmmmmm##
`:. #
`;,#
#
#
#
##
:::. #
;;`;; #
,[[ '[[, #
c$$$cc$$$c #
888 888,#
YMM ""` ##
:::::::. #
;;;'';;' #
[[[__[[\.#
$$""""Y$$#
_88o,,od8P#
""YUMMMP" ##
.,-::::: #
,;;;'````' #
[[[ #
$$$ #
`88bo,__,o, #
"YUMMMMMP"##
:::::::-. #
;;, `';,#
`[[ [[#
$$, $$#
888_,o8P'#
MMMMP"` ##
.,:::::: #
;;;;'''' #
[[cccc #
$$"""" #
888oo,__ #
""""YUMMM##
.-:::::'#
;;;'''' #
[[[,,== #
`$$$"`` #
888 #
"MM, ##
.,-:::::/ #
,;;-'````' #
[[[ [[[[[[/#
"$$c. "$$ #
`Y8bo,,,o88o#
`'YMUP"YMM##
:: .: #
,;; ;;, #
,[[[,,,[[[ #
"$$$"""$$$ #
888 "88o#
MMM YMM##
:::#
;;;#
[[[#
$$$#
888#
MMM##
....::::::#
;;;;;;;;;````#
''` `[[. #
,,, `$$ #
888boood88 #
"MMMMMMMM" ##
::: . #
;;; .;;,.#
[[[[[/' #
_$$$$, #
"888"88o, #
MMM "MMP"##
::: #
;;; #
[[[ #
$$' #
o88oo,.__#
""""YUMMM##
. : #
;;,. ;;; #
[[[[, ,[[[[, #
$$$$$$$$"$$$ #
888 Y88" 888o#
MMM M' "MMM##
:::. :::.#
`;;;;, `;;;#
[[[[[. '[[#
$$$ "Y$c$$#
888 Y88#
MMM YM##
... #
.;;;;;;;. #
,[[ \[[,#
$$$, $$$#
"888,_ _,88P#
"YMMMMMP" ##
::::::::::. #
`;;;```.;;;#
`]]nnn]]' #
$$$"" #
888o #
YMMMb ##
.::::::. #
,;;'```';;, #
[[[ [[[\#
"$$c cc$$$"#
"*8bo,Y88b,#
"*YP" "M"##
:::::::.. #
;;;;``;;;; #
[[[,/[[[' #
$$$$$$c #
888b "88bo,#
MMMM "W" ##
.::::::. #
;;;` ` #
'[==/[[[[,#
''' $#
88b dP#
"YMmMY" ##
::::::::::::#
;;;;;;;;''''#
[[ #
$$ #
88, #
MMM ##
... :::#
;; ;;;#
[[' [[[#
$$ $$$#
88 .d888#
"YmmMMMM""##
::: .::.#
';;, ,;;;' #
\[[ .[[/ #
Y$c.$$" #
Y88P #
MP ##
.:: . .:::#
';;, ;; ;;;' #
'[[, [[, [[' #
Y$c$$$c$P #
"88"888 #
"M "M" ##
.,:: .:#
`;;;, .,;; #
'[[,,[[' #
Y$$$P #
oP"``"Yo, #
,m" "Mm,##
.-:. ::-.#
';;. ;;;;'#
'[[,[[[' #
c$$" #
,8P"` #
mM" ##
:::::::::#
'`````;;;#
.n[['#
,$$P" #
,888bo,_ #
`""*UMM ##
.:#
;'#
[#
$"#
8 #
"M##
`:#
,;#
[[#
$$#
88#
MM##
:.#
';#
[ #
"$#
8#
M"##
':.:':.#
`;' `;#
#
#
#
##
:: ::. :: #
;;`;; #
,[[ '[[, #
c$$$cc$$$c #
888 888,#
YMM ""` ##
:: ... :: #
.;;;;;;;. #
,[[ \[[,#
$$$, $$$#
"888,_ _,88P#
"YMMMMMP" ##
..:: :: ::#
;; ;;;#
[[' [[[#
$$ $$$#
88 .d888#
"YmmMMMM""##
:: ::. :: #
;;`;; #
,[[ '[[, #
c$$$cc$$$c #
888 888,#
YMM ""` ##
:: ... :: #
.;;;;;;;. #
,[[ \[[,#
$$$, $$$#
"888,_ _,88P#
"YMMMMMP" ##
..:: :: ::#
;; ;;;#
[[' [[[#
$$ $$$#
88 .d888#
"YmmMMMM""##
:::::::. #
;;;'';;' #
[[[__[[\.#
$$""""Y$$#
88o,,od8P#
MM`YMMP" ##
@@ -0,0 +1,12 @@
import type { SchemaOptions } from '../schema/index.mjs';
import type { Ensure, Evaluate } from '../helpers/index.mjs';
import type { TProperties } from '../object/index.mjs';
import { type TMappedResult } from '../mapped/index.mjs';
import { type TPartial } from './partial.mjs';
type TFromProperties<P extends TProperties> = ({
[K2 in keyof P]: TPartial<P[K2]>;
});
type TFromMappedResult<R extends TMappedResult> = (Evaluate<TFromProperties<R['properties']>>);
export type TPartialFromMappedResult<R extends TMappedResult, P extends TProperties = TFromMappedResult<R>> = (Ensure<TMappedResult<P>>);
export declare function PartialFromMappedResult<R extends TMappedResult, P extends TProperties = TFromMappedResult<R>>(R: R, options?: SchemaOptions): TMappedResult<P>;
export {};
@@ -0,0 +1 @@
{"mappings":";;;AAAA;;;;;;;;;;CAUC;;AAeM,SAAS,0CAAe,UAAuB,EAAE,OAAoB;IAC1E,IAAI,UAAU,qCAAe,YAAY,SAAS;IAClD,IAAI,UAAU,qCAAe,YAAY,SAAS;IAClD,IAAI,QAAQ,QAAQ,WAAW;IAC/B,IAAI,SAAS,QAAQ,YAAY;IACjC,IAAI,IAAI,WAAW,UAAU;IAC7B,IAAI,IAAI,WAAW,SAAS;IAE5B,8EAA8E;IAC9E,IAAI,kBACF,cAAc,mBACd,eAAe,oBACf,gBAAgB,sBAChB,kBAAkB,uBAClB,mBAAmB,qBACnB,iBAAiB,EAClB,GAAG,iBAAiB;IAErB,2CAA2C;IAC3C,IAAI,mBACF,eAAe,qBACf,iBAAiB,sBACjB,kBAAkB,oBAClB,gBAAgB,EACjB,GAAG,iBAAiB;IAErB,IAAI,kBAAkB,IAAI,SAAS,iBAAiB;IACpD,IAAI,kBAAkB,IAAI,SAAS,gBAAgB;IACnD,gFAAgF;IAChF,IAAI,OAAO,kBAAkB,WAAW,WAAW;IACnD,IAAI,OAAO,kBAAkB,WAAW,YAAY;IAEpD,6FAA6F;IAC7F,WAAW;IACX,IAAI,yBAAyB,SAAS,kBAAkB,OAAO;IAC/D,IAAI,4BAA4B,SAAS,qBAAqB,OAAO;IACrE,IAAI,2BAA2B,SAAS,oBAAoB,OAAO;IACnE,IAAI,0BAA0B,SAAS,mBAAmB,OAAO;IACjE,IAAI,wBAAwB,SAAS,iBAAiB,OAAO;IAC7D,IAAI,2BAA2B,SAAS,oBAAoB,OAAO;IACnE,IAAI,0BAA0B,SAAS,mBAAmB,OAAO;IACjE,IAAI,yBAAyB,SAAS,kBAAkB,OAAO;IAE/D,IAAI,aAAa,UAAU;IAC3B,IAAI,cAAc,UAAU,QAAQ;IACpC,IAAI,YAAY,UAAU;IAC1B,IAAI,eAAe,UAAU,SAAS;IAEtC,IAAI,iBAAiB,IAAI,SAAS,iBAAiB,MAAM;IACzD,IAAI,kBAAkB,OAAO;IAC7B,IAAI,gBAAgB,IAAI,SAAS,gBAAgB,MAAM;IACvD,IAAI,mBAAmB,OAAO;IAE9B,IAAI,aAAa,kBAAkB,cAAc,iBAAiB;QAChE,IAAI,cAAc,IAAI,yBACpB,IAAI,aAAa,SAAS,iBAAiB,MAAM;aAC5C,IAAI,cAAc,OAAO,0BAC9B,KAAK,cAAc,OAAO;IAE9B;IAEA,IAAI,YAAY,iBAAiB,eAAe,kBAAkB;QAChE,IAAI,aAAa,kBAAkB,wBACjC,IAAI,YAAY,SAAS,gBAAgB,MAAM;aAC1C,IAAI,eAAe,OAAO,2BAC/B,KAAK,eAAe,OAAO;IAE/B;IAEA,IAAI,QAAQ,GAAG,CAAC,QAAQ,KAAK,QAAQ;QACnC,WAAW,UAAU,GAAG;QACxB,WAAW,SAAS,GAAG;QACvB;IACF;IAEA,WAAW,QAAQ,CAAC;QAAC,MAAM;QAAG,KAAK;IAAC;AACtC;AAEA;;;CAGC,GACD,SAAS,qCAAe,QAAqB,EAAE,KAAkB,EAAE,IAAkB;IACnF,MAAM,OAAO,SAAS,SAAS,eAAe;IAC9C,IAAI,MAAM;IACV,MAAO,MAAM,YAAY,CAAE;QACzB,OAAO,KAAK,CAAC,KAAK;QAClB,IAAI,MAAM,YAAY,KAAK,UAEzB;aACK,IAAI,MAAM,YAAY,CAAC,QAAQ,CAAC,WAAW;YAChD,8DAA8D;YAC9D,iEAAiE;YACjE,2DAA2D;YAC3D,OAAO,QAAQ,CAAC,KAAK;YACrB;QACF;QACA,QAAQ,MAAM,YAAY;IAC5B;IACA,OAAO;AACT;AAOO,SAAS,0CAAmB,aAA6B,EAAE,IAA6B;IAC7F,IAAI,iBAAiB,SAAS,QAAQ,CAAC,gBAAgB;QACrD,IAAI,OAAO,SAAS,gBAAgB,IAAI,SAAS,eAAe;QAChE,IAAI,oBAAoB,OAAO,gBAAgB,CAAC,MAAM,QAAQ,KAAK;QACnE,4JAA4J;QAC5J,yFAAyF;QACzF,IAAI,CAAC,qBAAqB,CAAC,CAAA,GAAA,yCAAO,KAAK;gBAGrC,0HAA0H;YAC1H,6JAA6J;YAC7J;YAJA,IAAI,EAAC,MAAM,YAAY,EAAE,KAAK,WAAW,EAAC,GAAG,cAAc,qBAAqB;YAIhF,0BAAA,qCAAA,gCAAA,cAAe,cAAc,cAA7B,oDAAA,mCAAA,eAAgC;gBAAC,OAAO;YAAS;YACjD,IAAI,EAAC,MAAM,OAAO,EAAE,KAAK,MAAM,EAAC,GAAG,cAAc,qBAAqB;YACtE,kDAAkD;YAClD,IAAI,AAAC,KAAK,GAAG,CAAC,eAAe,WAAW,KAAO,KAAK,GAAG,CAAC,cAAc,UAAU,GAAI;oBAClF,wCAAA,yBACA;gBADA,iBAAA,4BAAA,0BAAA,KAAM,iBAAiB,cAAvB,+CAAA,yCAAA,wBAAyB,cAAc,cAAvC,6DAAA,4CAAA,yBAA0C;oBAAC,OAAO;oBAAU,QAAQ;gBAAQ;iBAC5E,iCAAA,cAAc,cAAc,cAA5B,qDAAA,oCAAA,eAA+B;oBAAC,OAAO;gBAAS;YAClD;QACF,OAAO;YACL,IAAI,gBAAgB,CAAA,GAAA,yCAAe,EAAE;YACrC,+JAA+J;YAC/J,KAAK,IAAI,gBAAgB,cACvB,0CAAe,cAA6B;QAEhD;IACF;AACF","sources":["packages/@react-aria/utils/src/scrollIntoView.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {getScrollParents} from './getScrollParents';\nimport {isChrome} from './platform';\n\ninterface ScrollIntoViewportOpts {\n /** The optional containing element of the target to be centered in the viewport. */\n containingElement?: Element | null\n}\n\n/**\n * Scrolls `scrollView` so that `element` is visible.\n * Similar to `element.scrollIntoView({block: 'nearest'})` (not supported in Edge),\n * but doesn't affect parents above `scrollView`.\n */\nexport function scrollIntoView(scrollView: HTMLElement, element: HTMLElement): void {\n let offsetX = relativeOffset(scrollView, element, 'left');\n let offsetY = relativeOffset(scrollView, element, 'top');\n let width = element.offsetWidth;\n let height = element.offsetHeight;\n let x = scrollView.scrollLeft;\n let y = scrollView.scrollTop;\n\n // Account for top/left border offsetting the scroll top/Left + scroll padding\n let {\n borderTopWidth,\n borderLeftWidth,\n scrollPaddingTop,\n scrollPaddingRight,\n scrollPaddingBottom,\n scrollPaddingLeft\n } = getComputedStyle(scrollView);\n\n // Account for scroll margin of the element\n let {\n scrollMarginTop,\n scrollMarginRight,\n scrollMarginBottom,\n scrollMarginLeft\n } = getComputedStyle(element);\n\n let borderAdjustedX = x + parseInt(borderLeftWidth, 10);\n let borderAdjustedY = y + parseInt(borderTopWidth, 10);\n // Ignore end/bottom border via clientHeight/Width instead of offsetHeight/Width\n let maxX = borderAdjustedX Line truncated
@@ -0,0 +1,70 @@
"use strict";
exports.__esModule = true;
exports.word = exports.tilde = exports.tab = exports.str = exports.space = exports.slash = exports.singleQuote = exports.semicolon = exports.plus = exports.pipe = exports.openSquare = exports.openParenthesis = exports.newline = exports.greaterThan = exports.feed = exports.equals = exports.doubleQuote = exports.dollar = exports.cr = exports.comment = exports.comma = exports.combinator = exports.colon = exports.closeSquare = exports.closeParenthesis = exports.caret = exports.bang = exports.backslash = exports.at = exports.asterisk = exports.ampersand = void 0;
var ampersand = 38; // `&`.charCodeAt(0);
exports.ampersand = ampersand;
var asterisk = 42; // `*`.charCodeAt(0);
exports.asterisk = asterisk;
var at = 64; // `@`.charCodeAt(0);
exports.at = at;
var comma = 44; // `,`.charCodeAt(0);
exports.comma = comma;
var colon = 58; // `:`.charCodeAt(0);
exports.colon = colon;
var semicolon = 59; // `;`.charCodeAt(0);
exports.semicolon = semicolon;
var openParenthesis = 40; // `(`.charCodeAt(0);
exports.openParenthesis = openParenthesis;
var closeParenthesis = 41; // `)`.charCodeAt(0);
exports.closeParenthesis = closeParenthesis;
var openSquare = 91; // `[`.charCodeAt(0);
exports.openSquare = openSquare;
var closeSquare = 93; // `]`.charCodeAt(0);
exports.closeSquare = closeSquare;
var dollar = 36; // `$`.charCodeAt(0);
exports.dollar = dollar;
var tilde = 126; // `~`.charCodeAt(0);
exports.tilde = tilde;
var caret = 94; // `^`.charCodeAt(0);
exports.caret = caret;
var plus = 43; // `+`.charCodeAt(0);
exports.plus = plus;
var equals = 61; // `=`.charCodeAt(0);
exports.equals = equals;
var pipe = 124; // `|`.charCodeAt(0);
exports.pipe = pipe;
var greaterThan = 62; // `>`.charCodeAt(0);
exports.greaterThan = greaterThan;
var space = 32; // ` `.charCodeAt(0);
exports.space = space;
var singleQuote = 39; // `'`.charCodeAt(0);
exports.singleQuote = singleQuote;
var doubleQuote = 34; // `"`.charCodeAt(0);
exports.doubleQuote = doubleQuote;
var slash = 47; // `/`.charCodeAt(0);
exports.slash = slash;
var bang = 33; // `!`.charCodeAt(0);
exports.bang = bang;
var backslash = 92; // '\\'.charCodeAt(0);
exports.backslash = backslash;
var cr = 13; // '\r'.charCodeAt(0);
exports.cr = cr;
var feed = 12; // '\f'.charCodeAt(0);
exports.feed = feed;
var newline = 10; // '\n'.charCodeAt(0);
exports.newline = newline;
var tab = 9; // '\t'.charCodeAt(0);
// Expose aliases primarily for readability.
exports.tab = tab;
var str = singleQuote;
// No good single character representation!
exports.str = str;
var comment = -1;
exports.comment = comment;
var word = -2;
exports.word = word;
var combinator = -3;
exports.combinator = combinator;
@@ -0,0 +1,45 @@
{
"name": "@img/colour",
"version": "1.0.0",
"description": "The ESM-only 'color' package made compatible for use with CommonJS runtimes",
"license": "MIT",
"main": "index.cjs",
"authors": [
"Heather Arthur <fayearthur@gmail.com>",
"Josh Junon <josh@junon.me>",
"Maxime Thirouin",
"Dyma Ywanov <dfcreative@gmail.com>",
"LitoMore (https://github.com/LitoMore)"
],
"engines": {
"node": ">=18"
},
"files": [
"color.cjs"
],
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/lovell/colour.git"
},
"type": "commonjs",
"keywords": [
"color",
"colour",
"cjs",
"commonjs"
],
"scripts": {
"build": "esbuild node_modules/color/index.js --bundle --platform=node --outfile=color.cjs",
"test": "node --test"
},
"devDependencies": {
"color": "5.0.0",
"color-convert": "3.1.0",
"color-name": "2.0.0",
"color-string": "2.1.0",
"esbuild": "^0.25.9"
}
}
@@ -0,0 +1,40 @@
{
"name": "@codemirror/search",
"version": "6.5.11",
"description": "Search functionality for the CodeMirror code editor",
"scripts": {
"test": "cm-runtests",
"prepare": "cm-buildhelper src/search.ts"
},
"keywords": [
"editor",
"code"
],
"author": {
"name": "Marijn Haverbeke",
"email": "marijn@haverbeke.berlin",
"url": "http://marijnhaverbeke.nl"
},
"type": "module",
"main": "dist/index.cjs",
"exports": {
"import": "./dist/index.js",
"require": "./dist/index.cjs"
},
"types": "dist/index.d.ts",
"module": "dist/index.js",
"sideEffects": false,
"license": "MIT",
"dependencies": {
"@codemirror/state": "^6.0.0",
"@codemirror/view": "^6.0.0",
"crelt": "^1.0.5"
},
"devDependencies": {
"@codemirror/buildhelper": "^1.0.0"
},
"repository": {
"type": "git",
"url": "https://github.com/codemirror/search.git"
}
}
@@ -0,0 +1,30 @@
{
"root": true,
"extends": "@ljharb",
"rules": {
"eqeqeq": [2, "allow-null"],
"func-name-matching": 0,
"func-style": 0,
"indent": [2, 4],
"max-nested-callbacks": [2, 3],
"max-params": [2, 3],
"max-statements": [2, 14],
"no-extra-parens": 0,
"no-invalid-this": 1,
"no-restricted-syntax": [2, "BreakStatement", "ContinueStatement", "DebuggerStatement", "LabeledStatement", "WithStatement"],
},
"overrides": [
{
"files": "test/**",
"rules": {
"array-bracket-newline": 0,
"array-element-newline": 0,
"max-statements-per-line": 0,
"no-magic-numbers": 0,
},
},
],
}
@@ -0,0 +1,48 @@
/** Returns true if element right is in the set of left */
// prettier-ignore
export function SetIncludes(T, S) {
return T.includes(S);
}
/** Returns true if left is a subset of right */
export function SetIsSubset(T, S) {
return T.every((L) => SetIncludes(S, L));
}
/** Returns a distinct set of elements */
export function SetDistinct(T) {
return [...new Set(T)];
}
/** Returns the Intersect of the given sets */
export function SetIntersect(T, S) {
return T.filter((L) => S.includes(L));
}
/** Returns the Union of the given sets */
export function SetUnion(T, S) {
return [...T, ...S];
}
/** Returns the Complement by omitting elements in T that are in S */
// prettier-ignore
export function SetComplement(T, S) {
return T.filter(L => !S.includes(L));
}
// prettier-ignore
function SetIntersectManyResolve(T, Init) {
return T.reduce((Acc, L) => {
return SetIntersect(Acc, L);
}, Init);
}
// prettier-ignore
export function SetIntersectMany(T) {
return (T.length === 1
? T[0]
// Use left to initialize the accumulator for resolve
: T.length > 1
? SetIntersectManyResolve(T.slice(1), T[0])
: []);
}
/** Returns the Union of multiple sets */
export function SetUnionMany(T) {
const Acc = [];
for (const L of T)
Acc.push(...L);
return Acc;
}
@@ -0,0 +1,143 @@
// Copyright (c) 2011-2012 Ryan Prichard
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
#ifndef SMALLRECT_H
#define SMALLRECT_H
#include <windows.h>
#include <algorithm>
#include <string>
#include "../shared/winpty_snprintf.h"
#include "Coord.h"
struct SmallRect : SMALL_RECT
{
SmallRect()
{
Left = Right = Top = Bottom = 0;
}
SmallRect(SHORT x, SHORT y, SHORT width, SHORT height)
{
Left = x;
Top = y;
Right = x + width - 1;
Bottom = y + height - 1;
}
SmallRect(const COORD &topLeft, const COORD &size)
{
Left = topLeft.X;
Top = topLeft.Y;
Right = Left + size.X - 1;
Bottom = Top + size.Y - 1;
}
SmallRect(const SMALL_RECT &other)
{
*(SMALL_RECT*)this = other;
}
SmallRect(const SmallRect &other)
{
*(SMALL_RECT*)this = *(const SMALL_RECT*)&other;
}
SmallRect &operator=(const SmallRect &other)
{
*(SMALL_RECT*)this = *(const SMALL_RECT*)&other;
return *this;
}
bool contains(const SmallRect &other) const
{
return other.Left >= Left &&
other.Right <= Right &&
other.Top >= Top &&
other.Bottom <= Bottom;
}
bool contains(const Coord &other) const
{
return other.X >= Left &&
other.X <= Right &&
other.Y >= Top &&
other.Y <= Bottom;
}
SmallRect intersected(const SmallRect &other) const
{
int x1 = std::max(Left, other.Left);
int x2 = std::min(Right, other.Right);
int y1 = std::max(Top, other.Top);
int y2 = std::min(Bottom, other.Bottom);
return SmallRect(x1,
y1,
std::max(0, x2 - x1 + 1),
std::max(0, y2 - y1 + 1));
}
SmallRect ensureLineIncluded(SHORT line) const
{
const SHORT h = height();
if (line < Top) {
return SmallRect(Left, line, width(), h);
} else if (line > Bottom) {
return SmallRect(Left, line - h + 1, width(), h);
} else {
return *this;
}
}
SHORT top() const { return Top; }
SHORT left() const { return Left; }
SHORT width() const { return Right - Left + 1; }
SHORT height() const { return Bottom - Top + 1; }
void setTop(SHORT top) { Top = top; }
void setLeft(SHORT left) { Left = left; }
void setWidth(SHORT width) { Right = Left + width - 1; }
void setHeight(SHORT height) { Bottom = Top + height - 1; }
Coord size() const { return Coord(width(), height()); }
bool operator==(const SmallRect &other) const
{
return Left == other.Left &&
Right == other.Right &&
Top == other.Top &&
Bottom == other.Bottom;
}
bool operator!=(const SmallRect &other) const
{
return !(*this == other);
}
std::string toString() const
{
char ret[64];
winpty_snprintf(ret, "(x=%d,y=%d,w=%d,h=%d)",
Left, Top, width(), height());
return std::string(ret);
}
};
#endif // SMALLRECT_H
@@ -0,0 +1,176 @@
# micromark-util-encode
[![Build][build-badge]][build]
[![Coverage][coverage-badge]][coverage]
[![Downloads][downloads-badge]][downloads]
[![Size][bundle-size-badge]][bundle-size]
[![Sponsors][sponsors-badge]][opencollective]
[![Backers][backers-badge]][opencollective]
[![Chat][chat-badge]][chat]
[micromark][] utility to encode dangerous html characters.
## Contents
* [What is this?](#what-is-this)
* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`encode(value)`](#encodevalue)
* [Types](#types)
* [Compatibility](#compatibility)
* [Security](#security)
* [Contribute](#contribute)
* [License](#license)
## What is this?
This package exposes an algorithm to make text safe for embedding in HTML.
## When should I use this?
This package might be useful when you are making your own micromark extensions.
## Install
This package is [ESM only][esm].
In Node.js (version 16+), install with [npm][]:
```sh
npm install micromark-util-encode
```
In Deno with [`esm.sh`][esmsh]:
```js
import {encode} from 'https://esm.sh/micromark-util-encode@1'
```
In browsers with [`esm.sh`][esmsh]:
```html
<script type="module">
import {encode} from 'https://esm.sh/micromark-util-encode@1?bundle'
</script>
```
## Use
```js
import {encode} from 'micromark-util-encode'
encode('<3') // '&lt;3'
```
## API
This module exports the identifier [`encode`][api-encode].
There is no default export.
### `encode(value)`
Encode only the dangerous HTML characters.
This ensures that certain characters which have special meaning in HTML are
dealt with.
Technically, we can skip `>` and `"` in many cases, but CM includes them.
###### Parameters
* `value` (`string`)
— value to encode
###### Returns
Encoded value (`string`).
## Types
This package is fully typed with [TypeScript][].
It exports no additional types.
## Compatibility
Projects maintained by the unified collective are compatible with maintained
versions of Node.js.
When we cut a new major release, we drop support for unmaintained versions of
Node.
This means we try to keep the current release line,
`micromark-util-encode@2`, compatible with Node.js 16.
This package works with `micromark@3`.
## Security
This package is safe.
See [`security.md`][securitymd] in [`micromark/.github`][health] for how to
submit a security report.
## Contribute
See [`contributing.md`][contributing] in [`micromark/.github`][health] for ways
to get started.
See [`support.md`][support] for ways to get help.
This project has a [code of conduct][coc].
By interacting with this repository, organisation, or community you agree to
abide by its terms.
## License
[MIT][license] © [Titus Wormer][author]
<!-- Definitions -->
[build-badge]: https://github.com/micromark/micromark/workflows/main/badge.svg
[build]: https://github.com/micromark/micromark/actions
[coverage-badge]: https://img.shields.io/codecov/c/github/micromark/micromark.svg
[coverage]: https://codecov.io/github/micromark/micromark
[downloads-badge]: https://img.shields.io/npm/dm/micromark-util-encode.svg
[downloads]: https://www.npmjs.com/package/micromark-util-encode
[bundle-size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=micromark-util-encode
[bundle-size]: https://bundlejs.com/?q=micromark-util-encode
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
[backers-badge]: https://opencollective.com/unified/backers/badge.svg
[opencollective]: https://opencollective.com/unified
[npm]: https://docs.npmjs.com/cli/install
[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
[esmsh]: https://esm.sh
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
[chat]: https://github.com/micromark/micromark/discussions
[license]: https://github.com/micromark/micromark/blob/main/license
[author]: https://wooorm.com
[health]: https://github.com/micromark/.github
[securitymd]: https://github.com/micromark/.github/blob/main/security.md
[contributing]: https://github.com/micromark/.github/blob/main/contributing.md
[support]: https://github.com/micromark/.github/blob/main/support.md
[coc]: https://github.com/micromark/.github/blob/main/code-of-conduct.md
[typescript]: https://www.typescriptlang.org
[micromark]: https://github.com/micromark/micromark
[api-encode]: #encodevalue
@@ -0,0 +1,67 @@
{
"name": "@jridgewell/gen-mapping",
"version": "0.3.13",
"description": "Generate source maps",
"keywords": [
"source",
"map"
],
"main": "dist/gen-mapping.umd.js",
"module": "dist/gen-mapping.mjs",
"types": "types/gen-mapping.d.cts",
"files": [
"dist",
"src",
"types"
],
"exports": {
".": [
{
"import": {
"types": "./types/gen-mapping.d.mts",
"default": "./dist/gen-mapping.mjs"
},
"default": {
"types": "./types/gen-mapping.d.cts",
"default": "./dist/gen-mapping.umd.js"
}
},
"./dist/gen-mapping.umd.js"
],
"./package.json": "./package.json"
},
"scripts": {
"benchmark": "run-s build:code benchmark:*",
"benchmark:install": "cd benchmark && npm install",
"benchmark:only": "node --expose-gc benchmark/index.js",
"build": "run-s -n build:code build:types",
"build:code": "node ../../esbuild.mjs gen-mapping.ts",
"build:types": "run-s build:types:force build:types:emit build:types:mts",
"build:types:force": "rimraf tsconfig.build.tsbuildinfo",
"build:types:emit": "tsc --project tsconfig.build.json",
"build:types:mts": "node ../../mts-types.mjs",
"clean": "run-s -n clean:code clean:types",
"clean:code": "tsc --build --clean tsconfig.build.json",
"clean:types": "rimraf dist types",
"test": "run-s -n test:types test:only test:format",
"test:format": "prettier --check '{src,test}/**/*.ts'",
"test:only": "mocha",
"test:types": "eslint '{src,test}/**/*.ts'",
"lint": "run-s -n lint:types lint:format",
"lint:format": "npm run test:format -- --write",
"lint:types": "npm run test:types -- --fix",
"prepublishOnly": "npm run-s -n build test"
},
"homepage": "https://github.com/jridgewell/sourcemaps/tree/main/packages/gen-mapping",
"repository": {
"type": "git",
"url": "git+https://github.com/jridgewell/sourcemaps.git",
"directory": "packages/gen-mapping"
},
"author": "Justin Ridgewell <justin@ridgewell.name>",
"license": "MIT",
"dependencies": {
"@jridgewell/sourcemap-codec": "^1.5.0",
"@jridgewell/trace-mapping": "^0.3.24"
}
}
@@ -0,0 +1,142 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = default_1;
const util = __importStar(require("../core/util.cjs"));
const error = () => {
const Sizable = {
string: { unit: "ký tự", verb: "có" },
file: { unit: "byte", verb: "có" },
array: { unit: "phần tử", verb: "có" },
set: { unit: "phần tử", verb: "có" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const parsedType = (data) => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "NaN" : "số";
}
case "object": {
if (Array.isArray(data)) {
return "mảng";
}
if (data === null) {
return "null";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns = {
regex: "đầu vào",
email: "địa chỉ email",
url: "URL",
emoji: "emoji",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "ngày giờ ISO",
date: "ngày ISO",
time: "giờ ISO",
duration: "khoảng thời gian ISO",
ipv4: "địa chỉ IPv4",
ipv6: "địa chỉ IPv6",
cidrv4: "dải IPv4",
cidrv6: "dải IPv6",
base64: "chuỗi mã hóa base64",
base64url: "chuỗi mã hóa base64url",
json_string: "chuỗi JSON",
e164: "số E.164",
jwt: "JWT",
template_literal: "đầu vào",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `Đầu vào không hợp lệ: mong đợi ${issue.expected}, nhận được ${parsedType(issue.input)}`;
case "invalid_value":
if (issue.values.length === 1)
return `Đầu vào không hợp lệ: mong đợi ${util.stringifyPrimitive(issue.values[0])}`;
return `Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Quá lớn: mong đợi ${issue.origin ?? "giá trị"} ${sizing.verb} ${adj}${issue.maximum.toString()} ${sizing.unit ?? "phần tử"}`;
return `Quá lớn: mong đợi ${issue.origin ?? "giá trị"} ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `Quá nhỏ: mong đợi ${issue.origin} ${sizing.verb} ${adj}${issue.minimum.toString()} ${sizing.unit}`;
}
return `Quá nhỏ: mong đợi ${issue.origin} ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with")
return `Chuỗi không hợp lệ: phải bắt đầu bằng "${_issue.prefix}"`;
if (_issue.format === "ends_with")
return `Chuỗi không hợp lệ: phải kết thúc bằng "${_issue.suffix}"`;
if (_issue.format === "includes")
return `Chuỗi không hợp lệ: phải bao gồm "${_issue.includes}"`;
if (_issue.format === "regex")
return `Chuỗi không hợp lệ: phải khớp với mẫu ${_issue.pattern}`;
return `${Nouns[_issue.format] ?? issue.format} không hợp lệ`;
}
case "not_multiple_of":
return `Số không hợp lệ: phải là bội số của ${issue.divisor}`;
case "unrecognized_keys":
return `Khóa không được nhận dạng: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `Khóa không hợp lệ trong ${issue.origin}`;
case "invalid_union":
return "Đầu vào không hợp lệ";
case "invalid_element":
return `Giá trị không hợp lệ trong ${issue.origin}`;
default:
return `Đầu vào không hợp lệ`;
}
};
};
function default_1() {
return {
localeError: error(),
};
}
@@ -0,0 +1,65 @@
{
"name": "safe-stable-stringify",
"version": "2.5.0",
"description": "Deterministic and safely JSON.stringify to quickly serialize JavaScript objects",
"exports": {
"require": "./index.js",
"import": "./esm/wrapper.js"
},
"keywords": [
"stable",
"stringify",
"JSON",
"JSON.stringify",
"safe",
"serialize",
"deterministic",
"circular",
"object",
"predicable",
"repeatable",
"fast",
"bigint"
],
"main": "index.js",
"scripts": {
"test": "standard && tap test.js",
"tap": "tap test.js",
"tap:only": "tap test.js --watch --only",
"benchmark": "node benchmark.js",
"compare": "node compare.js",
"lint": "standard --fix",
"tsc": "tsc --project tsconfig.json"
},
"engines": {
"node": ">=10"
},
"author": "Ruben Bridgewater",
"license": "MIT",
"typings": "index.d.ts",
"devDependencies": {
"@types/json-stable-stringify": "^1.0.34",
"@types/node": "^18.11.18",
"benchmark": "^2.1.4",
"clone": "^2.1.2",
"fast-json-stable-stringify": "^2.1.0",
"fast-safe-stringify": "^2.1.1",
"fast-stable-stringify": "^1.0.0",
"faster-stable-stringify": "^1.0.0",
"fastest-stable-stringify": "^2.0.2",
"json-stable-stringify": "^1.0.1",
"json-stringify-deterministic": "^1.0.7",
"json-stringify-safe": "^5.0.1",
"standard": "^16.0.4",
"tap": "^15.0.9",
"typescript": "^4.8.3"
},
"repository": {
"type": "git",
"url": "git+https://github.com/BridgeAR/safe-stable-stringify.git"
},
"bugs": {
"url": "https://github.com/BridgeAR/safe-stable-stringify/issues"
},
"homepage": "https://github.com/BridgeAR/safe-stable-stringify#readme"
}
@@ -0,0 +1,27 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var CellRole = {
relatedConcepts: [{
module: 'ARIA',
concept: {
name: 'cell'
}
}, {
module: 'ARIA',
concept: {
name: 'gridcell'
}
}, {
module: 'HTML',
concept: {
name: 'td'
}
}],
type: 'widget'
};
var _default = CellRole;
exports.default = _default;
@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RSAPublicKey = void 0;
const tslib_1 = require("tslib");
const asn1_schema_1 = require("@peculiar/asn1-schema");
class RSAPublicKey {
constructor(params = {}) {
this.modulus = new ArrayBuffer(0);
this.publicExponent = new ArrayBuffer(0);
Object.assign(this, params);
}
}
exports.RSAPublicKey = RSAPublicKey;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.Integer, converter: asn1_schema_1.AsnIntegerArrayBufferConverter })
], RSAPublicKey.prototype, "modulus", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.Integer, converter: asn1_schema_1.AsnIntegerArrayBufferConverter })
], RSAPublicKey.prototype, "publicExponent", void 0);
@@ -0,0 +1,7 @@
"use client";
import {
useButtonGroup
} from "./chunk-6XRBX2TW.mjs";
export {
useButtonGroup
};
@@ -0,0 +1,113 @@
{
"name": "array.prototype.flat",
"version": "1.3.3",
"author": {
"name": "Jordan Harband",
"email": "ljharb@gmail.com",
"url": "http://ljharb.codes"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
},
"contributors": [
{
"name": "Jordan Harband",
"email": "ljharb@gmail.com",
"url": "http://ljharb.codes"
}
],
"description": "An ES2019 spec-compliant `Array.prototype.flat` shim/polyfill/replacement that works as far down as ES3.",
"license": "MIT",
"main": "index.js",
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prepublishOnly": "safe-publish-latest",
"pretest": "npm run --silent lint && evalmd README.md",
"test": "npm run tests-only",
"posttest": "npx npm@'>= 10.2' audit --production",
"tests-only": "nyc tape 'test/**/*.js'",
"lint": "eslint --ext=js,mjs .",
"postlint": "es-shim-api --bound",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
},
"repository": {
"type": "git",
"url": "git://github.com/es-shims/Array.prototype.flat.git"
},
"keywords": [
"Array.prototype.flatten",
"Array.prototype.flat",
"flatten",
"flat",
"array",
"ESnext",
"shim",
"polyfill",
"flatMap",
"Array.prototype.flatMap",
"es-shim API"
],
"dependencies": {
"call-bind": "^1.0.8",
"define-properties": "^1.2.1",
"es-abstract": "^1.23.5",
"es-shim-unscopables": "^1.0.2"
},
"devDependencies": {
"@es-shims/api": "^2.5.1",
"@ljharb/eslint-config": "^21.1.1",
"auto-changelog": "^2.5.0",
"covert": "^1.1.1",
"encoding": "^0.1.13",
"eslint": "=8.8.0",
"evalmd": "^0.0.19",
"function-bind": "^1.1.2",
"has-strict-mode": "^1.0.1",
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"object-inspect": "^1.13.3",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0"
},
"testling": {
"files": [
"test/index.js",
"test/shimmed.js"
],
"browsers": [
"iexplore/6.0..latest",
"firefox/3.0..6.0",
"firefox/15.0..latest",
"firefox/nightly",
"chrome/4.0..10.0",
"chrome/20.0..latest",
"chrome/canary",
"opera/10.0..latest",
"opera/next",
"safari/4.0..latest",
"ipad/6.0..latest",
"iphone/6.0..latest",
"android-browser/4.2"
]
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true,
"startingVersion": "1.3.1"
},
"publishConfig": {
"ignore": [
".github/workflows"
]
}
}
@@ -0,0 +1,323 @@
import type { PbLong, PbULong } from "./pb-long";
/**
* Options for writing binary data.
*/
export interface BinaryWriteOptions {
/**
* Shall unknown fields be written back on wire?
*
* `true`: unknown fields stored in a symbol property of the message
* are written back. This is the default behaviour.
*
* `false`: unknown fields are not written.
*
* `UnknownFieldWriter`: Your own behaviour for unknown fields.
*/
writeUnknownFields: boolean | UnknownFieldWriter;
/**
* Allows to use a custom implementation to encode binary data.
*/
writerFactory: () => IBinaryWriter;
}
/**
* Options for reading binary data.
*/
export interface BinaryReadOptions {
/**
* Shall unknown fields be read, ignored or raise an error?
*
* `true`: stores the unknown field on a symbol property of the
* message. This is the default behaviour.
*
* `false`: ignores the unknown field.
*
* `"throw"`: throws an error.
*
* `UnknownFieldReader`: Your own behaviour for unknown fields.
*/
readUnknownField: boolean | 'throw' | UnknownFieldReader;
/**
* Allows to use a custom implementation to parse binary data.
*/
readerFactory: (bytes: Uint8Array) => IBinaryReader;
}
/**
* Store an unknown field for a message somewhere.
*/
declare type UnknownFieldReader = (typeName: string, message: any, fieldNo: number, wireType: WireType, data: Uint8Array) => void;
/**
* Write unknown fields stored for the message to the writer.
*/
declare type UnknownFieldWriter = (typeName: string, message: any, writer: IBinaryWriter) => void;
/**
* This handler implements the default behaviour for unknown fields.
* When reading data, unknown fields are stored on the message, in a
* symbol property.
* When writing data, the symbol property is queried and unknown fields
* are serialized into the output again.
*/
export declare namespace UnknownFieldHandler {
/**
* The symbol used to store unknown fields for a message.
* The property must conform to `UnknownFieldContainer`.
*/
const symbol: unique symbol;
/**
* Store an unknown field during binary read directly on the message.
* This method is compatible with `BinaryReadOptions.readUnknownField`.
*/
const onRead: UnknownFieldReader;
/**
* Write unknown fields stored for the message to the writer.
* This method is compatible with `BinaryWriteOptions.writeUnknownFields`.
*/
const onWrite: UnknownFieldWriter;
/**
* List unknown fields stored for the message.
* Note that there may be multiples fields with the same number.
*/
const list: (message: any, fieldNo?: number | undefined) => UnknownField[];
/**
* Returns the last unknown field by field number.
*/
const last: (message: any, fieldNo: number) => UnknownField | undefined;
}
interface UnknownField {
no: number;
wireType: WireType;
data: Uint8Array;
}
export interface UnknownFieldContainer {
[UnknownFieldHandler.symbol]: UnknownField[];
}
/**
* Merges binary write or read options. Later values override earlier values.
*/
export declare function mergeBinaryOptions<T extends BinaryWriteOptions | BinaryReadOptions>(a?: Partial<T>, b?: Partial<T>): Partial<T>;
/**
* This interface is used throughout @protobuf-ts to read
* protobuf binary format.
*
* While not completely compatible, this interface is closely aligned
* with the `Reader` class of `protobufjs` to make it easier to swap
* the implementation.
*/
export interface IBinaryReader {
/**
* Current position.
*/
readonly pos: number;
/**
* Number of bytes available in this reader.
*/
readonly len: number;
/**
* Reads a tag - field number and wire type.
*/
tag(): [number, WireType];
/**
* Skip one element on the wire and return the skipped data.
*/
skip(wireType: WireType): Uint8Array;
/**
* Read a `int32` field, a signed 32 bit varint.
*/
uint32(): number;
/**
* Read a `sint32` field, a signed, zigzag-encoded 32-bit varint.
*/
int32(): number;
/**
* Read a `sint32` field, a signed, zigzag-encoded 32-bit varint.
*/
sint32(): number;
/**
* Read a `int64` field, a signed 64-bit varint.
*/
int64(): PbLong;
/**
* Read a `sint64` field, a signed, zig-zag-encoded 64-bit varint.
*/
sint64(): PbLong;
/**
* Read a `fixed64` field, a signed, fixed-length 64-bit integer.
*/
sfixed64(): PbLong;
/**
* Read a `uint64` field, an unsigned 64-bit varint.
*/
uint64(): PbULong;
/**
* Read a `fixed64` field, an unsigned, fixed-length 64 bit integer.
*/
fixed64(): PbULong;
/**
* Read a `bool` field, a variant.
*/
bool(): boolean;
/**
* Read a `fixed32` field, an unsigned, fixed-length 32-bit integer.
*/
fixed32(): number;
/**
* Read a `sfixed32` field, a signed, fixed-length 32-bit integer.
*/
sfixed32(): number;
/**
* Read a `float` field, 32-bit floating point number.
*/
float(): number;
/**
* Read a `double` field, a 64-bit floating point number.
*/
double(): number;
/**
* Read a `bytes` field, length-delimited arbitrary data.
*/
bytes(): Uint8Array;
/**
* Read a `string` field, length-delimited data converted to UTF-8 text.
*/
string(): string;
}
/**
* This interface is used throughout @protobuf-ts to write
* protobuf binary format.
*
* While not completely compatible, this interface is closely aligned
* with the `Writer` class of `protobufjs` to make it easier to swap
* the implementation.
*/
export interface IBinaryWriter {
/**
* Return all bytes written and reset this writer.
*/
finish(): Uint8Array;
/**
* Start a new fork for length-delimited data like a message
* or a packed repeated field.
*
* Must be joined later with `join()`.
*/
fork(): IBinaryWriter;
/**
* Join the last fork. Write its length and bytes, then
* return to the previous state.
*/
join(): IBinaryWriter;
/**
* Writes a tag (field number and wire type).
*
* Equivalent to `uint32( (fieldNo << 3 | type) >>> 0 )`
*
* Generated code should compute the tag ahead of time and call `uint32()`.
*/
tag(fieldNo: number, type: WireType): IBinaryWriter;
/**
* Write a chunk of raw bytes.
*/
raw(chunk: Uint8Array): IBinaryWriter;
/**
* Write a `uint32` value, an unsigned 32 bit varint.
*/
uint32(value: number): IBinaryWriter;
/**
* Write a `int32` value, a signed 32 bit varint.
*/
int32(value: number): IBinaryWriter;
/**
* Write a `sint32` value, a signed, zigzag-encoded 32-bit varint.
*/
sint32(value: number): IBinaryWriter;
/**
* Write a `int64` value, a signed 64-bit varint.
*/
int64(value: string | number | bigint): IBinaryWriter;
/**
* Write a `uint64` value, an unsigned 64-bit varint.
*/
uint64(value: string | number | bigint): IBinaryWriter;
/**
* Write a `sint64` value, a signed, zig-zag-encoded 64-bit varint.
*/
sint64(value: string | number | bigint): IBinaryWriter;
/**
* Write a `fixed64` value, an unsigned, fixed-length 64 bit integer.
*/
fixed64(value: string | number | bigint): IBinaryWriter;
/**
* Write a `fixed64` value, a signed, fixed-length 64-bit integer.
*/
sfixed64(value: string | number | bigint): IBinaryWriter;
/**
* Write a `bool` value, a variant.
*/
bool(value: boolean): IBinaryWriter;
/**
* Write a `fixed32` value, an unsigned, fixed-length 32-bit integer.
*/
fixed32(value: number): IBinaryWriter;
/**
* Write a `sfixed32` value, a signed, fixed-length 32-bit integer.
*/
sfixed32(value: number): IBinaryWriter;
/**
* Write a `float` value, 32-bit floating point number.
*/
float(value: number): IBinaryWriter;
/**
* Write a `double` value, a 64-bit floating point number.
*/
double(value: number): IBinaryWriter;
/**
* Write a `bytes` value, length-delimited arbitrary data.
*/
bytes(value: Uint8Array): IBinaryWriter;
/**
* Write a `string` value, length-delimited data converted to UTF-8 text.
*/
string(value: string): IBinaryWriter;
}
/**
* Protobuf binary format wire types.
*
* A wire type provides just enough information to find the length of the
* following value.
*
* See https://developers.google.com/protocol-buffers/docs/encoding#structure
*/
export declare enum WireType {
/**
* Used for int32, int64, uint32, uint64, sint32, sint64, bool, enum
*/
Varint = 0,
/**
* Used for fixed64, sfixed64, double.
* Always 8 bytes with little-endian byte order.
*/
Bit64 = 1,
/**
* Used for string, bytes, embedded messages, packed repeated fields
*
* Only repeated numeric types (types which use the varint, 32-bit,
* or 64-bit wire types) can be packed. In proto3, such fields are
* packed by default.
*/
LengthDelimited = 2,
/**
* Used for groups
* @deprecated
*/
StartGroup = 3,
/**
* Used for groups
* @deprecated
*/
EndGroup = 4,
/**
* Used for fixed32, sfixed32, float.
* Always 4 bytes with little-endian byte order.
*/
Bit32 = 5
}
export {};
@@ -0,0 +1 @@
{"version":3,"file":"BindingConstraintUtils.js","sourceRoot":"","sources":["../../../../../src/container/binding/utils/BindingConstraintUtils.ts"],"names":[],"mappings":";;;AAEA,MAAa,sBAAsB;IAC1B,MAAM,CAAU,MAAM,GAEd,CAAC,mBAAuC,EAAW,EAAE;QAClE,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;;AALJ,wDAMC"}
@@ -0,0 +1,19 @@
'use strict';
var isFinite = require('math-intrinsics/isFinite');
var modulo = require('./modulo');
var ToNumber = require('./ToNumber');
var truncate = require('./truncate');
// https://262.ecma-international.org/14.0/#sec-touint8
module.exports = function ToUint8(argument) {
var number = ToNumber(argument);
if (!isFinite(number) || number === 0) {
return 0;
}
var int = truncate(number);
var int8bit = modulo(int, 0x100);
return int8bit;
};
@@ -0,0 +1,9 @@
'use strict';
var implementation = require('./implementation');
var $Iterator = require('../Iterator');
module.exports = function getPolyfill() {
return typeof $Iterator.zip === 'function' ? $Iterator.zip : implementation;
};
@@ -0,0 +1 @@
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/common/util.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,MAAM,gBAAiB,SAAQ,KAAK;IAClC,YACE,OAAe,EACR,OAAqD;QAE5D,KAAK,CAAC,OAAO,CAAC,CAAC;QAFR,YAAO,GAAP,OAAO,CAA8C;IAG9D,CAAC;CACF;AAaO,4CAAgB;AAXxB;;;GAGG;AACH,SAAS,YAAY,CAAC,KAAgB;IACpC,KAAK,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC1C,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAC9C,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9C,CAAC;AACH,CAAC;AAEyB,oCAAY"}
@@ -0,0 +1,42 @@
{
"name": "@codemirror/lang-css",
"version": "6.3.1",
"description": "CSS language support for the CodeMirror code editor",
"scripts": {
"test": "cm-runtests",
"prepare": "cm-buildhelper src/css.ts"
},
"keywords": [
"editor",
"code"
],
"author": {
"name": "Marijn Haverbeke",
"email": "marijn@haverbeke.berlin",
"url": "http://marijnhaverbeke.nl"
},
"type": "module",
"main": "dist/index.cjs",
"exports": {
"import": "./dist/index.js",
"require": "./dist/index.cjs"
},
"types": "dist/index.d.ts",
"module": "dist/index.js",
"sideEffects": false,
"license": "MIT",
"dependencies": {
"@codemirror/autocomplete": "^6.0.0",
"@codemirror/language": "^6.0.0",
"@codemirror/state": "^6.0.0",
"@lezer/common": "^1.0.2",
"@lezer/css": "^1.1.7"
},
"devDependencies": {
"@codemirror/buildhelper": "^1.0.0"
},
"repository": {
"type": "git",
"url": "https://github.com/codemirror/lang-css.git"
}
}
@@ -0,0 +1,14 @@
declare const pink: {
50: string;
100: string;
200: string;
300: string;
400: string;
500: string;
600: string;
700: string;
800: string;
900: string;
};
export { pink };
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"2":"C L M G N O P","514":"0 1 2 3 4 5 Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I"},C:{"2":"6 7 xC TC J ZB K D E F A B C L M G N O P aB 0C 1C","322":"0 1 2 3 4 5 8 9 AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC"},D:{"2":"6 7 8 9 J ZB K D E F A B C L M G N O P aB AB","164":"0 1 2 3 4 5 BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC"},E:{"2":"J ZB K D E F A B C L M 2C ZC 3C 4C 5C 6C aC NC OC 7C","1060":"G 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED"},F:{"2":"6 7 8 9 F B C G N O P aB AB BB CB FD GD HD ID NC uC JD OC","514":"0 1 2 3 4 5 DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z"},G:{"2":"E ZC KD vC LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD","1060":"cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC"},H:{"2":"hD"},I:{"2":"TC J I iD jD kD lD vC mD nD"},J:{"2":"D A"},K:{"2":"A B C NC uC OC","164":"H"},L:{"164":"I"},M:{"2":"MC"},N:{"2":"A B"},O:{"164":"PC"},P:{"164":"6 7 8 9 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"164":"zD"},R:{"164":"0D"},S:{"322":"1D 2D"}},B:7,C:"Speech Recognition API",D:true};
@@ -0,0 +1,76 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RE_URL_WITH_PORT = exports.RE_URL = exports.RE_ZONE_STRING = exports.RE_SUBNET_STRING = exports.RE_BAD_ADDRESS = exports.RE_BAD_CHARACTERS = exports.TYPES = exports.SCOPES = exports.GROUPS = exports.BITS = void 0;
exports.BITS = 128;
exports.GROUPS = 8;
/**
* Represents IPv6 address scopes
* @memberof Address6
* @static
*/
exports.SCOPES = {
0: 'Reserved',
1: 'Interface local',
2: 'Link local',
4: 'Admin local',
5: 'Site local',
8: 'Organization local',
14: 'Global',
15: 'Reserved',
};
/**
* Represents IPv6 address types
* @memberof Address6
* @static
*/
exports.TYPES = {
'ff01::1/128': 'Multicast (All nodes on this interface)',
'ff01::2/128': 'Multicast (All routers on this interface)',
'ff02::1/128': 'Multicast (All nodes on this link)',
'ff02::2/128': 'Multicast (All routers on this link)',
'ff05::2/128': 'Multicast (All routers in this site)',
'ff02::5/128': 'Multicast (OSPFv3 AllSPF routers)',
'ff02::6/128': 'Multicast (OSPFv3 AllDR routers)',
'ff02::9/128': 'Multicast (RIP routers)',
'ff02::a/128': 'Multicast (EIGRP routers)',
'ff02::d/128': 'Multicast (PIM routers)',
'ff02::16/128': 'Multicast (MLDv2 reports)',
'ff01::fb/128': 'Multicast (mDNSv6)',
'ff02::fb/128': 'Multicast (mDNSv6)',
'ff05::fb/128': 'Multicast (mDNSv6)',
'ff02::1:2/128': 'Multicast (All DHCP servers and relay agents on this link)',
'ff05::1:2/128': 'Multicast (All DHCP servers and relay agents in this site)',
'ff02::1:3/128': 'Multicast (All DHCP servers on this link)',
'ff05::1:3/128': 'Multicast (All DHCP servers in this site)',
'::/128': 'Unspecified',
'::1/128': 'Loopback',
'ff00::/8': 'Multicast',
'fe80::/10': 'Link-local unicast',
};
/**
* A regular expression that matches bad characters in an IPv6 address
* @memberof Address6
* @static
*/
exports.RE_BAD_CHARACTERS = /([^0-9a-f:/%])/gi;
/**
* A regular expression that matches an incorrect IPv6 address
* @memberof Address6
* @static
*/
exports.RE_BAD_ADDRESS = /([0-9a-f]{5,}|:{3,}|[^:]:$|^:[^:]|\/$)/gi;
/**
* A regular expression that matches an IPv6 subnet
* @memberof Address6
* @static
*/
exports.RE_SUBNET_STRING = /\/\d{1,3}(?=%|$)/;
/**
* A regular expression that matches an IPv6 zone
* @memberof Address6
* @static
*/
exports.RE_ZONE_STRING = /%.*$/;
exports.RE_URL = /^\[{0,1}([0-9a-f:]+)\]{0,1}/;
exports.RE_URL_WITH_PORT = /\[([0-9a-f:]+)\]:([0-9]{1,5})/;
//# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"2":"C L M G N O P","33":"0 1 2 3 4 5 Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I"},C:{"2":"0 1 2 3 4 5 6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC 0C 1C"},D:{"2":"J ZB K D E F A B C L M G N","33":"0 1 2 3 4 5 6 7 8 9 O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC"},E:{"1":"A B C L M G aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"J ZB 2C ZC","33":"K D E F 3C 4C 5C 6C"},F:{"2":"F B C FD GD HD ID NC uC JD OC","33":"0 1 2 3 4 5 6 7 8 9 G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z"},G:{"1":"RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"ZC KD vC","33":"E LD MD ND OD PD QD"},H:{"2":"hD"},I:{"2":"TC J iD jD kD lD vC","33":"I mD nD"},J:{"2":"D A"},K:{"2":"A B C NC uC OC","33":"H"},L:{"33":"I"},M:{"2":"MC"},N:{"2":"A B"},O:{"33":"PC"},P:{"33":"6 7 8 9 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"33":"zD"},R:{"33":"0D"},S:{"2":"1D 2D"}},B:4,C:"CSS Cross-Fade Function",D:true};
@@ -0,0 +1,24 @@
'use strict'
module.exports = Base => class extends Base {
warn (code, message, data = {}) {
if (this.file) {
data.file = this.file
}
if (this.cwd) {
data.cwd = this.cwd
}
data.code = message instanceof Error && message.code || code
data.tarCode = code
if (!this.strict && data.recoverable !== false) {
if (message instanceof Error) {
data = Object.assign(message, data)
message = message.message
}
this.emit('warn', data.tarCode, message, data)
} else if (message instanceof Error) {
this.emit('error', Object.assign(message, data))
} else {
this.emit('error', Object.assign(new Error(`${code}: ${message}`), data))
}
}
}
@@ -0,0 +1,40 @@
/**
* ASN.1 types for classes
*/
export declare enum AsnTypeTypes {
Sequence = 0,
Set = 1,
Choice = 2
}
/**
* ASN.1 types for properties
*/
export declare enum AsnPropTypes {
Any = 1,
Boolean = 2,
OctetString = 3,
BitString = 4,
Integer = 5,
Enumerated = 6,
ObjectIdentifier = 7,
Utf8String = 8,
BmpString = 9,
UniversalString = 10,
NumericString = 11,
PrintableString = 12,
TeletexString = 13,
VideotexString = 14,
IA5String = 15,
GraphicString = 16,
VisibleString = 17,
GeneralString = 18,
CharacterString = 19,
UTCTime = 20,
GeneralizedTime = 21,
DATE = 22,
TimeOfDay = 23,
DateTime = 24,
Duration = 25,
TIME = 26,
Null = 27
}
@@ -0,0 +1,18 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./constructor"), exports);
@@ -0,0 +1,15 @@
import type { ScopeVariable } from '@typescript-eslint/scope-manager';
import { TSESLint } from '@typescript-eslint/utils';
interface VariableAnalysis {
readonly unusedVariables: ReadonlySet<ScopeVariable>;
readonly usedVariables: ReadonlySet<ScopeVariable>;
}
/**
* Collects the set of unused variables for a given context.
*
* Due to complexity, this does not take into consideration:
* - variables within declaration files
* - variables within ambient module declarations
*/
export declare function collectVariables<MessageIds extends string, Options extends readonly unknown[]>(context: Readonly<TSESLint.RuleContext<MessageIds, Options>>): VariableAnalysis;
export {};
@@ -0,0 +1,4 @@
import { Registration } from "./dependency-container";
export default class ResolutionContext {
scopedResolutions: Map<Registration, any>;
}
@@ -0,0 +1,5 @@
function _classPrivateFieldBase(e, t) {
if (!{}.hasOwnProperty.call(e, t)) throw new TypeError("attempted to use private field on non-instance");
return e;
}
export { _classPrivateFieldBase as default };
@@ -0,0 +1,74 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
pattern: function() {
return pattern;
},
withoutCapturing: function() {
return withoutCapturing;
},
any: function() {
return any;
},
optional: function() {
return optional;
},
zeroOrMore: function() {
return zeroOrMore;
},
nestedBrackets: function() {
return nestedBrackets;
},
escape: function() {
return escape;
}
});
const REGEX_SPECIAL = /[\\^$.*+?()[\]{}|]/g;
const REGEX_HAS_SPECIAL = RegExp(REGEX_SPECIAL.source);
/**
* @param {string|RegExp|Array<string|RegExp>} source
*/ function toSource(source) {
source = Array.isArray(source) ? source : [
source
];
source = source.map((item)=>item instanceof RegExp ? item.source : item);
return source.join("");
}
function pattern(source) {
return new RegExp(toSource(source), "g");
}
function withoutCapturing(source) {
return new RegExp(`(?:${toSource(source)})`, "g");
}
function any(sources) {
return `(?:${sources.map(toSource).join("|")})`;
}
function optional(source) {
return `(?:${toSource(source)})?`;
}
function zeroOrMore(source) {
return `(?:${toSource(source)})*`;
}
function nestedBrackets(open, close, depth = 1) {
return withoutCapturing([
escape(open),
/[^\s]*/,
depth === 1 ? `[^${escape(open)}${escape(close)}\s]*` : any([
`[^${escape(open)}${escape(close)}\s]*`,
nestedBrackets(open, close, depth - 1)
]),
/[^\s]*/,
escape(close)
]);
}
function escape(string) {
return string && REGEX_HAS_SPECIAL.test(string) ? string.replace(REGEX_SPECIAL, "\\$&") : string || "";
}
@@ -0,0 +1 @@
{"version":3,"file":"BindingConstraintUtils.d.ts","sourceRoot":"","sources":["../../../../../src/container/binding/utils/BindingConstraintUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEvD,qBAAa,sBAAsB;IACjC,gBAAuB,MAAM,EAAE,CAC7B,kBAAkB,EAAE,kBAAkB,KACnC,OAAO,CAEV;CACH"}
@@ -0,0 +1 @@
{"mappings":";;AAAA;;;;;;;;;;CAUC;AAOM,MAAM,4CAAgD,OAAO,aAAa,cAC7E,CAAA,GAAA,YAAI,EAAE,eAAe,GACrB,KAAO","sources":["packages/@react-aria/utils/src/useLayoutEffect.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport React from 'react';\n\n// During SSR, React emits a warning when calling useLayoutEffect.\n// Since neither useLayoutEffect nor useEffect run on the server,\n// we can suppress this by replace it with a noop on the server.\nexport const useLayoutEffect: typeof React.useLayoutEffect = typeof document !== 'undefined'\n ? React.useLayoutEffect\n : () => {};\n"],"names":[],"version":3,"file":"useLayoutEffect.module.js.map"}
@@ -0,0 +1,131 @@
# Changelog
## [7.1.3] - 2025-01-22
### Fixed
- Bump napi-build-utils from 1 to 2 ([#204](https://github.com/prebuild/prebuild-install/issues/204)) ([`1bf4a15`](https://github.com/prebuild/prebuild-install/commit/1bf4a15)) (Bailey Pearson)
## [7.1.2] - 2024-02-29
### Fixed
- Support environments where MD5 is prohibited ([#191](https://github.com/prebuild/prebuild-install/issues/191)) ([`9140468`](https://github.com/prebuild/prebuild-install/commit/9140468)) (Tomasz Szuba)
## [7.1.1] - 2022-06-07
### Fixed
- Replace use of npmlog dependency with console.error ([#182](https://github.com/prebuild/prebuild-install/issues/182)) ([`4e2284c`](https://github.com/prebuild/prebuild-install/commit/4e2284c)) (Lovell Fuller)
- Ensure script output can be captured by tests ([#181](https://github.com/prebuild/prebuild-install/issues/181)) ([`d1853cb`](https://github.com/prebuild/prebuild-install/commit/d1853cb)) (Lovell Fuller)
## [7.1.0] - 2022-04-20
### Changed
- Allow setting libc to glibc on non-glibc platform ([#176](https://github.com/prebuild/prebuild-install/issues/176)) ([`f729abb`](https://github.com/prebuild/prebuild-install/commit/f729abb)) (Joona Heinikoski)
## [7.0.1] - 2022-01-28
### Changed
- Upgrade to the latest version of `detect-libc` ([#166](https://github.com/prebuild/prebuild-install/issues/166)) ([`f71c6b9`](https://github.com/prebuild/prebuild-install/commit/f71c6b9)) (Lovell Fuller)
## [7.0.0] - 2021-11-12
### Changed
- **Breaking:** bump `node-abi` so that Electron 14+ gets correct ABI ([#161](https://github.com/prebuild/prebuild-install/issues/161)) ([`477f347`](https://github.com/prebuild/prebuild-install/commit/477f347)) (csett86). Drops support of Node.js < 10.
- Bump `simple-get` ([`7468c14`](https://github.com/prebuild/prebuild-install/commit/7468c14)) (Vincent Weevers).
## [6.1.4] - 2021-08-11
### Fixed
- Move auth token to header instead of query param ([#160](https://github.com/prebuild/prebuild-install/issues/160)) ([`b3fad76`](https://github.com/prebuild/prebuild-install/commit/b3fad76)) (nicolai-nordic)
- Remove `_` prefix as it isn't allowed by npm config ([#153](https://github.com/prebuild/prebuild-install/issues/153)) ([`a964e5b`](https://github.com/prebuild/prebuild-install/commit/a964e5b)) (Tom Boothman)
- Make `rc.path` absolute ([#158](https://github.com/prebuild/prebuild-install/issues/158)) ([`57bcc06`](https://github.com/prebuild/prebuild-install/commit/57bcc06)) (George Waters).
## [6.1.3] - 2021-06-03
### Changed
- Inline no longer maintained `noop-logger` ([#155](https://github.com/prebuild/prebuild-install/issues/155)) ([`e08d75a`](https://github.com/prebuild/prebuild-install/commit/e08d75a)) (Alexandru Dima)
- Point users towards `prebuildify` in README ([#150](https://github.com/prebuild/prebuild-install/issues/150)) ([`5ee1a2f`](https://github.com/prebuild/prebuild-install/commit/5ee1a2f)) (Vincent Weevers)
## [6.1.2] - 2021-04-24
### Fixed
- Support URL-safe strings in scoped packages ([#148](https://github.com/prebuild/prebuild-install/issues/148)) ([`db36c7a`](https://github.com/prebuild/prebuild-install/commit/db36c7a)) (Marco)
## [6.1.1] - 2021-04-04
### Fixed
- Support `force` & `buildFromSource` options in yarn ([#140](https://github.com/prebuild/prebuild-install/issues/140)) ([`8cb1ced`](https://github.com/prebuild/prebuild-install/commit/8cb1ced)) (João Moreno)
- Bump `node-abi` to prevent dedupe (closes [#135](https://github.com/prebuild/prebuild-install/issues/135)) ([`2950fb2`](https://github.com/prebuild/prebuild-install/commit/2950fb2)) (Vincent Weevers)
## [6.1.0] - 2021-04-03
### Added
- Restore local prebuilds feature ([#137](https://github.com/prebuild/prebuild-install/issues/137)) ([`dc4e5ea`](https://github.com/prebuild/prebuild-install/commit/dc4e5ea)) (Wes Roberts). Previously removed in [#81](https://github.com/prebuild/prebuild-install/issues/81) / [`a069253`](https://github.com/prebuild/prebuild-install/commit/a06925378d38ca821bfa93aa4c1fdedc253b2420).
## [6.0.1] - 2021-02-14
### Fixed
- Fixes empty `--tag-prefix` ([#143](https://github.com/prebuild/prebuild-install/issues/143)) ([**@mathiask88**](https://github.com/mathiask88))
## [6.0.0] - 2020-10-23
### Changed
- **Breaking:** don't skip downloads in standalone mode ([`b6f3b36`](https://github.com/prebuild/prebuild-install/commit/b6f3b36)) ([**@vweevers**](https://github.com/vweevers))
### Added
- Document cross platform options ([`e5c9a5a`](https://github.com/prebuild/prebuild-install/commit/e5c9a5a)) ([**@fishbone1**](https://github.com/fishbone1))
### Removed
- **Breaking:** remove `--compile` and `--prebuild` options ([`94f2492`](https://github.com/prebuild/prebuild-install/commit/94f2492)) ([**@vweevers**](https://github.com/vweevers))
### Fixed
- Support npm 7 ([`8acccac`](https://github.com/prebuild/prebuild-install/commit/8acccac), [`08eaf6d`](https://github.com/prebuild/prebuild-install/commit/08eaf6d), [`22175b8`](https://github.com/prebuild/prebuild-install/commit/22175b8)) ([**@vweevers**](https://github.com/vweevers))
## [5.3.6] - 2020-10-20
### Changed
- Replace `mkdirp` dependency with `mkdirp-classic` ([**@ralphtheninja**](https://github.com/ralphtheninja))
[7.1.3]: https://github.com/prebuild/prebuild-install/releases/tag/v7.1.3
[7.1.2]: https://github.com/prebuild/prebuild-install/releases/tag/v7.1.2
[7.1.1]: https://github.com/prebuild/prebuild-install/releases/tag/v7.1.1
[7.1.0]: https://github.com/prebuild/prebuild-install/releases/tag/v7.1.0
[7.0.1]: https://github.com/prebuild/prebuild-install/releases/tag/v7.0.1
[7.0.0]: https://github.com/prebuild/prebuild-install/releases/tag/v7.0.0
[6.1.4]: https://github.com/prebuild/prebuild-install/releases/tag/v6.1.4
[6.1.3]: https://github.com/prebuild/prebuild-install/releases/tag/v6.1.3
[6.1.2]: https://github.com/prebuild/prebuild-install/releases/tag/v6.1.2
[6.1.1]: https://github.com/prebuild/prebuild-install/releases/tag/v6.1.1
[6.1.0]: https://github.com/prebuild/prebuild-install/releases/tag/v6.1.0
[6.0.1]: https://github.com/prebuild/prebuild-install/releases/tag/v6.0.1
[6.0.0]: https://github.com/prebuild/prebuild-install/releases/tag/v6.0.0
[5.3.6]: https://github.com/prebuild/prebuild-install/releases/tag/v5.3.6
@@ -0,0 +1,74 @@
/**
* @typedef Options
* Configuration for `stringify`.
* @property {boolean} [padLeft=true]
* Whether to pad a space before a token.
* @property {boolean} [padRight=false]
* Whether to pad a space after a token.
*/
/**
* @typedef {Options} StringifyOptions
* Please use `StringifyOptions` instead.
*/
/**
* Parse comma-separated tokens to an array.
*
* @param {string} value
* Comma-separated tokens.
* @returns {Array<string>}
* List of tokens.
*/
export function parse(value) {
/** @type {Array<string>} */
const tokens = []
const input = String(value || '')
let index = input.indexOf(',')
let start = 0
/** @type {boolean} */
let end = false
while (!end) {
if (index === -1) {
index = input.length
end = true
}
const token = input.slice(start, index).trim()
if (token || !end) {
tokens.push(token)
}
start = index + 1
index = input.indexOf(',', start)
}
return tokens
}
/**
* Serialize an array of strings or numbers to comma-separated tokens.
*
* @param {Array<string|number>} values
* List of tokens.
* @param {Options} [options]
* Configuration for `stringify` (optional).
* @returns {string}
* Comma-separated tokens.
*/
export function stringify(values, options) {
const settings = options || {}
// Ensure the last empty entry is seen.
const input = values[values.length - 1] === '' ? [...values, ''] : values
return input
.join(
(settings.padRight ? ' ' : '') +
',' +
(settings.padLeft === false ? '' : ' ')
)
.trim()
}
@@ -0,0 +1,123 @@
let browserslist = require('browserslist')
function capitalize(str) {
return str.slice(0, 1).toUpperCase() + str.slice(1)
}
const NAMES = {
and_chr: 'Chrome for Android',
and_ff: 'Firefox for Android',
and_qq: 'QQ Browser',
and_uc: 'UC for Android',
baidu: 'Baidu Browser',
ie: 'IE',
ie_mob: 'IE Mobile',
ios_saf: 'iOS Safari',
kaios: 'KaiOS Browser',
op_mini: 'Opera Mini',
op_mob: 'Opera Mobile',
samsung: 'Samsung Internet'
}
function prefix(name, prefixes, note) {
let out = ` ${name}`
if (note) out += ' *'
out += ': '
out += prefixes.map(i => i.replace(/^-(.*)-$/g, '$1')).join(', ')
out += '\n'
return out
}
module.exports = function (prefixes) {
if (prefixes.browsers.selected.length === 0) {
return 'No browsers selected'
}
let versions = {}
for (let browser of prefixes.browsers.selected) {
let parts = browser.split(' ')
let name = parts[0]
let version = parts[1]
name = NAMES[name] || capitalize(name)
if (versions[name]) {
versions[name].push(version)
} else {
versions[name] = [version]
}
}
let out = 'Browsers:\n'
for (let browser in versions) {
let list = versions[browser]
list = list.sort((a, b) => parseFloat(b) - parseFloat(a))
out += ` ${browser}: ${list.join(', ')}\n`
}
let coverage = browserslist.coverage(prefixes.browsers.selected)
let round = Math.round(coverage * 100) / 100.0
out += `\nThese browsers account for ${round}% of all users globally\n`
let atrules = []
for (let name in prefixes.add) {
let data = prefixes.add[name]
if (name[0] === '@' && data.prefixes) {
atrules.push(prefix(name, data.prefixes))
}
}
if (atrules.length > 0) {
out += `\nAt-Rules:\n${atrules.sort().join('')}`
}
let selectors = []
for (let selector of prefixes.add.selectors) {
if (selector.prefixes) {
selectors.push(prefix(selector.name, selector.prefixes))
}
}
if (selectors.length > 0) {
out += `\nSelectors:\n${selectors.sort().join('')}`
}
let values = []
let props = []
let hadGrid = false
for (let name in prefixes.add) {
let data = prefixes.add[name]
if (name[0] !== '@' && data.prefixes) {
let grid = name.indexOf('grid-') === 0
if (grid) hadGrid = true
props.push(prefix(name, data.prefixes, grid))
}
if (!Array.isArray(data.values)) {
continue
}
for (let value of data.values) {
let grid = value.name.includes('grid')
if (grid) hadGrid = true
let string = prefix(value.name, value.prefixes, grid)
if (!values.includes(string)) {
values.push(string)
}
}
}
if (props.length > 0) {
out += `\nProperties:\n${props.sort().join('')}`
}
if (values.length > 0) {
out += `\nValues:\n${values.sort().join('')}`
}
if (hadGrid) {
out += '\n* - Prefixes will be added only on grid: true option.\n'
}
if (!atrules.length && !selectors.length && !props.length && !values.length) {
out +=
"\nAwesome! Your browsers don't require any vendor prefixes." +
'\nNow you can remove Autoprefixer from build steps.'
}
return out
}
@@ -0,0 +1,6 @@
import {
AnchorIcon
} from "./chunk-NS3FXBQF.mjs";
export {
AnchorIcon
};
@@ -0,0 +1,27 @@
import { createMatchPathAsync } from "../match-path-async";
import * as Tests from "./data/match-path-data";
describe("match-path-async", () => {
Tests.tests.forEach((t) =>
it(t.name, (done) => {
const matchPath = createMatchPathAsync(
t.absoluteBaseUrl,
t.paths,
t.mainFields,
t.addMatchAll
);
matchPath(
t.requestedModule,
(_path, callback) => callback(undefined, t.packageJson),
(path, callback) =>
callback(undefined, t.existingFiles.indexOf(path) !== -1),
t.extensions,
(_err, result) => {
// assert.equal(result, t.expectedPath);
expect(result).toBe(t.expectedPath);
done();
}
);
})
);
});
@@ -0,0 +1,27 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.vuePreprocessor = vuePreprocessor;
var preprocessor_1 = require("./preprocessor");
function vuePreprocessor(code, options) {
var _a, _b;
var parse = require('@vue/compiler-sfc').parse;
var descriptor = parse(code).descriptor;
var scriptContent = (_a = descriptor.script) === null || _a === void 0 ? void 0 : _a.content;
var scriptSetupContent = (_b = descriptor.scriptSetup) === null || _b === void 0 ? void 0 : _b.content;
if (!scriptContent && !scriptSetupContent) {
return code;
}
var transformedCode = code;
var replacer = function (content) {
// we pass the second argument as a function to avoid issues with the replacement string
// if string contained special groups (like $&, $`, $', $n, $<n>, etc.) this would produce invalid results
return transformedCode.replace(content, function () { return "\n".concat((0, preprocessor_1.preprocessor)(content, options), "\n"); });
};
if (scriptContent) {
transformedCode = replacer(scriptContent);
}
if (scriptSetupContent) {
transformedCode = replacer(scriptSetupContent);
}
return transformedCode;
}
@@ -0,0 +1,164 @@
import * as util from "../core/util.js";
function getBelarusianPlural(count, one, few, many) {
const absCount = Math.abs(count);
const lastDigit = absCount % 10;
const lastTwoDigits = absCount % 100;
if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
return many;
}
if (lastDigit === 1) {
return one;
}
if (lastDigit >= 2 && lastDigit <= 4) {
return few;
}
return many;
}
const error = () => {
const Sizable = {
string: {
unit: {
one: "сімвал",
few: "сімвалы",
many: "сімвалаў",
},
verb: "мець",
},
array: {
unit: {
one: "элемент",
few: "элементы",
many: "элементаў",
},
verb: "мець",
},
set: {
unit: {
one: "элемент",
few: "элементы",
many: "элементаў",
},
verb: "мець",
},
file: {
unit: {
one: "байт",
few: "байты",
many: "байтаў",
},
verb: "мець",
},
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const parsedType = (data) => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "NaN" : "лік";
}
case "object": {
if (Array.isArray(data)) {
return "масіў";
}
if (data === null) {
return "null";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns = {
regex: "увод",
email: "email адрас",
url: "URL",
emoji: "эмодзі",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "ISO дата і час",
date: "ISO дата",
time: "ISO час",
duration: "ISO працягласць",
ipv4: "IPv4 адрас",
ipv6: "IPv6 адрас",
cidrv4: "IPv4 дыяпазон",
cidrv6: "IPv6 дыяпазон",
base64: "радок у фармаце base64",
base64url: "радок у фармаце base64url",
json_string: "JSON радок",
e164: "нумар E.164",
jwt: "JWT",
template_literal: "увод",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `Няправільны ўвод: чакаўся ${issue.expected}, атрымана ${parsedType(issue.input)}`;
case "invalid_value":
if (issue.values.length === 1)
return `Няправільны ўвод: чакалася ${util.stringifyPrimitive(issue.values[0])}`;
return `Няправільны варыянт: чакаўся адзін з ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing) {
const maxValue = Number(issue.maximum);
const unit = getBelarusianPlural(maxValue, sizing.unit.one, sizing.unit.few, sizing.unit.many);
return `Занадта вялікі: чакалася, што ${issue.origin ?? "значэнне"} павінна ${sizing.verb} ${adj}${issue.maximum.toString()} ${unit}`;
}
return `Занадта вялікі: чакалася, што ${issue.origin ?? "значэнне"} павінна быць ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
const minValue = Number(issue.minimum);
const unit = getBelarusianPlural(minValue, sizing.unit.one, sizing.unit.few, sizing.unit.many);
return `Занадта малы: чакалася, што ${issue.origin} павінна ${sizing.verb} ${adj}${issue.minimum.toString()} ${unit}`;
}
return `Занадта малы: чакалася, што ${issue.origin} павінна быць ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with")
return `Няправільны радок: павінен пачынацца з "${_issue.prefix}"`;
if (_issue.format === "ends_with")
return `Няправільны радок: павінен заканчвацца на "${_issue.suffix}"`;
if (_issue.format === "includes")
return `Няправільны радок: павінен змяшчаць "${_issue.includes}"`;
if (_issue.format === "regex")
return `Няправільны радок: павінен адпавядаць шаблону ${_issue.pattern}`;
return `Няправільны ${Nouns[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Няправільны лік: павінен быць кратным ${issue.divisor}`;
case "unrecognized_keys":
return `Нераспазнаны ${issue.keys.length > 1 ? "ключы" : "ключ"}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `Няправільны ключ у ${issue.origin}`;
case "invalid_union":
return "Няправільны ўвод";
case "invalid_element":
return `Няправільнае значэнне ў ${issue.origin}`;
default:
return `Няправільны ўвод`;
}
};
};
export default function () {
return {
localeError: error(),
};
}
@@ -0,0 +1,10 @@
import type { TSchema, SchemaOptions } from '../schema/index.mjs';
import type { Static } from '../static/index.mjs';
import { Kind } from '../symbols/index.mjs';
export interface TNot<T extends TSchema = TSchema> extends TSchema {
[Kind]: 'Not';
static: T extends TNot<infer U> ? Static<U> : unknown;
not: T;
}
/** `[Json]` Creates a Not type */
export declare function Not<Type extends TSchema>(type: Type, options?: SchemaOptions): TNot<Type>;
@@ -0,0 +1,31 @@
import arrayEachRight from './_arrayEachRight.js';
import baseEachRight from './_baseEachRight.js';
import castFunction from './_castFunction.js';
import isArray from './isArray.js';
/**
* This method is like `_.forEach` except that it iterates over elements of
* `collection` from right to left.
*
* @static
* @memberOf _
* @since 2.0.0
* @alias eachRight
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @returns {Array|Object} Returns `collection`.
* @see _.forEach
* @example
*
* _.forEachRight([1, 2], function(value) {
* console.log(value);
* });
* // => Logs `2` then `1`.
*/
function forEachRight(collection, iteratee) {
var func = isArray(collection) ? arrayEachRight : baseEachRight;
return func(collection, castFunction(iteratee));
}
export default forEachRight;
@@ -0,0 +1,84 @@
'use strict';
var utils = require('../utils.js');
require('eslint-visitor-keys');
require('espree');
require('estraverse');
var eolLast = utils.createRule({
name: "eol-last",
package: "js",
meta: {
type: "layout",
docs: {
description: "Require or disallow newline at the end of files"
},
fixable: "whitespace",
schema: [
{
type: "string",
enum: ["always", "never", "unix", "windows"]
}
],
messages: {
missing: "Newline required at end of file but not found.",
unexpected: "Newline not allowed at end of file."
}
},
create(context) {
return {
Program: function checkBadEOF(node) {
const sourceCode = context.sourceCode;
const src = sourceCode.getText();
const lastLine = sourceCode.lines[sourceCode.lines.length - 1];
const location = {
column: lastLine.length,
line: sourceCode.lines.length
};
const LF = "\n";
const CRLF = `\r${LF}`;
const endsWithNewline = src.endsWith(LF);
if (!src.length)
return;
let mode = context.options[0] || "always";
let appendCRLF = false;
if (mode === "unix") {
mode = "always";
}
if (mode === "windows") {
mode = "always";
appendCRLF = true;
}
if (mode === "always" && !endsWithNewline) {
context.report({
node,
loc: location,
messageId: "missing",
fix(fixer) {
return fixer.insertTextAfterRange([0, src.length], appendCRLF ? CRLF : LF);
}
});
} else if (mode === "never" && endsWithNewline) {
const secondLastLine = sourceCode.lines[sourceCode.lines.length - 2];
context.report({
node,
loc: {
start: { line: sourceCode.lines.length - 1, column: secondLastLine.length },
end: { line: sourceCode.lines.length, column: 0 }
},
messageId: "unexpected",
fix(fixer) {
const finalEOLs = /(?:\r?\n)+$/u;
const match = finalEOLs.exec(sourceCode.text);
const start = match.index;
const end = sourceCode.text.length;
return fixer.replaceTextRange([start, end], "");
}
});
}
}
};
}
});
module.exports = eolLast;
@@ -0,0 +1,8 @@
import { EditorView } from '@codemirror/view';
export var defaultLightThemeOption = EditorView.theme({
'&': {
backgroundColor: '#fff'
}
}, {
dark: false
});
@@ -0,0 +1,15 @@
/** Used to match words composed of alphanumeric characters. */
var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
/**
* Splits an ASCII `string` into an array of its words.
*
* @private
* @param {string} The string to inspect.
* @returns {Array} Returns the words of `string`.
*/
function asciiWords(string) {
return string.match(reAsciiWord) || [];
}
module.exports = asciiWords;
@@ -0,0 +1,41 @@
#include <windows.h>
#include <stdio.h>
#include "TestUtil.cc"
int main() {
const HANDLE conout = openConout();
CONSOLE_SCREEN_BUFFER_INFO info = {};
BOOL ret = GetConsoleScreenBufferInfo(conout, &info);
ASSERT(ret && "GetConsoleScreenBufferInfo failed");
trace("cursor=%d,%d", info.dwCursorPosition.X, info.dwCursorPosition.Y);
printf("cursor=%d,%d\n", info.dwCursorPosition.X, info.dwCursorPosition.Y);
trace("srWindow={L=%d,T=%d,R=%d,B=%d}", info.srWindow.Left, info.srWindow.Top, info.srWindow.Right, info.srWindow.Bottom);
printf("srWindow={L=%d,T=%d,R=%d,B=%d}\n", info.srWindow.Left, info.srWindow.Top, info.srWindow.Right, info.srWindow.Bottom);
trace("dwSize=%d,%d", info.dwSize.X, info.dwSize.Y);
printf("dwSize=%d,%d\n", info.dwSize.X, info.dwSize.Y);
const HWND hwnd = GetConsoleWindow();
if (hwnd != NULL) {
RECT r = {};
if (GetWindowRect(hwnd, &r)) {
const int w = r.right - r.left;
const int h = r.bottom - r.top;
trace("hwnd: pos=(%d,%d) size=(%d,%d)", r.left, r.top, w, h);
printf("hwnd: pos=(%d,%d) size=(%d,%d)\n", r.left, r.top, w, h);
} else {
trace("GetWindowRect failed");
printf("GetWindowRect failed\n");
}
} else {
trace("GetConsoleWindow returned NULL");
printf("GetConsoleWindow returned NULL\n");
}
return 0;
}
@@ -0,0 +1,18 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./deref"), exports);
@@ -0,0 +1,12 @@
'use strict';
var tailwindMerge = require('tailwind-merge');
var q=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,g=e=>!e||typeof e!="object"||Object.keys(e).length===0,Q=(e,l)=>JSON.stringify(e)===JSON.stringify(l);function X(e,l){e.forEach(function(t){Array.isArray(t)?X(t,l):l.push(t);});}function J(e){let l=[];return X(e,l),l}var R=(...e)=>J(e).filter(Boolean),M=(e,l)=>{let t={},h=Object.keys(e),O=Object.keys(l);for(let u of h)if(O.includes(u)){let v=e[u],C=l[u];typeof v=="object"&&typeof C=="object"?t[u]=M(v,C):Array.isArray(v)||Array.isArray(C)?t[u]=R(C,v):t[u]=C+" "+v;}else t[u]=e[u];for(let u of O)h.includes(u)||(t[u]=l[u]);return t},F=e=>!e||typeof e!="string"?e:e.replace(/\s+/g," ").trim();var ce={twMerge:!0,twMergeConfig:{},responsiveVariants:!1},Z=e=>e||void 0,k=(...e)=>Z(J(e).filter(Boolean).join(" ")),U=null,E={},W=!1,j=(...e)=>l=>l.twMerge?((!U||W)&&(W=!1,U=g(E)?tailwindMerge.twMerge:tailwindMerge.extendTailwindMerge(E)),Z(U(k(e)))):k(e),Y=(e,l)=>{for(let t in l)e.hasOwnProperty(t)?e[t]=k(e[t],l[t]):e[t]=l[t];return e},ie=(e,l)=>{let{extend:t=null,slots:h={},variants:O={},compoundVariants:u=[],compoundSlots:v=[],defaultVariants:C={}}=e,d={...ce,...l},$=t!=null&&t.base?k(t.base,e==null?void 0:e.base):e==null?void 0:e.base,b=t!=null&&t.variants&&!g(t.variants)?M(O,t.variants):O,w=t!=null&&t.defaultVariants&&!g(t.defaultVariants)?{...t.defaultVariants,...C}:C;!g(d.twMergeConfig)&&!Q(d.twMergeConfig,E)&&(W=!0,E=d.twMergeConfig);let S=g(t==null?void 0:t.slots),T=g(h)?{}:{base:k(e==null?void 0:e.base,S&&(t==null?void 0:t.base)),...h},N=S?T:Y({...t==null?void 0:t.slots},g(T)?{base:e==null?void 0:e.base}:T),V=f=>{if(g(b)&&g(h)&&S)return j($,f==null?void 0:f.class,f==null?void 0:f.className)(d);if(u&&!Array.isArray(u))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof u}`);if(v&&!Array.isArray(v))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof v}`);let K=(n,a,r=[],c)=>{let s=r;if(typeof a=="string")s=s.concat(F(a).split(" ").map(i=>`${n}:${i}`));else if(Array.isArray(a))s=s.concat(a.reduce((i,o)=>i.concat(`${n}:${o}`),[]));else if(typeof a=="object"&&typeof c=="string"){for(let i in a)if(a.hasOwnProperty(i)&&i===c){let o=a[i];if(o&&typeof o=="string"){let y=F(o);s[c]?s[c]=s[c].concat(y.split(" ").map(m=>`${n}:${m}`)):s[c]=y.split(" ").map(m=>`${n}:${m}`);}else Array.isArray(o)&&o.length>0&&(s[c]=o.reduce((y,m)=>y.concat(`${n}:${m}`),[]));}}return s},p=(n,a=b,r=null,c=null)=>{var I;let s=a[n];if(!s||g(s))return null;let i=(I=c==null?void 0:c[n])!=null?I:f==null?void 0:f[n];if(i===null)return null;let o=q(i),y=Array.isArray(d.responsiveVariants)&&d.responsiveVariants.length>0||d.responsiveVariants===!0,m=w==null?void 0:w[n],A=[];if(typeof o=="object"&&y)for(let[x,L]of Object.entries(o)){let re=s[L];if(x==="initial"){m=L;continue}Array.isArray(d.responsiveVariants)&&!d.responsiveVariants.includes(x)||(A=K(x,re,A,r));}let B=s[o]||s[q(m)];return typeof A=="object"&&typeof r=="string"&&A[r]?Y(A,B):A.length>0?(A.push(B),A):B},P=()=>b?Object.keys(b).map(n=>p(n,b)):null,ee=(n,a)=>{if(!b||typeof b!="object")return null;let r=new Array;for(let c in b){let s=p(c,b,n,a),i=n==="base"&&typeof s=="string"?s:s&&s[n];i&&(r[r.length]=i);}return r},z={};for(let n in f)f[n]!==void 0&&(z[n]=f[n]);let D=(n,a)=>{var c;let r=typeof(f==null?void 0:f[n])=="object"?{[n]:(c=f[n])==null?void 0:c.initial}:{};return {...w,...z,...r,...a}},G=(n=[],a)=>{let r=[];for(let{class:c,className:s,...i}of n){let o=!0;for(let[y,m]of Object.entries(i)){let A=D(y,a);if(Array.isArray(m)){if(!m.includes(A[y])){o=!1;break}}else if(A[y]!==m){o=!1;break}}o&&(c&&r.push(c),s&&r.push(s));}return r},H=n=>{let a=G(u,n),r=G(t==null?void 0:t.compoundVariants,n);return R(r,a)},te=n=>{let a=H(n);if(!Array.isArray(a))return a;let r={};for(let c of a)if(typeof c=="string"&&(r.base=j(r.base,c)(d)),typeof c=="object")for(let[s,i]of Object.entries(c))r[s]=j(r[s],i)(d);return r},ne=n=>{if(v.length<1)return null;let a={};for(let{slots:r=[],class:c,className:s,...i}of v){if(!g(i)){let o=!0;for(let y of Object.keys(i)){let m=D(y,n)[y];if(m===void 0||(Array.isArray(i[y])?!i[y].includes(m):i[y]!==m)){o=!1;break}}if(!o)continue}for(let o of r)a[o]=a[o]||[],a[o].push([c,s]);}return a};if(!g(h)||!S){let n={};if(typeof N=="object"&&!g(N))for(let a of Object.keys(N))n[a]=r=>{var c,s;return j(N[a],ee(a,r),((c=te(r))!=null?c:[])[a],((s=ne(r))!=null?s:[])[a],r==null?void 0:r.class,r==null?void 0:r.className)(d)};return n}return j($,P(),H(),f==null?void 0:f.class,f==null?void 0:f.className)(d)},_=()=>{if(!(!b||typeof b!="object"))return Object.keys(b)};return V.variantKeys=_(),V.extend=t,V.base=$,V.slots=N,V.variants=b,V.defaultVariants=w,V.compoundSlots=v,V.compoundVariants=u,V},ue=e=>(l,t)=>ie(l,t?M(e,t):e);
exports.cn = j;
exports.cnBase = k;
exports.createTV = ue;
exports.defaultConfig = ce;
exports.tv = ie;
exports.voidEmpty = Z;
@@ -0,0 +1,64 @@
// src/index.ts
import { useRef, useState, useEffect } from "react";
import { useIsHydrated } from "@heroui/react-utils";
import { useSafeLayoutEffect } from "@heroui/use-safe-layout-effect";
function useImage(props = {}) {
const { onLoad, onError, ignoreFallback } = props;
const isHydrated = useIsHydrated();
const imageRef = useRef(isHydrated ? new Image() : null);
const [status, setStatus] = useState("pending");
useEffect(() => {
if (!imageRef.current)
return;
imageRef.current.onload = (event) => {
flush();
setStatus("loaded");
onLoad == null ? void 0 : onLoad(event);
};
imageRef.current.onerror = (error) => {
flush();
setStatus("failed");
onError == null ? void 0 : onError(error);
};
}, [imageRef.current]);
const flush = () => {
if (imageRef.current) {
imageRef.current.onload = null;
imageRef.current.onerror = null;
imageRef.current = null;
}
};
useSafeLayoutEffect(() => {
if (isHydrated) {
setStatus(setImageAndGetInitialStatus(props, imageRef));
}
}, [isHydrated]);
return ignoreFallback ? "loaded" : status;
}
function setImageAndGetInitialStatus(props, imageRef) {
const { loading, src, srcSet, crossOrigin, sizes, ignoreFallback } = props;
if (!src)
return "pending";
if (ignoreFallback)
return "loaded";
const img = new Image();
img.src = src;
if (crossOrigin)
img.crossOrigin = crossOrigin;
if (srcSet)
img.srcset = srcSet;
if (sizes)
img.sizes = sizes;
if (loading)
img.loading = loading;
imageRef.current = img;
if (img.complete && img.naturalWidth) {
return "loaded";
}
return "loading";
}
var shouldShowFallbackImage = (status, fallbackStrategy) => status !== "loaded" && fallbackStrategy === "beforeLoadOrError" || status === "failed" && fallbackStrategy === "onError";
export {
shouldShowFallbackImage,
useImage
};
@@ -0,0 +1,103 @@
'use strict';
var _hasown = require('hasown');var _hasown2 = _interopRequireDefault(_hasown);
var _object = require('object.values');var _object2 = _interopRequireDefault(_object);
var _object3 = require('object.fromentries');var _object4 = _interopRequireDefault(_object3);
var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_docsUrl);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };} /**
* @fileoverview Rule to disallow anonymous default exports.
* @author Duncan Beevers
*/var defs = { ArrayExpression: {
option: 'allowArray',
description: 'If `false`, will report default export of an array',
message: 'Assign array to a variable before exporting as module default' },
ArrowFunctionExpression: {
option: 'allowArrowFunction',
description: 'If `false`, will report default export of an arrow function',
message: 'Assign arrow function to a variable before exporting as module default' },
CallExpression: {
option: 'allowCallExpression',
description: 'If `false`, will report default export of a function call',
message: 'Assign call result to a variable before exporting as module default',
'default': true },
ClassDeclaration: {
option: 'allowAnonymousClass',
description: 'If `false`, will report default export of an anonymous class',
message: 'Unexpected default export of anonymous class',
forbid: function () {function forbid(node) {return !node.declaration.id;}return forbid;}() },
FunctionDeclaration: {
option: 'allowAnonymousFunction',
description: 'If `false`, will report default export of an anonymous function',
message: 'Unexpected default export of anonymous function',
forbid: function () {function forbid(node) {return !node.declaration.id;}return forbid;}() },
Literal: {
option: 'allowLiteral',
description: 'If `false`, will report default export of a literal',
message: 'Assign literal to a variable before exporting as module default' },
ObjectExpression: {
option: 'allowObject',
description: 'If `false`, will report default export of an object expression',
message: 'Assign object to a variable before exporting as module default' },
TemplateLiteral: {
option: 'allowLiteral',
description: 'If `false`, will report default export of a literal',
message: 'Assign literal to a variable before exporting as module default' },
NewExpression: {
option: 'allowNew',
description: 'If `false`, will report default export of a class instantiation',
message: 'Assign instance to a variable before exporting as module default' } };
var schemaProperties = (0, _object4['default'])((0, _object2['default'])(defs).map(function (def) {return [def.option, {
description: def.description,
type: 'boolean' }];}));
var defaults = (0, _object4['default'])((0, _object2['default'])(defs).map(function (def) {return [def.option, (0, _hasown2['default'])(def, 'default') ? def['default'] : false];}));
module.exports = {
meta: {
type: 'suggestion',
docs: {
category: 'Style guide',
description: 'Forbid anonymous values as default exports.',
url: (0, _docsUrl2['default'])('no-anonymous-default-export') },
schema: [
{
type: 'object',
properties: schemaProperties,
additionalProperties: false }] },
create: function () {function create(context) {
var options = Object.assign({}, defaults, context.options[0]);
return {
ExportDefaultDeclaration: function () {function ExportDefaultDeclaration(node) {
var def = defs[node.declaration.type];
// Recognized node type and allowed by configuration,
// and has no forbid check, or forbid check return value is truthy
if (def && !options[def.option] && (!def.forbid || def.forbid(node))) {
context.report({ node: node, message: def.message });
}
}return ExportDefaultDeclaration;}() };
}return create;}() };
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1hbm9ueW1vdXMtZGVmYXVsdC1leHBvcnQuanMiXSwibmFtZXMiOlsiZGVmcyIsIkFycmF5RXhwcmVzc2lvbiIsIm9wdGlvbiIsImRlc2NyaXB0aW9uIiwibWVzc2FnZSIsIkFycm93RnVuY3Rpb25FeHByZXNzaW9uIiwiQ2FsbEV4cHJlc3Npb24iLCJDbGFzc0RlY2xhcmF0aW9uIiwiZm9yYmlkIiwibm9kZSIsImRlY2xhcmF0aW9uIiwiaWQiLCJGdW5jdGlvbkRlY2xhcmF0aW9uIiwiTGl0ZXJhbCIsIk9iamVjdEV4cHJlc3Npb24iLCJUZW1wbGF0ZUxpdGVyYWwiLCJOZXdFeHByZXNzaW9uIiwic2NoZW1hUHJvcGVydGllcyIsIm1hcCIsImRlZiIsInR5cGUiLCJkZWZhdWx0cyIsIm1vZHVsZSIsImV4cG9ydHMiLCJtZXRhIiwiZG9jcyIsImNhdGVnb3J5IiwidXJsIiwic2NoZW1hIiwicHJvcGVydGllcyIsImFkZGl0aW9uYWxQcm9wZXJ0aWVzIiwiY3JlYXRlIiwiY29udGV4dCIsIm9wdGlvbnMiLCJFeHBvcnREZWZhdWx0RGVjbGFyYXRpb24iLCJyZXBvcnQiXSwibWFwcGluZ3MiOiI7Ozs7O0FBS0EsZ0M7QUFDQSx1QztBQUNBLDZDOztBQUVBLHFDLGlKQVRBOzs7eUxBV0EsSUFBTUEsT0FBTyxFQUNYQyxpQkFBaUI7QUFDZkMsWUFBUSxZQURPO0FBRWZDLGlCQUFhLG9EQUZFO0FBR2ZDLGFBQVMsK0RBSE0sRUFETjs7QUFNWEMsMkJBQXlCO0FBQ3ZCSCxZQUFRLG9CQURlO0FBRXZCQyxpQkFBYSw2REFGVTtBQUd2QkMsYUFBUyx3RUFIYyxFQU5kOztBQVdYRSxrQkFBZ0I7QUFDZEosWUFBUSxxQkFETTtBQUVkQyxpQkFBYSwyREFGQztBQUdkQyxhQUFTLHFFQUhLO0FBSWQsZUFBUyxJQUpLLEVBWEw7O0FBaUJYRyxvQkFBa0I7QUFDaEJMLFlBQVEscUJBRFE7QUFFaEJDLGlCQUFhLDhEQUZHO0FBR2hCQyxhQUFTLDhDQUhPO0FBSWhCSSx5QkFBUSxnQkFBQ0MsSUFBRCxVQUFVLENBQUNBLEtBQUtDLFdBQUwsQ0FBaUJDLEVBQTVCLEVBQVIsaUJBSmdCLEVBakJQOztBQXVCWEMsdUJBQXFCO0FBQ25CVixZQUFRLHdCQURXO0FBRW5CQyxpQkFBYSxpRUFGTTtBQUduQkMsYUFBUyxpREFIVTtBQUluQkkseUJBQVEsZ0JBQUNDLElBQUQsVUFBVSxDQUFDQSxLQUFLQyxXQUFMLENBQWlCQyxFQUE1QixFQUFSLGlCQUptQixFQXZCVjs7QUE2QlhFLFdBQVM7QUFDUFgsWUFBUSxjQUREO0FBRVBDLGlCQUFhLHFEQUZOO0FBR1BDLGFBQVMsaUVBSEYsRUE3QkU7O0FBa0NYVSxvQkFBa0I7QUFDaEJaLFlBQVEsYUFEUTtBQUVoQkMsaUJBQWEsZ0VBRkc7QUFHaEJDLGFBQVMsZ0VBSE8sRUFsQ1A7O0FBdUNYVyxtQkFBaUI7QUFDZmIsWUFBUSxjQURPO0FBRWZDLGlCQUFhLHFEQUZFO0FBR2ZDLGFBQVMsaUVBSE0sRUF2Q047O0FBNENYWSxpQkFBZTtBQUNiZCxZQUFRLFVBREs7QUFFYkMsaUJBQWEsaUVBRkE7QUFHYkMsYUFBUyxrRUFISSxFQTVDSixFQUFiOzs7O0FBbURBLElBQU1hLG1CQUFtQix5QkFBWSx5QkFBT2pCLElBQVAsRUFBYWtCLEdBQWIsQ0FBaUIsVUFBQ0MsR0FBRCxVQUFTLENBQUNBLElBQUlqQixNQUFMLEVBQWE7QUFDMUVDLGlCQUFhZ0IsSUFBSWhCLFdBRHlEO0FBRTFFaUIsVUFBTSxTQUZvRSxFQUFiLENBQVQsRUFBakIsQ0FBWixDQUF6Qjs7O0FBS0EsSUFBTUMsV0FBVyx5QkFBWSx5QkFBT3JCLElBQVAsRUFBYWtCLEdBQWIsQ0FBaUIsVUFBQ0MsR0FBRCxVQUFTLENBQUNBLElBQUlqQixNQUFMLEVBQWEseUJBQU9pQixHQUFQLEVBQVksU0FBWixJQUF5QkEsY0FBekIsR0FBdUMsS0FBcEQsQ0FBVCxFQUFqQixDQUFaLENBQWpCOztBQUVBRyxPQUFPQyxPQUFQLEdBQWlCO0FBQ2ZDLFFBQU07QUFDSkosVUFBTSxZQURGO0FBRUpLLFVBQU07QUFDSkMsZ0JBQVUsYUFETjtBQUVKdkIsbUJBQWEsNkNBRlQ7QUFHSndCLFdBQUssMEJBQVEsNkJBQVIsQ0FIRCxFQUZGOzs7QUFRSkMsWUFBUTtBQUNOO0FBQ0VSLFlBQU0sUUFEUjtBQUVFUyxrQkFBWVosZ0JBRmQ7QUFHRWEsNEJBQXNCLEtBSHhCLEVBRE0sQ0FSSixFQURTOzs7OztBQWtCZkMsUUFsQmUsK0JBa0JSQyxPQWxCUSxFQWtCQztBQUNkLFVBQU1DLDRCQUFlWixRQUFmLEVBQTRCVyxRQUFRQyxPQUFSLENBQWdCLENBQWhCLENBQTVCLENBQU47O0FBRUEsYUFBTztBQUNMQyxnQ0FESyxpREFDb0J6QixJQURwQixFQUMwQjtBQUM3QixnQkFBTVUsTUFBTW5CLEtBQUtTLEtBQUtDLFdBQUwsQ0FBaUJVLElBQXRCLENBQVo7O0FBRUE7QUFDQTtBQUNBLGdCQUFJRCxPQUFPLENBQUNjLFFBQVFkLElBQUlqQixNQUFaLENBQVIsS0FBZ0MsQ0FBQ2lCLElBQUlYLE1BQUwsSUFBZVcsSUFBSVgsTUFBSixDQUFXQyxJQUFYLENBQS9DLENBQUosRUFBc0U7QUFDcEV1QixzQkFBUUcsTUFBUixDQUFlLEVBQUUxQixVQUFGLEVBQVFMLFNBQVNlLElBQUlmLE9BQXJCLEVBQWY7QUFDRDtBQUNGLFdBVEkscUNBQVA7O0FBV0QsS0FoQ2MsbUJBQWpCIiwiZmlsZSI6Im5vLWFub255bW91cy1kZWZhdWx0LWV4cG9ydC5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQGZpbGVvdmVydmlldyBSdWxlIHRvIGRpc2FsbG93IGFub255bW91cyBkZWZhdWx0IGV4cG9ydHMuXG4gKiBAYXV0aG9yIER1bmNhbiBCZWV2ZXJzXG4gKi9cblxuaW1wb3J0IGhhc093biBmcm9tICdoYXNvd24nO1xuaW1wb3J0IHZhbHVlcyBmcm9tICdvYmplY3QudmFsdWVzJztcbmltcG9ydCBmcm9tRW50cmllcyBmcm9tICdvYmplY3QuZnJvbWVudHJpZXMnO1xuXG5pbXBvcnQgZG9jc1VybCBmcm9tICcuLi9kb2NzVXJsJztcblxuY29uc3QgZGVmcyA9IHtcbiAgQXJyYXlFeHByZXNzaW9uOiB7XG4gICAgb3B0aW9uOiAnYWxsb3dBcnJheScsXG4gICAgZGVzY3JpcHRpb246ICdJZiBgZmFsc2VgLCB3aWxsIHJlcG9ydCBkZWZhdWx0IGV4cG9ydCBvZiBhbiBhcnJheScsXG4gICAgbWVzc2FnZTogJ0Fzc2lnbiBhcnJheSB0byBhIHZhcmlhYmxlIGJlZm9yZSBleHBvcnRpbmcgYXMgbW9kdWxlIGRlZmF1bHQnLFxuICB9LFxuICBBcnJvd0Z1bmN0aW9uRXhwcmVzc2lvbjoge1xuICAgIG9wdGlvbjogJ2FsbG93QXJyb3dGdW5jdGlvbicsXG4gICAgZGVzY3JpcHRpb246ICdJZiBgZmFsc2VgLCB3aWxsIHJlcG9ydCBkZWZhdWx0IGV4cG9ydCBvZiBhbiBhcnJvdyBmdW5jdGlvbicsXG4gICAgbWVzc2FnZTogJ0Fzc2lnbiBhcnJvdyBmdW5jdGlvbiB0byBhIHZhcmlhYmxlIGJlZm9yZSBleHBvcnRpbmcgYXMgbW9kdWxlIGRlZmF1bHQnLFxuICB9LFxuICBDYWxsRXhwcmVzc2lvbjoge1xuICAgIG9wdGlvbjogJ2FsbG93Q2FsbEV4cHJlc3Npb24nLFxuICAgIGRlc2NyaXB0aW9uOiAnSWYgYGZhbHNlYCwgd2lsbCByZXBvcnQgZGVmYXVsdCBleHBvcnQgb2YgYSBmdW5jdGlvbiBjYWxsJyxcbiAgICBtZXNzYWdlOiAnQXNzaWduIGNhbGwgcmVzdWx0IHRvIGEgdmFyaWFibGUgYmVmb3JlIGV4cG9ydGluZyBhcyBtb2R1bGUgZGVmYXVsdCcsXG4gICAgZGVmYXVsdDogdHJ1ZSxcbiAgfSxcbiAgQ2xhc3NEZWNsYXJhdGlvbjoge1xuICAgIG9wdGlvbjogJ2FsbG93QW5vbnltb3VzQ2xhc3MnLFxuICAgIGRlc2NyaXB0aW9uOiAnSWYgYGZhbHNlYCwgd2lsbCByZXBvcnQgZGVmYXVsdCBleHBvcnQgb2YgYW4gYW5vbnltb3VzIGNsYXNzJyxcbiAgICBtZXNzYWdlOiAnVW5leHBlY3RlZCBkZWZhdWx0IGV4cG9ydCBvZiBhbm9ueW1vdXMgY2xhc3MnLFxuICAgIGZvcmJpZDogKG5vZGUpID0+ICFub2RlLmRlY2xhcmF0aW9uLmlkLFxuICB9LFxuICBGdW5jdGlvbkRLine truncated
@@ -0,0 +1,23 @@
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $TypeError = require('es-errors/type');
var $SyntaxError = require('es-errors/syntax');
// https://262.ecma-international.org/14.0/#sec-stringtobigint
module.exports = function StringToBigInt(argument) {
if (typeof argument !== 'string') {
throw new $TypeError('`argument` must be a string');
}
if (!$BigInt) {
throw new $SyntaxError('BigInts are not supported in this environment');
}
try {
return $BigInt(argument);
} catch (e) {
return void undefined;
}
};
@@ -0,0 +1,8 @@
export { absoluteFullClasses, baseStyles, collapseAdjacentVariantBorders, dataFocusVisibleClasses, focusVisibleClasses, groupDataFocusVisibleClasses, hiddenInputClasses, ringClasses, translateCenterClasses } from './classes.js';
export { SlotsToClasses } from './types.js';
export { colorVariants } from './variants.js';
export { COMMON_UNITS, twMergeConfig } from './tw-merge-config.js';
export { mergeClasses } from './merge-classes.js';
export { cn } from './cn.js';
import 'tailwind-variants';
import 'clsx';
@@ -0,0 +1,28 @@
var toString = require('./toString');
/**
* Converts `string`, as a whole, to lower case just like
* [String#toLowerCase](https://mdn.io/toLowerCase).
*
* @static
* @memberOf _
* @since 4.0.0
* @category String
* @param {string} [string=''] The string to convert.
* @returns {string} Returns the lower cased string.
* @example
*
* _.toLower('--Foo-Bar--');
* // => '--foo-bar--'
*
* _.toLower('fooBar');
* // => 'foobar'
*
* _.toLower('__FOO_BAR__');
* // => '__foo_bar__'
*/
function toLower(value) {
return toString(value).toLowerCase();
}
module.exports = toLower;
@@ -0,0 +1 @@
{"mappings":";AAAA,4BAAiB;IAAG,WAAW,CAAC,mBAAO,CAAC;AACxC","sources":["packages/@react-aria/overlays/intl/lv-LV.json"],"sourcesContent":["{\n \"dismiss\": \"Nerādīt\"\n}\n"],"names":[],"version":3,"file":"lv-LV.module.js.map"}
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-aria/overlays/src/index.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nexport {useOverlayPosition} from './useOverlayPosition';\nexport {useOverlay} from './useOverlay';\nexport {useOverlayTrigger} from './useOverlayTrigger';\nexport {usePreventScroll} from './usePreventScroll';\nexport {ModalProvider, useModalProvider, OverlayProvider, OverlayContainer, useModal} from './useModal';\nexport {DismissButton} from './DismissButton';\nexport {ariaHideOutside} from './ariaHideOutside';\nexport {usePopover} from './usePopover';\nexport {useModalOverlay} from './useModalOverlay';\nexport {Overlay, useOverlayFocusContain} from './Overlay';\nexport {UNSAFE_PortalProvider, useUNSAFE_PortalContext} from './PortalProvider';\n\nexport type {AriaPositionProps, PositionAria} from './useOverlayPosition';\nexport type {AriaOverlayProps, OverlayAria} from './useOverlay';\nexport type {OverlayTriggerAria, OverlayTriggerProps} from './useOverlayTrigger';\nexport type {AriaModalOptions, ModalAria, ModalProviderAria, ModalProviderProps, OverlayContainerProps} from './useModal';\nexport type {DismissButtonProps} from './DismissButton';\nexport type {AriaPopoverProps, PopoverAria} from './usePopover';\nexport type {AriaModalOverlayProps, ModalOverlayAria} from './useModalOverlay';\nexport type {OverlayProps} from './Overlay';\nexport type {Placement, PlacementAxis, PositionProps} from '@react-types/overlays';\nexport type {PortalProviderProps, PortalProviderContextValue} from './PortalProvider';\n"],"names":[],"version":3,"file":"module.js.map"}
@@ -0,0 +1,173 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.config = exports.configs = exports.plugin = exports.parser = void 0;
const eslint_plugin_1 = __importDefault(require("@typescript-eslint/eslint-plugin"));
const raw_plugin_1 = __importDefault(require("@typescript-eslint/eslint-plugin/use-at-your-own-risk/raw-plugin"));
const typescript_estree_1 = require("@typescript-eslint/typescript-estree");
const config_helper_1 = require("./config-helper");
const getTSConfigRootDirFromStack_1 = require("./getTSConfigRootDirFromStack");
exports.parser = raw_plugin_1.default.parser;
/*
we could build a plugin object here without the `configs` key - but if we do
that then we create a situation in which
```
require('typescript-eslint').plugin !== require('@typescript-eslint/eslint-plugin')
```
This is bad because it means that 3rd party configs would be required to use
`typescript-eslint` or else they would break a user's config if the user either
used `tseslint.configs.recommended` et al or
```
{
plugins: {
'@typescript-eslint': tseslint.plugin,
},
}
```
This might be something we could consider okay (eg 3rd party flat configs must
use our new package); however legacy configs consumed via `@eslint/eslintrc`
would never be able to satisfy this constraint and thus users would be blocked
from using them.
*/
exports.plugin = eslint_plugin_1.default;
exports.configs = createConfigsGetters({
/**
* Enables each the rules provided as a part of typescript-eslint. Note that many rules are not applicable in all codebases, or are meant to be configured.
* @see {@link https://typescript-eslint.io/users/configs#all}
*/
all: raw_plugin_1.default.flatConfigs['flat/all'],
/**
* A minimal ruleset that sets only the required parser and plugin options needed to run typescript-eslint.
* We don't recommend using this directly; instead, extend from an earlier recommended rule.
* @see {@link https://typescript-eslint.io/users/configs#base}
*/
base: raw_plugin_1.default.flatConfigs['flat/base'],
/**
* A utility ruleset that will disable type-aware linting and all type-aware rules available in our project.
* @see {@link https://typescript-eslint.io/users/configs#disable-type-checked}
*/
disableTypeChecked: raw_plugin_1.default.flatConfigs['flat/disable-type-checked'],
/**
* This is a compatibility ruleset that:
* - disables rules from eslint:recommended which are already handled by TypeScript.
* - enables rules that make sense due to TS's typechecking / transpilation.
* @see {@link https://typescript-eslint.io/users/configs/#eslint-recommended}
*/
eslintRecommended: raw_plugin_1.default.flatConfigs['flat/eslint-recommended'],
/**
* Recommended rules for code correctness that you can drop in without additional configuration.
* @see {@link https://typescript-eslint.io/users/configs#recommended}
*/
recommended: raw_plugin_1.default.flatConfigs['flat/recommended'],
/**
* Contains all of `recommended` along with additional recommended rules that require type information.
* @see {@link https://typescript-eslint.io/users/configs#recommended-type-checked}
*/
recommendedTypeChecked: raw_plugin_1.default.flatConfigs['flat/recommended-type-checked'],
/**
* A version of `recommended` that only contains type-checked rules and disables of any corresponding core ESLint rules.
* @see {@link https://typescript-eslint.io/users/configs#recommended-type-checked-only}
*/
recommendedTypeCheckedOnly: raw_plugin_1.default.flatConfigs['flat/recommended-type-checked-only'],
/**
* Contains all of `recommended`, as well as additional strict rules that can also catch bugs.
* @see {@link https://typescript-eslint.io/users/configs#strict}
*/
strict: raw_plugin_1.default.flatConfigs['flat/strict'],
/**
* Contains all of `recommended`, `recommended-type-checked`, and `strict`, along with additional strict rules that require type information.
* @see {@link https://typescript-eslint.io/users/configs#strict-type-checked}
*/
strictTypeChecked: raw_plugin_1.default.flatConfigs['flat/strict-type-checked'],
/**
* A version of `strict` that only contains type-checked rules and disables of any corresponding core ESLint rules.
* @see {@link https://typescript-eslint.io/users/configs#strict-type-checked-only}
*/
strictTypeCheckedOnly: raw_plugin_1.default.flatConfigs['flat/strict-type-checked-only'],
/**
* Rules considered to be best practice for modern TypeScript codebases, but that do not impact program logic.
* @see {@link https://typescript-eslint.io/users/configs#stylistic}
*/
stylistic: raw_plugin_1.default.flatConfigs['flat/stylistic'],
/**
* Contains all of `stylistic`, along with additional stylistic rules that require type information.
* @see {@link https://typescript-eslint.io/users/configs#stylistic-type-checked}
*/
stylisticTypeChecked: raw_plugin_1.default.flatConfigs['flat/stylistic-type-checked'],
/**
* A version of `stylistic` that only contains type-checked rules and disables of any corresponding core ESLint rules.
* @see {@link https://typescript-eslint.io/users/configs#stylistic-type-checked-only}
*/
stylisticTypeCheckedOnly: raw_plugin_1.default.flatConfigs['flat/stylistic-type-checked-only'],
});
function createConfigsGetters(values) {
const configs = {};
Object.defineProperties(configs, Object.fromEntries(Object.entries(values).map(([key, value]) => [
key,
{
enumerable: true,
get: () => {
const candidateRootDir = (0, getTSConfigRootDirFromStack_1.getTSConfigRootDirFromStack)();
if (candidateRootDir) {
(0, typescript_estree_1.addCandidateTSConfigRootDir)(candidateRootDir);
}
return value;
},
},
])));
return configs;
}
/*
we do both a default and named exports to allow people to use this package from
both CJS and ESM in very natural ways.
EG it means that all of the following are valid:
```ts
import tseslint from 'typescript-eslint';
export default tseslint.config(
...tseslint.configs.recommended,
);
```
```ts
import { config, parser, plugin } from 'typescript-eslint';
export default config(
{
languageOptions: { parser }
plugins: { ts: plugin },
}
);
```
```ts
const tseslint = require('typescript-eslint');
module.exports = tseslint.config(
...tseslint.configs.recommended,
);
```
```ts
const { config, parser, plugin } = require('typescript-eslint');
module.exports = config(
{
languageOptions: { parser }
plugins: { ts: plugin },
}
);
```
*/
exports.default = {
config: config_helper_1.config,
configs: exports.configs,
parser: exports.parser,
plugin: exports.plugin,
};
var config_helper_2 = require("./config-helper");
// eslint-disable-next-line @typescript-eslint/no-deprecated
Object.defineProperty(exports, "config", { enumerable: true, get: function () { return config_helper_2.config; } });
@@ -0,0 +1,460 @@
// @ts-check
const path = require('path');
const fs = require('fs');
const os = require('os');
const url = require('url');
const fsReadFileAsync = fs.promises.readFile;
/** @type {(name: string, sync: boolean) => string[]} */
function getDefaultSearchPlaces(name, sync) {
return [
'package.json',
`.${name}rc.json`,
`.${name}rc.js`,
`.${name}rc.cjs`,
...(sync ? [] : [`.${name}rc.mjs`]),
`.config/${name}rc`,
`.config/${name}rc.json`,
`.config/${name}rc.js`,
`.config/${name}rc.cjs`,
...(sync ? [] : [`.config/${name}rc.mjs`]),
`${name}.config.js`,
`${name}.config.cjs`,
...(sync ? [] : [`${name}.config.mjs`]),
];
}
/**
* @type {(p: string) => string}
*
* see #17
* On *nix, if cwd is not under homedir,
* the last path will be '', ('/build' -> '')
* but it should be '/' actually.
* And on Windows, this will never happen. ('C:\build' -> 'C:')
*/
function parentDir(p) {
return path.dirname(p) || path.sep;
}
/** @type {import('./index').LoaderSync} */
const jsonLoader = (_, content) => JSON.parse(content);
// Use plain require in webpack context for dynamic import
const requireFunc =
typeof __webpack_require__ === 'function' ? __non_webpack_require__ : require;
/** @type {import('./index').LoadersSync} */
const defaultLoadersSync = Object.freeze({
'.js': requireFunc,
'.json': requireFunc,
'.cjs': requireFunc,
noExt: jsonLoader,
});
module.exports.defaultLoadersSync = defaultLoadersSync;
/** @type {import('./index').Loader} */
const dynamicImport = async id => {
try {
const fileUrl = url.pathToFileURL(id).href;
const mod = await import(/* webpackIgnore: true */ fileUrl);
return mod.default;
} catch (e) {
try {
return requireFunc(id);
} catch (/** @type {any} */ requireE) {
if (
requireE.code === 'ERR_REQUIRE_ESM' ||
(requireE instanceof SyntaxError &&
requireE
.toString()
.includes('Cannot use import statement outside a module'))
) {
throw e;
}
throw requireE;
}
}
};
/** @type {import('./index').Loaders} */
const defaultLoaders = Object.freeze({
'.js': dynamicImport,
'.mjs': dynamicImport,
'.cjs': dynamicImport,
'.json': jsonLoader,
noExt: jsonLoader,
});
module.exports.defaultLoaders = defaultLoaders;
/**
* @param {string} name
* @param {import('./index').Options | import('./index').OptionsSync} options
* @param {boolean} sync
* @returns {Required<import('./index').Options | import('./index').OptionsSync>}
*/
function getOptions(name, options, sync) {
/** @type {Required<import('./index').Options>} */
const conf = {
stopDir: os.homedir(),
searchPlaces: getDefaultSearchPlaces(name, sync),
ignoreEmptySearchPlaces: true,
cache: true,
transform: x => x,
packageProp: [name],
...options,
loaders: {
...(sync ? defaultLoadersSync : defaultLoaders),
...options.loaders,
},
};
conf.searchPlaces.forEach(place => {
const key = path.extname(place) || 'noExt';
const loader = conf.loaders[key];
if (!loader) {
throw new Error(`Missing loader for extension "${place}"`);
}
if (typeof loader !== 'function') {
throw new Error(
`Loader for extension "${place}" is not a function: Received ${typeof loader}.`,
);
}
});
return conf;
}
/** @type {(props: string | string[], obj: Record<string, any>) => unknown} */
function getPackageProp(props, obj) {
if (typeof props === 'string' && props in obj) return obj[props];
return (
(Array.isArray(props) ? props : props.split('.')).reduce(
(acc, prop) => (acc === undefined ? acc : acc[prop]),
obj,
) || null
);
}
/** @param {string} filepath */
function validateFilePath(filepath) {
if (!filepath) throw new Error('load must pass a non-empty string');
}
/** @type {(loader: import('./index').Loader, ext: string) => void} */
function validateLoader(loader, ext) {
if (!loader) throw new Error(`No loader specified for extension "${ext}"`);
if (typeof loader !== 'function') throw new Error('loader is not a function');
}
/** @type {(enableCache: boolean) => <T>(c: Map<string, T>, filepath: string, res: T) => T} */
const makeEmplace = enableCache => (c, filepath, res) => {
if (enableCache) c.set(filepath, res);
return res;
};
/** @type {import('./index').lilconfig} */
module.exports.lilconfig = function lilconfig(name, options) {
const {
ignoreEmptySearchPlaces,
loaders,
packageProp,
searchPlaces,
stopDir,
transform,
cache,
} = getOptions(name, options ?? {}, false);
const searchCache = new Map();
const loadCache = new Map();
const emplace = makeEmplace(cache);
return {
async search(searchFrom = process.cwd()) {
/** @type {import('./index').LilconfigResult} */
const result = {
config: null,
filepath: '',
};
/** @type {Set<string>} */
const visited = new Set();
let dir = searchFrom;
dirLoop: while (true) {
if (cache) {
const r = searchCache.get(dir);
if (r !== undefined) {
for (const p of visited) searchCache.set(p, r);
return r;
}
visited.add(dir);
}
for (const searchPlace of searchPlaces) {
const filepath = path.join(dir, searchPlace);
try {
await fs.promises.access(filepath);
} catch {
continue;
}
const content = String(await fsReadFileAsync(filepath));
const loaderKey = path.extname(searchPlace) || 'noExt';
const loader = loaders[loaderKey];
// handle package.json
if (searchPlace === 'package.json') {
const pkg = await loader(filepath, content);
const maybeConfig = getPackageProp(packageProp, pkg);
if (maybeConfig != null) {
result.config = maybeConfig;
result.filepath = filepath;
break dirLoop;
}
continue;
}
// handle other type of configs
const isEmpty = content.trim() === '';
if (isEmpty && ignoreEmptySearchPlaces) continue;
if (isEmpty) {
result.isEmpty = true;
result.config = undefined;
} else {
validateLoader(loader, loaderKey);
result.config = await loader(filepath, content);
}
result.filepath = filepath;
break dirLoop;
}
if (dir === stopDir || dir === parentDir(dir)) break dirLoop;
dir = parentDir(dir);
}
const transformed =
// not found
result.filepath === '' && result.config === null
? transform(null)
: transform(result);
if (cache) {
for (const p of visited) searchCache.set(p, transformed);
}
return transformed;
},
async load(filepath) {
validateFilePath(filepath);
const absPath = path.resolve(process.cwd(), filepath);
if (cache && loadCache.has(absPath)) {
return loadCache.get(absPath);
}
const {base, ext} = path.parse(absPath);
const loaderKey = ext || 'noExt';
const loader = loaders[loaderKey];
validateLoader(loader, loaderKey);
const content = String(await fsReadFileAsync(absPath));
if (base === 'package.json') {
const pkg = await loader(absPath, content);
return emplace(
loadCache,
absPath,
transform({
config: getPackageProp(packageProp, pkg),
filepath: absPath,
}),
);
}
/** @type {import('./index').LilconfigResult} */
const result = {
config: null,
filepath: absPath,
};
// handle other type of configs
const isEmpty = content.trim() === '';
if (isEmpty && ignoreEmptySearchPlaces)
return emplace(
loadCache,
absPath,
transform({
config: undefined,
filepath: absPath,
isEmpty: true,
}),
);
// cosmiconfig returns undefined for empty files
result.config = isEmpty ? undefined : await loader(absPath, content);
return emplace(
loadCache,
absPath,
transform(isEmpty ? {...result, isEmpty, config: undefined} : result),
);
},
clearLoadCache() {
if (cache) loadCache.clear();
},
clearSearchCache() {
if (cache) searchCache.clear();
},
clearCaches() {
if (cache) {
loadCache.clear();
searchCache.clear();
}
},
};
};
/** @type {import('./index').lilconfigSync} */
module.exports.lilconfigSync = function lilconfigSync(name, options) {
const {
ignoreEmptySearchPlaces,
loaders,
packageProp,
searchPlaces,
stopDir,
transform,
cache,
} = getOptions(name, options ?? {}, true);
const searchCache = new Map();
const loadCache = new Map();
const emplace = makeEmplace(cache);
return {
search(searchFrom = process.cwd()) {
/** @type {import('./index').LilconfigResult} */
const result = {
config: null,
filepath: '',
};
/** @type {Set<string>} */
const visited = new Set();
let dir = searchFrom;
dirLoop: while (true) {
if (cache) {
const r = searchCache.get(dir);
if (r !== undefined) {
for (const p of visited) searchCache.set(p, r);
return r;
}
visited.add(dir);
}
for (const searchPlace of searchPlaces) {
const filepath = path.join(dir, searchPlace);
try {
fs.accessSync(filepath);
} catch {
continue;
}
const loaderKey = path.extname(searchPlace) || 'noExt';
const loader = loaders[loaderKey];
const content = String(fs.readFileSync(filepath));
// handle package.json
if (searchPlace === 'package.json') {
const pkg = loader(filepath, content);
const maybeConfig = getPackageProp(packageProp, pkg);
if (maybeConfig != null) {
result.config = maybeConfig;
result.filepath = filepath;
break dirLoop;
}
continue;
}
// handle other type of configs
const isEmpty = content.trim() === '';
if (isEmpty && ignoreEmptySearchPlaces) continue;
if (isEmpty) {
result.isEmpty = true;
result.config = undefined;
} else {
validateLoader(loader, loaderKey);
result.config = loader(filepath, content);
}
result.filepath = filepath;
break dirLoop;
}
if (dir === stopDir || dir === parentDir(dir)) break dirLoop;
dir = parentDir(dir);
}
const transformed =
// not found
result.filepath === '' && result.config === null
? transform(null)
: transform(result);
if (cache) {
for (const p of visited) searchCache.set(p, transformed);
}
return transformed;
},
load(filepath) {
validateFilePath(filepath);
const absPath = path.resolve(process.cwd(), filepath);
if (cache && loadCache.has(absPath)) {
return loadCache.get(absPath);
}
const {base, ext} = path.parse(absPath);
const loaderKey = ext || 'noExt';
const loader = loaders[loaderKey];
validateLoader(loader, loaderKey);
const content = String(fs.readFileSync(absPath));
if (base === 'package.json') {
const pkg = loader(absPath, content);
return transform({
config: getPackageProp(packageProp, pkg),
filepath: absPath,
});
}
const result = {
config: null,
filepath: absPath,
};
// handle other type of configs
const isEmpty = content.trim() === '';
if (isEmpty && ignoreEmptySearchPlaces)
return emplace(
loadCache,
absPath,
transform({
filepath: absPath,
config: undefined,
isEmpty: true,
}),
);
// cosmiconfig returns undefined for empty files
result.config = isEmpty ? undefined : loader(absPath, content);
return emplace(
loadCache,
absPath,
transform(isEmpty ? {...result, isEmpty, config: undefined} : result),
);
},
clearLoadCache() {
if (cache) loadCache.clear();
},
clearSearchCache() {
if (cache) searchCache.clear();
},
clearCaches() {
if (cache) {
loadCache.clear();
searchCache.clear();
}
},
};
};
@@ -0,0 +1,43 @@
'use strict';
const {promisify} = require('util');
const fs = require('fs');
async function isType(fsStatType, statsMethodName, filePath) {
if (typeof filePath !== 'string') {
throw new TypeError(`Expected a string, got ${typeof filePath}`);
}
try {
const stats = await promisify(fs[fsStatType])(filePath);
return stats[statsMethodName]();
} catch (error) {
if (error.code === 'ENOENT') {
return false;
}
throw error;
}
}
function isTypeSync(fsStatType, statsMethodName, filePath) {
if (typeof filePath !== 'string') {
throw new TypeError(`Expected a string, got ${typeof filePath}`);
}
try {
return fs[fsStatType](filePath)[statsMethodName]();
} catch (error) {
if (error.code === 'ENOENT') {
return false;
}
throw error;
}
}
exports.isFile = isType.bind(null, 'stat', 'isFile');
exports.isDirectory = isType.bind(null, 'stat', 'isDirectory');
exports.isSymlink = isType.bind(null, 'lstat', 'isSymbolicLink');
exports.isFileSync = isTypeSync.bind(null, 'statSync', 'isFile');
exports.isDirectorySync = isTypeSync.bind(null, 'statSync', 'isDirectory');
exports.isSymlinkSync = isTypeSync.bind(null, 'lstatSync', 'isSymbolicLink');
@@ -0,0 +1,24 @@
# @heroui/select
A select displays a collapsible list of options and allows a user to select one of them.
Please refer to the [documentation](https://heroui.com/docs/components/select) for more information.
## Installation
```sh
yarn add @heroui/select
# or
npm i @heroui/select
```
## 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,6 @@
import { Kind } from '../symbols/index.mjs';
import { CreateType } from '../create/index.mjs';
/** `[Json]` Creates a Boolean type */
export function Boolean(options) {
return CreateType({ [Kind]: 'Boolean', type: 'boolean' }, options);
}
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more