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,291 @@
import type { AnyRoute, StaticDataRouteOption } from './route'
import type {
AllContext,
AllLoaderData,
AllParams,
FullSearchSchema,
ParseRoute,
RouteById,
RouteIds,
} from './routeInfo'
import type { AnyRouter, RegisteredRouter, SSROption } from './router'
import type { Constrain, ControlledPromise } from './utils'
export type AnyMatchAndValue = { match: any; value: any }
export type FindValueByIndex<
TKey,
TValue extends ReadonlyArray<any>,
> = TKey extends `${infer TIndex extends number}` ? TValue[TIndex] : never
export type FindValueByKey<TKey, TValue> =
TValue extends ReadonlyArray<any>
? FindValueByIndex<TKey, TValue>
: TValue[TKey & keyof TValue]
export type CreateMatchAndValue<TMatch, TValue> = TValue extends any
? {
match: TMatch
value: TValue
}
: never
export type NextMatchAndValue<
TKey,
TMatchAndValue extends AnyMatchAndValue,
> = TMatchAndValue extends any
? CreateMatchAndValue<
TMatchAndValue['match'],
FindValueByKey<TKey, TMatchAndValue['value']>
>
: never
export type IsMatchKeyOf<TValue> =
TValue extends ReadonlyArray<any>
? number extends TValue['length']
? `${number}`
: keyof TValue & `${number}`
: TValue extends object
? keyof TValue & string
: never
export type IsMatchPath<
TParentPath extends string,
TMatchAndValue extends AnyMatchAndValue,
> = `${TParentPath}${IsMatchKeyOf<TMatchAndValue['value']>}`
export type IsMatchResult<
TKey,
TMatchAndValue extends AnyMatchAndValue,
> = TMatchAndValue extends any
? TKey extends keyof TMatchAndValue['value']
? TMatchAndValue['match']
: never
: never
export type IsMatchParse<
TPath,
TMatchAndValue extends AnyMatchAndValue,
TParentPath extends string = '',
> = TPath extends `${string}.${string}`
? TPath extends `${infer TFirst}.${infer TRest}`
? IsMatchParse<
TRest,
NextMatchAndValue<TFirst, TMatchAndValue>,
`${TParentPath}${TFirst}.`
>
: never
: {
path: IsMatchPath<TParentPath, TMatchAndValue>
result: IsMatchResult<TPath, TMatchAndValue>
}
export type IsMatch<TMatch, TPath> = IsMatchParse<
TPath,
TMatch extends any ? { match: TMatch; value: TMatch } : never
>
/**
* Narrows matches based on a path
* @experimental
*/
export const isMatch = <TMatch, TPath extends string>(
match: TMatch,
path: Constrain<TPath, IsMatch<TMatch, TPath>['path']>,
): match is IsMatch<TMatch, TPath>['result'] => {
const parts = (path as string).split('.')
let part
let i = 0
let value: any = match
while ((part = parts[i++]) != null && value != null) {
value = value[part]
}
return value != null
}
export interface DefaultRouteMatchExtensions {
scripts?: unknown
links?: unknown
headScripts?: unknown
meta?: unknown
styles?: unknown
}
export interface RouteMatchExtensions extends DefaultRouteMatchExtensions {}
export interface RouteMatch<
out TRouteId,
out TFullPath,
out TAllParams,
out TFullSearchSchema,
out TLoaderData,
out TAllContext,
out TLoaderDeps,
> extends RouteMatchExtensions {
id: string
routeId: TRouteId
fullPath: TFullPath
index: number
pathname: string
params: TAllParams
_strictParams: TAllParams
status: 'pending' | 'success' | 'error' | 'redirected' | 'notFound'
isFetching: false | 'beforeLoad' | 'loader'
error: unknown
paramsError: unknown
searchError: unknown
updatedAt: number
_nonReactive: {
/** @internal */
beforeLoadPromise?: ControlledPromise<void>
/** @internal */
loaderPromise?: ControlledPromise<void>
/** @internal */
pendingTimeout?: ReturnType<typeof setTimeout>
loadPromise?: ControlledPromise<void>
displayPendingPromise?: Promise<void>
minPendingPromise?: ControlledPromise<void>
dehydrated?: boolean
/** @internal */
error?: unknown
}
loaderData?: TLoaderData
/** @internal */
__routeContext?: Record<string, unknown>
/** @internal */
__beforeLoadContext?: Record<string, unknown>
context: TAllContext
search: TFullSearchSchema
_strictSearch: TFullSearchSchema
fetchCount: number
abortController: AbortController
cause: 'preload' | 'enter' | 'stay'
loaderDeps: TLoaderDeps
preload: boolean
invalid: boolean
headers?: Record<string, string>
globalNotFound?: boolean
staticData: StaticDataRouteOption
/** This attribute is not reactive */
ssr?: SSROption
_forcePending?: boolean
_displayPending?: boolean
}
export interface PreValidationErrorHandlingRouteMatch<
TRouteId,
TFullPath,
TAllParams,
TFullSearchSchema,
> {
id: string
routeId: TRouteId
fullPath: TFullPath
index: number
pathname: string
search:
| { status: 'success'; value: TFullSearchSchema }
| { status: 'error'; error: unknown }
params:
| { status: 'success'; value: TAllParams }
| { status: 'error'; error: unknown }
staticData: StaticDataRouteOption
ssr?: boolean | 'data-only'
}
export type MakePreValidationErrorHandlingRouteMatchUnion<
TRouter extends AnyRouter = RegisteredRouter,
TRoute extends AnyRoute = ParseRoute<TRouter['routeTree']>,
> = TRoute extends any
? PreValidationErrorHandlingRouteMatch<
TRoute['id'],
TRoute['fullPath'],
TRoute['types']['allParams'],
TRoute['types']['fullSearchSchema']
>
: never
export type MakeRouteMatchFromRoute<TRoute extends AnyRoute> = RouteMatch<
TRoute['types']['id'],
TRoute['types']['fullPath'],
TRoute['types']['allParams'],
TRoute['types']['fullSearchSchema'],
TRoute['types']['loaderData'],
TRoute['types']['allContext'],
TRoute['types']['loaderDeps']
>
export type MakeRouteMatch<
TRouteTree extends AnyRoute = RegisteredRouter['routeTree'],
TRouteId = RouteIds<TRouteTree>,
TStrict extends boolean = true,
> = RouteMatch<
TRouteId,
RouteById<TRouteTree, TRouteId>['types']['fullPath'],
TStrict extends false
? AllParams<TRouteTree>
: RouteById<TRouteTree, TRouteId>['types']['allParams'],
TStrict extends false
? FullSearchSchema<TRouteTree>
: RouteById<TRouteTree, TRouteId>['types']['fullSearchSchema'],
TStrict extends false
? AllLoaderData<TRouteTree>
: RouteById<TRouteTree, TRouteId>['types']['loaderData'],
TStrict extends false
? AllContext<TRouteTree>
: RouteById<TRouteTree, TRouteId>['types']['allContext'],
RouteById<TRouteTree, TRouteId>['types']['loaderDeps']
>
export type AnyRouteMatch = RouteMatch<any, any, any, any, any, any, any>
export type MakeRouteMatchUnion<
TRouter extends AnyRouter = RegisteredRouter,
TRoute extends AnyRoute = ParseRoute<TRouter['routeTree']>,
> = TRoute extends any
? RouteMatch<
TRoute['id'],
TRoute['fullPath'],
TRoute['types']['allParams'],
TRoute['types']['fullSearchSchema'],
TRoute['types']['loaderData'],
TRoute['types']['allContext'],
TRoute['types']['loaderDeps']
>
: never
/**
* The `MatchRouteOptions` type is used to describe the options that can be used when matching a route.
*
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/MatchRouteOptionsType#matchrouteoptions-type)
*/
export interface MatchRouteOptions {
/**
* If `true`, will match against pending location instead of the current location.
*
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/MatchRouteOptionsType#pending-property)
*/
pending?: boolean
/**
* If `true`, will match against the current location with case sensitivity.
*
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/MatchRouteOptionsType#casesensitive-property)
*
* @deprecated Declare case sensitivity in the route definition instead, or globally for all routes using the `caseSensitive` option on the router.
*/
caseSensitive?: boolean
/**
* If `true`, will match against the current location's search params using a deep inclusive check. e.g. `{ a: 1 }` will match for a current location of `{ a: 1, b: 2 }`.
*
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/MatchRouteOptionsType#includesearch-property)
*/
includeSearch?: boolean
/**
* If `true`, will match against the current location using a fuzzy match. e.g. `/posts` will match for a current location of `/posts/123`.
*
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/MatchRouteOptionsType#fuzzy-property)
*/
fuzzy?: boolean
}
@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createIdGenerator = createIdGenerator;
exports.resetIds = resetIds;
const ID_CACHE = new Map();
let NEXT_KEY = 0;
function createIdGenerator() {
const key = (NEXT_KEY += 1);
ID_CACHE.set(key, 0);
return () => {
const current = ID_CACHE.get(key) ?? 0;
const next = current + 1;
ID_CACHE.set(key, next);
return next;
};
}
function resetIds() {
ID_CACHE.clear();
}
@@ -0,0 +1,59 @@
{
"name": "@vitest/snapshot",
"type": "module",
"version": "4.1.12",
"description": "Vitest snapshot manager",
"license": "MIT",
"funding": "https://opencollective.com/vitest",
"homepage": "https://vitest.dev/guide/snapshot",
"repository": {
"type": "git",
"url": "git+https://github.com/vitest-dev/vitest.git",
"directory": "packages/snapshot"
},
"bugs": {
"url": "https://github.com/vitest-dev/vitest/issues"
},
"keywords": [
"vitest",
"test",
"snapshot"
],
"sideEffects": false,
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"./environment": {
"types": "./dist/environment.d.ts",
"default": "./dist/environment.js"
},
"./manager": {
"types": "./dist/manager.d.ts",
"default": "./dist/manager.js"
},
"./*": "./*"
},
"main": "./dist/index.js",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"*.d.ts",
"dist"
],
"dependencies": {
"magic-string": "^0.30.21",
"pathe": "^2.0.3",
"@vitest/pretty-format": "4.1.12",
"@vitest/utils": "4.1.12"
},
"devDependencies": {
"@types/natural-compare": "^1.4.3",
"natural-compare": "^1.4.0"
},
"scripts": {
"build": "premove dist && rollup -c",
"dev": "rollup -c --watch"
}
}
@@ -0,0 +1,8 @@
/**
* Determines if the current platform is Windows
* @returns true if running on Windows, false otherwise
*/
export function isWindows() {
return (process.platform === 'win32' ||
/^(msys|cygwin)$/.test(process.env.OSTYPE || ''));
}
@@ -0,0 +1 @@
{"version":3,"file":"file-digit.js","sources":["../../../src/icons/file-digit.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name FileDigit\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNCAyMmgxNGEyIDIgMCAwIDAgMi0yVjdsLTUtNUg2YTIgMiAwIDAgMC0yIDJ2NCIgLz4KICA8cGF0aCBkPSJNMTQgMnY0YTIgMiAwIDAgMCAyIDJoNCIgLz4KICA8cmVjdCB3aWR0aD0iNCIgaGVpZ2h0PSI2IiB4PSIyIiB5PSIxMiIgcng9IjIiIC8+CiAgPHBhdGggZD0iTTEwIDEyaDJ2NiIgLz4KICA8cGF0aCBkPSJNMTAgMThoNCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/file-digit\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 FileDigit = createLucideIcon('FileDigit', [\n ['path', { d: 'M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4', key: '1pf5j1' }],\n ['path', { d: 'M14 2v4a2 2 0 0 0 2 2h4', key: 'tnqrlb' }],\n ['rect', { width: '4', height: '6', x: '2', y: '12', rx: '2', key: 'jm304g' }],\n ['path', { d: 'M10 12h2v6', key: '12zw74' }],\n ['path', { d: 'M10 18h4', key: '1ulq68' }],\n]);\n\nexport default FileDigit;\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,CAAA,CAC9C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAmD,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,CAChF,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,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,KAAK,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC7E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC3C,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,46 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.buildDynamicImport = buildDynamicImport;
var _core = require("@babel/core");
exports.getDynamicImportSource = function getDynamicImportSource(node) {
const [source] = node.arguments;
return _core.types.isStringLiteral(source) || _core.types.isTemplateLiteral(source) ? source : _core.template.expression.ast`\`\${${source}}\``;
};
function buildDynamicImport(node, deferToThen, wrapWithPromise, builder) {
const specifier = _core.types.isCallExpression(node) ? node.arguments[0] : node.source;
if (_core.types.isStringLiteral(specifier) || _core.types.isTemplateLiteral(specifier) && specifier.quasis.length === 0) {
if (deferToThen) {
return _core.template.expression.ast`
Promise.resolve().then(() => ${builder(specifier)})
`;
} else return builder(specifier);
}
const specifierToString = _core.types.isTemplateLiteral(specifier) ? _core.types.identifier("specifier") : _core.types.templateLiteral([_core.types.templateElement({
raw: ""
}), _core.types.templateElement({
raw: ""
})], [_core.types.identifier("specifier")]);
if (deferToThen) {
return _core.template.expression.ast`
(specifier =>
new Promise(r => r(${specifierToString}))
.then(s => ${builder(_core.types.identifier("s"))})
)(${specifier})
`;
} else if (wrapWithPromise) {
return _core.template.expression.ast`
(specifier =>
new Promise(r => r(${builder(specifierToString)}))
)(${specifier})
`;
} else {
return _core.template.expression.ast`
(specifier => ${builder(specifierToString)})(${specifier})
`;
}
}
//# sourceMappingURL=dynamic-import.js.map
@@ -0,0 +1,53 @@
export * from './global.js';
export { TSR_DEFERRED_PROMISE, defer } from './defer.js';
export type { DeferredPromiseState, DeferredPromise } from './defer.js';
export { invariant } from './invariant.js';
export { preloadWarning } from './link.js';
export type { IsRequiredParams, AddTrailingSlash, RemoveTrailingSlashes, AddLeadingSlash, RemoveLeadingSlashes, ActiveOptions, LinkOptionsProps, ResolveCurrentPath, ResolveParentPath, ResolveRelativePath, FindDescendantToPaths, InferDescendantToPaths, RelativeToPath, RelativeToParentPath, RelativeToCurrentPath, AbsoluteToPath, RelativeToPathAutoComplete, NavigateOptions, ToOptions, ToMaskOptions, ToSubOptions, ResolveRoute, SearchParamOptions, PathParamOptions, ToPathOption, LinkOptions, MakeOptionalPathParams, FromPathOption, MakeOptionalSearchParams, MaskOptions, ToSubOptionsProps, RequiredToOptions, } from './link.js';
export type { RouteToPath, TrailingSlashOptionByRouter, ParseRoute, CodeRouteToPath, RouteIds, FullSearchSchema, FullSearchSchemaInput, AllParams, RouteById, AllContext, RoutePaths, RoutesById, RoutesByPath, AllLoaderData, RouteByPath, } from './routeInfo.js';
export type { InferFileRouteTypes, FileRouteTypes, FileRoutesByPath, CreateFileRoute, LazyRoute, LazyRouteOptions, CreateLazyFileRoute, } from './fileRoute.js';
export type { ParsedLocation } from './location.js';
export type { Manifest, RouterManagedTag, AssetCrossOrigin, AssetCrossOriginConfig, ManifestAssetLink, } from './manifest.js';
export { createInlineCssStyleAsset, getAssetCrossOrigin, getStylesheetHref, isInlinableStylesheet, resolveManifestAssetLink, } from './manifest.js';
export { isMatch } from './Matches.js';
export type { AnyMatchAndValue, FindValueByIndex, FindValueByKey, CreateMatchAndValue, NextMatchAndValue, IsMatchKeyOf, IsMatchPath, IsMatchResult, IsMatchParse, IsMatch, RouteMatch, RouteMatchExtensions, MakeRouteMatchUnion, MakeRouteMatch, AnyRouteMatch, MakeRouteMatchFromRoute, MatchRouteOptions, } from './Matches.js';
export { joinPaths, cleanPath, trimPathLeft, trimPathRight, trimPath, removeTrailingSlash, exactPathTest, resolvePath, interpolatePath, } from './path.js';
export { encode, decode } from './qss.js';
export { rootRouteId } from './root.js';
export type { RootRouteId } from './root.js';
export { BaseRoute, BaseRouteApi, BaseRootRoute } from './route.js';
export type { AnyPathParams, SearchSchemaInput, AnyContext, RouteContext, PreloadableObj, RoutePathOptions, StaticDataRouteOption, RoutePathOptionsIntersection, SearchFilter, SearchMiddlewareContext, SearchMiddleware, ResolveId, InferFullSearchSchema, InferFullSearchSchemaInput, InferAllParams, InferAllContext, MetaDescriptor, RouteLinkEntry, SearchValidator, AnySearchValidator, DefaultSearchValidator, ErrorRouteProps, ErrorComponentProps, NotFoundRouteProps, ResolveParams, ParseParamsFn, StringifyParamsFn, ParamsOptions, UpdatableStaticRouteOption, ContextReturnType, ContextAsyncReturnType, ResolveRouteContext, ResolveLoaderData, RoutePrefix, TrimPath, TrimPathLeft, TrimPathRight, ResolveSearchSchemaFnInput, ResolveSearchSchemaInput, ResolveSearchSchemaFn, ResolveSearchSchema, ResolveFullSearchSchema, ResolveFullSearchSchemaInput, ResolveAllContext, BeforeLoadContextParameter, RouteContextParameter, ResolveAllParamsFromParent, AnyRoute, Route, RouteTypes, FullSearchSchemaOption, RemountDepsOptions, MakeRemountDepsOptionsUnion, ResolveFullPath, AnyRouteWithContext, RouteOptions, FileBaseRouteOptions, BaseRouteOptions, UpdatableRouteOptions, LoaderStaleReloadMode, RouteLoaderFn, RouteLoaderEntry, LoaderFnContext, RouteContextFn, ContextOptions, RouteContextOptions, BeforeLoadContextOptions, RootRouteOptions, RootRouteOptionsExtensions, UpdatableRouteOptionsExtensions, RouteConstraints, RouteTypesById, RouteMask, RouteExtensions, RouteLazyFn, RouteAddChildrenFn, RouteAddFileChildrenFn, RouteAddFileTypesFn, ResolveOptionalParams, ResolveRequiredParams, RootRoute, FilebaseRouteOptionsInterface, } from './route.js';
export { createNonReactiveMutableStore, createNonReactiveReadonlyStore, } from './stores.js';
export type { RouterBatchFn, RouterReadableStore, GetStoreConfig, RouterStores, RouterWritableStore, } from './stores.js';
export { defaultSerializeError, getLocationChangeInfo, RouterCore, lazyFn, SearchParamError, PathParamError, getInitialRouterState, getMatchedRoutes, trailingSlashOptions, } from './router.js';
export type { ViewTransitionOptions, TrailingSlashOption, Register, AnyRouter, AnyRouterWithContext, RegisteredRouter, RouterState, BuildNextOptions, RouterListener, RouterEvent, ListenerFn, RouterEvents, MatchRoutesOpts, RouterOptionsExtensions, DefaultRemountDepsFn, PreloadRouteFn, MatchRouteFn, RouterContextOptions, RouterOptions, RouterConstructorOptions, UpdateFn, ParseLocationFn, InvalidateFn, ControllablePromise, InjectedHtmlEntry, EmitFn, LoadFn, GetMatchFn, SubscribeFn, UpdateMatchFn, CommitLocationFn, GetMatchRoutesFn, MatchRoutesFn, StartTransitionFn, LoadRouteChunkFn, ClearCacheFn, CreateRouterFn, SSROption, } from './router.js';
export * from './config.js';
export type { MatchLocation, CommitLocationOptions, NavigateFn, BuildLocationFn, } from './RouterProvider.js';
export { retainSearchParams, stripSearchParams } from './searchMiddleware.js';
export { defaultParseSearch, defaultStringifySearch, parseSearchWith, stringifySearchWith, } from './searchParams.js';
export type { SearchSerializer, SearchParser } from './searchParams.js';
export type { OptionalStructuralSharing } from './structuralSharing.js';
export { functionalUpdate, hasKeys, replaceEqualDeep, isPlainObject, isPlainArray, deepEqual, createControlledPromise, isModuleNotFoundError, DEFAULT_PROTOCOL_ALLOWLIST, escapeHtml, isDangerousProtocol, buildDevStylesUrl, } from './utils.js';
export type { NoInfer, IsAny, PickAsRequired, PickRequired, PickOptional, WithoutEmpty, Expand, DeepPartial, MakeDifferenceOptional, IsUnion, IsNonEmptyObject, Assign, IntersectAssign, Timeout, Updater, NonNullableUpdater, StringLiteral, ThrowOrOptional, ThrowConstraint, ControlledPromise, ExtractObjects, PartialMergeAllObject, MergeAllPrimitive, ExtractPrimitives, PartialMergeAll, Constrain, ConstrainLiteral, UnionToIntersection, MergeAllObjects, MergeAll, ValidateJSON, StrictOrFrom, LooseReturnType, LooseAsyncReturnType, Awaitable, } from './utils.js';
export type { StandardSchemaValidatorProps, StandardSchemaValidator, AnyStandardSchemaValidator, StandardSchemaValidatorTypes, AnyStandardSchemaValidateSuccess, AnyStandardSchemaValidateFailure, AnyStandardSchemaValidateIssue, AnyStandardSchemaValidateInput, AnyStandardSchemaValidate, ValidatorObj, AnyValidatorObj, ValidatorAdapter, AnyValidatorAdapter, AnyValidatorFn, ValidatorFn, Validator, AnyValidator, AnySchema, DefaultValidator, ResolveSearchValidatorInputFn, ResolveSearchValidatorInput, ResolveValidatorInputFn, ResolveValidatorInput, ResolveValidatorOutputFn, ResolveValidatorOutput, } from './validators.js';
export type { UseRouteContextBaseOptions, UseRouteContextOptions, UseRouteContextResult, } from './useRouteContext.js';
export type { UseSearchResult, ResolveUseSearch } from './useSearch.js';
export type { UseParamsResult, ResolveUseParams } from './useParams.js';
export type { UseNavigateResult } from './useNavigate.js';
export type { UseLoaderDepsResult, ResolveUseLoaderDeps } from './useLoaderDeps.js';
export type { UseLoaderDataResult, ResolveUseLoaderData } from './useLoaderData.js';
export type { Redirect, RedirectOptions, RedirectOptionsRoute, RedirectFnRoute, ResolvedRedirect, AnyRedirect, } from './redirect.js';
export { redirect, isRedirect, isResolvedRedirect, parseRedirect, } from './redirect.js';
export type { NotFoundError } from './not-found.js';
export { isNotFound, notFound } from './not-found.js';
export { defaultGetScrollRestorationKey, getElementScrollRestorationEntry, storageKey, scrollRestorationCache, setupScrollRestoration, } from './scroll-restoration.js';
export { handleHashScroll } from './hash-scroll.js';
export type { ScrollRestorationOptions, ScrollRestorationEntry, } from './scroll-restoration.js';
export type { ValidateFromPath, ValidateToPath, ValidateSearch, ValidateParams, InferFrom, InferTo, InferMaskTo, InferMaskFrom, ValidateNavigateOptions, ValidateNavigateOptionsArray, ValidateRedirectOptions, ValidateRedirectOptionsArray, ValidateId, InferStrict, InferShouldThrow, InferSelected, ValidateUseSearchResult, ValidateUseParamsResult, } from './typePrimitives.js';
export type { AnySerializationAdapter, SerializationAdapter, ValidateSerializableInput, SerializerExtensions, ValidateSerializable, RegisteredSerializableInput, SerializableExtensions, DefaultSerializable, Serializable, TSR_SERIALIZABLE, TsrSerializable, SerializationError, } from './ssr/serializer/transformer.js';
export { createSerializationAdapter, makeSerovalPlugin, makeSsrSerovalPlugin, } from './ssr/serializer/transformer.js';
export { defaultSerovalPlugins } from './ssr/serializer/seroval-plugins.js';
export { RawStream, createRawStreamRPCPlugin, createRawStreamDeserializePlugin, } from './ssr/serializer/RawStream.js';
export type { OnRawStreamCallback, RawStreamHint, RawStreamOptions, } from './ssr/serializer/RawStream.js';
export { composeRewrites, executeRewriteInput } from './rewrite.js';
export type { LocationRewrite, LocationRewriteFunction } from './router.js';
@@ -0,0 +1 @@
(function(){var r,t,n,e,i,o,a,s;t={},s=this,"undefined"!=typeof module&&null!==module&&module.exports?module.exports=t:s.ipaddr=t,a=function(r,t,n,e){var i,o;if(r.length!==t.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");for(i=0;e>0;){if((o=n-e)<0&&(o=0),r[i]>>o!=t[i]>>o)return!1;e-=n,i+=1}return!0},t.subnetMatch=function(r,t,n){var e,i,o,a,s;null==n&&(n="unicast");for(o in t)for(!(a=t[o])[0]||a[0]instanceof Array||(a=[a]),e=0,i=a.length;e<i;e++)if(s=a[e],r.kind()===s[0].kind()&&r.match.apply(r,s))return o;return n},t.IPv4=function(){function r(r){var t,n,e;if(4!==r.length)throw new Error("ipaddr: ipv4 octet count should be 4");for(t=0,n=r.length;t<n;t++)if(!(0<=(e=r[t])&&e<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=r}return r.prototype.kind=function(){return"ipv4"},r.prototype.toString=function(){return this.octets.join(".")},r.prototype.toNormalizedString=function(){return this.toString()},r.prototype.toByteArray=function(){return this.octets.slice(0)},r.prototype.match=function(r,t){var n;if(void 0===t&&(r=(n=r)[0],t=n[1]),"ipv4"!==r.kind())throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return a(this.octets,r.octets,8,t)},r.prototype.SpecialRanges={unspecified:[[new r([0,0,0,0]),8]],broadcast:[[new r([255,255,255,255]),32]],multicast:[[new r([224,0,0,0]),4]],linkLocal:[[new r([169,254,0,0]),16]],loopback:[[new r([127,0,0,0]),8]],carrierGradeNat:[[new r([100,64,0,0]),10]],private:[[new r([10,0,0,0]),8],[new r([172,16,0,0]),12],[new r([192,168,0,0]),16]],reserved:[[new r([192,0,0,0]),24],[new r([192,0,2,0]),24],[new r([192,88,99,0]),24],[new r([198,51,100,0]),24],[new r([203,0,113,0]),24],[new r([240,0,0,0]),4]]},r.prototype.range=function(){return t.subnetMatch(this,this.SpecialRanges)},r.prototype.toIPv4MappedAddress=function(){return t.IPv6.parse("::ffff:"+this.toString())},r.prototype.prefixLengthFromSubnetMask=function(){var r,t,n,e,i,o,a;for(a={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},r=0,i=!1,t=n=3;n>=0;t=n+=-1){if(!((e=this.octets[t])in a))return null;if(o=a[e],i&&0!==o)return null;8!==o&&(i=!0),r+=o}return 32-r},r}(),n="(0?\\d+|0x[a-f0-9]+)",e={fourOctet:new RegExp("^"+n+"\\."+n+"\\."+n+"\\."+n+"$","i"),longValue:new RegExp("^"+n+"$","i")},t.IPv4.parser=function(r){var t,n,i,o,a;if(n=function(r){return"0"===r[0]&&"x"!==r[1]?parseInt(r,8):parseInt(r)},t=r.match(e.fourOctet))return function(){var r,e,o,a;for(a=[],r=0,e=(o=t.slice(1,6)).length;r<e;r++)i=o[r],a.push(n(i));return a}();if(t=r.match(e.longValue)){if((a=n(t[1]))>4294967295||a<0)throw new Error("ipaddr: address outside defined range");return function(){var r,t;for(t=[],o=r=0;r<=24;o=r+=8)t.push(a>>o&255);return t}().reverse()}return null},t.IPv6=function(){function r(r,t){var n,e,i,o,a,s;if(16===r.length)for(this.parts=[],n=e=0;e<=14;n=e+=2)this.parts.push(r[n]<<8|r[n+1]);else{if(8!==r.length)throw new Error("ipaddr: ipv6 part count should be 8 or 16");this.parts=r}for(i=0,o=(s=this.parts).length;i<o;i++)if(!(0<=(a=s[i])&&a<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");t&&(this.zoneId=t)}return r.prototype.kind=function(){return"ipv6"},r.prototype.toString=function(){return this.toNormalizedString().replace(/((^|:)(0(:|$))+)/,"::")},r.prototype.toRFC5952String=function(){var r,t,n,e,i;for(e=/((^|:)(0(:|$)){2,})/g,i=this.toNormalizedString(),r=0,t=-1;n=e.exec(i);)n[0].length>t&&(r=n.index,t=n[0].length);return t<0?i:i.substring(0,r)+"::"+i.substring(r+t)},r.prototype.toByteArray=function(){var r,t,n,e,i;for(r=[],t=0,n=(i=this.parts).length;t<n;t++)e=i[t],r.push(e>>8),r.push(255&e);return r},r.prototype.toNormalizedString=function(){var r,t,n;return r=function(){var r,n,e,i;for(i=[],r=0,n=(e=this.parts).length;r<n;r++)t=e[r],i.push(t.toString(16));return i}.call(this).join(":"),n="",this.zoneId&&(n="%"+this.zoneId),r+n},r.prototype.toFixedLengthString=function(){var r,t,n;return r=function(){var r,n,e,i;for(i=[],r=0,n=(e=this.parts).length;r<n;r++)t=e[r],i.push(t.toString(16).padStart(4,"0"));return i}.call(this).join(":"),n="",this.zoneId&&(n="%"+this.zoneId),r+n},r.prototype.match=function(r,t){var n;if(void 0===t&&(r=(n=r)[0],t=n[1]),"ipv6"!==r.kind())throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return a(this.parts,r.parts,16,t)},r.prototype.SpecialRanges={unspecified:[new r([0,0,0,0,0,0,0,0]),128],linkLocal:[new r([65152,0,0,0,0,0,0,0]),10],multicast:[new r([65280,0,0,0,0,0,0,0]),8],loopback:[new r([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new r([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new r([0,0,0,0,0,65535,0,0]),96],rfc6145:[new r([0,0,0,0,65535,0,0,0]),96],rfc6052:[new r([100,65435,0,0,0,0,0,0]),96],"6to4":[new r([8194,0,0,0,0,0,0,0]),16],teredo:[new r([8193,0,0,0,0,0,0,0]),32],reserved:[[new r([8193,3512,0,0,0,0,0,0]),32]]},r.prototype.range=function(){return t.subnetMatch(this,this.SpecialRanges)},r.prototype.isIPv4MappedAddress=function(){return"ipv4Mapped"===this.range()},r.prototypeLine truncated
@@ -0,0 +1,65 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const util_1 = require("../util");
exports.default = (0, util_1.createRule)({
name: 'no-non-null-asserted-optional-chain',
meta: {
type: 'problem',
docs: {
description: 'Disallow non-null assertions after an optional chain expression',
recommended: 'recommended',
},
hasSuggestions: true,
messages: {
noNonNullOptionalChain: 'Optional chain expressions can return undefined by design - using a non-null assertion is unsafe and wrong.',
suggestRemovingNonNull: 'You should remove the non-null assertion.',
},
schema: [],
},
defaultOptions: [],
create(context) {
return {
// non-nulling a wrapped chain will scrub all nulls introduced by the chain
// (x?.y)!
// (x?.())!
'TSNonNullExpression > ChainExpression'(node) {
// selector guarantees this assertion
const parent = node.parent;
context.report({
node,
messageId: 'noNonNullOptionalChain',
// use a suggestion instead of a fixer, because this can obviously break type checks
suggest: [
{
messageId: 'suggestRemovingNonNull',
fix(fixer) {
return fixer.removeRange([
parent.range[1] - 1,
parent.range[1],
]);
},
},
],
});
},
// non-nulling at the end of a chain will scrub all nulls introduced by the chain
// x?.y!
// x?.()!
'ChainExpression > TSNonNullExpression'(node) {
context.report({
node,
messageId: 'noNonNullOptionalChain',
// use a suggestion instead of a fixer, because this can obviously break type checks
suggest: [
{
messageId: 'suggestRemovingNonNull',
fix(fixer) {
return fixer.removeRange([node.range[1] - 1, node.range[1]]);
},
},
],
});
},
};
},
});
@@ -0,0 +1,522 @@
export default `flf2a$ 5 4 14 -1 11 0 0 0
Author : Bateau (lbm)
Date : 2005/2/4 11:04:37
Version: 1.0
-------------------------------------------------
-------------------------------------------------
This font has been created using JavE's FIGlet font export assistant.
Have a look at: http://www.jave.de
Permission is hereby given to modify this font, as long as the
modifier's name is placed on a comment line.
$ #
$ #
$ #
$ #
$ ##
!#
#
#
#
##
"#
#
#
#
##
##
#
#
#
##
$#
#
#
#
##
%#
#
#
#
##
&#
#
#
#
##
'#
#
#
#
##
(#
#
#
#
##
)#
#
#
#
##
*#
#
#
#
##
+#
#
#
#
##
,#
#
#
#
##
-#
#
#
#
##
.#
#
#
#
##
/#
#
#
#
##
0#
#
#
#
##
1#
#
#
#
##
2#
#
#
#
##
3#
#
#
#
##
4#
#
#
#
##
5#
#
#
#
##
6#
#
#
#
##
7#
#
#
#
##
8#
#
#
#
##
9#
#
#
#
##
:#
#
#
#
##
;#
#
#
#
##
<#
#
#
#
##
=#
#
#
#
##
>#
#
#
#
##
______ #
|_| | | #
__|_| #
|_| #
_ ##
@#
#
#
#
##
______ #
| | | | #
| |__| | #
|_| |_| #
##
______ #
| | | \\ #
| |--| < #
|_|__|_/ #
##
______ #
| | #
| | #
|_|____ #
##
_____ #
| | \\ \\ #
| | | | #
|_|_/_/ #
##
______ #
| | #
| |---- #
|_|____ #
##
______ #
| | #
| |---- #
|_| #
##
______ #
| | ____ #
| | | | #
|_|__|_| #
##
_ _ #
| | | | #
| |--| | #
|_| |_| #
##
_____ #
| | #
| | #
_|_|_ #
##
_ #
| | #
_ | | #
|_|__|_| #
##
_ __ #
| | / / #
| |-< < #
|_| \\_\\ #
##
_ #
| | #
| | _ #
|_|__|_| #
##
_________ #
| | | | | \\ #
| | | | | | #
|_| |_| |_| #
##
______ #
| | \\ \\ #
| | | | #
|_| |_| #
##
______ #
/ | | \\ #
| | | | #
\\_|__|_/ #
##
______ #
| | | \\ #
| |__|_/ #
|_| #
##
______ #
/ | _| \\ #
| | \\ | #
\\_|__|__\\ #
##
______ #
| | | \\ #
| |__| | #
|_| \\_\\ #
##
______ #
/ | #
'------. #
____|_/ #
##
_______ #
| | #
| | #
|_| #
##
_ _ #
| | | | #
| | | | #
\\_|__|_| #
##
_ _ #
| | | | #
\\ \\ / / #
\\_\\_/_/ #
##
_ _ _ #
| | | | | | #
| | | | | | #
|_|_|_|_|_/ #
##
_ _ #
\\ \\ / / #
>|--|< #
/_/ \\_\\ #
##
__ _ #
\\ \\ | | #
\\_\\_| | #
____|_| #
##
______ #
/ / #
.---' #
/_/___ #
##
[#
#
#
#
##
\\#
#
#
#
##
]#
#
#
#
##
^#
#
#
#
##
_#
#
#
#
##
\`#
#
#
#
##
______ #
| | | | #
| |__| | #
|_| |_| #
##
______ #
| | | \\ #
| |--| < #
|_|__|_/ #
##
______ #
| | #
| | #
|_|____ #
##
_____ #
| | \\ \\ #
| | | | #
|_|_/_/ #
##
______ #
| | #
| |---- #
|_|____ #
##
______ #
| | #
| |---- #
|_| #
##
______ #
| | ____ #
| | | | #
|_|__|_| #
##
_ _ #
| | | | #
| |--| | #
|_| |_| #
##
_____ #
| | #
| | #
_|_|_ #
##
_ #
| | #
_ | | #
|_|__|_| #
##
_ __ #
| | / / #
| |-< < #
|_| \\_\\ #
##
_ #
| | #
| | _ #
|_|__|_| #
##
_________ #
| | | | | \\ #
| | | | | | #
|_| |_| |_| #
##
______ #
| | \\ \\ #
| | | | #
|_| |_| #
##
______ #
/ | | \\ #
| | | | #
\\_|__|_/ #
##
______ #
| | | \\ #
| |__|_/ #
|_| #
##
______ #
/ | _| \\ #
| | \\ | #
\\_|__|__\\ #
##
______ #
| | | \\ #
| |__| | #
|_| \\_\\ #
##
______ #
/ | #
'------. #
____|_/ #
##
_______ #
| | #
| | #
|_| #
##
_ _ #
| | | | #
| | | | #
\\_|__|_| #
##
_ _ #
| | | | #
\\ \\ / / #
\\_\\_/_/ #
##
_ _ _ #
| | | | | | #
| | | | | | #
|_|_|_|_|_/ #
##
_ _ #
\\ \\ / / #
>|--|< #
/_/ \\_\\ #
##
__ _ #
\\ \\ | | #
\\_\\_| | #
____|_| #
##
______ #
/ / #
.---' #
/_/___ #
##
{#
#
#
#
##
|#
#
#
#
##
}#
#
#
#
##
~#
#
#
#
##
______ #
| | | | #
| |__| | #
|_| |_| #
##
______ #
/ | | \\ #
| | | | #
\\_|__|_/ #
##
_ _ #
| | | | #
| | | | #
\\_|__|_| #
##
______ #
| | | | #
| |__| | #
|_| |_| #
##
______ #
/ | | \\ #
| | | | #
\\_|__|_/ #
##
_ _ #
| | | | #
| | | | #
\\_|__|_| #
##
�#
#
#
#
##`
@@ -0,0 +1 @@
{"version":3,"file":"keyboard-off.js","sources":["../../../src/icons/keyboard-off.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name KeyboardOff\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNIDIwIDQgQTIgMiAwIDAgMSAyMiA2IiAvPgogIDxwYXRoIGQ9Ik0gMjIgNiBMIDIyIDE2LjQxIiAvPgogIDxwYXRoIGQ9Ik0gNyAxNiBMIDE2IDE2IiAvPgogIDxwYXRoIGQ9Ik0gOS42OSA0IEwgMjAgNCIgLz4KICA8cGF0aCBkPSJNMTQgOGguMDEiIC8+CiAgPHBhdGggZD0iTTE4IDhoLjAxIiAvPgogIDxwYXRoIGQ9Im0yIDIgMjAgMjAiIC8+CiAgPHBhdGggZD0iTTIwIDIwSDRhMiAyIDAgMCAxLTItMlY2YTIgMiAwIDAgMSAyLTIiIC8+CiAgPHBhdGggZD0iTTYgOGguMDEiIC8+CiAgPHBhdGggZD0iTTggMTJoLjAxIiAvPgo8L3N2Zz4=) - https://lucide.dev/icons/keyboard-off\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 KeyboardOff = createLucideIcon('KeyboardOff', [\n ['path', { d: 'M 20 4 A2 2 0 0 1 22 6', key: '1g1fkt' }],\n ['path', { d: 'M 22 6 L 22 16.41', key: '1qjg3w' }],\n ['path', { d: 'M 7 16 L 16 16', key: 'n0yqwb' }],\n ['path', { d: 'M 9.69 4 L 20 4', key: 'kbpcgx' }],\n ['path', { d: 'M14 8h.01', key: '1primd' }],\n ['path', { d: 'M18 8h.01', key: 'emo2bl' }],\n ['path', { d: 'm2 2 20 20', key: '1ooewy' }],\n ['path', { d: 'M20 20H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2', key: 's23sx2' }],\n ['path', { d: 'M6 8h.01', key: 'x9i8wu' }],\n ['path', { d: 'M8 12h.01', key: 'czm47f' }],\n]);\n\nexport default KeyboardOff;\n"],"names":[],"mappings":"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"}
@@ -0,0 +1,16 @@
/**
* @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 BookmarkMinus = createLucideIcon("BookmarkMinus", [
["path", { d: "m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z", key: "1fy3hk" }],
["line", { x1: "15", x2: "9", y1: "10", y2: "10", key: "1gty7f" }]
]);
export { BookmarkMinus as default };
//# sourceMappingURL=bookmark-minus.js.map
@@ -0,0 +1 @@
{"version":3,"file":"school.js","sources":["../../../src/icons/school.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name School\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTQgMjJ2LTRhMiAyIDAgMSAwLTQgMHY0IiAvPgogIDxwYXRoIGQ9Im0xOCAxMCAzLjQ0NyAxLjcyNGExIDEgMCAwIDEgLjU1My44OTRWMjBhMiAyIDAgMCAxLTIgMkg0YTIgMiAwIDAgMS0yLTJ2LTcuMzgyYTEgMSAwIDAgMSAuNTUzLS44OTRMNiAxMCIgLz4KICA8cGF0aCBkPSJNMTggNXYxNyIgLz4KICA8cGF0aCBkPSJtNCA2IDcuMTA2LTMuNTUzYTIgMiAwIDAgMSAxLjc4OCAwTDIwIDYiIC8+CiAgPHBhdGggZD0iTTYgNXYxNyIgLz4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjkiIHI9IjIiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/school\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 School = createLucideIcon('School', [\n ['path', { d: 'M14 22v-4a2 2 0 1 0-4 0v4', key: 'hhkicm' }],\n [\n 'path',\n {\n d: 'm18 10 3.447 1.724a1 1 0 0 1 .553.894V20a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-7.382a1 1 0 0 1 .553-.894L6 10',\n key: '1xqip1',\n },\n ],\n ['path', { d: 'M18 5v17', key: '1sw6gf' }],\n ['path', { d: 'm4 6 7.106-3.553a2 2 0 0 1 1.788 0L20 6', key: '9d2mlk' }],\n ['path', { d: 'M6 5v17', key: '1xfsm0' }],\n ['circle', { cx: '12', cy: '9', r: '2', key: '1092wv' }],\n]);\n\nexport default School;\n"],"names":[],"mappings":"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"}
@@ -0,0 +1 @@
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../../../../src/server/auth/provider.ts"],"names":[],"mappings":""}
@@ -0,0 +1,835 @@
flf2a$ 8 7 13 -1 18
AMCtubes font by LESTER
=============================
-> Conversion to FigLet font by MEPH. (Part of ASCII Editor Service Pack I)
(http://studenten.freepage.de/meph/ascii/ascii/editor/_index.htm)
-> Defined: ASCII code alphabet
-> Uppercase characters only.
.-~~-.
(_^..^_)
Lester||||AMC - Anthony Cucchiara
*Mythos Online : Internet Magazine of Lovecraftian Horror - Dead Alice*
http://www.fortunecity.com/victorian/redlion/157/deadal.htm
*Visit my web page ANSI/ASCII/Fonts*
http://members.aol.com/lester5374/
$@
$@
$@
$@
$@
$@
$@
$@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
.ss @
SSSz @
'ZZ' @
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
d s. @
S ~O @
S `b @
S sSSO @
S O @
S O @
P P @
@@
d ss. @
S b @
S P @
S sSS' @
S b @
S P @
P `SS @
@@
sSSs. @
S @
S @
S @
S @
S @
"sss' @
@@
d ss @
S ~o @
S b @
S S @
S P @
S S @
P ss" @
@@
d sss @
S @
S @
S sSSs @
S @
S @
P sSSss @
@@
d sss @
S @
S @
S sSSs @
S @
S @
P @
@@
sSSSs @
S S @
S @
S @
S ssSb @
S S @
"sss" @
@@
d d @
S S @
S S @
S sSSS @
S S @
S S @
P P @
@@
d @
S @
S @
S @
S @
S @
P @
@@
d @
S @
S @
S @
d P @
S S @
"sss" @
@@
d S @
S P @
Ssss' @
S s @
S b @
S b @
P P @
@@
d @
S @
S @
S @
S @
S @
P sSSs @
@@
d s sb @
S S S S @
S S S @
S S @
S S @
S S @
P P @
@@
d s b @
S S S @
S SS @
S S @
S S @
S S @
P P @
@@
sSSSs @
S S @
S S @
S S @
S S @
S S @
"sss" @
@@
d ss. @
S b @
S P @
S sS' @
S @
S @
P @
@@
sSSSs @
S S @
S S @
S S @
S S @
S s S @
"sss"ss @
@@
d ss. @
S b @
S P @
S sS' @
S S @
S S @
P P @
@@
sss. @
d @
Y @
ss. @
b @
P @
` ss' @
@@
sss sssss @
S @
S @
S @
S @
S @
P @
@@
d b @
S S @
S S @
S S @
S S @
S S @
"sss" @
@@
d b @
S S @
S S @
S S @
S S @
S S @
"ssS @
@@
d d b @
S S S @
S S S @
S S S @
S S S @
S S S @
"ss"S @
@@
Ss sS @
S S @
S @
S @
S @
S S @
s" "s @
@@
Ss sS @
S S @
S @
S @
S @
S @
P @
@@
sSSSSSs @
s @
s @
s @
s @
s @
sSSSSSs @
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
d s. @
S ~O @
S `b @
S sSSO @
S O @
S O @
P P @
@@
d ss. @
S b @
S P @
S sSS' @
S b @
S P @
P `SS @
@@
sSSs. @
S @
S @
S @
S @
S @
"sss' @
@@
d ss @
S ~o @
S b @
S S @
S P @
S S @
P ss" @
@@
d sss @
S @
S @
S sSSs @
S @
S @
P sSSss @
@@
d sss @
S @
S @
S sSSs @
S @
S @
P @
@@
sSSSs @
S S @
S @
S @
S ssSb @
S S @
"sss" @
@@
d d @
S S @
S S @
S sSSS @
S S @
S S @
P P @
@@
d @
S @
S @
S @
S @
S @
P @
@@
d @
S @
S @
S @
d P @
S S @
"sss" @
@@
d S @
S P @
Ssss' @
S s @
S b @
S b @
P P @
@@
d @
S @
S @
S @
S @
S @
P sSSs @
@@
d s sb @
S S S S @
S S S @
S S @
S S @
S S @
P P @
@@
d s b @
S S S @
S SS @
S S @
S S @
S S @
P P @
@@
sSSSs @
S S @
S S @
S S @
S S @
S S @
"sss" @
@@
d ss. @
S b @
S P @
S sS' @
S @
S @
P @
@@
sSSSs @
S S @
S S @
S S @
S S @
S s S @
"sss"ss @
@@
d ss. @
S b @
S P @
S sS' @
S S @
S S @
P P @
@@
sss. @
d @
Y @
ss. @
b @
P @
` ss' @
@@
sss sssss @
S @
S @
S @
S @
S @
P @
@@
d b @
S S @
S S @
S S @
S S @
S S @
"sss" @
@@
d b @
S S @
S S @
S S @
S S @
S S @
"ssS @
@@
d d b @
S S S @
S S S @
S S S @
S S S @
S S S @
"ss"S @
@@
Ss sS @
S S @
S @
S @
S @
S S @
s" "s @
@@
Ss sS @
S S @
S @
S @
S @
S @
P @
@@
sSSSSSs @
s @
s @
s @
s @
s @
sSSSSSs @
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@@ -0,0 +1,4 @@
'use strict';
/** @type {import('./uri')} */
module.exports = URIError;
@@ -0,0 +1,76 @@
import { WriteStream, WriteStreamSync } from '@isaacs/fs-minipass';
import path from 'node:path';
import { list } from './list.js';
import { makeCommand } from './make-command.js';
import { Pack, PackSync } from './pack.js';
const createFileSync = (opt, files) => {
const p = new PackSync(opt);
const stream = new WriteStreamSync(opt.file, {
mode: opt.mode || 0o666,
});
p.pipe(stream);
addFilesSync(p, files);
};
const createFile = (opt, files) => {
const p = new Pack(opt);
const stream = new WriteStream(opt.file, {
mode: opt.mode || 0o666,
});
p.pipe(stream);
const promise = new Promise((res, rej) => {
stream.on('error', rej);
stream.on('close', res);
p.on('error', rej);
});
addFilesAsync(p, files).catch(er => p.emit('error', er));
return promise;
};
const addFilesSync = (p, files) => {
files.forEach(file => {
if (file.charAt(0) === '@') {
list({
file: path.resolve(p.cwd, file.slice(1)),
sync: true,
noResume: true,
onReadEntry: entry => p.add(entry),
});
}
else {
p.add(file);
}
});
p.end();
};
const addFilesAsync = async (p, files) => {
for (const file of files) {
if (file.charAt(0) === '@') {
await list({
file: path.resolve(String(p.cwd), file.slice(1)),
noResume: true,
onReadEntry: entry => {
p.add(entry);
},
});
}
else {
p.add(file);
}
}
p.end();
};
const createSync = (opt, files) => {
const p = new PackSync(opt);
addFilesSync(p, files);
return p;
};
const createAsync = (opt, files) => {
const p = new Pack(opt);
addFilesAsync(p, files).catch(er => p.emit('error', er));
return p;
};
export const create = makeCommand(createFileSync, createFile, createSync, createAsync, (_opt, files) => {
if (!files?.length) {
throw new TypeError('no paths specified to add to archive');
}
});
//# sourceMappingURL=create.js.map
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"2":"_J"},C:{"2":"_S"},D:{"1":"_JJ","2":"_HS"},E:{"2":"_R"},F:{"1":"_9R","2":"_0B _QN _O"},G:{"2":"_M"},H:{"2":"1D"},I:{"1":"I","2":"_G"},J:{"2":"_B"},K:{"2":"_N"},L:{"2":"I"},M:{"2":"YC"},N:{"2":"_A"},O:{"2":"bC"},P:{"1":"_U","2":"J"},Q:{"2":"JE"},R:{"2":"KE"},S:{"2":"_C"}},B:6,C:"SDCH Accept-Encoding/Content-Encoding",D:true};
@@ -0,0 +1,623 @@
flf2a. 6 5 15 0 10
slide.flf (C) 1994 by Victor Parada (vparada@inf.utfsm.cl) 94/08/18.
Looks nice in some kind of screens and paper.
Feel free to replace "#", "H" and "|" to some other chars.
Try option "-m -1" to disable smush and get clear fonts.
Latin fonts a' e' i' o' u' n~ and N~ replaces A" O" U" a" o" u" and B.
. $
.. $
.. $
.. $
. $
. $$
#| $
#| $
#| $
.. $
#| $
$$
#|#| $
#|#| $
# #. $
.. $
$
$$
#H H| $
##HHH|| $
#H H| $
##HHH|| $
#H H| $
$$
#| $
#HH|| $
##H|. $
.#H|| $
##HH| $
#| $$
## || $
## H| $
.#|. $
#H || $
## || $
$$
#|. $
#| . $
##H || $
## || $
##H || $
$$
#| $
#| $
#. $
. $
$
$$
#|| $
##| $
##. $
##| $
#|| $
$$
##| $
#|| $
.|| $
#|| $
##| $
$$
## || $
#H| $
##HHH|| $
#H| $
## || $
$$
.. $
.#|. $
##HH|| $
.#|. $
.. $
$$
$
$
. $
#| $
#| $
#. $$
$
.. $
#H|| $
.. $
$
$$
$
$
. $
#| $
#| $
$$
.H| $
#| $
#| $
#| $
#H. $
$$
#HH| $
## || $
## H|| $
##H || $
#HH| $
$$
#| $
##| $
#| $
#| $
#| $
$$
##HH| $
. || $
#HH| $
## . $
##HH|| $
$$
##HH| $
. || $
#HH| $
. || $
##HH| $
$$
#|| $
#H|| $
## || $
##H||| $
.|| $
$$
##HH|| $
## . $
##HH| $
. || $
##HH| $
$$
#HH| $
## . $
##HH| $
## || $
#HH| $
$$
##HH|| $
. #| $
#| $
#| $
##. $
$$
#HH| $
## || $
#HH| $
## || $
#HH| $
$$
#HH| $
## || $
#HH|| $
. || $
#HH| $
$$
#| $
#| $
.. $
#| $
#| $
$$
#| $
#| $
.. $
#| $
#| $
#. $$
.H| $
#| $
##. $
#| $
.H| $
$$
.. $
#H|| $
.. $
#H|| $
.. $
$$
##. $
#| $
.|| $
#| $
##. $
$$
##HH| $
. || $
#H| $
.. $
#| $
$$
#HH| $
## H|| $
## H|| $
## . $
#HH| $
$$
#| $
#HH| $
## || $
##HH|| $
## || $
$$
##HH| $
## || $
##HH| $
## || $
##HH| $
$$
#HH|| $
## . $
## . $
## . $
#HH|| $
$$
##HH| $
## || $
## || $
## || $
##HH| $
$$
##HH|| $
# . $
##HH| $
## . $
##HH|| $
$$
##HH|| $
## . $
##HH| $
## . $
## . $
$$
#HH|| $
## . $
## H|| $
## || $
#HH|| $
$$
## || $
## || $
##HH|| $
## || $
## || $
$$
#HH| $
#| $
#| $
#| $
#HH| $
$$
. || $
. || $
. || $
## || $
#HH| $
$$
## || $
## H| $
##H| $
## H| $
## || $
$$
##. $
##. $
##. $
## . $
##HH| $
$$
## || $
### H|| $
###HH|| $
## H || $
## || $
$$
## || $
##H || $
##HH|| $
## H|| $
## || $
$$
#HH| $
## || $
## || $
## || $
#HH| $
$$
##HH| $
## || $
##HH| $
## . $
##. $
$$
#HH| $
## || $
## || $
## H| $
#HHH| $
$$
##HH| $
## || $
##HH| $
## H| $
## || $
$$
#HH|| $
## . $
#HH| $
. || $
##HH| $
$$
##HH|| $
.#|. $
#| $
#| $
#| $
$$
## || $
## || $
## || $
## || $
#HH| $
$$
## || $
## || $
## || $
#HH| $
#| $
$$
## || $
## H || $
###HH|| $
### H|| $
## || $
$$
## || $
#HH| $
#| $
#HH| $
## || $
$$
## || $
## || $
#HH| $
#| $
#| $
$$
##HH|| $
. #| $
#| $
#H . $
##HH|| $
$$
##H| $
##. $
##. $
##. $
##H| $
$$
#H. $
#| $
#| $
#| $
.H| $
$$
##H| $
.H| $
.H| $
.H| $
##H| $
$$
#| $
##|| $
# | $
$
$
$$
$
$
.. $
.. $
.... $
##HH|| $$
#| $
#| $
.| $
$
$
$$
$
##| $
.H| $
##H| $
##HH| $
$$
##. $
##. $
##H| $
## H| $
##H| $
$$
.. $
#HH| $
## . $
## . $
#HH| $
$$
.H| $
.H| $
#HH| $
## H| $
#HH| $
$$
$
#H| $
##HH| $
## . $
#HH| $
$$
#H| $
##. $
##|. $
##. $
##. $
$$
$
#HH| $
## H| $
#HH| $
. H| $
##H| $$
##. $
##. $
##H| $
## H| $
## H| $
$$
#| $
... $
#| $
#| $
#H| $
$$
.H| $
. . $
.H| $
.H| $
.H| $
##| $$
## . $
## H| $
##H| $
##H| $
## H| $
$$
#| $
#|. $
#| $
#| $
#H| $
$$
$
##H H| $
### HH| $
## H H| $
## H| $
$$
$
##H| $
## H| $
## H| $
## H| $
$$
$
#H| $
## H| $
## H| $
#H| $
$$
$
##H| $
## H| $
##H| $
##. $
##. $$
$
#HH| $
## H| $
#HH| $
.H| $
.H| $$
$
## H| $
##H| $
##. $
##. $
$$
$
#HH| $
##H| $
. H| $
##H| $
$$
#|. $
##HH| $
#|. $
#| $
#H| $
$$
$
## H| $
## H| $
## H| $
#HH| $
$$
$
## H| $
## H| $
#H| $
#. $
$$
$
## H| $
## H H| $
###HHH| $
## H| $
$$
$
## H| $
#H| $
#H| $
## H| $
$$
$
## H| $
## H| $
#HH| $
. H| $
##H| $$
$
##HH| $
.#| $
#|. $
##HH| $
$$
#HH| $
#|. $
##. $
#|. $
#HH| $
$$
#| $
#| $
#| $
#| $
#| $
#| $$
##H| $
.#| $
.H| $
.#| $
##H| $
$$
#H H| $
##HHH| $
## H| $
. . $
$
$$
#| $
##|.. $
.H| $
##H| $
##HH| $
$$
.#| $
#H|. $
##HH| $
## . $
#HH| $
$$
#| $
... $
#| $
#| $
#H| $
$$
.#| $
#H|. $
## H| $
## H| $
#H| $
$$
#| $
## H| $
## H| $
## H| $
#HH| $
$$
##HH| $
... $
##H| $
## H| $
## H| $
$$
##HH|| $
... $
##H || $
## H|| $
## || $
$$
@@ -0,0 +1,198 @@
'use strict'
const net = require('node:net')
const assert = require('node:assert')
const util = require('./util')
const { InvalidArgumentError, ConnectTimeoutError } = require('./errors')
let tls // include tls conditionally since it is not always available
// TODO: session re-use does not wait for the first
// connection to resolve the session and might therefore
// resolve the same servername multiple times even when
// re-use is enabled.
const SessionCache = class WeakSessionCache {
constructor (maxCachedSessions) {
this._maxCachedSessions = maxCachedSessions
this._sessionCache = new Map()
this._sessionRegistry = new FinalizationRegistry((key) => {
if (this._sessionCache.size < this._maxCachedSessions) {
return
}
const ref = this._sessionCache.get(key)
if (ref !== undefined && ref.deref() === undefined) {
this._sessionCache.delete(key)
}
})
}
get (sessionKey) {
const ref = this._sessionCache.get(sessionKey)
return ref ? ref.deref() : null
}
set (sessionKey, session) {
if (this._maxCachedSessions === 0) {
return
}
if (this._sessionCache.has(sessionKey)) {
this._sessionCache.delete(sessionKey)
} else if (this._sessionCache.size >= this._maxCachedSessions) {
// Make room for the new session: prefer an entry whose session has
// already been collected, otherwise evict the oldest one.
let evicted = false
for (const [key, ref] of this._sessionCache) {
if (ref.deref() === undefined) {
this._sessionCache.delete(key)
evicted = true
break
}
}
if (!evicted) {
const oldest = this._sessionCache.keys().next()
if (!oldest.done) {
this._sessionCache.delete(oldest.value)
}
}
}
this._sessionCache.set(sessionKey, new WeakRef(session))
this._sessionRegistry.register(session, sessionKey)
}
}
function buildConnector ({ allowH2, preferH2, useH2c, maxCachedSessions, socketPath, timeout, session: customSession, ...opts }) {
if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) {
throw new InvalidArgumentError('maxCachedSessions must be a positive integer or zero')
}
const options = { path: socketPath, ...opts }
const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions)
timeout = timeout == null ? 10e3 : timeout
allowH2 = allowH2 != null ? allowH2 : true
return function connect ({ hostname, host, protocol, port, servername, localAddress, httpSocket }, callback) {
let socket
if (protocol === 'https:') {
if (!tls) {
tls = require('node:tls')
}
servername = servername || options.servername || util.getServerName(host) || null
const sessionKey = servername || hostname
assert(sessionKey)
const session = customSession || sessionCache.get(sessionKey) || null
port = port || 443
socket = tls.connect({
highWaterMark: 16384, // TLS in node can't have bigger HWM anyway...
...options,
servername,
session,
localAddress,
ALPNProtocols: allowH2 ? (preferH2 ? ['h2', 'http/1.1'] : ['http/1.1', 'h2']) : ['http/1.1'],
socket: httpSocket, // upgrade socket connection
port,
host: hostname
})
socket
.on('session', function (session) {
// TODO (fix): Can a session become invalid once established? Don't think so?
sessionCache.set(sessionKey, session)
})
} else {
assert(!httpSocket, 'httpSocket can only be sent on TLS update')
port = port || 80
const connectOptions = {
highWaterMark: 64 * 1024, // Same as nodejs fs streams.
...options,
localAddress,
port,
host: hostname
}
const family = net.isIP(hostname)
if (family !== 0 && servername && servername !== hostname) {
connectOptions.host = servername
connectOptions.lookup = (_hostname, lookupOptions, cb) => {
if (lookupOptions.all) {
cb(null, [{ address: hostname, family }])
} else {
cb(null, hostname, family)
}
}
}
socket = net.connect(connectOptions)
if (useH2c === true) {
socket.alpnProtocol = 'h2'
}
}
// Set TCP keep alive options on the socket here instead of in connect() for the case of assigning the socket
if (options.keepAlive == null || options.keepAlive) {
const keepAliveInitialDelay = options.keepAliveInitialDelay === undefined ? 60e3 : options.keepAliveInitialDelay
socket.setKeepAlive(true, keepAliveInitialDelay)
}
const clearConnectTimeout = util.setupConnectTimeout(new WeakRef(socket), { timeout, hostname, port })
socket
.setNoDelay(true)
.once(protocol === 'https:' ? 'secureConnect' : 'connect', function () {
queueMicrotask(clearConnectTimeout)
if (callback) {
const cb = callback
callback = null
cb(null, this)
}
})
.on('error', function (err) {
queueMicrotask(clearConnectTimeout)
if (callback) {
const cb = callback
callback = null
cb(maybeNormalizeConnectError(err, this, { timeout, hostname, port }))
}
})
return socket
}
}
// `net.connect` with `autoSelectFamily` raises an `AggregateError` when every
// attempted address fails. If any of those failures is a timeout, surface the
// error as a `ConnectTimeoutError` so callers see the same error regardless of
// which timer (Node's internal one or undici's `connectTimeout`) wins the race.
// The original `AggregateError` is preserved on `.cause`.
function maybeNormalizeConnectError (err, socket, opts) {
if (
err instanceof AggregateError &&
(err.code === 'ETIMEDOUT' || err.errors.some((e) => e != null && e.code === 'ETIMEDOUT'))
) {
let message = 'Connect Timeout Error'
if (Array.isArray(socket.autoSelectFamilyAttemptedAddresses)) {
message += ` (attempted addresses: ${socket.autoSelectFamilyAttemptedAddresses.join(', ')},`
} else {
message += ` (attempted address: ${opts.hostname}:${opts.port},`
}
message += ` timeout: ${opts.timeout}ms)`
const wrapped = new ConnectTimeoutError(message)
wrapped.cause = err
return wrapped
}
return err
}
module.exports = buildConnector
@@ -0,0 +1,15 @@
/**
* @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 Bookmark = createLucideIcon("Bookmark", [
["path", { d: "m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z", key: "1fy3hk" }]
]);
export { Bookmark as default };
//# sourceMappingURL=bookmark.js.map
@@ -0,0 +1 @@
{"version":3,"names":["_assertClassBrand","brand","receiver","returnValue","has","arguments","length","TypeError"],"sources":["../../src/helpers/assertClassBrand.ts"],"sourcesContent":["/* @minVersion 7.24.0 */\n\nexport default function _assertClassBrand(\n brand: Function | WeakMap<any, any> | WeakSet<any>,\n receiver: any,\n returnValue?: any,\n) {\n if (typeof brand === \"function\" ? brand === receiver : brand.has(receiver)) {\n return arguments.length < 3 ? receiver : returnValue;\n }\n throw new TypeError(\"Private element is not present on this object\");\n}\n"],"mappings":";;;;;;AAEe,SAASA,iBAAiBA,CACvCC,KAAkD,EAClDC,QAAa,EACbC,WAAiB,EACjB;EACA,IAAI,OAAOF,KAAK,KAAK,UAAU,GAAGA,KAAK,KAAKC,QAAQ,GAAGD,KAAK,CAACG,GAAG,CAACF,QAAQ,CAAC,EAAE;IAC1E,OAAOG,SAAS,CAACC,MAAM,GAAG,CAAC,GAAGJ,QAAQ,GAAGC,WAAW;EACtD;EACA,MAAM,IAAII,SAAS,CAAC,+CAA+C,CAAC;AACtE","ignoreList":[]}
@@ -0,0 +1,5 @@
'use strict';
/** @type {import('./maxSafeInteger')} */
// eslint-disable-next-line no-extra-parens
module.exports = /** @type {import('./maxSafeInteger')} */ (Number.MAX_SAFE_INTEGER) || 9007199254740991; // Math.pow(2, 53) - 1;
@@ -0,0 +1,74 @@
import { Socket } from 'node:net'
import { URL } from 'node:url'
import buildConnector from './connector'
import Dispatcher from './dispatcher'
declare namespace DiagnosticsChannel {
interface Request {
origin?: string | URL;
completed: boolean;
method?: Dispatcher.HttpMethod;
path: string;
headers: any;
}
interface Response {
statusCode: number;
statusText: string;
headers: Array<Buffer>;
}
interface ConnectParams {
host: URL['host'];
hostname: URL['hostname'];
protocol: URL['protocol'];
port: URL['port'];
servername: string | null;
}
type Connector = buildConnector.connector
export interface RequestCreateMessage {
request: Request;
}
export interface RequestBodySentMessage {
request: Request;
}
export interface RequestBodyChunkSentMessage {
request: Request;
chunk: Uint8Array | string;
}
export interface RequestBodyChunkReceivedMessage {
request: Request;
chunk: Buffer;
}
export interface RequestHeadersMessage {
request: Request;
response: Response;
}
export interface RequestTrailersMessage {
request: Request;
trailers: Array<Buffer>;
}
export interface RequestErrorMessage {
request: Request;
error: Error;
}
export interface ClientSendHeadersMessage {
request: Request;
headers: string;
socket: Socket;
}
export interface ClientBeforeConnectMessage {
connectParams: ConnectParams;
connector: Connector;
}
export interface ClientConnectedMessage {
socket: Socket;
connectParams: ConnectParams;
connector: Connector;
}
export interface ClientConnectErrorMessage {
error: Error;
socket: Socket;
connectParams: ConnectParams;
connector: Connector;
}
}
@@ -0,0 +1,14 @@
import type { TypeOrValueSpecifier } from '../util';
export type MessageIds = 'rejectAnError';
export type Options = [
{
allow?: TypeOrValueSpecifier[];
allowEmptyReject?: boolean;
allowThrowingAny?: boolean;
allowThrowingUnknown?: boolean;
}
];
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"rejectAnError", Options, import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
name: string;
};
export default _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 './octagon-pause.js';
//# sourceMappingURL=pause-octagon.js.map
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const lib: ReadonlyMap<string, LibDefinition>;
@@ -0,0 +1,26 @@
import { OAuthClientProvider } from '../../client/auth.js';
import { OAuthClientInformationMixed, OAuthClientMetadata, OAuthTokens } from '../../shared/auth.js';
/**
* In-memory OAuth client provider for demonstration purposes
* In production, you should persist tokens securely
*/
export declare class InMemoryOAuthClientProvider implements OAuthClientProvider {
private readonly _redirectUrl;
private readonly _clientMetadata;
readonly clientMetadataUrl?: string | undefined;
private _clientInformation?;
private _tokens?;
private _codeVerifier?;
constructor(_redirectUrl: string | URL, _clientMetadata: OAuthClientMetadata, onRedirect?: (url: URL) => void, clientMetadataUrl?: string | undefined);
private _onRedirect;
get redirectUrl(): string | URL;
get clientMetadata(): OAuthClientMetadata;
clientInformation(): OAuthClientInformationMixed | undefined;
saveClientInformation(clientInformation: OAuthClientInformationMixed): void;
tokens(): OAuthTokens | undefined;
saveTokens(tokens: OAuthTokens): void;
redirectToAuthorization(authorizationUrl: URL): void;
saveCodeVerifier(codeVerifier: string): void;
codeVerifier(): string;
}
//# sourceMappingURL=simpleOAuthClientProvider.d.ts.map
@@ -0,0 +1,99 @@
import type Ajv from "ajv"
import type {
Plugin,
CodeKeywordDefinition,
KeywordErrorDefinition,
Code,
Name,
ErrorObject,
} from "ajv"
import type {AddedFormat} from "ajv/dist/types"
import type {Rule} from "ajv/dist/compile/rules"
import {KeywordCxt} from "ajv"
import {_, str, or, getProperty, operators} from "ajv/dist/compile/codegen"
type Kwd = "formatMaximum" | "formatMinimum" | "formatExclusiveMaximum" | "formatExclusiveMinimum"
type Comparison = "<=" | ">=" | "<" | ">"
const ops = operators
const KWDs: {[K in Kwd]: {okStr: Comparison; ok: Code; fail: Code}} = {
formatMaximum: {okStr: "<=", ok: ops.LTE, fail: ops.GT},
formatMinimum: {okStr: ">=", ok: ops.GTE, fail: ops.LT},
formatExclusiveMaximum: {okStr: "<", ok: ops.LT, fail: ops.GTE},
formatExclusiveMinimum: {okStr: ">", ok: ops.GT, fail: ops.LTE},
}
export type LimitFormatError = ErrorObject<Kwd, {limit: string; comparison: Comparison}>
const error: KeywordErrorDefinition = {
message: ({keyword, schemaCode}) => str`should be ${KWDs[keyword as Kwd].okStr} ${schemaCode}`,
params: ({keyword, schemaCode}) =>
_`{comparison: ${KWDs[keyword as Kwd].okStr}, limit: ${schemaCode}}`,
}
export const formatLimitDefinition: CodeKeywordDefinition = {
keyword: Object.keys(KWDs),
type: "string",
schemaType: "string",
$data: true,
error,
code(cxt) {
const {gen, data, schemaCode, keyword, it} = cxt
const {opts, self} = it
if (!opts.validateFormats) return
const fCxt = new KeywordCxt(it, (self.RULES.all.format as Rule).definition, "format")
if (fCxt.$data) validate$DataFormat()
else validateFormat()
function validate$DataFormat(): void {
const fmts = gen.scopeValue("formats", {
ref: self.formats,
code: opts.code.formats,
})
const fmt = gen.const("fmt", _`${fmts}[${fCxt.schemaCode}]`)
cxt.fail$data(
or(
_`typeof ${fmt} != "object"`,
_`${fmt} instanceof RegExp`,
_`typeof ${fmt}.compare != "function"`,
compareCode(fmt)
)
)
}
function validateFormat(): void {
const format = fCxt.schema as string
const fmtDef: AddedFormat | undefined = self.formats[format]
if (!fmtDef || fmtDef === true) return
if (
typeof fmtDef != "object" ||
fmtDef instanceof RegExp ||
typeof fmtDef.compare != "function"
) {
throw new Error(`"${keyword}": format "${format}" does not define "compare" function`)
}
const fmt = gen.scopeValue("formats", {
key: format,
ref: fmtDef,
code: opts.code.formats ? _`${opts.code.formats}${getProperty(format)}` : undefined,
})
cxt.fail$data(compareCode(fmt))
}
function compareCode(fmt: Name): Code {
return _`${fmt}.compare(${data}, ${schemaCode}) ${KWDs[keyword as Kwd].fail} 0`
}
},
dependencies: ["format"],
}
const formatLimitPlugin: Plugin<undefined> = (ajv: Ajv): Ajv => {
ajv.addKeyword(formatLimitDefinition)
return ajv
}
export default formatLimitPlugin
@@ -0,0 +1,63 @@
"use strict";
/**
* This is the Windows implementation of isexe, which uses the file
* extension and PATHEXT setting.
*
* @module
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.sync = exports.isexe = void 0;
const node_fs_1 = require("node:fs");
const promises_1 = require("node:fs/promises");
const node_path_1 = require("node:path");
/**
* Determine whether a path is executable based on the file extension
* and PATHEXT environment variable (or specified pathExt option)
*/
const isexe = async (path, options = {}) => {
const { ignoreErrors = false } = options;
try {
return checkStat(await (0, promises_1.stat)(path), path, options);
}
catch (e) {
const er = e;
if (ignoreErrors || er.code === 'EACCES')
return false;
throw er;
}
};
exports.isexe = isexe;
/**
* Synchronously determine whether a path is executable based on the file
* extension and PATHEXT environment variable (or specified pathExt option)
*/
const sync = (path, options = {}) => {
const { ignoreErrors = false } = options;
try {
return checkStat((0, node_fs_1.statSync)(path), path, options);
}
catch (e) {
const er = e;
if (ignoreErrors || er.code === 'EACCES')
return false;
throw er;
}
};
exports.sync = sync;
const checkPathExt = (path, options) => {
const { pathExt = process.env.PATHEXT || '' } = options;
const peSplit = pathExt.split(node_path_1.delimiter);
if (peSplit.indexOf('') !== -1) {
return true;
}
for (const pes of peSplit) {
const p = pes.toLowerCase();
const ext = path.substring(path.length - p.length).toLowerCase();
if (p && ext === p) {
return true;
}
}
return false;
};
const checkStat = (stat, path, options) => stat.isFile() && checkPathExt(path, options);
//# sourceMappingURL=win32.js.map
@@ -0,0 +1 @@
module.exports={C:{"115":0.09405,"120":0.1089,"121":0.1683,"128":0.03465,"129":0.00495,"131":0.00495,"139":0.00495,"140":0.1782,"149":0.00495,"150":0.0099,"151":0.06435,"152":0.0099,"153":0.04455,"154":0.51975,"155":2.07405,"156":1.48005,"157":0.1584,_:"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 122 123 124 125 126 127 130 132 133 134 135 136 137 138 141 142 143 144 145 146 147 148 158 159 160 3.5 3.6"},D:{"85":0.0099,"92":0.0198,"93":0.00495,"103":0.0099,"104":0.0099,"105":0.0198,"106":0.0099,"107":0.02475,"108":0.01485,"109":0.1782,"110":0.00495,"111":0.0198,"112":0.01485,"116":0.10395,"117":0.0198,"118":0.2772,"119":0.15345,"120":0.1584,"121":0.0297,"123":0.00495,"124":0.0099,"126":0.0099,"127":0.00495,"128":0.0297,"129":0.00495,"131":0.0297,"132":0.0198,"133":0.1287,"134":0.07425,"135":0.0891,"136":0.08415,"137":0.07425,"138":0.1287,"139":0.0891,"140":0.13365,"141":0.099,"142":0.3663,"143":0.0198,"144":0.0297,"145":0.1089,"146":0.0891,"147":0.07425,"148":0.11385,"149":0.099,"150":5.54895,"151":1.18305,"152":8.29125,"153":4.653,"154":1.57905,"155":0.0099,_:"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 83 84 86 87 88 89 90 91 94 95 96 97 98 99 100 101 102 113 114 115 122 125 130 156 157"},F:{"101":0.00495,"102":0.4356,"131":0.01485,"134":0.28215,"135":1.56915,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 132 133 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"18":0.00495,"100":0.00495,"109":0.02475,"114":0.00495,"115":0.00495,"119":0.1485,"120":0.05445,"127":0.00495,"133":0.00495,"135":0.00495,"140":0.0099,"142":4.5936,"143":0.00495,"144":0.0594,"145":0.00495,"146":0.02475,"147":0.00495,"148":0.01485,"149":0.00495,"150":0.06435,"151":0.30195,"152":2.6433,"153":3.33135,"154":0.693,_:"12 13 14 15 16 17 79 80 81 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 101 102 103 104 105 106 107 108 110 111 112 113 116 117 118 121 122 123 124 125 126 128 129 130 131 132 134 136 137 138 139 141"},E:{"14":0.0792,"27":0.07425,_:"4 5 6 7 8 9 10 11 12 13 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.3 16.5 17.0 17.4 26.0 27.1 27.2 TP","14.1":0.0198,"15.6":0.03465,"16.1":0.03465,"16.4":0.04455,"16.6":0.14355,"17.1":0.59895,"17.2":0.00495,"17.3":0.06435,"17.5":0.00495,"17.6":0.15345,"18.0":0.0099,"18.1":0.0099,"18.2":0.0495,"18.3":0.00495,"18.4":0.00495,"18.5-18.7":0.01485,"26.1":0.00495,"26.2":0.0792,"26.3":0.03465,"26.4":0.0396,"26.5":0.2673,"26.6":1.62855},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00135,"5.0-5.1":0.00135,"6.0-6.1":0,"7.0-7.1":0.00271,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.01353,"11.0-11.2":0.00135,"11.3-11.4":0.00271,"12.0-12.1":0,"12.2-12.5":0.03517,"13.0-13.1":0,"13.2":0.00676,"13.3":0,"13.4-13.7":0.00135,"14.0-14.4":0.00541,"14.5-14.8":0.00812,"15.0-15.1":0.00812,"15.2-15.3":0.00541,"15.4":0.00676,"15.5":0.00812,"15.6-15.8":0.17584,"16.0":0.01353,"16.1":0.02435,"16.2":0.01353,"16.3":0.02976,"16.4":0.00676,"16.5":0.01082,"16.6-16.7":0.24483,"17.0":0.00947,"17.1":0.01353,"17.2":0.01353,"17.3":0.02029,"17.4":0.02841,"17.5":0.05546,"17.6-17.7":0.14338,"18.0":0.02976,"18.1":0.05952,"18.2":0.08116,"18.3":0.14067,"18.4":0.08792,"18.5-18.7":1.81658,"26.0":0.08792,"26.1":0.08927,"26.2":0.23265,"26.3":0.25159,"26.4":0.18396,"26.5":1.23224,"26.6":7.60312,"27.0":0.58298,"27.1":0,"27.2":0.01488},P:{"21":0.01011,"25":0.02022,"26":0.08087,"27":0.01011,"28":0.47511,"29":0.16174,"30":3.81097,_:"4 20 22 23 24 5.0-5.4 6.2-6.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 18.0 19.0","7.2-7.4":0.17185,"15.0":0.01011,"16.0":0.02022,"17.0":0.01011},I:{"0":0.02523,"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.09593,_:"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":31.92344},R:{_:"0"},M:{"0":0.81794},Q:{"14.9":0.04039},O:{"0":0.04039},H:{all:0}};
@@ -0,0 +1,209 @@
export declare enum BinTrieFlags {
VALUE_LENGTH = 49152,
BRANCH_LENGTH = 16256,
JUMP_TABLE = 127
}
export declare enum DecodingMode {
/** Entities in text nodes that can end with any character. */
Legacy = 0,
/** Only allow entities terminated with a semicolon. */
Strict = 1,
/** Entities in attributes have limitations on ending characters. */
Attribute = 2
}
/**
* Producers for character reference errors as defined in the HTML spec.
*/
export interface EntityErrorProducer {
missingSemicolonAfterCharacterReference(): void;
absenceOfDigitsInNumericCharacterReference(consumedCharacters: number): void;
validateNumericCharacterReference(code: number): void;
}
/**
* Token decoder with support of writing partial entities.
*/
export declare class EntityDecoder {
/** The tree used to decode entities. */
private readonly decodeTree;
/**
* The function that is called when a codepoint is decoded.
*
* For multi-byte named entities, this will be called multiple times,
* with the second codepoint, and the same `consumed` value.
*
* @param codepoint The decoded codepoint.
* @param consumed The number of bytes consumed by the decoder.
*/
private readonly emitCodePoint;
/** An object that is used to produce errors. */
private readonly errors?;
constructor(
/** The tree used to decode entities. */
decodeTree: Uint16Array,
/**
* The function that is called when a codepoint is decoded.
*
* For multi-byte named entities, this will be called multiple times,
* with the second codepoint, and the same `consumed` value.
*
* @param codepoint The decoded codepoint.
* @param consumed The number of bytes consumed by the decoder.
*/
emitCodePoint: (cp: number, consumed: number) => void,
/** An object that is used to produce errors. */
errors?: EntityErrorProducer | undefined);
/** The current state of the decoder. */
private state;
/** Characters that were consumed while parsing an entity. */
private consumed;
/**
* The result of the entity.
*
* Either the result index of a numeric entity, or the codepoint of a
* numeric entity.
*/
private result;
/** The current index in the decode tree. */
private treeIndex;
/** The number of characters that were consumed in excess. */
private excess;
/** The mode in which the decoder is operating. */
private decodeMode;
/** Resets the instance to make it reusable. */
startEntity(decodeMode: DecodingMode): void;
/**
* Write an entity to the decoder. This can be called multiple times with partial entities.
* If the entity is incomplete, the decoder will return -1.
*
* Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the
* entity is incomplete, and resume when the next string is written.
*
* @param input The string containing the entity (or a continuation of the entity).
* @param offset The offset at which the entity begins. Should be 0 if this is not the first call.
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
*/
write(input: string, offset: number): number;
/**
* Switches between the numeric decimal and hexadecimal states.
*
* Equivalent to the `Numeric character reference state` in the HTML spec.
*
* @param input The string containing the entity (or a continuation of the entity).
* @param offset The current offset.
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
*/
private stateNumericStart;
private addToNumericResult;
/**
* Parses a hexadecimal numeric entity.
*
* Equivalent to the `Hexademical character reference state` in the HTML spec.
*
* @param input The string containing the entity (or a continuation of the entity).
* @param offset The current offset.
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
*/
private stateNumericHex;
/**
* Parses a decimal numeric entity.
*
* Equivalent to the `Decimal character reference state` in the HTML spec.
*
* @param input The string containing the entity (or a continuation of the entity).
* @param offset The current offset.
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
*/
private stateNumericDecimal;
/**
* Validate and emit a numeric entity.
*
* Implements the logic from the `Hexademical character reference start
* state` and `Numeric character reference end state` in the HTML spec.
*
* @param lastCp The last code point of the entity. Used to see if the
* entity was terminated with a semicolon.
* @param expectedLength The minimum number of characters that should be
* consumed. Used to validate that at least one digit
* was consumed.
* @returns The number of characters that were consumed.
*/
private emitNumericEntity;
/**
* Parses a named entity.
*
* Equivalent to the `Named character reference state` in the HTML spec.
*
* @param input The string containing the entity (or a continuation of the entity).
* @param offset The current offset.
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
*/
private stateNamedEntity;
/**
* Emit a named entity that was not terminated with a semicolon.
*
* @returns The number of characters consumed.
*/
private emitNotTerminatedNamedEntity;
/**
* Emit a named entity.
*
* @param result The index of the entity in the decode tree.
* @param valueLength The number of bytes in the entity.
* @param consumed The number of characters consumed.
*
* @returns The number of characters consumed.
*/
private emitNamedEntityData;
/**
* Signal to the parser that the end of the input was reached.
*
* Remaining data will be emitted and relevant errors will be produced.
*
* @returns The number of characters consumed.
*/
end(): number;
}
/**
* Determines the branch of the current node that is taken given the current
* character. This function is used to traverse the trie.
*
* @param decodeTree The trie.
* @param current The current node.
* @param nodeIdx The index right after the current node and its value.
* @param char The current character.
* @returns The index of the next node, or -1 if no branch is taken.
*/
export declare function determineBranch(decodeTree: Uint16Array, current: number, nodeIndex: number, char: number): number;
/**
* Decodes an HTML string.
*
* @param htmlString The string to decode.
* @param mode The decoding mode.
* @returns The decoded string.
*/
export declare function decodeHTML(htmlString: string, mode?: DecodingMode): string;
/**
* Decodes an HTML string in an attribute.
*
* @param htmlAttribute The string to decode.
* @returns The decoded string.
*/
export declare function decodeHTMLAttribute(htmlAttribute: string): string;
/**
* Decodes an HTML string, requiring all entities to be terminated by a semicolon.
*
* @param htmlString The string to decode.
* @returns The decoded string.
*/
export declare function decodeHTMLStrict(htmlString: string): string;
/**
* Decodes an XML string, requiring all entities to be terminated by a semicolon.
*
* @param xmlString The string to decode.
* @returns The decoded string.
*/
export declare function decodeXML(xmlString: string): string;
export { htmlDecodeTree } from "./generated/decode-data-html.js";
export { xmlDecodeTree } from "./generated/decode-data-xml.js";
export { decodeCodePoint, replaceCodePoint, fromCodePoint, } from "./decode-codepoint.js";
//# sourceMappingURL=decode.d.ts.map
@@ -0,0 +1,17 @@
'use strict'
/* eslint no-proto: 0 */
module.exports = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? setProtoOf : mixinProperties)
function setProtoOf (obj, proto) {
obj.__proto__ = proto
return obj
}
function mixinProperties (obj, proto) {
for (var prop in proto) {
if (!Object.prototype.hasOwnProperty.call(obj, prop)) {
obj[prop] = proto[prop]
}
}
return obj
}
@@ -0,0 +1 @@
{"version":3,"file":"square.js","sources":["../../../src/icons/square.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Square\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHg9IjMiIHk9IjMiIHJ4PSIyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/square\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 Square = createLucideIcon('Square', [\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', key: 'afitv7' }],\n]);\n\nexport default Square;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,iBAAiB,QAAU,CAAA,CAAA,CAAA;AAAA,CAAA,CACxC,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;AAChF,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,601 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.collectVariables = collectVariables;
const scope_manager_1 = require("@typescript-eslint/scope-manager");
const utils_1 = require("@typescript-eslint/utils");
const isTypeImport_1 = require("./isTypeImport");
const referenceContainsTypePredicate_1 = require("./referenceContainsTypePredicate");
const referenceContainsTypeQuery_1 = require("./referenceContainsTypeQuery");
/**
* This class leverages an AST visitor to mark variables as used via the
* `eslintUsed` property.
*/
class UnusedVarsVisitor extends scope_manager_1.Visitor {
/**
* We keep a weak cache so that multiple rules can share the calculation
*/
static RESULTS_CACHE = new WeakMap();
ClassDeclaration = this.visitClass;
ClassExpression = this.visitClass;
ForInStatement = this.visitForInForOf;
ForOfStatement = this.visitForInForOf;
//#region HELPERS
FunctionDeclaration = this.visitFunction;
FunctionExpression = this.visitFunction;
MethodDefinition = this.visitSetter;
Property = this.visitSetter;
TSCallSignatureDeclaration = this.visitFunctionTypeSignature;
TSConstructorType = this.visitFunctionTypeSignature;
TSConstructSignatureDeclaration = this.visitFunctionTypeSignature;
TSDeclareFunction = this.visitFunctionTypeSignature;
TSEmptyBodyFunctionExpression = this.visitFunctionTypeSignature;
//#endregion HELPERS
//#region VISITORS
// NOTE - This is a simple visitor - meaning it does not support selectors
TSFunctionType = this.visitFunctionTypeSignature;
TSMethodSignature = this.visitFunctionTypeSignature;
#scopeManager;
constructor(scopeManager) {
super({
visitChildrenEvenIfSelectorExists: true,
});
this.#scopeManager = scopeManager;
}
static collectUnusedVariables(program, scopeManager) {
const cached = this.RESULTS_CACHE.get(program);
if (cached) {
return cached;
}
const visitor = new this(scopeManager);
visitor.visit(program);
const unusedVars = visitor.collectUnusedVariables(visitor.getScope(program));
this.RESULTS_CACHE.set(program, unusedVars);
return unusedVars;
}
Identifier(node) {
const scope = this.getScope(node);
if (scope.type === utils_1.TSESLint.Scope.ScopeType.function &&
node.name === 'this' &&
// this parameters should always be considered used as they're pseudo-parameters
'params' in scope.block &&
scope.block.params.includes(node)) {
this.markVariableAsUsed(node);
}
}
TSEnumDeclaration(node) {
// enum members create variables because they can be referenced within the enum,
// but they obviously aren't unused variables for the purposes of this rule.
const scope = this.getScope(node);
for (const variable of scope.variables) {
this.markVariableAsUsed(variable);
}
}
TSMappedType(node) {
// mapped types create a variable for their type name, but it's not necessary to reference it,
// so we shouldn't consider it as unused for the purpose of this rule.
this.markVariableAsUsed(node.key);
}
TSModuleDeclaration(node) {
// -- global augmentation can be in any file, and they do not need exports
if (node.kind === 'global') {
this.markVariableAsUsed('global', node.parent);
}
}
TSParameterProperty(node) {
let identifier;
switch (node.parameter.type) {
case utils_1.AST_NODE_TYPES.AssignmentPattern:
identifier = node.parameter.left;
break;
case utils_1.AST_NODE_TYPES.Identifier:
identifier = node.parameter;
break;
}
this.markVariableAsUsed(identifier);
}
collectUnusedVariables(scope, variables = {
unusedVariables: new Set(),
usedVariables: new Set(),
}) {
if (
// skip function expression names
// this scope is created just to house the variable that allows a function
// expression to self-reference if it has a name defined
!scope.functionExpressionScope) {
for (const variable of scope.variables) {
// cases that we don't want to treat as used or unused
if (
// implicit lib variables (from @typescript-eslint/scope-manager)
// these aren't variables that should be checked ever
variable instanceof scope_manager_1.ImplicitLibVariable) {
continue;
}
if (
// variables marked with markVariableAsUsed()
variable.eslintUsed ||
// basic exported variables
isExported(variable) ||
// variables implicitly exported via a merged declaration
isMergeableExported(variable) ||
// used variables
isUsedVariable(variable)) {
variables.usedVariables.add(variable);
}
else {
variables.unusedVariables.add(variable);
}
}
}
for (const childScope of scope.childScopes) {
this.collectUnusedVariables(childScope, variables);
}
return variables;
}
getScope(currentNode) {
// On Program node, get the outermost scope to avoid return Node.js special function scope or ES modules scope.
const inner = currentNode.type !== utils_1.AST_NODE_TYPES.Program;
let node = currentNode;
while (node) {
const scope = this.#scopeManager.acquire(node, inner);
if (scope) {
if (scope.type === scope_manager_1.ScopeType.functionExpressionName) {
return scope.childScopes[0];
}
return scope;
}
node = node.parent;
}
return this.#scopeManager.scopes[0];
}
markVariableAsUsed(variableOrIdentifierOrName, parent) {
if (typeof variableOrIdentifierOrName !== 'string' &&
!('type' in variableOrIdentifierOrName)) {
variableOrIdentifierOrName.eslintUsed = true;
return;
}
let name;
let node;
if (typeof variableOrIdentifierOrName === 'string') {
name = variableOrIdentifierOrName;
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
node = parent;
}
else {
name = variableOrIdentifierOrName.name;
node = variableOrIdentifierOrName;
}
let currentScope = this.getScope(node);
while (currentScope) {
const variable = currentScope.variables.find(scopeVar => scopeVar.name === name);
if (variable) {
variable.eslintUsed = true;
return;
}
currentScope = currentScope.upper;
}
}
visitClass(node) {
// skip a variable of class itself name in the class scope
const scope = this.getScope(node);
for (const variable of scope.variables) {
if (variable.identifiers[0] === scope.block.id) {
this.markVariableAsUsed(variable);
return;
}
}
}
visitForInForOf(node) {
/**
* (Brad Zacher): I hate that this has to exist.
* But it is required for compat with the base ESLint rule.
*
* In 2015, ESLint decided to add an exception for these two specific cases
* ```
* for (var key in object) return;
*
* var key;
* for (key in object) return;
* ```
*
* I disagree with it, but what are you going to do...
*
* https://github.com/eslint/eslint/issues/2342
*/
let idOrVariable;
if (node.left.type === utils_1.AST_NODE_TYPES.VariableDeclaration) {
const variable = this.#scopeManager.getDeclaredVariables(node.left).at(0);
if (!variable) {
return;
}
idOrVariable = variable;
}
if (node.left.type === utils_1.AST_NODE_TYPES.Identifier) {
idOrVariable = node.left;
}
if (idOrVariable == null) {
return;
}
let body = node.body;
if (node.body.type === utils_1.AST_NODE_TYPES.BlockStatement) {
if (node.body.body.length !== 1) {
return;
}
body = node.body.body[0];
}
if (body.type !== utils_1.AST_NODE_TYPES.ReturnStatement) {
return;
}
this.markVariableAsUsed(idOrVariable);
}
visitFunction(node) {
const scope = this.getScope(node);
// skip implicit "arguments" variable
const variable = scope.set.get('arguments');
if (variable?.defs.length === 0) {
this.markVariableAsUsed(variable);
}
}
visitFunctionTypeSignature(node) {
// function type signature params create variables because they can be referenced within the signature,
// but they obviously aren't unused variables for the purposes of this rule.
for (const param of node.params) {
this.visitPattern(param, name => {
this.markVariableAsUsed(name);
});
}
}
visitSetter(node) {
if (node.kind === 'set') {
// ignore setter parameters because they're syntactically required to exist
for (const param of node.value.params) {
this.visitPattern(param, id => {
this.markVariableAsUsed(id);
});
}
}
}
}
//#region private helpers
/**
* Checks the position of given nodes.
* @param inner A node which is expected as inside.
* @param outer A node which is expected as outside.
* @returns `true` if the `inner` node exists in the `outer` node.
*/
function isInside(inner, outer) {
return inner.range[0] >= outer.range[0] && inner.range[1] <= outer.range[1];
}
/**
* Determine if an identifier is referencing an enclosing name.
* This only applies to declarations that create their own scope (modules, functions, classes)
* @param ref The reference to check.
* @param nodes The candidate function nodes.
* @returns True if it's a self-reference, false if not.
*/
function isSelfReference(ref, nodes) {
let scope = ref.from;
while (scope) {
if (nodes.has(scope.block)) {
return true;
}
scope = scope.upper;
}
return false;
}
const MERGEABLE_TYPES = new Set([
utils_1.AST_NODE_TYPES.ClassDeclaration,
utils_1.AST_NODE_TYPES.FunctionDeclaration,
utils_1.AST_NODE_TYPES.TSInterfaceDeclaration,
utils_1.AST_NODE_TYPES.TSModuleDeclaration,
utils_1.AST_NODE_TYPES.TSTypeAliasDeclaration,
]);
/**
* Determine if the variable is directly exported
* @param variable the variable to check
*/
function isMergeableExported(variable) {
// If all of the merged things are of the same type, TS will error if not all of them are exported - so we only need to find one
for (const def of variable.defs) {
// parameters can never be exported.
// their `node` prop points to the function decl, which can be exported
// so we need to special case them
if (def.type === utils_1.TSESLint.Scope.DefinitionType.Parameter) {
continue;
}
if ((MERGEABLE_TYPES.has(def.node.type) &&
def.node.parent.type === utils_1.AST_NODE_TYPES.ExportNamedDeclaration) ||
def.node.parent.type === utils_1.AST_NODE_TYPES.ExportDefaultDeclaration) {
return true;
}
}
return false;
}
/**
* Determines if a given variable is being exported from a module.
* @param variable eslint-scope variable object.
* @returns True if the variable is exported, false if not.
*/
function isExported(variable) {
return variable.defs.some(definition => {
let node = definition.node;
if (node.type === utils_1.AST_NODE_TYPES.VariableDeclarator) {
node = node.parent;
}
else if (definition.type === utils_1.TSESLint.Scope.DefinitionType.Parameter) {
return false;
}
return node.parent.type.startsWith('Export');
});
}
const LOGICAL_ASSIGNMENT_OPERATORS = new Set(['??=', '&&=', '||=']);
/**
* Determines if the variable is used.
* @param variable The variable to check.
* @returns True if the variable is used
*/
function isUsedVariable(variable) {
/**
* Gets a list of function definitions for a specified variable.
* @param variable eslint-scope variable object.
* @returns Function nodes.
*/
function getFunctionDefinitions(variable) {
const functionDefinitions = new Set();
variable.defs.forEach(def => {
// FunctionDeclarations
if (def.type === utils_1.TSESLint.Scope.DefinitionType.FunctionName) {
functionDefinitions.add(def.node);
}
// FunctionExpressions
if (def.type === utils_1.TSESLint.Scope.DefinitionType.Variable &&
(def.node.init?.type === utils_1.AST_NODE_TYPES.FunctionExpression ||
def.node.init?.type === utils_1.AST_NODE_TYPES.ArrowFunctionExpression)) {
functionDefinitions.add(def.node.init);
}
});
return functionDefinitions;
}
function getTypeDeclarations(variable) {
const nodes = new Set();
variable.defs.forEach(def => {
if (def.node.type === utils_1.AST_NODE_TYPES.TSInterfaceDeclaration ||
def.node.type === utils_1.AST_NODE_TYPES.TSTypeAliasDeclaration) {
nodes.add(def.node);
}
});
return nodes;
}
function getModuleDeclarations(variable) {
const nodes = new Set();
variable.defs.forEach(def => {
if (def.node.type === utils_1.AST_NODE_TYPES.TSModuleDeclaration) {
nodes.add(def.node);
}
});
return nodes;
}
function getEnumDeclarations(variable) {
const nodes = new Set();
variable.defs.forEach(def => {
if (def.node.type === utils_1.AST_NODE_TYPES.TSEnumDeclaration) {
nodes.add(def.node);
}
});
return nodes;
}
/**
* Checks if the ref is contained within one of the given nodes
*/
function isInsideOneOf(ref, nodes) {
for (const node of nodes) {
if (isInside(ref.identifier, node)) {
return true;
}
}
return false;
}
/**
* Checks whether a given node is unused expression or not.
* @param node The node itself
* @returns The node is an unused expression.
*/
function isUnusedExpression(node) {
const parent = node.parent;
if (parent.type === utils_1.AST_NODE_TYPES.ExpressionStatement) {
return true;
}
if (parent.type === utils_1.AST_NODE_TYPES.SequenceExpression) {
const isLastExpression = parent.expressions[parent.expressions.length - 1] === node;
if (!isLastExpression) {
return true;
}
return isUnusedExpression(parent);
}
return false;
}
/**
* If a given reference is left-hand side of an assignment, this gets
* the right-hand side node of the assignment.
*
* In the following cases, this returns null.
*
* - The reference is not the LHS of an assignment expression.
* - The reference is inside of a loop.
* - The reference is inside of a function scope which is different from
* the declaration.
* @param ref A reference to check.
* @param prevRhsNode The previous RHS node.
* @returns The RHS node or null.
*/
function getRhsNode(ref, prevRhsNode) {
/**
* Checks whether the given node is in a loop or not.
* @param node The node to check.
* @returns `true` if the node is in a loop.
*/
function isInLoop(node) {
let currentNode = node;
while (currentNode) {
if (utils_1.ASTUtils.isFunction(currentNode)) {
break;
}
if (utils_1.ASTUtils.isLoop(currentNode)) {
return true;
}
currentNode = currentNode.parent;
}
return false;
}
const id = ref.identifier;
const parent = id.parent;
const refScope = ref.from.variableScope;
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const varScope = ref.resolved.scope.variableScope;
const canBeUsedLater = refScope !== varScope || isInLoop(id);
/*
* Inherits the previous node if this reference is in the node.
* This is for `a = a + a`-like code.
*/
if (prevRhsNode && isInside(id, prevRhsNode)) {
return prevRhsNode;
}
if (parent.type === utils_1.AST_NODE_TYPES.AssignmentExpression &&
isUnusedExpression(parent) &&
id === parent.left &&
!canBeUsedLater) {
return parent.right;
}
return null;
}
/**
* Checks whether a given reference is a read to update itself or not.
* @param ref A reference to check.
* @param rhsNode The RHS node of the previous assignment.
* @returns The reference is a read to update itself.
*/
function isReadForItself(ref, rhsNode) {
/**
* Checks whether a given Identifier node exists inside of a function node which can be used later.
*
* "can be used later" means:
* - the function is assigned to a variable.
* - the function is bound to a property and the object can be used later.
* - the function is bound as an argument of a function call.
*
* If a reference exists in a function which can be used later, the reference is read when the function is called.
* @param id An Identifier node to check.
* @param rhsNode The RHS node of the previous assignment.
* @returns `true` if the `id` node exists inside of a function node which can be used later.
*/
function isInsideOfStorableFunction(id, rhsNode) {
/**
* Finds a function node from ancestors of a node.
* @param node A start node to find.
* @returns A found function node.
*/
function getUpperFunction(node) {
let currentNode = node;
while (currentNode) {
if (utils_1.ASTUtils.isFunction(currentNode)) {
return currentNode;
}
currentNode = currentNode.parent;
}
return null;
}
/**
* Checks whether a given function node is stored to somewhere or not.
* If the function node is stored, the function can be used later.
* @param funcNode A function node to check.
* @param rhsNode The RHS node of the previous assignment.
* @returns `true` if under the following conditions:
* - the funcNode is assigned to a variable.
* - the funcNode is bound as an argument of a function call.
* - the function is bound to a property and the object satisfies above conditions.
*/
function isStorableFunction(funcNode, rhsNode) {
let node = funcNode;
let parent = funcNode.parent;
while (parent && isInside(parent, rhsNode)) {
switch (parent.type) {
case utils_1.AST_NODE_TYPES.SequenceExpression:
if (parent.expressions[parent.expressions.length - 1] !== node) {
return false;
}
break;
case utils_1.AST_NODE_TYPES.CallExpression:
case utils_1.AST_NODE_TYPES.NewExpression:
return parent.callee !== node;
case utils_1.AST_NODE_TYPES.AssignmentExpression:
case utils_1.AST_NODE_TYPES.TaggedTemplateExpression:
case utils_1.AST_NODE_TYPES.YieldExpression:
return true;
default:
if (parent.type.endsWith('Statement') ||
parent.type.endsWith('Declaration')) {
/*
* If it encountered statements, this is a complex pattern.
* Since analyzing complex patterns is hard, this returns `true` to avoid false positive.
*/
return true;
}
}
node = parent;
parent = parent.parent;
}
return false;
}
const funcNode = getUpperFunction(id);
return (!!funcNode &&
isInside(funcNode, rhsNode) &&
isStorableFunction(funcNode, rhsNode));
}
const id = ref.identifier;
const parent = id.parent;
return (ref.isRead() && // in RHS of an assignment for itself. e.g. `a = a + 1`
// self update. e.g. `a += 1`, `a++`
((parent.type === utils_1.AST_NODE_TYPES.AssignmentExpression &&
!LOGICAL_ASSIGNMENT_OPERATORS.has(parent.operator) &&
isUnusedExpression(parent) &&
parent.left === id) ||
(parent.type === utils_1.AST_NODE_TYPES.UpdateExpression &&
isUnusedExpression(parent)) ||
(!!rhsNode &&
isInside(id, rhsNode) &&
!isInsideOfStorableFunction(id, rhsNode))));
}
const functionNodes = getFunctionDefinitions(variable);
const isFunctionDefinition = functionNodes.size > 0;
const typeDeclNodes = getTypeDeclarations(variable);
const isTypeDecl = typeDeclNodes.size > 0;
const moduleDeclNodes = getModuleDeclarations(variable);
const isModuleDecl = moduleDeclNodes.size > 0;
const enumDeclNodes = getEnumDeclarations(variable);
const isEnumDecl = enumDeclNodes.size > 0;
const isImportedAsType = variable.defs.every(isTypeImport_1.isTypeImport);
let rhsNode = null;
return variable.references.some(ref => {
const forItself = isReadForItself(ref, rhsNode);
rhsNode = getRhsNode(ref, rhsNode);
return (ref.isRead() &&
!forItself &&
!(!isImportedAsType &&
((0, referenceContainsTypeQuery_1.referenceContainsTypeQuery)(ref.identifier) ||
(0, referenceContainsTypePredicate_1.referenceContainsTypePredicate)(ref.identifier))) &&
!(isFunctionDefinition && isSelfReference(ref, functionNodes)) &&
!(isTypeDecl && isInsideOneOf(ref, typeDeclNodes)) &&
!(isModuleDecl && isSelfReference(ref, moduleDeclNodes)) &&
!(isEnumDecl && isSelfReference(ref, enumDeclNodes)));
});
}
//#endregion private helpers
/**
* Collects the set of unused variables for a given context.
*
* Due to complexity, this does not take into consideration:
* - variables within declaration files
* - variables within ambient module declarations
*/
function collectVariables(context) {
return UnusedVarsVisitor.collectUnusedVariables(context.sourceCode.ast, utils_1.ESLintUtils.nullThrows(context.sourceCode.scopeManager, 'Missing required scope manager'));
}
@@ -0,0 +1,17 @@
/**
* @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 SquareFunction = createLucideIcon("SquareFunction", [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
["path", { d: "M9 17c2 0 2.8-1 2.8-2.8V10c0-2 1-3.3 3.2-3", key: "m1af9g" }],
["path", { d: "M9 11.2h5.7", key: "3zgcl2" }]
]);
export { SquareFunction as default };
//# sourceMappingURL=square-function.js.map
@@ -0,0 +1,32 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _regeneratorValues;
function _regeneratorValues(iterable) {
if (iterable != null) {
var iteratorMethod = iterable[typeof Symbol === "function" && Symbol.iterator || "@@iterator"],
i = 0;
if (iteratorMethod) {
return iteratorMethod.call(iterable);
}
if (typeof iterable.next === "function") {
return iterable;
}
if (!isNaN(iterable.length)) {
return {
next: function () {
if (iterable && i >= iterable.length) iterable = undefined;
return {
value: iterable && iterable[i++],
done: !iterable
};
}
};
}
}
throw new TypeError(typeof iterable + " is not iterable");
}
//# sourceMappingURL=regeneratorValues.js.map
@@ -0,0 +1,6 @@
import type { ESLintScopeVariable } from './ESLintScopeVariable';
import type { Variable } from './Variable';
export { ESLintScopeVariable } from './ESLintScopeVariable';
export { ImplicitLibVariable, type ImplicitLibVariableOptions, type LibDefinition, } from './ImplicitLibVariable';
export { Variable } from './Variable';
export type ScopeVariable = ESLintScopeVariable | Variable;
@@ -0,0 +1 @@
{"version":3,"file":"folder-search.js","sources":["../../../src/icons/folder-search.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name FolderSearch\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTAuNyAyMEg0YTIgMiAwIDAgMS0yLTJWNWEyIDIgMCAwIDEgMi0yaDMuOWEyIDIgMCAwIDEgMS42OS45bC44MSAxLjJhMiAyIDAgMCAwIDEuNjcuOUgyMGEyIDIgMCAwIDEgMiAydjQuMSIgLz4KICA8cGF0aCBkPSJtMjEgMjEtMS45LTEuOSIgLz4KICA8Y2lyY2xlIGN4PSIxNyIgY3k9IjE3IiByPSIzIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/folder-search\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 FolderSearch = createLucideIcon('FolderSearch', [\n [\n 'path',\n {\n d: 'M10.7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v4.1',\n key: '1bw5m7',\n },\n ],\n ['path', { d: 'm21 21-1.9-1.9', key: '1g2n9r' }],\n ['circle', { cx: '17', cy: '17', r: '3', key: '18b49y' }],\n]);\n\nexport default FolderSearch;\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,CACpD,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,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,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;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,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,CAAA;AAAA,CAC/C,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;AAC1D,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,412 @@
export default `flf2a$ 4 3 20 -1 2
Contessa by Christopher Joseph Pirillo (pirillc2770@cobra.uni.edu)
$$@
$$@
$$@
$$@@
| @
| @
* @
@@
* * @
\` \` @
@
@@
_|_|_ @
_|_|_ @
| | @
@@
_;_. @
(_|_ @
._|_) @
\` @@
* / @
/ @
/ * @
@@
_;_@
(_|_@
(_|_@
\` @@
*@
'@
@
@@
/ @
( @
\\ @
@@
\\ @
)@
/ @
@@
.|, @
-*- @
'|\` @
@@
, @
-+- @
' @
@@
@
@
* @
' @@
@
___ @
@
@@
@
@
* @
@@
/ @
/ @
/ @
@@
_, @
|.| @
|_| @
@@
, @
/| @
.|. @
@@
_, @
'_) @
/_. @
@@
_, @
'_) @
._) @
@@
. , @
|_| @
| @
@@
._, @
|_ @
._) @
@@
._, @
(_ @
(_) @
@@
__, @
/ @
/ @
@@
_, @
(_) @
(_) @
@@
_, @
(_) @
| @
@@
@
* @
* @
@@
@
* @
* @
' @@
/ @
< @
\\ @
@@
@
=== @
=== @
@@
\\ @
>@
/ @
@@
_ @
' )@
; @
@@
__ @
/(]| @
\\__/ @
@@
.__.@
[__]@
| |@
@@
.__ @
[__)@
[__)@
@@
__ @
/ \`@
\\__.@
@@
.__ @
| \\@
|__/@
@@
.___@
[__ @
[___@
@@
.___@
[__ @
| @
@@
.__ @
[ __@
[_./@
@@
. .@
|__|@
| |@
@@
._.@
| @
_|_@
@@
.@
|@
\\__|@
@@
. .@
|_/ @
| \\@
@@
. @
| @
|___@
@@
. .@
|\\/|@
| |@
@@
. .@
|\\ |@
| \\|@
@@
.__.@
| |@
|__|@
@@
.__ @
[__)@
| @
@@
.__.@
| |@
|__\\@
@@
.__ @
[__)@
| \\@
@@
__.@
(__ @
.__)@
@@
.___.@
| @
| @
@@
. .@
| |@
|__|@
@@
. .@
\\ /@
\\/ @
@@
. .@
| |@
|/\\|@
@@
\\ /@
>< @
/ \\@
@@
. ,@
\\./ @
| @
@@
.___.@
_/ @
./__.@
@@
[~ @
[ @
[_ @
@@
\\ @
\\ @
\\ @
@@
~]@
]@
_]@
@@
/\\ @
@
@
@@
@
@
____@
@@
* @
\` @
@
@@
@
_.@
(_]@
@@
. @
|_ @
[_)@
@@
@
_.@
(_.@
@@
.@
_|@
(_]@
@@
@
_ @
(/,@
@@
._@
|,@
| @
@@
@
_ @
(_]@
._|@@
. @
|_ @
[ )@
@@
@
*@
|@
@@
@
*@
|@
._|@@
. @
;_/@
| \\@
@@
.@
|@
|@
@@
@
._ _ @
[ | )@
@@
@
._ @
[ )@
@@
@
_ @
(_)@
@@
@
._ @
[_)@
| @@
@
_.@
(_]@
|@@
@
._.@
[ @
@@
@
__@
_) @
@@
, @
-+-@
| @
@@
@
. .@
(_|@
@@
@
. ,@
\\/ @
@@
@
. ,@
\\/\\/ @
@@
@
\\./@
/'\\@
@@
@
.@
\\_|@
._|@@
@
__.@
/_@
@@
/ @
> @
\\ @
@@
| @
| @
| @
@@
\\ @
< @
/ @
@@
/\\ @
\\/ @
@
@@
oo @
|__|@
| |@
@@
oo @
/\`\`\\@
\\__/@
@@
oo @
: ;@
|__|@
@@
@
oo @
(_|,@
@@
oo @
__ @
(__)@
@@
oo @
. ,@
|__|@
@@
__ @
| )@
| >@
@@
`
@@ -0,0 +1,523 @@
export default `flf2a$ 5 4 8 1 11 0 16769 0
Author :
Date : 2008/8/28 1:12:58
Version: 1.0
-------------------------------------------------
-------------------------------------------------
This font has been created using JavE's FIGlet font export assistant.
Have a look at: http://www.jave.de
Permission is hereby given to modify this font, as long as the
modifier's name is placed on a comment line.
$ $#
$ $#
$ $#
$ $#
$ $##
!#
#
#
#
##
"#
#
#
#
##
##
#
#
#
##
$#
#
#
#
##
%#
#
#
#
##
&#
#
#
#
##
'#
#
#
#
##
(#
#
#
#
##
)#
#
#
#
##
*#
#
#
#
##
+#
#
#
#
##
,#
#
#
#
##
-#
#
#
#
##
.#
#
#
#
##
/#
#
#
#
##
0#
#
#
#
##
1#
#
#
#
##
2#
#
#
#
##
3#
#
#
#
##
4#
#
#
#
##
5#
#
#
#
##
6#
#
#
#
##
7#
#
#
#
##
8#
#
#
#
##
9#
#
#
#
##
:#
#
#
#
##
;#
#
#
#
##
<#
#
#
#
##
=#
#
#
#
##
>#
#
#
#
##
?#
#
#
#
##
@#
#
#
#
##
_ #
'|\\ #
|-\\ #
' \` #
##
__ #
'|_) #
_|_) #
' #
##
_, #
/ #
'\\_ #
\` #
##
,_ #
| \\,#
_|_/ #
' #
##
_, #
/_, #
'\\_ #
\` #
##
__, #
'|_, #
| #
' #
##
_, #
/ _ #
'\\_|\` #
_| #
' ##
, , #
|_|, #
'| | #
' \` #
##
___, #
' | #
_|_, #
' #
##
___, #
',| #
(_| #
#
##
, , #
|_/ #
'| \\ #
' \` #
##
, #
| #
'|__ #
' #
##
, , #
|\\/| #
| \`| #
' \` #
##
, , #
|\\ | #
|'\\| #
' \` #
##
_, #
/ \\, #
'\\_/ #
' #
##
,_ #
|_) #
'| #
' #
##
_, #
/ \\, #
'\\_X #
\` #
##
,_ #
|_) #
'| \\ #
' \` #
##
_, #
(_, #
_) #
' #
##
___, #
' | #
| #
' #
##
, , #
| | #
'\\__| #
\` #
##
, , #
\\ / #
\\/\` #
' #
##
, , #
| ,| #
|/\\| #
' \` #
##
, , #
\\_/ #
/ \\ #
' \` #
##
, ,#
\\_/ #
, /\` #
(_/ #
##
,__, #
/ #
/_ #
' \` #
##
[#
#
#
#
##
\\#
#
#
#
##
]#
#
#
#
##
^#
#
#
#
##
_#
#
#
#
##
\`#
#
#
#
##
_ #
'|\\ #
|-\\ #
' \` #
##
__ #
'|_) #
_|_) #
' #
##
_, #
/ #
'\\_ #
\` #
##
,_ #
| \\,#
_|_/ #
' #
##
_, #
/_, #
'\\_ #
\` #
##
__, #
'|_, #
| #
' #
##
_, #
/ _ #
'\\_|\` #
_| #
' ##
, , #
|_|, #
'| | #
' \` #
##
___, #
' | #
_|_, #
' #
##
___, #
',| #
(_| #
#
##
, , #
|_/ #
'| \\ #
' \` #
##
, #
| #
'|__ #
' #
##
, , #
|\\/| #
| \`| #
' \` #
##
, , #
|\\ | #
|'\\| #
' \` #
##
_, #
/ \\, #
'\\_/ #
' #
##
,_ #
|_) #
'| #
' #
##
_, #
/ \\, #
'\\_X #
\` #
##
,_ #
|_) #
'| \\ #
' \` #
##
_, #
(_, #
_) #
' #
##
___, #
' | #
| #
' #
##
, , #
| | #
'\\__| #
\` #
##
, , #
\\ / #
\\/\` #
' #
##
, , #
| ,| #
|/\\| #
' \` #
##
, , #
\\_/ #
/ \\ #
' \` #
##
, ,#
\\_/ #
, /\` #
(_/ #
##
,__, #
/ #
/_ #
' \` #
##
{#
#
#
#
##
|#
#
#
#
##
}#
#
#
#
##
~#
#
#
#
##
_ #
'|\\ #
|-\\ #
' \` #
##
_, #
/ \\, #
'\\_/ #
' #
##
, , #
| | #
'\\__| #
\` #
##
_ #
'|\\ #
|-\\ #
' \` #
##
_, #
/ \\, #
'\\_/ #
' #
##
, , #
| | #
'\\__| #
\` #
##
�#
#
#
#
##
`
@@ -0,0 +1 @@
{"version":3,"file":"simpleStatelessStreamableHttp.js","sourceRoot":"","sources":["../../../../src/examples/server/simpleStatelessStreamableHttp.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,6 @@
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// package.json
var version = "8.5.1";
exports.version = version;
@@ -0,0 +1,154 @@
import type * as core from "../core/index.cjs";
import type * as JSONSchema from "./json-schema.cjs";
import { type $ZodRegistry } from "./registries.cjs";
import type * as schemas from "./schemas.cjs";
import type { StandardJSONSchemaV1, StandardSchemaWithJSONProps } from "./standard-schema.cjs";
export type Processor<T extends schemas.$ZodType = schemas.$ZodType> = (schema: T, ctx: ToJSONSchemaContext, json: JSONSchema.BaseSchema, params: ProcessParams) => void;
/**
* Called for each schema that has no JSON Schema equivalent. Return a JSON Schema to use in its
* place, `"any"` to fall back to the `unrepresentable: "any"` behavior, or `"throw"`/`undefined` to
* throw the default error. Throwing from the handler propagates, so custom errors work too.
*/
export type UnrepresentableHandler<T extends schemas.$ZodType = schemas.$ZodType> = (ctx: {
zodSchema: T;
path: (string | number)[];
/** The error Zod would throw. Distinguishes sites that share a `zodSchema`, e.g. an `undefined`
* vs a `bigint` member of the same literal. */
message: string;
}) => JSONSchema.BaseSchema | "throw" | "any" | undefined;
export interface JSONSchemaGeneratorParams {
processors: Record<string, Processor>;
/** A registry used to look up metadata for each schema. Any schema with an `id` property will be extracted as a $def.
* @default globalRegistry */
metadata?: $ZodRegistry<Record<string, any>>;
/** The JSON Schema version to target.
* - `"draft-2020-12"` — Default. JSON Schema Draft 2020-12
* - `"draft-07"` — JSON Schema Draft 7
* - `"draft-04"` — JSON Schema Draft 4
* - `"openapi-3.0"` — OpenAPI 3.0 Schema Object */
target?: "draft-04" | "draft-07" | "draft-2020-12" | "openapi-3.0" | ({} & string) | undefined;
/** How to handle unrepresentable types.
* - `"throw"` — Default. Unrepresentable types throw an error
* - `"any"` — Unrepresentable types become `{}`
* - A function — called once per unrepresentable schema; see {@link UnrepresentableHandler}. */
unrepresentable?: "throw" | "any" | UnrepresentableHandler<schemas.$ZodTypes>;
/** Arbitrary custom logic that can be used to modify the generated JSON Schema. */
override?: (ctx: {
zodSchema: schemas.$ZodTypes;
jsonSchema: JSONSchema.BaseSchema;
path: (string | number)[];
}) => void;
/** Whether to extract the `"input"` or `"output"` type. Relevant to transforms, defaults, coerced primitives, etc.
* - `"output"` — Default. Convert the output schema.
* - `"input"` — Convert the input schema. */
io?: "input" | "output";
cycles?: "ref" | "throw";
reused?: "ref" | "inline";
external?: {
registry: $ZodRegistry<{
id?: string | undefined;
}>;
uri?: ((id: string) => string) | undefined;
defs: Record<string, JSONSchema.BaseSchema>;
} | undefined;
}
/**
* Parameters for the toJSONSchema function.
*/
export type ToJSONSchemaParams = Omit<JSONSchemaGeneratorParams, "processors" | "external">;
/**
* Parameters for the toJSONSchema function when passing a registry.
*/
export interface RegistryToJSONSchemaParams extends ToJSONSchemaParams {
uri?: (id: string) => string;
}
export interface ProcessParams {
schemaPath: schemas.$ZodType[];
path: (string | number)[];
}
export interface Seen {
/** JSON Schema result for this Zod schema */
schema: JSONSchema.BaseSchema;
/** A cached version of the schema that doesn't get overwritten during ref resolution */
def?: JSONSchema.BaseSchema;
defId?: string | undefined;
/** Number of times this schema was encountered during traversal */
count: number;
/** Cycle path */
cycle?: (string | number)[] | undefined;
isParent?: boolean | undefined;
/** Schema to inherit JSON Schema properties from (set by processor for wrappers) */
ref?: schemas.$ZodType | null;
/** JSON Schema property path for this schema */
path?: (string | number)[] | undefined;
}
export interface ToJSONSchemaContext {
processors: Record<string, Processor>;
metadataRegistry: $ZodRegistry<Record<string, any>>;
target: "draft-04" | "draft-07" | "draft-2020-12" | "openapi-3.0" | ({} & string);
unrepresentable: "throw" | "any" | UnrepresentableHandler;
override: (ctx: {
zodSchema: schemas.$ZodType;
jsonSchema: JSONSchema.BaseSchema;
path: (string | number)[];
}) => void;
io: "input" | "output";
counter: number;
seen: Map<schemas.$ZodType, Seen>;
/** Registry conversions share one `seen` map across every emitted schema. These hold the
* `external` the whole-map passes below last ran for, so the passes are not repeated once per
* schema — and still re-run if the map grows or `external` is swapped. `sharedEmitDoneFor`
* covers both passes in `finalize`: the ref flattening and the `$defs` build.
*
* The passes are valid only while nothing they read has changed, so both are cleared in
* `processSchema()` when the map grows, and in `JSONSchemaGenerator.emit()`, which can also change
* the `cycles` and `reused` they branch on.
*
* One case is deliberately not covered: an `override` callback that writes to
* `metadataRegistry` mid-conversion. It runs inside `finalize`, so a registry conversion has
* nowhere left to clear the guards, and later schemas keep the ids the first pass saw. That
* output was never coherent — before this, whether a shared subschema was inlined or extracted
* depended on which registry entry happened to be emitted when the callback fired. */
sharedDefsExtractedFor?: ToJSONSchemaContext["external"];
sharedEmitDoneFor?: ToJSONSchemaContext["external"];
cycles: "ref" | "throw";
reused: "ref" | "inline";
/** The `allOf` array of each intersection encountered during traversal, innermost first. `finalize` folds every emitted object holding one; see `foldIntersection`. */
intersections: JSONSchema.BaseSchema[][];
/** Rewrites a processor deferred to `finalize`, where the flatten has resolved every ref and the union branches are in place. */
deferred: (() => void)[];
external?: {
registry: $ZodRegistry<{
id?: string | undefined;
}>;
uri?: ((id: string) => string) | undefined;
defs: Record<string, JSONSchema.BaseSchema>;
} | undefined;
}
export declare function initializeContext(params: JSONSchemaGeneratorParams): ToJSONSchemaContext;
/**
* Applies the `unrepresentable` setting at a site that has no JSON Schema equivalent. Throws
* `message` unless the setting (or the handler's return value) says otherwise. Returns `true` if a
* custom JSON Schema was written into `json`, in which case the caller must not write its own.
*/
export declare function handleUnrepresentable(schema: schemas.$ZodType, ctx: ToJSONSchemaContext, json: JSONSchema.BaseSchema, params: ProcessParams, message: string): boolean;
export declare function processSchema<T extends schemas.$ZodType>(schema: T, ctx: ToJSONSchemaContext, _params?: ProcessParams): JSONSchema.BaseSchema;
/** @deprecated Renamed to `processSchema`. An export alias declares no binding, so it is safe to keep. */
export { processSchema as process };
export declare function extractDefs<T extends schemas.$ZodType>(ctx: ToJSONSchemaContext, schema: T): void;
export declare function finalize<T extends schemas.$ZodType>(ctx: ToJSONSchemaContext, schema: T): ZodStandardJSONSchemaPayload<T>;
export type ZodStandardSchemaWithJSON<T> = StandardSchemaWithJSONProps<core.input<T>, core.output<T>>;
export interface ZodStandardJSONSchemaPayload<T> extends JSONSchema.BaseSchema {
"~standard": ZodStandardSchemaWithJSON<T>;
}
/**
* Creates a toJSONSchema method for a schema instance.
* This encapsulates the logic of initializing context, processing, extracting defs, and finalizing.
*/
export declare const createToJSONSchemaMethod: <T extends schemas.$ZodType>(schema: T, processors?: Record<string, Processor>) => (params?: ToJSONSchemaParams) => ZodStandardJSONSchemaPayload<T>;
/**
* Creates a toJSONSchema method for a schema instance.
* This encapsulates the logic of initializing context, processing, extracting defs, and finalizing.
*/
type StandardJSONSchemaMethodParams = Parameters<StandardJSONSchemaV1["~standard"]["jsonSchema"]["input"]>[0];
export declare const createStandardJSONSchemaMethod: <T extends schemas.$ZodType>(schema: T, io: "input" | "output", processors?: Record<string, Processor>) => (params?: StandardJSONSchemaMethodParams) => JSONSchema.BaseSchema;
@@ -0,0 +1,189 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
//#region src/middleware/timing/timing.ts
const getTime = () => {
try {
return performance.now();
} catch {}
return Date.now();
};
/**
* Server-Timing Middleware for Hono.
*
* @see {@link https://hono.dev/docs/middleware/builtin/timing}
*
* @param {TimingOptions} [config] - The options for the timing middleware.
* @param {boolean} [config.total=true] - Show the total response time.
* @param {boolean | ((c: Context) => boolean)} [config.enabled=true] - Whether timings should be added to the headers or not.
* @param {string} [config.totalDescription=Total Response Time] - Description for the total response time.
* @param {boolean} [config.autoEnd=true] - If `startTime()` should end automatically at the end of the request.
* @param {boolean | string | ((c: Context) => boolean | string)} [config.crossOrigin=false] - The origin this timings header should be readable.
* @returns {MiddlewareHandler} The middleware handler function.
*
* @example
* ```ts
* const app = new Hono()
*
* // add the middleware to your router
* app.use(timing());
*
* app.get('/', async (c) => {
* // add custom metrics
* setMetric(c, 'region', 'europe-west3')
*
* // add custom metrics with timing, must be in milliseconds
* setMetric(c, 'custom', 23.8, 'My custom Metric')
*
* // start a new timer
* startTime(c, 'db');
*
* const data = await db.findMany(...);
*
* // end the timer
* endTime(c, 'db');
*
* return c.json({ response: data });
* });
* ```
*/
const timing = (config) => {
const options = {
total: true,
enabled: true,
totalDescription: "Total Response Time",
autoEnd: true,
crossOrigin: false,
...config
};
return async function timing(c, next) {
const headers = [];
const timers = /* @__PURE__ */ new Map();
if (c.get("metric")) return await next();
c.set("metric", {
headers,
timers
});
if (options.total) startTime(c, "total", options.totalDescription);
await next();
if (options.total) endTime(c, "total");
if (options.autoEnd) timers.forEach((_, key) => {
endTime(c, key);
});
if (typeof options.enabled === "function" ? options.enabled(c) : options.enabled) {
c.res.headers.append("Server-Timing", headers.join(","));
const crossOrigin = typeof options.crossOrigin === "function" ? options.crossOrigin(c) : options.crossOrigin;
if (crossOrigin) c.res.headers.append("Timing-Allow-Origin", typeof crossOrigin === "string" ? crossOrigin : "*");
}
};
};
/**
* Set a metric for the timing middleware.
*
* @param {Context} c - The context of the request.
* @param {string} name - The name of the metric.
* @param {number | string} [valueDescription] - The value or description of the metric.
* @param {string} [description] - The description of the metric.
* @param {number} [precision] - The precision of the metric value.
*
* @example
* ```ts
* setMetric(c, 'region', 'europe-west3')
* setMetric(c, 'custom', 23.8, 'My custom Metric')
* ```
*/
const setMetric = (c, name, valueDescription, description, precision) => {
const metrics = c.get("metric");
if (!metrics) {
console.warn("Metrics not initialized! Please add the `timing()` middleware to this route!");
return;
}
if (typeof valueDescription === "number") {
const dur = valueDescription.toFixed(precision || 1);
const metric = description ? `${name};dur=${dur};desc="${description}"` : `${name};dur=${dur}`;
metrics.headers.push(metric);
} else {
const metric = valueDescription ? `${name};desc="${valueDescription}"` : `${name}`;
metrics.headers.push(metric);
}
};
/**
* Start a timer for the timing middleware.
*
* @param {Context} c - The context of the request.
* @param {string} name - The name of the timer.
* @param {string} [description] - The description of the timer.
*
* @example
* ```ts
* startTime(c, 'db')
* ```
*/
const startTime = (c, name, description) => {
const metrics = c.get("metric");
if (!metrics) {
console.warn("Metrics not initialized! Please add the `timing()` middleware to this route!");
return;
}
metrics.timers.set(name, {
description,
start: getTime()
});
};
/**
* End a timer for the timing middleware.
*
* @param {Context} c - The context of the request.
* @param {string} name - The name of the timer.
* @param {number} [precision] - The precision of the timer value.
*
* @example
* ```ts
* endTime(c, 'db')
* ```
*/
const endTime = (c, name, precision) => {
const metrics = c.get("metric");
if (!metrics) {
console.warn("Metrics not initialized! Please add the `timing()` middleware to this route!");
return;
}
const timer = metrics.timers.get(name);
if (!timer) {
console.warn(`Timer "${name}" does not exist!`);
return;
}
const { description, start } = timer;
const duration = getTime() - start;
setMetric(c, name, duration, description, precision);
metrics.timers.delete(name);
};
/**
* Wrap a Promise to capture its duration.
* @param {Context} c - The context of the request.
* @param {string} name - The name of the timer.
* @param {Promise<T>} callable - The Promise to time.
* @param {string} [description] - The description of the timer.
* @param {number} [precision] - The precision of the timer value.
*
* @example
* ```ts
* // Instead of this:
* const data = await db.findMany(...);
*
* // do this:
* const data = await wrapTime(c, 'query', db.findMany(...));
* ```
* */
async function wrapTime(c, name, callable, description, precision) {
startTime(c, name, description);
try {
return await callable;
} finally {
endTime(c, name, precision);
}
}
//#endregion
exports.endTime = endTime;
exports.setMetric = setMetric;
exports.startTime = startTime;
exports.timing = timing;
exports.wrapTime = wrapTime;
@@ -0,0 +1,35 @@
"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 `stylistic` that only contains type-checked rules and disables of any corresponding core ESLint rules.
* @see {@link https://typescript-eslint.io/users/configs#stylistic-type-checked-only}
*/
exports.default = (plugin, parser) => [
(0, base_1.default)(plugin, parser),
(0, eslint_recommended_1.default)(plugin, parser),
{
name: 'typescript-eslint/stylistic-type-checked-only',
rules: {
'dot-notation': 'off',
'@typescript-eslint/dot-notation': 'error',
'@typescript-eslint/non-nullable-type-assertion-style': 'error',
'@typescript-eslint/prefer-find': 'error',
'@typescript-eslint/prefer-includes': 'error',
'@typescript-eslint/prefer-nullish-coalescing': 'error',
'@typescript-eslint/prefer-optional-chain': 'error',
'@typescript-eslint/prefer-regexp-exec': 'error',
'@typescript-eslint/prefer-string-starts-ends-with': 'error',
},
},
];
@@ -0,0 +1 @@
{"version":3,"file":"scrape-motion-values.mjs","sources":["../../../../../src/render/html/utils/scrape-motion-values.ts"],"sourcesContent":["import { isMotionValue } from \"../../../value/utils/is-motion-value\"\nimport type { MotionNodeOptions } from \"../../../node/types\"\nimport { isForcedMotionValue } from \"../../utils/is-forced-motion-value\"\nimport type { VisualElement } from \"../../VisualElement\"\n\nexport function scrapeMotionValuesFromProps(\n props: MotionNodeOptions,\n prevProps: MotionNodeOptions,\n visualElement?: VisualElement\n) {\n const style = (props as any).style\n const prevStyle = (prevProps as any)?.style\n const newValues: { [key: string]: any } = {}\n\n if (!style) return newValues\n\n for (const key in style) {\n if (\n isMotionValue(style[key]) ||\n (prevStyle && isMotionValue(prevStyle[key])) ||\n isForcedMotionValue(key, props) ||\n visualElement?.getValue(key)?.liveStyle !== undefined\n ) {\n newValues[key] = style[key]\n }\n }\n\n return newValues\n}\n"],"names":[],"mappings":";;;SAKgB,2BAA2B,CACvC,KAAwB,EACxB,SAA4B,EAC5B,aAA6B,EAAA;AAE7B,IAAA,MAAM,KAAK,GAAI,KAAa,CAAC,KAAK;AAClC,IAAA,MAAM,SAAS,GAAI,SAAiB,EAAE,KAAK;IAC3C,MAAM,SAAS,GAA2B,EAAE;AAE5C,IAAA,IAAI,CAAC,KAAK;AAAE,QAAA,OAAO,SAAS;AAE5B,IAAA,KAAK,MAAM,GAAG,IAAI,KAAK,EAAE;AACrB,QAAA,IACI,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;aACxB,SAAS,IAAI,aAAa,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;AAC5C,YAAA,mBAAmB,CAAC,GAAG,EAAE,KAAK,CAAC;YAC/B,aAAa,EAAE,QAAQ,CAAC,GAAG,CAAC,EAAE,SAAS,KAAK,SAAS,EACvD;YACE,SAAS,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC;QAC/B;IACJ;AAEA,IAAA,OAAO,SAAS;AACpB;;;;"}
@@ -0,0 +1 @@
{"version":3,"file":"circle-minus.js","sources":["../../../src/icons/circle-minus.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name CircleMinus\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIgLz4KICA8cGF0aCBkPSJNOCAxMmg4IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/circle-minus\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 CircleMinus = createLucideIcon('CircleMinus', [\n ['circle', { cx: '12', cy: '12', r: '10', key: '1mglay' }],\n ['path', { d: 'M8 12h8', key: '1wcyev' }],\n]);\n\nexport default CircleMinus;\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,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,CAAA,CAAM,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACzD,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,21 @@
"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`
module.exports = {
extends: ['./configs/eslintrc/base', './configs/eslintrc/eslint-recommended'],
rules: {
'dot-notation': 'off',
'@typescript-eslint/dot-notation': 'error',
'@typescript-eslint/non-nullable-type-assertion-style': 'error',
'@typescript-eslint/prefer-find': 'error',
'@typescript-eslint/prefer-includes': 'error',
'@typescript-eslint/prefer-nullish-coalescing': 'error',
'@typescript-eslint/prefer-optional-chain': 'error',
'@typescript-eslint/prefer-regexp-exec': 'error',
'@typescript-eslint/prefer-string-starts-ends-with': 'error',
},
};
@@ -0,0 +1,14 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
*/
"use strict";
/**
* Check whether given two characters are a surrogate pair.
* @param {number} lead The code of the lead character.
* @param {number} tail The code of the tail character.
* @returns {boolean} `true` if the character pair is a surrogate pair.
*/
module.exports = function isSurrogatePair(lead, tail) {
return lead >= 0xd800 && lead < 0xdc00 && tail >= 0xdc00 && tail < 0xe000;
};
@@ -0,0 +1,23 @@
/**
* @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 IceCreamBowl = createLucideIcon("IceCreamBowl", [
[
"path",
{
d: "M12 17c5 0 8-2.69 8-6H4c0 3.31 3 6 8 6m-4 4h8m-4-3v3M5.14 11a3.5 3.5 0 1 1 6.71 0",
key: "1uxfcu"
}
],
["path", { d: "M12.14 11a3.5 3.5 0 1 1 6.71 0", key: "4k3m1s" }],
["path", { d: "M15.5 6.5a3.5 3.5 0 1 0-7 0", key: "zmuahr" }]
]);
export { IceCreamBowl as default };
//# sourceMappingURL=ice-cream-bowl.js.map
@@ -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 Shell = createLucideIcon("Shell", [
[
"path",
{
d: "M14 11a2 2 0 1 1-4 0 4 4 0 0 1 8 0 6 6 0 0 1-12 0 8 8 0 0 1 16 0 10 10 0 1 1-20 0 11.93 11.93 0 0 1 2.42-7.22 2 2 0 1 1 3.16 2.44",
key: "1cn552"
}
]
]);
export { Shell as default };
//# sourceMappingURL=shell.js.map
@@ -0,0 +1,3 @@
{
"presets": [["@babel/preset-env", { "modules": "commonjs" }], "@babel/preset-react"]
}
@@ -0,0 +1 @@
{"version":3,"file":"multipleClientsParallel.d.ts","sourceRoot":"","sources":["../../../../src/examples/client/multipleClientsParallel.ts"],"names":[],"mappings":""}
@@ -0,0 +1,51 @@
{
"name": "eslint-config-prettier",
"version": "10.1.8",
"type": "commonjs",
"description": "Turns off all rules that are unnecessary or might conflict with Prettier.",
"repository": "prettier/eslint-config-prettier",
"homepage": "https://github.com/prettier/eslint-config-prettier#readme",
"author": "Simon Lydell",
"maintainers": [
"JounQin (https://www.1stG.me) <admin@1stg.me>"
],
"funding": "https://opencollective.com/eslint-config-prettier",
"license": "MIT",
"bin": "bin/cli.js",
"main": "index.js",
"types": "index.d.ts",
"exports": {
".": {
"types": "./index.d.ts",
"default": "./index.js"
},
"./flat": {
"types": "./flat.d.ts",
"default": "./flat.js"
},
"./prettier": {
"types": "./prettier.d.ts",
"default": "./prettier.js"
},
"./package.json": "./package.json"
},
"files": [
"bin",
"flat.d.ts",
"flat.js",
"index.d.ts",
"index.js",
"prettier.d.ts",
"prettier.js"
],
"keywords": [
"eslint",
"eslintconfig",
"eslint-config",
"eslint-prettier",
"prettier"
],
"peerDependencies": {
"eslint": ">=7.0.0"
}
}
@@ -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 Radar = createLucideIcon("Radar", [
["path", { d: "M19.07 4.93A10 10 0 0 0 6.99 3.34", key: "z3du51" }],
["path", { d: "M4 6h.01", key: "oypzma" }],
["path", { d: "M2.29 9.62A10 10 0 1 0 21.31 8.35", key: "qzzz0" }],
["path", { d: "M16.24 7.76A6 6 0 1 0 8.23 16.67", key: "1yjesh" }],
["path", { d: "M12 18h.01", key: "mhygvu" }],
["path", { d: "M17.99 11.66A6 6 0 0 1 15.77 16.67", key: "1u2y91" }],
["circle", { cx: "12", cy: "12", r: "2", key: "1c9p78" }],
["path", { d: "m13.41 10.59 5.66-5.66", key: "mhq4k0" }]
]);
export { Radar as default };
//# sourceMappingURL=radar.js.map
@@ -0,0 +1,149 @@
/*!
* vary
* Copyright(c) 2014-2017 Douglas Christopher Wilson
* MIT Licensed
*/
'use strict'
/**
* Module exports.
*/
module.exports = vary
module.exports.append = append
/**
* RegExp to match field-name in RFC 7230 sec 3.2
*
* field-name = token
* token = 1*tchar
* tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*"
* / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
* / DIGIT / ALPHA
* ; any VCHAR, except delimiters
*/
var FIELD_NAME_REGEXP = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/
/**
* Append a field to a vary header.
*
* @param {String} header
* @param {String|Array} field
* @return {String}
* @public
*/
function append (header, field) {
if (typeof header !== 'string') {
throw new TypeError('header argument is required')
}
if (!field) {
throw new TypeError('field argument is required')
}
// get fields array
var fields = !Array.isArray(field)
? parse(String(field))
: field
// assert on invalid field names
for (var j = 0; j < fields.length; j++) {
if (!FIELD_NAME_REGEXP.test(fields[j])) {
throw new TypeError('field argument contains an invalid header name')
}
}
// existing, unspecified vary
if (header === '*') {
return header
}
// enumerate current values
var val = header
var vals = parse(header.toLowerCase())
// unspecified vary
if (fields.indexOf('*') !== -1 || vals.indexOf('*') !== -1) {
return '*'
}
for (var i = 0; i < fields.length; i++) {
var fld = fields[i].toLowerCase()
// append value (case-preserving)
if (vals.indexOf(fld) === -1) {
vals.push(fld)
val = val
? val + ', ' + fields[i]
: fields[i]
}
}
return val
}
/**
* Parse a vary header into an array.
*
* @param {String} header
* @return {Array}
* @private
*/
function parse (header) {
var end = 0
var list = []
var start = 0
// gather tokens
for (var i = 0, len = header.length; i < len; i++) {
switch (header.charCodeAt(i)) {
case 0x20: /* */
if (start === end) {
start = end = i + 1
}
break
case 0x2c: /* , */
list.push(header.substring(start, end))
start = end = i + 1
break
default:
end = i + 1
break
}
}
// final token
list.push(header.substring(start, end))
return list
}
/**
* Mark that a request is varied on a header field.
*
* @param {Object} res
* @param {String|Array} field
* @public
*/
function vary (res, field) {
if (!res || !res.getHeader || !res.setHeader) {
// quack quack
throw new TypeError('res argument is required')
}
// get existing header
var val = res.getHeader('Vary') || ''
var header = Array.isArray(val)
? val.join(', ')
: String(val)
// set new header
if ((val = append(header, field))) {
res.setHeader('Vary', val)
}
}
@@ -0,0 +1 @@
{"version":3,"file":"use-combine-values.mjs","sources":["../../../src/value/use-combine-values.ts"],"sourcesContent":["\"use client\"\n\nimport { cancelFrame, frame, MotionValue } from \"motion-dom\"\nimport { useIsomorphicLayoutEffect } from \"../utils/use-isomorphic-effect\"\nimport { useMotionValue } from \"./use-motion-value\"\n\nexport function useCombineMotionValues<R>(\n values: MotionValue[],\n combineValues: () => R\n) {\n /**\n * Initialise the returned motion value. This remains the same between renders.\n */\n const value = useMotionValue(combineValues())\n\n /**\n * Create a function that will update the template motion value with the latest values.\n * This is pre-bound so whenever a motion value updates it can schedule its\n * execution in Framesync. If it's already been scheduled it won't be fired twice\n * in a single frame.\n */\n const updateValue = () => value.set(combineValues())\n\n /**\n * Synchronously update the motion value with the latest values during the render.\n * This ensures that within a React render, the styles applied to the DOM are up-to-date.\n */\n updateValue()\n\n /**\n * Subscribe to all motion values found within the template. Whenever any of them change,\n * schedule an update.\n */\n useIsomorphicLayoutEffect(() => {\n const scheduleUpdate = () => frame.preRender(updateValue, false, true)\n const subscriptions = values.map((v) => v.on(\"change\", scheduleUpdate))\n\n return () => {\n subscriptions.forEach((unsubscribe) => unsubscribe())\n cancelFrame(updateValue)\n }\n })\n\n return value\n}\n"],"names":[],"mappings":";;;;;AAMM;AAIF;;AAEG;AACH;AAEA;;;;;AAKG;AACH;AAEA;;;AAGG;AACH;AAEA;;;AAGG;;AAEC;;AAGA;;;AAGA;AACJ;AAEA;AACJ;;"}
@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = isSpecifierDefault;
var _index = require("./generated/index.js");
function isSpecifierDefault(specifier) {
return (0, _index.isImportDefaultSpecifier)(specifier) || (0, _index.isIdentifier)(specifier.imported || specifier.exported, {
name: "default"
});
}
//# sourceMappingURL=isSpecifierDefault.js.map