docs: 仓库链接指向本镜像仓库
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run

This commit is contained in:
TanTan committed 2026-11-13 09:27:07 +08:00
1 parent fa9c73363d
commit 2a69b23b47
18210 files changed
+5101211 -16

No files matched your search

@@ -0,0 +1,217 @@
class Traces {
/**
* otel stands for OpenTelemetry
*/
#otel = null;
#sdk = null;
#init = null;
#noopSpan = createNoopSpan();
#noopContext = createNoopContext();
#initStartTime = performance.now();
#initEndTime = 0;
#initRecorded = false;
constructor(options) {
if (options.enabled) {
const apiInit = import('@opentelemetry/api').then((api) => {
this.#otel = {
tracer: api.trace.getTracer(options.tracerName || "vitest"),
context: api.context,
propagation: api.propagation,
trace: api.trace,
SpanKind: api.SpanKind,
SpanStatusCode: api.SpanStatusCode
};
}).catch(() => {
throw new Error(`"@opentelemetry/api" is not installed locally. Make sure you have setup OpenTelemetry instrumentation: https://vitest.dev/guide/open-telemetry`);
});
const sdkInit = (options.sdkPath ? import(
/* @vite-ignore */
options.sdkPath
) : Promise.resolve()).catch((cause) => {
throw new Error(`Failed to import custom OpenTelemetry SDK script (${options.sdkPath}): ${cause.message}`);
});
this.#init = Promise.all([sdkInit, apiInit]).then(([sdk]) => {
if (sdk != null) {
if (sdk.default != null && typeof sdk.default === "object" && typeof sdk.default.shutdown === "function") this.#sdk = sdk.default;
else if (options.watchMode !== true && process.env.VITEST_MODE !== "watch") console.warn(`OpenTelemetry instrumentation module (${options.sdkPath}) does not have a default export with a "shutdown" method. Vitest won't be able to ensure that all traces are processed in time. Try running Vitest in watch mode instead.`);
}
}).finally(() => {
this.#initEndTime = performance.now();
this.#init = null;
});
}
}
isEnabled() {
return !!this.#otel;
}
/**
* @internal
*/
async waitInit() {
if (this.#init) await this.#init;
return this;
}
/**
* @internal
*/
recordInitSpan(context) {
if (this.#initRecorded) return;
this.#initRecorded = true;
this.startSpan("vitest.runtime.traces", { startTime: this.#initStartTime }, context).end(this.#initEndTime);
}
/**
* @internal
*/
startContextSpan(name, currentContext) {
if (!this.#otel) return {
span: this.#noopSpan,
context: this.#noopContext
};
const activeContext = currentContext || this.#otel.context.active();
const span = this.#otel.tracer.startSpan(name, {}, activeContext);
return {
span,
context: this.#otel.trace.setSpan(activeContext, span)
};
}
/**
* @internal
*/
getContextFromCarrier(carrier) {
if (!this.#otel) return this.#noopContext;
const activeContext = this.#otel.context.active();
if (!carrier) return activeContext;
return this.#otel.propagation.extract(activeContext, carrier);
}
/**
* @internal
*/
getContextFromEnv(env) {
if (!this.#otel) return this.#noopContext;
// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/context/env-carriers.md
// some tools sets only `TRACEPARENT` but not `TRACESTATE`
const carrier = {};
if (typeof env.TRACEPARENT === "string") carrier.traceparent = env.TRACEPARENT;
if (typeof env.TRACESTATE === "string") carrier.tracestate = env.TRACESTATE;
return this.getContextFromCarrier(carrier);
}
/**
* @internal
*/
getContextCarrier(context) {
if (!this.#otel) return;
const carrier = {};
this.#otel.propagation.inject(context || this.#otel.context.active(), carrier);
return carrier;
}
#callActiveSpan(span, callback) {
const otel = this.#otel;
let result;
try {
result = callback(span);
if (result instanceof Promise) return result.catch((error) => {
span.recordException({
name: error.name,
message: error.message,
stack: error.stack
});
span.setStatus({ code: otel.SpanStatusCode.ERROR });
throw error;
}).finally(() => span.end());
return result;
} catch (error) {
if (error instanceof Error) {
span.recordException({
name: error.name,
message: error.message,
stack: error.stack
});
span.setStatus({ code: otel.SpanStatusCode.ERROR });
}
throw error;
} finally {
// end sync callback
if (!(result instanceof Promise)) span.end();
}
}
/**
* @internal
*/
$(name, optionsOrFn, fn) {
const callback = typeof optionsOrFn === "function" ? optionsOrFn : fn;
if (!this.#otel) return callback(this.#noopSpan);
const otel = this.#otel;
const options = typeof optionsOrFn === "function" ? {} : optionsOrFn;
const context = options.context;
if (context) return otel.tracer.startActiveSpan(name, options, context, (span) => this.#callActiveSpan(span, callback));
return otel.tracer.startActiveSpan(name, options, (span) => this.#callActiveSpan(span, callback));
}
/**
* @internal
*/
startSpan(name, options, context) {
if (!this.#otel) return this.#noopSpan;
const { tracer } = this.#otel;
return tracer.startSpan(name, options, context);
}
// On browser mode, async context is not automatically propagated,
// so we manually bind the `$` calls to the provided context.
// TODO: this doesn't bind to user land's `@optelemetry/api` calls
/**
* @internal
*/
bind(context) {
if (!this.#otel) return;
const original = this.$.__original ?? this.$;
this.$ = this.#otel.context.bind(context, original);
this.$.__original = original;
}
/**
* @internal
*/
async finish() {
await this.#sdk?.shutdown();
}
/**
* @internal
*/
async flush() {
await this.#sdk?.forceFlush?.();
}
}
function noopSpan() {
return this;
}
function createNoopSpan() {
return {
setAttribute: noopSpan,
setStatus: noopSpan,
addEvent: noopSpan,
addLink: noopSpan,
addLinks: noopSpan,
setAttributes: noopSpan,
updateName: noopSpan,
end: () => {},
isRecording: () => false,
recordException: noopSpan,
spanContext() {
return {
spanId: "",
traceFlags: 0,
traceId: ""
};
}
};
}
function noopContext() {
return this;
}
function createNoopContext() {
return {
getValue: noopContext,
setValue: noopContext,
deleteValue: noopContext
};
}
export { Traces as T };
@@ -0,0 +1 @@
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
@@ -0,0 +1 @@
{"version":3,"file":"cake-slice.js","sources":["../../../src/icons/cake-slice.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name CakeSlice\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSI5IiBjeT0iNyIgcj0iMiIgLz4KICA8cGF0aCBkPSJNNy4yIDcuOSAzIDExdjljMCAuNi40IDEgMSAxaDE2Yy42IDAgMS0uNCAxLTF2LTljMC0yLTMtNi03LThsLTMuNiAyLjYiIC8+CiAgPHBhdGggZD0iTTE2IDEzSDMiIC8+CiAgPHBhdGggZD0iTTE2IDE3SDMiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/cake-slice\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst CakeSlice = createLucideIcon('CakeSlice', [\n ['circle', { cx: '9', cy: '7', r: '2', key: '1305pl' }],\n [\n 'path',\n { d: 'M7.2 7.9 3 11v9c0 .6.4 1 1 1h16c.6 0 1-.4 1-1v-9c0-2-3-6-7-8l-3.6 2.6', key: 'xle13f' },\n ],\n ['path', { d: 'M16 13H3', key: '1wpj08' }],\n ['path', { d: 'M16 17H3', key: '3lvfcd' }],\n]);\n\nexport default CakeSlice;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,iBAAiB,WAAa,CAAA,CAAA,CAAA;AAAA,CAC9C,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,EAAK,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CACtD,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA,CAAE,CAAA,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAyE,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,QAAS,CAAA,CAAA;AAAA,CAC9F,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,373 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.evaluate = evaluate;
exports.evaluateTruthy = evaluateTruthy;
const VALID_OBJECT_CALLEES = ["Number", "String", "Math"];
const VALID_IDENTIFIER_CALLEES = ["isFinite", "isNaN", "parseFloat", "parseInt", "decodeURI", "decodeURIComponent", "encodeURI", "encodeURIComponent", null, null];
const INVALID_METHODS = ["random"];
function isValidObjectCallee(val) {
return VALID_OBJECT_CALLEES.includes(val);
}
function isValidIdentifierCallee(val) {
return VALID_IDENTIFIER_CALLEES.includes(val);
}
function isInvalidMethod(val) {
return INVALID_METHODS.includes(val);
}
function evaluateTruthy() {
const res = this.evaluate();
if (res.confident) return !!res.value;
}
function deopt(path, state) {
if (!state.confident) return;
state.deoptPath = path;
state.confident = false;
}
const Globals = new Map([["undefined", undefined], ["Infinity", Infinity], ["NaN", NaN]]);
function evaluateCached(path, state) {
const {
node
} = path;
const {
seen
} = state;
if (seen.has(node)) {
const existing = seen.get(node);
if (existing.resolved) {
return existing.value;
} else {
deopt(path, state);
return;
}
} else {
const item = {
resolved: false
};
seen.set(node, item);
const val = _evaluate(path, state);
if (state.confident) {
item.resolved = true;
item.value = val;
}
return val;
}
}
function _evaluate(path, state) {
if (!state.confident) return;
if (path.isSequenceExpression()) {
const exprs = path.get("expressions");
return evaluateCached(exprs[exprs.length - 1], state);
}
if (path.isStringLiteral() || path.isNumericLiteral() || path.isBooleanLiteral()) {
return path.node.value;
}
if (path.isNullLiteral()) {
return null;
}
if (path.isTemplateLiteral()) {
return evaluateQuasis(path, path.node.quasis, state);
}
if (path.isTaggedTemplateExpression() && path.get("tag").isMemberExpression()) {
const object = path.get("tag.object");
const {
node: {
name
}
} = object;
const property = path.get("tag.property");
if (object.isIdentifier() && name === "String" && !path.scope.getBinding(name) && property.isIdentifier() && property.node.name === "raw") {
return evaluateQuasis(path, path.node.quasi.quasis, state, true);
}
}
if (path.isConditionalExpression()) {
const testResult = evaluateCached(path.get("test"), state);
if (!state.confident) return;
if (testResult) {
return evaluateCached(path.get("consequent"), state);
} else {
return evaluateCached(path.get("alternate"), state);
}
}
if (path.isExpressionWrapper()) {
return evaluateCached(path.get("expression"), state);
}
if (path.isMemberExpression() && !path.parentPath.isCallExpression({
callee: path.node
})) {
const property = path.get("property");
const object = path.get("object");
if (object.isLiteral()) {
const value = object.node.value;
const type = typeof value;
let key = null;
if (path.node.computed) {
key = evaluateCached(property, state);
if (!state.confident) return;
} else if (property.isIdentifier()) {
key = property.node.name;
}
if ((type === "number" || type === "string") && key != null && (typeof key === "number" || typeof key === "string")) {
return value[key];
}
}
}
if (path.isReferencedIdentifier()) {
const binding = path.scope.getBinding(path.node.name);
if (binding) {
if (binding.constantViolations.length > 0 || path.node.start < binding.path.node.end) {
deopt(binding.path, state);
return;
}
const bindingPathScope = binding.path.scope;
if (binding.kind === "var" && bindingPathScope !== binding.scope) {
let hasUnsafeBlock = !bindingPathScope.path.parentPath.isBlockStatement();
for (let scope = bindingPathScope.parent; scope; scope = scope.parent) {
var _scope$path$parentPat;
if (scope === path.scope) {
if (hasUnsafeBlock) {
deopt(binding.path, state);
return;
}
break;
}
if ((_scope$path$parentPat = scope.path.parentPath) != null && _scope$path$parentPat.isBlockStatement()) {
hasUnsafeBlock = true;
}
}
}
if (binding.hasValue) {
return binding.value;
}
}
const name = path.node.name;
if (Globals.has(name)) {
if (!binding) {
return Globals.get(name);
}
deopt(binding.path, state);
return;
}
if (!binding) {
deopt(path, state);
return;
}
const bindingPath = binding.path;
if (!bindingPath.isVariableDeclarator()) {
deopt(bindingPath, state);
return;
}
const initPath = bindingPath.get("init");
const value = evaluateCached(initPath, state);
if (typeof value === "object" && value !== null && binding.references > 1) {
deopt(initPath, state);
return;
}
return value;
}
if (path.isUnaryExpression({
prefix: true
})) {
if (path.node.operator === "void") {
return undefined;
}
const argument = path.get("argument");
if (path.node.operator === "typeof" && (argument.isFunction() || argument.isClass())) {
return "function";
}
const arg = evaluateCached(argument, state);
if (!state.confident) return;
switch (path.node.operator) {
case "!":
return !arg;
case "+":
return +arg;
case "-":
return -arg;
case "~":
return ~arg;
case "typeof":
return typeof arg;
}
}
if (path.isArrayExpression()) {
const arr = [];
const elems = path.get("elements");
for (const elem of elems) {
const elemValue = elem.evaluate();
if (elemValue.confident) {
arr.push(elemValue.value);
} else {
deopt(elemValue.deopt, state);
return;
}
}
return arr;
}
if (path.isObjectExpression()) {
const obj = {};
const props = path.get("properties");
for (const prop of props) {
if (prop.isObjectMethod() || prop.isSpreadElement()) {
deopt(prop, state);
return;
}
const keyPath = prop.get("key");
let key;
if (prop.node.computed) {
key = keyPath.evaluate();
if (!key.confident) {
deopt(key.deopt, state);
return;
}
key = key.value;
} else if (keyPath.isIdentifier()) {
key = keyPath.node.name;
} else {
key = keyPath.node.value;
}
const valuePath = prop.get("value");
let value = valuePath.evaluate();
if (!value.confident) {
deopt(value.deopt, state);
return;
}
value = value.value;
obj[key] = value;
}
return obj;
}
if (path.isLogicalExpression()) {
const wasConfident = state.confident;
const left = evaluateCached(path.get("left"), state);
const leftConfident = state.confident;
state.confident = wasConfident;
const right = evaluateCached(path.get("right"), state);
const rightConfident = state.confident;
switch (path.node.operator) {
case "||":
state.confident = leftConfident && (!!left || rightConfident);
if (!state.confident) return;
return left || right;
case "&&":
state.confident = leftConfident && (!left || rightConfident);
if (!state.confident) return;
return left && right;
case "??":
state.confident = leftConfident && (left != null || rightConfident);
if (!state.confident) return;
return left != null ? left : right;
}
}
if (path.isBinaryExpression()) {
const left = evaluateCached(path.get("left"), state);
if (!state.confident) return;
const right = evaluateCached(path.get("right"), state);
if (!state.confident) return;
switch (path.node.operator) {
case "-":
return left - right;
case "+":
return left + right;
case "/":
return left / right;
case "*":
return left * right;
case "%":
return left % right;
case "**":
return Math.pow(left, right);
case "<":
return left < right;
case ">":
return left > right;
case "<=":
return left <= right;
case ">=":
return left >= right;
case "==":
return left == right;
case "!=":
return left != right;
case "===":
return left === right;
case "!==":
return left !== right;
case "|":
return left | right;
case "&":
return left & right;
case "^":
return left ^ right;
case "<<":
return left << right;
case ">>":
return left >> right;
case ">>>":
return left >>> right;
}
}
if (path.isCallExpression()) {
const callee = path.get("callee");
let context;
let func;
if (callee.isIdentifier() && !path.scope.getBinding(callee.node.name) && (isValidObjectCallee(callee.node.name) || isValidIdentifierCallee(callee.node.name))) {
func = global[callee.node.name];
}
if (callee.isMemberExpression()) {
const object = callee.get("object");
const property = callee.get("property");
if (object.isIdentifier() && property.isIdentifier() && isValidObjectCallee(object.node.name) && !isInvalidMethod(property.node.name)) {
context = global[object.node.name];
const key = property.node.name;
if (hasOwnProperty.call(context, key)) {
func = context[key];
}
}
if (object.isLiteral() && property.isIdentifier()) {
const type = typeof object.node.value;
if (type === "string" || type === "number") {
context = object.node.value;
func = context[property.node.name];
}
}
}
if (func) {
const args = path.get("arguments").map(arg => evaluateCached(arg, state));
if (!state.confident) return;
return func.apply(context, args);
}
}
deopt(path, state);
}
function evaluateQuasis(path, quasis, state, raw = false) {
let str = "";
let i = 0;
const exprs = path.isTemplateLiteral() ? path.get("expressions") : path.get("quasi.expressions");
for (const elem of quasis) {
if (!state.confident) break;
str += raw ? elem.value.raw : elem.value.cooked;
const expr = exprs[i++];
if (expr) str += String(evaluateCached(expr, state));
}
if (!state.confident) return;
return str;
}
function evaluate() {
const state = {
confident: true,
deoptPath: null,
seen: new Map()
};
let value = evaluateCached(this, state);
if (!state.confident) value = undefined;
return {
confident: state.confident,
deopt: state.deoptPath,
value: value
};
}
//# sourceMappingURL=evaluation.js.map
@@ -0,0 +1,9 @@
MIT License
Copyright (c) Kevin Mårtensson <kevinmartensson@gmail.com> (github.com/kevva)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1 @@
{"version":3,"file":"monitor-cog.js","sources":["../../../src/icons/monitor-cog.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name MonitorCog\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgMTd2NCIgLz4KICA8cGF0aCBkPSJtMTUuMiA0LjktLjktLjQiIC8+CiAgPHBhdGggZD0ibTE1LjIgNy4xLS45LjQiIC8+CiAgPHBhdGggZD0ibTE2LjkgMy4yLS40LS45IiAvPgogIDxwYXRoIGQ9Im0xNi45IDguOC0uNC45IiAvPgogIDxwYXRoIGQ9Im0xOS41IDIuMy0uNC45IiAvPgogIDxwYXRoIGQ9Im0xOS41IDkuNy0uNC0uOSIgLz4KICA8cGF0aCBkPSJtMjEuNyA0LjUtLjkuNCIgLz4KICA8cGF0aCBkPSJtMjEuNyA3LjUtLjktLjQiIC8+CiAgPHBhdGggZD0iTTIyIDEzdjJhMiAyIDAgMCAxLTIgMkg0YTIgMiAwIDAgMS0yLTJWNWEyIDIgMCAwIDEgMi0yaDciIC8+CiAgPHBhdGggZD0iTTggMjFoOCIgLz4KICA8Y2lyY2xlIGN4PSIxOCIgY3k9IjYiIHI9IjMiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/monitor-cog\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst MonitorCog = createLucideIcon('MonitorCog', [\n ['path', { d: 'M12 17v4', key: '1riwvh' }],\n ['path', { d: 'm15.2 4.9-.9-.4', key: '12wd2u' }],\n ['path', { d: 'm15.2 7.1-.9.4', key: '1r2vl7' }],\n ['path', { d: 'm16.9 3.2-.4-.9', key: '3zbo91' }],\n ['path', { d: 'm16.9 8.8-.4.9', key: '1qr2dn' }],\n ['path', { d: 'm19.5 2.3-.4.9', key: '1rjrkq' }],\n ['path', { d: 'm19.5 9.7-.4-.9', key: 'heryx5' }],\n ['path', { d: 'm21.7 4.5-.9.4', key: '17fqt1' }],\n ['path', { d: 'm21.7 7.5-.9-.4', key: '14zyni' }],\n ['path', { d: 'M22 13v2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7', key: '1tnzv8' }],\n ['path', { d: 'M8 21h8', key: '1ev6f3' }],\n ['circle', { cx: '18', cy: '6', r: '3', key: '1h7g24' }],\n]);\n\nexport default MonitorCog;\n"],"names":[],"mappings":"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 truncated
@@ -0,0 +1,14 @@
import type {CodeKeywordDefinition} from "../../types"
import {dynamicAnchor} from "./dynamicAnchor"
import {checkStrictMode} from "../../compile/util"
const def: CodeKeywordDefinition = {
keyword: "$recursiveAnchor",
schemaType: "boolean",
code(cxt) {
if (cxt.schema) dynamicAnchor(cxt, "")
else checkStrictMode(cxt.it, "$recursiveAnchor: false is ignored")
},
}
export default def
@@ -0,0 +1 @@
{"version":3,"file":"x-square.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,190 @@
import _default from './colors.mjs';
type ArbitraryUtilityValue = {
kind: 'arbitrary';
/**
* ```
* bg-[color:var(--my-color)]
* ^^^^^
*
* bg-(color:--my-color)
* ^^^^^
* ```
*/
dataType: string | null;
/**
* ```
* bg-[#0088cc]
* ^^^^^^^
*
* bg-[var(--my_variable)]
* ^^^^^^^^^^^^^^^^^^
*
* bg-(--my_variable)
* ^^^^^^^^^^^^^^
* ```
*/
value: string;
};
type NamedUtilityValue = {
kind: 'named';
/**
* ```
* bg-red-500
* ^^^^^^^
*
* w-1/2
* ^
* ```
*/
value: string;
/**
* ```
* w-1/2
* ^^^
* ```
*/
fraction: string | null;
};
type ArbitraryModifier = {
kind: 'arbitrary';
/**
* ```
* bg-red-500/[50%]
* ^^^
* ```
*/
value: string;
};
type NamedModifier = {
kind: 'named';
/**
* ```
* bg-red-500/50
* ^^
* ```
*/
value: string;
};
type ArbitraryVariantValue = {
kind: 'arbitrary';
value: string;
};
type NamedVariantValue = {
kind: 'named';
value: string;
};
type Variant =
/**
* Arbitrary variants are variants that take a selector and generate a variant
* on the fly.
*
* E.g.: `[&_p]`
*/
{
kind: 'arbitrary';
selector: string;
relative: boolean;
}
/**
* Static variants are variants that don't take any arguments.
*
* E.g.: `hover`
*/
| {
kind: 'static';
root: string;
}
/**
* Functional variants are variants that can take an argument. The argument is
* either a named variant value or an arbitrary variant value.
*
* E.g.:
*
* - `aria-disabled`
* - `aria-[disabled]`
* - `@container-size` -> @container, with named value `size`
* - `@container-[inline-size]` -> @container, with arbitrary variant value `inline-size`
* - `@container` -> @container, with no value
*/
| {
kind: 'functional';
root: string;
value: ArbitraryVariantValue | NamedVariantValue | null;
modifier: ArbitraryModifier | NamedModifier | null;
}
/**
* Compound variants are variants that take another variant as an argument.
*
* E.g.:
*
* - `has-[&_p]`
* - `group-*`
* - `peer-*`
*/
| {
kind: 'compound';
root: string;
modifier: ArbitraryModifier | NamedModifier | null;
variant: Variant;
};
type Candidate =
/**
* Arbitrary candidates are candidates that register utilities on the fly with
* a property and a value.
*
* E.g.:
*
* - `[color:red]`
* - `[color:red]/50`
* - `[color:red]/50!`
*/
{
kind: 'arbitrary';
property: string;
value: string;
modifier: ArbitraryModifier | NamedModifier | null;
variants: Variant[];
important: boolean;
raw: string;
}
/**
* Static candidates are candidates that don't take any arguments.
*
* E.g.:
*
* - `underline`
* - `box-border`
*/
| {
kind: 'static';
root: string;
variants: Variant[];
important: boolean;
raw: string;
}
/**
* Functional candidates are candidates that can take an argument.
*
* E.g.:
*
* - `bg-red-500`
* - `bg-[#0088cc]`
* - `w-1/2`
*/
| {
kind: 'functional';
root: string;
value: ArbitraryUtilityValue | NamedUtilityValue | null;
modifier: ArbitraryModifier | NamedModifier | null;
variants: Variant[];
important: boolean;
raw: string;
};
type PluginUtils = {
theme: (keypath: string, defaultValue?: any) => any;
colors: typeof _default;
};
export type { Candidate as C, NamedUtilityValue as N, PluginUtils as P, Variant as V };
@@ -0,0 +1,129 @@
import * as util from "../core/util.js";
const error = () => {
const Sizable = {
string: { unit: "caractères", verb: "avoir" },
file: { unit: "octets", verb: "avoir" },
array: { unit: "éléments", verb: "avoir" },
set: { unit: "éléments", verb: "avoir" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const FormatDictionary = {
regex: "expression régulière",
email: "adresse e-mail",
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: "date et heure ISO",
date: "date ISO",
time: "heure ISO",
duration: "durée ISO",
ipv4: "adresse IPv4",
ipv6: "adresse IPv6",
mac: "adresse MAC",
cidrv4: "plage IPv4",
cidrv6: "plage IPv6",
base64: "chaîne de caractères encodée en base64",
base64url: "chaîne de caractères encodée en base64url",
json_string: "chaîne de caractères JSON",
e164: "numéro au format E.164",
credit_card: "numéro de carte de crédit",
currency_code: "code de devise",
iban: "IBAN",
jwt: "JWT",
template_literal: "entrée",
};
const TypeDictionary = {
string: "chaîne de caractères",
number: "nombre",
int: "entier",
boolean: "booléen",
bigint: "grand entier",
symbol: "symbole",
undefined: "indéfini",
null: "null",
never: "jamais",
void: "vide",
date: "date",
array: "tableau",
object: "objet",
tuple: "tuple",
record: "record",
map: "map",
set: "ensemble",
file: "fichier",
nonoptional: "non optionnel",
nan: "NaN",
function: "fonction",
};
return (issue) => {
switch (issue.code) {
case "invalid_type": {
const expected = TypeDictionary[issue.expected] ?? issue.expected;
const receivedType = util.parsedType(issue.input);
const received = TypeDictionary[receivedType] ?? receivedType;
if (/^[A-Z]/.test(issue.expected)) {
return `Entrée invalide : instance de ${issue.expected} attendu, ${received} reçu`;
}
return `Entrée invalide : ${expected} attendu, ${received} reçu`;
}
case "invalid_value":
if (issue.values.length === 1)
return `Entrée invalide : ${util.stringifyPrimitive(issue.values[0])} attendu`;
return `Option invalide : une valeur parmi ${util.joinValues(issue.values, "|")} attendue`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Trop grand : ${TypeDictionary[issue.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue.maximum.toString()} ${sizing.unit ?? "élément(s)"}`;
return `Trop grand : ${TypeDictionary[issue.origin] ?? "valeur"} doit être ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing)
return `Trop petit : ${TypeDictionary[issue.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue.minimum.toString()} ${sizing.unit}`;
return `Trop petit : ${TypeDictionary[issue.origin] ?? "valeur"} doit être ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with")
return `Chaîne de caractères invalide : doit commencer par "${_issue.prefix}"`;
if (_issue.format === "ends_with")
return `Chaîne de caractères invalide : doit se terminer par "${_issue.suffix}"`;
if (_issue.format === "includes")
return `Chaîne de caractères invalide : doit inclure "${_issue.includes}"`;
if (_issue.format === "regex")
return `Chaîne de caractères invalide : doit correspondre au motif ${_issue.pattern}`;
return `${FormatDictionary[_issue.format] ?? issue.format} invalide`;
}
case "not_multiple_of":
return `Nombre invalide : doit être un multiple de ${issue.divisor}`;
case "unrecognized_keys":
return `Clé${issue.keys.length > 1 ? "s" : ""} non reconnue${issue.keys.length > 1 ? "s" : ""} : ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `Clé invalide dans ${issue.origin}`;
case "invalid_union":
return "Entrée invalide";
case "invalid_element":
return `Valeur invalide dans ${issue.origin}`;
default:
return `Entrée invalide`;
}
};
};
export default function () {
return {
localeError: error(),
};
}
@@ -0,0 +1,24 @@
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE:
// npx nx generate-lib repo
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2025_full = void 0;
const dom_1 = require("./dom");
const dom_asynciterable_1 = require("./dom.asynciterable");
const dom_iterable_1 = require("./dom.iterable");
const es2025_1 = require("./es2025");
const scripthost_1 = require("./scripthost");
const webworker_importscripts_1 = require("./webworker.importscripts");
exports.es2025_full = {
libs: [
es2025_1.es2025,
dom_1.dom,
webworker_importscripts_1.webworker_importscripts,
scripthost_1.scripthost,
dom_iterable_1.dom_iterable,
dom_asynciterable_1.dom_asynciterable,
],
variables: [],
};
@@ -0,0 +1,41 @@
// src/compose-refs.tsx
import * as React from "react";
function setRef(ref, value) {
if (typeof ref === "function") {
return ref(value);
} else if (ref !== null && ref !== void 0) {
ref.current = value;
}
}
function composeRefs(...refs) {
return (node) => {
let hasCleanup = false;
const cleanups = refs.map((ref) => {
const cleanup = setRef(ref, node);
if (!hasCleanup && typeof cleanup == "function") {
hasCleanup = true;
}
return cleanup;
});
if (hasCleanup) {
return () => {
for (let i = 0; i < cleanups.length; i++) {
const cleanup = cleanups[i];
if (typeof cleanup == "function") {
cleanup();
} else {
setRef(refs[i], null);
}
}
};
}
};
}
function useComposedRefs(...refs) {
return React.useCallback(composeRefs(...refs), refs);
}
export {
composeRefs,
useComposedRefs
};
//# sourceMappingURL=index.mjs.map
@@ -0,0 +1,390 @@
import { invariant, pipe, clamp, millisecondsToSeconds, secondsToMilliseconds } from 'motion-utils';
import { time } from '../frameloop/sync-time.mjs';
import { activeAnimations } from '../stats/animation-count.mjs';
import { mix } from '../utils/mix/index.mjs';
import { frameloopDriver } from './drivers/frame.mjs';
import { inertia } from './generators/inertia.mjs';
import { keyframes } from './generators/keyframes.mjs';
import { calcGeneratorDuration } from './generators/utils/calc-duration.mjs';
import { getGeneratorVelocity } from './generators/utils/velocity.mjs';
import { getFinalKeyframe } from './keyframes/get-final.mjs';
import { replaceTransitionType } from './utils/replace-transition-type.mjs';
import { WithPromise } from './utils/WithPromise.mjs';
const percentToProgress = (percent) => percent / 100;
class JSAnimation extends WithPromise {
constructor(options) {
super();
this.state = "idle";
this.startTime = null;
this.isStopped = false;
/**
* The current time of the animation.
*/
this.currentTime = 0;
/**
* The time at which the animation was paused.
*/
this.holdTime = null;
/**
* Playback speed as a factor. 0 would be stopped, -1 reverse and 2 double speed.
*/
this.playbackSpeed = 1;
/**
* Reusable state object for the delay phase to avoid
* allocating a new object every frame.
*/
this.delayState = {
done: false,
value: undefined,
};
/**
* This method is bound to the instance to fix a pattern where
* animation.stop is returned as a reference from a useEffect.
*/
this.stop = () => {
const { motionValue } = this.options;
if (motionValue && motionValue.updatedAt !== time.now()) {
this.tick(time.now());
}
this.isStopped = true;
if (this.state === "idle")
return;
this.teardown();
this.options.onStop?.();
};
activeAnimations.mainThread++;
this.options = options;
this.initAnimation();
this.play();
if (options.autoplay === false)
this.pause();
}
initAnimation() {
const { options } = this;
replaceTransitionType(options);
const { type = keyframes, repeat = 0, repeatDelay = 0, repeatType, velocity = 0, } = options;
let { keyframes: keyframes$1 } = options;
const generatorFactory = type || keyframes;
if (process.env.NODE_ENV !== "production" &&
generatorFactory !== keyframes) {
invariant(keyframes$1.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${keyframes$1}`, "spring-two-frames");
}
if (generatorFactory !== keyframes &&
typeof keyframes$1[0] !== "number") {
this.mixKeyframes = pipe(percentToProgress, mix(keyframes$1[0], keyframes$1[1]));
keyframes$1 = [0, 100];
}
const generator = generatorFactory({ ...options, keyframes: keyframes$1 });
/**
* If we have a mirror repeat type we need to create a second generator that outputs the
* mirrored (not reversed) animation and later ping pong between the two generators.
*/
if (repeatType === "mirror") {
this.mirroredGenerator = generatorFactory({
...options,
keyframes: [...keyframes$1].reverse(),
velocity: -velocity,
});
}
/**
* If duration is undefined and we have repeat options,
* we need to calculate a duration from the generator.
*
* We set it to the generator itself to cache the duration.
* Any timeline resolver will need to have already precalculated
* the duration by this step.
*/
if (generator.calculatedDuration === null) {
generator.calculatedDuration = calcGeneratorDuration(generator);
}
const { calculatedDuration } = generator;
this.calculatedDuration = calculatedDuration;
this.resolvedDuration = calculatedDuration + repeatDelay;
this.totalDuration = this.resolvedDuration * (repeat + 1) - repeatDelay;
this.generator = generator;
}
updateTime(timestamp) {
const animationTime = Math.round(timestamp - this.startTime) * this.playbackSpeed;
// Update currentTime
if (this.holdTime !== null) {
this.currentTime = this.holdTime;
}
else {
// Rounding the time because floating point arithmetic is not always accurate, e.g. 3000.367 - 1000.367 =
// 2000.0000000000002. This is a problem when we are comparing the currentTime with the duration, for
// example.
this.currentTime = animationTime;
}
}
tick(timestamp, sample = false) {
const { generator, totalDuration, mixKeyframes, mirroredGenerator, resolvedDuration, calculatedDuration, } = this;
if (this.startTime === null)
return generator.next(0);
const { delay = 0, keyframes, repeat, repeatType, repeatDelay, type, onUpdate, finalKeyframe, } = this.options;
/**
* requestAnimationFrame timestamps can come through as lower than
* the startTime as set by performance.now(). Here we prevent this,
* though in the future it could be possible to make setting startTime
* a pending operation that gets resolved here.
*/
if (this.speed > 0) {
this.startTime = Math.min(this.startTime, timestamp);
}
else if (this.speed < 0) {
this.startTime = Math.min(timestamp - totalDuration / this.speed, this.startTime);
}
if (sample) {
this.currentTime = timestamp;
}
else {
this.updateTime(timestamp);
}
// Rebase on delay
const timeWithoutDelay = this.currentTime - delay * (this.playbackSpeed >= 0 ? 1 : -1);
const isInDelayPhase = this.playbackSpeed >= 0
? timeWithoutDelay < 0
: timeWithoutDelay > totalDuration;
this.currentTime = Math.max(timeWithoutDelay, 0);
// If this animation has finished, set the current time to the total duration.
if (this.state === "finished" && this.holdTime === null) {
this.currentTime = totalDuration;
}
let elapsed = this.currentTime;
let frameGenerator = generator;
if (repeat) {
/**
* Get the current progress (0-1) of the animation. If t is >
* than duration we'll get values like 2.5 (midway through the
* third iteration)
*/
const progress = Math.min(this.currentTime, totalDuration) / resolvedDuration;
/**
* Get the current iteration (0 indexed). For instance the floor of
* 2.5 is 2.
*/
let currentIteration = Math.floor(progress);
/**
* Get the current progress of the iteration by taking the remainder
* so 2.5 is 0.5 through iteration 2
*/
let iterationProgress = progress % 1.0;
/**
* If iteration progress is 1 we count that as the end
* of the previous iteration.
*/
if (!iterationProgress && progress >= 1) {
iterationProgress = 1;
}
iterationProgress === 1 && currentIteration--;
currentIteration = Math.min(currentIteration, repeat + 1);
/**
* Reverse progress if we're not running in "normal" direction
*/
const isOddIteration = Boolean(currentIteration % 2);
if (isOddIteration) {
if (repeatType === "reverse") {
iterationProgress = 1 - iterationProgress;
if (repeatDelay) {
iterationProgress -= repeatDelay / resolvedDuration;
}
}
else if (repeatType === "mirror") {
frameGenerator = mirroredGenerator;
}
}
elapsed = clamp(0, 1, iterationProgress) * resolvedDuration;
}
/**
* If we're in negative time, set state as the initial keyframe.
* This prevents delay: x, duration: 0 animations from finishing
* instantly.
*/
let state;
if (isInDelayPhase) {
this.delayState.value = keyframes[0];
state = this.delayState;
}
else {
state = frameGenerator.next(elapsed);
}
if (mixKeyframes && !isInDelayPhase) {
state.value = mixKeyframes(state.value);
}
let { done } = state;
if (!isInDelayPhase && calculatedDuration !== null) {
done =
this.playbackSpeed >= 0
? this.currentTime >= totalDuration
: this.currentTime <= 0;
}
const isAnimationFinished = this.holdTime === null &&
(this.state === "finished" || (this.state === "running" && done));
// TODO: The exception for inertia could be cleaner here
if (isAnimationFinished && type !== inertia) {
state.value = getFinalKeyframe(keyframes, this.options, finalKeyframe, this.speed);
}
if (onUpdate) {
onUpdate(state.value);
}
if (isAnimationFinished) {
this.finish();
}
return state;
}
/**
* Allows the returned animation to be awaited or promise-chained. Currently
* resolves when the animation finishes at all but in a future update could/should
* reject if its cancels.
*/
then(resolve, reject) {
return this.finished.then(resolve, reject);
}
get duration() {
return millisecondsToSeconds(this.calculatedDuration);
}
get iterationDuration() {
const { delay = 0 } = this.options || {};
return this.duration + millisecondsToSeconds(delay);
}
get time() {
return millisecondsToSeconds(this.currentTime);
}
set time(newTime) {
newTime = secondsToMilliseconds(newTime);
this.currentTime = newTime;
if (this.startTime === null ||
this.holdTime !== null ||
this.playbackSpeed === 0) {
this.holdTime = newTime;
}
else if (this.driver) {
this.startTime = this.driver.now() - newTime / this.playbackSpeed;
}
if (this.driver) {
this.driver.start(false);
}
else {
this.startTime = 0;
this.state = "paused";
this.holdTime = newTime;
this.tick(newTime);
}
}
/**
* Returns the generator's velocity at the current time in units/second.
* Uses the analytical derivative when available (springs), avoiding
* the MotionValue's frame-dependent velocity estimation.
*/
getGeneratorVelocity() {
const t = this.currentTime;
if (t <= 0)
return this.options.velocity || 0;
if (this.generator.velocity) {
return this.generator.velocity(t);
}
// Fallback: finite difference
const current = this.generator.next(t).value;
return getGeneratorVelocity((s) => this.generator.next(s).value, t, current);
}
get speed() {
return this.playbackSpeed;
}
set speed(newSpeed) {
const hasChanged = this.playbackSpeed !== newSpeed;
if (hasChanged && this.driver) {
this.updateTime(time.now());
}
this.playbackSpeed = newSpeed;
if (hasChanged && this.driver) {
this.time = millisecondsToSeconds(this.currentTime);
}
}
play() {
if (this.isStopped)
return;
const { driver = frameloopDriver, startTime } = this.options;
if (!this.driver) {
this.driver = driver((timestamp) => this.tick(timestamp));
}
this.options.onPlay?.();
const now = this.driver.now();
if (this.state === "finished") {
this.updateFinished();
this.startTime = now;
}
else if (this.holdTime !== null) {
this.startTime = now - this.holdTime;
}
else if (!this.startTime) {
this.startTime = startTime ?? now;
}
if (this.state === "finished" && this.speed < 0) {
this.startTime += this.calculatedDuration;
}
this.holdTime = null;
/**
* Set playState to running only after we've used it in
* the previous logic.
*/
this.state = "running";
this.driver.start();
}
pause() {
this.state = "paused";
this.updateTime(time.now());
this.holdTime = this.currentTime;
}
complete() {
if (this.state !== "running") {
this.play();
}
this.state = "finished";
this.holdTime = null;
}
finish() {
this.notifyFinished();
this.teardown();
this.state = "finished";
this.options.onComplete?.();
}
cancel() {
this.holdTime = null;
this.startTime = 0;
this.tick(0);
this.teardown();
this.options.onCancel?.();
}
teardown() {
this.state = "idle";
this.stopDriver();
this.startTime = this.holdTime = null;
activeAnimations.mainThread--;
}
stopDriver() {
if (!this.driver)
return;
this.driver.stop();
this.driver = undefined;
}
sample(sampleTime) {
this.startTime = 0;
return this.tick(sampleTime, true);
}
attachTimeline(timeline) {
if (this.options.allowFlatten) {
this.options.type = "keyframes";
this.options.ease = "linear";
this.initAnimation();
}
this.driver?.stop();
return timeline.observe(this);
}
}
// Legacy function support
function animateValue(options) {
return new JSAnimation(options);
}
export { JSAnimation, animateValue };
//# sourceMappingURL=JSAnimation.mjs.map
@@ -0,0 +1,43 @@
/**
* Unsecured (unsigned & unencrypted) JSON Web Tokens (JWT)
*
* @module
*/
import type * as types from '../types.d.ts';
/** Result of decoding an Unsecured JWT. */
export interface UnsecuredResult<PayloadType = types.JWTPayload> {
payload: PayloadType & types.JWTPayload;
header: types.JWSHeaderParameters;
}
/**
* The UnsecuredJWT class is a utility for dealing with `{ "alg": "none" }` Unsecured JWTs.
*
* This class is exported (as a named export) from the main `'jose'` module entry point as well as
* from its subpath export `'jose/jwt/unsecured'`.
*
*/
export declare class UnsecuredJWT implements types.ProduceJWT {
#private;
/**
* {@link UnsecuredJWT} constructor
*
* @param payload The JWT Claims Set object. Defaults to an empty object.
*/
constructor(payload?: types.JWTPayload);
/** Encodes the Unsecured JWT. */
encode(): string;
setIssuer(issuer: string): this;
setSubject(subject: string): this;
setAudience(audience: string | string[]): this;
setJti(jwtId: string): this;
setNotBefore(input: number | string | Date): this;
setExpirationTime(input: number | string | Date): this;
setIssuedAt(input?: number | string | Date): this;
/**
* Decodes an unsecured JWT.
*
* @param jwt Unsecured JWT to decode the payload of.
* @param options JWT Claims Set validation options.
*/
static decode<PayloadType = types.JWTPayload>(jwt: string, options?: types.JWTClaimVerificationOptions): UnsecuredResult<PayloadType>;
}
@@ -0,0 +1 @@
{"version":3,"file":"utils.cjs","sources":["../../src/utils.ts"],"sourcesContent":["export type NoInfer<A extends any> = [A][A extends any ? 0 : never]\n\nexport type PartialKeys<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>\n\nexport function memo<TDeps extends ReadonlyArray<any>, TResult>(\n getDeps: () => [...TDeps],\n fn: (...args: NoInfer<[...TDeps]>) => TResult,\n opts: {\n key: false | string\n debug?: () => boolean\n onChange?: (result: TResult) => void\n initialDeps?: TDeps\n skipInitialOnChange?: boolean\n },\n) {\n let deps = opts.initialDeps ?? []\n let result: TResult | undefined\n let isInitial = true\n\n function memoizedFunction(): TResult {\n // Debug-only timing. In production builds, `process.env.NODE_ENV !==\n // 'production'` is constant-folded to `false` by downstream minifiers\n // (Terser/esbuild/swc with `define`), which DCEs the entire block.\n const debugEnabled =\n process.env.NODE_ENV !== 'production' && !!opts.key && !!opts.debug?.()\n let depTime = 0\n if (debugEnabled) depTime = Date.now()\n\n const newDeps = getDeps()\n\n const depsChanged =\n newDeps.length !== deps.length ||\n newDeps.some((dep: any, index: number) => deps[index] !== dep)\n\n if (!depsChanged) {\n return result!\n }\n\n deps = newDeps\n\n let resultTime = 0\n if (debugEnabled) resultTime = Date.now()\n\n result = fn(...newDeps)\n\n if (debugEnabled) {\n const depEndTime = Math.round((Date.now() - depTime) * 100) / 100\n const resultEndTime = Math.round((Date.now() - resultTime) * 100) / 100\n const resultFpsPercentage = resultEndTime / 16\n\n const pad = (str: number | string, num: number) => {\n str = String(str)\n while (str.length < num) {\n str = ' ' + str\n }\n return str\n }\n\n console.info(\n `%c⏱ ${pad(resultEndTime, 5)} /${pad(depEndTime, 5)} ms`,\n `\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(\n 0,\n Math.min(120 - 120 * resultFpsPercentage, 120),\n )}deg 100% 31%);`,\n opts?.key,\n )\n }\n\n if (opts?.onChange && !(isInitial && opts.skipInitialOnChange)) {\n opts.onChange(result)\n }\n\n isInitial = false\n\n return result\n }\n\n // Attach updateDeps to the function itself\n memoizedFunction.updateDeps = (newDeps: [...TDeps]) => {\n deps = newDeps\n }\n\n return memoizedFunction\n}\n\nexport function notUndefined<T>(value: T | undefined, msg?: string): T {\n if (value === undefined) {\n throw new Error(`Unexpected undefined${msg ? `: ${msg}` : ''}`)\n } else {\n return value\n }\n}\n\nexport const approxEqual = (a: number, b: number) => Math.abs(a - b) < 1.01\n\nexport const debounce = (\n targetWindow: Window & typeof globalThis,\n fn: Function,\n ms: number,\n) => {\n let timeoutId: number\n return function (this: any, ...args: Array<any>) {\n targetWindow.clearTimeout(timeoutId)\n timeoutId = targetWindow.setTimeout(() => fn.apply(this, args), ms)\n }\n}\n"],"names":[],"mappings":";;AAIO,SAAS,KACd,SACA,IACA,MAOA;AACA,MAAI,OAAO,KAAK,eAAe,CAAA;AAC/B,MAAI;AACJ,MAAI,YAAY;AAEhB,WAAS,mBAA4B;;AAInC,UAAM,eACJ,QAAQ,IAAI,aAAa,gBAAgB,CAAC,CAAC,KAAK,OAAO,CAAC,GAAC,UAAK,UAAL;AAC3D,QAAI,UAAU;AACd,QAAI,aAAc,WAAU,KAAK,IAAA;AAEjC,UAAM,UAAU,QAAA;AAEhB,UAAM,cACJ,QAAQ,WAAW,KAAK,UACxB,QAAQ,KAAK,CAAC,KAAU,UAAkB,KAAK,KAAK,MAAM,GAAG;AAE/D,QAAI,CAAC,aAAa;AAChB,aAAO;AAAA,IACT;AAEA,WAAO;AAEP,QAAI,aAAa;AACjB,QAAI,aAAc,cAAa,KAAK,IAAA;AAEpC,aAAS,GAAG,GAAG,OAAO;AAEtB,QAAI,cAAc;AAChB,YAAM,aAAa,KAAK,OAAO,KAAK,QAAQ,WAAW,GAAG,IAAI;AAC9D,YAAM,gBAAgB,KAAK,OAAO,KAAK,QAAQ,cAAc,GAAG,IAAI;AACpE,YAAM,sBAAsB,gBAAgB;AAE5C,YAAM,MAAM,CAAC,KAAsB,QAAgB;AACjD,cAAM,OAAO,GAAG;AAChB,eAAO,IAAI,SAAS,KAAK;AACvB,gBAAM,MAAM;AAAA,QACd;AACA,eAAO;AAAA,MACT;AAEA,cAAQ;AAAA,QACN,OAAO,IAAI,eAAe,CAAC,CAAC,KAAK,IAAI,YAAY,CAAC,CAAC;AAAA,QACnD;AAAA;AAAA;AAAA,yBAGiB,KAAK;AAAA,UAChB;AAAA,UACA,KAAK,IAAI,MAAM,MAAM,qBAAqB,GAAG;AAAA,QAAA,CAC9C;AAAA,QACL,6BAAM;AAAA,MAAA;AAAA,IAEV;AAEA,SAAI,6BAAM,aAAY,EAAE,aAAa,KAAK,sBAAsB;AAC9D,WAAK,SAAS,MAAM;AAAA,IACtB;AAEA,gBAAY;AAEZ,WAAO;AAAA,EACT;AAGA,mBAAiB,aAAa,CAAC,YAAwB;AACrD,WAAO;AAAA,EACT;AAEA,SAAO;AACT;AAEO,SAAS,aAAgB,OAAsB,KAAiB;AACrE,MAAI,UAAU,QAAW;AACvB,UAAM,IAAI,MAAM,uBAAuB,MAAM,KAAK,GAAG,KAAK,EAAE,EAAE;AAAA,EAChE,OAAO;AACL,WAAO;AAAA,EACT;AACF;AAEO,MAAM,cAAc,CAAC,GAAW,MAAc,KAAK,IAAI,IAAI,CAAC,IAAI;AAEhE,MAAM,WAAW,CACtB,cACA,IACA,OACG;AACH,MAAI;AACJ,SAAO,YAAwB,MAAkB;AAC/C,iBAAa,aAAa,SAAS;AACnC,gBAAY,aAAa,WAAW,MAAM,GAAG,MAAM,MAAM,IAAI,GAAG,EAAE;AAAA,EACpE;AACF;;;;;"}
@@ -0,0 +1,63 @@
{
"name": "tapable",
"version": "2.3.2",
"description": "Just a little module for plugins.",
"homepage": "https://github.com/webpack/tapable",
"repository": {
"type": "git",
"url": "http://github.com/webpack/tapable.git"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/webpack"
},
"license": "MIT",
"author": "Tobias Koppers @sokra",
"main": "lib/index.js",
"browser": {
"util": "./lib/util-browser.js"
},
"types": "./tapable.d.ts",
"files": [
"lib",
"!lib/__tests__",
"tapable.d.ts"
],
"scripts": {
"lint": "npm run lint:code && npm run fmt:check",
"lint:code": "eslint --cache .",
"fmt": "npm run fmt:base -- --log-level warn --write",
"fmt:check": "npm run fmt:base -- --check",
"fmt:base": "node ./node_modules/prettier/bin/prettier.cjs --cache --ignore-unknown .",
"fix": "npm run fix:code && npm run fmt",
"fix:code": "npm run lint:code -- --fix",
"test": "jest",
"version": "changeset version",
"release": "changeset publish"
},
"jest": {
"transform": {
"__tests__[\\\\/].+\\.js$": "babel-jest"
},
"snapshotFormat": {
"escapeString": true,
"printBasicPrototype": true
}
},
"devDependencies": {
"@changesets/cli": "^2.30.0",
"@changesets/get-github-info": "^0.8.0",
"@babel/core": "^7.4.4",
"@babel/preset-env": "^7.4.4",
"@stylistic/eslint-plugin": "^5.2.3",
"babel-jest": "^30.3.0",
"eslint": "^9.28.0",
"eslint-config-webpack": "^4.6.3",
"jest": "^30.3.0",
"prettier": "^3.5.3",
"prettier-1": "npm:prettier@^1"
},
"engines": {
"node": ">=6"
}
}
@@ -0,0 +1 @@
{"version":3,"file":"russian-ruble.js","sources":["../../../src/icons/russian-ruble.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name RussianRuble\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNiAxMWg4YTQgNCAwIDAgMCAwLThIOXYxOCIgLz4KICA8cGF0aCBkPSJNNiAxNWg4IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/russian-ruble\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst RussianRuble = createLucideIcon('RussianRuble', [\n ['path', { d: 'M6 11h8a4 4 0 0 0 0-8H9v18', key: '18ai8t' }],\n ['path', { d: 'M6 15h8', key: '1y8f6l' }],\n]);\n\nexport default RussianRuble;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAe,iBAAiB,cAAgB,CAAA,CAAA,CAAA;AAAA,CAAA,CACpD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA8B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC3D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC1C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,53 @@
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// SEE https://typescript-eslint.io/users/configs
//
// For developers working in the typescript-eslint monorepo:
// You can regenerate it using `pnpm run generate-configs`
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const base_1 = __importDefault(require("./base"));
const eslint_recommended_1 = __importDefault(require("./eslint-recommended"));
/**
* 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}
*/
exports.default = (plugin, parser) => [
(0, base_1.default)(plugin, parser),
(0, eslint_recommended_1.default)(plugin, parser),
{
name: 'typescript-eslint/recommended-type-checked-only',
rules: {
'@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/no-array-delete': 'error',
'@typescript-eslint/no-base-to-string': 'error',
'@typescript-eslint/no-duplicate-type-constituents': 'error',
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/no-for-in-array': 'error',
'no-implied-eval': 'off',
'@typescript-eslint/no-implied-eval': 'error',
'@typescript-eslint/no-misused-promises': 'error',
'@typescript-eslint/no-redundant-type-constituents': 'error',
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
'@typescript-eslint/no-unsafe-argument': 'error',
'@typescript-eslint/no-unsafe-assignment': 'error',
'@typescript-eslint/no-unsafe-call': 'error',
'@typescript-eslint/no-unsafe-enum-comparison': 'error',
'@typescript-eslint/no-unsafe-member-access': 'error',
'@typescript-eslint/no-unsafe-return': 'error',
'@typescript-eslint/no-unsafe-unary-minus': 'error',
'no-throw-literal': 'off',
'@typescript-eslint/only-throw-error': 'error',
'prefer-promise-reject-errors': 'off',
'@typescript-eslint/prefer-promise-reject-errors': 'error',
'require-await': 'off',
'@typescript-eslint/require-await': 'error',
'@typescript-eslint/restrict-plus-operands': 'error',
'@typescript-eslint/restrict-template-expressions': 'error',
'@typescript-eslint/unbound-method': 'error',
},
},
];
@@ -0,0 +1,9 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
export { default } from './arrow-down-1-0.js';
//# sourceMappingURL=arrow-down-10.js.map
@@ -0,0 +1,13 @@
import { t as CfWorkerJsonSchemaValidator } from "./cfWorkerProvider-B3ZJEoRM.mjs";
//#region src/shimsBrowser.d.ts
/**
* Whether `fetch()` may throw `TypeError` due to CORS. Only true in browser contexts
* (including Web Workers / Service Workers). In Node.js and Cloudflare Workers, a
* `TypeError` from `fetch` is always a real network/configuration error.
*/
declare const CORS_IS_POSSIBLE = true;
//#endregion
export { CORS_IS_POSSIBLE, CfWorkerJsonSchemaValidator as DefaultJsonSchemaValidator };
//# sourceMappingURL=shimsBrowser.d.mts.map
@@ -0,0 +1,3 @@
import type { ResolvedConfig } from 'vite';
export declare function getDepsCacheDir(config: ResolvedConfig, ssr: boolean): string;
export declare function flattenId(id: string): string;
@@ -0,0 +1,45 @@
/**
* @fileoverview Warn when using template string syntax in regular strings
* @author Jeroen Engels
*/
"use strict";
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "problem",
docs: {
description:
"Disallow template literal placeholder syntax in regular strings",
recommended: false,
url: "https://eslint.org/docs/latest/rules/no-template-curly-in-string",
},
schema: [],
messages: {
unexpectedTemplateExpression:
"Unexpected template string expression.",
},
},
create(context) {
const regex = /\$\{[^}]+\}/u;
return {
Literal(node) {
if (typeof node.value === "string" && regex.test(node.value)) {
context.report({
node,
messageId: "unexpectedTemplateExpression",
});
}
},
};
},
};
@@ -0,0 +1,33 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.applyDefault = applyDefault;
const deepMerge_1 = require("./deepMerge");
/**
* Pure function - doesn't mutate either parameter!
* Uses the default options and overrides with the options provided by the user
* @param defaultOptions the defaults
* @param userOptions the user opts
* @returns the options with defaults
*/
function applyDefault(defaultOptions, userOptions) {
// clone defaults
const options = structuredClone(defaultOptions);
if (userOptions == null) {
return options;
}
// For avoiding the type error
// `This expression is not callable. Type 'unknown' has no call signatures.ts(2349)`
options.forEach((opt, i) => {
// eslint-disable-next-line @typescript-eslint/internal/eqeq-nullish
if (userOptions[i] !== undefined) {
const userOpt = userOptions[i];
if ((0, deepMerge_1.isObjectNotArray)(userOpt) && (0, deepMerge_1.isObjectNotArray)(opt)) {
options[i] = (0, deepMerge_1.deepMerge)(opt, userOpt);
}
else {
options[i] = userOpt;
}
}
});
return options;
}
@@ -0,0 +1,11 @@
# hermes-parser
A JavaScript parser built from the Hermes engine's parser compiled to WebAssembly. Can parse ES6, Flow, and JSX syntax.
## API
The Hermes parser exposes a single `parse(code, [options])` function, where `code` is the source code to parse as a string, and `options` is an optional object that may contain the following properties:
- **babel**: `boolean`, defaults to `false`. If `true`, output an AST conforming to Babel's AST format. If `false`, output an AST conforming to the ESTree AST format.
- **allowReturnOutsideFunction**: `boolean`, defaults to `false`. If `true`, do not error on return statements found outside functions.
- **flow**: `"all"` or `"detect"`, defaults to `"detect"`. If `"detect"`, only parse syntax as Flow syntax where it is ambiguous whether it is a Flow feature or regular JavaScript when the `@flow` pragma is present in the file. Otherwise if `"all"`, always parse ambiguous syntax as Flow syntax regardless of the presence of an `@flow` pragma. For example `foo<T>(x)` in a file without an `@flow` pragma will be parsed as two comparisons if set to `"detect"`, otherwise if set to `"all"` or the `@flow` pragma is included it will be parsed as a call expression with a type argument.
- **sourceFilename**: `string`, defaults to `null`. The filename corresponding to the code that is to be parsed. If non-null, the filename will be added to all source locations in the output AST.
- **sourceType**: `"module"`, `"script"`, or `"unambiguous"` (default). If `"unambiguous"`, source type will be automatically detected and set to `"module"` if any ES6 imports or exports are present in the code, otherwise source type will be set to `"script"`.
- **tokens**: `boolean`, defaults to `false`. If `true`, add all tokens to a `tokens` property on the root node.
@@ -0,0 +1,19 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const FileDigit = createLucideIcon("FileDigit", [
["path", { d: "M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4", key: "1pf5j1" }],
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
["rect", { width: "4", height: "6", x: "2", y: "12", rx: "2", key: "jm304g" }],
["path", { d: "M10 12h2v6", key: "12zw74" }],
["path", { d: "M10 18h4", key: "1ulq68" }]
]);
export { FileDigit as default };
//# sourceMappingURL=file-digit.js.map
@@ -0,0 +1,255 @@
import { FileSpecification, Task, CancelReason } from '@vitest/runner';
import { EvaluatedModules } from 'vite/module-runner';
import { S as SerializedConfig } from './config.d.A1h_Y6Jt.js';
import { E as Environment } from './environment.d.CrsxCzP1.js';
import { R as RuntimeRPC, a as RunnerRPC } from './rpc.d.B_8sPU0w.js';
//#region src/messages.d.ts
declare const TYPE_REQUEST: "q";
interface RpcRequest {
/**
* Type
*/
t: typeof TYPE_REQUEST;
/**
* ID
*/
i?: string;
/**
* Method
*/
m: string;
/**
* Arguments
*/
a: any[];
/**
* Optional
*/
o?: boolean;
}
//#endregion
//#region src/utils.d.ts
type ArgumentsType<T> = T extends ((...args: infer A) => any) ? A : never;
type ReturnType<T> = T extends ((...args: any) => infer R) ? R : never;
type Thenable<T> = T | PromiseLike<T>;
//#endregion
//#region src/main.d.ts
type PromisifyFn<T> = ReturnType<T> extends Promise<any> ? T : (...args: ArgumentsType<T>) => Promise<Awaited<ReturnType<T>>>;
type BirpcResolver<This> = (this: This, name: string, resolved: (...args: unknown[]) => unknown) => Thenable<((...args: any[]) => any) | undefined>;
interface ChannelOptions {
/**
* Function to post raw message
*/
post: (data: any, ...extras: any[]) => Thenable<any>;
/**
* Listener to receive raw message
*/
on: (fn: (data: any, ...extras: any[]) => void) => Thenable<any>;
/**
* Clear the listener when `$close` is called
*/
off?: (fn: (data: any, ...extras: any[]) => void) => Thenable<any>;
/**
* Custom function to serialize data
*
* by default it passes the data as-is
*/
serialize?: (data: any) => any;
/**
* Custom function to deserialize data
*
* by default it passes the data as-is
*/
deserialize?: (data: any) => any;
/**
* Call the methods with the RPC context or the original functions object
*/
bind?: 'rpc' | 'functions';
/**
* Custom meta data to attached to the RPC instance's `$meta` property
*/
meta?: any;
}
interface EventOptions<RemoteFunctions extends object = Record<string, unknown>, LocalFunctions extends object = Record<string, unknown>, Proxify extends boolean = true> {
/**
* Names of remote functions that do not need response.
*/
eventNames?: (keyof RemoteFunctions)[];
/**
* Maximum timeout for waiting for response, in milliseconds.
*
* @default 60_000
*/
timeout?: number;
/**
* Whether to proxy the remote functions.
*
* When `proxify` is false, calling the remote function
* with `rpc.$call('method', ...args)` instead of `rpc.method(...args)`
* explicitly is required.
*
* @default true
*/
proxify?: Proxify;
/**
* Custom resolver to resolve function to be called
*
* For advanced use cases only
*/
resolver?: BirpcResolver<BirpcReturn<RemoteFunctions, LocalFunctions, Proxify>>;
/**
* Hook triggered before an event is sent to the remote
*
* @param req - Request parameters
* @param next - Function to continue the request
* @param resolve - Function to resolve the response directly
*/
onRequest?: (this: BirpcReturn<RemoteFunctions, LocalFunctions, Proxify>, req: RpcRequest, next: (req?: RpcRequest) => Promise<any>, resolve: (res: any) => void) => void | Promise<void>;
/**
* Custom error handler for errors occurred in local functions being called
*
* @returns `true` to prevent the error from being thrown
*/
onFunctionError?: (this: BirpcReturn<RemoteFunctions, LocalFunctions, Proxify>, error: Error, functionName: string, args: any[]) => boolean | void;
/**
* Custom error handler for errors occurred during serialization or messsaging
*
* @returns `true` to prevent the error from being thrown
*/
onGeneralError?: (this: BirpcReturn<RemoteFunctions, LocalFunctions, Proxify>, error: Error, functionName?: string, args?: any[]) => boolean | void;
/**
* Custom error handler for timeouts
*
* @returns `true` to prevent the error from being thrown
*/
onTimeoutError?: (this: BirpcReturn<RemoteFunctions, LocalFunctions, Proxify>, functionName: string, args: any[]) => boolean | void;
}
type BirpcOptions<RemoteFunctions extends object = Record<string, unknown>, LocalFunctions extends object = Record<string, unknown>, Proxify extends boolean = true> = EventOptions<RemoteFunctions, LocalFunctions, Proxify> & ChannelOptions;
type BirpcFn<T> = PromisifyFn<T> & {
/**
* Send event without asking for response
*/
asEvent: (...args: ArgumentsType<T>) => Promise<void>;
};
interface BirpcReturnBuiltin<RemoteFunctions, LocalFunctions = Record<string, unknown>> {
/**
* Raw functions object
*/
$functions: LocalFunctions;
/**
* Whether the RPC is closed
*/
readonly $closed: boolean;
/**
* Custom meta data attached to the RPC instance
*/
readonly $meta: any;
/**
* Close the RPC connection
*/
$close: (error?: Error) => void;
/**
* Reject pending calls
*/
$rejectPendingCalls: (handler?: PendingCallHandler) => Promise<void>[];
/**
* Call the remote function and wait for the result.
* An alternative to directly calling the function
*/
$call: <K$1 extends keyof RemoteFunctions>(method: K$1, ...args: ArgumentsType<RemoteFunctions[K$1]>) => Promise<Awaited<ReturnType<RemoteFunctions[K$1]>>>;
/**
* Same as `$call`, but returns `undefined` if the function is not defined on the remote side.
*/
$callOptional: <K$1 extends keyof RemoteFunctions>(method: K$1, ...args: ArgumentsType<RemoteFunctions[K$1]>) => Promise<Awaited<ReturnType<RemoteFunctions[K$1]> | undefined>>;
/**
* Send event without asking for response
*/
$callEvent: <K$1 extends keyof RemoteFunctions>(method: K$1, ...args: ArgumentsType<RemoteFunctions[K$1]>) => Promise<void>;
/**
* Call the remote function with the raw options.
*/
$callRaw: (options: {
method: string;
args: unknown[];
event?: boolean;
optional?: boolean;
}) => Promise<Awaited<ReturnType<any>>[]>;
}
type ProxifiedRemoteFunctions<RemoteFunctions extends object = Record<string, unknown>> = { [K in keyof RemoteFunctions]: BirpcFn<RemoteFunctions[K]> };
type BirpcReturn<RemoteFunctions extends object = Record<string, unknown>, LocalFunctions extends object = Record<string, unknown>, Proxify extends boolean = true> = Proxify extends true ? ProxifiedRemoteFunctions<RemoteFunctions> & BirpcReturnBuiltin<RemoteFunctions, LocalFunctions> : BirpcReturnBuiltin<RemoteFunctions, LocalFunctions>;
type PendingCallHandler = (options: Pick<PromiseEntry, 'method' | 'reject'>) => void | Promise<void>;
interface PromiseEntry {
resolve: (arg: any) => void;
reject: (error: any) => void;
method: string;
timeoutId?: ReturnType<typeof setTimeout>;
}
declare const setTimeout: typeof globalThis.setTimeout;
type WorkerRPC = BirpcReturn<RuntimeRPC, RunnerRPC>;
interface ContextTestEnvironment {
name: string;
options: Record<string, any> | null;
}
interface WorkerTestEnvironment {
name: string;
options: Record<string, any> | null;
}
type TestExecutionMethod = "run" | "collect";
interface WorkerExecuteContext {
files: FileSpecification[];
providedContext: Record<string, any>;
invalidates?: string[];
environment: ContextTestEnvironment;
/** Exposed to test runner as `VITEST_WORKER_ID`. Value is unique per each isolated worker. */
workerId: number;
}
interface ContextRPC {
pool: string;
config: SerializedConfig;
projectName: string;
environment: WorkerTestEnvironment;
rpc: WorkerRPC;
files: FileSpecification[];
providedContext: Record<string, any>;
invalidates?: string[];
/** Exposed to test runner as `VITEST_WORKER_ID`. Value is unique per each isolated worker. */
workerId: number;
}
interface WorkerSetupContext {
environment: WorkerTestEnvironment;
pool: string;
config: SerializedConfig;
projectName: string;
rpc: WorkerRPC;
}
interface WorkerGlobalState {
ctx: ContextRPC;
config: SerializedConfig;
rpc: WorkerRPC;
current?: Task;
filepath?: string;
metaEnv: {
[key: string]: any;
BASE_URL: string;
MODE: string;
DEV: boolean;
PROD: boolean;
SSR: boolean;
};
environment: Environment;
evaluatedModules: EvaluatedModules;
resolvingModules: Set<string>;
moduleExecutionInfo: Map<string, any>;
onCancel: (listener: (reason: CancelReason) => unknown) => void;
onCleanup: (listener: () => unknown) => void;
providedContext: Record<string, any>;
durations: {
environment: number;
prepare: number;
};
onFilterStackTrace?: (trace: string) => string;
}
export type { BirpcOptions as B, ContextRPC as C, TestExecutionMethod as T, WorkerGlobalState as W, WorkerSetupContext as a, BirpcReturn as b, ContextTestEnvironment as c, WorkerExecuteContext as d, WorkerTestEnvironment as e };
@@ -0,0 +1 @@
{"version":3,"file":"size-rollup-scroll.js","sources":["../../motion-utils/dist/es/clamp.mjs","../../motion-utils/dist/es/format-error-message.mjs","../../motion-utils/dist/es/errors.mjs","../../motion-utils/dist/es/global-config.mjs","../../motion-utils/dist/es/is-object.mjs","../../motion-utils/dist/es/noop.mjs","../../motion-utils/dist/es/pipe.mjs","../../motion-utils/dist/es/progress.mjs","../../motion-dom/dist/es/frameloop/order.mjs","../../motion-dom/dist/es/frameloop/batcher.mjs","../../motion-dom/dist/es/frameloop/render-step.mjs","../../motion-dom/dist/es/frameloop/frame.mjs","../../motion-dom/dist/es/animation/utils/is-css-variable.mjs","../../motion-dom/dist/es/value/types/numbers/index.mjs","../../motion-dom/dist/es/value/types/utils/sanitize.mjs","../../motion-dom/dist/es/value/types/utils/float-regex.mjs","../../motion-dom/dist/es/value/types/utils/single-color-regex.mjs","../../motion-dom/dist/es/value/types/color/utils.mjs","../../motion-dom/dist/es/value/types/utils/is-nullish.mjs","../../motion-dom/dist/es/value/types/color/rgba.mjs","../../motion-dom/dist/es/value/types/color/hex.mjs","../../motion-dom/dist/es/value/types/numbers/units.mjs","../../motion-dom/dist/es/value/types/color/hsla.mjs","../../motion-dom/dist/es/value/types/color/index.mjs","../../motion-dom/dist/es/value/types/utils/color-regex.mjs","../../motion-dom/dist/es/value/types/complex/index.mjs","../../motion-dom/dist/es/value/types/color/hsla-to-rgba.mjs","../../motion-dom/dist/es/utils/mix/immediate.mjs","../../motion-dom/dist/es/utils/mix/number.mjs","../../motion-dom/dist/es/utils/mix/color.mjs","../../motion-dom/dist/es/utils/mix/visibility.mjs","../../motion-dom/dist/es/utils/mix/complex.mjs","../../motion-dom/dist/es/utils/mix/index.mjs","../../motion-dom/dist/es/utils/interpolate.mjs","../../motion-dom/dist/es/animation/keyframes/offsets/default.mjs","../../motion-dom/dist/es/animation/keyframes/offsets/fill.mjs","../../motion-dom/dist/es/utils/supports/flags.mjs","../../motion-dom/dist/es/utils/supports/memo.mjs","../../motion-utils/dist/es/memo.mjs","../../motion-dom/dist/es/utils/supports/scroll-timeline.mjs","../../motion-dom/dist/es/utils/is-html-element.mjs","../../motion-dom/dist/es/resize/handle-element.mjs","../../motion-dom/dist/es/utils/is-svg-element.mjs","../../motion-dom/dist/es/utils/resolve-elements.mjs","../../motion-dom/dist/es/resize/handle-window.mjs","../../motion-dom/dist/es/scroll/observe.mjs","../lib/render/dom/scroll/utils/can-use-native-timeline.js","../lib/render/dom/scroll/info.js","../../motion-utils/dist/es/velocity-per-second.mjs","../lib/render/dom/scroll/offsets/edge.js","../lib/render/dom/scroll/offsets/offset.js","../lib/render/dom/scroll/offsets/presets.js","../lib/render/dom/scroll/offsets/index.js","../lib/render/dom/scroll/offsets/inset.js","../lib/render/dom/scroll/on-scroll-handler.js","../lib/render/dom/scroll/track.js","../../motion-dom/dist/es/resize/index.mjs","../lib/render/dom/scroll/utils/offset-to-range.js","../lib/render/dom/scroll/utils/get-timeline.js","../lib/render/dom/scroll/index.js","../lib/render/dom/scroll/attach-function.js","../lib/render/dom/scroll/attach-animation.js"],"sourcesContent":["const clamp = (min, max, v) => {\n if (v > max)\n return max;\n if (v < min)\n return min;\n return v;\n};\n\nexport { clamp };\n//# sourceMappingURL=clamp.mjs.map\n","function formatErrorMessage(message, errorCode) {\n return errorCode\n ? `${message}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${errorCode}`\n : message;\n}\n\nexport { formatErrorMessage };\n//# sourceMappingURL=format-error-message.mjs.map\n","import { formatErrorMessage } from './format-error-message.mjs';\n\nlet warning = () => { };\nlet invariant = () => { };\nif (typeof process !== \"undefined\" &&\n process.env?.NODE_ENV !== \"production\") {\n warning = (check, message, errorCode) => {\n if (!check && typeof console !== \"undefined\") {\n console.warn(formatErrorMessage(message, errorCode));\n }\n };\n invariant = (check, message, errorCode) => {\n if (!check) {\n throw new Error(formatErrorMessage(message, errorCode));\n }\n };\n}\n\nexport { invariant, warning };\n//# sourceMappingURL=errors.mjs.map\n","const MotionGlobalConfig = {};\n\nexport { MotionGlobalConfig };\n//# sourceMappingURL=global-config.mjs.map\n","function isObject(value) {\n return typeof value === \"object\" && value !== null;\n}\n\nexport { isObject };\n//# sourceMappingURL=is-object.mjs.map\n","/*#__NO_SIDE_EFFECTS__*/\nconst noop = (any) => any;\n\nexport { noop };\n//# sourceMappingURL=noop.mjs.map\n","/**\n * Pipe\n * Compose other transformers to run linearily\n * pipe(min(20), max(40))\n * @param {...functions} transformers\n * @return {function}\n */\nconst combineFunctions = (a, b) => (v) => b(a(v));\nconst pipe = (...transformers) => transformers.reduce(combineFunLine truncated
@@ -0,0 +1,60 @@
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _state = require('../tokenizer/state'); var _state2 = _interopRequireDefault(_state);
var _charcodes = require('../util/charcodes');
exports.isJSXEnabled;
exports.isTypeScriptEnabled;
exports.isFlowEnabled;
exports.state;
exports.input;
exports.nextContextId;
function getNextContextId() {
return exports.nextContextId++;
} exports.getNextContextId = getNextContextId;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function augmentError(error) {
if ("pos" in error) {
const loc = locationForIndex(error.pos);
error.message += ` (${loc.line}:${loc.column})`;
error.loc = loc;
}
return error;
} exports.augmentError = augmentError;
class Loc {
constructor(line, column) {
this.line = line;
this.column = column;
}
} exports.Loc = Loc;
function locationForIndex(pos) {
let line = 1;
let column = 1;
for (let i = 0; i < pos; i++) {
if (exports.input.charCodeAt(i) === _charcodes.charCodes.lineFeed) {
line++;
column = 1;
} else {
column++;
}
}
return new Loc(line, column);
} exports.locationForIndex = locationForIndex;
function initParser(
inputCode,
isJSXEnabledArg,
isTypeScriptEnabledArg,
isFlowEnabledArg,
) {
exports.input = inputCode;
exports.state = new (0, _state2.default)();
exports.nextContextId = 1;
exports.isJSXEnabled = isJSXEnabledArg;
exports.isTypeScriptEnabled = isTypeScriptEnabledArg;
exports.isFlowEnabled = isFlowEnabledArg;
} exports.initParser = initParser;
@@ -0,0 +1,152 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.sv = exports.sl = exports.sk = exports.ru = exports.ro = exports.ptBR = exports.pt = exports.pl = exports.ps = exports.ota = exports.no = exports.nn = exports.nl = exports.ne = exports.ms = exports.mk = exports.lt = exports.ko = exports.kn = exports.km = exports.kh = exports.ka = exports.ja = exports.it = exports.is = exports.id = exports.hy = exports.hu = exports.hr = exports.hi = exports.he = exports.gu = exports.frCA = exports.fr = exports.fi = exports.fa = exports.es = exports.eo = exports.en = exports.el = exports.de = exports.da = exports.cs = exports.ckb = exports.ca = exports.bn = exports.bg = exports.be = exports.az = exports.ar = void 0;
exports.yo = exports.zhTW = exports.zhCN = exports.vi = exports.uz = exports.ur = exports.uk = exports.ua = exports.tr = exports.tk = exports.th = exports.tg = exports.ta = void 0;
var ar_js_1 = require("./ar.cjs");
Object.defineProperty(exports, "ar", { enumerable: true, get: function () { return __importDefault(ar_js_1).default; } });
var az_js_1 = require("./az.cjs");
Object.defineProperty(exports, "az", { enumerable: true, get: function () { return __importDefault(az_js_1).default; } });
var be_js_1 = require("./be.cjs");
Object.defineProperty(exports, "be", { enumerable: true, get: function () { return __importDefault(be_js_1).default; } });
var bg_js_1 = require("./bg.cjs");
Object.defineProperty(exports, "bg", { enumerable: true, get: function () { return __importDefault(bg_js_1).default; } });
var bn_js_1 = require("./bn.cjs");
Object.defineProperty(exports, "bn", { enumerable: true, get: function () { return __importDefault(bn_js_1).default; } });
var ca_js_1 = require("./ca.cjs");
Object.defineProperty(exports, "ca", { enumerable: true, get: function () { return __importDefault(ca_js_1).default; } });
var ckb_js_1 = require("./ckb.cjs");
Object.defineProperty(exports, "ckb", { enumerable: true, get: function () { return __importDefault(ckb_js_1).default; } });
var cs_js_1 = require("./cs.cjs");
Object.defineProperty(exports, "cs", { enumerable: true, get: function () { return __importDefault(cs_js_1).default; } });
var da_js_1 = require("./da.cjs");
Object.defineProperty(exports, "da", { enumerable: true, get: function () { return __importDefault(da_js_1).default; } });
var de_js_1 = require("./de.cjs");
Object.defineProperty(exports, "de", { enumerable: true, get: function () { return __importDefault(de_js_1).default; } });
var el_js_1 = require("./el.cjs");
Object.defineProperty(exports, "el", { enumerable: true, get: function () { return __importDefault(el_js_1).default; } });
var en_js_1 = require("./en.cjs");
Object.defineProperty(exports, "en", { enumerable: true, get: function () { return __importDefault(en_js_1).default; } });
var eo_js_1 = require("./eo.cjs");
Object.defineProperty(exports, "eo", { enumerable: true, get: function () { return __importDefault(eo_js_1).default; } });
var es_js_1 = require("./es.cjs");
Object.defineProperty(exports, "es", { enumerable: true, get: function () { return __importDefault(es_js_1).default; } });
var fa_js_1 = require("./fa.cjs");
Object.defineProperty(exports, "fa", { enumerable: true, get: function () { return __importDefault(fa_js_1).default; } });
var fi_js_1 = require("./fi.cjs");
Object.defineProperty(exports, "fi", { enumerable: true, get: function () { return __importDefault(fi_js_1).default; } });
var fr_js_1 = require("./fr.cjs");
Object.defineProperty(exports, "fr", { enumerable: true, get: function () { return __importDefault(fr_js_1).default; } });
var fr_CA_js_1 = require("./fr-CA.cjs");
Object.defineProperty(exports, "frCA", { enumerable: true, get: function () { return __importDefault(fr_CA_js_1).default; } });
var gu_js_1 = require("./gu.cjs");
Object.defineProperty(exports, "gu", { enumerable: true, get: function () { return __importDefault(gu_js_1).default; } });
var he_js_1 = require("./he.cjs");
Object.defineProperty(exports, "he", { enumerable: true, get: function () { return __importDefault(he_js_1).default; } });
var hi_js_1 = require("./hi.cjs");
Object.defineProperty(exports, "hi", { enumerable: true, get: function () { return __importDefault(hi_js_1).default; } });
var hr_js_1 = require("./hr.cjs");
Object.defineProperty(exports, "hr", { enumerable: true, get: function () { return __importDefault(hr_js_1).default; } });
var hu_js_1 = require("./hu.cjs");
Object.defineProperty(exports, "hu", { enumerable: true, get: function () { return __importDefault(hu_js_1).default; } });
var hy_js_1 = require("./hy.cjs");
Object.defineProperty(exports, "hy", { enumerable: true, get: function () { return __importDefault(hy_js_1).default; } });
var id_js_1 = require("./id.cjs");
Object.defineProperty(exports, "id", { enumerable: true, get: function () { return __importDefault(id_js_1).default; } });
var is_js_1 = require("./is.cjs");
Object.defineProperty(exports, "is", { enumerable: true, get: function () { return __importDefault(is_js_1).default; } });
var it_js_1 = require("./it.cjs");
Object.defineProperty(exports, "it", { enumerable: true, get: function () { return __importDefault(it_js_1).default; } });
var ja_js_1 = require("./ja.cjs");
Object.defineProperty(exports, "ja", { enumerable: true, get: function () { return __importDefault(ja_js_1).default; } });
var ka_js_1 = require("./ka.cjs");
Object.defineProperty(exports, "ka", { enumerable: true, get: function () { return __importDefault(ka_js_1).default; } });
var kh_js_1 = require("./kh.cjs");
Object.defineProperty(exports, "kh", { enumerable: true, get: function () { return __importDefault(kh_js_1).default; } });
var km_js_1 = require("./km.cjs");
Object.defineProperty(exports, "km", { enumerable: true, get: function () { return __importDefault(km_js_1).default; } });
var kn_js_1 = require("./kn.cjs");
Object.defineProperty(exports, "kn", { enumerable: true, get: function () { return __importDefault(kn_js_1).default; } });
var ko_js_1 = require("./ko.cjs");
Object.defineProperty(exports, "ko", { enumerable: true, get: function () { return __importDefault(ko_js_1).default; } });
var lt_js_1 = require("./lt.cjs");
Object.defineProperty(exports, "lt", { enumerable: true, get: function () { return __importDefault(lt_js_1).default; } });
var mk_js_1 = require("./mk.cjs");
Object.defineProperty(exports, "mk", { enumerable: true, get: function () { return __importDefault(mk_js_1).default; } });
var ms_js_1 = require("./ms.cjs");
Object.defineProperty(exports, "ms", { enumerable: true, get: function () { return __importDefault(ms_js_1).default; } });
var ne_js_1 = require("./ne.cjs");
Object.defineProperty(exports, "ne", { enumerable: true, get: function () { return __importDefault(ne_js_1).default; } });
var nl_js_1 = require("./nl.cjs");
Object.defineProperty(exports, "nl", { enumerable: true, get: function () { return __importDefault(nl_js_1).default; } });
var nn_js_1 = require("./nn.cjs");
Object.defineProperty(exports, "nn", { enumerable: true, get: function () { return __importDefault(nn_js_1).default; } });
var no_js_1 = require("./no.cjs");
Object.defineProperty(exports, "no", { enumerable: true, get: function () { return __importDefault(no_js_1).default; } });
var ota_js_1 = require("./ota.cjs");
Object.defineProperty(exports, "ota", { enumerable: true, get: function () { return __importDefault(ota_js_1).default; } });
var ps_js_1 = require("./ps.cjs");
Object.defineProperty(exports, "ps", { enumerable: true, get: function () { return __importDefault(ps_js_1).default; } });
var pl_js_1 = require("./pl.cjs");
Object.defineProperty(exports, "pl", { enumerable: true, get: function () { return __importDefault(pl_js_1).default; } });
var pt_js_1 = require("./pt.cjs");
Object.defineProperty(exports, "pt", { enumerable: true, get: function () { return __importDefault(pt_js_1).default; } });
var pt_BR_js_1 = require("./pt-BR.cjs");
Object.defineProperty(exports, "ptBR", { enumerable: true, get: function () { return __importDefault(pt_BR_js_1).default; } });
var ro_js_1 = require("./ro.cjs");
Object.defineProperty(exports, "ro", { enumerable: true, get: function () { return __importDefault(ro_js_1).default; } });
var ru_js_1 = require("./ru.cjs");
Object.defineProperty(exports, "ru", { enumerable: true, get: function () { return __importDefault(ru_js_1).default; } });
var sk_js_1 = require("./sk.cjs");
Object.defineProperty(exports, "sk", { enumerable: true, get: function () { return __importDefault(sk_js_1).default; } });
var sl_js_1 = require("./sl.cjs");
Object.defineProperty(exports, "sl", { enumerable: true, get: function () { return __importDefault(sl_js_1).default; } });
var sv_js_1 = require("./sv.cjs");
Object.defineProperty(exports, "sv", { enumerable: true, get: function () { return __importDefault(sv_js_1).default; } });
var ta_js_1 = require("./ta.cjs");
Object.defineProperty(exports, "ta", { enumerable: true, get: function () { return __importDefault(ta_js_1).default; } });
var tg_js_1 = require("./tg.cjs");
Object.defineProperty(exports, "tg", { enumerable: true, get: function () { return __importDefault(tg_js_1).default; } });
var th_js_1 = require("./th.cjs");
Object.defineProperty(exports, "th", { enumerable: true, get: function () { return __importDefault(th_js_1).default; } });
var tk_js_1 = require("./tk.cjs");
Object.defineProperty(exports, "tk", { enumerable: true, get: function () { return __importDefault(tk_js_1).default; } });
var tr_js_1 = require("./tr.cjs");
Object.defineProperty(exports, "tr", { enumerable: true, get: function () { return __importDefault(tr_js_1).default; } });
var ua_js_1 = require("./ua.cjs");
Object.defineProperty(exports, "ua", { enumerable: true, get: function () { return __importDefault(ua_js_1).default; } });
var uk_js_1 = require("./uk.cjs");
Object.defineProperty(exports, "uk", { enumerable: true, get: function () { return __importDefault(uk_js_1).default; } });
var ur_js_1 = require("./ur.cjs");
Object.defineProperty(exports, "ur", { enumerable: true, get: function () { return __importDefault(ur_js_1).default; } });
var uz_js_1 = require("./uz.cjs");
Object.defineProperty(exports, "uz", { enumerable: true, get: function () { return __importDefault(uz_js_1).default; } });
var vi_js_1 = require("./vi.cjs");
Object.defineProperty(exports, "vi", { enumerable: true, get: function () { return __importDefault(vi_js_1).default; } });
var zh_CN_js_1 = require("./zh-CN.cjs");
Object.defineProperty(exports, "zhCN", { enumerable: true, get: function () { return __importDefault(zh_CN_js_1).default; } });
var zh_TW_js_1 = require("./zh-TW.cjs");
Object.defineProperty(exports, "zhTW", { enumerable: true, get: function () { return __importDefault(zh_TW_js_1).default; } });
var yo_js_1 = require("./yo.cjs");
Object.defineProperty(exports, "yo", { enumerable: true, get: function () { return __importDefault(yo_js_1).default; } });
// seal-cjs-exports
(function () {
var keys = Object.getOwnPropertyNames(exports);
for (var i = 0; i < keys.length; i++) {
var desc = Object.getOwnPropertyDescriptor(exports, keys[i]);
if (!desc || !desc.get || !desc.configurable) continue;
var value;
try {
value = desc.get();
} catch (e) {
continue;
}
// a circular require may not have settled this one yet, so leave it live
if (value === undefined) continue;
Object.defineProperty(exports, keys[i], { value: value, writable: false, enumerable: desc.enumerable, configurable: false });
}
Object.freeze(exports);
})();
@@ -0,0 +1,119 @@
import { HTTPException } from "../../http-exception.js";
import { getCookie, getSignedCookie } from "../../helper/cookie/index.js";
import { Jwt } from "../../utils/jwt/index.js";
//#region src/middleware/jwt/jwt.ts
/**
* JWT Auth Middleware for Hono.
*
* @see {@link https://hono.dev/docs/middleware/builtin/jwt}
*
* @param {object} options - The options for the JWT middleware.
* @param {SignatureKey} options.secret - A value of your secret key.
* @param {string} [options.cookie] - If this value is set, then the value is retrieved from the cookie header using that value as a key, which is then validated as a token.
* @param {SignatureAlgorithm} options.alg - An algorithm type that is used for verifying (required). Available types are `HS256` | `HS384` | `HS512` | `RS256` | `RS384` | `RS512` | `PS256` | `PS384` | `PS512` | `ES256` | `ES384` | `ES512` | `EdDSA`.
* @param {string} [options.headerName='Authorization'] - The name of the header to look for the JWT token. Default is 'Authorization'.
* @param {string} [options.realm] - The protection space described by the `realm` parameter of the returned `WWW-Authenticate` challenge header. Defaults to the request URL.
* @param {VerifyOptions} [options.verification] - Additional options for JWT payload verification.
* @returns {MiddlewareHandler} The middleware handler function.
*
* @example
* ```ts
* const app = new Hono()
*
* app.use(
* '/auth/*',
* jwt({
* secret: 'it-is-very-secret',
* alg: 'HS256',
* headerName: 'x-custom-auth-header', // Optional, default is 'Authorization'
* })
* )
*
* app.get('/auth/page', (c) => {
* return c.text('You are authorized')
* })
* ```
*/
const jwt = (options) => {
const verifyOpts = options.verification || {};
if (!options || !options.secret) throw new Error("JWT auth middleware requires options for \"secret\"");
if (!options.alg) throw new Error("JWT auth middleware requires options for \"alg\"");
if (!crypto.subtle || !crypto.subtle.importKey) throw new Error("`crypto.subtle.importKey` is undefined. JWT auth middleware requires it.");
return async function jwt(ctx, next) {
const headerName = options.headerName || "Authorization";
const credentials = ctx.req.raw.headers.get(headerName);
let token;
if (credentials) {
const parts = credentials.split(/\s+/);
if (parts.length !== 2 || parts[0].toLowerCase() !== "bearer") {
const errDescription = "invalid credentials structure";
throw new HTTPException(401, {
message: errDescription,
res: unauthorizedResponse({
ctx,
error: "invalid_request",
errDescription,
realm: options.realm
})
});
} else token = parts[1];
} else if (options.cookie) {
if (typeof options.cookie == "string") token = getCookie(ctx, options.cookie);
else if (options.cookie.secret) {
if (options.cookie.prefixOptions) token = await getSignedCookie(ctx, options.cookie.secret, options.cookie.key, options.cookie.prefixOptions);
else token = await getSignedCookie(ctx, options.cookie.secret, options.cookie.key);
} else if (options.cookie.prefixOptions) token = getCookie(ctx, options.cookie.key, options.cookie.prefixOptions);
else token = getCookie(ctx, options.cookie.key);
}
if (!token) {
const errDescription = "no authorization included in request";
throw new HTTPException(401, {
message: errDescription,
res: unauthorizedResponse({
ctx,
error: "invalid_request",
errDescription,
realm: options.realm
})
});
}
let payload;
let cause;
try {
payload = await Jwt.verify(token, options.secret, {
alg: options.alg,
...verifyOpts
});
} catch (e) {
cause = e;
}
if (!payload) throw new HTTPException(401, {
message: "Unauthorized",
res: unauthorizedResponse({
ctx,
error: "invalid_token",
statusText: "Unauthorized",
errDescription: "token verification failure",
realm: options.realm
}),
cause
});
ctx.set("jwtPayload", payload);
await next();
};
};
function unauthorizedResponse(opts) {
const realm = (opts.realm ?? opts.ctx.req.url).replace(/"/g, "\\\"");
const errDescription = opts.errDescription.replace(/"/g, "\\\"");
return new Response("Unauthorized", {
status: 401,
statusText: opts.statusText,
headers: { "WWW-Authenticate": `Bearer realm="${realm}",error="${opts.error}",error_description="${errDescription}"` }
});
}
const verifyWithJwks = Jwt.verifyWithJwks;
const verify = Jwt.verify;
const decode = Jwt.decode;
const sign = Jwt.sign;
//#endregion
export { decode, jwt, sign, verify, verifyWithJwks };
@@ -0,0 +1,140 @@
"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: "অক্ষর", verb: "থাকতে হবে" },
file: { unit: "বাইট", verb: "থাকতে হবে" },
array: { unit: "আইটেম", verb: "থাকতে হবে" },
set: { unit: "আইটেম", verb: "থাকতে হবে" },
map: { unit: "এন্ট্রি", verb: "থাকতে হবে" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const FormatDictionary = {
regex: "ইনপুট",
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 ঠিকানা",
mac: "MAC ঠিকানা",
cidrv4: "IPv4 রেঞ্জ",
cidrv6: "IPv6 রেঞ্জ",
base64: "base64-এনকোডেড স্ট্রিং",
base64url: "base64url-এনকোডেড স্ট্রিং",
json_string: "JSON স্ট্রিং",
e164: "E.164 নম্বর",
credit_card: "ক্রেডিট কার্ড নম্বর",
currency_code: "মুদ্রা কোড",
iban: "IBAN",
jwt: "JWT",
template_literal: "ইনপুট",
};
const TypeDictionary = {
nan: "NaN",
};
return (issue) => {
switch (issue.code) {
case "invalid_type": {
const expected = TypeDictionary[issue.expected] ?? issue.expected;
const receivedType = util.parsedType(issue.input);
const received = TypeDictionary[receivedType] ?? receivedType;
return `অবৈধ ইনপুট: প্রত্যাশিত ${expected}, প্রাপ্ত ${received}`;
}
case "invalid_value":
if (issue.values.length === 1)
return `অবৈধ ইনপুট: প্রত্যাশিত ${util.stringifyPrimitive(issue.values[0])}`;
return `অবৈধ অপশন: ${util.joinValues(issue.values, " | ")} এর মধ্যে একটি প্রত্যাশিত`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `অনেক বড়: ${issue.origin ?? "মান"} ${adj}${issue.maximum.toString()} ${sizing.unit ?? "এলিমেন্ট"} হতে হবে`;
return `অনেক বড়: ${issue.origin ?? "মান"} ${adj}${issue.maximum.toString()} হতে হবে`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `অনেক ছোট: ${issue.origin} ${adj}${issue.minimum.toString()} ${sizing.unit} হতে হবে`;
}
return `অনেক ছোট: ${issue.origin} ${adj}${issue.minimum.toString()} হতে হবে`;
}
case "invalid_format": {
const _issue = issue;
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 `অবৈধ ${FormatDictionary[_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":
if (issue.options && Array.isArray(issue.options) && issue.options.length > 0) {
const opts = issue.options.map((o) => `'${o}'`).join(" | ");
return `অবৈধ ডিসক্রিমিনেটর মান। প্রত্যাশিত ${opts}`;
}
return "অবৈধ ইনপুট";
case "invalid_element":
return `${issue.origin} এ অবৈধ মান`;
default:
return "অবৈধ ইনপুট";
}
};
};
function default_1() {
return {
localeError: error(),
};
}
module.exports = exports.default;
@@ -0,0 +1,47 @@
import { a as SerializedCoverageConfig, S as SerializedConfig } from './chunks/config.d.A1h_Y6Jt.js';
import { R as RuntimeCoverageModuleLoader } from './chunks/coverage.d.BZtK59WP.js';
import { SerializedDiffOptions } from '@vitest/utils/diff';
export { O as OTELCarrier, T as Traces } from './chunks/traces.d.D2T_R8rx.js';
export { collectTests, startTests } from '@vitest/runner';
import * as _vitest_spy from '@vitest/spy';
export { _vitest_spy as SpyModule };
export { LoupeOptions, ParsedStack, StringifyOptions } from '@vitest/utils';
export { browserFormat, format, inspect, stringify } from '@vitest/utils/display';
export { processError } from '@vitest/utils/error';
export { getType } from '@vitest/utils/helpers';
export { DecodedMap, getOriginalPosition } from '@vitest/utils/source-map';
export { getSafeTimers, setSafeTimers } from '@vitest/utils/timers';
import '@vitest/pretty-format';
import '@vitest/snapshot';
declare function startCoverageInsideWorker(options: SerializedCoverageConfig | undefined, loader: RuntimeCoverageModuleLoader, runtimeOptions: {
isolate: boolean;
}): Promise<unknown>;
declare function takeCoverageInsideWorker(options: SerializedCoverageConfig | undefined, loader: RuntimeCoverageModuleLoader): Promise<unknown>;
declare function stopCoverageInsideWorker(options: SerializedCoverageConfig | undefined, loader: RuntimeCoverageModuleLoader, runtimeOptions: {
isolate: boolean;
}): Promise<unknown>;
interface PublicModuleRunner {
import: (id: string) => Promise<any>;
}
declare function setupCommonEnv(config: SerializedConfig): Promise<void>;
declare function loadDiffConfig(config: SerializedConfig, moduleRunner: PublicModuleRunner): Promise<SerializedDiffOptions | undefined>;
declare function loadSnapshotSerializers(config: SerializedConfig, moduleRunner: PublicModuleRunner): Promise<void>;
interface FsOptions {
encoding?: BufferEncoding;
flag?: string | number;
}
interface BrowserCommands {
readFile: (path: string, options?: BufferEncoding | FsOptions) => Promise<string>;
writeFile: (path: string, content: string, options?: BufferEncoding | (FsOptions & {
mode?: number | string;
})) => Promise<void>;
removeFile: (path: string) => Promise<void>;
}
interface CDPSession {}
export { loadDiffConfig, loadSnapshotSerializers, setupCommonEnv, startCoverageInsideWorker, stopCoverageInsideWorker, takeCoverageInsideWorker };
export type { BrowserCommands, CDPSession, FsOptions };
@@ -0,0 +1,13 @@
export declare enum DefinitionType {
CatchClause = "CatchClause",
ClassName = "ClassName",
FunctionName = "FunctionName",
ImplicitGlobalVariable = "ImplicitGlobalVariable",
ImportBinding = "ImportBinding",
Parameter = "Parameter",
TSEnumName = "TSEnumName",
TSEnumMember = "TSEnumMemberName",
TSModuleName = "TSModuleName",
Type = "Type",
Variable = "Variable"
}
@@ -0,0 +1,6 @@
"use strict";
const addMinutes = require("./addMinutes.js");
function subMinutes(date, minutes) {
return addMinutes(date, -minutes);
}
module.exports = subMinutes;
@@ -0,0 +1,6 @@
export default function (options: {
storageKey: string;
key?: string;
behavior?: ScrollToOptions['behavior'];
shouldScrollRestoration?: boolean;
}): void;
@@ -0,0 +1 @@
{"version":3,"file":"equal-not.js","sources":["../../../src/icons/equal-not.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name EqualNot\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8bGluZSB4MT0iNSIgeDI9IjE5IiB5MT0iOSIgeTI9IjkiIC8+CiAgPGxpbmUgeDE9IjUiIHgyPSIxOSIgeTE9IjE1IiB5Mj0iMTUiIC8+CiAgPGxpbmUgeDE9IjE5IiB4Mj0iNSIgeTE9IjUiIHkyPSIxOSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/equal-not\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst EqualNot = createLucideIcon('EqualNot', [\n ['line', { x1: '5', x2: '19', y1: '9', y2: '9', key: '1nwqeh' }],\n ['line', { x1: '5', x2: '19', y1: '15', y2: '15', key: 'g8yjpy' }],\n ['line', { x1: '19', x2: '5', y1: '5', y2: '19', key: '1x9vlm' }],\n]);\n\nexport default EqualNot;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAC5C,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAC/D,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACjE,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAClE,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,33 @@
import { Await, useAwaited } from "./awaited.js";
import { CatchBoundary, ErrorComponent } from "./CatchBoundary.js";
import { ClientOnly, useHydrated } from "./ClientOnly.js";
import { useRouter } from "./useRouter.js";
import { useMatch } from "./useMatch.js";
import { useLoaderData } from "./useLoaderData.js";
import { useLoaderDeps } from "./useLoaderDeps.js";
import { useParams } from "./useParams.js";
import { useSearch } from "./useSearch.js";
import { Navigate, useNavigate } from "./useNavigate.js";
import { useRouteContext } from "./useRouteContext.js";
import { Link, createLink, linkOptions, useLinkProps } from "./link.js";
import { NotFoundRoute, RootRoute, Route, RouteApi, createRootRoute, createRootRouteWithContext, createRoute, createRouteMask, getRouteApi, rootRouteWithContext } from "./route.js";
import { FileRoute, FileRouteLoader, LazyRoute, createFileRoute, createLazyFileRoute, createLazyRoute } from "./fileRoute.js";
import { lazyRouteComponent } from "./lazyRouteComponent.js";
import { CatchNotFound, DefaultGlobalNotFound } from "./not-found.js";
import { ScriptOnce } from "./ScriptOnce.js";
import { Match, Outlet } from "./Match.js";
import { MatchRoute, Matches, useChildMatches, useMatchRoute, useMatches, useParentMatches } from "./Matches.js";
import { Router, createRouter } from "./router.js";
import { RouterContextProvider, RouterProvider } from "./RouterProvider.js";
import { ScrollRestoration, useElementScrollRestoration } from "./ScrollRestoration.js";
import { Block, useBlocker } from "./useBlocker.js";
import { useRouterState } from "./useRouterState.js";
import { useLocation } from "./useLocation.js";
import { useCanGoBack } from "./useCanGoBack.js";
import { Asset } from "./Asset.js";
import { useTags } from "./headContentUtils.js";
import { HeadContent } from "./HeadContent.js";
import { Scripts } from "./Scripts.js";
import { DEFAULT_PROTOCOL_ALLOWLIST, SearchParamError, cleanPath, composeRewrites, createBrowserHistory, createControlledPromise, createHashHistory, createHistory, createMemoryHistory, createRouterConfig, createSerializationAdapter, deepEqual, defaultParseSearch, defaultStringifySearch, defer, functionalUpdate, interpolatePath, isMatch, isPlainArray, isPlainObject, joinPaths, lazyFn, parseSearchWith, replaceEqualDeep, resolvePath, retainSearchParams, stringifySearchWith, stripSearchParams, trimPath, trimPathLeft, trimPathRight } from "./index.js";
import { isNotFound, isRedirect, notFound, redirect, rootRouteId } from "@tanstack/router-core";
export { Asset, Await, Block, CatchBoundary, CatchNotFound, ClientOnly, DEFAULT_PROTOCOL_ALLOWLIST, DefaultGlobalNotFound, ErrorComponent, FileRoute, FileRouteLoader, HeadContent, LazyRoute, Link, Match, MatchRoute, Matches, Navigate, NotFoundRoute, Outlet, RootRoute, Route, RouteApi, Router, RouterContextProvider, RouterProvider, ScriptOnce, Scripts, ScrollRestoration, SearchParamError, cleanPath, composeRewrites, createBrowserHistory, createControlledPromise, createFileRoute, createHashHistory, createHistory, createLazyFileRoute, createLazyRoute, createLink, createMemoryHistory, createRootRoute, createRootRouteWithContext, createRoute, createRouteMask, createRouter, createRouterConfig, createSerializationAdapter, deepEqual, defaultParseSearch, defaultStringifySearch, defer, functionalUpdate, getRouteApi, interpolatePath, isMatch, isNotFound, isPlainArray, isPlainObject, isRedirect, joinPaths, lazyFn, lazyRouteComponent, linkOptions, notFound, parseSearchWith, redirect, replaceEqualDeep, resolvePath, retainSearchParams, rootRouteId, rootRouteWithContext, stringifySearchWith, stripSearchParams, trimPath, trimPathLeft, trimPathRight, useAwaited, useBlocker, useCanGoBack, useChildMatches, useElementScrollRestoration, useHydrated, useLinkProps, useLoaderData, useLoaderDeps, useLocation, useMatch, useMatchRoute, useMatches, useNavigate, useParams, useParentMatches, useRouteContext, useRouter, useRouterState, useSearch, useTags };
@@ -0,0 +1,9 @@
import type { TSESTree } from '@typescript-eslint/types';
import type { ScopeManager } from '../ScopeManager';
import type { Scope } from './Scope';
import { ScopeBase } from './ScopeBase';
import { ScopeType } from './ScopeType';
export declare class WithScope extends ScopeBase<ScopeType.with, TSESTree.WithStatement, Scope> {
constructor(scopeManager: ScopeManager, upperScope: WithScope['upper'], block: WithScope['block']);
close(scopeManager: ScopeManager): Scope | null;
}
@@ -0,0 +1 @@
{"version":3,"file":"feeds.js","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/0ab8bcf1ecfc70dfc93291a4cb2496578ac25e9c/src/","sources":["feeds.ts"],"names":[],"mappings":"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 truncated
@@ -0,0 +1,55 @@
#!/usr/bin/env python3
# Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""These functions are executed via gyp-flock-tool when using the Makefile
generator. Used on systems that don't have a built-in flock."""
import fcntl
import os
import struct
import subprocess
import sys
def main(args):
executor = FlockTool()
executor.Dispatch(args)
class FlockTool:
"""This class emulates the 'flock' command."""
def Dispatch(self, args):
"""Dispatches a string command to a method."""
if len(args) < 1:
raise Exception("Not enough arguments")
method = "Exec%s" % self._CommandifyName(args[0])
getattr(self, method)(*args[1:])
def _CommandifyName(self, name_string):
"""Transforms a tool name like copy-info-plist to CopyInfoPlist"""
return name_string.title().replace("-", "")
def ExecFlock(self, lockfile, *cmd_list):
"""Emulates the most basic behavior of Linux's flock(1)."""
# Rely on exception handling to report errors.
# Note that the stock python on SunOS has a bug
# where fcntl.flock(fd, LOCK_EX) always fails
# with EBADF, that's why we use this F_SETLK
# hack instead.
fd = os.open(lockfile, os.O_WRONLY | os.O_NOCTTY | os.O_CREAT, 0o666)
if sys.platform.startswith("aix") or sys.platform == "os400":
# Python on AIX is compiled with LARGEFILE support, which changes the
# struct size.
op = struct.pack("hhIllqq", fcntl.F_WRLCK, 0, 0, 0, 0, 0, 0)
else:
op = struct.pack("hhllhhl", fcntl.F_WRLCK, 0, 0, 0, 0, 0, 0)
fcntl.fcntl(fd, fcntl.F_SETLK, op)
return subprocess.call(cmd_list)
if __name__ == "__main__":
sys.exit(main(sys.argv[1:]))
@@ -0,0 +1,80 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const util_1 = require("../util");
exports.default = (0, util_1.createRule)({
name: 'no-array-delete',
meta: {
type: 'problem',
docs: {
description: 'Disallow using the `delete` operator on array values',
recommended: 'recommended',
requiresTypeChecking: true,
},
hasSuggestions: true,
messages: {
noArrayDelete: 'Using the `delete` operator with an array expression is unsafe.',
useSplice: 'Use `array.splice()` instead.',
},
schema: [],
},
defaultOptions: [],
create(context) {
const services = (0, util_1.getParserServices)(context);
const checker = services.program.getTypeChecker();
function isUnderlyingTypeArray(type) {
const predicate = (t) => checker.isArrayType(t) || checker.isTupleType(t);
if (type.isUnion()) {
return type.types.every(predicate);
}
if (type.isIntersection()) {
return type.types.some(predicate);
}
return predicate(type);
}
return {
'UnaryExpression[operator="delete"]'(node) {
const { argument } = node;
if (argument.type !== utils_1.AST_NODE_TYPES.MemberExpression) {
return;
}
const type = (0, util_1.getConstrainedTypeAtLocation)(services, argument.object);
if (!isUnderlyingTypeArray(type)) {
return;
}
context.report({
node,
messageId: 'noArrayDelete',
suggest: [
{
messageId: 'useSplice',
fix(fixer) {
const { object, property } = argument;
const shouldHaveParentheses = property.type === utils_1.AST_NODE_TYPES.SequenceExpression;
const nodeMap = services.esTreeNodeToTSNodeMap;
const target = nodeMap.get(object).getText();
const rawKey = nodeMap.get(property).getText();
const key = shouldHaveParentheses ? `(${rawKey})` : rawKey;
let suggestion = `${target}.splice(${key}, 1)`;
const comments = context.sourceCode.getCommentsInside(node);
if (comments.length > 0) {
const indentationCount = node.loc.start.column;
const indentation = ' '.repeat(indentationCount);
const commentsText = comments
.map(comment => {
return comment.type === utils_1.AST_TOKEN_TYPES.Line
? `//${comment.value}`
: `/*${comment.value}*/`;
})
.join(`\n${indentation}`);
suggestion = `${commentsText}\n${indentation}${suggestion}`;
}
return fixer.replaceText(node, suggestion);
},
},
],
});
},
};
},
});
@@ -0,0 +1,21 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Zap = createLucideIcon("Zap", [
[
"path",
{
d: "M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",
key: "1xq2db"
}
]
]);
export { Zap as default };
//# sourceMappingURL=zap.js.map
@@ -0,0 +1,26 @@
'use strict'
const SemVer = require('../classes/semver')
const Range = require('../classes/range')
const minSatisfying = (versions, range, options) => {
let min = null
let minSV = null
let rangeObj = null
try {
rangeObj = new Range(range, options)
} catch (er) {
return null
}
versions.forEach((v) => {
if (rangeObj.test(v)) {
// satisfies(v, range, options)
if (!min || minSV.compare(v) === 1) {
// compare(min, v, true)
min = v
minSV = new SemVer(min, options)
}
}
})
return min
}
module.exports = minSatisfying
@@ -0,0 +1,22 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const SquarePen = createLucideIcon("SquarePen", [
["path", { d: "M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7", key: "1m0v6g" }],
[
"path",
{
d: "M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",
key: "ohrbg2"
}
]
]);
export { SquarePen as default };
//# sourceMappingURL=square-pen.js.map
@@ -0,0 +1,6 @@
module.exports = isPromise;
module.exports.default = isPromise;
function isPromise(obj) {
return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
}
@@ -0,0 +1,22 @@
(The MIT License)
Copyright (c) 2012–2024 LearnBoost <tj@learnboost.com> and other contributors;
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,11 @@
import daysInMonth from "./daysInMonth.mjs";
function addMonths(date, months) {
const expectedMonth = date.getMonth() + months;
const tempMaxDay = daysInMonth(new Date(date.getFullYear(), expectedMonth, 1, 0, 0, 0, 0));
const currentDay = date.getDate();
date.setMonth(expectedMonth, currentDay > tempMaxDay ? tempMaxDay : currentDay);
return date;
}
export {
addMonths as default
};
@@ -0,0 +1,9 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
export { default } from './grid-2x2-plus.js';
//# sourceMappingURL=grid-2-x-2-plus.js.map
@@ -0,0 +1,71 @@
{
"author": "Jake Luer <jake@alogicalparadox.com>",
"name": "chai",
"type": "module",
"description": "BDD/TDD assertion library for node.js and the browser. Test framework agnostic.",
"keywords": [
"test",
"assertion",
"assert",
"testing",
"chai"
],
"files": [
"index.js",
"register-*.js"
],
"homepage": "http://chaijs.com",
"license": "MIT",
"contributors": [
"Jake Luer <jake@alogicalparadox.com>",
"Domenic Denicola <domenic@domenicdenicola.com> (http://domenicdenicola.com)",
"Veselin Todorov <hi@vesln.com>",
"John Firebaugh <john.firebaugh@gmail.com>"
],
"version": "6.2.2",
"repository": {
"type": "git",
"url": "https://github.com/chaijs/chai"
},
"bugs": {
"url": "https://github.com/chaijs/chai/issues"
},
"main": "./index.js",
"scripts": {
"build": "esbuild --bundle --format=esm --target=es2021 --keep-names --legal-comments=none --outfile=index.js lib/chai.js",
"prebuild": "npm run clean",
"format": "prettier --write lib",
"pretest": "npm run lint",
"test": "npm run test-node && npm run test-chrome",
"test-node": "c8 --99 --check-coverage mocha --require ./test/bootstrap/index.js test/*.js",
"test-chrome": "web-test-runner --playwright",
"lint": "npm run lint:js && npm run lint:format",
"lint:js": "eslint lib/",
"lint:format": "prettier --check lib",
"lint:types": "tsc",
"clean": "rm -rf index.js coverage/"
},
"engines": {
"node": ">=18"
},
"devDependencies": {
"@eslint/js": "^9.17.0",
"@rollup/plugin-commonjs": "^29.0.0",
"@web/dev-server-rollup": "^0.6.1",
"@web/test-runner": "^0.20.0",
"@web/test-runner-playwright": "^0.11.0",
"assertion-error": "^2.0.1",
"c8": "^10.1.3",
"check-error": "^2.1.1",
"deep-eql": "^5.0.1",
"esbuild": "^0.27.0",
"eslint": "^9.0.0",
"eslint-plugin-jsdoc": "^61.0.0",
"globals": "^16.3.0",
"loupe": "^3.1.0",
"mocha": "^11.0.0",
"pathval": "^2.0.0",
"prettier": "^3.4.2",
"typescript": "~5.9.0"
}
}
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AA0CA,eAAO,MAAM,MAAM,MACd,MAAM,OACJ,MAAM,OACN,MAAM,YACD,OAAO,KAAK,GAAG,SA0B1B,CAAA;AAcD,eAAO,MAAM,UAAU,MAAO,MAAM,OAAO,MAAM,OAAO,MAAM,SAiB7D,CAAA"}
@@ -0,0 +1 @@
{"version":3,"file":"map-value.mjs","sources":["../../../src/value/map-value.ts"],"sourcesContent":["import { MotionValue } from \".\"\nimport { transform, TransformOptions } from \"../utils/transform\"\nimport { transformValue } from \"./transform-value\"\n\nexport type MapInputRange = number[]\n\n/**\n * Create a `MotionValue` that maps the output of another `MotionValue` by\n * mapping it from one range of values into another.\n *\n * @remarks\n *\n * Given an input range of `[-200, -100, 100, 200]` and an output range of\n * `[0, 1, 1, 0]`, the returned `MotionValue` will:\n *\n * - When provided a value between `-200` and `-100`, will return a value between `0` and `1`.\n * - When provided a value between `-100` and `100`, will return `1`.\n * - When provided a value between `100` and `200`, will return a value between `1` and `0`\n *\n * The input range must be a linear series of numbers. The output range\n * can be any value type supported by Motion: numbers, colors, shadows, etc.\n *\n * Every value in the output range must be of the same type and in the same format.\n *\n * ```jsx\n * const x = motionValue(0)\n * const xRange = [-200, -100, 100, 200]\n * const opacityRange = [0, 1, 1, 0]\n * const opacity = mapValue(x, xRange, opacityRange)\n * ```\n *\n * @param inputValue - `MotionValue`\n * @param inputRange - A linear series of numbers (either all increasing or decreasing)\n * @param outputRange - A series of numbers, colors or strings. Must be the same length as `inputRange`.\n * @param options -\n *\n * - clamp: boolean. Clamp values to within the given range. Defaults to `true`\n * - ease: EasingFunction[]. Easing functions to use on the interpolations between each value in the input and output ranges. If provided as an array, the array must be one item shorter than the input and output ranges, as the easings apply to the transition between each.\n *\n * @returns `MotionValue`\n *\n * @public\n */\nexport function mapValue<O>(\n inputValue: MotionValue<number>,\n inputRange: MapInputRange,\n outputRange: O[],\n options?: TransformOptions<O>\n): MotionValue<O> {\n const map = transform(inputRange, outputRange, options)\n return transformValue(() => map(inputValue.get()))\n}\n"],"names":[],"mappings":";;;AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCG;AACG,SAAU,QAAQ,CACpB,UAA+B,EAC/B,UAAyB,EACzB,WAAgB,EAChB,OAA6B,EAAA;IAE7B,MAAM,GAAG,GAAG,SAAS,CAAC,UAAU,EAAE,WAAW,EAAE,OAAO,CAAC;AACvD,IAAA,OAAO,cAAc,CAAC,MAAM,GAAG,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,CAAC;AACtD;;;;"}
@@ -0,0 +1 @@
{"version":3,"file":"square-chevron-up.js","sources":["../../../src/icons/square-chevron-up.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name SquareChevronUp\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHg9IjMiIHk9IjMiIHJ4PSIyIiAvPgogIDxwYXRoIGQ9Im04IDE0IDQtNCA0IDQiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/square-chevron-up\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst SquareChevronUp = createLucideIcon('SquareChevronUp', [\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', key: 'afitv7' }],\n ['path', { d: 'm8 14 4-4 4 4', key: 'fy2ptz' }],\n]);\n\nexport default SquareChevronUp;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAkB,iBAAiB,iBAAmB,CAAA,CAAA,CAAA;AAAA,CAAA,CAC1D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAiB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAChD,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"git-compare.js","sources":["../../../src/icons/git-compare.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name GitCompare\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxOCIgY3k9IjE4IiByPSIzIiAvPgogIDxjaXJjbGUgY3g9IjYiIGN5PSI2IiByPSIzIiAvPgogIDxwYXRoIGQ9Ik0xMyA2aDNhMiAyIDAgMCAxIDIgMnY3IiAvPgogIDxwYXRoIGQ9Ik0xMSAxOEg4YTIgMiAwIDAgMS0yLTJWOSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/git-compare\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst GitCompare = createLucideIcon('GitCompare', [\n ['circle', { cx: '18', cy: '18', r: '3', key: '1xkwt0' }],\n ['circle', { cx: '6', cy: '6', r: '3', key: '1lh9wr' }],\n ['path', { d: 'M13 6h3a2 2 0 0 1 2 2v7', key: '1yeb86' }],\n ['path', { d: 'M11 18H8a2 2 0 0 1-2-2V9', key: '19pyzm' }],\n]);\n\nexport default GitCompare;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,iBAAiB,YAAc,CAAA,CAAA,CAAA;AAAA,CAChD,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CACxD,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,EAAK,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACtD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3D,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
module.exports={C:{"65":0.00734,"66":0.00245,"72":0.00245,"80":0.00245,"99":0.00245,"105":0.00245,"109":0.00245,"112":0.00245,"115":0.78761,"120":0.25683,"121":0.521,"123":0.00489,"124":0.00245,"125":0.00245,"127":0.00734,"134":0.00245,"135":0.00245,"136":0.00245,"140":0.02446,"142":0.00245,"144":0.00245,"145":0.00245,"146":0.00245,"147":0.00245,"148":0.00245,"149":0.00489,"150":0.00489,"151":0.00489,"152":0.04158,"153":0.0318,"154":0.12475,"155":0.35467,"156":0.25438,"157":0.01468,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 67 68 69 70 71 73 74 75 76 77 78 79 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 100 101 102 103 104 106 107 108 110 111 113 114 116 117 118 119 122 126 128 129 130 131 132 133 137 138 139 141 143 158 159 160 3.5 3.6"},D:{"55":0.00245,"58":0.00245,"62":0.02201,"63":0.00245,"64":0.00245,"65":0.00489,"66":0.00245,"68":0.00245,"69":0.00489,"70":0.01468,"71":0.00245,"73":0.00245,"74":0.00489,"75":0.00245,"76":0.00245,"77":0.00245,"79":0.00978,"80":0.00734,"81":0.00245,"83":0.00245,"86":0.00489,"87":0.00489,"88":0.00245,"91":0.00245,"92":0.00245,"93":0.00734,"94":0.00245,"95":0.00734,"96":0.00245,"98":0.00245,"101":0.02201,"103":0.07827,"104":0.0636,"105":0.07827,"106":0.07093,"107":0.06604,"108":0.06849,"109":0.51121,"110":0.0636,"111":0.07827,"112":0.06604,"113":0.00245,"114":0.01223,"116":0.13698,"117":0.0636,"118":0.31064,"119":0.52589,"120":0.58949,"121":0.00489,"122":0.01223,"123":0.00978,"124":0.07583,"125":0.01468,"126":0.01712,"127":0.01468,"128":0.01957,"129":0.00978,"130":0.01468,"131":0.16388,"132":0.00489,"133":0.1541,"134":0.02691,"135":0.0318,"136":0.03424,"137":0.03914,"138":0.13942,"139":0.03914,"140":0.04403,"141":0.03669,"142":0.10762,"143":0.02201,"144":0.02691,"145":0.03914,"146":0.26906,"147":0.05137,"148":0.09295,"149":0.22992,"150":0.34978,"151":1.15696,"152":4.40769,"153":2.86427,"154":0.58949,"155":0.01468,"156":0.00245,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 56 57 59 60 61 67 72 78 84 85 89 90 97 99 100 102 115 157"},F:{"37":0.00245,"53":0.00245,"54":0.00245,"55":0.00245,"56":0.00245,"58":0.00245,"79":0.00245,"90":0.00245,"92":0.00245,"93":0.00245,"94":0.00245,"95":0.0318,"96":0.00245,"97":0.00978,"98":0.01223,"99":0.00978,"100":0.05381,"101":0.03669,"105":0.00245,"106":0.00245,"107":0.00245,"131":0.01223,"133":0.00978,"134":0.03914,"135":0.26661,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 57 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 80 81 82 83 84 85 86 87 88 89 91 102 103 104 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 132 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"15":0.00489,"18":0.00978,"84":0.00245,"89":0.00245,"90":0.00489,"92":0.01468,"100":0.00489,"109":0.00734,"114":0.07093,"119":0.25194,"120":0.25683,"122":0.00734,"131":0.00245,"132":0.00245,"134":0.00245,"136":0.00245,"138":0.00245,"139":0.00489,"140":0.00734,"141":0.00489,"142":0.00489,"143":0.00489,"144":0.00978,"145":0.00734,"146":0.00489,"147":0.00734,"148":0.05137,"149":0.01468,"150":0.05626,"151":0.13453,"152":0.79495,"153":0.78761,"154":0.1541,_:"12 13 14 16 17 79 80 81 83 85 86 87 88 91 93 94 95 96 97 98 99 101 102 103 104 105 106 107 108 110 111 112 113 115 116 117 118 121 123 124 125 126 127 128 129 130 133 135 137"},E:{"13":0.00245,"27":0.01957,_:"4 5 6 7 8 9 10 11 12 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 15.1 15.4 15.5 16.1 16.2 17.0 17.2 27.1 TP","11.1":0.00245,"12.1":0.00245,"13.1":0.00489,"14.1":0.00245,"15.2-15.3":0.00245,"15.6":0.02691,"16.0":0.00245,"16.3":0.00245,"16.4":0.00245,"16.5":0.00245,"16.6":0.01957,"17.1":0.00489,"17.3":0.00245,"17.4":0.00245,"17.5":0.00489,"17.6":0.03424,"18.0":0.00245,"18.1":0.00245,"18.2":0.00489,"18.3":0.00489,"18.4":0.00245,"18.5-18.7":0.01223,"26.0":0.00734,"26.1":0.01223,"26.2":0.01712,"26.3":0.01223,"26.4":0.01712,"26.5":0.04892,"26.6":0.13453,"27.2":0.00245},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00083,"5.0-5.1":0.00083,"6.0-6.1":0,"7.0-7.1":0.00166,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.0083,"11.0-11.2":0.00083,"11.3-11.4":0.00166,"12.0-12.1":0,"12.2-12.5":0.02157,"13.0-13.1":0,"13.2":0.00415,"13.3":0,"13.4-13.7":0.00083,"14.0-14.4":0.00332,"14.5-14.8":0.00498,"15.0-15.1":0.00498,"15.2-15.3":0.00332,"15.4":0.00415,"15.5":0.00498,"15.6-15.8":0.10784,"16.0":0.0083,"16.1":0.01493,"16.2":0.0083,"16.3":0.01825,"16.4":0.00415,"16.5":0.00664,"16.6-16.7":0.15015,"17.0":0.00581,"17.1":0.0083,"17.2":0.0083,"17.3":0.01244,"17.4":0.01742,"17.5":0.03401,"17.6-17.7":0.08793,"18.0":0.01825,"18.1":0.0365,"18.2":0.04977,"18.3":0.08627,"18.4":0.05392,"18.5-18.7":1.11407,"26.0":0.05392,"26.1":0.05475,"26.2":0.14268,"26.3":0.15429,"26.4":0.11282,"26.5":0.75571,"26.Line truncated
@@ -0,0 +1,14 @@
import * as posix from './posix.js';
import * as win32 from './win32.js';
export * from './options.js';
export { win32, posix };
/**
* Determine whether a path is executable on the current platform.
*/
export declare const isexe: (path: string, options?: import("./options.js").IsexeOptions) => Promise<boolean>;
/**
* Synchronously determine whether a path is executable on the
* current platform.
*/
export declare const sync: (path: string, options?: import("./options.js").IsexeOptions) => boolean;
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,83 @@
/* -*- Mode: js; js-indent-level: 2; -*- */
/*
* Copyright 2014 Mozilla Foundation and contributors
* Licensed under the New BSD license. See LICENSE or:
* http://opensource.org/licenses/BSD-3-Clause
*/
const util = require("./util");
/**
* Determine whether mappingB is after mappingA with respect to generated
* position.
*/
function generatedPositionAfter(mappingA, mappingB) {
// Optimized for most common case
const lineA = mappingA.generatedLine;
const lineB = mappingB.generatedLine;
const columnA = mappingA.generatedColumn;
const columnB = mappingB.generatedColumn;
return (
lineB > lineA ||
(lineB == lineA && columnB >= columnA) ||
util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0
);
}
/**
* A data structure to provide a sorted view of accumulated mappings in a
* performance conscious manner. It trades a negligible overhead in general
* case for a large speedup in case of mappings being added in order.
*/
class MappingList {
constructor() {
this._array = [];
this._sorted = true;
// Serves as infimum
this._last = { generatedLine: -1, generatedColumn: 0 };
}
/**
* Iterate through internal items. This method takes the same arguments that
* `Array.prototype.forEach` takes.
*
* NOTE: The order of the mappings is NOT guaranteed.
*/
unsortedForEach(aCallback, aThisArg) {
this._array.forEach(aCallback, aThisArg);
}
/**
* Add the given source mapping.
*
* @param Object aMapping
*/
add(aMapping) {
if (generatedPositionAfter(this._last, aMapping)) {
this._last = aMapping;
this._array.push(aMapping);
} else {
this._sorted = false;
this._array.push(aMapping);
}
}
/**
* Returns the flat, sorted array of mappings. The mappings are sorted by
* generated position.
*
* WARNING: This method returns internal data without copying, for
* performance. The return value must NOT be mutated, and should be treated as
* an immutable borrow. If you want to take ownership, you must make your own
* copy.
*/
toArray() {
if (!this._sorted) {
this._array.sort(util.compareByGeneratedPositionsInflated);
this._sorted = true;
}
return this._array;
}
}
exports.MappingList = MappingList;
@@ -0,0 +1,8 @@
export {
renderToPipeableStream,
renderToReadableStream,
renderToStaticMarkup,
renderToString,
resume,
resumeToPipeableStream,
} from "./server";
@@ -0,0 +1 @@
module.exports={C:{"115":0.00612,"120":0.07343,"121":0.15298,"122":0.01224,"123":0.01224,"124":0.04895,"125":0.00612,"126":0.01224,"127":0.00612,"130":0.00612,"131":0.00612,"133":0.00612,"135":0.00612,"138":0.01836,"140":0.01224,"141":0.00612,"142":0.01224,"147":0.01836,"150":0.00612,"153":0.01836,"154":0.12238,"155":0.41609,"156":0.26924,"158":0.00612,"159":0.00612,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 128 129 132 134 136 137 139 143 144 145 146 148 149 151 152 157 160 3.5 3.6"},D:{"80":0.1285,"84":0.00612,"86":0.00612,"87":0.00612,"91":0.00612,"92":0.00612,"93":0.00612,"101":0.01224,"103":0.67309,"104":0.69145,"105":0.69757,"106":0.67921,"107":0.69145,"108":0.68533,"109":0.95456,"110":0.69757,"111":0.66085,"112":0.67921,"113":0.00612,"116":1.3523,"117":0.7098,"118":0.29371,"119":0.15909,"120":0.83218,"121":0.01224,"122":0.03671,"123":0.04895,"124":0.68533,"126":0.01224,"128":0.00612,"130":0.02448,"131":1.46244,"132":0.00612,"133":1.44408,"134":0.0979,"135":0.10402,"136":0.09179,"137":0.10402,"138":0.17745,"139":0.1285,"140":0.11014,"141":0.13462,"142":0.50176,"143":0.01224,"144":0.36714,"145":0.42833,"146":0.07343,"147":0.03671,"148":0.69757,"149":0.70369,"150":4.34449,"151":4.64432,"152":7.28773,"153":7.13475,"154":2.79638,"155":0.01836,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 81 83 85 88 89 90 94 95 96 97 98 99 100 102 114 115 125 127 129 156 157"},F:{"40":0.00612,"64":0.00612,"72":0.00612,"89":0.00612,"91":0.01224,"95":0.04895,"99":0.00612,"102":0.00612,"105":0.01836,"106":0.01224,"107":0.01836,"110":0.00612,"112":0.00612,"115":0.02448,"116":0.02448,"117":0.00612,"118":0.00612,"120":0.00612,"133":0.06731,"134":0.15298,"135":1.18097,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 65 66 67 68 69 70 71 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 90 92 93 94 96 97 98 100 101 103 104 108 109 111 113 114 119 121 122 123 124 125 126 127 131 132 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1","9.5-9.6":0.00612},B:{"92":0.00612,"109":0.01224,"119":0.06731,"120":0.06731,"122":0.0306,"123":0.01836,"131":0.00612,"137":0.00612,"139":0.00612,"140":0.01224,"141":0.00612,"144":0.00612,"145":0.01836,"147":0.03671,"148":0.04283,"149":0.01836,"150":0.04895,"151":0.47728,"152":3.03502,"153":4.81565,"154":0.89949,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 114 115 116 117 118 121 124 125 126 127 128 129 130 132 133 134 135 136 138 142 143 146"},E:{"27":0.06731,_:"4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 13.1 15.1 15.2-15.3 15.4 15.5 16.0 16.2 16.5 17.0 17.2 18.0 18.2 18.4 26.0 26.1 27.1 27.2 TP","14.1":0.01836,"15.6":0.02448,"16.1":0.18969,"16.3":0.01836,"16.4":0.00612,"16.6":0.04283,"17.1":0.1285,"17.3":0.01224,"17.4":0.00612,"17.5":0.01224,"17.6":0.03671,"18.1":0.02448,"18.3":0.00612,"18.5-18.7":0.00612,"26.2":0.01836,"26.3":0.07343,"26.4":0.02448,"26.5":0.257,"26.6":1.18709},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00096,"5.0-5.1":0.00096,"6.0-6.1":0,"7.0-7.1":0.00192,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.00962,"11.0-11.2":0.00096,"11.3-11.4":0.00192,"12.0-12.1":0,"12.2-12.5":0.025,"13.0-13.1":0,"13.2":0.00481,"13.3":0,"13.4-13.7":0.00096,"14.0-14.4":0.00385,"14.5-14.8":0.00577,"15.0-15.1":0.00577,"15.2-15.3":0.00385,"15.4":0.00481,"15.5":0.00577,"15.6-15.8":0.12502,"16.0":0.00962,"16.1":0.01731,"16.2":0.00962,"16.3":0.02116,"16.4":0.00481,"16.5":0.00769,"16.6-16.7":0.17407,"17.0":0.00673,"17.1":0.00962,"17.2":0.00962,"17.3":0.01443,"17.4":0.0202,"17.5":0.03943,"17.6-17.7":0.10194,"18.0":0.02116,"18.1":0.04232,"18.2":0.0577,"18.3":0.10002,"18.4":0.06251,"18.5-18.7":1.29158,"26.0":0.06251,"26.1":0.06347,"26.2":0.16541,"26.3":0.17888,"26.4":0.13079,"26.5":0.87612,"26.6":5.40578,"27.0":0.4145,"27.1":0,"27.2":0.01058},P:{"21":0.0099,"26":0.0099,"28":0.11885,"29":0.18819,"30":2.78317,_:"4 20 22 23 24 25 27 5.0-5.4 6.2-6.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 18.0 19.0","7.2-7.4":0.0099,"17.0":0.01981},I:{"0":0.01939,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0.00001},K:{"0":0.29496,_:"10 11 12 11.1 11.5 12.1"},A:{_:"6 7 8 9 10 11 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},L:{"0":25.31438},R:{_:"0"},M:{"0":1.24192},Q:{"14.9":0.00776},O:{"0":0.00776},H:{all:0}};
@@ -0,0 +1 @@
{"version":3,"file":"server-crash.js","sources":["../../../src/icons/server-crash.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ServerCrash\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNiAxMEg0YTIgMiAwIDAgMS0yLTJWNGEyIDIgMCAwIDEgMi0yaDE2YTIgMiAwIDAgMSAyIDJ2NGEyIDIgMCAwIDEtMiAyaC0yIiAvPgogIDxwYXRoIGQ9Ik02IDE0SDRhMiAyIDAgMCAwLTIgMnY0YTIgMiAwIDAgMCAyIDJoMTZhMiAyIDAgMCAwIDItMnYtNGEyIDIgMCAwIDAtMi0yaC0yIiAvPgogIDxwYXRoIGQ9Ik02IDZoLjAxIiAvPgogIDxwYXRoIGQ9Ik02IDE4aC4wMSIgLz4KICA8cGF0aCBkPSJtMTMgNi00IDZoNmwtNCA2IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/server-crash\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ServerCrash = createLucideIcon('ServerCrash', [\n [\n 'path',\n {\n d: 'M6 10H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-2',\n key: '4b9dqc',\n },\n ],\n [\n 'path',\n {\n d: 'M6 14H4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-2',\n key: '22nnkd',\n },\n ],\n ['path', { d: 'M6 6h.01', key: '1utrut' }],\n ['path', { d: 'M6 18h.01', key: 'uhywen' }],\n ['path', { d: 'm13 6-4 6h6l-4 6', key: '14hqih' }],\n]);\n\nexport default ServerCrash;\n"],"names":[],"mappings":"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"}
@@ -0,0 +1,206 @@
//#region src/messages.ts
const TYPE_REQUEST = "q";
const TYPE_RESPONSE = "s";
//#endregion
//#region src/utils.ts
function createPromiseWithResolvers() {
let resolve;
let reject;
return {
promise: new Promise((res, rej) => {
resolve = res;
reject = rej;
}),
resolve,
reject
};
}
const random = Math.random.bind(Math);
const urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
function nanoid(size = 21) {
let id = "";
let i = size;
while (i--) id += urlAlphabet[random() * 64 | 0];
return id;
}
//#endregion
//#region src/main.ts
const DEFAULT_TIMEOUT = 6e4;
const defaultSerialize = (i) => i;
const defaultDeserialize = defaultSerialize;
const { clearTimeout, setTimeout } = globalThis;
function createBirpc($functions, options) {
const { post, on, off = () => {}, eventNames = [], serialize = defaultSerialize, deserialize = defaultDeserialize, resolver, bind = "rpc", timeout = DEFAULT_TIMEOUT, proxify = true } = options;
let $closed = false;
const _rpcPromiseMap = /* @__PURE__ */ new Map();
let _promiseInit;
let rpc;
async function _call(method, args, event, optional) {
if ($closed) throw new Error(`[birpc] rpc is closed, cannot call "${method}"`);
const req = {
m: method,
a: args,
t: TYPE_REQUEST
};
if (optional) req.o = true;
const send = async (_req) => post(serialize(_req));
if (event) {
await send(req);
return;
}
if (_promiseInit) try {
await _promiseInit;
} finally {
_promiseInit = void 0;
}
let { promise, resolve, reject } = createPromiseWithResolvers();
const id = nanoid();
req.i = id;
let timeoutId;
async function handler(newReq = req) {
if (timeout >= 0) {
timeoutId = setTimeout(() => {
try {
if (options.onTimeoutError?.call(rpc, method, args) !== true) throw new Error(`[birpc] timeout on calling "${method}"`);
} catch (e) {
reject(e);
}
_rpcPromiseMap.delete(id);
}, timeout);
if (typeof timeoutId === "object") timeoutId = timeoutId.unref?.();
}
_rpcPromiseMap.set(id, {
resolve,
reject,
timeoutId,
method
});
await send(newReq);
return promise;
}
try {
if (options.onRequest) await options.onRequest.call(rpc, req, handler, resolve);
else await handler();
} catch (e) {
if (options.onGeneralError?.call(rpc, e) !== true) throw e;
return;
} finally {
clearTimeout(timeoutId);
_rpcPromiseMap.delete(id);
}
return promise;
}
const builtinMethods = {
$call: (method, ...args) => _call(method, args, false),
$callOptional: (method, ...args) => _call(method, args, false, true),
$callEvent: (method, ...args) => _call(method, args, true),
$callRaw: (options$1) => _call(options$1.method, options$1.args, options$1.event, options$1.optional),
$rejectPendingCalls,
get $closed() {
return $closed;
},
get $meta() {
return options.meta;
},
$close,
$functions
};
if (proxify) rpc = new Proxy({}, { get(_, method) {
if (Object.prototype.hasOwnProperty.call(builtinMethods, method)) return builtinMethods[method];
if (method === "then" && !eventNames.includes("then") && !("then" in $functions)) return void 0;
const sendEvent = (...args) => _call(method, args, true);
if (eventNames.includes(method)) {
sendEvent.asEvent = sendEvent;
return sendEvent;
}
const sendCall = (...args) => _call(method, args, false);
sendCall.asEvent = sendEvent;
return sendCall;
} });
else rpc = builtinMethods;
function $close(customError) {
$closed = true;
_rpcPromiseMap.forEach(({ reject, method }) => {
const error = /* @__PURE__ */ new Error(`[birpc] rpc is closed, cannot call "${method}"`);
if (customError) {
customError.cause ??= error;
return reject(customError);
}
reject(error);
});
_rpcPromiseMap.clear();
off(onMessage);
}
function $rejectPendingCalls(handler) {
const handlerResults = Array.from(_rpcPromiseMap.values()).map(({ method, reject }) => {
if (!handler) return reject(/* @__PURE__ */ new Error(`[birpc]: rejected pending call "${method}".`));
return handler({
method,
reject
});
});
_rpcPromiseMap.clear();
return handlerResults;
}
async function onMessage(data, ...extra) {
let msg;
try {
msg = deserialize(data);
} catch (e) {
if (options.onGeneralError?.call(rpc, e) !== true) throw e;
return;
}
if (msg.t === TYPE_REQUEST) {
const { m: method, a: args, o: optional } = msg;
let result, error;
let fn = await (resolver ? resolver.call(rpc, method, $functions[method]) : $functions[method]);
if (optional) fn ||= () => void 0;
if (!fn) error = /* @__PURE__ */ new Error(`[birpc] function "${method}" not found`);
else try {
result = await fn.apply(bind === "rpc" ? rpc : $functions, args);
} catch (e) {
error = e;
}
if (msg.i) {
if (error && options.onFunctionError) {
if (options.onFunctionError.call(rpc, error, method, args) === true) return;
}
if (!error) try {
await post(serialize({
t: TYPE_RESPONSE,
i: msg.i,
r: result
}), ...extra);
return;
} catch (e) {
error = e;
if (options.onGeneralError?.call(rpc, e, method, args) !== true) throw e;
}
try {
await post(serialize({
t: TYPE_RESPONSE,
i: msg.i,
e: error
}), ...extra);
} catch (e) {
if (options.onGeneralError?.call(rpc, e, method, args) !== true) throw e;
}
}
} else {
const { i: ack, r: result, e: error } = msg;
const promise = _rpcPromiseMap.get(ack);
if (promise) {
clearTimeout(promise.timeoutId);
if (error) promise.reject(error);
else promise.resolve(result);
}
_rpcPromiseMap.delete(ack);
}
}
_promiseInit = on(onMessage);
return rpc;
}
export { createBirpc as c };
@@ -0,0 +1,171 @@
'use strict';
var traverse = require('../index');
var assert = require('assert');
describe('json-schema-traverse', function() {
var calls;
beforeEach(function() {
calls = [];
});
it('should traverse all keywords containing schemas recursively', function() {
var schema = require('./fixtures/schema').schema;
var expectedCalls = require('./fixtures/schema').expectedCalls;
traverse(schema, {cb: callback});
assert.deepStrictEqual(calls, expectedCalls);
});
describe('Legacy v0.3.1 API', function() {
it('should traverse all keywords containing schemas recursively', function() {
var schema = require('./fixtures/schema').schema;
var expectedCalls = require('./fixtures/schema').expectedCalls;
traverse(schema, callback);
assert.deepStrictEqual(calls, expectedCalls);
});
it('should work when an options object is provided', function() {
// schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex
var schema = require('./fixtures/schema').schema;
var expectedCalls = require('./fixtures/schema').expectedCalls;
traverse(schema, {}, callback);
assert.deepStrictEqual(calls, expectedCalls);
});
});
describe('allKeys option', function() {
var schema = {
someObject: {
minimum: 1,
maximum: 2
}
};
it('should traverse objects with allKeys: true option', function() {
// schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex
var expectedCalls = [
[schema, '', schema, undefined, undefined, undefined, undefined],
[schema.someObject, '/someObject', schema, '', 'someObject', schema, undefined]
];
traverse(schema, {allKeys: true, cb: callback});
assert.deepStrictEqual(calls, expectedCalls);
});
it('should NOT traverse objects with allKeys: false option', function() {
// schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex
var expectedCalls = [
[schema, '', schema, undefined, undefined, undefined, undefined]
];
traverse(schema, {allKeys: false, cb: callback});
assert.deepStrictEqual(calls, expectedCalls);
});
it('should NOT traverse objects without allKeys option', function() {
// schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex
var expectedCalls = [
[schema, '', schema, undefined, undefined, undefined, undefined]
];
traverse(schema, {cb: callback});
assert.deepStrictEqual(calls, expectedCalls);
});
it('should NOT travers objects in standard keywords which value is not a schema', function() {
var schema2 = {
const: {foo: 'bar'},
enum: ['a', 'b'],
required: ['foo'],
another: {
},
patternProperties: {}, // will not traverse - no properties
dependencies: true, // will not traverse - invalid
properties: {
smaller: {
type: 'number'
},
larger: {
type: 'number',
minimum: {$data: '1/smaller'}
}
}
};
// schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex
var expectedCalls = [
[schema2, '', schema2, undefined, undefined, undefined, undefined],
[schema2.another, '/another', schema2, '', 'another', schema2, undefined],
[schema2.properties.smaller, '/properties/smaller', schema2, '', 'properties', schema2, 'smaller'],
[schema2.properties.larger, '/properties/larger', schema2, '', 'properties', schema2, 'larger'],
];
traverse(schema2, {allKeys: true, cb: callback});
assert.deepStrictEqual(calls, expectedCalls);
});
});
describe('pre and post', function() {
var schema = {
type: 'object',
properties: {
name: {type: 'string'},
age: {type: 'number'}
}
};
it('should traverse schema in pre-order', function() {
traverse(schema, {cb: {pre}});
var expectedCalls = [
['pre', schema, '', schema, undefined, undefined, undefined, undefined],
['pre', schema.properties.name, '/properties/name', schema, '', 'properties', schema, 'name'],
['pre', schema.properties.age, '/properties/age', schema, '', 'properties', schema, 'age'],
];
assert.deepStrictEqual(calls, expectedCalls);
});
it('should traverse schema in post-order', function() {
traverse(schema, {cb: {post}});
var expectedCalls = [
['post', schema.properties.name, '/properties/name', schema, '', 'properties', schema, 'name'],
['post', schema.properties.age, '/properties/age', schema, '', 'properties', schema, 'age'],
['post', schema, '', schema, undefined, undefined, undefined, undefined],
];
assert.deepStrictEqual(calls, expectedCalls);
});
it('should traverse schema in pre- and post-order at the same time', function() {
traverse(schema, {cb: {pre, post}});
var expectedCalls = [
['pre', schema, '', schema, undefined, undefined, undefined, undefined],
['pre', schema.properties.name, '/properties/name', schema, '', 'properties', schema, 'name'],
['post', schema.properties.name, '/properties/name', schema, '', 'properties', schema, 'name'],
['pre', schema.properties.age, '/properties/age', schema, '', 'properties', schema, 'age'],
['post', schema.properties.age, '/properties/age', schema, '', 'properties', schema, 'age'],
['post', schema, '', schema, undefined, undefined, undefined, undefined],
];
assert.deepStrictEqual(calls, expectedCalls);
});
});
function callback() {
calls.push(Array.prototype.slice.call(arguments));
}
function pre() {
calls.push(['pre'].concat(Array.prototype.slice.call(arguments)));
}
function post() {
calls.push(['post'].concat(Array.prototype.slice.call(arguments)));
}
});
@@ -0,0 +1,10 @@
import "react";
import { Fragment, jsx } from "react/jsx-runtime";
//#region src/SafeFragment.tsx
function SafeFragment(props) {
return /* @__PURE__ */ jsx(Fragment, { children: props.children });
}
//#endregion
export { SafeFragment };
//# sourceMappingURL=SafeFragment.js.map
@@ -0,0 +1 @@
{"version":3,"file":"square-check-big.js","sources":["../../../src/icons/square-check-big.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name SquareCheckBig\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjEgMTAuNVYxOWEyIDIgMCAwIDEtMiAySDVhMiAyIDAgMCAxLTItMlY1YTIgMiAwIDAgMSAyLTJoMTIuNSIgLz4KICA8cGF0aCBkPSJtOSAxMSAzIDNMMjIgNCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/square-check-big\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst SquareCheckBig = createLucideIcon('SquareCheckBig', [\n ['path', { d: 'M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5', key: '1uzm8b' }],\n ['path', { d: 'm9 11 3 3L22 4', key: '1pflzl' }],\n]);\n\nexport default SquareCheckBig;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAiB,iBAAiB,gBAAkB,CAAA,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC/F,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACjD,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"file-box.js","sources":["../../../src/icons/file-box.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name FileBox\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTQuNSAyMkgxOGEyIDIgMCAwIDAgMi0yVjdsLTUtNUg2YTIgMiAwIDAgMC0yIDJ2NCIgLz4KICA8cGF0aCBkPSJNMTQgMnY0YTIgMiAwIDAgMCAyIDJoNCIgLz4KICA8cGF0aCBkPSJNMyAxMy4xYTIgMiAwIDAgMC0xIDEuNzZ2My4yNGEyIDIgMCAwIDAgLjk3IDEuNzhMNiAyMS43YTIgMiAwIDAgMCAyLjAzLjAxTDExIDE5LjlhMiAyIDAgMCAwIDEtMS43NlYxNC45YTIgMiAwIDAgMC0uOTctMS43OEw4IDExLjNhMiAyIDAgMCAwLTIuMDMtLjAxWiIgLz4KICA8cGF0aCBkPSJNNyAxN3Y1IiAvPgogIDxwYXRoIGQ9Ik0xMS43IDE0LjIgNyAxN2wtNC43LTIuOCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/file-box\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst FileBox = createLucideIcon('FileBox', [\n ['path', { d: 'M14.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4', key: '16lz6z' }],\n ['path', { d: 'M14 2v4a2 2 0 0 0 2 2h4', key: 'tnqrlb' }],\n [\n 'path',\n {\n d: 'M3 13.1a2 2 0 0 0-1 1.76v3.24a2 2 0 0 0 .97 1.78L6 21.7a2 2 0 0 0 2.03.01L11 19.9a2 2 0 0 0 1-1.76V14.9a2 2 0 0 0-.97-1.78L8 11.3a2 2 0 0 0-2.03-.01Z',\n key: '99pj1s',\n },\n ],\n ['path', { d: 'M7 17v5', key: '1yj1jh' }],\n ['path', { d: 'M11.7 14.2 7 17l-4.7-2.8', key: '1yk8tc' }],\n]);\n\nexport default FileBox;\n"],"names":[],"mappings":"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"}
@@ -0,0 +1 @@
{"version":3,"file":"receipt-euro.js","sources":["../../../src/icons/receipt-euro.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ReceiptEuro\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNCAydjIwbDItMSAyIDEgMi0xIDIgMSAyLTEgMiAxIDItMSAyIDFWMmwtMiAxLTItMS0yIDEtMi0xLTIgMS0yLTEtMiAxWiIgLz4KICA8cGF0aCBkPSJNOCAxMmg1IiAvPgogIDxwYXRoIGQ9Ik0xNiA5LjVhNCA0IDAgMSAwIDAgNS4yIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/receipt-euro\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ReceiptEuro = createLucideIcon('ReceiptEuro', [\n [\n 'path',\n { d: 'M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z', key: 'q3az6g' },\n ],\n ['path', { d: 'M8 12h5', key: '1g6qi8' }],\n ['path', { d: 'M16 9.5a4 4 0 1 0 0 5.2', key: 'b2px4r' }],\n]);\n\nexport default ReceiptEuro;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,iBAAiB,aAAe,CAAA,CAAA,CAAA;AAAA,CAClD,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA,CAAE,CAAA,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA2E,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,QAAS,CAAA,CAAA;AAAA,CAChG,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC1D,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,95 @@
this.zxcvbnts = this.zxcvbnts || {};
this.zxcvbnts["language-en"] = (function (exports) {
'use strict';
function decompress(encodedString) {
const decompressedArray = encodedString.split(/([A-Z])/g);
const decompressedData = [];
let last = "";
let i;
for (i = 1; i < decompressedArray.length; i += 2) {
last = last.slice(0, decompressedArray[i].charCodeAt(0) - 65) + decompressedArray[i + 1];
decompressedData.push(last);
}
return decompressedData;
}
var commonWords = decompress("AyouAtheBoA'sAitA'tAofAthatAandAisBnAmeAforAonAthisA'mAhaveAwasBeAmyA'reAyourAbeAknowAwhatAdoAnotAareAwithAcanAdonAheAjustAlikeA'llAhereAallAnoAoutAupAgetAaboutArightAhimAohAgoAatAthereAsoAherAoneA'veAyeahAgotAtheyAbutAwantBillAthinkAifAnowAsheAfromAwellAseeAasAgoingAhisAtimeAbackAusAdidAyesAanAthemAgonnaCodAbeenAwereBouldAhadAcomeAheyBowAwhoAneedAokayBurAwhenAtakeAsomeBayA'dAwhyAdidnAorAreallyAcouldAwayAmanAtooAdownAhasAletAbyAsomethingAmoreAtellAmakeAthenAmeanAoverAlittleAneverAsaidApeopleAshouldAlookAoffAveryAloveAonlyAdoingAmuchAamAthingAanyAwhereAtwoAintoAevenAthankAbecauseAstillAfindAgiveAsorryAworkAdayAhelpAlifeAfirstAanythingAsureAagainAtheirDseAotherAthanAgodAwonAawayAmr.AbeforeAthoughtAhomeAtalkAmustAtoldAnightAcallAthingsAbetterAaroundAlastBongAalwaysAfeelAputAyearsAafterApleaseAthoseAsirAplaceAlotAnameAmadeAdoesnAguysAmoneyAeverEythingAgreatAnothingAkeepAdoneAguyAthroughAleaveAwantedAkindAhappenedAnewAbeingClieveAoldAcomingAdoesAcameBourseAwrongAleftAbigAhouseAmightAgirlA..AbadAstopAhelloAownAuhAhearAworldAsomeoneAunderstandAelseAtalkingAisnAenoughAtodayAgettingAfatherAmaybeAcareAfoundAmusicAeveryAaskAsameAanotherAfineBamilyAkillAtryingAwentAlookingAthreeAwaitAcarAtogetherAshowAbestAstayAwasnAyourselfAjobAmanyAniceAdeadAalreadyAfriendArealCmemberAmindAsawBonAnextAhiAwhichAmotherAwannaAtryBhanksAroomAhellCardAseenAfuckingAwomanCuldnAmayAknewAliveAbabyBitAwholeAideaAheadAusedAboyAokAmorningAhardAwithoutAtookAcalledAalsoAshitBayingAdaysAmostAstartAmatterAuseAreadyAgottaAmeetAdoorAahAyetAbothAprettyAmyselfBoveAguessAactuallyAwhileAendAphoneAsuchAgoneAfewAhavenAwifeApersonAagoAbrotherAkilledAproblemAhappyAaloneAfriendsAmenAfaceAschoolAworryAcouldnBaseAlostAdadAplayArunAheartAonceAdieAanyoneAhopeAbringAwantsAfuckAtonightAbusinessAtrueAuntilAsinceAeachAsoonBaysAeveryoneAtomorrowAhandAthinkingAworkingAhappenCvingAyearApartAeatAmomAstuffAlooksAkidsAlaterBistenAhuhAminuteAsecondAlateAgaveAturnAwaterAkidBnowsAopenAchangeAmeansAdifferentAminutesAinsideAeyesAbeautifulAfarApoliceCintAunderAprobablyAcrazyAtakingAaskedAhurtAchanceAdealAainAmakingApayAdaughterAplayingAfunAtimesAhitAsideAhandsAmakesAableAbodyAimportantAholdAdeathAstoryAcomesAfightAsupposedAleastAmomentArestAumAsetBtartedAcloseAyoungAdrinkAagainstAexcuseAafraidAgameAanymoreAwordBishAfiveAweekAthoughAmissAeasyAsleepAreasonAmineAwaitingAdr.AwatchAgoesAexactlyAgetsAitsAcheckAhoursAbehindAnumberAwowApartyAtruthAquiteAhusbandAshotAmarriedAchildAbetweenAcauseAfireAquestionAmetAtellingAfourAbroughtBloodBreakAsisterAemAteamBroubleCiedAfrontAsitAforgetAreadAtownAdiedAcoupleAarenAneedsAlineAwalkAchildrenApowerAbecomeAofficeAplanAalmostAgirlsAfoodAspeakAyoursAgunAaliveAcutAfeelingAoutsideAsafeAtrustAnewsAaheadAsaveAeitherAsomebodyBtandAmrs.AfreeAanswerAhateBighAmonthsAeverybodyAbuyAhmmAwhateverAfullAhalfAloseAwomenAalongAseemsAfactArunningAcoolAdearAbedAlightAorderAwhoaAcountryAdoctorAclearA10AboysAsentDdAlivingAwarApastAbyeAdogAjohnAtakenAhotAleavingBivesApickAscaredAparentsAfunnyAcityApromiseAstupidAcannotAdinnerAshouldnAassCkingAcompanyAladyAwinApossibleAhimselfAseriousAbookAmrAsortAhourAanywayAsoundBhallAhappensAsixAlordAsickAtopAfeltAtouchAjackAsenseBmallA20AseemAmeetingAdamnAspecialAjesusAperfectAcaptainAluckAfastAcontrolAbitchAwordsAhumanAlaughsAhairBospitalAmurderAdreamAshutAknownAsighsAcoldAfutureAgladAworkedAdriveAcatchAanybodyAlaughingAmillionAlongerAoohAlieAcallingAfigureCnallyAlookedAothersA'amAblackAshootAfaultA30AworriedAhoneyAsomewhereAweeksAchangedAbossAhappeningAseeingAdanceAsecretAdateAfallAtakesAlovedAsignAquestionsAwerenApieceAairAchucklesCoiceAfeetAneededAturnedAbetAmovingAreturnAvoiceAamazingAgivingAstrongAlearnAgivenAsamAweirdBhiteAlessAworthAearlyAchristmasAbeatAtillA00AonesAcleanAeyeAsongCundsBtraightBhipAwriteAratherAsweetAfollowAmissingApainAnobodyApictureAwelcomeAexplainAtenAcoffeeAworksAkeptAyaAdefinitelyAwonderAprotectAbusyAcaughtAkiddingAluckyAevidenceAmistakeBadAweddingAmeantAdecidedAstepAroadAbuildingAinformationAreportAalrightAwatchingAcarefulAeveningAtvArideAlandAworseAsituationAentireApullAmmBovieAtiredAhurryAsexAhandleAsometimesBystemAmouthAactAbirthdayAthrowAattackAlawAfinishAdarkAmaAclassAyesterdayAmessageAkingAwonderfulAcompletelyAlyingAmichaelAbrokeAexpectAmonthApoorAmm-hmmAjoeAquietAsellAbagAusingAfloorAtalkedAleadAgroundAhasnApassAstreetAclothesAforeverAdangerousAwearAdropAredAdaddyAacrossAbornAsingleAthinksAspeakingAhangAfrankAtestAageAtableAdavidAms.AanywhereAyorkAhistoryA15AgeorgeAtrainAranAareaAnearAduringAswearApaidAmarryAfeelsAi-iAspendAboxAcharlieAmiddleAstrangeAuncleAroundAboughtAterribleAcourtAagreeAstateAboatAproudAquickAmikeAtomAspaceBecurityAjoinAsittingAaccidentAforgotDwardAtotallyAsavedAhaArelationshipAlistAcrimeAstationAnormalAsupposeAfishAgentlemenAwearingAmasterAsceneAchargeAmissedAfellAstoppedAkeyAbuddyAfixAofferApersonalAinsteadAshortAfearAringAprisonAsimpleAgroupAamericanAcalmAdifficultAfightingAmessAtripArecordApositionAangryAletterAwakeAfinishedAshareAhonestAdeLine truncated
var firstnames = decompress("AaarenDikaBbagaelFilCbeEyDiEeDyEeCigaelFilFleCraBdaDhDlineDnDraCdaDiEaEeDyCelEaFidaHeEeEheidEiceFnaGdGeElaFeDnaDyCiDanaDnaCoraEeFeEneCreaDiaFensFnGaGeGnaHeEenaGneBerielGaGlBftonBgCaceDtaEhaFeCgiEeDyCnaDellaEsFeFseEtaDolaCrethaBidaEnCgneisClaDeEeFnEneEyDiEnaEsDsunDynCmeEeDilCndreaDsleeGyFieBjayBlaineDmedaDnaFhEeEnaDyneCbertaGinaIeDinaCeciaDdaDeceEnDjandraIinaDnaEeDssandraDtaEheaDxEaFndraIinaEiFaFnaGeFsCfiEeDredaDyCiDaDcaEeFaEiaDdaEiaDeDkaEeeDnaEeDsEaEhaEonEsaEunDxDzaClaDeenEgraEneDiEanoraEeEnaEsFonFsaExDsunDxDyEceEnEsFonCmaDedaEriaEtaDiraFeCoiseFiaDysiaCtaDheaCveraFtaDinaFiaEraCyceDdaDsEaEeEiaEonEsFaBmabelGleDleaFeFtaEiaFeFtaEleDndaFiGeFyDraEgoDtaCberFlyDurCeDliaFeFnaGeFtaCiDeDiDlDtieEyCmamariaCyDeBnaDbalEelGlaHeDlieseFseEleseFiseDstasiaIeHsiaDtolaCdeeFeEreaDiEeDraEeaGnaFeFiEiaGnaFetteEomacheDyCestassiaDtEtFaFeCgeElFaFeFiaGcaGkaGnaHeGqueGtaFleDieElDyCiaDcaDssaDtaEraCjanetteDelaCnD-marieDaE-dianaJeFmariaEbalFelHaHlIaIeEdianaIeEleeFieseGseEmariaIeDeE-corinneFmarieEcorinneElieseGseEmarieEttaGeDiEceEeEsFsaDmariaHeDnoraDoraDyCselmaDleyDticeCtheFaEiaGthiaDoinetteEnellaGttaFiaGeHttaGnaCyaBppoloniaCrilFetteBraDbelGaGeGlaHeCdaEthDeenEliaGsFlaGeEnFeFiaDineEsFjEthDraDyceEsEthCethaCiadneEnaDdathaDelFaFlaGeClanaDeeFnEnFaFeEtaFteEyneDieFneEnaFdaFeDueneDyEnFeCynBshelyDiaEenElDlaFnEeeFighFnFyEiFeEyCiaCtraEidFxBtalantaChenaFeClantaGeBubertaDineDreeFtteFyEieEyCdiEeDraEeFyEieEyFeDyCgustaGeGinaIeCndreaCraDeaElFeaFiaGeDiaEeEliaDlieDooraEraFeCstinGaGeBvaCelineDrilEylCieDsDvaFhCrilEtBynAbabDaraDbEetteEieDetteDitaDsCmbiFeEyCrbEabraFraH-anneHanneEeFeFtteFyEiFeEraEyDiDrieEyCsiaCthshebaDshevaBeaDtriceGsaGxGzCbeCccaDkaEiFeEyCeCilulDtrisCkkiClDiaEciaEndaEtaDlEaFncaEeEinaDvaEiaCnditeDedettaFictaGktaEttaDitaDniFeEyDoiteCreniceEtDgetDnaFdeneHtteGinaIeFrdinaJeEelleFteGtaHeEiFceFeFtaEyDriFeEyDtEaEeEhaFeEiFeFnaGeEyDylFeCssEieEyCthEanneGyEenaEinaDseyEyDtaEeF-annFannIeEiFnaGeEyFeCulahCvDerieFleeHyGieGyDvyBiancaEkaCbbieEyFeDiCddieEyDgetCliDlEiFeEyFeCnniFeEyCrdEieDgitGtaBlairFeDkeFleeHyDncaFhGaGeCinniGeFyDssFeDtheCondellIeFieFyCytheBobbeFeFtteEiFeEyFeDetteDinaFeGtteCnitaDneeEiFbelleFeEyBranaEdaisFeGaFiGceGeGseFyCeanneErDeEnaDnEaEdaEnFaDttCiaEnaFnaGeDdeEgetHteEieDerEttaDgidGaFtGtaHeDnaEeyEnFaEyDtEaEneyFiEtFaGnHeyHiHyFeGnyFneHyGiCookFeFsCunhildaIeCyanaDnEaEnFaFeBuffyCnniFeEyAcaciliaGeChraCiristionaDtlinErinClDidaDlaEeyEiFdaFeEyDypsoCmDalaDelFlaGiaDiElaFeFlaGeDmiFeEyCndaceEiFceFdaGeFeFsEraEyCpriceCraElieDenFaEsaFsaGeEyDiEaEeElFynEnFaFeEottaEssaEtaFtaDlaEeeGnFnGeFyEieFnGaGeFtaEotaGtaEyFeFnGnHeDmaEelGaGiaHnaHtaGlaHeFnGcitaEinaGeFtaEonDoElF-jeanFaGnHnFeGeFinHaHeFjeanFynHeHnEnDreeEiFeFssaEollEyDyElEnCsandraDeyDiEeDsEandraIeIyFundraEeyEiFeEondraEyCtarinaDeErinaDhaFrinaIeEeFeFrinIaIeEiFeEleenGneErinHeFynEyFleenDiEeEnaDlainaEeeEinDrinaFonaDyCyeDlaBeceliaDilFeGyFiaFlaFyCilCleEneEstaGeGiaHnaIeGynIaDiaEeEnaFdaFeFkaEsseDkaDleCsyaBhadDndaGlFraEnaEtalHleDrilFnFsGsaHeFtaGyElaFeanGenGnaHeFineFotHtaIeEmainIeGneFianGneGonEoEylDstityCelsaeFeaGyFieFyDrEeFyEiFanneFceFdaFeFlynInFnFseGhElynEriGtaFyEyFeFlDslieCiarraDckieFyDquiaGtaCloEeFtteErisCrisFsieGyFtaHbelKlaHlIleHnGeanHlHnGiHanJaJeHeHnIaIeGyHeHnaDysaFlerFtalGeHlBicelyDilyCelClkaCndaEeeFlynFrellaEiFeEraEyDnamonCssieeEyBlairFeDraFbelleEeFstaFtaGtaHeFyEiFbelFceFeFndaGeFssaHeFtaEyDudeGlleGttaIeFiaGeGnaHeCeaDmEenceGtiaInaJeEmieFyDoEpatraDrissaCioCoDeDrisDtildaDvisBodeeDiEeDyCleenEneEttaGeDleenFnFteGteEieFneEyCnDcettinaEhitaEordiaDniFeEyDsolataEtanceIiaIyHtaIiaJnaKeEuelaHoCokieCraEbelHlaIeElFieGneFynDdeliaHeFyEiFeEulaEyDeenEllaEndaFeEttaGeEyDiEeEllaEnaFeFnaGeEssGaDlissEyDnelaGiaGleEieEyDrenaFyEiFanneFeFnaGeGneEyDtneyDyCsettaGeDtanzaCurtenayFnayGeyBrinDsEsieFyEtaGbelGlFenFiGeGnHaHeGonnaFyCystaGlFieBthrineBybDilFlCmbreCndeEiFaFeEyDtheaFiaGeFyAdaceyDiaEeDyCelCffiFeEyCgmarChliaCileDseyEiFeEyCleEnnaDiaElaDlasDorisCmaraFisDitaCnaDellGaEtteDiEaEcaFeEelaGeGlaHeEkaElaEtFaDnaEiFeEyFeDyaEelleFtteCpheneEnaFeCraDbEieEyDceeFyEiFeEyDdaDeenEllGeDiEaEceDlaEeenFneEineEleenDonDrelleEylDseyEieDyaElEnCshaDiEeDyaCthaCuneCveenEtaDidaEnaFeEtaCwnEaCyleDnaBdeneBeCanaEeEnaFeCbDbiFeEyDeeEraDiDorFaGhDraCdeDieDraCeD deeDannGeDdeeDnaDrdreDynChliaCidreDnaDrdreClDaDcinaGeDiaElaGhEndaDlEaEyDoraFesFiaGsDphineHiaCmeterFraGiaHsCnaDiEceEseDnaEiFeEyDyEsFeConneCsdemonaDiraeFeeFiCvaEnDiEnFaFneDonFdraFnaGeEraBiCahannDnEaEdraEeF-marieFmarieEnFaFeFneCdiDoCenaDrdreCnaEhDnieEyConEeEisEneCtaCxDieBnirenBodeDiEeDyCeCllEeyEiFeEyDoresFitaIsCmenigaDingaFiGcaGqueCnaDellaGeEttaDiaEcaEelleDnaFmarieEiFeEyCraEliaGnFynHnIeDeEenEliaFlaGeEnaFeEttaGeEyDiEaFnEceEeEneEsFaFeEtaDoEliceGsaEteaGyaFheaHeGyDreeEiFeFsEyDtheaFyDyCsiCtDiDtiFeEyBreDddyEiConaCuDciFeFllEyDsiFeFllaEyBulceFaEiFaGnaFeFneHaEyDseaCstyByanEaEeEnFaFeCnaEhAeachelleCdaDieEthClasaidCrthaCsterBbaCbaConeeEyBdaCdiEeDyCeDeDlineDnCiDeDnDtaEhFaFeDvaCnaCwinaCyDthFeBffieBileenDisCmileCrenaBkaterinaBlainaFeDnaEeDyneCbertaGinaIeCeanorHaHeDctraDenDnaEeEiEoreDonoraHeCfieDredaEidaFedaCgaCianoraHeDciaDeDnorGeDsaFbetIhItaEeEhaEsaDtaDzaFbetIhCkaDeClaEdineDeEnFeEtteDiEeEssaDyEnFnCmiraCnaDoraFeCoisaFeDnoreDraLine truncated
var lastnames = decompress("AsmithAjohnsonAwilliamsAjonesAbrownAdavisAmillerAwilsonAmooreAtaylorAandersonAthomasAjacksonAwhiteAharrisAmartinAthompsonAgarciaAmartinezArobinsonAclarkArodriguezAlewisCeAwalkerAhallAallenAyoungAhernandezAkingAwrightAlopezAhillAscottAgreenAadamsAbakerAgonzalezAnelsonAcarterAmitchellAperezArobertsAturnerAphillipsAcampbellAparkerAevansBdwardsAcollinsAstewartBanchezAmorrisArogersBeedAcookAmorganAbellAmurphyAbaileyAriveraAcooperArichardsonAcoxAhowardAwardAtorresApetersonAgrayAramirezAjamesAwatsonAbrooksAkellyAsandersApriceAbennettAwoodAbarnesArossAhendersonAcolemanAjenkinsAperryBowellAlongApattersonAhughesAfloresAwashingtonAbutlerAsimmonsAfosterAgonzalesAbryantAalexanderArussellAgriffinAdiazAhayesAmyersAfordAhamiltonAgrahamAsullivanAwallaceBoodsAcoleAwestAjordanAowensAreynoldsAfisherAellisAharrisonAgibsonAmcdonaldAcruzAmarshallAortizAgomezAmurrayAfreemanAwellsCbbAsimpsonBtevensAtuckerAporterAhunterBicksAcrawfordAhenryAboydAmasonBoralesAkennedyAwarrenAdixonAramosBeyesAburnsAgordonAshawAholmesAriceBobertsonAhuntAblackAdanielsApalmerAmillsAnicholsAgrantAknightAfergusonAroseAstoneAhawkinsAdunnAperkinsAhudsonAspencerAgardnerAstephensApayneBierceAberryAmatthewsAarnoldAwagnerBillisArayAwatkinsAolsonAcarrollAduncanAsnyderAhartAcunninghamAbradleyAlaneAandrewsAruizAharperAfoxArileyAarmstrongAcarpenterAweaverAgreeneAlawrenceAelliottAchavezAsimsAaustinApetersAkelleyAfranklinAlawsonAfieldsAgutierrezAryanAschmidtAcarrAvasquezAcastilloAwheelerAchapmanAoliverAmontgomeryArichardsAwilliamsonAjohnstonAbanksAmeyerAbishopAmccoyAhowellAalvarezAmorrisonAhansenAfernandezAgarzaAharveyAlittleAburtonAstanleyAnguyenAgeorgeAjacobsAreidAkimAfullerAlynchAdeanAgilbertBarrettAromeroAwelchAlarsonAfrazierAburkeAhansonAdayAmendozaBorenoAbowmanAmedinaAfowlerAbrewerAhoffmanAcarlsonAsilvaApearsonAhollandAdouglasAflemingAjensenAvargasAbyrdAdavidsonAhopkinsAmayAterryAherreraAwadeAsotoAwaltersAcurtisAnealAcaldwellAloweAjenningsAbarnettAgravesAjimenezAhortonAsheltonAbarrettAobrienAcastroAsuttonAgregoryAmckinneyAlucasAmilesAcraigArodriquezAchambersAholtAlambertAfletcherAwattsAbatesAhaleArhodesApenaAbeckAnewmanAhaynesAmcdanielBendezAbushAvaughnAparksAdawsonAsantiagoAnorrisAhardyAloveAsteeleAcurryApowersAschultzAbarkerAguzmanApageAmunozAballAkellerAchandlerAweberAleonardAwalshAlyonsAramseyAwolfeAschneiderAmullinsAbensonAsharpAbowenAdanielAbarberAcummingsAhinesAbaldwinAgriffithAvaldezAhubbardAsalazarAreevesAwarnerAstevensonAburgessAsantosAtateAcrossAgarnerAmannCckBossAthorntonAdennisAmcgeeAfarmerAdelgadoAaguilarAvegaAgloverAmanningAcohenAharmonArodgersCbbinsAnewtonAtoddAblairAhigginsAingramAreeseAcannonAstricklandAtownsendApotterAgoodwinAwaltonAroweAhamptonAortegaApattonAswansonAjosephAfrancisAgoodmanAmaldonadoAyatesAbeckerAericksonAhodgesAriosAconnerAadkinsAwebsterAnormanAmaloneAhammondAflowersAcobbAmoodyAquinnAblakeAmaxwellApopeAfloydAosborneApaulAmccarthyAguerreroAlindseyAestradaAsandovalAgibbsAtylerAgrossAfitzgeraldAstokesAdoyleAshermanBaundersAwiseAcolonAgillAalvaradoAgreerApadillaAsimonAwatersAnunezAballardAschwartzAmcbrideAhoustonAchristensenAkleinAprattAbriggsAparsonsAmclaughlinAzimmermanAfrenchAbuchananAmoranAcopelandAroyApittmanAbradyAmccormickAhollowayAbrockApooleAfrankAloganAowenAbassAmarshAdrakeAwongAjeffersonAparkAmortonAabbottAsparksApatrickAnortonAhuffAclaytonAmasseyAlloydAfigueroaAcarsonAbowersArobersonAbartonAtranAlambAharringtonAcaseyAbooneAcortezBlarkeAmathisAsingletonAwilkinsAcainAbryanAunderwoodAhoganAmckenzieAcollierAlunaAphelpsAmcguireAallisonAbridgesAwilkersonAnashAsummersAatkinsAwilcoxApittsAconleyAmarquezAburnettArichardAcochranBhaseAdavenportAhoodAgatesAclayAayalaAsawyerAromanAvazquezAdickersonAhodgeAacostaAflynnAespinozaAnicholsonAmonroeAwolfAmorrowAkirkArandallAanthonyAwhitakerAoconnorAskinnerAwareAmolinaAkirbyAhuffmanAbradfordAcharlesAgilmoreAdominguezAonealAbruceAlangAcombsAkramerAheathBancockAgallagherCinesAshafferCortAwigginsAmathewsBcclainAfischerAwallAsmallAmeltonAhensleyAbondAdyerAcameronAgrimesAcontrerasBhristianAwyattAbaxterAsnowAmosleyAshepherdAlarsenAhooverAbeasleyAglennApetersenAwhiteheadAmeyersAkeithAgarrisonAvincentAshieldsAhornAsavageAolsenAschroederAhartmanAwoodardAmuellerAkempAdeleonAboothApatelAcalhounAwileyAeatonAclineAnavarroAharrellAlesterAhumphreyAparrishAduranAhutchinsonBessAdorseyAbullockAroblesAbeardAdaltonAavilaAvanceArichAblackwellAyorkAjohnsAblankenshipAtrevinoAsalinasAcamposApruittAmosesAcallahanAgoldenAmontoyaAhardinAguerraAmcdowellAcareyAstaffordAgallegosAhensonAwilkinsonAbookerAmerrittBirandaAatkinsonAorrAdeckerAhobbsAprestonAtannerAknoxApachecoAstephensonAglassArojasAserranoAmarksAhickmanAenglishAsweeneyBtrongAprinceAmcclureAconwayAwalterArothAmaynardAfarrellAloweryAhurstAnixonAweissAtrujilloAellisonAsloanAjuarezAwintersAmcleanArandolphAleonAboyerAvillarrealAmccallAgentryAcarrilloAkentAayersAlaraAshannonBextonApaceAhullAleblancAbrowningAvelasquezAleachAchangAhouseAsellersAherringAnobleAfoleyAbartlettAmercadoAlandryAdurhamAwallsAbarrAmckeeAbauerAriversAeverettAbradsLine truncated
var wikipedia = decompress("AtheAofAandAinAwasAisAforAasAonAwithAbyAheAatAfromAhisAanAwereAareAwhichAdocAhttpsAalsoAorAhasCdAfirstAoneAtheirAitsAafterAnewAwhoAtheyBwoAherAsheAbeenAotherAwhenAtimeAduringAintoAschoolAmoreBayAyearsAoverBnlyAyearAmostAwouldCrldAcityAsomeAwhereAbetweenAlaterAthreeAstateBuchAthenAnationalAusedAmadeAknownAunderAmanyAuniversityDtedAwhileApartAseasonAteamBheseAamericanAthanAfilmAsecondAbornAsouthAbecameAstatesAwarAthroughAbeingAincludingAbothBeforeAnorthAhighBoweverApeopleAfamilyAearlyAhistoryAalbumBreaAseriesAagainstAuntilAsinceAdistrictAcountyAnameAworkAlifeAgroupAmusicAfollowingAnumberAcompanyAseveralAfourAcalledAplayedAreleasedAcareerAleagueAgameBovernmentAhouseAeachAbasedAdayAsameAwonAuseAstationAclubAinternationalAtownAlocatedApopulationAgeneralAcollegeAeastAfoundAageAmarchAendAseptemberAbeganAhomeApublicAchurchAlineAjuneAriverAmemberAsystemAplaceAcenturyAbandAjulyAyorkAjanuaryAoctoberAsongAaugustAbestAformerAbritishApartyAnamedAheldAvillageAshowAlocalAnovemberAtookAserviceAdecemberAbuiltAanotherAmajorAwithinAalongAmembersAfiveAsingleAdueAalthoughAsmallAoldAleftAfinalAlargeAincludeAbuildingAservedApresidentAreceivedAgamesAdeathAfebruaryAmainAthirdAsetAchildrenAownBrderAspeciesAparkAlawAairApublishedAroadAdiedAbookAmenAwomenAarmyAoftenAaccordingAeducationAcentralBountryAdivisionAenglishAtopAincludedAdevelopmentAfrenchAcommunityAamongAwaterAplayAsideAlistAtimesAnearAlateAformAoriginalAdifferentAcenterApowerAledAstudentsAgermanAmovedAcourtAsixAlandAcouncilAislandAu.s.ArecordAmillionAresearchAartAestablishedAawardAstreetAmilitaryAtelevisionAgivenAregionAsupportAwesternAproductionAnonApoliticalCintAcupAperiodAbusinessAtitleAstartedAvariousAelectionAusingAenglandAroleAproducedAbecomeAprogramAworksAfieldAtotalAofficeAclassAwrittenAassociationAradioAunionAlevelAchampionshipAdirectorAfewBorceAcreatedAdepartmentAfoundedAservicesAmarriedAthoughAperAn'tAsiteAopenAactAshortBocietyAversionAroyalApresentAnorthernAworkedAprofessionalAfullAreturnedAjoinedAstoryAfranceAeuropeanAcurrentlyAlanguageAsocialAcaliforniaAindiaAdesignAst.AfurtherAroundAaustraliaAwroteAsanAprojectAcontrolAsouthernArailwayAboardApopularAcontinuedAfreeAbattleAconsideredAvideoAcommonApositionAlivingAhalfAplayingArecordedCdApostAdescribedAaverageArecordsAspecialAmodernAappearedBnnouncedBreasArockBeleaseAelectedAothersAexampleAtermAopenedAsimilarAformedArouteAcensusBurrentAschoolsAoriginallyAlakeAdevelopedAraceAhimselfAforcesAadditionAinformationAuponAprovinceAmatchAeventAsongsAresultAeventsAwinAeasternAtrackAleadAteamsAscienceAhumanAconstructionAministerAgermanyAawardsBvailableAthroughoutBrainingAstyleAbodyAmuseumAaustralianAhealthAsevenBignedAchiefAeventuallyAappointedAseaAcentreAdebutAtourApointsAmediaAlightArangeAcharacterAacrossAfeaturesBamiliesAlargestAindianAnetworkAlessAperformanceBlayersAreferAeuropeAsoldAfestivalAusuallyAtakenAdespiteDignedAcommitteeAprocessAreturnAofficialAepisodeAinstituteAstageAfollowedAperformedAjapaneseApersonalAthusAartsAspaceAlowAmonthsAincludesAchinaAstudyAmiddleBagazineAleadingAjapanAgroupsAaircraftAfeaturedCderalAcivilArightsAmodelAcoachBanadianAbooksAremainedAeightAtypeAindependentAcompletedBapitalAacademyAinsteadAkingdomAorganizationAcountriesAstudiesAcompetitionAsportsBizeAaboveAsectionAfinishedAgoldAinvolvedAreportedAmanagementAsystemsAindustryAdirectedAmarketAfourthAmovementAtechnologyAbankAgroundAcampaignAbaseAlowerAsentAratherAaddedAprovidedAcoastAgrandAhistoricAvalleyAconferenceAbridgeAwinningAapproximatelyAfilmsAchineseAawardedAdegreeArussianAshowsAnativeAfemaleAreplacedAmunicipalityAsquareBtudioAmedicalAdataAafricanAsuccessfulAmidAbayAattackApreviousAoperationsAspanishAtheatreAstudentArepublicAbeginningAprovideAshipAprimaryAownedAwritingAtournamentAcultureAintroducedAtexasArelatedAnaturalApartsAgovernorAreachedAirelandAunitsAseniorAdecidedAitalianAwhoseAhigherAafricaAstandardAincomeAprofessorBlacedAregionalAlosAbuildingsAchampionshipsAactiveAnovelAenergyAgenerallyAinterestAviaAeconomicApreviouslyAstatedAitselfAchannelAbelowAoperationAleaderAtraditionalEeAstructureAlimitedArunsApriorAregularAfamousAsaintAnavyAforeignAlistedAartistAcatholicAairportAresultsAparliamentAcollectionAunitAofficerAgoalAattendedAcommandAstaffAcommissionAlivedBocationAplaysAcommercialAplacesAfoundationAsignificantAolderAmedalAselfBcoredAcompaniesAhighwayAactivitiesAprogramsAwideAmusicalAnotableAlibraryAnumerousAparisAtowardsAindividualAallowedAplantBropertyAannualAcontractAwhomAhighestAinitiallyArequiredAearlierAassemblyBrtistsAruralAseatApracticeAdefeatedAendedAsovietAlengthAspentAmanagerApressAassociatedButhorAissuesAadditionalAcharactersAzealandApolicyAengineAtownshipAnotedAhistoricalAcompleteAfinancialAreligiousAmissionAcontainsAnineArecentCpresentedApennsylvaniaAadministrationAopeningAsecretaryAlinesAreportAexecutiveAyouthAclosedAtheoryAwriterAitalyAangelesBppearanceAfeatureAqueenAlaunchedBegalAtermsAenteredAissueAeditionAsingerAgreekAmajorityAbackgroundAsourceAantiAculturalBomplexBhangesArecordingLine truncated
var wordSequences = {"cardinalNumbers-en":["one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen","twenty"],"ordinalNumbers-en":["first","second","third","fourth","fifth","sixth","seventh","eighth","ninth","tenth","eleventh","twelfth","thirteenth","fourteenth","fifteenth","sixteenth","seventeenth","eighteenth","nineteenth","twentieth"],"daysOfWeek-en":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"],"months-en":["january","february","march","april","may","june","july","august","september","october","november","december"],"seasons-en":["spring","summer","autumn","winter"],"timePeriods-en":["morning","afternoon","evening","night","midnight","noon"],"rainbowColors-en":["red","orange","yellow","green","blue","indigo","violet"],"directions-en":["north","south","east","west"],"intermediateDirections-en":["northeast","northwest","southeast","southwest"],"sizeProgression-en":["tiny","small","medium","large","huge","giant"],"militaryAlphabet-en":["alpha","bravo","charlie","delta","echo","foxtrot","golf","hotel","india","juliet","kilo","lima","mike","november","oscar","papa","quebec","romeo","sierra","tango","uniform","victor","whiskey","xray","yankee","zulu"],"planets-en":["mercury","venus","earth","mars","jupiter","saturn","uranus","neptune","pluto"],"zodiacSigns-en":["aries","taurus","gemini","cancer","leo","virgo","libra","scorpio","sagittarius","capricorn","aquarius","pisces"],"chineseZodiac-en":["rat","ox","tiger","rabbit","dragon","snake","horse","goat","monkey","rooster","dog","pig"]};
var translations = {
warnings: {
straightRow: 'Straight rows of keys on your keyboard are easy to guess.',
keyPattern: 'Short keyboard patterns are easy to guess.',
simpleRepeat: 'Repeated characters like "aaa" are easy to guess.',
extendedRepeat: 'Repeated character patterns like "abcabcabc" are easy to guess.',
sequences: 'Common character sequences like "abc" are easy to guess.',
recentYears: 'Recent years are easy to guess.',
dates: 'Dates are easy to guess.',
topTen: 'This is a heavily used password.',
topHundred: 'This is a frequently used password.',
common: 'This is a commonly used password.',
similarToCommon: 'This is similar to a commonly used password.',
wordByItself: 'Single words are easy to guess.',
namesByThemselves: 'Single names or surnames are easy to guess.',
commonNames: 'Common names and surnames are easy to guess.',
userInputs: 'There should not be any personal or page related data.',
pwned: 'Your password was exposed by a data breach on the Internet.'
},
suggestions: {
l33t: "Avoid predictable letter substitutions like '@' for 'a'.",
reverseWords: 'Avoid reversed spellings of common words.',
allUppercase: 'Capitalize some, but not all letters.',
capitalization: 'Capitalize more than the first letter.',
dates: 'Avoid dates and years that are associated with you.',
recentYears: 'Avoid recent years.',
associatedYears: 'Avoid years that are associated with you.',
sequences: 'Avoid common character sequences.',
repeated: 'Avoid repeated words and characters.',
longerKeyboardPattern: 'Use longer keyboard patterns and change typing direction multiple times.',
anotherWord: 'Add more words that are less common.',
useWords: 'Use multiple words, but avoid common phrases.',
noNeed: 'You can create strong passwords without using symbols, numbers, or uppercase letters.',
pwned: 'If you use this password elsewhere, you should change it.'
},
timeEstimation: {
ltSecond: 'less than a second',
second: '{base} second',
seconds: '{base} seconds',
minute: '{base} minute',
minutes: '{base} minutes',
hour: '{base} hour',
hours: '{base} hours',
day: '{base} day',
days: '{base} days',
month: '{base} month',
months: '{base} months',
year: '{base} year',
years: '{base} years',
centuries: 'centuries'
}
};
// This file is auto generated by data-scripts/_helpers/runtime.ts
const dictionary = {
'commonWords-en': commonWords,
'firstnames-en': firstnames,
'lastnames-en': lastnames,
'wikipedia-en': wikipedia,
...wordSequences
};
exports.dictionary = dictionary;
exports.translations = translations;
return exports;
})({});
//# sourceMappingURL=zxcvbn-ts.js.map
@@ -0,0 +1,74 @@
{
"name": "eslint-visitor-keys",
"version": "3.4.3",
"description": "Constants and utilities about visitor keys to traverse AST.",
"type": "module",
"main": "dist/eslint-visitor-keys.cjs",
"types": "./dist/index.d.ts",
"exports": {
".": [
{
"import": "./lib/index.js",
"require": "./dist/eslint-visitor-keys.cjs"
},
"./dist/eslint-visitor-keys.cjs"
],
"./package.json": "./package.json"
},
"files": [
"dist/index.d.ts",
"dist/visitor-keys.d.ts",
"dist/eslint-visitor-keys.cjs",
"dist/eslint-visitor-keys.d.cts",
"lib"
],
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
},
"devDependencies": {
"@types/estree": "^0.0.51",
"@types/estree-jsx": "^0.0.1",
"@typescript-eslint/parser": "^5.14.0",
"c8": "^7.11.0",
"chai": "^4.3.6",
"eslint": "^7.29.0",
"eslint-config-eslint": "^7.0.0",
"eslint-plugin-jsdoc": "^35.4.0",
"eslint-plugin-node": "^11.1.0",
"eslint-release": "^3.2.0",
"esquery": "^1.4.0",
"json-diff": "^0.7.3",
"mocha": "^9.2.1",
"opener": "^1.5.2",
"rollup": "^2.70.0",
"rollup-plugin-dts": "^4.2.3",
"tsd": "^0.19.1",
"typescript": "^4.6.2"
},
"scripts": {
"build": "npm run build:cjs && npm run build:types",
"build:cjs": "rollup -c",
"build:debug": "npm run build:cjs -- -m && npm run build:types",
"build:keys": "node tools/build-keys-from-ts",
"build:types": "tsc",
"lint": "eslint .",
"prepare": "npm run build",
"release:generate:latest": "eslint-generate-release",
"release:generate:alpha": "eslint-generate-prerelease alpha",
"release:generate:beta": "eslint-generate-prerelease beta",
"release:generate:rc": "eslint-generate-prerelease rc",
"release:publish": "eslint-publish-release",
"test": "mocha tests/lib/**/*.cjs && c8 mocha tests/lib/**/*.js && npm run test:types",
"test:open-coverage": "c8 report --reporter lcov && opener coverage/lcov-report/index.html",
"test:types": "tsd"
},
"repository": "eslint/eslint-visitor-keys",
"funding": "https://opencollective.com/eslint",
"keywords": [],
"author": "Toru Nagashima (https://github.com/mysticatea)",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/eslint/eslint-visitor-keys/issues"
},
"homepage": "https://github.com/eslint/eslint-visitor-keys#readme"
}
@@ -0,0 +1,37 @@
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _index = require('../tokenizer/index');
var _types = require('../tokenizer/types');
var _base = require('../traverser/base');
var _expression = require('../traverser/expression');
var _flow = require('./flow');
var _typescript = require('./typescript');
/**
* Common parser code for TypeScript and Flow.
*/
// An apparent conditional expression could actually be an optional parameter in an arrow function.
function typedParseConditional(noIn) {
// If we see ?:, this can't possibly be a valid conditional. typedParseParenItem will be called
// later to finish off the arrow parameter. We also need to handle bare ? tokens for optional
// parameters without type annotations, i.e. ?, and ?) .
if (_index.match.call(void 0, _types.TokenType.question)) {
const nextType = _index.lookaheadType.call(void 0, );
if (nextType === _types.TokenType.colon || nextType === _types.TokenType.comma || nextType === _types.TokenType.parenR) {
return;
}
}
_expression.baseParseConditional.call(void 0, noIn);
} exports.typedParseConditional = typedParseConditional;
// Note: These "type casts" are *not* valid TS expressions.
// But we parse them here and change them when completing the arrow function.
function typedParseParenItem() {
_index.eatTypeToken.call(void 0, _types.TokenType.question);
if (_index.match.call(void 0, _types.TokenType.colon)) {
if (_base.isTypeScriptEnabled) {
_typescript.tsParseTypeAnnotation.call(void 0, );
} else if (_base.isFlowEnabled) {
_flow.flowParseTypeAnnotation.call(void 0, );
}
}
} exports.typedParseParenItem = typedParseParenItem;
@@ -0,0 +1,81 @@
import { describe, expect, test } from "vitest";
import * as z from "zod";
describe("z.iban", () => {
const valid: [string, string][] = [
["Norway (15, minimum)", "NO9386011117947"],
["Belgium (16)", "BE68539007547034"],
["Netherlands (18)", "NL91ABNA0417164300"],
["Germany (22)", "DE89370400440532013000"],
["Great Britain (22)", "GB29NWBK60161331926819"],
["Turkey (26)", "TR610000100000000000000001"],
["France (27)", "FR1420041010050500013M02606"],
["Cyprus (28)", "CY17002001280000001200527600"],
["Malta (31)", "MT84MALT011000012345MTLCAST001S"],
["Maximum length (34)", "AA73AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"],
["Maximum length mixed (34)", "ZZ560123456789ABCDEFGHIJKLMNOPQRST"],
];
test.each(valid)("accepts %s", (_label, n) => {
expect(z.iban().parse(n)).toBe(n);
});
test("rejects lowercase characters", () => {
expect(() => z.iban().parse("no9386011117947")).toThrow();
expect(() => z.iban().parse("de89370400440532013000")).toThrow();
expect(() => z.iban().parse("FR1420041010050500013m02606")).toThrow();
});
test("rejects spaces and hyphens", () => {
expect(() => z.iban().parse("NO93 8601 1117 947")).toThrow();
expect(() => z.iban().parse(" DE89370400440532013000")).toThrow();
expect(() => z.iban().parse("DE89370400440532013000 ")).toThrow();
expect(() => z.iban().parse("NO93-8601-1117-947")).toThrow();
expect(() => z.iban().parse("DE89-3704-0044-0532-0130-00")).toThrow();
});
test("rejects special characters", () => {
expect(() => z.iban().parse("NO938601111794!")).toThrow();
expect(() => z.iban().parse("DE8937040044053201300@")).toThrow();
expect(() => z.iban().parse("")).toThrow();
});
test("rejects inputs outside length bounds (15-34)", () => {
expect(() => z.iban().parse("NO938601111794")).toThrow();
expect(() => z.iban().parse("AA73AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")).toThrow();
});
test("rejects invalid check digits (checksum failure)", () => {
expect(() => z.iban().parse("NO9386011117948")).toThrow();
expect(() => z.iban().parse("DE89370400440532013001")).toThrow();
expect(() => z.iban().parse("FR1420041010050500013M02607")).toThrow();
});
test("rejects check digits outside 02-98", () => {
// mod 97 alone accepts all three; `98 - remainder` can only ever emit 02-98
expect(() => z.iban().parse("DE00000000000000000066")).toThrow();
expect(() => z.iban().parse("DE01000000000000000048")).toThrow();
expect(() => z.iban().parse("DE99000000000000000030")).toThrow();
});
test("carries the shape regex as its JSON Schema pattern", () => {
expect(z.toJSONSchema(z.iban())).toMatchObject({
format: "iban",
pattern: z.regexes.iban.source,
});
});
test("round-trips through JSON Schema with the checksum intact", () => {
const schema = z.fromJSONSchema(z.toJSONSchema(z.iban()));
expect(schema.safeParse("DE89370400440532013000").success).toBe(true);
expect(schema.safeParse("DE89370400440532013001").success).toBe(false);
});
test("error message references IBAN", () => {
const result = z.iban().safeParse("not-an-iban");
expect(result.success).toBe(false);
if (!result.success) {
expect(result.error.issues[0]?.message).toMatch(/IBAN/i);
}
});
});
@@ -0,0 +1,58 @@
import { f as createRule, g as import_ast_utils, j as getSwitchCaseColonToken } from "../utils.js";
var switch_colon_spacing_default = createRule({
name: "switch-colon-spacing",
meta: {
type: "layout",
docs: { description: "Enforce spacing around colons of switch statements" },
fixable: "whitespace",
schema: [{
type: "object",
properties: {
before: { type: "boolean" },
after: { type: "boolean" }
},
additionalProperties: false
}],
defaultOptions: [{
before: false,
after: true
}],
messages: {
expectedBefore: "Expected space(s) before this colon.",
expectedAfter: "Expected space(s) after this colon.",
unexpectedBefore: "Unexpected space(s) before this colon.",
unexpectedAfter: "Unexpected space(s) after this colon."
}
},
create(context, [options]) {
const sourceCode = context.sourceCode;
const beforeSpacing = options.before === true;
const afterSpacing = options.after !== false;
function isValidSpacing(left, right, expected) {
return (0, import_ast_utils.isClosingBraceToken)(right) || !(0, import_ast_utils.isTokenOnSameLine)(left, right) || sourceCode.isSpaceBetween(left, right) === expected;
}
function fix(fixer, left, right, spacing) {
if (sourceCode.commentsExistBetween(left, right)) return null;
if (spacing) return fixer.insertTextAfter(left, " ");
return fixer.removeRange([left.range[1], right.range[0]]);
}
return { SwitchCase(node) {
const colonToken = getSwitchCaseColonToken(node, sourceCode);
const beforeToken = sourceCode.getTokenBefore(colonToken);
const afterToken = sourceCode.getTokenAfter(colonToken);
if (!isValidSpacing(beforeToken, colonToken, beforeSpacing)) context.report({
node,
loc: colonToken.loc,
messageId: beforeSpacing ? "expectedBefore" : "unexpectedBefore",
fix: (fixer) => fix(fixer, beforeToken, colonToken, beforeSpacing)
});
if (!isValidSpacing(colonToken, afterToken, afterSpacing)) context.report({
node,
loc: colonToken.loc,
messageId: afterSpacing ? "expectedAfter" : "unexpectedAfter",
fix: (fixer) => fix(fixer, colonToken, afterToken, afterSpacing)
});
} };
}
});
export { switch_colon_spacing_default as t };
@@ -0,0 +1,101 @@
import { K as isSingleLine, d as safeReplaceTextBetween, f as createRule, g as import_ast_utils, i as getPropName } from "../utils.js";
var jsx_props_style_default = createRule({
name: "jsx-props-style",
meta: {
type: "layout",
docs: {
experimental: true,
description: "Enforce consistent line break styles for JSX props"
},
fixable: "code",
schema: [{
type: "object",
additionalProperties: false,
properties: {
singleLine: {
type: "object",
additionalProperties: false,
properties: { maxItems: {
type: "integer",
minimum: 0
} }
},
multiLine: {
type: "object",
additionalProperties: false,
properties: {
minItems: {
type: "integer",
minimum: 0
},
maxItemsPerLine: {
type: "integer",
minimum: 1
}
}
}
}
}],
defaultOptions: [{
singleLine: { maxItems: Number.POSITIVE_INFINITY },
multiLine: {
minItems: 0,
maxItemsPerLine: 1
}
}],
messages: {
shouldWrap: "Prop `{{prop}}` must be placed on a new line",
shouldNotWrap: "Prop `{{prop}}` should not be placed on a new line"
}
},
create(context, [option]) {
const { sourceCode } = context;
const { singleLine, multiLine } = option;
function getPrevToken(node, prev, i) {
return i === 0 ? sourceCode.getTokenBefore(node) : sourceCode.getLastToken(prev);
}
function reportShouldWrap(node, prev, i) {
const prevToken = getPrevToken(node, prev, i);
context.report({
node,
messageId: "shouldWrap",
data: { prop: getPropName(sourceCode, node) },
fix: safeReplaceTextBetween(sourceCode, prevToken, node, "\n")
});
}
function reportShouldNotWrap(node, prev, i) {
const prevToken = getPrevToken(node, prev, i);
context.report({
node,
messageId: "shouldNotWrap",
data: { prop: getPropName(sourceCode, node) },
fix: safeReplaceTextBetween(sourceCode, prevToken, node, " ")
});
}
return { JSXOpeningElement(node) {
const attrs = node.attributes;
if (!attrs.length) return;
const needWrap = isSingleLine(node) ? attrs.length > singleLine.maxItems : attrs.length >= multiLine.minItems && node.loc.start.line !== attrs[0].loc.start.line;
const maxPerLine = needWrap ? multiLine.maxItemsPerLine : Number.POSITIVE_INFINITY;
let itemsOnCurrentLine = 0;
for (let i = 0; i < attrs.length; i++) {
const current = attrs[i];
const prev = i === 0 ? node.typeArguments ?? node.name : attrs[i - 1];
if ((0, import_ast_utils.isTokenOnSameLine)(prev, current)) {
itemsOnCurrentLine++;
if (!needWrap) continue;
if (i === 0) reportShouldWrap(current, prev, i);
else if (itemsOnCurrentLine > maxPerLine) {
reportShouldWrap(current, prev, i);
itemsOnCurrentLine = 1;
}
} else {
itemsOnCurrentLine = 1;
if (needWrap) continue;
reportShouldNotWrap(current, prev, i);
}
}
} };
}
});
export { jsx_props_style_default as t };