docs: 仓库链接指向本镜像仓库
Dev Build / cleanup (push) Canceled after 0s
Dev Build / typecheck (push) Canceled after 0s
Dev Build / build (linux-arm64, ubuntu-24.04-arm, linux-arm64) (push) Canceled after 0s
Dev Build / build (linux-x64, ubuntu-latest, linux-x64) (push) Canceled after 0s
Dev Build / build (win-x64, windows-latest, win32-x64) (push) Canceled after 0s
Dev Build / dispatch-dev-docker (push) Skipped

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,2 @@
let t=()=>{};"undefined"!=typeof process&&"production"!==process.env?.NODE_ENV&&(t=(t,e,n)=>{if(!t)throw new Error(function(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}(e,n))});const e=t=>t,n=t=>1e3*t,i=t=>t/1e3,s=t=>null!==t;class a{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}function o(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const r=t=>t.startsWith("--");const l={};function u(t,e){const n=function(t){let e;return()=>(void 0===e&&(e=t()),e)}(t);return()=>l[e]??n()}const h=u(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),d=u(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),m=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,c={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:m([0,.65,.55,1]),circOut:m([.55,0,1,.45]),backIn:m([.31,.01,.66,-.59]),backOut:m([.33,1.53,.69,.99])};function p(t,e){return t?"function"==typeof t?d()?((t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let e=0;e<s;e++)i+=Math.round(1e4*t(e/(s-1)))/1e4+", ";return`linear(${i.substring(0,i.length-2)})`})(t,e):"ease-out":(t=>Array.isArray(t)&&"number"==typeof t[0])(t)?m(t):Array.isArray(t)?t.map(t=>p(t,e)||c.easeOut):c[t]:void 0}class f extends a{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:i,keyframes:a,pseudoElement:o,allowFlatten:l=!1,finalKeyframe:u,onComplete:h}=e;this.isPseudoElement=Boolean(o),this.allowFlatten=l,this.options=e,t("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const m=function({type:t,...e}){return function(t){return"function"==typeof t&&"applyToOptions"in t}(t)&&d()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(e);this.animation=function(t,e,n,{delay:i=0,duration:s=300,repeat:a=0,repeatType:o="loop",ease:r="easeOut",times:l}={},u){const h={[e]:n};l&&(h.offset=l);const d=p(r,s);Array.isArray(d)&&(h.easing=d);const m={delay:i,duration:s,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:a+1,direction:"reverse"===o?"alternate":"normal"};return u&&(m.pseudoElement=u),t.animate(h,m)}(n,i,a,m,o),!1===m.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const t=function(t,{repeat:e,repeatType:n="loop"},i,a=1){const o=t.filter(s),r=a<0||e&&"loop"!==n&&e%2==1?0:o.length-1;return r&&void 0!==i?i:o[r]}(a,this.options,u,this.speed);this.updateMotionValue&&this.updateMotionValue(t),function(t,e,n){r(e)?t.style.setProperty(e,n):t.style[e]=n}(n,i,t),this.animation.cancel()}h?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return i(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+i(t)}get time(){return i(Number(this.animation.currentTime)||0)}set time(t){const e=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=n(t),e&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:i,observe:s}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&h()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),i&&(this.animation.rangeEnd=i),e):s(this)}}class g{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t){const e=this.animations.map(e=>e.attachTimeline(t));return()=>{e.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){Line truncated
//# sourceMappingURL=size-rollup-waapi-animate.js.map
@@ -0,0 +1,70 @@
"use client";
import { transform } from 'motion-dom';
import { useConstant } from '../utils/use-constant.mjs';
import { useCombineMotionValues } from './use-combine-values.mjs';
import { useComputed } from './use-computed.mjs';
function useTransform(input, inputRangeOrTransformer, outputRangeOrMap, options) {
if (typeof input === "function") {
return useComputed(input);
}
/**
* Detect if outputRangeOrMap is an output map (object with keys)
* rather than an output range (array).
*/
const isOutputMap = outputRangeOrMap !== undefined &&
!Array.isArray(outputRangeOrMap) &&
typeof inputRangeOrTransformer !== "function";
if (isOutputMap) {
return useMapTransform(input, inputRangeOrTransformer, outputRangeOrMap, options);
}
const outputRange = outputRangeOrMap;
const transformer = typeof inputRangeOrTransformer === "function"
? inputRangeOrTransformer
: transform(inputRangeOrTransformer, outputRange, options);
const result = Array.isArray(input)
? useListTransform(input, transformer)
: useListTransform([input], ([latest]) => transformer(latest));
const inputAccelerate = !Array.isArray(input)
? input.accelerate
: undefined;
if (inputAccelerate &&
!inputAccelerate.isTransformed &&
typeof inputRangeOrTransformer !== "function" &&
Array.isArray(outputRangeOrMap) &&
options?.clamp !== false) {
result.accelerate = {
...inputAccelerate,
times: inputRangeOrTransformer,
keyframes: outputRangeOrMap,
isTransformed: true,
...(options?.ease ? { ease: options.ease } : {}),
};
}
return result;
}
function useListTransform(values, transformer) {
const latest = useConstant(() => []);
return useCombineMotionValues(values, () => {
latest.length = 0;
const numValues = values.length;
for (let i = 0; i < numValues; i++) {
latest[i] = values[i].get();
}
return transformer(latest);
});
}
function useMapTransform(inputValue, inputRange, outputMap, options) {
/**
* Capture keys once to ensure hooks are called in consistent order.
*/
const keys = useConstant(() => Object.keys(outputMap));
const output = useConstant(() => ({}));
for (const key of keys) {
output[key] = useTransform(inputValue, inputRange, outputMap[key], options);
}
return output;
}
export { useTransform };
//# sourceMappingURL=use-transform.mjs.map
@@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _tdzError;
function _tdzError(name) {
throw new ReferenceError(name + " is not defined - temporal dead zone");
}
//# sourceMappingURL=tdz.js.map
@@ -0,0 +1,96 @@
import { DecodingMode } from "./decode.js";
/** The level of entities to support. */
export declare enum EntityLevel {
/** Support only XML entities. */
XML = 0,
/** Support HTML entities, which are a superset of XML entities. */
HTML = 1
}
export declare enum EncodingMode {
/**
* The output is UTF-8 encoded. Only characters that need escaping within
* XML will be escaped.
*/
UTF8 = 0,
/**
* The output consists only of ASCII characters. Characters that need
* escaping within HTML, and characters that aren't ASCII characters will
* be escaped.
*/
ASCII = 1,
/**
* Encode all characters that have an equivalent entity, as well as all
* characters that are not ASCII characters.
*/
Extensive = 2,
/**
* Encode all characters that have to be escaped in HTML attributes,
* following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.
*/
Attribute = 3,
/**
* Encode all characters that have to be escaped in HTML text,
* following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.
*/
Text = 4
}
export interface DecodingOptions {
/**
* The level of entities to support.
* @default {@link EntityLevel.XML}
*/
level?: EntityLevel;
/**
* Decoding mode. If `Legacy`, will support legacy entities not terminated
* with a semicolon (`;`).
*
* Always `Strict` for XML. For HTML, set this to `true` if you are parsing
* an attribute value.
*
* The deprecated `decodeStrict` function defaults this to `Strict`.
*
* @default {@link DecodingMode.Legacy}
*/
mode?: DecodingMode | undefined;
}
/**
* Decodes a string with entities.
*
* @param input String to decode.
* @param options Decoding options.
*/
export declare function decode(input: string, options?: DecodingOptions | EntityLevel): string;
/**
* Decodes a string with entities. Does not allow missing trailing semicolons for entities.
*
* @param input String to decode.
* @param options Decoding options.
* @deprecated Use `decode` with the `mode` set to `Strict`.
*/
export declare function decodeStrict(input: string, options?: DecodingOptions | EntityLevel): string;
/**
* Options for `encode`.
*/
export interface EncodingOptions {
/**
* The level of entities to support.
* @default {@link EntityLevel.XML}
*/
level?: EntityLevel;
/**
* Output format.
* @default {@link EncodingMode.Extensive}
*/
mode?: EncodingMode;
}
/**
* Encodes a string with entities.
*
* @param input String to encode.
* @param options Encoding options.
*/
export declare function encode(input: string, options?: EncodingOptions | EntityLevel): string;
export { encodeXML, escape, escapeUTF8, escapeAttribute, escapeText, } from "./escape.js";
export { encodeHTML, encodeNonAsciiHTML, encodeHTML as encodeHTML4, encodeHTML as encodeHTML5, } from "./encode.js";
export { EntityDecoder, DecodingMode, decodeXML, decodeHTML, decodeHTMLStrict, decodeHTMLAttribute, decodeHTML as decodeHTML4, decodeHTML as decodeHTML5, decodeHTMLStrict as decodeHTML4Strict, decodeHTMLStrict as decodeHTML5Strict, decodeXML as decodeXMLStrict, } from "./decode.js";
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"2":"_J"},C:{"2":"_S"},D:{"2":"_xR","132":"_H SC _kC","258":"_mH _hC _8K"},E:{"1":"G _BN _mK _FD","2":"_LI","2052":"_JL"},F:{"2":"_c"},G:{"1":"_QT _nK _FD","2":"_3F","1026":"_YG"},H:{"2":"1D"},I:{"2":"_P"},J:{"2":"_B"},K:{"2":"_N"},L:{"516":"I"},M:{"2":"YC"},N:{"2":"_A"},O:{"2":"bC"},P:{"1":"_hB","2":"J","16":"8D"},Q:{"2":"JE"},R:{"2":"KE"},S:{"2":"_C"}},B:1,C:"theme-color Meta Tag",D:true};
@@ -0,0 +1,133 @@
export var util;
(function (util) {
util.assertEqual = (_) => { };
function assertIs(_arg) { }
util.assertIs = assertIs;
function assertNever(_x) {
throw new Error();
}
util.assertNever = assertNever;
util.arrayToEnum = (items) => {
const obj = {};
for (const item of items) {
obj[item] = item;
}
return obj;
};
util.getValidEnumValues = (obj) => {
const validKeys = util.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== "number");
const filtered = {};
for (const k of validKeys) {
filtered[k] = obj[k];
}
return util.objectValues(filtered);
};
util.objectValues = (obj) => {
return util.objectKeys(obj).map(function (e) {
return obj[e];
});
};
util.objectKeys = typeof Object.keys === "function" // eslint-disable-line ban/ban
? (obj) => Object.keys(obj) // eslint-disable-line ban/ban
: (object) => {
const keys = [];
for (const key in object) {
if (Object.prototype.hasOwnProperty.call(object, key)) {
keys.push(key);
}
}
return keys;
};
util.find = (arr, checker) => {
for (const item of arr) {
if (checker(item))
return item;
}
return undefined;
};
util.isInteger = typeof Number.isInteger === "function"
? (val) => Number.isInteger(val) // eslint-disable-line ban/ban
: (val) => typeof val === "number" && Number.isFinite(val) && Math.floor(val) === val;
function joinValues(array, separator = " | ") {
return array.map((val) => (typeof val === "string" ? `'${val}'` : val)).join(separator);
}
util.joinValues = joinValues;
util.jsonStringifyReplacer = (_, value) => {
if (typeof value === "bigint") {
return value.toString();
}
return value;
};
})(util || (util = {}));
export var objectUtil;
(function (objectUtil) {
objectUtil.mergeShapes = (first, second) => {
return {
...first,
...second, // second overwrites first
};
};
})(objectUtil || (objectUtil = {}));
export const ZodParsedType = util.arrayToEnum([
"string",
"nan",
"number",
"integer",
"float",
"boolean",
"date",
"bigint",
"symbol",
"function",
"undefined",
"null",
"array",
"object",
"unknown",
"promise",
"void",
"never",
"map",
"set",
]);
export const getParsedType = (data) => {
const t = typeof data;
switch (t) {
case "undefined":
return ZodParsedType.undefined;
case "string":
return ZodParsedType.string;
case "number":
return Number.isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;
case "boolean":
return ZodParsedType.boolean;
case "function":
return ZodParsedType.function;
case "bigint":
return ZodParsedType.bigint;
case "symbol":
return ZodParsedType.symbol;
case "object":
if (Array.isArray(data)) {
return ZodParsedType.array;
}
if (data === null) {
return ZodParsedType.null;
}
if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") {
return ZodParsedType.promise;
}
if (typeof Map !== "undefined" && data instanceof Map) {
return ZodParsedType.map;
}
if (typeof Set !== "undefined" && data instanceof Set) {
return ZodParsedType.set;
}
if (typeof Date !== "undefined" && data instanceof Date) {
return ZodParsedType.date;
}
return ZodParsedType.object;
default:
return ZodParsedType.unknown;
}
};
@@ -0,0 +1,32 @@
import { Parser } from "./Parser.js";
/*
* NOTE: If either of these two imports produces a type error,
* please update your @types/node dependency!
*/
import { Writable } from "node:stream";
import { StringDecoder } from "node:string_decoder";
// Following the example in https://nodejs.org/api/stream.html#stream_decoding_buffers_in_a_writable_stream
function isBuffer(_chunk, encoding) {
return encoding === "buffer";
}
/**
* WritableStream makes the `Parser` interface available as a NodeJS stream.
*
* @see Parser
*/
export class WritableStream extends Writable {
constructor(cbs, options) {
super({ decodeStrings: false });
this._decoder = new StringDecoder();
this._parser = new Parser(cbs, options);
}
_write(chunk, encoding, callback) {
this._parser.write(isBuffer(chunk, encoding) ? this._decoder.write(chunk) : chunk);
callback();
}
_final(callback) {
this._parser.end(this._decoder.end());
callback();
}
}
//# sourceMappingURL=WritableStream.js.map
@@ -0,0 +1,21 @@
let cookie_es = require("cookie-es");
//#region src/ssr/headers.ts
function toHeadersInstance(init) {
if (init instanceof Headers) return init;
else if (Array.isArray(init)) return new Headers(init);
else if (typeof init === "object") return new Headers(init);
else return null;
}
function mergeHeaders(...headers) {
return headers.reduce((acc, header) => {
const headersInstance = toHeadersInstance(header);
if (!headersInstance) return acc;
for (const [key, value] of headersInstance.entries()) if (key === "set-cookie") (0, cookie_es.splitSetCookieString)(value).forEach((cookie) => acc.append("set-cookie", cookie));
else acc.set(key, value);
return acc;
}, new Headers());
}
//#endregion
exports.mergeHeaders = mergeHeaders;
//# sourceMappingURL=headers.cjs.map
@@ -0,0 +1,20 @@
/**
* Checks if a given date is in a leap year.
* 检查给定的日期是否在闰年。
*
* @param date - The date to check. (要检查的日期。)
* @returns A boolean indicating whether the given date is in a leap year. (布尔值,表示给定的日期是否在闰年。)
* @example
* ```ts
* // Checking if a date is in a leap year (检查一个日期是否在闰年)
* const date1 = new Date('2024-01-01');
* const isLeap = isLeapYear(date1);
* console.log(isLeap); // Outputs: true (输出: true)
*
* // Checking if a date is not in a leap year (检查一个日期是否不在闰年)
* const date2 = new Date('2023-01-01');
* const isNotLeap = isLeapYear(date2);
* console.log(isNotLeap); // Outputs: false (输出: false)
* ```
*/
export default function isLeapYear(date: Date): boolean;
@@ -0,0 +1,9 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
//#region src/scroll-restoration-script/client.ts
function getScrollRestorationScriptForRouter(_router) {
return null;
}
//#endregion
exports.getScrollRestorationScriptForRouter = getScrollRestorationScriptForRouter;
//# sourceMappingURL=client.cjs.map
@@ -0,0 +1,43 @@
export type AssetCrossOrigin = 'anonymous' | 'use-credentials';
export type AssetCrossOriginConfig = AssetCrossOrigin | Partial<Record<'modulepreload' | 'stylesheet', AssetCrossOrigin>>;
export type ManifestAssetLink = string | {
href: string;
crossOrigin?: AssetCrossOrigin;
};
export declare function getAssetCrossOrigin(assetCrossOrigin: AssetCrossOriginConfig | undefined, kind: 'modulepreload' | 'stylesheet'): AssetCrossOrigin | undefined;
export declare function resolveManifestAssetLink(link: ManifestAssetLink): {
href: string;
crossOrigin?: AssetCrossOrigin;
};
export type Manifest = {
inlineCss?: {
styles: Record<string, string>;
};
routes: Record<string, {
filePath?: string;
preloads?: Array<ManifestAssetLink>;
assets?: Array<RouterManagedTag>;
}>;
};
export type RouterManagedTag = {
tag: 'title';
attrs?: Record<string, any>;
children: string;
} | {
tag: 'meta' | 'link';
attrs?: Record<string, any>;
children?: never;
} | {
tag: 'script';
attrs?: Record<string, any>;
children?: string;
} | {
tag: 'style';
attrs?: Record<string, any>;
children?: string;
inlineCss?: true;
};
export declare function getStylesheetHref(asset: RouterManagedTag): string | undefined;
export declare function isInlinableStylesheet(manifest: Manifest | undefined, asset: RouterManagedTag): boolean;
export declare function createInlineCssStyleAsset(css: string): RouterManagedTag;
export declare function createInlineCssPlaceholderAsset(): RouterManagedTag;
@@ -0,0 +1,291 @@
import type { Parser as ParserType } from './Parser';
import type * as ParserOptionsTypes from './ParserOptions';
import type { Processor as ProcessorType } from './Processor';
import type { LooseRuleDefinition, SharedConfigurationSettings } from './Rule';
/** @internal */
export declare namespace SharedConfig {
type Severity = 0 | 1 | 2;
type SeverityString = 'error' | 'off' | 'warn';
type RuleLevel = Severity | SeverityString;
type RuleLevelAndOptions = [RuleLevel, ...unknown[]];
type RuleEntry = RuleLevel | RuleLevelAndOptions;
type RulesRecord = Partial<Record<string, RuleEntry>>;
type GlobalVariableOptionBase = 'off' | /** @deprecated use `'readonly'` */ 'readable' | 'readonly' | 'writable' | /** @deprecated use `'writable'` */ 'writeable';
type GlobalVariableOptionBoolean = /** @deprecated use `'readonly'` */ false | /** @deprecated use `'writable'` */ true;
type GlobalVariableOption = GlobalVariableOptionBase | GlobalVariableOptionBoolean;
interface GlobalsConfig {
[name: string]: GlobalVariableOption;
}
interface EnvironmentConfig {
[name: string]: boolean;
}
type ParserOptions = ParserOptionsTypes.ParserOptions;
interface PluginMeta {
/**
* The meta.name property should match the npm package name for your plugin.
*/
name: string;
/**
* If you followed the classic style to name your package
* (e.g. `eslint-plugin-X`, `@X/eslint-plugin`, or `@X/eslint-plugin-Y`),
* then this should match the classic namespace inferred for your package
* (e.g. `X`, `@X`, or `@X/Y`, respectively).
*/
namespace?: string;
/**
* The meta.version property should match the npm package version for your plugin.
*/
version: string;
}
}
export declare namespace ClassicConfig {
export type EnvironmentConfig = SharedConfig.EnvironmentConfig;
export type GlobalsConfig = SharedConfig.GlobalsConfig;
export type GlobalVariableOption = SharedConfig.GlobalVariableOption;
export type GlobalVariableOptionBase = SharedConfig.GlobalVariableOptionBase;
export type ParserOptions = SharedConfig.ParserOptions;
export type RuleEntry = SharedConfig.RuleEntry;
export type RuleLevel = SharedConfig.RuleLevel;
export type RuleLevelAndOptions = SharedConfig.RuleLevelAndOptions;
export type RulesRecord = SharedConfig.RulesRecord;
export type Severity = SharedConfig.Severity;
export type SeverityString = SharedConfig.SeverityString;
interface BaseConfig {
$schema?: string;
/**
* The environment settings.
*/
env?: EnvironmentConfig;
/**
* The path to other config files or the package name of shareable configs.
*/
extends?: string | string[];
/**
* The global variable settings.
*/
globals?: GlobalsConfig;
/**
* The flag that disables comment directives.
*/
noInlineConfig?: boolean;
/**
* The override settings per kind of files.
*/
overrides?: ConfigOverride[];
/**
* The path to a parser or the package name of a parser.
*/
parser?: string | null;
/**
* The parser options.
*/
parserOptions?: ParserOptions;
/**
* The plugin specifiers.
*/
plugins?: string[];
/**
* The processor specifier.
*/
processor?: string;
/**
* The flag to report unused `eslint-disable` comments.
*/
reportUnusedDisableDirectives?: boolean;
/**
* The rule settings.
*/
rules?: RulesRecord;
/**
* The shared settings.
*/
settings?: SharedConfigurationSettings;
}
export interface ConfigOverride extends BaseConfig {
excludedFiles?: string | string[];
files: string | string[];
}
export interface Config extends BaseConfig {
/**
* The glob patterns that ignore to lint.
*/
ignorePatterns?: string | string[];
/**
* The root flag.
*/
root?: boolean;
}
export {};
}
export declare namespace FlatConfig {
type EcmaVersion = ParserOptionsTypes.EcmaVersion;
type GlobalsConfig = SharedConfig.GlobalsConfig;
type Parser = ParserType.LooseParserModule;
type ParserOptions = SharedConfig.ParserOptions;
type PluginMeta = SharedConfig.PluginMeta;
type Processor = ProcessorType.LooseProcessorModule;
type RuleEntry = SharedConfig.RuleEntry;
type RuleLevel = SharedConfig.RuleLevel;
type RuleLevelAndOptions = SharedConfig.RuleLevelAndOptions;
type Rules = SharedConfig.RulesRecord;
type Settings = SharedConfigurationSettings;
type Severity = SharedConfig.Severity;
type SeverityString = SharedConfig.SeverityString;
type SourceType = 'commonjs' | ParserOptionsTypes.SourceType;
interface SharedConfigs {
[key: string]: Config | ConfigArray;
}
interface Plugin {
/**
* Shared configurations bundled with the plugin.
* Users will reference these directly in their config (i.e. `plugin.configs.recommended`).
*/
configs?: SharedConfigs;
/**
* Metadata about your plugin for easier debugging and more effective caching of plugins.
*/
meta?: {
[K in keyof PluginMeta]?: PluginMeta[K] | undefined;
};
/**
* The definition of plugin processors.
* Users can stringly reference the processor using the key in their config (i.e., `"pluginName/processorName"`).
*/
processors?: Partial<Record<string, Processor>> | undefined;
/**
* The definition of plugin rules.
* The key must be the name of the rule that users will use
* Users can stringly reference the rule using the key they registered the plugin under combined with the rule name.
* i.e. for the user config `plugins: { foo: pluginReference }` - the reference would be `"foo/ruleName"`.
*/
rules?: Record<string, LooseRuleDefinition> | undefined;
}
interface Plugins {
/**
* We intentionally omit the `configs` key from this object because it avoids
* type conflicts with old plugins that haven't updated their configs to flat configs yet.
* It's valid to reference these old plugins because ESLint won't access the
* `.config` property of a plugin when evaluating a flat config.
*/
[pluginAlias: string]: Omit<Plugin, 'configs'>;
}
interface LinterOptions {
/**
* A Boolean value indicating if inline configuration is allowed.
*/
noInlineConfig?: boolean;
/**
* A severity string indicating if and how unused disable and enable
* directives should be tracked and reported. For legacy compatibility, `true`
* is equivalent to `"warn"` and `false` is equivalent to `"off"`.
* @default "warn"
*/
reportUnusedDisableDirectives?: boolean | SharedConfig.Severity | SharedConfig.SeverityString;
/**
* A severity string indicating if and how unused inline directives
* should be tracked and reported.
*
* since ESLint 9.19.0
* @default "off"
*/
reportUnusedInlineConfigs?: SharedConfig.Severity | SharedConfig.SeverityString;
}
interface LanguageOptions {
/**
* The version of ECMAScript to support.
* May be any year (i.e., `2022`) or version (i.e., `5`).
* Set to `"latest"` for the most recent supported version.
* @default "latest"
*/
ecmaVersion?: EcmaVersion | undefined;
/**
* An object specifying additional objects that should be added to the global scope during linting.
*/
globals?: GlobalsConfig | undefined;
/**
* An object containing a `parse()` method or a `parseForESLint()` method.
* @default
* ```
* // https://github.com/eslint/espree
* require('espree')
* ```
*/
parser?: Parser | undefined;
/**
* An object specifying additional options that are passed directly to the parser.
* The available options are parser-dependent.
*/
parserOptions?: ParserOptions | undefined;
/**
* The type of JavaScript source code.
* Possible values are `"script"` for traditional script files, `"module"` for ECMAScript modules (ESM), and `"commonjs"` for CommonJS files.
* @default
* ```
* // for `.js` and `.mjs` files
* "module"
* // for `.cjs` files
* "commonjs"
* ```
*/
sourceType?: SourceType | undefined;
}
interface Config {
/**
* The base path for files and ignores.
*
* Note that this is not permitted inside an `extends` array.
*
* Since ESLint 9.30.0
*/
basePath?: string;
/**
* An array of glob patterns indicating the files that the configuration object should apply to.
* If not specified, the configuration object applies to all files matched by any other configuration object.
*/
files?: (string | string[])[];
/**
* An array of glob patterns indicating the files that the configuration object should not apply to.
* If not specified, the configuration object applies to all files matched by files.
*/
ignores?: string[];
/**
* Language specifier in the form `namespace/language-name` where `namespace` is a plugin name set in the `plugins` field.
*/
language?: string;
/**
* An object containing settings related to how JavaScript is configured for linting.
*/
languageOptions?: LanguageOptions;
/**
* An object containing settings related to the linting process.
*/
linterOptions?: LinterOptions;
/**
* An string to identify the configuration object. Used in error messages and inspection tools.
*/
name?: string;
/**
* An object containing a name-value mapping of plugin names to plugin objects.
* When `files` is specified, these plugins are only available to the matching files.
*/
plugins?: Plugins;
/**
* Either an object containing `preprocess()` and `postprocess()` methods or
* a string indicating the name of a processor inside of a plugin
* (i.e., `"pluginName/processorName"`).
*/
processor?: string | Processor;
/**
* An object containing the configured rules.
* When `files` or `ignores` are specified, these rule configurations are only available to the matching files.
*/
rules?: Rules;
/**
* An object containing name-value pairs of information that should be available to all rules.
*/
settings?: Settings;
}
type ConfigArray = Config[];
type ConfigPromise = Promise<ConfigArray>;
type ConfigFile = ConfigArray | ConfigPromise;
}
@@ -0,0 +1,3 @@
# `react-focus-guards`
This is an internal utility, not intended for public usage.
@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
function isWhat(value, type, comparingType) {
return type === comparingType;
}
exports.isWhat = isWhat;
@@ -0,0 +1,31 @@
import { escapeToBuffer, raw, stringBufferToString } from "../utils/html.js";
import { html } from "../helper/html/index.js";
import { isValidAttributeName, styleObjectForEach } from "./utils.js";
import { Fragment } from "./base.js";
import { jsxDEV } from "./jsx-dev-runtime.js";
//#region src/jsx/jsx-runtime.ts
const jsxAttr = (key, v) => {
if (!isValidAttributeName(key)) return raw("");
const buffer = [`${key}="`];
if (key === "style" && typeof v === "object") {
let styleStr = "";
styleObjectForEach(v, (property, value) => {
if (value != null) styleStr += `${styleStr ? ";" : ""}${property}:${value}`;
});
escapeToBuffer(styleStr, buffer);
buffer[0] += "\"";
} else if (typeof v === "string") {
escapeToBuffer(v, buffer);
buffer[0] += "\"";
} else if (v === null || v === void 0) return raw("");
else if (typeof v === "number" || v.isEscaped) buffer[0] += `${v}"`;
else if (v instanceof Promise) buffer.unshift("\"", v);
else {
escapeToBuffer(v.toString(), buffer);
buffer[0] += "\"";
}
return buffer.length === 1 ? raw(buffer[0]) : stringBufferToString(buffer, void 0);
};
const jsxEscape = (value) => value;
//#endregion
export { Fragment, jsxDEV as jsx, jsxAttr, jsxEscape, html as jsxTemplate, jsxDEV as jsxs };
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_z","130":"B"},B:{"1":"_3H","16":"_KB","260":"_rH","1028":"_wH","5124":"_IE"},C:{"1":"_H _RQ _bH _p","2":"_zC _5E _L","5124":"k l","7172":"_IJ _LD _dH","7746":"_PG _vD"},D:{"1":"_2H","2":"_KO","260":"_nC _RF","1028":"_GD _eC _tD"},E:{"2":"_TB","1028":"_wF","3076":"_oD _NE"},F:{"1":"_aJ","2":"_gO","260":"_mH _zD","1028":"_nH _oG _TG"},G:{"2":"_OB","16":"kD","1028":"_9"},H:{"2":"1D"},I:{"1":"I","2":"_G"},J:{"2":"_B"},K:{"1":"H","2":"_D"},L:{"1":"I"},M:{"1":"YC"},N:{"2":"_A"},O:{"1":"bC"},P:{"1":"_rF","2":"_3B","1028":"_vS _8Q"},Q:{"1028":"JE"},R:{"1":"KE"},S:{"2":"_C"}},B:1,C:"Streams",D:true};
@@ -0,0 +1 @@
{"version":3,"file":"monitor-play.js","sources":["../../../src/icons/monitor-play.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name MonitorPlay\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTAgNy43NWEuNzUuNzUgMCAwIDEgMS4xNDItLjYzOGwzLjY2NCAyLjI0OWEuNzUuNzUgMCAwIDEgMCAxLjI3OGwtMy42NjQgMi4yNWEuNzUuNzUgMCAwIDEtMS4xNDItLjY0eiIgLz4KICA8cGF0aCBkPSJNMTIgMTd2NCIgLz4KICA8cGF0aCBkPSJNOCAyMWg4IiAvPgogIDxyZWN0IHg9IjIiIHk9IjMiIHdpZHRoPSIyMCIgaGVpZ2h0PSIxNCIgcng9IjIiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/monitor-play\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 MonitorPlay = createLucideIcon('MonitorPlay', [\n [\n 'path',\n {\n d: 'M10 7.75a.75.75 0 0 1 1.142-.638l3.664 2.249a.75.75 0 0 1 0 1.278l-3.664 2.25a.75.75 0 0 1-1.142-.64z',\n key: '1pctta',\n },\n ],\n ['path', { d: 'M12 17v4', key: '1riwvh' }],\n ['path', { d: 'M8 21h8', key: '1ev6f3' }],\n ['rect', { x: '2', y: '3', width: '20', height: '14', rx: '2', key: 'x3v2xh' }],\n]);\n\nexport default MonitorPlay;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,iBAAiB,aAAe,CAAA,CAAA,CAAA;AAAA,CAClD,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;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;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,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAG,KAAK,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,QAAQ,CAAM,CAAA,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,23 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABILITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/// <reference lib="es2024" />
/// <reference lib="es2025.collection" />
/// <reference lib="es2025.float16" />
/// <reference lib="es2025.intl" />
/// <reference lib="es2025.iterator" />
/// <reference lib="es2025.promise" />
/// <reference lib="es2025.regexp" />
@@ -0,0 +1,997 @@
/*!
* send
* Copyright(c) 2012 TJ Holowaychuk
* Copyright(c) 2014-2022 Douglas Christopher Wilson
* MIT Licensed
*/
'use strict'
/**
* Module dependencies.
* @private
*/
var createError = require('http-errors')
var debug = require('debug')('send')
var encodeUrl = require('encodeurl')
var escapeHtml = require('escape-html')
var etag = require('etag')
var fresh = require('fresh')
var fs = require('fs')
var mime = require('mime-types')
var ms = require('ms')
var onFinished = require('on-finished')
var parseRange = require('range-parser')
var path = require('path')
var statuses = require('statuses')
var Stream = require('stream')
var util = require('util')
/**
* Path function references.
* @private
*/
var extname = path.extname
var join = path.join
var normalize = path.normalize
var resolve = path.resolve
var sep = path.sep
/**
* Regular expression for identifying a bytes Range header.
* @private
*/
var BYTES_RANGE_REGEXP = /^ *bytes=/
/**
* Maximum value allowed for the max age.
* @private
*/
var MAX_MAXAGE = 60 * 60 * 24 * 365 * 1000 // 1 year
/**
* Regular expression to match a path with a directory up component.
* @private
*/
var UP_PATH_REGEXP = /(?:^|[\\/])\.\.(?:[\\/]|$)/
/**
* Module exports.
* @public
*/
module.exports = send
/**
* Return a `SendStream` for `req` and `path`.
*
* @param {object} req
* @param {string} path
* @param {object} [options]
* @return {SendStream}
* @public
*/
function send (req, path, options) {
return new SendStream(req, path, options)
}
/**
* Initialize a `SendStream` with the given `path`.
*
* @param {Request} req
* @param {String} path
* @param {object} [options]
* @private
*/
function SendStream (req, path, options) {
Stream.call(this)
var opts = options || {}
this.options = opts
this.path = path
this.req = req
this._acceptRanges = opts.acceptRanges !== undefined
? Boolean(opts.acceptRanges)
: true
this._cacheControl = opts.cacheControl !== undefined
? Boolean(opts.cacheControl)
: true
this._etag = opts.etag !== undefined
? Boolean(opts.etag)
: true
this._dotfiles = opts.dotfiles !== undefined
? opts.dotfiles
: 'ignore'
if (this._dotfiles !== 'ignore' && this._dotfiles !== 'allow' && this._dotfiles !== 'deny') {
throw new TypeError('dotfiles option must be "allow", "deny", or "ignore"')
}
this._extensions = opts.extensions !== undefined
? normalizeList(opts.extensions, 'extensions option')
: []
this._immutable = opts.immutable !== undefined
? Boolean(opts.immutable)
: false
this._index = opts.index !== undefined
? normalizeList(opts.index, 'index option')
: ['index.html']
this._lastModified = opts.lastModified !== undefined
? Boolean(opts.lastModified)
: true
this._maxage = opts.maxAge || opts.maxage
this._maxage = typeof this._maxage === 'string'
? ms(this._maxage)
: Number(this._maxage)
this._maxage = !isNaN(this._maxage)
? Math.min(Math.max(0, this._maxage), MAX_MAXAGE)
: 0
this._root = opts.root
? resolve(opts.root)
: null
}
/**
* Inherits from `Stream`.
*/
util.inherits(SendStream, Stream)
/**
* Emit error with `status`.
*
* @param {number} status
* @param {Error} [err]
* @private
*/
SendStream.prototype.error = function error (status, err) {
// emit if listeners instead of responding
if (hasListeners(this, 'error')) {
return this.emit('error', createHttpError(status, err))
}
var res = this.res
var msg = statuses.message[status] || String(status)
var doc = createHtmlDocument('Error', escapeHtml(msg))
// clear existing headers
clearHeaders(res)
// add error headers
if (err && err.headers) {
setHeaders(res, err.headers)
}
// send basic response
res.statusCode = status
res.setHeader('Content-Type', 'text/html; charset=UTF-8')
res.setHeader('Content-Length', Buffer.byteLength(doc))
res.setHeader('Content-Security-Policy', "default-src 'none'")
res.setHeader('X-Content-Type-Options', 'nosniff')
res.end(doc)
}
/**
* Check if the pathname ends with "/".
*
* @return {boolean}
* @private
*/
SendStream.prototype.hasTrailingSlash = function hasTrailingSlash () {
return this.path[this.path.length - 1] === '/'
}
/**
* Check if this is a conditional GET request.
*
* @return {Boolean}
* @api private
*/
SendStream.prototype.isConditionalGET = function isConditionalGET () {
return this.req.headers['if-match'] ||
this.req.headers['if-unmodified-since'] ||
this.req.headers['if-none-match'] ||
this.req.headers['if-modified-since']
}
/**
* Check if the request preconditions failed.
*
* @return {boolean}
* @private
*/
SendStream.prototype.isPreconditionFailure = function isPreconditionFailure () {
var req = this.req
var res = this.res
// if-match
var match = req.headers['if-match']
if (match) {
var etag = res.getHeader('ETag')
return !etag || (match !== '*' && parseTokenList(match).every(function (match) {
return match !== etag && match !== 'W/' + etag && 'W/' + match !== etag
}))
}
// if-unmodified-since
var unmodifiedSince = parseHttpDate(req.headers['if-unmodified-since'])
if (!isNaN(unmodifiedSince)) {
var lastModified = parseHttpDate(res.getHeader('Last-Modified'))
return isNaN(lastModified) || lastModified > unmodifiedSince
}
return false
}
/**
* Strip various content header fields for a change in entity.
*
* @private
*/
SendStream.prototype.removeContentHeaderFields = function removeContentHeaderFields () {
var res = this.res
res.removeHeader('Content-Encoding')
res.removeHeader('Content-Language')
res.removeHeader('Content-Length')
res.removeHeader('Content-Range')
res.removeHeader('Content-Type')
}
/**
* Respond with 304 not modified.
*
* @api private
*/
SendStream.prototype.notModified = function notModified () {
var res = this.res
debug('not modified')
this.removeContentHeaderFields()
res.statusCode = 304
res.end()
}
/**
* Raise error that headers already sent.
*
* @api private
*/
SendStream.prototype.headersAlreadySent = function headersAlreadySent () {
var err = new Error('Can\'t set headers after they are sent.')
debug('headers already sent')
this.error(500, err)
}
/**
* Check if the request is cacheable, aka
* responded with 2xx or 304 (see RFC 2616 section 14.2{5,6}).
*
* @return {Boolean}
* @api private
*/
SendStream.prototype.isCachable = function isCachable () {
var statusCode = this.res.statusCode
return (statusCode >= 200 && statusCode < 300) ||
statusCode === 304
}
/**
* Handle stat() error.
*
* @param {Error} error
* @private
*/
SendStream.prototype.onStatError = function onStatError (error) {
switch (error.code) {
case 'ENAMETOOLONG':
case 'ENOENT':
case 'ENOTDIR':
this.error(404, error)
break
default:
this.error(500, error)
break
}
}
/**
* Check if the cache is fresh.
*
* @return {Boolean}
* @api private
*/
SendStream.prototype.isFresh = function isFresh () {
return fresh(this.req.headers, {
etag: this.res.getHeader('ETag'),
'last-modified': this.res.getHeader('Last-Modified')
})
}
/**
* Check if the range is fresh.
*
* @return {Boolean}
* @api private
*/
SendStream.prototype.isRangeFresh = function isRangeFresh () {
var ifRange = this.req.headers['if-range']
if (!ifRange) {
return true
}
// if-range as etag
if (ifRange.indexOf('"') !== -1) {
var etag = this.res.getHeader('ETag')
return Boolean(etag && ifRange.indexOf(etag) !== -1)
}
// if-range as modified date
var lastModified = this.res.getHeader('Last-Modified')
return parseHttpDate(lastModified) <= parseHttpDate(ifRange)
}
/**
* Redirect to path.
*
* @param {string} path
* @private
*/
SendStream.prototype.redirect = function redirect (path) {
var res = this.res
if (hasListeners(this, 'directory')) {
this.emit('directory', res, path)
return
}
if (this.hasTrailingSlash()) {
this.error(403)
return
}
var loc = encodeUrl(collapseLeadingSlashes(this.path + '/'))
var doc = createHtmlDocument('Redirecting', 'Redirecting to ' + escapeHtml(loc))
// redirect
res.statusCode = 301
res.setHeader('Content-Type', 'text/html; charset=UTF-8')
res.setHeader('Content-Length', Buffer.byteLength(doc))
res.setHeader('Content-Security-Policy', "default-src 'none'")
res.setHeader('X-Content-Type-Options', 'nosniff')
res.setHeader('Location', loc)
res.end(doc)
}
/**
* Pipe to `res.
*
* @param {Stream} res
* @return {Stream} res
* @api public
*/
SendStream.prototype.pipe = function pipe (res) {
// root path
var root = this._root
// references
this.res = res
// decode the path
var path = decode(this.path)
if (path === -1) {
this.error(400)
return res
}
// null byte(s)
if (~path.indexOf('\0')) {
this.error(400)
return res
}
var parts
if (root !== null) {
// normalize
if (path) {
path = normalize('.' + sep + path)
}
// malicious path
if (UP_PATH_REGEXP.test(path)) {
debug('malicious path "%s"', path)
this.error(403)
return res
}
// explode path parts
parts = path.split(sep)
// join / normalize from optional root dir
path = normalize(join(root, path))
} else {
// ".." is malicious without "root"
if (UP_PATH_REGEXP.test(path)) {
debug('malicious path "%s"', path)
this.error(403)
return res
}
// explode path parts
parts = normalize(path).split(sep)
// resolve the path
path = resolve(path)
}
// dotfile handling
if (containsDotFile(parts)) {
debug('%s dotfile "%s"', this._dotfiles, path)
switch (this._dotfiles) {
case 'allow':
break
case 'deny':
this.error(403)
return res
case 'ignore':
default:
this.error(404)
return res
}
}
// index file support
if (this._index.length && this.hasTrailingSlash()) {
this.sendIndex(path)
return res
}
this.sendFile(path)
return res
}
/**
* Transfer `path`.
*
* @param {String} path
* @api public
*/
SendStream.prototype.send = function send (path, stat) {
var len = stat.size
var options = this.options
var opts = {}
var res = this.res
var req = this.req
var ranges = req.headers.range
var offset = options.start || 0
if (res.headersSent) {
// impossible to send now
this.headersAlreadySent()
return
}
debug('pipe "%s"', path)
// set header fields
this.setHeader(path, stat)
// set content-type
this.type(path)
// conditional GET support
if (this.isConditionalGET()) {
if (this.isPreconditionFailure()) {
this.error(412)
return
}
if (this.isCachable() && this.isFresh()) {
this.notModified()
return
}
}
// adjust len to start/end options
len = Math.max(0, len - offset)
if (options.end !== undefined) {
var bytes = options.end - offset + 1
if (len > bytes) len = bytes
}
// Range support
if (this._acceptRanges && BYTES_RANGE_REGEXP.test(ranges)) {
// parse
ranges = parseRange(len, ranges, {
combine: true
})
// If-Range support
if (!this.isRangeFresh()) {
debug('range stale')
ranges = -2
}
// unsatisfiable
if (ranges === -1) {
debug('range unsatisfiable')
// Content-Range
res.setHeader('Content-Range', contentRange('bytes', len))
// 416 Requested Range Not Satisfiable
return this.error(416, {
headers: { 'Content-Range': res.getHeader('Content-Range') }
})
}
// valid (syntactically invalid/multiple ranges are treated as a regular response)
if (ranges !== -2 && ranges.length === 1) {
debug('range %j', ranges)
// Content-Range
res.statusCode = 206
res.setHeader('Content-Range', contentRange('bytes', len, ranges[0]))
// adjust for requested range
offset += ranges[0].start
len = ranges[0].end - ranges[0].start + 1
}
}
// clone options
for (var prop in options) {
opts[prop] = options[prop]
}
// set read options
opts.start = offset
opts.end = Math.max(offset, offset + len - 1)
// content-length
res.setHeader('Content-Length', len)
// HEAD support
if (req.method === 'HEAD') {
res.end()
return
}
this.stream(path, opts)
}
/**
* Transfer file for `path`.
*
* @param {String} path
* @api private
*/
SendStream.prototype.sendFile = function sendFile (path) {
var i = 0
var self = this
debug('stat "%s"', path)
fs.stat(path, function onstat (err, stat) {
var pathEndsWithSep = path[path.length - 1] === sep
if (err && err.code === 'ENOENT' && !extname(path) && !pathEndsWithSep) {
// not found, check extensions
return next(err)
}
if (err) return self.onStatError(err)
if (stat.isDirectory()) return self.redirect(path)
if (pathEndsWithSep) return self.error(404)
self.emit('file', path, stat)
self.send(path, stat)
})
function next (err) {
if (self._extensions.length <= i) {
return err
? self.onStatError(err)
: self.error(404)
}
var p = path + '.' + self._extensions[i++]
debug('stat "%s"', p)
fs.stat(p, function (err, stat) {
if (err) return next(err)
if (stat.isDirectory()) return next()
self.emit('file', p, stat)
self.send(p, stat)
})
}
}
/**
* Transfer index for `path`.
*
* @param {String} path
* @api private
*/
SendStream.prototype.sendIndex = function sendIndex (path) {
var i = -1
var self = this
function next (err) {
if (++i >= self._index.length) {
if (err) return self.onStatError(err)
return self.error(404)
}
var p = join(path, self._index[i])
debug('stat "%s"', p)
fs.stat(p, function (err, stat) {
if (err) return next(err)
if (stat.isDirectory()) return next()
self.emit('file', p, stat)
self.send(p, stat)
})
}
next()
}
/**
* Stream `path` to the response.
*
* @param {String} path
* @param {Object} options
* @api private
*/
SendStream.prototype.stream = function stream (path, options) {
var self = this
var res = this.res
// pipe
var stream = fs.createReadStream(path, options)
this.emit('stream', stream)
stream.pipe(res)
// cleanup
function cleanup () {
stream.destroy()
}
// response finished, cleanup
onFinished(res, cleanup)
// error handling
stream.on('error', function onerror (err) {
// clean up stream early
cleanup()
// error
self.onStatError(err)
})
// end
stream.on('end', function onend () {
self.emit('end')
})
}
/**
* Set content-type based on `path`
* if it hasn't been explicitly set.
*
* @param {String} path
* @api private
*/
SendStream.prototype.type = function type (path) {
var res = this.res
if (res.getHeader('Content-Type')) return
var ext = extname(path)
var type = mime.contentType(ext) || 'application/octet-stream'
debug('content-type %s', type)
res.setHeader('Content-Type', type)
}
/**
* Set response header fields, most
* fields may be pre-defined.
*
* @param {String} path
* @param {Object} stat
* @api private
*/
SendStream.prototype.setHeader = function setHeader (path, stat) {
var res = this.res
this.emit('headers', res, path, stat)
if (this._acceptRanges && !res.getHeader('Accept-Ranges')) {
debug('accept ranges')
res.setHeader('Accept-Ranges', 'bytes')
}
if (this._cacheControl && !res.getHeader('Cache-Control')) {
var cacheControl = 'public, max-age=' + Math.floor(this._maxage / 1000)
if (this._immutable) {
cacheControl += ', immutable'
}
debug('cache-control %s', cacheControl)
res.setHeader('Cache-Control', cacheControl)
}
if (this._lastModified && !res.getHeader('Last-Modified')) {
var modified = stat.mtime.toUTCString()
debug('modified %s', modified)
res.setHeader('Last-Modified', modified)
}
if (this._etag && !res.getHeader('ETag')) {
var val = etag(stat)
debug('etag %s', val)
res.setHeader('ETag', val)
}
}
/**
* Clear all headers from a response.
*
* @param {object} res
* @private
*/
function clearHeaders (res) {
for (const header of res.getHeaderNames()) {
res.removeHeader(header)
}
}
/**
* Collapse all leading slashes into a single slash
*
* @param {string} str
* @private
*/
function collapseLeadingSlashes (str) {
for (var i = 0; i < str.length; i++) {
if (str[i] !== '/') {
break
}
}
return i > 1
? '/' + str.substr(i)
: str
}
/**
* Determine if path parts contain a dotfile.
*
* @api private
*/
function containsDotFile (parts) {
for (var i = 0; i < parts.length; i++) {
var part = parts[i]
if (part.length > 1 && part[0] === '.') {
return true
}
}
return false
}
/**
* Create a Content-Range header.
*
* @param {string} type
* @param {number} size
* @param {array} [range]
*/
function contentRange (type, size, range) {
return type + ' ' + (range ? range.start + '-' + range.end : '*') + '/' + size
}
/**
* Create a minimal HTML document.
*
* @param {string} title
* @param {string} body
* @private
*/
function createHtmlDocument (title, body) {
return '<!DOCTYPE html>\n' +
'<html lang="en">\n' +
'<head>\n' +
'<meta charset="utf-8">\n' +
'<title>' + title + '</title>\n' +
'</head>\n' +
'<body>\n' +
'<pre>' + body + '</pre>\n' +
'</body>\n' +
'</html>\n'
}
/**
* Create a HttpError object from simple arguments.
*
* @param {number} status
* @param {Error|object} err
* @private
*/
function createHttpError (status, err) {
if (!err) {
return createError(status)
}
return err instanceof Error
? createError(status, err, { expose: false })
: createError(status, err)
}
/**
* decodeURIComponent.
*
* Allows V8 to only deoptimize this fn instead of all
* of send().
*
* @param {String} path
* @api private
*/
function decode (path) {
try {
return decodeURIComponent(path)
} catch (err) {
return -1
}
}
/**
* Determine if emitter has listeners of a given type.
*
* The way to do this check is done three different ways in Node.js >= 0.10
* so this consolidates them into a minimal set using instance methods.
*
* @param {EventEmitter} emitter
* @param {string} type
* @returns {boolean}
* @private
*/
function hasListeners (emitter, type) {
var count = typeof emitter.listenerCount !== 'function'
? emitter.listeners(type).length
: emitter.listenerCount(type)
return count > 0
}
/**
* Normalize the index option into an array.
*
* @param {boolean|string|array} val
* @param {string} name
* @private
*/
function normalizeList (val, name) {
var list = [].concat(val || [])
for (var i = 0; i < list.length; i++) {
if (typeof list[i] !== 'string') {
throw new TypeError(name + ' must be array of strings or false')
}
}
return list
}
/**
* Parse an HTTP Date into a number.
*
* @param {string} date
* @private
*/
function parseHttpDate (date) {
var timestamp = date && Date.parse(date)
return typeof timestamp === 'number'
? timestamp
: NaN
}
/**
* Parse a HTTP token list.
*
* @param {string} str
* @private
*/
function parseTokenList (str) {
var end = 0
var list = []
var start = 0
// gather tokens
for (var i = 0, len = str.length; i < len; i++) {
switch (str.charCodeAt(i)) {
case 0x20: /* */
if (start === end) {
start = end = i + 1
}
break
case 0x2c: /* , */
if (start !== end) {
list.push(str.substring(start, end))
}
start = end = i + 1
break
default:
end = i + 1
break
}
}
// final token
if (start !== end) {
list.push(str.substring(start, end))
}
return list
}
/**
* Set an object of headers on a response.
*
* @param {object} res
* @param {object} headers
* @private
*/
function setHeaders (res, headers) {
var keys = Object.keys(headers)
for (var i = 0; i < keys.length; i++) {
var key = keys[i]
res.setHeader(key, headers[key])
}
}
@@ -0,0 +1 @@
module.exports={A:{A:{"132":"_E"},B:{"1":"_J"},C:{"1":"_3L","2":"_WI","322":"_3N"},D:{"1":"_5F","2":"_wB","16":"D","33":"_jH _CJ"},E:{"1":"_pB","2":"_k","16":"mB","33":"_DI mC"},F:{"1":"_OI","2":"_T","33":"_dF"},G:{"1":"_AB","16":"_d","33":"_wD _JD"},H:{"2":"1D"},I:{"1":"I","2":"_n","33":"_nJ"},J:{"33":"_B"},K:{"1":"H","2":"_D"},L:{"1":"I"},M:{"1":"YC"},N:{"36":"_A"},O:{"1":"bC"},P:{"1":"_U","33":"J"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"_C"}},B:2,C:"CSS writing-mode property",D:true};
@@ -0,0 +1 @@
module.exports={C:{"115":0.01698,"137":0.00566,"140":0.03961,"150":0.00566,"152":0.90544,"153":0.00566,"154":0.14148,"155":0.29427,"156":0.40745,"157":0.00566,_:"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 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 138 139 141 142 143 144 145 146 147 148 149 151 158 159 160 3.5 3.6"},D:{"93":0.02264,"103":0.64513,"104":0.18109,"105":0.16411,"106":0.16977,"107":0.17543,"108":0.17543,"109":0.16411,"110":0.13582,"111":0.15279,"112":0.16411,"116":0.41311,"117":0.16977,"118":0.04527,"119":0.00566,"120":0.16411,"122":0.02264,"124":0.15845,"126":0.23768,"127":0.00566,"128":0.25466,"131":0.3452,"133":0.37349,"134":0.07357,"135":0.05093,"136":0.09054,"137":0.07357,"138":2.56353,"139":0.10752,"140":0.09054,"141":0.07923,"142":0.32256,"143":0.02264,"144":0.10752,"145":0.13582,"146":0.0283,"147":0.04527,"148":0.28861,"149":0.55458,"150":1.92406,"151":2.91439,"152":10.16356,"153":8.64695,"154":2.21267,_:"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 85 86 87 88 89 90 91 92 94 95 96 97 98 99 100 101 102 113 114 115 121 123 125 129 130 132 155 156 157"},F:{"131":0.01132,"133":0.0283,"134":0.1245,"135":0.29427,_:"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 101 102 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 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"120":0.00566,"138":0.00566,"145":0.00566,"146":0.11318,"148":0.01132,"149":0.0283,"150":0.04527,"151":2.32019,"152":3.50292,"153":4.0858,"154":0.73567,_:"12 13 14 15 16 17 18 79 80 81 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 115 116 117 118 119 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 139 140 141 142 143 144 147"},E:{"27":0.39613,_:"4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 13.1 15.1 15.2-15.3 15.4 15.5 16.0 16.2 16.3 16.4 17.0 17.2 18.1 18.2 27.1 27.2 TP","14.1":0.00566,"15.6":0.03395,"16.1":0.02264,"16.5":0.00566,"16.6":0.23768,"17.1":0.02264,"17.3":0.01698,"17.4":0.01132,"17.5":0.00566,"17.6":0.03395,"18.0":0.00566,"18.3":0.00566,"18.4":0.01132,"18.5-18.7":0.0283,"26.0":0.01132,"26.1":0.01698,"26.2":0.01132,"26.3":0.03395,"26.4":0.03395,"26.5":0.5942,"26.6":3.34447},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00218,"5.0-5.1":0.00218,"6.0-6.1":0,"7.0-7.1":0.00436,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.02181,"11.0-11.2":0.00218,"11.3-11.4":0.00436,"12.0-12.1":0,"12.2-12.5":0.05671,"13.0-13.1":0,"13.2":0.01091,"13.3":0,"13.4-13.7":0.00218,"14.0-14.4":0.00873,"14.5-14.8":0.01309,"15.0-15.1":0.01309,"15.2-15.3":0.00873,"15.4":0.01091,"15.5":0.01309,"15.6-15.8":0.28357,"16.0":0.02181,"16.1":0.03926,"16.2":0.02181,"16.3":0.04799,"16.4":0.01091,"16.5":0.01745,"16.6-16.7":0.39481,"17.0":0.01527,"17.1":0.02181,"17.2":0.02181,"17.3":0.03272,"17.4":0.04581,"17.5":0.08943,"17.6-17.7":0.23122,"18.0":0.04799,"18.1":0.09598,"18.2":0.13088,"18.3":0.22685,"18.4":0.14178,"18.5-18.7":2.92946,"26.0":0.14178,"26.1":0.14396,"26.2":0.37518,"26.3":0.40572,"26.4":0.29665,"26.5":1.98715,"26.6":12.261,"27.0":0.94013,"27.1":0,"27.2":0.02399},P:{"4":0.00942,"28":0.00942,"29":0.01884,"30":2.75072,_:"20 21 22 23 24 25 26 27 5.0-5.4 6.2-6.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0","7.2-7.4":0.02826},I:{"0":0.05638,"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.00002},K:{"0":0.00434,_:"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":18.50495},R:{_:"0"},M:{"0":0.11284},Q:{_:"14.9"},O:{"0":0.03472},H:{all:0}};
@@ -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 Play = createLucideIcon("Play", [
["polygon", { points: "6 3 20 12 6 21 6 3", key: "1oa8hb" }]
]);
export { Play as default };
//# sourceMappingURL=play.js.map
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=simpleStreamableHttp.d.ts.map
@@ -0,0 +1,142 @@
// @ts-ignore TS6133
import { expect, test } from "vitest";
import * as z from "zod/v3";
import { ZodIssueCode } from "zod/v3";
import { util } from "../helpers/util.js";
const stringSet = z.set(z.string());
type stringSet = z.infer<typeof stringSet>;
const minTwo = z.set(z.string()).min(2);
const maxTwo = z.set(z.string()).max(2);
const justTwo = z.set(z.string()).size(2);
const nonEmpty = z.set(z.string()).nonempty();
const nonEmptyMax = z.set(z.string()).nonempty().max(2);
test("type inference", () => {
util.assertEqual<stringSet, Set<string>>(true);
});
test("valid parse", () => {
const result = stringSet.safeParse(new Set(["first", "second"]));
expect(result.success).toEqual(true);
if (result.success) {
expect(result.data.has("first")).toEqual(true);
expect(result.data.has("second")).toEqual(true);
expect(result.data.has("third")).toEqual(false);
}
expect(() => {
minTwo.parse(new Set(["a", "b"]));
minTwo.parse(new Set(["a", "b", "c"]));
maxTwo.parse(new Set(["a", "b"]));
maxTwo.parse(new Set(["a"]));
justTwo.parse(new Set(["a", "b"]));
nonEmpty.parse(new Set(["a"]));
nonEmptyMax.parse(new Set(["a"]));
}).not.toThrow();
});
test("valid parse async", async () => {
const result = await stringSet.spa(new Set(["first", "second"]));
expect(result.success).toEqual(true);
if (result.success) {
expect(result.data.has("first")).toEqual(true);
expect(result.data.has("second")).toEqual(true);
expect(result.data.has("third")).toEqual(false);
}
const asyncResult = await stringSet.safeParse(new Set(["first", "second"]));
expect(asyncResult.success).toEqual(true);
if (asyncResult.success) {
expect(asyncResult.data.has("first")).toEqual(true);
expect(asyncResult.data.has("second")).toEqual(true);
expect(asyncResult.data.has("third")).toEqual(false);
}
});
test("valid parse: size-related methods", () => {
expect(() => {
minTwo.parse(new Set(["a", "b"]));
minTwo.parse(new Set(["a", "b", "c"]));
maxTwo.parse(new Set(["a", "b"]));
maxTwo.parse(new Set(["a"]));
justTwo.parse(new Set(["a", "b"]));
nonEmpty.parse(new Set(["a"]));
nonEmptyMax.parse(new Set(["a"]));
}).not.toThrow();
const sizeZeroResult = stringSet.parse(new Set());
expect(sizeZeroResult.size).toBe(0);
const sizeTwoResult = minTwo.parse(new Set(["a", "b"]));
expect(sizeTwoResult.size).toBe(2);
});
test("failing when parsing empty set in nonempty ", () => {
const result = nonEmpty.safeParse(new Set());
expect(result.success).toEqual(false);
if (result.success === false) {
expect(result.error.issues.length).toEqual(1);
expect(result.error.issues[0].code).toEqual(ZodIssueCode.too_small);
}
});
test("failing when set is smaller than min() ", () => {
const result = minTwo.safeParse(new Set(["just_one"]));
expect(result.success).toEqual(false);
if (result.success === false) {
expect(result.error.issues.length).toEqual(1);
expect(result.error.issues[0].code).toEqual(ZodIssueCode.too_small);
}
});
test("failing when set is bigger than max() ", () => {
const result = maxTwo.safeParse(new Set(["one", "two", "three"]));
expect(result.success).toEqual(false);
if (result.success === false) {
expect(result.error.issues.length).toEqual(1);
expect(result.error.issues[0].code).toEqual(ZodIssueCode.too_big);
}
});
test("doesn’t throw when an empty set is given", () => {
const result = stringSet.safeParse(new Set([]));
expect(result.success).toEqual(true);
});
test("throws when a Map is given", () => {
const result = stringSet.safeParse(new Map([]));
expect(result.success).toEqual(false);
if (result.success === false) {
expect(result.error.issues.length).toEqual(1);
expect(result.error.issues[0].code).toEqual(ZodIssueCode.invalid_type);
}
});
test("throws when the given set has invalid input", () => {
const result = stringSet.safeParse(new Set([Symbol()]));
expect(result.success).toEqual(false);
if (result.success === false) {
expect(result.error.issues.length).toEqual(1);
expect(result.error.issues[0].code).toEqual(ZodIssueCode.invalid_type);
expect(result.error.issues[0].path).toEqual([0]);
}
});
test("throws when the given set has multiple invalid entries", () => {
const result = stringSet.safeParse(new Set([1, 2] as any[]) as Set<any>);
expect(result.success).toEqual(false);
if (result.success === false) {
expect(result.error.issues.length).toEqual(2);
expect(result.error.issues[0].code).toEqual(ZodIssueCode.invalid_type);
expect(result.error.issues[0].path).toEqual([0]);
expect(result.error.issues[1].code).toEqual(ZodIssueCode.invalid_type);
expect(result.error.issues[1].path).toEqual([1]);
}
});
@@ -0,0 +1 @@
{"version":3,"file":"http.js","sourceRoot":"","sources":["../../../src/schemes/http.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,GAAoB;IAChC,MAAM,EAAG,MAAM;IAEf,UAAU,EAAG,IAAI;IAEjB,KAAK,EAAG,UAAU,UAAwB,EAAE,OAAkB;QAC7D,qBAAqB;QACrB,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE;YACrB,UAAU,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,IAAI,6BAA6B,CAAC;SACrE;QAED,OAAO,UAAU,CAAC;IACnB,CAAC;IAED,SAAS,EAAG,UAAU,UAAwB,EAAE,OAAkB;QACjE,MAAM,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,KAAK,OAAO,CAAC;QAEnE,4BAA4B;QAC5B,IAAI,UAAU,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,UAAU,CAAC,IAAI,KAAK,EAAE,EAAE;YACtE,UAAU,CAAC,IAAI,GAAG,SAAS,CAAC;SAC5B;QAED,0BAA0B;QAC1B,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE;YACrB,UAAU,CAAC,IAAI,GAAG,GAAG,CAAC;SACtB;QAED,mDAAmD;QACnD,oEAAoE;QACpE,wBAAwB;QAExB,OAAO,UAAU,CAAC;IACnB,CAAC;CACD,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -0,0 +1,6 @@
import { DictionaryMatch, MatchOptions } from '../../types';
export interface DictionaryMatchOptionsLevenshtein extends MatchOptions {
useLevenshtein?: boolean;
}
export type DictionaryMatchOptions = Pick<DictionaryMatchOptionsLevenshtein, 'password' | 'userInputsOptions' | 'useLevenshtein'>;
export type DefaultMatch = (options: DictionaryMatchOptions) => DictionaryMatch[];
@@ -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 Unlink2 = createLucideIcon("Unlink2", [
["path", { d: "M15 7h2a5 5 0 0 1 0 10h-2m-6 0H7A5 5 0 0 1 7 7h2", key: "1re2ne" }]
]);
export { Unlink2 as default };
//# sourceMappingURL=unlink-2.js.map
@@ -0,0 +1,52 @@
"use client";
import { useRef, useInsertionEffect, useCallback } from 'react';
/**
* Creates a ref function that, when called, hydrates the provided
* external ref and VisualElement.
*/
function useMotionRef(visualState, visualElement, externalRef) {
/**
* Store externalRef in a ref to avoid including it in the useCallback
* dependency array. Including externalRef in dependencies causes issues
* with libraries like Radix UI that create new callback refs on each render
* when using asChild - this would cause the callback to be recreated,
* triggering element remounts and breaking AnimatePresence exit animations.
*/
const externalRefContainer = useRef(externalRef);
useInsertionEffect(() => {
externalRefContainer.current = externalRef;
});
// Store cleanup function returned by callback refs (React 19 feature)
const refCleanup = useRef(null);
return useCallback((instance) => {
if (instance) {
visualState.onMount?.(instance);
}
const ref = externalRefContainer.current;
if (typeof ref === "function") {
if (instance) {
const cleanup = ref(instance);
if (typeof cleanup === "function") {
refCleanup.current = cleanup;
}
}
else if (refCleanup.current) {
refCleanup.current();
refCleanup.current = null;
}
else {
ref(instance);
}
}
else if (ref) {
ref.current = instance;
}
if (visualElement) {
instance ? visualElement.mount(instance) : visualElement.unmount();
}
}, [visualElement]);
}
export { useMotionRef };
//# sourceMappingURL=use-motion-ref.mjs.map
@@ -0,0 +1,38 @@
{
"name": "toidentifier",
"description": "Convert a string of words to a JavaScript identifier",
"version": "1.0.1",
"author": "Douglas Christopher Wilson <doug@somethingdoug.com>",
"contributors": [
"Douglas Christopher Wilson <doug@somethingdoug.com>",
"Nick Baugh <niftylettuce@gmail.com> (http://niftylettuce.com/)"
],
"repository": "component/toidentifier",
"devDependencies": {
"eslint": "7.32.0",
"eslint-config-standard": "14.1.1",
"eslint-plugin-import": "2.25.3",
"eslint-plugin-markdown": "2.2.1",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-promise": "4.3.1",
"eslint-plugin-standard": "4.1.0",
"mocha": "9.1.3",
"nyc": "15.1.0"
},
"engines": {
"node": ">=0.6"
},
"license": "MIT",
"files": [
"HISTORY.md",
"LICENSE",
"index.js"
],
"scripts": {
"lint": "eslint .",
"test": "mocha --reporter spec --bail --check-leaks test/",
"test-ci": "nyc --reporter=lcov --reporter=text npm test",
"test-cov": "nyc --reporter=html --reporter=text npm test",
"version": "node scripts/version-history.js && git add HISTORY.md"
}
}
@@ -0,0 +1,78 @@
/**
* @fileoverview Serialization utils.
* @author Bryan Mishkin
*/
"use strict";
/**
* Check if a value is a primitive or plain object created by the Object constructor.
* @param {any} val the value to check
* @returns {boolean} true if so
* @private
*/
function isSerializablePrimitiveOrPlainObject(val) {
return (
val === null ||
typeof val === "string" ||
typeof val === "boolean" ||
typeof val === "number" ||
(typeof val === "object" && val.constructor === Object) ||
Array.isArray(val)
);
}
/**
* Check if a value is serializable.
* Functions or objects like RegExp cannot be serialized by JSON.stringify().
* Inspired by: https://stackoverflow.com/questions/30579940/reliable-way-to-check-if-objects-is-serializable-in-javascript
* @param {any} val The value
* @param {Set<Object>} seenObjects Objects already seen in this path from the root object.
* @returns {boolean} `true` if the value is serializable
*/
function isSerializable(val, seenObjects = new Set()) {
if (!isSerializablePrimitiveOrPlainObject(val)) {
return false;
}
if (typeof val === "object" && val !== null) {
if (seenObjects.has(val)) {
/*
* Since this is a depth-first traversal, encountering
* the same object again means there is a circular reference.
* Objects with circular references are not serializable.
*/
return false;
}
for (const property in val) {
if (Object.hasOwn(val, property)) {
if (!isSerializablePrimitiveOrPlainObject(val[property])) {
return false;
}
if (
typeof val[property] === "object" &&
val[property] !== null
) {
if (
/*
* We're creating a new Set of seen objects because we want to
* ensure that `val` doesn't appear again in this path, but it can appear
* in other paths. This allows for reusing objects in the graph, as long as
* there are no cycles.
*/
!isSerializable(
val[property],
new Set([...seenObjects, val]),
)
) {
return false;
}
}
}
}
}
return true;
}
module.exports = {
isSerializable,
};
@@ -0,0 +1,24 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _objectSpread;
var _defineProperty = require("./defineProperty.js");
function _objectSpread(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? Object(arguments[i]) : {};
var ownKeys = Object.keys(source);
if (typeof Object.getOwnPropertySymbols === "function") {
ownKeys.push.apply(ownKeys, Object.getOwnPropertySymbols(source).filter(function (sym) {
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
}));
}
ownKeys.forEach(function (key) {
(0, _defineProperty.default)(target, key, source[key]);
});
}
return target;
}
//# sourceMappingURL=objectSpread.js.map
@@ -0,0 +1,191 @@
Copyright 2024 Misha Kaletsky
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_VB","33":"_x","129":"_GI","161":"_QC _vH"},C:{"1":"_1D","2":"_RM"},D:{"129":"_2G","161":"_QC _xG"},E:{"2":"MD","129":"K bC UD _vE","388":"_DJ G _UD _dN oC","420":"_TQ"},F:{"2":"_T","129":"_OK","161":"_MC _7K"},G:{"129":"bC _MU","388":"_XE oC"},H:{"2":"1D"},I:{"16":"_LB","129":"I","161":"_HL"},J:{"161":"_B"},K:{"16":"_D","129":"H"},L:{"129":"I"},M:{"1":"YC"},N:{"2":"_A"},O:{"161":"bC"},P:{"1":"_NB","161":"_JM"},Q:{"161":"JE"},R:{"161":"KE"},S:{"1":"_C"}},B:7,C:"Background-clip: text",D:true};
@@ -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 FileMinus = createLucideIcon("FileMinus", [
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
["path", { d: "M9 15h6", key: "cctwl0" }]
]);
export { FileMinus as default };
//# sourceMappingURL=file-minus.js.map
@@ -0,0 +1 @@
{"version":3,"file":"routerStores.cjs","names":[],"sources":["../../src/routerStores.ts"],"sourcesContent":["import { batch, createAtom } from '@tanstack/react-store'\nimport {\n createNonReactiveMutableStore,\n createNonReactiveReadonlyStore,\n} from '@tanstack/router-core'\nimport { isServer } from '@tanstack/router-core/isServer'\nimport type { Readable } from '@tanstack/react-store'\nimport type { GetStoreConfig } from '@tanstack/router-core'\n\ndeclare module '@tanstack/router-core' {\n export interface RouterReadableStore<TValue> extends Readable<TValue> {}\n}\nexport const getStoreFactory: GetStoreConfig = (opts) => {\n if (isServer ?? opts.isServer) {\n return {\n createMutableStore: createNonReactiveMutableStore,\n createReadonlyStore: createNonReactiveReadonlyStore,\n batch: (fn) => fn(),\n }\n }\n return {\n createMutableStore: createAtom,\n createReadonlyStore: createAtom,\n batch: batch,\n }\n}\n"],"mappings":";;;;;AAYA,IAAa,mBAAmC,SAAS;AACvD,KAAI,+BAAA,YAAY,KAAK,SACnB,QAAO;EACL,oBAAoB,sBAAA;EACpB,qBAAqB,sBAAA;EACrB,QAAQ,OAAO,IAAI;EACpB;AAEH,QAAO;EACL,oBAAoB,sBAAA;EACpB,qBAAqB,sBAAA;EACd,OAAA,sBAAA;EACR"}
@@ -0,0 +1,18 @@
/**
* @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 TimerReset = createLucideIcon("TimerReset", [
["path", { d: "M10 2h4", key: "n1abiw" }],
["path", { d: "M12 14v-4", key: "1evpnu" }],
["path", { d: "M4 13a8 8 0 0 1 8-7 8 8 0 1 1-5.3 14L4 17.6", key: "1ts96g" }],
["path", { d: "M9 17H4v5", key: "8t5av" }]
]);
export { TimerReset as default };
//# sourceMappingURL=timer-reset.js.map
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const dom_iterable: LibDefinition;
@@ -0,0 +1,45 @@
import type {CodeKeywordDefinition, KeywordErrorDefinition, ErrorObject} from "../../types"
import type {KeywordCxt} from "../../compile/validate"
import {_, or, and, Code} from "../../compile/codegen"
import {checkMetadata} from "./metadata"
import {checkNullable} from "./nullable"
export type JTDEnumError = ErrorObject<"enum", {allowedValues: string[]}, string[]>
const error: KeywordErrorDefinition = {
message: "must be equal to one of the allowed values",
params: ({schemaCode}) => _`{allowedValues: ${schemaCode}}`,
}
const def: CodeKeywordDefinition = {
keyword: "enum",
schemaType: "array",
error,
code(cxt: KeywordCxt) {
checkMetadata(cxt)
const {gen, data, schema, schemaValue, parentSchema, it} = cxt
if (schema.length === 0) throw new Error("enum must have non-empty array")
if (schema.length !== new Set(schema).size) throw new Error("enum items must be unique")
let valid: Code
const isString = _`typeof ${data} == "string"`
if (schema.length >= it.opts.loopEnum) {
let cond: Code
;[valid, cond] = checkNullable(cxt, isString)
gen.if(cond, loopEnum)
} else {
/* istanbul ignore if */
if (!Array.isArray(schema)) throw new Error("ajv implementation error")
valid = and(isString, or(...schema.map((value: string) => _`${data} === ${value}`)))
if (parentSchema.nullable) valid = or(_`${data} === null`, valid)
}
cxt.pass(valid)
function loopEnum(): void {
gen.forOf("v", schemaValue as Code, (v) =>
gen.if(_`${valid} = ${data} === ${v}`, () => gen.break())
)
}
},
}
export default def
@@ -0,0 +1,138 @@
const peq = new Uint32Array(0x10000);
const myers_32 = (a, b) => {
const n = a.length;
const m = b.length;
const lst = 1 << (n - 1);
let pv = -1;
let mv = 0;
let sc = n;
let i = n;
while (i--) {
peq[a.charCodeAt(i)] |= 1 << i;
}
for (i = 0; i < m; i++) {
let eq = peq[b.charCodeAt(i)];
const xv = eq | mv;
eq |= ((eq & pv) + pv) ^ pv;
mv |= ~(eq | pv);
pv &= eq;
if (mv & lst) {
sc++;
}
if (pv & lst) {
sc--;
}
mv = (mv << 1) | 1;
pv = (pv << 1) | ~(xv | mv);
mv &= xv;
}
i = n;
while (i--) {
peq[a.charCodeAt(i)] = 0;
}
return sc;
};
const myers_x = (b, a) => {
const n = a.length;
const m = b.length;
const mhc = [];
const phc = [];
const hsize = Math.ceil(n / 32);
const vsize = Math.ceil(m / 32);
for (let i = 0; i < hsize; i++) {
phc[i] = -1;
mhc[i] = 0;
}
let j = 0;
for (; j < vsize - 1; j++) {
let mv = 0;
let pv = -1;
const start = j * 32;
const vlen = Math.min(32, m) + start;
for (let k = start; k < vlen; k++) {
peq[b.charCodeAt(k)] |= 1 << k;
}
for (let i = 0; i < n; i++) {
const eq = peq[a.charCodeAt(i)];
const pb = (phc[(i / 32) | 0] >>> i) & 1;
const mb = (mhc[(i / 32) | 0] >>> i) & 1;
const xv = eq | mv;
const xh = ((((eq | mb) & pv) + pv) ^ pv) | eq | mb;
let ph = mv | ~(xh | pv);
let mh = pv & xh;
if ((ph >>> 31) ^ pb) {
phc[(i / 32) | 0] ^= 1 << i;
}
if ((mh >>> 31) ^ mb) {
mhc[(i / 32) | 0] ^= 1 << i;
}
ph = (ph << 1) | pb;
mh = (mh << 1) | mb;
pv = mh | ~(xv | ph);
mv = ph & xv;
}
for (let k = start; k < vlen; k++) {
peq[b.charCodeAt(k)] = 0;
}
}
let mv = 0;
let pv = -1;
const start = j * 32;
const vlen = Math.min(32, m - start) + start;
for (let k = start; k < vlen; k++) {
peq[b.charCodeAt(k)] |= 1 << k;
}
let score = m;
for (let i = 0; i < n; i++) {
const eq = peq[a.charCodeAt(i)];
const pb = (phc[(i / 32) | 0] >>> i) & 1;
const mb = (mhc[(i / 32) | 0] >>> i) & 1;
const xv = eq | mv;
const xh = ((((eq | mb) & pv) + pv) ^ pv) | eq | mb;
let ph = mv | ~(xh | pv);
let mh = pv & xh;
score += (ph >>> (m - 1)) & 1;
score -= (mh >>> (m - 1)) & 1;
if ((ph >>> 31) ^ pb) {
phc[(i / 32) | 0] ^= 1 << i;
}
if ((mh >>> 31) ^ mb) {
mhc[(i / 32) | 0] ^= 1 << i;
}
ph = (ph << 1) | pb;
mh = (mh << 1) | mb;
pv = mh | ~(xv | ph);
mv = ph & xv;
}
for (let k = start; k < vlen; k++) {
peq[b.charCodeAt(k)] = 0;
}
return score;
};
const distance = (a, b) => {
if (a.length < b.length) {
const tmp = b;
b = a;
a = tmp;
}
if (b.length === 0) {
return a.length;
}
if (a.length <= 32) {
return myers_32(a, b);
}
return myers_x(a, b);
};
const closest = (str, arr) => {
let min_distance = Infinity;
let min_index = 0;
for (let i = 0; i < arr.length; i++) {
const dist = distance(str, arr[i]);
if (dist < min_distance) {
min_distance = dist;
min_index = i;
}
}
return arr[min_index];
};
export { closest, distance };
@@ -0,0 +1,29 @@
/**
* @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 TextSelect = createLucideIcon("TextSelect", [
["path", { d: "M5 3a2 2 0 0 0-2 2", key: "y57alp" }],
["path", { d: "M19 3a2 2 0 0 1 2 2", key: "18rm91" }],
["path", { d: "M21 19a2 2 0 0 1-2 2", key: "1j7049" }],
["path", { d: "M5 21a2 2 0 0 1-2-2", key: "sbafld" }],
["path", { d: "M9 3h1", key: "1yesri" }],
["path", { d: "M9 21h1", key: "15o7lz" }],
["path", { d: "M14 3h1", key: "1ec4yj" }],
["path", { d: "M14 21h1", key: "v9vybs" }],
["path", { d: "M3 9v1", key: "1r0deq" }],
["path", { d: "M21 9v1", key: "mxsmne" }],
["path", { d: "M3 14v1", key: "vnatye" }],
["path", { d: "M21 14v1", key: "169vum" }],
["line", { x1: "7", x2: "15", y1: "8", y2: "8", key: "1758g8" }],
["line", { x1: "7", x2: "17", y1: "12", y2: "12", key: "197423" }],
["line", { x1: "7", x2: "13", y1: "16", y2: "16", key: "37cgm6" }]
]);
export { TextSelect as default };
//# sourceMappingURL=text-select.js.map
@@ -0,0 +1,90 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABILITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
interface Uint8Array<TArrayBuffer extends ArrayBufferLike> {
/**
* Converts the `Uint8Array` to a base64-encoded string.
* @param options If provided, sets the alphabet and padding behavior used.
* @returns A base64-encoded string.
*/
toBase64(
options?: {
alphabet?: "base64" | "base64url" | undefined;
omitPadding?: boolean | undefined;
},
): string;
/**
* Sets the `Uint8Array` from a base64-encoded string.
* @param string The base64-encoded string.
* @param options If provided, specifies the alphabet and handling of the last chunk.
* @returns An object containing the number of bytes read and written.
* @throws {SyntaxError} If the input string contains characters outside the specified alphabet, or if the last
* chunk is inconsistent with the `lastChunkHandling` option.
*/
setFromBase64(
string: string,
options?: {
alphabet?: "base64" | "base64url" | undefined;
lastChunkHandling?: "loose" | "strict" | "stop-before-partial" | undefined;
},
): {
read: number;
written: number;
};
/**
* Converts the `Uint8Array` to a base16-encoded string.
* @returns A base16-encoded string.
*/
toHex(): string;
/**
* Sets the `Uint8Array` from a base16-encoded string.
* @param string The base16-encoded string.
* @returns An object containing the number of bytes read and written.
*/
setFromHex(string: string): {
read: number;
written: number;
};
}
interface Uint8ArrayConstructor {
/**
* Creates a new `Uint8Array` from a base64-encoded string.
* @param string The base64-encoded string.
* @param options If provided, specifies the alphabet and handling of the last chunk.
* @returns A new `Uint8Array` instance.
* @throws {SyntaxError} If the input string contains characters outside the specified alphabet, or if the last
* chunk is inconsistent with the `lastChunkHandling` option.
*/
fromBase64(
string: string,
options?: {
alphabet?: "base64" | "base64url" | undefined;
lastChunkHandling?: "loose" | "strict" | "stop-before-partial" | undefined;
},
): Uint8Array<ArrayBuffer>;
/**
* Creates a new `Uint8Array` from a base16-encoded string.
* @returns A new `Uint8Array` instance.
*/
fromHex(
string: string,
): Uint8Array<ArrayBuffer>;
}
@@ -0,0 +1,19 @@
import { resolveElements } from '../../utils/resolve-elements.mjs';
function createSelectorEffect(subjectEffect) {
return (subject, values) => {
const elements = resolveElements(subject);
const subscriptions = [];
for (const element of elements) {
const remove = subjectEffect(element, values);
subscriptions.push(remove);
}
return () => {
for (const remove of subscriptions)
remove();
};
};
}
export { createSelectorEffect };
//# sourceMappingURL=create-dom-effect.mjs.map
@@ -0,0 +1,152 @@
'use strict';
const { isUtf8 } = require('buffer');
const { hasBlob } = require('./constants');
//
// Allowed token characters:
//
// '!', '#', '$', '%', '&', ''', '*', '+', '-',
// '.', 0-9, A-Z, '^', '_', '`', a-z, '|', '~'
//
// tokenChars[32] === 0 // ' '
// tokenChars[33] === 1 // '!'
// tokenChars[34] === 0 // '"'
// ...
//
// prettier-ignore
const tokenChars = [
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 15
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 31
0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, // 32 - 47
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, // 48 - 63
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 64 - 79
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, // 80 - 95
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 96 - 111
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0 // 112 - 127
];
/**
* Checks if a status code is allowed in a close frame.
*
* @param {Number} code The status code
* @return {Boolean} `true` if the status code is valid, else `false`
* @public
*/
function isValidStatusCode(code) {
return (
(code >= 1000 &&
code <= 1014 &&
code !== 1004 &&
code !== 1005 &&
code !== 1006) ||
(code >= 3000 && code <= 4999)
);
}
/**
* Checks if a given buffer contains only correct UTF-8.
* Ported from https://www.cl.cam.ac.uk/%7Emgk25/ucs/utf8_check.c by
* Markus Kuhn.
*
* @param {Buffer} buf The buffer to check
* @return {Boolean} `true` if `buf` contains only correct UTF-8, else `false`
* @public
*/
function _isValidUTF8(buf) {
const len = buf.length;
let i = 0;
while (i < len) {
if ((buf[i] & 0x80) === 0) {
// 0xxxxxxx
i++;
} else if ((buf[i] & 0xe0) === 0xc0) {
// 110xxxxx 10xxxxxx
if (
i + 1 === len ||
(buf[i + 1] & 0xc0) !== 0x80 ||
(buf[i] & 0xfe) === 0xc0 // Overlong
) {
return false;
}
i += 2;
} else if ((buf[i] & 0xf0) === 0xe0) {
// 1110xxxx 10xxxxxx 10xxxxxx
if (
i + 2 >= len ||
(buf[i + 1] & 0xc0) !== 0x80 ||
(buf[i + 2] & 0xc0) !== 0x80 ||
(buf[i] === 0xe0 && (buf[i + 1] & 0xe0) === 0x80) || // Overlong
(buf[i] === 0xed && (buf[i + 1] & 0xe0) === 0xa0) // Surrogate (U+D800 - U+DFFF)
) {
return false;
}
i += 3;
} else if ((buf[i] & 0xf8) === 0xf0) {
// 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
if (
i + 3 >= len ||
(buf[i + 1] & 0xc0) !== 0x80 ||
(buf[i + 2] & 0xc0) !== 0x80 ||
(buf[i + 3] & 0xc0) !== 0x80 ||
(buf[i] === 0xf0 && (buf[i + 1] & 0xf0) === 0x80) || // Overlong
(buf[i] === 0xf4 && buf[i + 1] > 0x8f) ||
buf[i] > 0xf4 // > U+10FFFF
) {
return false;
}
i += 4;
} else {
return false;
}
}
return true;
}
/**
* Determines whether a value is a `Blob`.
*
* @param {*} value The value to be tested
* @return {Boolean} `true` if `value` is a `Blob`, else `false`
* @private
*/
function isBlob(value) {
return (
hasBlob &&
typeof value === 'object' &&
typeof value.arrayBuffer === 'function' &&
typeof value.type === 'string' &&
typeof value.stream === 'function' &&
(value[Symbol.toStringTag] === 'Blob' ||
value[Symbol.toStringTag] === 'File')
);
}
module.exports = {
isBlob,
isValidStatusCode,
isValidUTF8: _isValidUTF8,
tokenChars
};
if (isUtf8) {
module.exports.isValidUTF8 = function (buf) {
return buf.length < 24 ? _isValidUTF8(buf) : isUtf8(buf);
};
} /* istanbul ignore else */ else if (!process.env.WS_NO_UTF_8_VALIDATE) {
try {
const isValidUTF8 = require('utf-8-validate');
module.exports.isValidUTF8 = function (buf) {
return buf.length < 32 ? _isValidUTF8(buf) : isValidUTF8(buf);
};
} catch (e) {
// Continue regardless of the error.
}
}
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const es2021_promise: LibDefinition;
@@ -0,0 +1 @@
{"version":3,"file":"move-vertical.js","sources":["../../../src/icons/move-vertical.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name MoveVertical\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgMnYyMCIgLz4KICA8cGF0aCBkPSJtOCAxOCA0IDQgNC00IiAvPgogIDxwYXRoIGQ9Im04IDYgNC00IDQgNCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/move-vertical\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 MoveVertical = createLucideIcon('MoveVertical', [\n ['path', { d: 'M12 2v20', key: 't6zp3m' }],\n ['path', { d: 'm8 18 4 4 4-4', key: 'bh5tu3' }],\n ['path', { d: 'm8 6 4-4 4 4', key: 'ybng9g' }],\n]);\n\nexport default MoveVertical;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAe,iBAAiB,cAAgB,CAAA,CAAA,CAAA;AAAA,CAAA,CACpD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAiB,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,CAC9C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAgB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC/C,CAAC,CAAA,CAAA;;"}
@@ -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 MapPinXInside = createLucideIcon("MapPinXInside", [
[
"path",
{
d: "M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",
key: "1r0f0z"
}
],
["path", { d: "m14.5 7.5-5 5", key: "3lb6iw" }],
["path", { d: "m9.5 7.5 5 5", key: "ko136h" }]
]);
export { MapPinXInside as default };
//# sourceMappingURL=map-pin-x-inside.js.map
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=simpleStatelessStreamableHttp.d.ts.map
@@ -0,0 +1,70 @@
import { RequestHeader } from "../../utils/headers.js";
//#region src/helper/proxy/index.d.ts
interface ProxyRequestInit extends Omit<RequestInit, 'headers'> {
raw?: Request;
headers?: HeadersInit | [string, string][] | Record<RequestHeader, string | undefined> | Record<string, string | undefined>;
customFetch?: (request: Request) => Promise<Response>;
/**
* Enable strict RFC 9110 compliance for Connection header processing.
*
* - `false` (default): Ignores Connection header to prevent potential
* Hop-by-Hop Header Injection attacks. Recommended for untrusted clients.
* - `true`: Processes Connection header per RFC 9110 and removes listed headers.
* Only use in trusted environments.
*
* @default false
* @see https://datatracker.ietf.org/doc/html/rfc9110#section-7.6.1
*/
strictConnectionProcessing?: boolean;
}
interface ProxyFetch {
(input: string | URL | Request, init?: ProxyRequestInit): Promise<Response>;
}
/**
* Fetch API wrapper for proxy.
* The parameters and return value are the same as for `fetch` (except for the proxy-specific options).
*
* The "Accept-Encoding" header is replaced with an encoding that the current runtime can handle.
* Unnecessary response headers are deleted and a Response object is returned that can be returned
* as is as a response from the handler.
*
* @example
* ```ts
* app.get('/proxy/:path', (c) => {
* return proxy(`http://${originServer}/${c.req.param('path')}`, {
* headers: {
* ...c.req.header(), // optional, specify only when forwarding all the request data (including credentials) is necessary.
* 'X-Forwarded-For': '127.0.0.1',
* 'X-Forwarded-Host': c.req.header('host'),
* Authorization: undefined, // do not propagate request headers contained in c.req.header('Authorization')
* },
* }).then((res) => {
* res.headers.delete('Set-Cookie')
* return res
* })
* })
*
* app.all('/proxy/:path', (c) => {
* return proxy(`http://${originServer}/${c.req.param('path')}`, {
* ...c.req, // optional, specify only when forwarding all the request data (including credentials) is necessary.
* headers: {
* ...c.req.header(),
* 'X-Forwarded-For': '127.0.0.1',
* 'X-Forwarded-Host': c.req.header('host'),
* Authorization: undefined, // do not propagate request headers contained in c.req.header('Authorization')
* },
* })
* })
*
* // Strict RFC compliance mode (use only in trusted environments)
* app.get('/internal-proxy/:path', (c) => {
* return proxy(`http://${internalServer}/${c.req.param('path')}`, {
* ...c.req,
* strictConnectionProcessing: true,
* })
* })
* ```
*/
export declare const proxy: ProxyFetch;
//#endregion
export {};
@@ -0,0 +1,4 @@
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"adjacentSignature", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
name: string;
};
export default _default;
@@ -0,0 +1,357 @@
import { isServer } from '@tanstack/router-core/isServer'
import { functionalUpdate, isPlainObject } from './utils'
import type { AnyRouter } from './router'
import type { ParsedLocation } from './location'
import type { NonNullableUpdater } from './utils'
export type ScrollRestorationEntry = { scrollX: number; scrollY: number }
type ScrollRestorationByElement = Record<string, ScrollRestorationEntry>
type ScrollRestorationByKey = Record<string, ScrollRestorationByElement>
type ScrollRestorationCache = {
readonly state: ScrollRestorationByKey
set: (updater: NonNullableUpdater<ScrollRestorationByKey>) => void
persist: () => void
}
export type ScrollRestorationOptions = {
getKey?: (location: ParsedLocation) => string
scrollBehavior?: ScrollToOptions['behavior']
}
function getSafeSessionStorage() {
try {
return typeof window !== 'undefined' &&
typeof window.sessionStorage === 'object'
? window.sessionStorage
: undefined
} catch {
// silent
return undefined
}
}
// SessionStorage key used to store scroll positions across navigations.
export const storageKey = 'tsr-scroll-restoration-v1_3'
function createScrollRestorationCache(): ScrollRestorationCache | null {
const safeSessionStorage = getSafeSessionStorage()
if (!safeSessionStorage) {
return null
}
let state: ScrollRestorationByKey = {}
try {
const parsed = JSON.parse(safeSessionStorage.getItem(storageKey) || '{}')
if (isPlainObject(parsed)) {
state = parsed as ScrollRestorationByKey
}
} catch {
// ignore invalid session storage payloads
}
const persist = () => {
try {
safeSessionStorage.setItem(storageKey, JSON.stringify(state))
} catch {
if (process.env.NODE_ENV !== 'production') {
console.warn(
'[ts-router] Could not persist scroll restoration state to sessionStorage.',
)
}
}
}
return {
get state() {
return state
},
set: (updater) => {
state = functionalUpdate(updater, state) || state
},
persist,
}
}
export const scrollRestorationCache = createScrollRestorationCache()
/**
* The default `getKey` function for `useScrollRestoration`.
* It returns the `key` from the location state or the `href` of the location.
*
* The `location.href` is used as a fallback to support the use case where the location state is not available like the initial render.
*/
export const defaultGetScrollRestorationKey = (location: ParsedLocation) => {
return location.state.__TSR_key! || location.href
}
function getCssSelector(el: any): string {
const path = []
let parent: HTMLElement
while ((parent = el.parentNode)) {
path.push(
`${el.tagName}:nth-child(${Array.prototype.indexOf.call(parent.children, el) + 1})`,
)
el = parent
}
return `${path.reverse().join(' > ')}`.toLowerCase()
}
export function getElementScrollRestorationEntry(
router: AnyRouter,
options: (
| {
id: string
getElement?: () => Window | Element | undefined | null
}
| {
id?: string
getElement: () => Window | Element | undefined | null
}
) & {
getKey?: (location: ParsedLocation) => string
},
): ScrollRestorationEntry | undefined {
const getKey = options.getKey || defaultGetScrollRestorationKey
const restoreKey = getKey(router.latestLocation)
if (options.id) {
return scrollRestorationCache?.state[restoreKey]?.[
`[${scrollRestorationIdAttribute}="${options.id}"]`
]
}
const element = options.getElement?.()
if (!element) {
return
}
return scrollRestorationCache?.state[restoreKey]?.[
element instanceof Window ? windowScrollTarget : getCssSelector(element)
]
}
let ignoreScroll = false
const windowScrollTarget = 'window'
const scrollRestorationIdAttribute = 'data-scroll-restoration-id'
type ScrollTarget = typeof windowScrollTarget | Element
export function setupScrollRestoration(router: AnyRouter, force?: boolean) {
if (!scrollRestorationCache && !(isServer ?? router.isServer)) {
return
}
const cache = scrollRestorationCache
const shouldScrollRestoration =
force ?? router.options.scrollRestoration ?? false
if (shouldScrollRestoration) {
router.isScrollRestoring = true
}
if (
(isServer ?? router.isServer) ||
router.isScrollRestorationSetup ||
!cache
) {
return
}
router.isScrollRestorationSetup = true
ignoreScroll = false
const getKey =
router.options.getScrollRestorationKey || defaultGetScrollRestorationKey
const trackedScrollEntries = new Map<ScrollTarget, ScrollRestorationEntry>()
window.history.scrollRestoration = 'manual'
const onScroll = (event: Event) => {
if (ignoreScroll || !router.isScrollRestoring) {
return
}
if (event.target === document || event.target === window) {
trackedScrollEntries.set(windowScrollTarget, {
scrollX: window.scrollX || 0,
scrollY: window.scrollY || 0,
})
} else {
const target = event.target as Element
trackedScrollEntries.set(target, {
scrollX: target.scrollLeft || 0,
scrollY: target.scrollTop || 0,
})
}
}
// Snapshot the current page's tracked scroll targets before navigation or unload.
const snapshotCurrentScrollTargets = (restoreKey?: string) => {
if (
!router.isScrollRestoring ||
!restoreKey ||
trackedScrollEntries.size === 0 ||
!cache
) {
return
}
const keyEntry = (cache.state[restoreKey] ||=
{} as ScrollRestorationByElement)
for (const [target, position] of trackedScrollEntries) {
let selector: string | undefined
if (target === windowScrollTarget) {
selector = windowScrollTarget
} else if (target.isConnected) {
const attrId = target.getAttribute(scrollRestorationIdAttribute)
selector = attrId
? `[${scrollRestorationIdAttribute}="${attrId}"]`
: getCssSelector(target)
}
if (!selector) {
continue
}
keyEntry[selector] = position
}
}
document.addEventListener('scroll', onScroll, true)
router.subscribe('onBeforeLoad', (event) => {
snapshotCurrentScrollTargets(
event.fromLocation ? getKey(event.fromLocation) : undefined,
)
trackedScrollEntries.clear()
})
window.addEventListener('pagehide', () => {
snapshotCurrentScrollTargets(
getKey(
router.stores.resolvedLocation.get() ?? router.stores.location.get(),
),
)
cache.persist()
})
// Restore destination scroll after the new route has rendered.
router.subscribe('onRendered', (event) => {
const cacheKey = getKey(event.toLocation)
const behavior = router.options.scrollRestorationBehavior
const scrollToTopSelectors = router.options.scrollToTopSelectors
trackedScrollEntries.clear()
if (!router.resetNextScroll) {
router.resetNextScroll = true
return
}
if (
typeof router.options.scrollRestoration === 'function' &&
!router.options.scrollRestoration({ location: router.latestLocation })
) {
return
}
ignoreScroll = true
try {
const elementEntries = router.isScrollRestoring
? cache.state[cacheKey]
: undefined
let restored = false
if (elementEntries) {
for (const elementSelector in elementEntries) {
const entry = elementEntries[elementSelector]
if (!isPlainObject(entry)) {
continue
}
const { scrollX, scrollY } = entry as {
scrollX?: unknown
scrollY?: unknown
}
if (!Number.isFinite(scrollX) || !Number.isFinite(scrollY)) {
continue
}
if (elementSelector === windowScrollTarget) {
window.scrollTo({
top: scrollY as number,
left: scrollX as number,
behavior,
})
restored = true
} else if (elementSelector) {
let element
try {
element = document.querySelector(elementSelector)
} catch {
continue
}
if (element) {
element.scrollLeft = scrollX as number
element.scrollTop = scrollY as number
restored = true
}
}
}
}
if (!restored) {
const hash = router.history.location.hash.slice(1)
if (hash) {
const hashScrollIntoViewOptions =
window.history.state?.__hashScrollIntoViewOptions ?? true
if (hashScrollIntoViewOptions) {
const el = document.getElementById(hash)
if (el) {
el.scrollIntoView(hashScrollIntoViewOptions)
}
}
} else {
const scrollOptions = {
top: 0,
left: 0,
behavior,
}
window.scrollTo(scrollOptions)
if (scrollToTopSelectors) {
for (const selector of scrollToTopSelectors) {
if (selector === windowScrollTarget) continue
const element =
typeof selector === 'function'
? selector()
: document.querySelector(selector)
if (element) {
element.scrollTo(scrollOptions)
}
}
}
}
}
} finally {
ignoreScroll = false
}
if (router.isScrollRestoring) {
cache.set((state) => {
state[cacheKey] ||= {} as ScrollRestorationByElement
return state
})
}
})
}
@@ -0,0 +1 @@
{"version":3,"file":"source-map.d.ts","sourceRoot":"","sources":["../src/source-map.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAE3E;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,SAAS;IACpB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,gBAAgB,CAAC,UAAU,CAAC,GAAG,gBAAgB,CAAC,UAAU,CAAC,CAAC;IACtE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;IAC3B,cAAc,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;IACnC,OAAO,EAAE,CAAC,CAAC;IACX,UAAU,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;gBAE7B,GAAG,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO;IAe7C,QAAQ,IAAI,MAAM;CAGnB"}
@@ -0,0 +1,79 @@
import type TokenProcessor from "../TokenProcessor";
import type RootTransformer from "./RootTransformer";
import Transformer from "./Transformer";
export default class FlowTransformer extends Transformer {
readonly rootTransformer: RootTransformer;
readonly tokens: TokenProcessor;
readonly isImportsTransformEnabled: boolean;
constructor(rootTransformer: RootTransformer, tokens: TokenProcessor, isImportsTransformEnabled: boolean);
process(): boolean;
/**
* Handle a declaration like:
* export enum E ...
*
* With this imports transform, this becomes:
* const E = [[enum]]; exports.E = E;
*
* otherwise, it becomes:
* export const E = [[enum]];
*/
processNamedExportEnum(): void;
/**
* Handle a declaration like:
* export default enum E
*
* With the imports transform, this becomes:
* const E = [[enum]]; exports.default = E;
*
* otherwise, it becomes:
* const E = [[enum]]; export default E;
*/
processDefaultExportEnum(): void;
/**
* Transpile flow enums to invoke the "flow-enums-runtime" library.
*
* Currently, the transpiled code always uses `require("flow-enums-runtime")`,
* but if future flexibility is needed, we could expose a config option for
* this string (similar to configurable JSX). Even when targeting ESM, the
* default behavior of babel-plugin-transform-flow-enums is to use require
* rather than injecting an import.
*
* Flow enums are quite a bit simpler than TS enums and have some convenient
* constraints:
* - Element initializers must be either always present or always absent. That
* means that we can use fixed lookahead on the first element (if any) and
* assume that all elements are like that.
* - The right-hand side of an element initializer must be a literal value,
* not a complex expression and not referencing other elements. That means
* we can simply copy a single token.
*
* Enums can be broken up into three basic cases:
*
* Mirrored enums:
* enum E {A, B}
* ->
* const E = require("flow-enums-runtime").Mirrored(["A", "B"]);
*
* Initializer enums:
* enum E {A = 1, B = 2}
* ->
* const E = require("flow-enums-runtime")({A: 1, B: 2});
*
* Symbol enums:
* enum E of symbol {A, B}
* ->
* const E = require("flow-enums-runtime")({A: Symbol("A"), B: Symbol("B")});
*
* We can statically detect which of the three cases this is by looking at the
* "of" declaration (if any) and seeing if the first element has an initializer.
* Since the other transform details are so similar between the three cases, we
* use a single implementation and vary the transform within processEnumElement
* based on case.
*/
processEnum(): void;
/**
* Process an individual enum element, producing either an array element or an
* object element based on what type of enum this is.
*/
processEnumElement(isSymbolEnum: boolean, hasInitializers: boolean): void;
}
@@ -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 BugOff = createLucideIcon("BugOff", [
["path", { d: "M15 7.13V6a3 3 0 0 0-5.14-2.1L8 2", key: "vl8zik" }],
["path", { d: "M14.12 3.88 16 2", key: "qol33r" }],
["path", { d: "M22 13h-4v-2a4 4 0 0 0-4-4h-1.3", key: "1ou0bd" }],
["path", { d: "M20.97 5c0 2.1-1.6 3.8-3.5 4", key: "18gb23" }],
["path", { d: "m2 2 20 20", key: "1ooewy" }],
["path", { d: "M7.7 7.7A4 4 0 0 0 6 11v3a6 6 0 0 0 11.13 3.13", key: "1njkjs" }],
["path", { d: "M12 20v-8", key: "i3yub9" }],
["path", { d: "M6 13H2", key: "82j7cp" }],
["path", { d: "M3 21c0-2.1 1.7-3.9 3.8-4", key: "4p0ekp" }]
]);
export { BugOff as default };
//# sourceMappingURL=bug-off.js.map
@@ -0,0 +1,197 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
exports.default = (0, util_1.createRule)({
name: 'no-unnecessary-type-arguments',
meta: {
type: 'suggestion',
docs: {
description: 'Disallow type arguments that are equal to the default',
recommended: 'strict',
requiresTypeChecking: true,
},
fixable: 'code',
messages: {
unnecessaryTypeParameter: 'This is the default value for this type parameter, so it can be omitted.',
},
schema: [],
},
defaultOptions: [],
create(context) {
const services = (0, util_1.getParserServices)(context);
const checker = services.program.getTypeChecker();
function getTypeForComparison(type) {
if ((0, util_1.isTypeReferenceType)(type)) {
return {
type: type.target,
typeArguments: checker.getTypeArguments(type),
};
}
return {
type,
typeArguments: [],
};
}
function checkTSArgsAndParameters(esParameters, typeParameters) {
// Just check the last one. Must specify previous type parameters if the last one is specified.
const i = esParameters.params.length - 1;
const arg = esParameters.params[i];
const param = typeParameters.at(i);
if (!param?.default) {
return;
}
// TODO: would like checker.areTypesEquivalent. https://github.com/Microsoft/TypeScript/issues/13502
const defaultType = checker.getTypeAtLocation(param.default);
const argType = services.getTypeAtLocation(arg);
// this check should handle some of the most simple cases of like strings, numbers, etc
if (defaultType !== argType) {
// For more complex types (like aliases to generic object types) - TS won't always create a
// global shared type object for the type - so we need to resort to manually comparing the
// reference type and the passed type arguments.
// Also - in case there are aliases - we need to resolve them before we do checks
const defaultTypeResolved = getTypeForComparison(defaultType);
const argTypeResolved = getTypeForComparison(argType);
if (
// ensure the resolved type AND all the parameters are the same
defaultTypeResolved.type !== argTypeResolved.type ||
defaultTypeResolved.typeArguments.length !==
argTypeResolved.typeArguments.length ||
defaultTypeResolved.typeArguments.some((t, i) => t !== argTypeResolved.typeArguments[i])) {
return;
}
}
context.report({
node: arg,
messageId: 'unnecessaryTypeParameter',
fix: fixer => fixer.removeRange(i === 0
? esParameters.range
: [esParameters.params[i - 1].range[1], arg.range[1]]),
});
}
return {
TSTypeParameterInstantiation(node) {
const expression = services.esTreeNodeToTSNodeMap.get(node);
const typeParameters = getTypeParametersFromNode(node, expression, checker);
if (typeParameters) {
checkTSArgsAndParameters(node, typeParameters);
}
},
};
},
});
function getTypeParametersFromNode(node, tsNode, checker) {
if (ts.isExpressionWithTypeArguments(tsNode)) {
return getTypeParametersFromType(node, tsNode.expression, checker);
}
if (ts.isTypeReferenceNode(tsNode)) {
return getTypeParametersFromType(node, tsNode.typeName, checker);
}
if (ts.isCallExpression(tsNode) ||
ts.isNewExpression(tsNode) ||
ts.isTaggedTemplateExpression(tsNode) ||
ts.isJsxOpeningElement(tsNode) ||
ts.isJsxSelfClosingElement(tsNode)) {
return getTypeParametersFromCall(node, tsNode, checker);
}
return undefined;
}
function getTypeParametersFromType(node, type, checker) {
const symAtLocation = checker.getSymbolAtLocation(type);
if (!symAtLocation) {
return undefined;
}
const sym = getAliasedSymbol(symAtLocation, checker);
const declarations = sym.getDeclarations();
if (!declarations) {
return undefined;
}
const sortedDeclarations = sortDeclarationsByTypeValueContext(node, declarations);
return (0, util_1.findFirstResult)(sortedDeclarations, decl => {
if (ts.isTypeAliasDeclaration(decl) ||
ts.isInterfaceDeclaration(decl) ||
ts.isClassLike(decl)) {
return decl.typeParameters;
}
if (ts.isVariableDeclaration(decl)) {
return getConstructSignatureDeclaration(symAtLocation, checker)
?.typeParameters;
}
return undefined;
});
}
function getTypeParametersFromCall(node, tsNode, checker) {
const sig = checker.getResolvedSignature(tsNode);
const sigDecl = sig?.getDeclaration();
if (!sigDecl) {
return ts.isNewExpression(tsNode)
? getTypeParametersFromType(node, tsNode.expression, checker)
: undefined;
}
return sigDecl.typeParameters;
}
function getAliasedSymbol(symbol, checker) {
return tsutils.isSymbolFlagSet(symbol, ts.SymbolFlags.Alias)
? checker.getAliasedSymbol(symbol)
: symbol;
}
function isInTypeContext(node) {
return (node.parent.type === utils_1.AST_NODE_TYPES.TSInterfaceHeritage ||
node.parent.type === utils_1.AST_NODE_TYPES.TSTypeReference ||
node.parent.type === utils_1.AST_NODE_TYPES.TSClassImplements);
}
function isTypeContextDeclaration(decl) {
return ts.isTypeAliasDeclaration(decl) || ts.isInterfaceDeclaration(decl);
}
function typeFirstCompare(declA, declB) {
const aIsType = isTypeContextDeclaration(declA);
const bIsType = isTypeContextDeclaration(declB);
return Number(bIsType) - Number(aIsType);
}
function sortDeclarationsByTypeValueContext(node, declarations) {
const sorted = [...declarations].sort(typeFirstCompare);
if (isInTypeContext(node)) {
return sorted;
}
return sorted.reverse();
}
function getConstructSignatureDeclaration(symbol, checker) {
const type = checker.getTypeOfSymbol(symbol);
const sig = type.getConstructSignatures();
return sig.at(0)?.getDeclaration();
}
@@ -0,0 +1,51 @@
{
"name": "@types/semver",
"version": "7.7.1",
"description": "TypeScript definitions for semver",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/semver",
"license": "MIT",
"contributors": [
{
"name": "Bart van der Schoor",
"githubUsername": "Bartvds",
"url": "https://github.com/Bartvds"
},
{
"name": "BendingBender",
"githubUsername": "BendingBender",
"url": "https://github.com/BendingBender"
},
{
"name": "Lucian Buzzo",
"githubUsername": "LucianBuzzo",
"url": "https://github.com/LucianBuzzo"
},
{
"name": "Klaus Meinhardt",
"githubUsername": "ajafff",
"url": "https://github.com/ajafff"
},
{
"name": "ExE Boss",
"githubUsername": "ExE-Boss",
"url": "https://github.com/ExE-Boss"
},
{
"name": "Piotr Błażejewicz",
"githubUsername": "peterblazejewicz",
"url": "https://github.com/peterblazejewicz"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/semver"
},
"scripts": {},
"dependencies": {},
"peerDependencies": {},
"typesPublisherContentHash": "05c64b15fc87f8868c6987ed5adbd9c42e5be6045d53624b68f3046619c2e29e",
"typeScriptVersion": "5.2"
}
@@ -0,0 +1,48 @@
import * as core from "../core/index.cjs";
import type { ZodType } from "./schemas.cjs";
/** @deprecated Use `z.output<T>` instead. */
export type TypeOf<T> = core.output<T>;
/** @deprecated Use `z.output<T>` instead. */
export type Infer<T> = core.output<T>;
/** @deprecated Use `z.core.$ZodTypes` instead */
export type ZodFirstPartySchemaTypes = core.$ZodTypes;
/** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
export declare const ZodIssueCode: {
readonly invalid_type: "invalid_type";
readonly too_big: "too_big";
readonly too_small: "too_small";
readonly invalid_format: "invalid_format";
readonly not_multiple_of: "not_multiple_of";
readonly unrecognized_keys: "unrecognized_keys";
readonly invalid_union: "invalid_union";
readonly invalid_key: "invalid_key";
readonly invalid_element: "invalid_element";
readonly invalid_value: "invalid_value";
readonly custom: "custom";
};
/** @deprecated Use `z.core.$ZodFlattenedError<z.output<T>>` instead; it takes an inferred type, not a schema. */
export type inferFlattenedErrors<T extends core.$ZodType, U = string> = core.$ZodFlattenedError<core.output<T>, U>;
/** @deprecated Use `z.core.$ZodFormattedError<z.output<T>>` instead; it takes an inferred type, not a schema. */
export type inferFormattedError<T extends core.$ZodType<any, any>, U = string> = core.$ZodFormattedError<core.output<T>, U>;
/** Use `z.$brand` instead */
export type BRAND<T extends string | number | symbol = string | number | symbol> = {
[core.$brand]: {
[k in T]: true;
};
};
export { $brand, config } from "../core/index.cjs";
/** @deprecated Use `z.config(params)` instead. */
export declare function setErrorMap(map: core.$ZodErrorMap): void;
/** @deprecated Use `z.config()` instead. */
export declare function getErrorMap(): core.$ZodErrorMap<core.$ZodIssue> | undefined;
/** @deprecated Use z.ZodType (without generics) instead. */
export type ZodTypeAny<Output = unknown, Input = unknown, Internals extends core.$ZodTypeInternals<Output, Input> = core.$ZodTypeInternals<Output, Input>> = ZodType<Output, Input, Internals>;
/** @deprecated Use `z.ZodType` */
export type ZodSchema<Output = unknown, Input = unknown, Internals extends core.$ZodTypeInternals<Output, Input> = core.$ZodTypeInternals<Output, Input>> = ZodType<Output, Input, Internals>;
/** @deprecated Use `z.ZodType` */
export type Schema<Output = unknown, Input = unknown, Internals extends core.$ZodTypeInternals<Output, Input> = core.$ZodTypeInternals<Output, Input>> = ZodType<Output, Input, Internals>;
/** Included for Zod 3 compatibility */
export type ZodRawShape = core.$ZodShape;
/** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */
export declare enum ZodFirstPartyTypeKind {
}
@@ -0,0 +1,88 @@
import { T as createGlobalLinebreakMatcher, f as createRule } from "../utils.js";
var no_trailing_spaces_default = createRule({
name: "no-trailing-spaces",
meta: {
type: "layout",
docs: { description: "Disallow trailing whitespace at the end of lines" },
fixable: "whitespace",
schema: [{
type: "object",
properties: {
skipBlankLines: { type: "boolean" },
ignoreComments: { type: "boolean" }
},
additionalProperties: false
}],
defaultOptions: [{
skipBlankLines: false,
ignoreComments: false
}],
messages: { trailingSpace: "Trailing spaces not allowed." }
},
create(context, [options]) {
const sourceCode = context.sourceCode;
const BLANK_CLASS = "[ \xA0 -​ ]";
const SKIP_BLANK = `^${BLANK_CLASS}*$`;
const NONBLANK = `${BLANK_CLASS}+$`;
const { skipBlankLines, ignoreComments } = options;
function report(node, location, fixRange) {
context.report({
node,
loc: location,
messageId: "trailingSpace",
fix(fixer) {
return fixer.removeRange(fixRange);
}
});
}
function getCommentLineNumbers(comments) {
const lines = /* @__PURE__ */ new Set();
comments.forEach((comment) => {
const endLine = comment.type === "Block" ? comment.loc.end.line - 1 : comment.loc.end.line;
for (let i = comment.loc.start.line; i <= endLine; i++) lines.add(i);
});
return lines;
}
return { [context.sourceCode.ast.type || "Program"]: function checkTrailingSpaces(node) {
const re = new RegExp(NONBLANK, "u");
const skipMatch = new RegExp(SKIP_BLANK, "u");
const lines = sourceCode.lines;
const linebreaks = sourceCode.getText().match(createGlobalLinebreakMatcher());
const commentLineNumbers = getCommentLineNumbers("getAllComments" in sourceCode ? sourceCode.getAllComments() : []);
let totalLength = 0;
for (let i = 0, ii = lines.length; i < ii; i++) {
const lineNumber = i + 1;
const linebreakLength = linebreaks && linebreaks[i] ? linebreaks[i].length : 1;
const lineLength = lines[i].length + linebreakLength;
const matches = re.exec(lines[i]);
if (matches) {
const location = {
start: {
line: lineNumber,
column: matches.index
},
end: {
line: lineNumber,
column: lineLength - linebreakLength
}
};
const rangeStart = totalLength + location.start.column;
const rangeEnd = totalLength + location.end.column;
const containingNode = "getNodeByRangeIndex" in sourceCode ? sourceCode.getNodeByRangeIndex(rangeStart) : null;
if (containingNode && containingNode.type === "TemplateElement" && rangeStart > containingNode.parent.range[0] && rangeEnd < containingNode.parent.range[1]) {
totalLength += lineLength;
continue;
}
if (skipBlankLines && skipMatch.test(lines[i])) {
totalLength += lineLength;
continue;
}
const fixRange = [rangeStart, rangeEnd];
if (!ignoreComments || !commentLineNumbers.has(lineNumber)) report(node, location, fixRange);
}
totalLength += lineLength;
}
} };
}
});
export { no_trailing_spaces_default as t };
@@ -0,0 +1,46 @@
/**
* @fileoverview Types for the plugin-kit package.
* @author Nicholas C. Zakas
*/
import type { RuleDefinition, RuleDefinitionTypeOptions, RuleVisitor } from "@eslint/core";
/**
* Defaults for non-language-related `RuleDefinition` options.
*/
export interface CustomRuleTypeDefinitions {
RuleOptions: unknown[];
MessageIds: string;
ExtRuleDocs: Record<string, unknown>;
}
/**
* A helper type to define language specific specializations of the `RuleDefinition` type.
*
* @example
* ```ts
* type YourRuleDefinition<
* Options extends Partial<CustomRuleTypeDefinitions> = {},
* > = CustomRuleDefinitionType<
* {
* LangOptions: YourLanguageOptions;
* Code: YourSourceCode;
* Visitor: YourRuleVisitor;
* Node: YourNode;
* },
* Options
* >;
* ```
*/
export type CustomRuleDefinitionType<LanguageSpecificOptions extends Omit<RuleDefinitionTypeOptions, keyof CustomRuleTypeDefinitions>, Options extends Partial<CustomRuleTypeDefinitions>> = RuleDefinition<LanguageSpecificOptions & Required<Options & Omit<CustomRuleTypeDefinitions, keyof Options>>>;
/**
* Adds matching `:exit` selector properties for each key of a `RuleVisitor`.
*/
export type CustomRuleVisitorWithExit<RuleVisitorType extends RuleVisitor> = {
[Key in keyof RuleVisitorType as Key | `${Key & string}:exit`]: RuleVisitorType[Key];
};
/**
* A map of names to string values, or `null` when no value is provided.
*/
export type StringConfig = Record<string, string | null>;
/**
* A map of names to boolean flags.
*/
export type BooleanConfig = Record<string, boolean>;
@@ -0,0 +1 @@
{"version":3,"names":["_checkPrivateRedeclaration","require","_classPrivateFieldInitSpec","obj","privateMap","value","checkPrivateRedeclaration","set"],"sources":["../../src/helpers/classPrivateFieldInitSpec.ts"],"sourcesContent":["/* @minVersion 7.14.1 */\n\nimport checkPrivateRedeclaration from \"./checkPrivateRedeclaration.ts\";\n\nexport default function _classPrivateFieldInitSpec(\n obj: object,\n privateMap: WeakMap<object, unknown>,\n value: unknown,\n) {\n checkPrivateRedeclaration(obj, privateMap);\n privateMap.set(obj, value);\n}\n"],"mappings":";;;;;;AAEA,IAAAA,0BAAA,GAAAC,OAAA;AAEe,SAASC,0BAA0BA,CAChDC,GAAW,EACXC,UAAoC,EACpCC,KAAc,EACd;EACA,IAAAC,kCAAyB,EAACH,GAAG,EAAEC,UAAU,CAAC;EAC1CA,UAAU,CAACG,GAAG,CAACJ,GAAG,EAAEE,KAAK,CAAC;AAC5B","ignoreList":[]}
@@ -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 BluetoothConnected = createLucideIcon("BluetoothConnected", [
["path", { d: "m7 7 10 10-5 5V2l5 5L7 17", key: "1q5490" }],
["line", { x1: "18", x2: "21", y1: "12", y2: "12", key: "1rsjjs" }],
["line", { x1: "3", x2: "6", y1: "12", y2: "12", key: "11yl8c" }]
]);
export { BluetoothConnected as default };
//# sourceMappingURL=bluetooth-connected.js.map
@@ -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 BadgeRussianRuble = createLucideIcon("BadgeRussianRuble", [
[
"path",
{
d: "M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",
key: "3c2336"
}
],
["path", { d: "M9 16h5", key: "1syiyw" }],
["path", { d: "M9 12h5a2 2 0 1 0 0-4h-3v9", key: "1ge9c1" }]
]);
export { BadgeRussianRuble as default };
//# sourceMappingURL=badge-russian-ruble.js.map
@@ -0,0 +1,25 @@
"use client";
import { buildSVGAttrs, isSVGTag } from 'motion-dom';
import { useMemo } from 'react';
import { copyRawValuesOnly } from '../html/use-props.mjs';
import { createSvgRenderState } from './utils/create-render-state.mjs';
function useSVGProps(props, visualState, _isStatic, Component) {
const visualProps = useMemo(() => {
const state = createSvgRenderState();
buildSVGAttrs(state, visualState, isSVGTag(Component), props.transformTemplate, props.style);
return {
...state.attrs,
style: { ...state.style },
};
}, [visualState]);
if (props.style) {
const rawStyles = {};
copyRawValuesOnly(rawStyles, props.style, props);
visualProps.style = { ...rawStyles, ...visualProps.style };
}
return visualProps;
}
export { useSVGProps };
//# sourceMappingURL=use-props.mjs.map
@@ -0,0 +1 @@
{"version":3,"file":"sprout.js","sources":["../../../src/icons/sprout.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Sprout\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNyAyMGgxMCIgLz4KICA8cGF0aCBkPSJNMTAgMjBjNS41LTIuNS44LTYuNCAzLTEwIiAvPgogIDxwYXRoIGQ9Ik05LjUgOS40YzEuMS44IDEuOCAyLjIgMi4zIDMuNy0yIC40LTMuNS40LTQuOC0uMy0xLjItLjYtMi4zLTEuOS0zLTQuMiAyLjgtLjUgNC40IDAgNS41Ljh6IiAvPgogIDxwYXRoIGQ9Ik0xNC4xIDZhNyA3IDAgMCAwLTEuMSA0YzEuOS0uMSAzLjMtLjYgNC4zLTEuNCAxLTEgMS42LTIuMyAxLjctNC42LTIuNy4xLTQgMS00LjkgMnoiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/sprout\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 Sprout = createLucideIcon('Sprout', [\n ['path', { d: 'M7 20h10', key: 'e6iznv' }],\n ['path', { d: 'M10 20c5.5-2.5.8-6.4 3-10', key: '161w41' }],\n [\n 'path',\n {\n d: 'M9.5 9.4c1.1.8 1.8 2.2 2.3 3.7-2 .4-3.5.4-4.8-.3-1.2-.6-2.3-1.9-3-4.2 2.8-.5 4.4 0 5.5.8z',\n key: '9gtqwd',\n },\n ],\n [\n 'path',\n {\n d: 'M14.1 6a7 7 0 0 0-1.1 4c1.9-.1 3.3-.6 4.3-1.4 1-1 1.6-2.3 1.7-4.6-2.7.1-4 1-4.9 2z',\n key: 'bkxnd2',\n },\n ],\n]);\n\nexport default Sprout;\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,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC1D,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;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,CACA,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;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;AACF,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,19 @@
Copyright 2019 Justin Ridgewell <jridgewell@google.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -0,0 +1,2 @@
declare const _default: Map<string, string>;
export default _default;
@@ -0,0 +1,201 @@
const require_auth = require('./auth-D1CeV_Jr.cjs');
exports.AnnotationsSchema = require_auth.AnnotationsSchema;
exports.AudioContentSchema = require_auth.AudioContentSchema;
exports.BAGGAGE_META_KEY = require_auth.BAGGAGE_META_KEY;
exports.BaseMetadataSchema = require_auth.BaseMetadataSchema;
exports.BaseRequestParamsSchema = require_auth.BaseRequestParamsSchema;
exports.BlobResourceContentsSchema = require_auth.BlobResourceContentsSchema;
exports.BooleanSchemaSchema = require_auth.BooleanSchemaSchema;
exports.CLIENT_CAPABILITIES_META_KEY = require_auth.CLIENT_CAPABILITIES_META_KEY;
exports.CLIENT_INFO_META_KEY = require_auth.CLIENT_INFO_META_KEY;
exports.CallToolRequestParamsSchema = require_auth.CallToolRequestParamsSchema;
exports.CallToolRequestSchema = require_auth.CallToolRequestSchema;
exports.CallToolResultSchema = require_auth.CallToolResultSchema;
exports.CancelTaskRequestSchema = require_auth.CancelTaskRequestSchema;
exports.CancelTaskResultSchema = require_auth.CancelTaskResultSchema;
exports.CancelledNotificationParamsSchema = require_auth.CancelledNotificationParamsSchema;
exports.CancelledNotificationSchema = require_auth.CancelledNotificationSchema;
exports.ClientCapabilitiesSchema = require_auth.ClientCapabilitiesSchema;
exports.ClientNotificationSchema = require_auth.ClientNotificationSchema;
exports.ClientRequestSchema = require_auth.ClientRequestSchema;
exports.ClientResultSchema = require_auth.ClientResultSchema;
exports.ClientTasksCapabilitySchema = require_auth.ClientTasksCapabilitySchema;
exports.CompatibilityCallToolResultSchema = require_auth.CompatibilityCallToolResultSchema;
exports.CompleteRequestParamsSchema = require_auth.CompleteRequestParamsSchema;
exports.CompleteRequestSchema = require_auth.CompleteRequestSchema;
exports.CompleteResultSchema = require_auth.CompleteResultSchema;
exports.ContentBlockSchema = require_auth.ContentBlockSchema;
exports.CreateMessageRequestParamsSchema = require_auth.CreateMessageRequestParamsSchema;
exports.CreateMessageRequestSchema = require_auth.CreateMessageRequestSchema;
exports.CreateMessageResultSchema = require_auth.CreateMessageResultSchema;
exports.CreateMessageResultWithToolsSchema = require_auth.CreateMessageResultWithToolsSchema;
exports.CreateTaskResultSchema = require_auth.CreateTaskResultSchema;
exports.CursorSchema = require_auth.CursorSchema;
exports.DEFAULT_NEGOTIATED_PROTOCOL_VERSION = require_auth.DEFAULT_NEGOTIATED_PROTOCOL_VERSION;
exports.DiscoverRequestSchema = require_auth.DiscoverRequestSchema;
exports.DiscoverResultSchema = require_auth.DiscoverResultSchema;
exports.ElicitRequestFormParamsSchema = require_auth.ElicitRequestFormParamsSchema;
exports.ElicitRequestParamsSchema = require_auth.ElicitRequestParamsSchema;
exports.ElicitRequestSchema = require_auth.ElicitRequestSchema;
exports.ElicitRequestURLParamsSchema = require_auth.ElicitRequestURLParamsSchema;
exports.ElicitResultSchema = require_auth.ElicitResultSchema;
exports.ElicitationCompleteNotificationParamsSchema = require_auth.ElicitationCompleteNotificationParamsSchema;
exports.ElicitationCompleteNotificationSchema = require_auth.ElicitationCompleteNotificationSchema;
exports.EmbeddedResourceSchema = require_auth.EmbeddedResourceSchema;
exports.EmptyResultSchema = require_auth.EmptyResultSchema;
exports.EnumSchemaSchema = require_auth.EnumSchemaSchema;
exports.GetPromptRequestParamsSchema = require_auth.GetPromptRequestParamsSchema;
exports.GetPromptRequestSchema = require_auth.GetPromptRequestSchema;
exports.GetPromptResultSchema = require_auth.GetPromptResultSchema;
exports.GetTaskPayloadRequestSchema = require_auth.GetTaskPayloadRequestSchema;
exports.GetTaskPayloadResultSchema = require_auth.GetTaskPayloadResultSchema;
exports.GetTaskRequestSchema = require_auth.GetTaskRequestSchema;
exports.GetTaskResultSchema = require_auth.GetTaskResultSchema;
exports.INTERNAL_ERROR = require_auth.INTERNAL_ERROR;
exports.INVALID_PARAMS = require_auth.INVALID_PARAMS;
exports.INVALID_REQUEST = require_auth.INVALID_REQUEST;
exports.IconSchema = require_auth.IconSchema;
exports.IconsSchema = require_auth.IconsSchema;
exports.IdJagTokenExchangeResponseSchema = require_auth.IdJagTokenExchangeResponseSchema;
exports.ImageContentSchema = require_auth.ImageContentSchema;
exports.ImplementationSchema = require_auth.ImplementationSchema;
exports.InitializeRequestParamsSchema = require_auth.InitializeRequestParamsSchema;
exports.InitializeRequestSchema = require_auth.InitializeRequestSchema;
exports.InitializeResultSchema = require_auth.InitializeResultSchema;
exports.InitializedNotificationSchema = require_auth.InitializedNotificationSchema;
exports.JSONArraySchema = require_auth.JSONArraySchema;
exports.JSONObjectSchema = require_auth.JSONObjectSchema;
exports.JSONRPCErrorResponseSchema = require_auth.JSONRPCErrorResponseSchema;
exports.JSONRPCMessageSchema = require_auth.JSONRPCMessageSchema;
exports.JSONRPCNotificationSchema = require_auth.JSONRPCNotificationSchema;
exports.JSONRPCRequestSchema = require_auth.JSONRPCRequestSchema;
exports.JSONRPCResponseSchema = require_auth.JSONRPCResponseSchema;
exports.JSONRPCResultResponseSchema = require_auth.JSONRPCResultResponseSchema;
exports.JSONRPC_VERSION = require_auth.JSONRPC_VERSION;
exports.JSONValueSchema = require_auth.JSONValueSchema;
exports.LATEST_PROTOCOL_VERSION = require_auth.LATEST_PROTOCOL_VERSION;
exports.LOG_LEVEL_META_KEY = require_auth.LOG_LEVEL_META_KEY;
exports.LegacyTitledEnumSchemaSchema = require_auth.LegacyTitledEnumSchemaSchema;
exports.ListChangedOptionsBaseSchema = require_auth.ListChangedOptionsBaseSchema;
exports.ListPromptsRequestSchema = require_auth.ListPromptsRequestSchema;
exports.ListPromptsResultSchema = require_auth.ListPromptsResultSchema;
exports.ListResourceTemplatesRequestSchema = require_auth.ListResourceTemplatesRequestSchema;
exports.ListResourceTemplatesResultSchema = require_auth.ListResourceTemplatesResultSchema;
exports.ListResourcesRequestSchema = require_auth.ListResourcesRequestSchema;
exports.ListResourcesResultSchema = require_auth.ListResourcesResultSchema;
exports.ListRootsRequestSchema = require_auth.ListRootsRequestSchema;
exports.ListRootsResultSchema = require_auth.ListRootsResultSchema;
exports.ListTasksRequestSchema = require_auth.ListTasksRequestSchema;
exports.ListTasksResultSchema = require_auth.ListTasksResultSchema;
exports.ListToolsRequestSchema = require_auth.ListToolsRequestSchema;
exports.ListToolsResultSchema = require_auth.ListToolsResultSchema;
exports.LoggingLevelSchema = require_auth.LoggingLevelSchema;
exports.LoggingMessageNotificationParamsSchema = require_auth.LoggingMessageNotificationParamsSchema;
exports.LoggingMessageNotificationSchema = require_auth.LoggingMessageNotificationSchema;
exports.METHOD_NOT_FOUND = require_auth.METHOD_NOT_FOUND;
exports.ModelHintSchema = require_auth.ModelHintSchema;
exports.ModelPreferencesSchema = require_auth.ModelPreferencesSchema;
exports.MultiSelectEnumSchemaSchema = require_auth.MultiSelectEnumSchemaSchema;
exports.NotificationSchema = require_auth.NotificationSchema;
exports.NotificationsParamsSchema = require_auth.NotificationsParamsSchema;
exports.NumberSchemaSchema = require_auth.NumberSchemaSchema;
exports.OAuthClientInformationFullSchema = require_auth.OAuthClientInformationFullSchema;
exports.OAuthClientInformationSchema = require_auth.OAuthClientInformationSchema;
exports.OAuthClientMetadataSchema = require_auth.OAuthClientMetadataSchema;
exports.OAuthClientRegistrationErrorSchema = require_auth.OAuthClientRegistrationErrorSchema;
exports.OAuthErrorResponseSchema = require_auth.OAuthErrorResponseSchema;
exports.OAuthMetadataSchema = require_auth.OAuthMetadataSchema;
exports.OAuthProtectedResourceMetadataSchema = require_auth.OAuthProtectedResourceMetadataSchema;
exports.OAuthTokenRevocationRequestSchema = require_auth.OAuthTokenRevocationRequestSchema;
exports.OAuthTokensSchema = require_auth.OAuthTokensSchema;
exports.OpenIdProviderDiscoveryMetadataSchema = require_auth.OpenIdProviderDiscoveryMetadataSchema;
exports.OpenIdProviderMetadataSchema = require_auth.OpenIdProviderMetadataSchema;
exports.OptionalSafeUrlSchema = require_auth.OptionalSafeUrlSchema;
exports.PARSE_ERROR = require_auth.PARSE_ERROR;
exports.PROTOCOL_VERSION_META_KEY = require_auth.PROTOCOL_VERSION_META_KEY;
exports.PaginatedRequestParamsSchema = require_auth.PaginatedRequestParamsSchema;
exports.PaginatedRequestSchema = require_auth.PaginatedRequestSchema;
exports.PaginatedResultSchema = require_auth.PaginatedResultSchema;
exports.PingRequestSchema = require_auth.PingRequestSchema;
exports.PrimitiveSchemaDefinitionSchema = require_auth.PrimitiveSchemaDefinitionSchema;
exports.ProgressNotificationParamsSchema = require_auth.ProgressNotificationParamsSchema;
exports.ProgressNotificationSchema = require_auth.ProgressNotificationSchema;
exports.ProgressSchema = require_auth.ProgressSchema;
exports.ProgressTokenSchema = require_auth.ProgressTokenSchema;
exports.PromptArgumentSchema = require_auth.PromptArgumentSchema;
exports.PromptListChangedNotificationSchema = require_auth.PromptListChangedNotificationSchema;
exports.PromptMessageSchema = require_auth.PromptMessageSchema;
exports.PromptReferenceSchema = require_auth.PromptReferenceSchema;
exports.PromptSchema = require_auth.PromptSchema;
exports.RELATED_TASK_META_KEY = require_auth.RELATED_TASK_META_KEY;
exports.ReadResourceRequestParamsSchema = require_auth.ReadResourceRequestParamsSchema;
exports.ReadResourceRequestSchema = require_auth.ReadResourceRequestSchema;
exports.ReadResourceResultSchema = require_auth.ReadResourceResultSchema;
exports.RelatedTaskMetadataSchema = require_auth.RelatedTaskMetadataSchema;
exports.RequestIdSchema = require_auth.RequestIdSchema;
exports.RequestMetaSchema = require_auth.RequestMetaSchema;
exports.RequestSchema = require_auth.RequestSchema;
exports.ResourceContentsSchema = require_auth.ResourceContentsSchema;
exports.ResourceLinkSchema = require_auth.ResourceLinkSchema;
exports.ResourceListChangedNotificationSchema = require_auth.ResourceListChangedNotificationSchema;
exports.ResourceRequestParamsSchema = require_auth.ResourceRequestParamsSchema;
exports.ResourceSchema = require_auth.ResourceSchema;
exports.ResourceTemplateReferenceSchema = require_auth.ResourceTemplateReferenceSchema;
exports.ResourceTemplateSchema = require_auth.ResourceTemplateSchema;
exports.ResourceUpdatedNotificationParamsSchema = require_auth.ResourceUpdatedNotificationParamsSchema;
exports.ResourceUpdatedNotificationSchema = require_auth.ResourceUpdatedNotificationSchema;
exports.ResultMetaObjectSchema = require_auth.ResultMetaObjectSchema;
exports.ResultSchema = require_auth.ResultSchema;
exports.RoleSchema = require_auth.RoleSchema;
exports.RootSchema = require_auth.RootSchema;
exports.RootsListChangedNotificationSchema = require_auth.RootsListChangedNotificationSchema;
exports.SERVER_INFO_META_KEY = require_auth.SERVER_INFO_META_KEY;
exports.SUBSCRIPTION_ID_META_KEY = require_auth.SUBSCRIPTION_ID_META_KEY;
exports.SUPPORTED_PROTOCOL_VERSIONS = require_auth.SUPPORTED_PROTOCOL_VERSIONS;
exports.SafeUrlSchema = require_auth.SafeUrlSchema;
exports.SamplingContentSchema = require_auth.SamplingContentSchema;
exports.SamplingMessageContentBlockSchema = require_auth.SamplingMessageContentBlockSchema;
exports.SamplingMessageSchema = require_auth.SamplingMessageSchema;
exports.ServerCapabilitiesSchema = require_auth.ServerCapabilitiesSchema;
exports.ServerNotificationSchema = require_auth.ServerNotificationSchema;
exports.ServerRequestSchema = require_auth.ServerRequestSchema;
exports.ServerResultSchema = require_auth.ServerResultSchema;
exports.ServerTasksCapabilitySchema = require_auth.ServerTasksCapabilitySchema;
exports.SetLevelRequestParamsSchema = require_auth.SetLevelRequestParamsSchema;
exports.SetLevelRequestSchema = require_auth.SetLevelRequestSchema;
exports.SingleSelectEnumSchemaSchema = require_auth.SingleSelectEnumSchemaSchema;
exports.StringSchemaSchema = require_auth.StringSchemaSchema;
exports.SubscribeRequestParamsSchema = require_auth.SubscribeRequestParamsSchema;
exports.SubscribeRequestSchema = require_auth.SubscribeRequestSchema;
exports.SubscriptionFilterSchema = require_auth.SubscriptionFilterSchema;
exports.SubscriptionsAcknowledgedNotificationParamsSchema = require_auth.SubscriptionsAcknowledgedNotificationParamsSchema;
exports.SubscriptionsAcknowledgedNotificationSchema = require_auth.SubscriptionsAcknowledgedNotificationSchema;
exports.SubscriptionsListenRequestParamsSchema = require_auth.SubscriptionsListenRequestParamsSchema;
exports.SubscriptionsListenRequestSchema = require_auth.SubscriptionsListenRequestSchema;
exports.SubscriptionsListenResultMetaSchema = require_auth.SubscriptionsListenResultMetaSchema;
exports.SubscriptionsListenResultSchema = require_auth.SubscriptionsListenResultSchema;
exports.TRACEPARENT_META_KEY = require_auth.TRACEPARENT_META_KEY;
exports.TRACESTATE_META_KEY = require_auth.TRACESTATE_META_KEY;
exports.TaskAugmentedRequestParamsSchema = require_auth.TaskAugmentedRequestParamsSchema;
exports.TaskCreationParamsSchema = require_auth.TaskCreationParamsSchema;
exports.TaskMetadataSchema = require_auth.TaskMetadataSchema;
exports.TaskSchema = require_auth.TaskSchema;
exports.TaskStatusNotificationParamsSchema = require_auth.TaskStatusNotificationParamsSchema;
exports.TaskStatusNotificationSchema = require_auth.TaskStatusNotificationSchema;
exports.TaskStatusSchema = require_auth.TaskStatusSchema;
exports.TextContentSchema = require_auth.TextContentSchema;
exports.TextResourceContentsSchema = require_auth.TextResourceContentsSchema;
exports.TitledMultiSelectEnumSchemaSchema = require_auth.TitledMultiSelectEnumSchemaSchema;
exports.TitledSingleSelectEnumSchemaSchema = require_auth.TitledSingleSelectEnumSchemaSchema;
exports.ToolAnnotationsSchema = require_auth.ToolAnnotationsSchema;
exports.ToolChoiceSchema = require_auth.ToolChoiceSchema;
exports.ToolExecutionSchema = require_auth.ToolExecutionSchema;
exports.ToolListChangedNotificationSchema = require_auth.ToolListChangedNotificationSchema;
exports.ToolResultContentSchema = require_auth.ToolResultContentSchema;
exports.ToolSchema = require_auth.ToolSchema;
exports.ToolUseContentSchema = require_auth.ToolUseContentSchema;
exports.UnsubscribeRequestParamsSchema = require_auth.UnsubscribeRequestParamsSchema;
exports.UnsubscribeRequestSchema = require_auth.UnsubscribeRequestSchema;
exports.UntitledMultiSelectEnumSchemaSchema = require_auth.UntitledMultiSelectEnumSchemaSchema;
exports.UntitledSingleSelectEnumSchemaSchema = require_auth.UntitledSingleSelectEnumSchemaSchema;
@@ -0,0 +1 @@
{"version":3,"file":"stores.js","names":[],"sources":["../../src/stores.ts"],"sourcesContent":["import { createLRUCache } from './lru-cache'\nimport { arraysEqual, functionalUpdate } from './utils'\n\nimport type { AnyRoute } from './route'\nimport type { RouterState } from './router'\nimport type { FullSearchSchema } from './routeInfo'\nimport type { ParsedLocation } from './location'\nimport type { AnyRedirect } from './redirect'\nimport type { AnyRouteMatch } from './Matches'\n\nexport interface RouterReadableStore<TValue> {\n get: () => TValue\n}\n\nexport interface RouterWritableStore<\n TValue,\n> extends RouterReadableStore<TValue> {\n set: ((updater: (prev: TValue) => TValue) => void) & ((value: TValue) => void)\n}\n\nexport type RouterBatchFn = (fn: () => void) => void\n\nexport type MutableStoreFactory = <TValue>(\n initialValue: TValue,\n) => RouterWritableStore<TValue>\n\nexport type ReadonlyStoreFactory = <TValue>(\n read: () => TValue,\n) => RouterReadableStore<TValue>\n\nexport type GetStoreConfig = (opts: { isServer?: boolean }) => StoreConfig\n\nexport type StoreConfig = {\n createMutableStore: MutableStoreFactory\n createReadonlyStore: ReadonlyStoreFactory\n batch: RouterBatchFn\n init?: (stores: RouterStores<AnyRoute>) => void\n}\n\ntype MatchStore = RouterWritableStore<AnyRouteMatch> & {\n routeId?: string\n}\ntype ReadableStore<TValue> = RouterReadableStore<TValue>\n\n/** SSR non-reactive createMutableStore */\nexport function createNonReactiveMutableStore<TValue>(\n initialValue: TValue,\n): RouterWritableStore<TValue> {\n let value = initialValue\n\n return {\n get() {\n return value\n },\n set(nextOrUpdater: TValue | ((prev: TValue) => TValue)) {\n value = functionalUpdate(nextOrUpdater, value)\n },\n }\n}\n\n/** SSR non-reactive createReadonlyStore */\nexport function createNonReactiveReadonlyStore<TValue>(\n read: () => TValue,\n): RouterReadableStore<TValue> {\n return {\n get() {\n return read()\n },\n }\n}\n\nexport interface RouterStores<in out TRouteTree extends AnyRoute> {\n status: RouterWritableStore<RouterState<TRouteTree>['status']>\n loadedAt: RouterWritableStore<number>\n isLoading: RouterWritableStore<boolean>\n isTransitioning: RouterWritableStore<boolean>\n location: RouterWritableStore<ParsedLocation<FullSearchSchema<TRouteTree>>>\n resolvedLocation: RouterWritableStore<\n ParsedLocation<FullSearchSchema<TRouteTree>> | undefined\n >\n statusCode: RouterWritableStore<number>\n redirect: RouterWritableStore<AnyRedirect | undefined>\n matchesId: RouterWritableStore<Array<string>>\n pendingIds: RouterWritableStore<Array<string>>\n /** @internal */\n cachedIds: RouterWritableStore<Array<string>>\n matches: ReadableStore<Array<AnyRouteMatch>>\n pendingMatches: ReadableStore<Array<AnyRouteMatch>>\n cachedMatches: ReadableStore<Array<AnyRouteMatch>>\n firstId: ReadableStore<string | undefined>\n hasPending: ReadableStore<boolean>\n matchRouteDeps: ReadableStore<{\n locationHref: string\n resolvedLocationHref: string | undefined\n status: RouterState<TRouteTree>['status']\n }>\n __store: RouterReadableStore<RouterState<TRouteTree>>\n\n matchStores: Map<string, MatchStore>\n pendingMatchStores: Map<string, MatchStore>\n cachedMatchStores: Map<string, MatchStore>\n\n /**\n * Get a computed store that resolves a routeId to its current match state.\n * Returns the same cached store instance for repeated calls with the same key.\n * The computed depends on matchesId + the individual match store, so\n * subscribers are only notified when the resolved match state changes.\n */\n getRouteMatchStore: (\n routeId: string,\n ) => RouterReadableStore<AnyRouteMatch | undefined>\n\n setMatches: (nextMatches: Array<AnyRouteMatch>) => void\n setPending: (nextMatches: Array<AnyRouteMatch>) => void\n setCached: (nextMatches: Array<AnyRouteMatch>) => void\n}\n\nexport function createRouterStores<TRouteTree extends AnyRoute>(\n initialState: RouterState<TRouteTree>,\n config: StoreConfig,\n): RouterStores<TRouteTree> {\n const { createMutableStore, createReadonlyStore, batch, init } = config\n\n // non reactive utilities\n const matchStores = new Map<string, MatchStore>()\n const pendingMatchStores = new Map<string, MatchStore>()\n const cachedMatchStores = new Map<string, MatchStore>()\n\n // atoms\n const status = createMutableStore(initialState.status)\n const loadedAt = createMutableStore(initialState.loadedAt)\n const isLoading = createMutableStore(initialState.isLoading)\n const isTransitioning = createMutableStore(initialState.isTransitioning)\n const location = createMutableStore(initialState.location)\n const resolvedLocation = createMutableStore(initialState.resolvedLocation)\n const statusCode = createMutableStore(initialState.statusCode)\n const redirect = createMutableStore(initialState.redirect)\n const matchesId = createMutableStore<Array<string>>([])\n consLine truncated
@@ -0,0 +1,10 @@
/**
* This is a compatibility ruleset that:
* - disables rules from eslint:recommended which are already handled by TypeScript.
* - enables rules that make sense due to TS's typechecking / transpilation.
*/
declare const config: (style: "glob" | "minimatch") => {
files: string[];
rules: Record<string, "error" | "off" | "warn">;
};
export = config;