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

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

No files matched your search

@@ -0,0 +1 @@
{"version":3,"file":"navigation-2-off.js","sources":["../../../src/icons/navigation-2-off.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Navigation2Off\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNOS4zMSA5LjMxIDUgMjFsNy00IDcgNC0xLjE3LTMuMTciIC8+CiAgPHBhdGggZD0iTTE0LjUzIDguODggMTIgMmwtMS4xNyAzLjE3IiAvPgogIDxsaW5lIHgxPSIyIiB4Mj0iMjIiIHkxPSIyIiB5Mj0iMjIiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/navigation-2-off\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Navigation2Off = createLucideIcon('Navigation2Off', [\n ['path', { d: 'M9.31 9.31 5 21l7-4 7 4-1.17-3.17', key: 'qoq2o2' }],\n ['path', { d: 'M14.53 8.88 12 2l-1.17 3.17', key: 'k3sjzy' }],\n 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CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAClE,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,20 @@
import { Context } from "./context.js";
import { Hono } from "./hono.js";
//#region src/index.ts
/**
* @module
*
* Hono - Web Framework built on Web Standards
*
* @example
* ```ts
* import { Hono } from 'hono'
* const app = new Hono()
*
* app.get('/', (c) => c.text('Hono!'))
*
* export default app
* ```
*/
//#endregion
export { Context, Hono };
@@ -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 Scaling = createLucideIcon("Scaling", [
["path", { d: "M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7", key: "1m0v6g" }],
["path", { d: "M14 15H9v-5", key: "pi4jk9" }],
["path", { d: "M16 3h5v5", key: "1806ms" }],
["path", { d: "M21 3 9 15", key: "15kdhq" }]
]);
export { Scaling as default };
//# sourceMappingURL=scaling.js.map
@@ -0,0 +1,29 @@
{
"name": "inherits",
"description": "Browser-friendly inheritance fully compatible with standard node.js inherits()",
"version": "2.0.4",
"keywords": [
"inheritance",
"class",
"klass",
"oop",
"object-oriented",
"inherits",
"browser",
"browserify"
],
"main": "./inherits.js",
"browser": "./inherits_browser.js",
"repository": "git://github.com/isaacs/inherits",
"license": "ISC",
"scripts": {
"test": "tap"
},
"devDependencies": {
"tap": "^14.2.4"
},
"files": [
"inherits.js",
"inherits_browser.js"
]
}
@@ -0,0 +1 @@
{"version":3,"file":"file-chart-column.js","sources":["../../../src/icons/file-chart-column.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name FileChartColumn\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTUgMkg2YTIgMiAwIDAgMC0yIDJ2MTZhMiAyIDAgMCAwIDIgMmgxMmEyIDIgMCAwIDAgMi0yVjdaIiAvPgogIDxwYXRoIGQ9Ik0xNCAydjRhMiAyIDAgMCAwIDIgMmg0IiAvPgogIDxwYXRoIGQ9Ik04IDE4di0xIiAvPgogIDxwYXRoIGQ9Ik0xMiAxOHYtNiIgLz4KICA8cGF0aCBkPSJNMTYgMTh2LTMiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/file-chart-column\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 FileChartColumn = createLucideIcon('FileChartColumn', [\n ['path', { d: 'M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z', key: '1rqfz7' }],\n ['path', { d: 'M14 2v4a2 2 0 0 0 2 2h4', key: 'tnqrlb' }],\n ['path', { d: 'M8 18v-1', key: 'zg0ygc' }],\n ['path', { d: 'M12 18v-6', key: '17g6i2' }],\n ['path', { d: 'M16 18v-3', key: 'j5jt4h' }],\n]);\n\nexport default FileChartColumn;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA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,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC5C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,3 @@
import { Pack, PackSync } from './pack.js';
export declare const create: import("./make-command.js").TarCommand<Pack, PackSync>;
//# sourceMappingURL=create.d.ts.map
@@ -0,0 +1,10 @@
import { URISchemeHandler, URIComponents, URIOptions } from "../uri";
export interface URNComponents extends URIComponents {
nid?: string;
nss?: string;
}
export interface URNOptions extends URIOptions {
nid?: string;
}
declare const handler: URISchemeHandler<URNComponents, URNOptions>;
export default handler;
@@ -0,0 +1,9 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
export { default } from './square-plus.js';
//# sourceMappingURL=plus-square.js.map
@@ -0,0 +1,8 @@
import type { Options } from "../index";
export interface JSXPragmaInfo {
base: string;
suffix: string;
fragmentBase: string;
fragmentSuffix: string;
}
export default function getJSXPragmaInfo(options: Options): JSXPragmaInfo;
@@ -0,0 +1 @@
{"version":3,"file":"music-3.js","sources":["../../../src/icons/music-3.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Music3\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjE4IiByPSI0IiAvPgogIDxwYXRoIGQ9Ik0xNiAxOFYyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/music-3\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 Music3 = createLucideIcon('Music3', [\n ['circle', { cx: '12', cy: '18', r: '4', key: 'm3r9ws' }],\n ['path', { d: 'M16 18V2', key: '40x2m5' }],\n]);\n\nexport default Music3;\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,CACxC,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2021 Dany Castillo
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,7 @@
'use strict'
const SemVer = require('../classes/semver')
const compare = (a, b, loose) =>
new SemVer(a, loose).compare(new SemVer(b, loose))
module.exports = compare
@@ -0,0 +1,24 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.TargetNames = void 0;
const TargetNames = exports.TargetNames = {
node: "node",
deno: "deno",
chrome: "chrome",
opera: "opera",
edge: "edge",
firefox: "firefox",
safari: "safari",
ie: "ie",
ios: "ios",
android: "android",
electron: "electron",
samsung: "samsung",
rhino: "rhino",
opera_mobile: "opera_mobile"
};
//# sourceMappingURL=options.js.map
@@ -0,0 +1,986 @@
const require_dialects = require('./dialects-BGO_ZrYF.cjs');
//#region ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/deep-compare-strict.js
function deepCompareStrict(a, b) {
const typeofa = typeof a;
if (typeofa !== typeof b) return false;
if (Array.isArray(a)) {
if (!Array.isArray(b)) return false;
const length = a.length;
if (length !== b.length) return false;
for (let i = 0; i < length; i++) if (!deepCompareStrict(a[i], b[i])) return false;
return true;
}
if (typeofa === "object") {
if (!a || !b) return a === b;
const aKeys = Object.keys(a);
const bKeys = Object.keys(b);
if (aKeys.length !== bKeys.length) return false;
for (const k of aKeys) if (!deepCompareStrict(a[k], b[k])) return false;
return true;
}
return a === b;
}
//#endregion
//#region ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/pointer.js
function encodePointer(p) {
return encodeURI(escapePointer(p));
}
function escapePointer(p) {
return p.replace(/~/g, "~0").replace(/\//g, "~1");
}
//#endregion
//#region ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/dereference.js
const schemaArrayKeyword = {
prefixItems: true,
items: true,
allOf: true,
anyOf: true,
oneOf: true
};
const schemaMapKeyword = {
$defs: true,
definitions: true,
properties: true,
patternProperties: true,
dependentSchemas: true
};
const ignoredKeyword = {
id: true,
$id: true,
$ref: true,
$schema: true,
$anchor: true,
$vocabulary: true,
$comment: true,
default: true,
enum: true,
const: true,
required: true,
type: true,
maximum: true,
minimum: true,
exclusiveMaximum: true,
exclusiveMinimum: true,
multipleOf: true,
maxLength: true,
minLength: true,
pattern: true,
format: true,
maxItems: true,
minItems: true,
uniqueItems: true,
maxProperties: true,
minProperties: true
};
let initialBaseURI = typeof self !== "undefined" && self.location && self.location.origin !== "null" ? new URL(self.location.origin + self.location.pathname + location.search) : new URL("https://github.com/cfworker");
function dereference(schema, lookup = Object.create(null), baseURI = initialBaseURI, basePointer = "") {
if (schema && typeof schema === "object" && !Array.isArray(schema)) {
const id = schema.$id || schema.id;
if (id) {
const url = new URL(id, baseURI.href);
if (url.hash.length > 1) lookup[url.href] = schema;
else {
url.hash = "";
if (basePointer === "") baseURI = url;
else dereference(schema, lookup, baseURI);
}
}
} else if (schema !== true && schema !== false) return lookup;
const schemaURI = baseURI.href + (basePointer ? "#" + basePointer : "");
if (lookup[schemaURI] !== void 0) throw new Error(`Duplicate schema URI "${schemaURI}".`);
lookup[schemaURI] = schema;
if (schema === true || schema === false) return lookup;
if (schema.__absolute_uri__ === void 0) Object.defineProperty(schema, "__absolute_uri__", {
enumerable: false,
value: schemaURI
});
if (schema.$ref && schema.__absolute_ref__ === void 0) {
const url = new URL(schema.$ref, baseURI.href);
url.hash = url.hash;
Object.defineProperty(schema, "__absolute_ref__", {
enumerable: false,
value: url.href
});
}
if (schema.$recursiveRef && schema.__absolute_recursive_ref__ === void 0) {
const url = new URL(schema.$recursiveRef, baseURI.href);
url.hash = url.hash;
Object.defineProperty(schema, "__absolute_recursive_ref__", {
enumerable: false,
value: url.href
});
}
if (schema.$anchor) {
const url = new URL("#" + schema.$anchor, baseURI.href);
lookup[url.href] = schema;
}
for (let key in schema) {
if (ignoredKeyword[key]) continue;
const keyBase = `${basePointer}/${encodePointer(key)}`;
const subSchema = schema[key];
if (Array.isArray(subSchema)) {
if (schemaArrayKeyword[key]) {
const length = subSchema.length;
for (let i = 0; i < length; i++) dereference(subSchema[i], lookup, baseURI, `${keyBase}/${i}`);
}
} else if (schemaMapKeyword[key]) for (let subKey in subSchema) dereference(subSchema[subKey], lookup, baseURI, `${keyBase}/${encodePointer(subKey)}`);
else dereference(subSchema, lookup, baseURI, keyBase);
}
return lookup;
}
//#endregion
//#region ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/format.js
const DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/;
const DAYS = [
0,
31,
28,
31,
30,
31,
30,
31,
31,
30,
31,
30,
31
];
const TIME = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;
const HOSTNAME = /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i;
const URIREF = /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?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&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
const URITEMPLATE = /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i;
const URL_ = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu;
const UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;
const JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$/;
const JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;
const RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;
const EMAIL = (input) => {
if (input[0] === "\"") return false;
const [name, host, ...rest] = input.split("@");
if (!name || !host || rest.length !== 0 || name.length > 64 || host.length > 253) return false;
if (name[0] === "." || name.endsWith(".") || name.includes("..")) return false;
if (!/^[a-z0-9.-]+$/i.test(host) || !/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+$/i.test(name)) return false;
return host.split(".").every((part) => /^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(part));
};
const IPV4 = /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/;
const IPV6 = /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i;
const DURATION = (input) => input.length > 1 && input.length < 80 && (/^P\d+([.,]\d+)?W$/.test(input) || /^P[\dYMDTHS]*(\d[.,]\d+)?[YMDHS]$/.test(input) && /^P([.,\d]+Y)?([.,\d]+M)?([.,\d]+D)?(T([.,\d]+H)?([.,\d]+M)?([.,\d]+S)?)?$/.test(input));
function bind(r) {
return r.test.bind(r);
}
const format = {
date,
time: time.bind(void 0, false),
"date-time": date_time,
duration: DURATION,
uri,
"uri-reference": bind(URIREF),
"uri-template": bind(URITEMPLATE),
url: bind(URL_),
email: EMAIL,
hostname: bind(HOSTNAME),
ipv4: bind(IPV4),
ipv6: bind(IPV6),
regex,
uuid: bind(UUID),
"json-pointer": bind(JSON_POINTER),
"json-pointer-uri-fragment": bind(JSON_POINTER_URI_FRAGMENT),
"relative-json-pointer": bind(RELATIVE_JSON_POINTER)
};
function isLeapYear(year) {
return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
}
function date(str) {
const matches = str.match(DATE);
if (!matches) return false;
const year = +matches[1];
const month = +matches[2];
const day = +matches[3];
return month >= 1 && month <= 12 && day >= 1 && day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]);
}
function time(full, str) {
const matches = str.match(TIME);
if (!matches) return false;
const hour = +matches[1];
const minute = +matches[2];
const second = +matches[3];
const timeZone = !!matches[5];
return (hour <= 23 && minute <= 59 && second <= 59 || hour == 23 && minute == 59 && second == 60) && (!full || timeZone);
}
const DATE_TIME_SEPARATOR = /t|\s/i;
function date_time(str) {
const dateTime = str.split(DATE_TIME_SEPARATOR);
return dateTime.length == 2 && date(dateTime[0]) && time(true, dateTime[1]);
}
const NOT_URI_FRAGMENT = /\/|:/;
const URI_PATTERN = /^(?:[a-z][a-z0-9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z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
function uri(str) {
return NOT_URI_FRAGMENT.test(str) && URI_PATTERN.test(str);
}
const Z_ANCHOR = /[^\\]\\Z/;
function regex(str) {
if (Z_ANCHOR.test(str)) return false;
try {
new RegExp(str, "u");
return true;
} catch (e) {
return false;
}
}
//#endregion
//#region ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/ucs2-length.js
function ucs2length(s) {
let result = 0;
let length = s.length;
let index = 0;
let charCode;
while (index < length) {
result++;
charCode = s.charCodeAt(index++);
if (charCode >= 55296 && charCode <= 56319 && index < length) {
charCode = s.charCodeAt(index);
if ((charCode & 64512) == 56320) index++;
}
}
return result;
}
//#endregion
//#region ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/validate.js
function validate(instance, schema, draft = "2019-09", lookup = dereference(schema), shortCircuit = true, recursiveAnchor = null, instanceLocation = "#", schemaLocation = "#", evaluated = Object.create(null)) {
if (schema === true) return {
valid: true,
errors: []
};
if (schema === false) return {
valid: false,
errors: [{
instanceLocation,
keyword: "false",
keywordLocation: instanceLocation,
error: "False boolean schema."
}]
};
const rawInstanceType = typeof instance;
let instanceType;
switch (rawInstanceType) {
case "boolean":
case "number":
case "string":
instanceType = rawInstanceType;
break;
case "object":
if (instance === null) instanceType = "null";
else if (Array.isArray(instance)) instanceType = "array";
else instanceType = "object";
break;
default: throw new Error(`Instances of "${rawInstanceType}" type are not supported.`);
}
const { $ref, $recursiveRef, $recursiveAnchor, type: $type, const: $const, enum: $enum, required: $required, not: $not, anyOf: $anyOf, allOf: $allOf, oneOf: $oneOf, if: $if, then: $then, else: $else, format: $format, properties: $properties, patternProperties: $patternProperties, additionalProperties: $additionalProperties, unevaluatedProperties: $unevaluatedProperties, minProperties: $minProperties, maxProperties: $maxProperties, propertyNames: $propertyNames, dependentRequired: $dependentRequired, dependentSchemas: $dependentSchemas, dependencies: $dependencies, prefixItems: $prefixItems, items: $items, additionalItems: $additionalItems, unevaluatedItems: $unevaluatedItems, contains: $contains, minContains: $minContains, maxContains: $maxContains, minItems: $minItems, maxItems: $maxItems, uniqueItems: $uniqueItems, minimum: $minimum, maximum: $maximum, exclusiveMinimum: $exclusiveMinimum, exclusiveMaximum: $exclusiveMaximum, multipleOf: $multipleOf, minLength: $minLength, maxLength: $maxLength, pattern: $pattern, __absolute_ref__, __absolute_recursive_ref__ } = schema;
const errors = [];
if ($recursiveAnchor === true && recursiveAnchor === null) recursiveAnchor = schema;
if ($recursiveRef === "#") {
const refSchema = recursiveAnchor === null ? lookup[__absolute_recursive_ref__] : recursiveAnchor;
const keywordLocation = `${schemaLocation}/$recursiveRef`;
const result = validate(instance, recursiveAnchor === null ? schema : recursiveAnchor, draft, lookup, shortCircuit, refSchema, instanceLocation, keywordLocation, evaluated);
if (!result.valid) errors.push({
instanceLocation,
keyword: "$recursiveRef",
keywordLocation,
error: "A subschema had errors."
}, ...result.errors);
}
if ($ref !== void 0) {
const refSchema = lookup[__absolute_ref__ || $ref];
if (refSchema === void 0) {
let message = `Unresolved $ref "${$ref}".`;
if (__absolute_ref__ && __absolute_ref__ !== $ref) message += ` Absolute URI "${__absolute_ref__}".`;
message += `\nKnown schemas:\n- ${Object.keys(lookup).join("\n- ")}`;
throw new Error(message);
}
const keywordLocation = `${schemaLocation}/$ref`;
const result = validate(instance, refSchema, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, keywordLocation, evaluated);
if (!result.valid) errors.push({
instanceLocation,
keyword: "$ref",
keywordLocation,
error: "A subschema had errors."
}, ...result.errors);
if (draft === "4" || draft === "7") return {
valid: errors.length === 0,
errors
};
}
if (Array.isArray($type)) {
let length = $type.length;
let valid = false;
for (let i = 0; i < length; i++) if (instanceType === $type[i] || $type[i] === "integer" && instanceType === "number" && instance % 1 === 0 && instance === instance) {
valid = true;
break;
}
if (!valid) errors.push({
instanceLocation,
keyword: "type",
keywordLocation: `${schemaLocation}/type`,
error: `Instance type "${instanceType}" is invalid. Expected "${$type.join("\", \"")}".`
});
} else if ($type === "integer") {
if (instanceType !== "number" || instance % 1 || instance !== instance) errors.push({
instanceLocation,
keyword: "type",
keywordLocation: `${schemaLocation}/type`,
error: `Instance type "${instanceType}" is invalid. Expected "${$type}".`
});
} else if ($type !== void 0 && instanceType !== $type) errors.push({
instanceLocation,
keyword: "type",
keywordLocation: `${schemaLocation}/type`,
error: `Instance type "${instanceType}" is invalid. Expected "${$type}".`
});
if ($const !== void 0) {
if (instanceType === "object" || instanceType === "array") {
if (!deepCompareStrict(instance, $const)) errors.push({
instanceLocation,
keyword: "const",
keywordLocation: `${schemaLocation}/const`,
error: `Instance does not match ${JSON.stringify($const)}.`
});
} else if (instance !== $const) errors.push({
instanceLocation,
keyword: "const",
keywordLocation: `${schemaLocation}/const`,
error: `Instance does not match ${JSON.stringify($const)}.`
});
}
if ($enum !== void 0) {
if (instanceType === "object" || instanceType === "array") {
if (!$enum.some((value) => deepCompareStrict(instance, value))) errors.push({
instanceLocation,
keyword: "enum",
keywordLocation: `${schemaLocation}/enum`,
error: `Instance does not match any of ${JSON.stringify($enum)}.`
});
} else if (!$enum.some((value) => instance === value)) errors.push({
instanceLocation,
keyword: "enum",
keywordLocation: `${schemaLocation}/enum`,
error: `Instance does not match any of ${JSON.stringify($enum)}.`
});
}
if ($not !== void 0) {
const keywordLocation = `${schemaLocation}/not`;
if (validate(instance, $not, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, keywordLocation).valid) errors.push({
instanceLocation,
keyword: "not",
keywordLocation,
error: "Instance matched \"not\" schema."
});
}
let subEvaluateds = [];
if ($anyOf !== void 0) {
const keywordLocation = `${schemaLocation}/anyOf`;
const errorsLength = errors.length;
let anyValid = false;
for (let i = 0; i < $anyOf.length; i++) {
const subSchema = $anyOf[i];
const subEvaluated = Object.create(evaluated);
const result = validate(instance, subSchema, draft, lookup, shortCircuit, $recursiveAnchor === true ? recursiveAnchor : null, instanceLocation, `${keywordLocation}/${i}`, subEvaluated);
errors.push(...result.errors);
anyValid = anyValid || result.valid;
if (result.valid) subEvaluateds.push(subEvaluated);
}
if (anyValid) errors.length = errorsLength;
else errors.splice(errorsLength, 0, {
instanceLocation,
keyword: "anyOf",
keywordLocation,
error: "Instance does not match any subschemas."
});
}
if ($allOf !== void 0) {
const keywordLocation = `${schemaLocation}/allOf`;
const errorsLength = errors.length;
let allValid = true;
for (let i = 0; i < $allOf.length; i++) {
const subSchema = $allOf[i];
const subEvaluated = Object.create(evaluated);
const result = validate(instance, subSchema, draft, lookup, shortCircuit, $recursiveAnchor === true ? recursiveAnchor : null, instanceLocation, `${keywordLocation}/${i}`, subEvaluated);
errors.push(...result.errors);
allValid = allValid && result.valid;
if (result.valid) subEvaluateds.push(subEvaluated);
}
if (allValid) errors.length = errorsLength;
else errors.splice(errorsLength, 0, {
instanceLocation,
keyword: "allOf",
keywordLocation,
error: `Instance does not match every subschema.`
});
}
if ($oneOf !== void 0) {
const keywordLocation = `${schemaLocation}/oneOf`;
const errorsLength = errors.length;
const matches = $oneOf.filter((subSchema, i) => {
const subEvaluated = Object.create(evaluated);
const result = validate(instance, subSchema, draft, lookup, shortCircuit, $recursiveAnchor === true ? recursiveAnchor : null, instanceLocation, `${keywordLocation}/${i}`, subEvaluated);
errors.push(...result.errors);
if (result.valid) subEvaluateds.push(subEvaluated);
return result.valid;
}).length;
if (matches === 1) errors.length = errorsLength;
else errors.splice(errorsLength, 0, {
instanceLocation,
keyword: "oneOf",
keywordLocation,
error: `Instance does not match exactly one subschema (${matches} matches).`
});
}
if (instanceType === "object" || instanceType === "array") Object.assign(evaluated, ...subEvaluateds);
if ($if !== void 0) {
const keywordLocation = `${schemaLocation}/if`;
if (validate(instance, $if, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, keywordLocation, evaluated).valid) {
if ($then !== void 0) {
const thenResult = validate(instance, $then, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, `${schemaLocation}/then`, evaluated);
if (!thenResult.valid) errors.push({
instanceLocation,
keyword: "if",
keywordLocation,
error: `Instance does not match "then" schema.`
}, ...thenResult.errors);
}
} else if ($else !== void 0) {
const elseResult = validate(instance, $else, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, `${schemaLocation}/else`, evaluated);
if (!elseResult.valid) errors.push({
instanceLocation,
keyword: "if",
keywordLocation,
error: `Instance does not match "else" schema.`
}, ...elseResult.errors);
}
}
if (instanceType === "object") {
if ($required !== void 0) {
for (const key of $required) if (!(key in instance)) errors.push({
instanceLocation,
keyword: "required",
keywordLocation: `${schemaLocation}/required`,
error: `Instance does not have required property "${key}".`
});
}
const keys = Object.keys(instance);
if ($minProperties !== void 0 && keys.length < $minProperties) errors.push({
instanceLocation,
keyword: "minProperties",
keywordLocation: `${schemaLocation}/minProperties`,
error: `Instance does not have at least ${$minProperties} properties.`
});
if ($maxProperties !== void 0 && keys.length > $maxProperties) errors.push({
instanceLocation,
keyword: "maxProperties",
keywordLocation: `${schemaLocation}/maxProperties`,
error: `Instance does not have at least ${$maxProperties} properties.`
});
if ($propertyNames !== void 0) {
const keywordLocation = `${schemaLocation}/propertyNames`;
for (const key in instance) {
const subInstancePointer = `${instanceLocation}/${encodePointer(key)}`;
const result = validate(key, $propertyNames, draft, lookup, shortCircuit, recursiveAnchor, subInstancePointer, keywordLocation);
if (!result.valid) errors.push({
instanceLocation,
keyword: "propertyNames",
keywordLocation,
error: `Property name "${key}" does not match schema.`
}, ...result.errors);
}
}
if ($dependentRequired !== void 0) {
const keywordLocation = `${schemaLocation}/dependantRequired`;
for (const key in $dependentRequired) if (key in instance) {
const required = $dependentRequired[key];
for (const dependantKey of required) if (!(dependantKey in instance)) errors.push({
instanceLocation,
keyword: "dependentRequired",
keywordLocation,
error: `Instance has "${key}" but does not have "${dependantKey}".`
});
}
}
if ($dependentSchemas !== void 0) for (const key in $dependentSchemas) {
const keywordLocation = `${schemaLocation}/dependentSchemas`;
if (key in instance) {
const result = validate(instance, $dependentSchemas[key], draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, `${keywordLocation}/${encodePointer(key)}`, evaluated);
if (!result.valid) errors.push({
instanceLocation,
keyword: "dependentSchemas",
keywordLocation,
error: `Instance has "${key}" but does not match dependant schema.`
}, ...result.errors);
}
}
if ($dependencies !== void 0) {
const keywordLocation = `${schemaLocation}/dependencies`;
for (const key in $dependencies) if (key in instance) {
const propsOrSchema = $dependencies[key];
if (Array.isArray(propsOrSchema)) {
for (const dependantKey of propsOrSchema) if (!(dependantKey in instance)) errors.push({
instanceLocation,
keyword: "dependencies",
keywordLocation,
error: `Instance has "${key}" but does not have "${dependantKey}".`
});
} else {
const result = validate(instance, propsOrSchema, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, `${keywordLocation}/${encodePointer(key)}`);
if (!result.valid) errors.push({
instanceLocation,
keyword: "dependencies",
keywordLocation,
error: `Instance has "${key}" but does not match dependant schema.`
}, ...result.errors);
}
}
}
const thisEvaluated = Object.create(null);
let stop = false;
if ($properties !== void 0) {
const keywordLocation = `${schemaLocation}/properties`;
for (const key in $properties) {
if (!(key in instance)) continue;
const subInstancePointer = `${instanceLocation}/${encodePointer(key)}`;
const result = validate(instance[key], $properties[key], draft, lookup, shortCircuit, recursiveAnchor, subInstancePointer, `${keywordLocation}/${encodePointer(key)}`);
if (result.valid) evaluated[key] = thisEvaluated[key] = true;
else {
stop = shortCircuit;
errors.push({
instanceLocation,
keyword: "properties",
keywordLocation,
error: `Property "${key}" does not match schema.`
}, ...result.errors);
if (stop) break;
}
}
}
if (!stop && $patternProperties !== void 0) {
const keywordLocation = `${schemaLocation}/patternProperties`;
for (const pattern in $patternProperties) {
const regex$1 = new RegExp(pattern, "u");
const subSchema = $patternProperties[pattern];
for (const key in instance) {
if (!regex$1.test(key)) continue;
const subInstancePointer = `${instanceLocation}/${encodePointer(key)}`;
const result = validate(instance[key], subSchema, draft, lookup, shortCircuit, recursiveAnchor, subInstancePointer, `${keywordLocation}/${encodePointer(pattern)}`);
if (result.valid) evaluated[key] = thisEvaluated[key] = true;
else {
stop = shortCircuit;
errors.push({
instanceLocation,
keyword: "patternProperties",
keywordLocation,
error: `Property "${key}" matches pattern "${pattern}" but does not match associated schema.`
}, ...result.errors);
}
}
}
}
if (!stop && $additionalProperties !== void 0) {
const keywordLocation = `${schemaLocation}/additionalProperties`;
for (const key in instance) {
if (thisEvaluated[key]) continue;
const subInstancePointer = `${instanceLocation}/${encodePointer(key)}`;
const result = validate(instance[key], $additionalProperties, draft, lookup, shortCircuit, recursiveAnchor, subInstancePointer, keywordLocation);
if (result.valid) evaluated[key] = true;
else {
stop = shortCircuit;
errors.push({
instanceLocation,
keyword: "additionalProperties",
keywordLocation,
error: `Property "${key}" does not match additional properties schema.`
}, ...result.errors);
}
}
} else if (!stop && $unevaluatedProperties !== void 0) {
const keywordLocation = `${schemaLocation}/unevaluatedProperties`;
for (const key in instance) if (!evaluated[key]) {
const subInstancePointer = `${instanceLocation}/${encodePointer(key)}`;
const result = validate(instance[key], $unevaluatedProperties, draft, lookup, shortCircuit, recursiveAnchor, subInstancePointer, keywordLocation);
if (result.valid) evaluated[key] = true;
else errors.push({
instanceLocation,
keyword: "unevaluatedProperties",
keywordLocation,
error: `Property "${key}" does not match unevaluated properties schema.`
}, ...result.errors);
}
}
} else if (instanceType === "array") {
if ($maxItems !== void 0 && instance.length > $maxItems) errors.push({
instanceLocation,
keyword: "maxItems",
keywordLocation: `${schemaLocation}/maxItems`,
error: `Array has too many items (${instance.length} > ${$maxItems}).`
});
if ($minItems !== void 0 && instance.length < $minItems) errors.push({
instanceLocation,
keyword: "minItems",
keywordLocation: `${schemaLocation}/minItems`,
error: `Array has too few items (${instance.length} < ${$minItems}).`
});
const length = instance.length;
let i = 0;
let stop = false;
if ($prefixItems !== void 0) {
const keywordLocation = `${schemaLocation}/prefixItems`;
const length2 = Math.min($prefixItems.length, length);
for (; i < length2; i++) {
const result = validate(instance[i], $prefixItems[i], draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${i}`, `${keywordLocation}/${i}`);
evaluated[i] = true;
if (!result.valid) {
stop = shortCircuit;
errors.push({
instanceLocation,
keyword: "prefixItems",
keywordLocation,
error: `Items did not match schema.`
}, ...result.errors);
if (stop) break;
}
}
}
if ($items !== void 0) {
const keywordLocation = `${schemaLocation}/items`;
if (Array.isArray($items)) {
const length2 = Math.min($items.length, length);
for (; i < length2; i++) {
const result = validate(instance[i], $items[i], draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${i}`, `${keywordLocation}/${i}`);
evaluated[i] = true;
if (!result.valid) {
stop = shortCircuit;
errors.push({
instanceLocation,
keyword: "items",
keywordLocation,
error: `Items did not match schema.`
}, ...result.errors);
if (stop) break;
}
}
} else for (; i < length; i++) {
const result = validate(instance[i], $items, draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${i}`, keywordLocation);
evaluated[i] = true;
if (!result.valid) {
stop = shortCircuit;
errors.push({
instanceLocation,
keyword: "items",
keywordLocation,
error: `Items did not match schema.`
}, ...result.errors);
if (stop) break;
}
}
if (!stop && $additionalItems !== void 0) {
const keywordLocation$1 = `${schemaLocation}/additionalItems`;
for (; i < length; i++) {
const result = validate(instance[i], $additionalItems, draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${i}`, keywordLocation$1);
evaluated[i] = true;
if (!result.valid) {
stop = shortCircuit;
errors.push({
instanceLocation,
keyword: "additionalItems",
keywordLocation: keywordLocation$1,
error: `Items did not match additional items schema.`
}, ...result.errors);
}
}
}
}
if ($contains !== void 0) if (length === 0 && $minContains === void 0) errors.push({
instanceLocation,
keyword: "contains",
keywordLocation: `${schemaLocation}/contains`,
error: `Array is empty. It must contain at least one item matching the schema.`
});
else if ($minContains !== void 0 && length < $minContains) errors.push({
instanceLocation,
keyword: "minContains",
keywordLocation: `${schemaLocation}/minContains`,
error: `Array has less items (${length}) than minContains (${$minContains}).`
});
else {
const keywordLocation = `${schemaLocation}/contains`;
const errorsLength = errors.length;
let contained = 0;
for (let j = 0; j < length; j++) {
const result = validate(instance[j], $contains, draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${j}`, keywordLocation);
if (result.valid) {
evaluated[j] = true;
contained++;
} else errors.push(...result.errors);
}
if (contained >= ($minContains || 0)) errors.length = errorsLength;
if ($minContains === void 0 && $maxContains === void 0 && contained === 0) errors.splice(errorsLength, 0, {
instanceLocation,
keyword: "contains",
keywordLocation,
error: `Array does not contain item matching schema.`
});
else if ($minContains !== void 0 && contained < $minContains) errors.push({
instanceLocation,
keyword: "minContains",
keywordLocation: `${schemaLocation}/minContains`,
error: `Array must contain at least ${$minContains} items matching schema. Only ${contained} items were found.`
});
else if ($maxContains !== void 0 && contained > $maxContains) errors.push({
instanceLocation,
keyword: "maxContains",
keywordLocation: `${schemaLocation}/maxContains`,
error: `Array may contain at most ${$maxContains} items matching schema. ${contained} items were found.`
});
}
if (!stop && $unevaluatedItems !== void 0) {
const keywordLocation = `${schemaLocation}/unevaluatedItems`;
for (; i < length; i++) {
if (evaluated[i]) continue;
const result = validate(instance[i], $unevaluatedItems, draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${i}`, keywordLocation);
evaluated[i] = true;
if (!result.valid) errors.push({
instanceLocation,
keyword: "unevaluatedItems",
keywordLocation,
error: `Items did not match unevaluated items schema.`
}, ...result.errors);
}
}
if ($uniqueItems) for (let j = 0; j < length; j++) {
const a = instance[j];
const ao = typeof a === "object" && a !== null;
for (let k = 0; k < length; k++) {
if (j === k) continue;
const b = instance[k];
if (a === b || ao && typeof b === "object" && b !== null && deepCompareStrict(a, b)) {
errors.push({
instanceLocation,
keyword: "uniqueItems",
keywordLocation: `${schemaLocation}/uniqueItems`,
error: `Duplicate items at indexes ${j} and ${k}.`
});
j = Number.MAX_SAFE_INTEGER;
k = Number.MAX_SAFE_INTEGER;
}
}
}
} else if (instanceType === "number") {
if (draft === "4") {
if ($minimum !== void 0 && ($exclusiveMinimum === true && instance <= $minimum || instance < $minimum)) errors.push({
instanceLocation,
keyword: "minimum",
keywordLocation: `${schemaLocation}/minimum`,
error: `${instance} is less than ${$exclusiveMinimum ? "or equal to " : ""} ${$minimum}.`
});
if ($maximum !== void 0 && ($exclusiveMaximum === true && instance >= $maximum || instance > $maximum)) errors.push({
instanceLocation,
keyword: "maximum",
keywordLocation: `${schemaLocation}/maximum`,
error: `${instance} is greater than ${$exclusiveMaximum ? "or equal to " : ""} ${$maximum}.`
});
} else {
if ($minimum !== void 0 && instance < $minimum) errors.push({
instanceLocation,
keyword: "minimum",
keywordLocation: `${schemaLocation}/minimum`,
error: `${instance} is less than ${$minimum}.`
});
if ($maximum !== void 0 && instance > $maximum) errors.push({
instanceLocation,
keyword: "maximum",
keywordLocation: `${schemaLocation}/maximum`,
error: `${instance} is greater than ${$maximum}.`
});
if ($exclusiveMinimum !== void 0 && instance <= $exclusiveMinimum) errors.push({
instanceLocation,
keyword: "exclusiveMinimum",
keywordLocation: `${schemaLocation}/exclusiveMinimum`,
error: `${instance} is less than ${$exclusiveMinimum}.`
});
if ($exclusiveMaximum !== void 0 && instance >= $exclusiveMaximum) errors.push({
instanceLocation,
keyword: "exclusiveMaximum",
keywordLocation: `${schemaLocation}/exclusiveMaximum`,
error: `${instance} is greater than or equal to ${$exclusiveMaximum}.`
});
}
if ($multipleOf !== void 0) {
const remainder = instance % $multipleOf;
if (Math.abs(0 - remainder) >= 1.1920929e-7 && Math.abs($multipleOf - remainder) >= 1.1920929e-7) errors.push({
instanceLocation,
keyword: "multipleOf",
keywordLocation: `${schemaLocation}/multipleOf`,
error: `${instance} is not a multiple of ${$multipleOf}.`
});
}
} else if (instanceType === "string") {
const length = $minLength === void 0 && $maxLength === void 0 ? 0 : ucs2length(instance);
if ($minLength !== void 0 && length < $minLength) errors.push({
instanceLocation,
keyword: "minLength",
keywordLocation: `${schemaLocation}/minLength`,
error: `String is too short (${length} < ${$minLength}).`
});
if ($maxLength !== void 0 && length > $maxLength) errors.push({
instanceLocation,
keyword: "maxLength",
keywordLocation: `${schemaLocation}/maxLength`,
error: `String is too long (${length} > ${$maxLength}).`
});
if ($pattern !== void 0 && !new RegExp($pattern, "u").test(instance)) errors.push({
instanceLocation,
keyword: "pattern",
keywordLocation: `${schemaLocation}/pattern`,
error: `String does not match pattern.`
});
if ($format !== void 0 && format[$format] && !format[$format](instance)) errors.push({
instanceLocation,
keyword: "format",
keywordLocation: `${schemaLocation}/format`,
error: `String does not match format "${$format}".`
});
}
return {
valid: errors.length === 0,
errors
};
}
//#endregion
//#region ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/validator.js
var Validator = class {
schema;
draft;
shortCircuit;
lookup;
constructor(schema, draft = "2019-09", shortCircuit = true) {
this.schema = schema;
this.draft = draft;
this.shortCircuit = shortCircuit;
this.lookup = dereference(schema);
}
validate(instance) {
return validate(instance, this.schema, this.draft, this.lookup, this.shortCircuit);
}
addSchema(schema, id) {
if (id) schema = {
...schema,
$id: id
};
dereference(schema, this.lookup);
}
};
//#endregion
//#region ../core-internal/src/validators/cfWorkerProvider.ts
/**
* Cloudflare Worker-compatible JSON Schema validator provider
*
* This provider uses @cfworker/json-schema for validation without code generation,
* making it compatible with edge runtimes like Cloudflare Workers that restrict
* eval and new Function.
*
* @see {@linkcode AjvJsonSchemaValidator} for the Node.js alternative
*/
/**
* `@cfworker/json-schema`-backed JSON Schema validator. See
* `@modelcontextprotocol/{client,server}/validators/cf-worker` for the customisation entry point.
*
* Default dispatches on the schema's declared dialect: no `$schema` or 2020-12 → `'2020-12'`
* (SEP-1613); 2019-09 → `'2019-09'`; draft-07 or draft-06 → `'7'`. Schemas declaring any other `$schema` are rejected
* with a plain `Error`. Passing an explicit `draft` to the constructor
* overrides this — that draft is used for every schema regardless of `$schema`.
*
* Known draft-07 engine gap: `@cfworker/json-schema` does not treat draft-07 `dependencies` as
* a name→subschema map during `$ref` collection, so a dependency entry whose KEY collides with
* a JSON Schema keyword (`type`, `default`, `format`, `required`, `pattern`, …) and whose
* subschema contains a `$ref` throws `Unresolved $ref` at validation time when the dependency
* triggers — data-dependently, not at compile. The Node (classic Ajv) engine handles the same
* schema correctly. Callers that hit this receive the SDK's typed validation error (the throw
* is captured by the validation paths), and the deviation is pinned by a recorded-contract test.
*
* @example Use with default configuration (2020-12, shortcircuit on)
* ```ts source="./cfWorkerProvider.examples.ts#CfWorkerJsonSchemaValidator_default"
* const validator = new CfWorkerJsonSchemaValidator();
* ```
*
* @example Use with custom configuration
* ```ts source="./cfWorkerProvider.examples.ts#CfWorkerJsonSchemaValidator_customConfig"
* const validator = new CfWorkerJsonSchemaValidator({
* draft: '2020-12',
* shortcircuit: false // Report all errors
* });
* ```
*/
var CfWorkerJsonSchemaValidator = class {
shortcircuit;
/** Caller-supplied draft; when set, the `$schema` check is skipped (caller owns dialect). */
draft;
/**
* Create a validator
*
* @param options - Configuration options
* @param options.shortcircuit - If `true`, stop validation after first error (default: `true`)
* @param options.draft - JSON Schema draft version to force for every schema. When set, the
* `$schema` dispatch is skipped. When omitted, the provider dispatches on each schema's
* declared `$schema` (2020-12, 2019-09, draft-07, draft-06; absent means 2020-12) and rejects others.
*/
constructor(options) {
this.shortcircuit = options?.shortcircuit ?? true;
this.draft = options?.draft;
}
/**
* Pick the engine draft for a schema's declared dialect (a caller-forced `{draft}` bypasses
* this — do not second-guess by `$schema`). No `$schema` or 2020-12 → `'2020-12'`; 2019-09 →
* `'2019-09'`; draft-07 or draft-06 → `'7'`; anything else → `Error`.
*/
_draftFor(schema) {
const dialect = require_dialects.declaredDialect(schema, "pass an explicit { draft } to CfWorkerJsonSchemaValidator to validate other dialects.");
return dialect === "draft-7" ? "7" : dialect;
}
/**
* Create a validator for the given JSON Schema
*
* Unlike AJV, this validator is not cached internally
*
* @param schema - Standard JSON Schema object
* @returns A validator function that validates input data
*/
getValidator(schema) {
const validator = new Validator(schema, this.draft ?? this._draftFor(schema), this.shortcircuit);
return (input) => {
const result = validator.validate(input);
return result.valid ? {
valid: true,
data: input,
errorMessage: void 0
} : {
valid: false,
data: void 0,
errorMessage: result.errors.map((err) => `${err.instanceLocation}: ${err.error}`).join("; ")
};
};
}
};
//#endregion
Object.defineProperty(exports, 'CfWorkerJsonSchemaValidator', {
enumerable: true,
get: function () {
return CfWorkerJsonSchemaValidator;
}
});
//# sourceMappingURL=cfWorkerProvider-B3dvjU3F.cjs.map
@@ -0,0 +1,111 @@
import { f as createRule, g as import_ast_utils, h as AST_TOKEN_TYPES, m as AST_NODE_TYPES } from "../utils.js";
const UNIONS = ["|", "&"];
var space_infix_ops_default = createRule({
name: "space-infix-ops",
meta: {
type: "layout",
docs: { description: "Require spacing around infix operators" },
fixable: "whitespace",
schema: [{
type: "object",
properties: {
int32Hint: { type: "boolean" },
ignoreTypes: { type: "boolean" }
},
additionalProperties: false
}],
defaultOptions: [{
int32Hint: false,
ignoreTypes: false
}],
messages: { missingSpace: "Operator '{{operator}}' must be spaced." }
},
create(context, [options]) {
const { int32Hint, ignoreTypes } = options;
const sourceCode = context.sourceCode;
function report(node, operator) {
context.report({
node,
loc: operator.loc,
messageId: "missingSpace",
data: { operator: operator.value },
fix(fixer) {
const previousToken = sourceCode.getTokenBefore(operator);
const afterToken = sourceCode.getTokenAfter(operator);
let fixString = "";
if (operator.range[0] - previousToken.range[1] === 0) fixString = " ";
fixString += operator.value;
if (afterToken.range[0] - operator.range[1] === 0) fixString += " ";
return fixer.replaceText(operator, fixString);
}
});
}
function getFirstNonSpacedToken(left, right, op) {
const operator = sourceCode.getFirstTokenBetween(left, right, (token) => token.value === op);
const prev = sourceCode.getTokenBefore(operator);
const next = sourceCode.getTokenAfter(operator);
if (!sourceCode.isSpaceBetween(prev, operator) || !sourceCode.isSpaceBetween(operator, next)) return operator;
return null;
}
function checkBinary(node) {
const leftNode = "typeAnnotation" in node.left && node.left.typeAnnotation ? node.left.typeAnnotation : node.left;
const rightNode = node.right;
const nonSpacedNode = getFirstNonSpacedToken(leftNode, rightNode, "operator" in node && node.operator ? node.operator : "=");
if (nonSpacedNode) {
if (!(int32Hint && sourceCode.getText(node).endsWith("|0"))) report(node, nonSpacedNode);
}
}
function isSpaceChar(token) {
return token.type === AST_TOKEN_TYPES.Punctuator && /^[=?:]$/.test(token.value);
}
function checkAndReportAssignmentSpace(node, leftNode, rightNode) {
if (!rightNode || !leftNode) return;
const operator = sourceCode.getFirstTokenBetween(leftNode, rightNode, isSpaceChar);
const prev = sourceCode.getTokenBefore(operator);
const next = sourceCode.getTokenAfter(operator);
if (!sourceCode.isSpaceBetween(prev, operator) || !sourceCode.isSpaceBetween(operator, next)) report(node, operator);
}
function checkPropertyAssignment(node) {
checkAndReportAssignmentSpace(node, node.optional && !node.typeAnnotation ? sourceCode.getTokenAfter(node.key) : node.typeAnnotation ?? node.key, node.value);
}
function checkTSBinary(typeAnnotation) {
typeAnnotation.types.forEach((type) => {
const skipFunctionParenthesis = type.type === AST_NODE_TYPES.TSFunctionType ? import_ast_utils.isNotOpeningParenToken : 0;
const operator = sourceCode.getTokenBefore(type, skipFunctionParenthesis);
if (!ignoreTypes && operator != null && UNIONS.includes(operator.value)) {
const prev = sourceCode.getTokenBefore(operator);
const next = sourceCode.getTokenAfter(operator);
if (!sourceCode.isSpaceBetween(prev, operator) || !sourceCode.isSpaceBetween(operator, next)) report(typeAnnotation, operator);
}
});
}
return {
AssignmentExpression: checkBinary,
AssignmentPattern: checkBinary,
BinaryExpression: checkBinary,
LogicalExpression: checkBinary,
ConditionalExpression(node) {
checkAndReportAssignmentSpace(node, node.test, node.consequent);
checkAndReportAssignmentSpace(node, node.consequent, node.alternate);
},
VariableDeclarator(node) {
checkAndReportAssignmentSpace(node, node.id.typeAnnotation ?? node.id, node.init);
},
PropertyDefinition: checkPropertyAssignment,
AccessorProperty: checkPropertyAssignment,
TSEnumMember(node) {
checkAndReportAssignmentSpace(node, node.id, node.initializer);
},
TSTypeAliasDeclaration(node) {
checkAndReportAssignmentSpace(node, node.typeParameters ?? node.id, node.typeAnnotation);
},
TSUnionType: checkTSBinary,
TSIntersectionType: checkTSBinary,
TSConditionalType(node) {
checkAndReportAssignmentSpace(node, node.extendsType, node.trueType);
checkAndReportAssignmentSpace(node, node.trueType, node.falseType);
}
};
}
});
export { space_infix_ops_default as t };
@@ -0,0 +1 @@
{"version":3,"file":"thenElse.js","sourceRoot":"","sources":["../../../lib/vocabularies/applicator/thenElse.ts"],"names":[],"mappings":";;AAEA,6CAAkD;AAElD,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC;IACjC,IAAI,CAAC,EAAC,OAAO,EAAE,YAAY,EAAE,EAAE,EAAa;QAC1C,IAAI,YAAY,CAAC,EAAE,KAAK,SAAS;YAAE,IAAA,sBAAe,EAAC,EAAE,EAAE,IAAI,OAAO,2BAA2B,CAAC,CAAA;IAChG,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"}
@@ -0,0 +1,15 @@
declare namespace getSideChannelMap {
type Channel<K, V> = {
assert: (key: K) => void;
has: (key: K) => boolean;
get: (key: K) => V | undefined;
set: (key: K, value: V) => void;
delete: (key: K) => boolean;
};
}
declare function getSideChannelMap<K, V>(): getSideChannelMap.Channel<K, V>;
declare const x: false | typeof getSideChannelMap;
export = x;
@@ -0,0 +1,821 @@
export default `flf2a$ 8 6 14 1 3
puffy.flf by Juan Car (jc@juguete.quim.ucm.es)
Version 1.1 5/Mar/1994
$$$@
$$$@
$$$@
$$$@
$$$@
$$$@
$$$@
$$$@@
_ @
( )@
| |@
| |@
| |@
(_)@
(_)@
@@
$ _ _ $@
$( )( )$@
$(_)(_)$@
$ $@
$ $@
$ $@
$ $@
$ $@@
@
_ _ @
_( )( )_ @
(_ .. _)@
(_ _)@
(_)(_) @
@
@@
( ) @
/'_ \\ @
( (_(_)@
\\__ \\ @
( )_) )@
\`\\_ _/'@
(_) @
@@
_ _ @
(_) /' )@
/' /' @
/' /' @
/' /' _ @
(_/' (_)@
@
@@
_____ @
( _ ) @
\`\\ ,/' @
/'_\`\\/\\ @
| (_> ,<\`@
\`\\___/\\/'@
@
@@
$_$@
( )@
|/$@
$ $@
$ $@
$ $@
$ $@
$ $@@
_ @
/' )@
| ,/'@
| | @
| \`\\ @
\`\\__)@
@
@@
_ @
( \`\\ @
\`\\ |@
| |@
/' |@
(__/'@
@
@@
_ @
_( )_ @
( \` ' )@
> < @
(_, ,_)@
(_) @
@
@@
_ @
( ) @
__| |__ @
(__ __)@
| | @
(_) @
@
@@
$ $@
$ $@
$ $@
$ $@
$_$@
( )@
|/$@
$ $@@
@
@
______ @
(______)@
@
@
@
@@
$ $@
$ $@
$ $@
$ $@
$_$@
(_)@
$ $@
$ $@@
__ @
/ )@
/' /' @
/' /' @
/' /' @
(_/' @
@
@@
__ @
/' _\`\\ @
| ( ) |@
| | | |@
| (_) |@
\`\\___/'@
@
@@
_ @
/' )@
(_, |@
| |@
| |@
(_)@
@
@@
__ @
/'__\`\\ @
(_) ) )@
/' / @
/' /( )@
(_____/'@
@
@@
___ @
/'_ )@
(_)_) |@
_(_ < @
( )_) |@
\`\\____)@
@
@@
_ _ @
( )( ) @
| || | @
| || |_ @
(__ ,__)@
(_) @
@
@@
_____ @
( ___)@
| (__ @
|___ \`\\@
( )_) |@
\`\\___/'@
@
@@
_____ @
( ___)@
| (__ @
| _ \`\\@
| (_) |@
\`\\___/'@
@
@@
_______ @
(_____ )@
/'/'@
/'/' @
/'/' @
(_/ @
@
@@
_ @
/'_\`\\ @
( (_) )@
> _ <'@
( (_) )@
\`\\___/'@
@
@@
__ @
/'_ \`\\@
( (_) |@
\\__, |@
| |@
(_)@
@
@@
$ $@
$ $@
$_$@
(_)@
$_$@
(_)@
$ $@
$ $@@
$ $@
$ $@
$_$@
(_)@
$_$@
( )@
|/$@
$ $@@
_ @
/' )@
/' /' @
< < @
\\ \`\\ @
\`\\__)@
@
@@
@
@
______ @
(______)@
(______)@
@
@
@@
_ @
( \`\\ @
\`\\ \`\\ @
> >@
/' /' @
(_/' @
@
@@
_ @
/'_\`\\ @
(_) ) |@
/'/'@
|_| @
(_) @
@
@@
@
_ @
/'_\`\\ @
/'/'_\` ) @
( ( (_| | @
\\ \`\\__,_)@
\`\\_____)@
@@
_____ @
( _ )@
| (_) |@
| _ |@
| | | |@
(_) (_)@
@
@@
___ @
( _\`\\ @
| (_) )@
| _ <'@
| (_) )@
(____/'@
@
@@
___ @
( _\`\\ @
| ( (_)@
| | _ @
| (_( )@
(____/'@
@
@@
___ @
( _\`\\ @
| | ) |@
| | | )@
| |_) |@
(____/'@
@
@@
___ @
( _\`\\ @
| (_(_)@
| _)_ @
| (_( )@
(____/'@
@
@@
___ @
( _\`\\ @
| (_(_)@
| _) @
| | @
(_) @
@
@@
___ @
( _\`\\ @
| ( (_)@
| |___ @
| (_, )@
(____/'@
@
@@
_ _ @
( ) ( )@
| |_| |@
| _ |@
| | | |@
(_) (_)@
@
@@
_ @
(_)@
| |@
| |@
| |@
(_)@
@
@@
_____ @
(___ )@
| |@
_ | |@
( )_| |@
\`\\___/'@
@
@@
_ _ @
( ) ( )@
| |/'/'@
| , < @
| |\\\`\\ @
(_) (_)@
@
@@
_ @
( ) @
| | @
| | _ @
| |_( )@
(____/'@
@
@@
@
/'\\_/\`\\@
| |@
| (_) |@
| | | |@
(_) (_)@
@
@@
_ _ @
( ) ( )@
| \`\\| |@
| , \` |@
| |\`\\ |@
(_) (_)@
@
@@
_____ @
( _ )@
| ( ) |@
| | | |@
| (_) |@
(_____)@
@
@@
___ @
( _\`\\ @
| |_) )@
| ,__/'@
| | @
(_) @
@
@@
_____ @
( _ )@
| ( ) |@
| | | |@
| (('\\|@
(___\\_)@
@
@@
___ @
| _\`\\ @
| (_) )@
| , / @
| |\\ \\ @
(_) (_)@
@
@@
___ @
( _\`\\ @
| (_(_)@
\`\\__ \\ @
( )_) |@
\`\\____)@
@
@@
_____ @
(_ _)@
| | @
| | @
| | @
(_) @
@
@@
_ _ @
( ) ( )@
| | | |@
| | | |@
| (_) |@
(_____)@
@
@@
_ _ @
( ) ( )@
| | | |@
| | | |@
| \\_/ |@
\`\\___/'@
@
@@
_ _ @
( ) _ ( )@
| | ( ) | |@
| | | | | |@
| (_/ \\_) |@
\`\\___x___/'@
@
@@
_ _ @
( ) ( )@
\`\\\`\\/'/'@
> < @
/'/\\\`\\ @
(_) (_)@
@
@@
_ _ @
( ) ( )@
\`\\\`\\_/'/'@
\`\\ /' @
| | @
(_) @
@
@@
_______ @
(_____ )@
/'/'@
/'/' @
/'/'___ @
(_______)@
@
@@
___ @
( _)@
| | @
| | @
| |_ @
(___)@
@
@@
_ @
( \`\\ @
\`\\ \`\\ @
\`\\ \`\\ @
\`\\ \`\\ @
\`\\_)@
@
@@
___ @
(_ )@
| |@
| |@
_| |@
(___)@
@
@@
$ __ $@
$/ \\$@
(_/\\_)@
$ $@
$ $@
$ $@
$ $@
$ $@@
$ $ @
$ $ @
$ $ @
$ $ @
$ $ @
$ $ @
______ @
(______)@@
$_$@
( )@
$\\|@
$ $@
$ $@
$ $@
$ $@
$ $@@
@
@
_ _ @
/'_\` )@
( (_| |@
\`\\__,_)@
@
@@
_ @
( ) @
| |_ @
| '_\`\\ @
| |_) )@
(_,__/'@
@
@@
@
@
___ @
/'___)@
( (___ @
\`\\____)@
@
@@
_ @
( )@
_| |@
/'_\` |@
( (_| |@
\`\\__,_)@
@
@@
@
@
__ @
/'__\`\\@
( ___/@
\`\\____)@
@
@@
___ @
/'___)@
| (__ @
| ,__) @
| | @
(_) @
@
@@
@
@
__ @
/'_ \`\\@
( (_) |@
\`\\__ |@
( )_) |@
\\___/'@@
_ @
( ) @
| |__ @
| _ \`\\@
| | | |@
(_) (_)@
@
@@
@
_ @
(_)@
| |@
| |@
(_)@
@
@@
@
_ @
(_)@
| |@
| |@
_ | |@
( )_| |@
\`\\___/'@@
_ @
( ) @
| |/') @
| , < @
| |\\\`\\ @
(_) (_)@
@
@@
_ @
(_ ) @
| | @
| | @
| | @
(___)@
@
@@
@
@
___ ___ @
/' _ \` _ \`\\@
| ( ) ( ) |@
(_) (_) (_)@
@
@@
@
@
___ @
/' _ \`\\@
| ( ) |@
(_) (_)@
@
@@
@
@
_ @
/'_\`\\ @
( (_) )@
\`\\___/'@
@
@@
@
@
_ _ @
( '_\`\\ @
| (_) )@
| ,__/'@
| | @
(_) @@
@
@
_ _ @
/'_\` )@
( (_) |@
\`\\__, |@
| |@
(_)@@
@
@
_ __ @
( '__)@
| | @
(_) @
@
@@
@
@
___ @
/',__)@
\\__, \\@
(____/@
@
@@
_ @
( )_ @
| ,_)@
| | @
| |_ @
\`\\__)@
@
@@
@
@
_ _ @
( ) ( )@
| (_) |@
\`\\___/'@
@
@@
@
@
_ _ @
( ) ( )@
| \\_/ |@
\`\\___/'@
@
@@
@
@
_ _ _ @
( ) ( ) ( )@
| \\_/ \\_/ |@
\`\\___x___/'@
@
@@
@
@
@
(\`\\/')@
> < @
(_/\\_)@
@
@@
@
@
_ _ @
( ) ( )@
| (_) |@
\`\\__, |@
( )_| |@
\`\\___/'@@
@
@
____ @
(_ ,)@
/'/_ @
(____)@
@
@@
_ @
/' )@
| ,/'@
<' | @
| \`\\ @
\`\\__)@
@
@@
@
_ @
( )@
| |@
| |@
| |@
(_)@
@@
_ @
( \`\\ @
\`\\ | @
| \`>@
/' | @
(__/' @
@
@@
_ _ @
/' \\/' )@
(_/\\__/' @
@
@
@
@
@@
(_)_(_)@
( _ )@
| (_) |@
| _ |@
| | | |@
(_) (_)@
@
@@
(_)_(_)@
( _ )@
| ( ) |@
| | | |@
| (_) |@
(_____)@
@
@@
(_) (_)@
( ) ( )@
| | | |@
| | | |@
| (_) |@
(_____)@
@
@@
_ _ @
(_) (_)@
_ _ @
/'_\` )@
( (_| |@
\`\\__,_)@
@
@@
_ _ @
(_) (_)@
_ @
/'_\`\\ @
( (_) )@
\`\\___/'@
@
@@
_ _ @
(_) (_)@
_ _ @
( ) ( )@
| (_) |@
\`\\___/'@
@
@@
@
@
_____ @
( _ )@
| |/ /'@
| |\\\`\\ @
| ||_/'@
(_) @@
`
@@ -0,0 +1 @@
{"version":3,"file":"metadataUtils.js","sourceRoot":"","sources":["../../../src/shared/metadataUtils.ts"],"names":[],"mappings":";;AAYA,wCAaC;AAvBD;;GAEG;AAEH;;;;;GAKG;AACH,SAAgB,cAAc,CAAC,QAA8E;IACzG,6DAA6D;IAC7D,IAAI,QAAQ,CAAC,KAAK,KAAK,SAAS,IAAI,QAAQ,CAAC,KAAK,KAAK,EAAE,EAAE,CAAC;QACxD,OAAO,QAAQ,CAAC,KAAK,CAAC;IAC1B,CAAC;IAED,kEAAkE;IAClE,IAAI,aAAa,IAAI,QAAQ,IAAI,QAAQ,CAAC,WAAW,EAAE,KAAK,EAAE,CAAC;QAC3D,OAAO,QAAQ,CAAC,WAAW,CAAC,KAAK,CAAC;IACtC,CAAC;IAED,4BAA4B;IAC5B,OAAO,QAAQ,CAAC,IAAI,CAAC;AACzB,CAAC"}
@@ -0,0 +1,23 @@
export type AsyncFunction<Args extends any[] = any[], Result = void> = (...args: Args) => Promise<Result>;
/**
* Check if value is an async function
*
* 校验是否为异步函数
*
* @example
* ```js
* import { isAsyncFunction } from 'is-what-type';
*
* isAsyncFunction(async () => { }); // true
* isAsyncFunction(() => { }); // false
* isAsyncFunction(function() { }); // false
* isAsyncFunction(async function() { }); // true
* isAsyncFunction(123); // false
* isAsyncFunction('string'); // false
* isAsyncFunction({}); // false
* ```
*
* @param value - The value to check
* @returns `true` if `value` is an async function, `false` otherwise
*/
export declare function isAsyncFunction<T = AsyncFunction>(value: unknown): value is T;
@@ -0,0 +1 @@
{"version":3,"file":"table-of-contents.js","sources":["../../../src/icons/table-of-contents.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name TableOfContents\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTYgMTJIMyIgLz4KICA8cGF0aCBkPSJNMTYgMThIMyIgLz4KICA8cGF0aCBkPSJNMTYgNkgzIiAvPgogIDxwYXRoIGQ9Ik0yMSAxMmguMDEiIC8+CiAgPHBhdGggZD0iTTIxIDE4aC4wMSIgLz4KICA8cGF0aCBkPSJNMjEgNmguMDEiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/table-of-contents\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 TableOfContents = createLucideIcon('TableOfContents', [\n ['path', { d: 'M16 12H3', key: '1a2rj7' }],\n ['path', { d: 'M16 18H3', key: '12xzn7' }],\n ['path', { d: 'M16 6H3', key: '1wxfjs' }],\n ['path', { d: 'M21 12h.01', key: 'msek7k' }],\n ['path', { d: 'M21 18h.01', key: '1e8rq1' }],\n ['path', { d: 'M21 6h.01', key: '1koanj' }],\n]);\n\nexport default TableOfContents;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAkB,iBAAiB,iBAAmB,CAAA,CAAA,CAAA;AAAA,CAAA,CAC1D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CA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A;AAC5C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const esnext_collection: LibDefinition;
@@ -0,0 +1,6 @@
{
"version": 3,
"sources": ["../src/set-array.ts", "../src/gen-mapping.ts", "../src/sourcemap-segment.ts"],
"mappings": ";AAUO,IAAM,WAAN,MAAoC;AAAA,EAIzC,cAAc;AACZ,SAAK,WAAW,EAAE,WAAW,KAAK;AAClC,SAAK,QAAQ,CAAC;AAAA,EAChB;AACF;AAWA,SAAS,KAAoB,KAAgC;AAC3D,SAAO;AACT;AAKO,SAAS,IAAmB,QAAqB,KAA4B;AAClF,SAAO,KAAK,MAAM,EAAE,SAAS,GAAG;AAClC;AAMO,SAAS,IAAmB,QAAqB,KAAgB;AAEtE,QAAM,QAAQ,IAAI,QAAQ,GAAG;AAC7B,MAAI,UAAU,OAAW,QAAO;AAEhC,QAAM,EAAE,OAAO,UAAU,QAAQ,IAAI,KAAK,MAAM;AAEhD,QAAM,SAAS,MAAM,KAAK,GAAG;AAC7B,SAAQ,QAAQ,GAAG,IAAI,SAAS;AAClC;AAgBO,SAAS,OAAsB,QAAqB,KAAc;AACvE,QAAM,QAAQ,IAAI,QAAQ,GAAG;AAC7B,MAAI,UAAU,OAAW;AAEzB,QAAM,EAAE,OAAO,UAAU,QAAQ,IAAI,KAAK,MAAM;AAChD,WAAS,IAAI,QAAQ,GAAG,IAAI,MAAM,QAAQ,KAAK;AAC7C,UAAM,IAAI,MAAM,CAAC;AACjB,UAAM,IAAI,CAAC,IAAI;AACf,YAAQ,CAAC;AAAA,EACX;AACA,UAAQ,GAAG,IAAI;AACf,QAAM,IAAI;AACZ;;;AChFA;AAAA,EACE;AAAA,OAGK;AACP,SAAS,UAAU,uBAAuB;;;ACKnC,IAAM,SAAS;AACf,IAAM,gBAAgB;AACtB,IAAM,cAAc;AACpB,IAAM,gBAAgB;AACtB,IAAM,cAAc;;;ADsB3B,IAAM,UAAU;AAKT,IAAM,aAAN,MAAi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BAAW;AAGtF,MAAI,YAAY,WAAW,MAAM,OAAO,cAAc,YAAY,cAAc,UAAU,GAAG;AAC3F;AAAA,EACF;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA,OACI,CAAC,WAAW,cAAc,YAAY,cAAc,UAAU,IAC9D,CAAC,WAAW,cAAc,YAAY,YAAY;AAAA,EACxD;AACF;AAEA,SAAS,OAAU,MAAkC;AAErD;AAEA,SAAS,SAAY,KAAY,OAAoB;AACnD,WAAS,IAAI,IAAI,QAAQ,KAAK,OAAO,KAAK;AACxC,QAAI,CAAC,IAAI,CAAC;AAAA,EACZ;AACA,SAAO,IAAI,KAAK;AAClB;AAEA,SAAS,eAAe,MAA0B,WAA2B;AAC3E,MAAI,QAAQ,KAAK;AACjB,WAAS,IAAI,QAAQ,GAAG,KAAK,GAAG,QAAQ,KAAK;AAC3C,UAAM,UAAU,KAAK,CAAC;AACtB,QAAI,aAAa,QAAQ,MAAM,EAAG;AAAA,EACpC;AACA,SAAO;AACT;AAEA,SAAS,OAAU,OAAY,OAAe,OAAU;AACtD,WAAS,IAAI,MAAM,QAAQ,IAAI,OAAO,KAAK;AACzC,UAAM,CAAC,IAAI,MAAM,IAAI,CAAC;AAAA,EACxB;AACA,QAAM,KAAK,IAAI;AACjB;AAEA,SAAS,sBAAsB,UAAgC;AAC7D,QAAM,EAAE,OAAO,IAAI;AACnB,MAAI,MAAM;AACV,WAAS,IAAI,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK;AAC1C,QAAI,SAAS,CAAC,EAAE,SAAS,EAAG;AAAA,EAC9B;AACA,MAAI,MAAM,OAAQ,UAAS,SAAS;AACtC;AAEA,SAAS,OAAkC,QAAqB,OAAY;AAC1E,WAAS,IAAI,GAAG,IAAI,MAAM,QAAQ,IAAK,KAAI,QAAQ,Line truncated
"names": ["cast"]
}
@@ -0,0 +1,42 @@
import { createBox } from '../../projection/geometry/models.mjs';
import { VisualElement } from '../VisualElement.mjs';
function isObjectKey(key, object) {
return key in object;
}
class ObjectVisualElement extends VisualElement {
constructor() {
super(...arguments);
this.type = "object";
}
readValueFromInstance(instance, key) {
if (isObjectKey(key, instance)) {
const value = instance[key];
if (typeof value === "string" || typeof value === "number") {
return value;
}
}
return undefined;
}
getBaseTargetFromProps() {
return undefined;
}
removeValueFromRenderState(key, renderState) {
delete renderState.output[key];
}
measureInstanceViewportBox() {
return createBox();
}
build(renderState, latestValues) {
Object.assign(renderState.output, latestValues);
}
renderInstance(instance, { output }) {
Object.assign(instance, output);
}
sortInstanceNodePosition() {
return 0;
}
}
export { ObjectVisualElement };
//# sourceMappingURL=ObjectVisualElement.mjs.map
@@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const code_1 = require("../code");
const def = {
keyword: "union",
schemaType: "array",
trackErrors: true,
code: code_1.validateUnion,
error: { message: "must match a schema in union" },
};
exports.default = def;
//# sourceMappingURL=union.js.map
@@ -0,0 +1,198 @@
# type-is
[![NPM Version][npm-version-image]][npm-url]
[![NPM Downloads][npm-downloads-image]][npm-url]
[![Node.js Version][node-version-image]][node-version-url]
[![Build Status][ci-image]][ci-url]
[![Test Coverage][coveralls-image]][coveralls-url]
Infer the content-type of a request.
## Install
This is a [Node.js](https://nodejs.org/en/) module available through the
[npm registry](https://www.npmjs.com/). Installation is done using the
[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
```sh
$ npm install type-is
```
## API
```js
var http = require('http')
var typeis = require('type-is')
http.createServer(function (req, res) {
var istext = typeis(req, ['text/*'])
res.end('you ' + (istext ? 'sent' : 'did not send') + ' me text')
})
```
### typeis(request, types)
Checks if the `request` is one of the `types`. If the request has no body,
even if there is a `Content-Type` header, then `null` is returned. If the
`Content-Type` header is invalid or does not matches any of the `types`, then
`false` is returned. Otherwise, a string of the type that matched is returned.
The `request` argument is expected to be a Node.js HTTP request. The `types`
argument is an array of type strings.
Each type in the `types` array can be one of the following:
- A file extension name such as `json`. This name will be returned if matched.
- A mime type such as `application/json`.
- A mime type with a wildcard such as `*/*` or `*/json` or `application/*`.
The full mime type will be returned if matched.
- A suffix such as `+json`. This can be combined with a wildcard such as
`*/vnd+json` or `application/*+json`. The full mime type will be returned
if matched.
Some examples to illustrate the inputs and returned value:
```js
// req.headers.content-type = 'application/json'
typeis(req, ['json']) // => 'json'
typeis(req, ['html', 'json']) // => 'json'
typeis(req, ['application/*']) // => 'application/json'
typeis(req, ['application/json']) // => 'application/json'
typeis(req, ['html']) // => false
```
### typeis.hasBody(request)
Returns a Boolean if the given `request` has a body, regardless of the
`Content-Type` header.
Having a body has no relation to how large the body is (it may be 0 bytes).
This is similar to how file existence works. If a body does exist, then this
indicates that there is data to read from the Node.js request stream.
```js
if (typeis.hasBody(req)) {
// read the body, since there is one
req.on('data', function (chunk) {
// ...
})
}
```
### typeis.is(mediaType, types)
Checks if the `mediaType` is one of the `types`. If the `mediaType` is invalid
or does not matches any of the `types`, then `false` is returned. Otherwise, a
string of the type that matched is returned.
The `mediaType` argument is expected to be a
[media type](https://tools.ietf.org/html/rfc6838) string. The `types` argument
is an array of type strings.
Each type in the `types` array can be one of the following:
- A file extension name such as `json`. This name will be returned if matched.
- A mime type such as `application/json`.
- A mime type with a wildcard such as `*/*` or `*/json` or `application/*`.
The full mime type will be returned if matched.
- A suffix such as `+json`. This can be combined with a wildcard such as
`*/vnd+json` or `application/*+json`. The full mime type will be returned
if matched.
Some examples to illustrate the inputs and returned value:
```js
var mediaType = 'application/json'
typeis.is(mediaType, ['json']) // => 'json'
typeis.is(mediaType, ['html', 'json']) // => 'json'
typeis.is(mediaType, ['application/*']) // => 'application/json'
typeis.is(mediaType, ['application/json']) // => 'application/json'
typeis.is(mediaType, ['html']) // => false
```
### typeis.match(expected, actual)
Match the type string `expected` with `actual`, taking in to account wildcards.
A wildcard can only be in the type of the subtype part of a media type and only
in the `expected` value (as `actual` should be the real media type to match). A
suffix can still be included even with a wildcard subtype. If an input is
malformed, `false` will be returned.
```js
typeis.match('text/html', 'text/html') // => true
typeis.match('*/html', 'text/html') // => true
typeis.match('text/*', 'text/html') // => true
typeis.match('*/*', 'text/html') // => true
typeis.match('*/*+json', 'application/x-custom+json') // => true
```
### typeis.normalize(type)
Normalize a `type` string. This works by performing the following:
- If the `type` is not a string, `false` is returned.
- If the string starts with `+` (so it is a `+suffix` shorthand like `+json`),
then it is expanded to contain the complete wildcard notation of `*/*+suffix`.
- If the string contains a `/`, then it is returned as the type.
- Else the string is assumed to be a file extension and the mapped media type is
returned, or `false` is there is no mapping.
This includes two special mappings:
- `'multipart'` -> `'multipart/*'`
- `'urlencoded'` -> `'application/x-www-form-urlencoded'`
## Examples
### Example body parser
```js
var express = require('express')
var typeis = require('type-is')
var app = express()
app.use(function bodyParser (req, res, next) {
if (!typeis.hasBody(req)) {
return next()
}
switch (typeis(req, ['urlencoded', 'json', 'multipart'])) {
case 'urlencoded':
// parse urlencoded body
throw new Error('implement urlencoded body parsing')
case 'json':
// parse json body
throw new Error('implement json body parsing')
case 'multipart':
// parse multipart body
throw new Error('implement multipart body parsing')
default:
// 415 error code
res.statusCode = 415
res.end()
break
}
})
```
## License
[MIT](LICENSE)
[ci-image]: https://badgen.net/github/checks/jshttp/type-is/master?label=ci
[ci-url]: https://github.com/jshttp/type-is/actions/workflows/ci.yml
[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/type-is/master
[coveralls-url]: https://coveralls.io/r/jshttp/type-is?branch=master
[node-version-image]: https://badgen.net/npm/node/type-is
[node-version-url]: https://nodejs.org/en/download
[npm-downloads-image]: https://badgen.net/npm/dm/type-is
[npm-url]: https://npmjs.org/package/type-is
[npm-version-image]: https://badgen.net/npm/v/type-is
[travis-image]: https://badgen.net/travis/jshttp/type-is/master
[travis-url]: https://travis-ci.org/jshttp/type-is
@@ -0,0 +1 @@
{"version":3,"file":"limitContains.js","sourceRoot":"","sources":["../../../lib/vocabularies/validation/limitContains.ts"],"names":[],"mappings":";;AAEA,6CAAkD;AAElD,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,CAAC,aAAa,EAAE,aAAa,CAAC;IACvC,IAAI,EAAE,OAAO;IACb,UAAU,EAAE,QAAQ;IACpB,IAAI,CAAC,EAAC,OAAO,EAAE,YAAY,EAAE,EAAE,EAAa;QAC1C,IAAI,YAAY,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;YACxC,IAAA,sBAAe,EAAC,EAAE,EAAE,IAAI,OAAO,iCAAiC,CAAC,CAAA;QACnE,CAAC;IACH,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"}
@@ -0,0 +1,4 @@
// https://nodejs.org/api/module.html#moduleregisterspecifier-parenturl-options
import { register } from "node:module";
register("./jiti-hooks.mjs", import.meta.url, {});
@@ -0,0 +1,22 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const BookMarked = createLucideIcon("BookMarked", [
["path", { d: "M10 2v8l3-3 3 3V2", key: "sqw3rj" }],
[
"path",
{
d: "M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",
key: "k3hazp"
}
]
]);
export { BookMarked as default };
//# sourceMappingURL=book-marked.js.map
@@ -0,0 +1,16 @@
'use strict'
const u = require('universalify').fromPromise
const jsonFile = require('./jsonfile')
jsonFile.outputJson = u(require('./output-json'))
jsonFile.outputJsonSync = require('./output-json-sync')
// aliases
jsonFile.outputJSON = jsonFile.outputJson
jsonFile.outputJSONSync = jsonFile.outputJsonSync
jsonFile.writeJSON = jsonFile.writeJson
jsonFile.writeJSONSync = jsonFile.writeJsonSync
jsonFile.readJSON = jsonFile.readJson
jsonFile.readJSONSync = jsonFile.readJsonSync
module.exports = jsonFile
@@ -0,0 +1,307 @@
'use strict'
const assert = require('node:assert')
const { runtimeFeatures } = require('../../util/runtime-features.js')
const { asciiLowercase } = require('../infra/index.js')
/**
* @typedef {object} Metadata
* @property {SRIHashAlgorithm} alg - The algorithm used for the hash.
* @property {string} val - The base64-encoded hash value.
*/
/**
* @typedef {Metadata[]} MetadataList
*/
/**
* @typedef {('sha256' | 'sha384' | 'sha512')} SRIHashAlgorithm
*/
/**
* @type {Map<SRIHashAlgorithm, number>}
*
* The valid SRI hash algorithm token set is the ordered set « "sha256",
* "sha384", "sha512" » (corresponding to SHA-256, SHA-384, and SHA-512
* respectively). The ordering of this set is meaningful, with stronger
* algorithms appearing later in the set.
*
* @see https://w3c.github.io/webappsec-subresource-integrity/#valid-sri-hash-algorithm-token-set
*/
const validSRIHashAlgorithmTokenSet = new Map([['sha256', 0], ['sha384', 1], ['sha512', 2]])
// https://nodejs.org/api/crypto.html#determining-if-crypto-support-is-unavailable
/** @type {import('node:crypto')} */
let crypto
if (runtimeFeatures.has('crypto')) {
crypto = require('node:crypto')
const cryptoHashes = crypto.getHashes()
// If no hashes are available, we cannot support SRI.
if (cryptoHashes.length === 0) {
validSRIHashAlgorithmTokenSet.clear()
}
for (const algorithm of validSRIHashAlgorithmTokenSet.keys()) {
// If the algorithm is not supported, remove it from the list.
if (cryptoHashes.includes(algorithm) === false) {
validSRIHashAlgorithmTokenSet.delete(algorithm)
}
}
} else {
// If crypto is not available, we cannot support SRI.
validSRIHashAlgorithmTokenSet.clear()
}
/**
* @typedef GetSRIHashAlgorithmIndex
* @type {(algorithm: SRIHashAlgorithm) => number}
* @param {SRIHashAlgorithm} algorithm
* @returns {number} The index of the algorithm in the valid SRI hash algorithm
* token set.
*/
const getSRIHashAlgorithmIndex = /** @type {GetSRIHashAlgorithmIndex} */ (Map.prototype.get.bind(
validSRIHashAlgorithmTokenSet))
/**
* @typedef IsValidSRIHashAlgorithm
* @see https://w3c.github.io/webappsec-subresource-integrity/#valid-sri-hash-algorithm-token
* @type {(algorithm: string) => algorithm is SRIHashAlgorithm}
* @param {*} algorithm
* @returns {algorithm is SRIHashAlgorithm}
*/
const isValidSRIHashAlgorithm = (algorithm) => validSRIHashAlgorithmTokenSet.has(asciiLowercase(algorithm))
/**
* @param {Uint8Array} bytes
* @param {string} metadataList
* @returns {boolean}
*
* @see https://w3c.github.io/webappsec-subresource-integrity/#does-response-match-metadatalist
*/
const bytesMatch = runtimeFeatures.has('crypto') === false || validSRIHashAlgorithmTokenSet.size === 0
// If node is not built with OpenSSL support, we cannot check
// a request's integrity, so allow it by default (the spec will
// allow requests if an invalid hash is given, as precedence).
? () => true
: (bytes, metadataList) => {
// 1. Let parsedMetadata be the result of parsing metadataList.
const parsedMetadata = parseMetadata(metadataList)
// 2. If parsedMetadata is empty set, return true.
if (parsedMetadata.length === 0) {
return true
}
// 3. Let metadata be the result of getting the strongest
// metadata from parsedMetadata.
const metadata = getStrongestMetadata(parsedMetadata)
// 4. For each item in metadata:
for (const item of metadata) {
// 1. Let algorithm be the item["alg"].
const algorithm = item.alg
// 2. Let expectedValue be the item["val"].
const expectedValue = item.val
// See https://github.com/web-platform-tests/wpt/commit/e4c5cc7a5e48093220528dfdd1c4012dc3837a0e
// "be liberal with padding". This is annoying, and it's not even in the spec.
// 3. Let actualValue be the result of applying algorithm to bytes .
const actualValue = applyAlgorithmToBytes(algorithm, bytes)
// 4. If actualValue is a case-sensitive match for expectedValue,
// return true.
if (caseSensitiveMatch(actualValue, expectedValue)) {
return true
}
}
// 5. Return false.
return false
}
/**
* @param {MetadataList} metadataList
* @returns {MetadataList} The strongest hash algorithm from the metadata list.
*/
function getStrongestMetadata (metadataList) {
// 1. Let result be the empty set and strongest be the empty string.
const result = []
/** @type {Metadata|null} */
let strongest = null
// 2. For each item in set:
for (const item of metadataList) {
// 1. Assert: item["alg"] is a valid SRI hash algorithm token.
assert(isValidSRIHashAlgorithm(item.alg), 'Invalid SRI hash algorithm token')
// 2. If result is the empty set, then:
if (result.length === 0) {
// 1. Append item to result.
result.push(item)
// 2. Set strongest to item.
strongest = item
// 3. Continue.
continue
}
// 3. Let currentAlgorithm be strongest["alg"], and currentAlgorithmIndex be
// the index of currentAlgorithm in the valid SRI hash algorithm token set.
const currentAlgorithm = /** @type {Metadata} */ (strongest).alg
const currentAlgorithmIndex = getSRIHashAlgorithmIndex(currentAlgorithm)
// 4. Let newAlgorithm be the item["alg"], and newAlgorithmIndex be the
// index of newAlgorithm in the valid SRI hash algorithm token set.
const newAlgorithm = item.alg
const newAlgorithmIndex = getSRIHashAlgorithmIndex(newAlgorithm)
// 5. If newAlgorithmIndex is less than currentAlgorithmIndex, then continue.
if (newAlgorithmIndex < currentAlgorithmIndex) {
continue
// 6. Otherwise, if newAlgorithmIndex is greater than
// currentAlgorithmIndex:
} else if (newAlgorithmIndex > currentAlgorithmIndex) {
// 1. Set strongest to item.
strongest = item
// 2. Set result to « item ».
result[0] = item
result.length = 1
// 7. Otherwise, newAlgorithmIndex and currentAlgorithmIndex are the same
// value. Append item to result.
} else {
result.push(item)
}
}
// 3. Return result.
return result
}
/**
* @param {string} metadata
* @returns {MetadataList}
*
* @see https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata
*/
function parseMetadata (metadata) {
// 1. Let result be the empty set.
/** @type {MetadataList} */
const result = []
// 2. For each item returned by splitting metadata on spaces:
for (const item of metadata.split(' ')) {
// 1. Let expression-and-options be the result of splitting item on U+003F (?).
const expressionAndOptions = item.split('?', 1)
// 2. Let algorithm-expression be expression-and-options[0].
const algorithmExpression = expressionAndOptions[0]
// 3. Let base64-value be the empty string.
let base64Value = ''
// 4. Let algorithm-and-value be the result of splitting algorithm-expression on U+002D (-).
const algorithmAndValue = [algorithmExpression.slice(0, 6), algorithmExpression.slice(7)]
// 5. Let algorithm be algorithm-and-value[0].
const algorithm = algorithmAndValue[0]
// 6. If algorithm is not a valid SRI hash algorithm token, then continue.
if (!isValidSRIHashAlgorithm(algorithm)) {
continue
}
// 7. If algorithm-and-value[1] exists, set base64-value to
// algorithm-and-value[1].
if (algorithmAndValue[1]) {
base64Value = algorithmAndValue[1]
}
// 8. Let metadata be the ordered map
// «["alg" → algorithm, "val" → base64-value]».
const metadata = {
// Possible spec bug?
alg: asciiLowercase(algorithm),
val: base64Value
}
// 9. Append metadata to result.
result.push(metadata)
}
// 3. Return result.
return result
}
/**
* Applies the specified hash algorithm to the given bytes
*
* @typedef {(algorithm: SRIHashAlgorithm, bytes: Uint8Array) => string} ApplyAlgorithmToBytes
* @param {SRIHashAlgorithm} algorithm
* @param {Uint8Array} bytes
* @returns {string}
*/
const applyAlgorithmToBytes = (algorithm, bytes) => {
return crypto.hash(algorithm, bytes, 'base64')
}
/**
* Compares two base64 strings, allowing for base64url
* in the second string.
*
* @param {string} actualValue base64 encoded string
* @param {string} expectedValue base64 or base64url encoded string
* @returns {boolean}
*/
function caseSensitiveMatch (actualValue, expectedValue) {
// Ignore padding characters from the end of the strings by
// decreasing the length by 1 or 2 if the last characters are `=`.
let actualValueLength = actualValue.length
if (actualValueLength !== 0 && actualValue[actualValueLength - 1] === '=') {
actualValueLength -= 1
}
if (actualValueLength !== 0 && actualValue[actualValueLength - 1] === '=') {
actualValueLength -= 1
}
let expectedValueLength = expectedValue.length
if (expectedValueLength !== 0 && expectedValue[expectedValueLength - 1] === '=') {
expectedValueLength -= 1
}
if (expectedValueLength !== 0 && expectedValue[expectedValueLength - 1] === '=') {
expectedValueLength -= 1
}
if (actualValueLength !== expectedValueLength) {
return false
}
for (let i = 0; i < actualValueLength; ++i) {
if (
actualValue[i] === expectedValue[i] ||
(actualValue[i] === '+' && expectedValue[i] === '-') ||
(actualValue[i] === '/' && expectedValue[i] === '_')
) {
continue
}
return false
}
return true
}
module.exports = {
applyAlgorithmToBytes,
bytesMatch,
caseSensitiveMatch,
isValidSRIHashAlgorithm,
getStrongestMetadata,
parseMetadata
}
@@ -0,0 +1,140 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = default_1;
const util = __importStar(require("../core/util.cjs"));
const error = () => {
const Sizable = {
string: { unit: "tegn", verb: "å ha" },
file: { unit: "bytes", verb: "å ha" },
array: { unit: "elementer", verb: "å inneholde" },
set: { unit: "elementer", verb: "å inneholde" },
map: { unit: "elementer", verb: "å inneholde" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const FormatDictionary = {
regex: "input",
email: "e-postadresse",
url: "URL",
emoji: "emoji",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "ISO dato- og klokkeslett",
date: "ISO-dato",
time: "ISO-klokkeslett",
duration: "ISO-varighet",
ipv4: "IPv4-adresse",
ipv6: "IPv6-adresse",
mac: "MAC-adresse",
cidrv4: "IPv4-spekter",
cidrv6: "IPv6-spekter",
base64: "base64-enkodet streng",
base64url: "base64url-enkodet streng",
json_string: "JSON-streng",
e164: "E.164-nummer",
credit_card: "kredittkortnummer",
currency_code: "valutakode",
iban: "IBAN",
jwt: "JWT",
template_literal: "input",
};
const TypeDictionary = {
nan: "NaN",
number: "tall",
array: "liste",
};
return (issue) => {
switch (issue.code) {
case "invalid_type": {
const expected = TypeDictionary[issue.expected] ?? issue.expected;
const receivedType = util.parsedType(issue.input);
const received = TypeDictionary[receivedType] ?? receivedType;
if (/^[A-Z]/.test(issue.expected)) {
return `Ugyldig input: forventet instanceof ${issue.expected}, fikk ${received}`;
}
return `Ugyldig input: forventet ${expected}, fikk ${received}`;
}
case "invalid_value":
if (issue.values.length === 1)
return `Ugyldig verdi: forventet ${util.stringifyPrimitive(issue.values[0])}`;
return `Ugyldig valg: forventet en av ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `For stor(t): forventet ${issue.origin ?? "value"} til å ha ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elementer"}`;
return `For stor(t): forventet ${issue.origin ?? "value"} til å ha ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `For lite(n): forventet ${issue.origin} til å ha ${adj}${issue.minimum.toString()} ${sizing.unit}`;
}
return `For lite(n): forventet ${issue.origin} til å ha ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with")
return `Ugyldig streng: må starte med "${_issue.prefix}"`;
if (_issue.format === "ends_with")
return `Ugyldig streng: må ende med "${_issue.suffix}"`;
if (_issue.format === "includes")
return `Ugyldig streng: må inneholde "${_issue.includes}"`;
if (_issue.format === "regex")
return `Ugyldig streng: må matche mønsteret ${_issue.pattern}`;
return `Ugyldig ${FormatDictionary[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Ugyldig tall: må være et multiplum av ${issue.divisor}`;
case "unrecognized_keys":
return `${issue.keys.length > 1 ? "Ukjente nøkler" : "Ukjent nøkkel"}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `Ugyldig nøkkel i ${issue.origin}`;
case "invalid_union":
return "Ugyldig input";
case "invalid_element":
return `Ugyldig verdi i ${issue.origin}`;
default:
return `Ugyldig input`;
}
};
};
function default_1() {
return {
localeError: error(),
};
}
module.exports = exports.default;
@@ -0,0 +1,4 @@
import type { ReverseSegment, SourceMapSegment } from './sourcemap-segment.mts';
export default function maybeSort(mappings: SourceMapSegment[][], owned: boolean): SourceMapSegment[][];
export declare function sortComparator<T extends SourceMapSegment | ReverseSegment>(a: T, b: T): number;
//# sourceMappingURL=sort.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"shapes.js","sources":["../../../src/icons/shapes.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Shapes\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNOC4zIDEwYS43LjcgMCAwIDEtLjYyNi0xLjA3OUwxMS40IDNhLjcuNyAwIDAgMSAxLjE5OC0uMDQzTDE2LjMgOC45YS43LjcgMCAwIDEtLjU3MiAxLjFaIiAvPgogIDxyZWN0IHg9IjMiIHk9IjE0IiB3aWR0aD0iNyIgaGVpZ2h0PSI3IiByeD0iMSIgLz4KICA8Y2lyY2xlIGN4PSIxNy41IiBjeT0iMTcuNSIgcj0iMy41IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/shapes\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 Shapes = createLucideIcon('Shapes', [\n [\n 'path',\n {\n d: 'M8.3 10a.7.7 0 0 1-.626-1.079L11.4 3a.7.7 0 0 1 1.198-.043L16.3 8.9a.7.7 0 0 1-.572 1.1Z',\n key: '1bo67w',\n },\n ],\n ['rect', { x: '3', y: '14', width: '7', height: '7', rx: '1', key: '1bkyp8' }],\n ['circle', { cx: '17.5', cy: '17.5', r: '3.5', key: 'w3z12y' }],\n]);\n\nexport default Shapes;\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,CACxC,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;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,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAG,KAAK,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,QAAQ,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAC7E,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAQ,CAAI,CAAA,CAAA,CAAA,MAAA,CAAQ,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA;AAChE,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,20 @@
'use strict';
var _const = require('../../data/const.cjs');
var dateMatcher = ({
year,
separator
}) => {
// base guesses: (year distance from REFERENCE_YEAR) * num_days * num_years
const yearSpace = Math.max(Math.abs(year - _const.REFERENCE_YEAR), _const.MIN_YEAR_SPACE);
let guesses = yearSpace * 365;
// add factor of 4 for separator selection (one of ~4 choices)
if (separator) {
guesses *= 4;
}
return guesses;
};
module.exports = dateMatcher;
//# sourceMappingURL=scoring.cjs.map
@@ -0,0 +1,16 @@
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE:
// npx nx generate-lib repo
Object.defineProperty(exports, "__esModule", { value: true });
exports.esnext_iterator = void 0;
const base_config_1 = require("./base-config");
const es2015_iterable_1 = require("./es2015.iterable");
exports.esnext_iterator = {
libs: [es2015_iterable_1.es2015_iterable],
variables: [
['Iterator', base_config_1.TYPE_VALUE],
['IteratorObjectConstructor', base_config_1.TYPE],
],
};
@@ -0,0 +1,34 @@
/**
* @fileoverview The instance of Ajv validator.
* @author Evgeny Poberezkin
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const Ajv = require("ajv"),
metaSchema = require("ajv/lib/refs/json-schema-draft-04.json");
//------------------------------------------------------------------------------
// Public Interface
//------------------------------------------------------------------------------
module.exports = (additionalOptions = {}) => {
const ajv = new Ajv({
meta: false,
useDefaults: true,
validateSchema: false,
missingRefs: "ignore",
verbose: true,
schemaId: "auto",
...additionalOptions,
});
ajv.addMetaSchema(metaSchema);
// eslint-disable-next-line no-underscore-dangle -- Ajv's API
ajv._opts.defaultMeta = metaSchema.id;
return ajv;
};
@@ -0,0 +1,6 @@
function isDOMKeyframes(keyframes) {
return typeof keyframes === "object" && !Array.isArray(keyframes);
}
export { isDOMKeyframes };
//# sourceMappingURL=is-dom-keyframes.mjs.map
@@ -0,0 +1 @@
{"version":3,"file":"log-out.js","sources":["../../../src/icons/log-out.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name LogOut\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNOSAyMUg1YTIgMiAwIDAgMS0yLTJWNWEyIDIgMCAwIDEgMi0yaDQiIC8+CiAgPHBvbHlsaW5lIHBvaW50cz0iMTYgMTcgMjEgMTIgMTYgNyIgLz4KICA8bGluZSB4MT0iMjEiIHgyPSI5IiB5MT0iMTIiIHkyPSIxMiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/log-out\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 LogOut = createLucideIcon('LogOut', [\n ['path', { d: 'M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4', key: '1uf3rs' }],\n ['polyline', { points: '16 17 21 12 16 7', key: '1gabdz' }],\n ['line', { x1: '21', x2: '9', y1: '12', y2: '12', key: '1uyos4' }],\n]);\n\nexport default LogOut;\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,CAA2C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,CAAA,CAAA,CAAA,CAAE,QAAQ,CAAoB,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,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACnE,CAAC,CAAA,CAAA;;"}
@@ -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 ZoomIn = createLucideIcon("ZoomIn", [
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
["line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65", key: "13gj7c" }],
["line", { x1: "11", x2: "11", y1: "8", y2: "14", key: "1vmskp" }],
["line", { x1: "8", x2: "14", y1: "11", y2: "11", key: "durymu" }]
]);
export { ZoomIn as default };
//# sourceMappingURL=zoom-in.js.map
@@ -0,0 +1,6 @@
//#region src/utils/constants.d.ts
/**
* Constant used to mark a composed handler.
*/
export declare const COMPOSED_HANDLER = "__COMPOSED_HANDLER";
//#endregion
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_K","2":"_I"},C:{"1":"_H _sM","2":"_o _fG _L","578":"_UJ _4E"},D:{"1":"_RN _kC","2":"_JJ","257":"_bM","450":"_GD _HE"},E:{"1":"_KF","2":"_VD"},F:{"1":"_H FC _wI","2":"_fH _zD _O","257":"DC EC","450":"_nH _SE"},G:{"1":"_mC","2":"_ND"},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":"_DF","2":"_OD"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"ME","2":"LE"}},B:5,C:"CSS Conical Gradients",D:true};
@@ -0,0 +1 @@
{"version":3,"file":"stdio.js","sourceRoot":"","sources":["../../../src/server/stdio.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,cAAc,CAAC;AAEnC,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAIlE;;;;GAIG;AACH,MAAM,OAAO,oBAAoB;IAI7B,YACY,SAAmB,OAAO,CAAC,KAAK,EAChC,UAAoB,OAAO,CAAC,MAAM,EAC1C,OAQC;QAVO,WAAM,GAAN,MAAM,CAA0B;QAChC,YAAO,GAAP,OAAO,CAA2B;QAJtC,aAAQ,GAAG,KAAK,CAAC;QAsBzB,gFAAgF;QAChF,YAAO,GAAG,CAAC,KAAa,EAAE,EAAE;YACxB,IAAI,CAAC;gBACD,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;gBAC/B,IAAI,CAAC,iBAAiB,EAAE,CAAC;YAC7B,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACb,IAAI,CAAC,OAAO,EAAE,CAAC,KAAc,CAAC,CAAC;gBAC/B,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;YACjC,CAAC;QACL,CAAC,CAAC;QACF,aAAQ,GAAG,CAAC,KAAY,EAAE,EAAE;YACxB,IAAI,CAAC,OAAO,EAA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AAK,CAAC,EAAE,CAAC;YAC/B,gDAAgD;YAChD,0FAA0F;YAC1F,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QACxB,CAAC;QAED,sCAAsC;QACtC,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC;QACzB,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC;IACrB,CAAC;IAED,IAAI,CAAC,OAAuB;QACxB,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE;YACzB,MAAM,IAAI,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;YACvC,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC3B,OAAO,EAAE,CAAC;YACd,CAAC;iBAAM,CAAC;gBACJ,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YACxC,CAAC;QACL,CAAC,CAAC,CAAC;IACP,CAAC;CACJ"}
@@ -0,0 +1 @@
{"version":3,"names":["_core","require","exports","getDynamicImportSource","node","source","arguments","t","isStringLiteral","isTemplateLiteral","template","expression","ast","buildDynamicImport","deferToThen","wrapWithPromise","builder","specifier","isCallExpression","quasis","length","specifierToString","identifier","templateLiteral","templateElement","raw"],"sources":["../src/dynamic-import.ts"],"sourcesContent":["// Heavily inspired by\n// https://github.com/airbnb/babel-plugin-dynamic-import-node/blob/master/src/utils.js\n\nimport { types as t, template } from \"@babel/core\";\n\nif (!process.env.BABEL_8_BREAKING && !USE_ESM && !IS_STANDALONE) {\n // eslint-disable-next-line no-restricted-globals\n exports.getDynamicImportSource = function getDynamicImportSource(\n node: t.CallExpression,\n ): t.StringLiteral | t.TemplateLiteral {\n const [source] = node.arguments;\n\n return t.isStringLiteral(source) || t.isTemplateLiteral(source)\n ? source\n : (template.expression.ast`\\`\\${${source}}\\`` as t.TemplateLiteral);\n };\n}\n\nexport function buildDynamicImport(\n node: t.CallExpression | t.ImportExpression,\n deferToThen: boolean,\n wrapWithPromise: boolean,\n builder: (specifier: t.Expression) => t.Expression,\n): t.Expression {\n const specifier = t.isCallExpression(node) ? node.arguments[0] : node.source;\n\n if (\n t.isStringLiteral(specifier) ||\n (t.isTemplateLiteral(specifier) && specifier.quasis.length === 0)\n ) {\n if (deferToThen) {\n return template.expression.ast`\n Promise.resolve().then(() => ${builder(specifier)})\n `;\n } else return builder(specifier);\n }\n\n const specifierToString = t.isTemplateLiteral(specifier)\n ? t.identifier(\"specifier\")\n : t.templateLiteral(\n [t.templateElement({ raw: \"\" }), t.templateElement({ raw: \"\" })],\n [t.identifier(\"specifier\")],\n );\n\n if (deferToThen) {\n return template.expression.ast`\n (specifier =>\n new Promise(r => r(${specifierToString}))\n .then(s => ${builder(t.identifier(\"s\"))})\n )(${specifier})\n `;\n } else if (wrapWithPromise) {\n return template.expression.ast`\n (specifier =>\n new Promise(r => r(${builder(specifierToString)}))\n )(${specifier})\n `;\n } else {\n return template.expression.ast`\n (specifier => ${builder(specifierToString)})(${specifier})\n `;\n }\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAIEC,OAAO,CAACC,sBAAsB,GAAG,SAASA,sBAAsBA,CAC9DC,IAAsB,EACe;EACrC,MAAM,CAACC,MAAM,CAAC,GAAGD,IAAI,CAACE,SAAS;EAE/B,OAAOC,WAAC,CAACC,eAAe,CAACH,MAAM,CAAC,IAAIE,WAAC,CAACE,iBAAiB,CAACJ,MAAM,CAAC,GAC3DA,MAAM,GACLK,cAAQ,CAACC,UAAU,CAACC,GAAG,QAAQP,MAAM,KAA2B;AACvE,CAAC;AAGI,SAASQ,kBAAkBA,CAChCT,IAA2C,EAC3CU,WAAoB,EACpBC,eAAwB,EACxBC,OAAkD,EACpC;EACd,MAAMC,SAAS,GAAGV,WAAC,CAACW,gBAAgB,CAACd,IAAI,CAAC,GAAGA,IAAI,CAACE,SAAS,CAAC,CAAC,CAAC,GAAGF,IAAI,CAACC,MAAM;EAE5E,IACEE,W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ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Bone\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTcgMTBjLjctLjcgMS42OSAwIDIuNSAwYTIuNSAyLjUgMCAxIDAgMC01IC41LjUgMCAwIDEtLjUtLjUgMi41IDIuNSAwIDEgMC01IDBjMCAuODEuNyAxLjggMCAyLjVsLTcgN2MtLjcuNy0xLjY5IDAtMi41IDBhMi41IDIuNSAwIDAgMCAwIDVjLjI4IDAgLjUuMjIuNS41YTIuNSAyLjUgMCAxIDAgNSAwYzAtLjgxLS43LTEuOCAwLTIuNVoiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/bone\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 Bone = createLucideIcon('Bone', [\n [\n 'path',\n {\n d: 'M17 10c.7-.7 1.69 0 2.5 0a2.5 2.5 0 1 0 0-5 .5.5 0 0 1-.5-.5 2.5 2.5 0 1 0-5 0c0 .81.7 1.8 0 2.5l-7 7c-.7.7-1.69 0-2.5 0a2.5 2.5 0 0 0 0 5c.28 0 .5.22.5.5a2.5 2.5 0 1 0 5 0c0-.81-.7-1.8 0-2.5Z',\n key: 'w610uw',\n },\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A,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,152 @@
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var index_exports = {};
__export(index_exports, {
Root: () => Slot,
Slot: () => Slot,
Slottable: () => Slottable,
createSlot: () => createSlot,
createSlottable: () => createSlottable
});
module.exports = __toCommonJS(index_exports);
// src/slot.tsx
var React = __toESM(require("react"));
var import_react_compose_refs = require("@radix-ui/react-compose-refs");
var import_jsx_runtime = require("react/jsx-runtime");
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
var use = React[" use ".trim().toString()];
function isPromiseLike(value) {
return typeof value === "object" && value !== null && "then" in value;
}
function isLazyComponent(element) {
return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE && "_payload" in element && isPromiseLike(element._payload);
}
// @__NO_SIDE_EFFECTS__
function createSlot(ownerName) {
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
const Slot2 = React.forwardRef((props, forwardedRef) => {
let { children, ...slotProps } = props;
if (isLazyComponent(children) && typeof use === "function") {
children = use(children._payload);
}
const childrenArray = React.Children.toArray(children);
const slottable = childrenArray.find(isSlottable);
if (slottable) {
const newElement = slottable.props.children;
const newChildren = childrenArray.map((child) => {
if (child === slottable) {
if (React.Children.count(newElement) > 1) return React.Children.only(null);
return React.isValidElement(newElement) ? newElement.props.children : null;
} else {
return child;
}
});
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
}
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
});
Slot2.displayName = `${ownerName}.Slot`;
return Slot2;
}
var Slot = /* @__PURE__ */ createSlot("Slot");
// @__NO_SIDE_EFFECTS__
function createSlotClone(ownerName) {
const SlotClone = React.forwardRef((props, forwardedRef) => {
let { children, ...slotProps } = props;
if (isLazyComponent(children) && typeof use === "function") {
children = use(children._payload);
}
if (React.isValidElement(children)) {
const childrenRef = getElementRef(children);
const props2 = mergeProps(slotProps, children.props);
if (children.type !== React.Fragment) {
props2.ref = forwardedRef ? (0, import_react_compose_refs.composeRefs)(forwardedRef, childrenRef) : childrenRef;
}
return React.cloneElement(children, props2);
}
return React.Children.count(children) > 1 ? React.Children.only(null) : null;
});
SlotClone.displayName = `${ownerName}.SlotClone`;
return SlotClone;
}
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
// @__NO_SIDE_EFFECTS__
function createSlottable(ownerName) {
const Slottable2 = ({ children }) => {
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children });
};
Slottable2.displayName = `${ownerName}.Slottable`;
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
return Slottable2;
}
var Slottable = /* @__PURE__ */ createSlottable("Slottable");
function isSlottable(child) {
return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
}
function mergeProps(slotProps, childProps) {
const overrideProps = { ...childProps };
for (const propName in childProps) {
const slotPropValue = slotProps[propName];
const childPropValue = childProps[propName];
const isHandler = /^on[A-Z]/.test(propName);
if (isHandler) {
if (slotPropValue && childPropValue) {
overrideProps[propName] = (...args) => {
const result = childPropValue(...args);
slotPropValue(...args);
return result;
};
} else if (slotPropValue) {
overrideProps[propName] = slotPropValue;
}
} else if (propName === "style") {
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
} else if (propName === "className") {
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
}
}
return { ...slotProps, ...overrideProps };
}
function getElementRef(element) {
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
if (mayWarn) {
return element.ref;
}
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
if (mayWarn) {
return element.props.ref;
}
return element.props.ref || element.ref;
}
//# sourceMappingURL=index.js.map
@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getFixOrSuggest = getFixOrSuggest;
function getFixOrSuggest({ fixOrSuggest, suggestion, }) {
switch (fixOrSuggest) {
case 'fix':
return { fix: suggestion.fix };
case 'none':
return undefined;
case 'suggest':
return { suggest: [suggestion] };
}
}
@@ -0,0 +1,9 @@
export type Procedure = (...args: any[]) => void;
/**
* @link https://davidwalsh.name/javascript-debounce-function
* @param func needs to implement a function which is debounced
* @param wait how long do you want to wait till the previous declared function is executed
* @param isImmediate defines if you want to execute the function on the first execution or the last execution inside the time window. `true` for first and `false` for last.
*/
declare const _default: <F extends Procedure>(func: F, wait: number, isImmediate?: boolean) => ((this: ThisParameterType<F>, ...args: Parameters<F>) => void);
export default _default;
@@ -0,0 +1,116 @@
export const xmlReplacer = /["&'<>$\x80-\uFFFF]/g;
const xmlCodeMap = new Map([
[34, "&quot;"],
[38, "&amp;"],
[39, "&apos;"],
[60, "&lt;"],
[62, "&gt;"],
]);
// For compatibility with node < 4, we wrap `codePointAt`
export const getCodePoint =
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
String.prototype.codePointAt != null
? (str, index) => str.codePointAt(index)
: // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
(c, index) => (c.charCodeAt(index) & 0xfc00) === 0xd800
? (c.charCodeAt(index) - 0xd800) * 0x400 +
c.charCodeAt(index + 1) -
0xdc00 +
0x10000
: c.charCodeAt(index);
/**
* Encodes all non-ASCII characters, as well as characters not valid in XML
* documents using XML entities.
*
* If a character has no equivalent entity, a
* numeric hexadecimal reference (eg. `&#xfc;`) will be used.
*/
export function encodeXML(str) {
let ret = "";
let lastIdx = 0;
let match;
while ((match = xmlReplacer.exec(str)) !== null) {
const i = match.index;
const char = str.charCodeAt(i);
const next = xmlCodeMap.get(char);
if (next !== undefined) {
ret += str.substring(lastIdx, i) + next;
lastIdx = i + 1;
}
else {
ret += `${str.substring(lastIdx, i)}&#x${getCodePoint(str, i).toString(16)};`;
// Increase by 1 if we have a surrogate pair
lastIdx = xmlReplacer.lastIndex += Number((char & 0xfc00) === 0xd800);
}
}
return ret + str.substr(lastIdx);
}
/**
* Encodes all non-ASCII characters, as well as characters not valid in XML
* documents using numeric hexadecimal reference (eg. `&#xfc;`).
*
* Have a look at `escapeUTF8` if you want a more concise output at the expense
* of reduced transportability.
*
* @param data String to escape.
*/
export const escape = encodeXML;
/**
* Creates a function that escapes all characters matched by the given regular
* expression using the given map of characters to escape to their entities.
*
* @param regex Regular expression to match characters to escape.
* @param map Map of characters to escape to their entities.
*
* @returns Function that escapes all characters matched by the given regular
* expression using the given map of characters to escape to their entities.
*/
function getEscaper(regex, map) {
return function escape(data) {
let match;
let lastIdx = 0;
let result = "";
while ((match = regex.exec(data))) {
if (lastIdx !== match.index) {
result += data.substring(lastIdx, match.index);
}
// We know that this character will be in the map.
result += map.get(match[0].charCodeAt(0));
// Every match will be of length 1
lastIdx = match.index + 1;
}
return result + data.substring(lastIdx);
};
}
/**
* Encodes all characters not valid in XML documents using XML entities.
*
* Note that the output will be character-set dependent.
*
* @param data String to escape.
*/
export const escapeUTF8 = getEscaper(/[&<>'"]/g, xmlCodeMap);
/**
* Encodes all characters that have to be escaped in HTML attributes,
* following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.
*
* @param data String to escape.
*/
export const escapeAttribute = getEscaper(/["&\u00A0]/g, new Map([
[34, "&quot;"],
[38, "&amp;"],
[160, "&nbsp;"],
]));
/**
* Encodes all characters that have to be escaped in HTML text,
* following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.
*
* @param data String to escape.
*/
export const escapeText = getEscaper(/[&<>\u00A0]/g, new Map([
[38, "&amp;"],
[60, "&lt;"],
[62, "&gt;"],
[160, "&nbsp;"],
]));
//# sourceMappingURL=escape.js.map
@@ -0,0 +1,49 @@
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// packages/react/id/src/index.ts
var index_exports = {};
__export(index_exports, {
useId: () => useId
});
module.exports = __toCommonJS(index_exports);
// packages/react/id/src/id.tsx
var React = __toESM(require("react"));
var import_react_use_layout_effect = require("@radix-ui/react-use-layout-effect");
var useReactId = React[" useId ".trim().toString()] || (() => void 0);
var count = 0;
function useId(deterministicId) {
const [id, setId] = React.useState(useReactId());
(0, import_react_use_layout_effect.useLayoutEffect)(() => {
if (!deterministicId) setId((reactId) => reactId ?? String(count++));
}, [deterministicId]);
return deterministicId || (id ? `radix-${id}` : "");
}
//# sourceMappingURL=index.js.map
@@ -0,0 +1,719 @@
export default `flf2a$ 7 7 8 0 3 0 64 0
Font Author: Diamond Planet
FIGFont created with: http://patorjk.com/figfont-editor
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
▗█▄▖@
▐▌█ @
▝█▚▖@
▗▄█▞▘@
▀ @
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
▄$@
▞$@
@
@
@
@
@@
@
@
@
@
@
@
@@
▄$@
@
@
@
@
@
@@
▄▀$@
█ @
▄▀ @
@
@
@
@@
▄▀▀▚▖@
█ ▐▌@
█ ▐▌@
▀▄▄▞▘@
@
@
@@
█$@
█$@
█$@
█$@
@
@
@@
▄▄▄▄$@
█$@
█▀▀▀$@
█▄▄▄$@
@
@
@@
▄▄▄▄$@
█$@
▀▀▀█$@
▄▄▄█$@
@
@
@@
▄ ▗▖@
█ ▐▌@
▀▀▀▜▌@
▐▌@
@
@
@@
▄▄▄▄$@
█ @
▀▀▀█$@
▄▄▄█$@
@
@
@@
▄▄▄▄$@
█ @
█▀▀█$@
█▄▄█$@
@
@
@@
▗▄▄▄▖@
▐▌@
▐▌@
▐▌@
@
@
@@
▄▄▄▄$@
█ █$@
█▀▀█$@
█▄▄█$@
@
@
@@
▄▄▄▄$@
█ █$@
▀▀▀█$@
▄▄▄█$@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
▗▄▖ @
▐▌ ▐▌@
▐▛▀▜▌@
▐▌ ▐▌@
@
@
@@
▗▄▄▖ @
▐▌ ▐▌@
▐▛▀▚▖@
▐▙▄▞▘@
@
@
@@
▗▄▄▖@
▐▌ @
▐▌ @
▝▚▄▄▖@
@
@
@@
▗▄▄▄ @
▐▌ █$@
▐▌ █$@
▐▙▄▄▀$@
@
@
@@
▗▄▄▄▖@
▐▌ @
▐▛▀▀▘@
▐▙▄▄▖@
@
@
@@
▗▄▄▄▖@
▐▌ @
▐▛▀▀▘@
▐▌ @
@
@
@@
▗▄▄▖@
▐▌ @
▐▌▝▜▌@
▝▚▄▞▘@
@
@
@@
▗▖ ▗▖@
▐▌ ▐▌@
▐▛▀▜▌@
▐▌ ▐▌@
@
@
@@
▗▄▄▄▖@
█ @
█ @
▗▄█▄▖@
@
@
@@
▗▖@
▐▌@
▐▌@
▗▄▄▞▘@
@
@
@@
▗▖ ▗▖@
▐▌▗▞▘@
▐▛▚▖ @
▐▌ ▐▌@
@
@
@@
▗▖ @
▐▌ @
▐▌ @
▐▙▄▄▖@
@
@
@@
▗▖ ▗▖@
▐▛▚▞▜▌@
▐▌ ▐▌@
▐▌ ▐▌@
@
@
@@
▗▖ ▗▖@
▐▛▚▖▐▌@
▐▌ ▝▜▌@
▐▌ ▐▌@
@
@
@@
▗▄▖ @
▐▌ ▐▌@
▐▌ ▐▌@
▝▚▄▞▘@
@
@
@@
▗▄▄▖ @
▐▌ ▐▌@
▐▛▀▘ @
▐▌ @
@
@
@@
▗▄▄▄▖ @
▐▌ ▐▌ @
▐▌ ▐▌ @
▐▙▄▟▙▖@
@
@
@@
▗▄▄▖ @
▐▌ ▐▌@
▐▛▀▚▖@
▐▌ ▐▌@
@
@
@@
▗▄▄▖@
▐▌ @
▝▀▚▖@
▗▄▄▞▘@
@
@
@@
▗▄▄▄▖@
█ @
█ @
█ @
@
@
@@
▗▖ ▗▖@
▐▌ ▐▌@
▐▌ ▐▌@
▝▚▄▞▘@
@
@
@@
▗▖ ▗▖@
▐▌ ▐▌@
▐▌ ▐▌@
▝▚▞▘ @
@
@
@@
▗▖ ▗▖@
▐▌ ▐▌@
▐▌ ▐▌@
▐▙█▟▌@
@
@
@@
▗▖ ▗▖@
▝▚▞▘ @
▐▌ @
▗▞▘▝▚▖@
@
@
@@
▗▖ ▗▖@
▝▚▞▘ @
▐▌ @
▐▌ @
@
@
@@
▗▄▄▄▄▖@
▗▞▘@
▗▞▘ @
▐▙▄▄▄▖@
@
@
@@
▗▄▄▖ @
▐▌ @
▐▌ @
■ @
■■■$@
@
@@
@
@
@
@
@
@
@@
▗▄▄▖ @
▐▌ @
▐▌ @
■$@
■■■$@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
▗▞▀▜▌@
▝▚▄▟▌@
@
@
@
@
$ @@
▗▖ @
▐▌ @
▐▛▀▚▖@
▐▙▄▞▘@
@
@
@@
▗▞▀▘@
▝▚▄▖@
@
@
@
@
$ @@
▐▌@
▐▌@
▗▞▀▜▌@
▝▚▄▟▌@
@
@
@@
▗▞▀▚▖@
▐▛▀▀▘@
▝▚▄▄▖@
@
@
@
@@
▗▞▀▀▘@
▐▌ @
▐▛▀▘ @
▐▌ @
@
@
$ @@
$ @
@
@
▗▄▖ @
▐▌ ▐▌@
▝▀▜▌@
▐▙▄▞▘@@
▐▌ @
▐▌ @
▐▛▀▚▖@
▐▌ ▐▌@
@
@
$ @@
▄$@
▄$@
█$@
█$@
@
@
@@
▗▖@
▗▖@
▄ ▐▌@
▀▄▄▞▘@
@
@
$ @@
█ ▄$@
█▄▀ @
█ ▀▄$@
█ █$@
@
@
$ @@
█$@
█$@
█$@
█$@
@
@
@@
▄▄▄▄ @
█ █ █$@
█ █$@
@
@
@
$ @@
▄▄▄▄ @
█ █$@
█ █$@
@
@
@
$ @@
▄▄▄ @
█ █$@
▀▄▄▄▀$@
@
@
@
$ @@
▄▄▄▄ @
█ █$@
█▄▄▄▀$@
█ @
▀ @
@
$ @@
▄▄▄▄$@
█ █$@
▀▄▄▄█$@
█$@
▀$@
@
@@
▄▄▄$@
█ @
█ @
@
@
@
$ @@
▄▄▄$@
▀▄▄ @
▄▄▄▀$@
@
@
@
$ @@
■ @
▗▄▟▙▄▖@
▐▌ @
▐▌ @
▐▌ @
@
@@
█ ▐▌@
▀▄▄▞▘@
@
@
@
@
$ @@
▄ ▄$@
█ █$@
▀▄▀ @
@
@
@
$ @@
▄ ▄$@
█ ▄ █$@
█▄█▄█$@
@
@
@
$ @@
▄ ▄$@
▀▄▀ @
▄▀ ▀▄$@
@
@
@
$ @@
▄ ▄$@
█ █$@
▀▀▀█$@
▄ █$@
▀▀▀$ @
@
@@
▄▄▄▄▄$@
▄▄▄▀$@
█▄▄▄▄$@
@
@
@
$ @@
▗▞▘@
▗▞▘ @
▐▌ @
▝▘@
@
@
$ @@
@
@
@
@
@
@
@@
■ @
■ @
■ @
■$@
■ @
■ @
■ @@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
`
@@ -0,0 +1,30 @@
import { REFERENCE_YEAR, MIN_YEAR_SPACE } from '../../data/const.mjs';
var regexMatcher = ({
regexName,
regexMatch,
token
}) => {
const charClassBases = {
alphaLower: 26,
alphaUpper: 26,
alpha: 52,
alphanumeric: 62,
digits: 10,
symbols: 33
};
if (regexName in charClassBases) {
return charClassBases[regexName] ** token.length;
}
// TODO add more regex types for example special dates like 09.11
switch (regexName) {
case 'recentYear':
// conservative estimate of year space: num years from REFERENCE_YEAR.
// if year is close to REFERENCE_YEAR, estimate a year space of MIN_YEAR_SPACE.
return Math.max(Math.abs(parseInt(regexMatch[0], 10) - REFERENCE_YEAR), MIN_YEAR_SPACE);
}
return 0;
};
export { regexMatcher as default };
//# sourceMappingURL=scoring.mjs.map
@@ -0,0 +1,415 @@
import {ContextualKeyword} from "../parser/tokenizer/keywords";
import {TokenType as tt} from "../parser/tokenizer/types";
import elideImportEquals from "../util/elideImportEquals";
import getDeclarationInfo, {
EMPTY_DECLARATION_INFO,
} from "../util/getDeclarationInfo";
import getImportExportSpecifierInfo from "../util/getImportExportSpecifierInfo";
import {getNonTypeIdentifiers} from "../util/getNonTypeIdentifiers";
import isExportFrom from "../util/isExportFrom";
import {removeMaybeImportAttributes} from "../util/removeMaybeImportAttributes";
import shouldElideDefaultExport from "../util/shouldElideDefaultExport";
import Transformer from "./Transformer";
/**
* Class for editing import statements when we are keeping the code as ESM. We still need to remove
* type-only imports in TypeScript and Flow.
*/
export default class ESMImportTransformer extends Transformer {
constructor(
tokens,
nameManager,
helperManager,
reactHotLoaderTransformer,
isTypeScriptTransformEnabled,
isFlowTransformEnabled,
keepUnusedImports,
options,
) {
super();this.tokens = tokens;this.nameManager = nameManager;this.helperManager = helperManager;this.reactHotLoaderTransformer = reactHotLoaderTransformer;this.isTypeScriptTransformEnabled = isTypeScriptTransformEnabled;this.isFlowTransformEnabled = isFlowTransformEnabled;this.keepUnusedImports = keepUnusedImports;;
this.nonTypeIdentifiers =
isTypeScriptTransformEnabled && !keepUnusedImports
? getNonTypeIdentifiers(tokens, options)
: new Set();
this.declarationInfo =
isTypeScriptTransformEnabled && !keepUnusedImports
? getDeclarationInfo(tokens)
: EMPTY_DECLARATION_INFO;
this.injectCreateRequireForImportRequire = Boolean(options.injectCreateRequireForImportRequire);
}
process() {
// TypeScript `import foo = require('foo');` should always just be translated to plain require.
if (this.tokens.matches3(tt._import, tt.name, tt.eq)) {
return this.processImportEquals();
}
if (
this.tokens.matches4(tt._import, tt.name, tt.name, tt.eq) &&
this.tokens.matchesContextualAtIndex(this.tokens.currentIndex() + 1, ContextualKeyword._type)
) {
// import type T = require('T')
this.tokens.removeInitialToken();
// This construct is always exactly 8 tokens long, so remove the 7 remaining tokens.
for (let i = 0; i < 7; i++) {
this.tokens.removeToken();
}
return true;
}
if (this.tokens.matches2(tt._export, tt.eq)) {
this.tokens.replaceToken("module.exports");
return true;
}
if (
this.tokens.matches5(tt._export, tt._import, tt.name, tt.name, tt.eq) &&
this.tokens.matchesContextualAtIndex(this.tokens.currentIndex() + 2, ContextualKeyword._type)
) {
// export import type T = require('T')
this.tokens.removeInitialToken();
// This construct is always exactly 9 tokens long, so remove the 8 remaining tokens.
for (let i = 0; i < 8; i++) {
this.tokens.removeToken();
}
return true;
}
if (this.tokens.matches1(tt._import)) {
return this.processImport();
}
if (this.tokens.matches2(tt._export, tt._default)) {
return this.processExportDefault();
}
if (this.tokens.matches2(tt._export, tt.braceL)) {
return this.processNamedExports();
}
if (
this.tokens.matches2(tt._export, tt.name) &&
this.tokens.matchesContextualAtIndex(this.tokens.currentIndex() + 1, ContextualKeyword._type)
) {
// export type {a};
// export type {a as b};
// export type {a} from './b';
// export type * from './b';
// export type * as ns from './b';
this.tokens.removeInitialToken();
this.tokens.removeToken();
if (this.tokens.matches1(tt.braceL)) {
while (!this.tokens.matches1(tt.braceR)) {
this.tokens.removeToken();
}
this.tokens.removeToken();
} else {
// *
this.tokens.removeToken();
if (this.tokens.matches1(tt._as)) {
// as
this.tokens.removeToken();
// ns
this.tokens.removeToken();
}
}
// Remove type re-export `... } from './T'`
if (
this.tokens.matchesContextual(ContextualKeyword._from) &&
this.tokens.matches1AtIndex(this.tokens.currentIndex() + 1, tt.string)
) {
this.tokens.removeToken();
this.tokens.removeToken();
removeMaybeImportAttributes(this.tokens);
}
return true;
}
return false;
}
processImportEquals() {
const importName = this.tokens.identifierNameAtIndex(this.tokens.currentIndex() + 1);
if (this.shouldAutomaticallyElideImportedName(importName)) {
// If this name is only used as a type, elide the whole import.
elideImportEquals(this.tokens);
} else if (this.injectCreateRequireForImportRequire) {
// We're using require in an environment (Node ESM) that doesn't provide
// it as a global, so generate a helper to import it.
// import -> const
this.tokens.replaceToken("const");
// Foo
this.tokens.copyToken();
// =
this.tokens.copyToken();
// require
this.tokens.replaceToken(this.helperManager.getHelperName("require"));
} else {
// Otherwise, just switch `import` to `const`.
this.tokens.replaceToken("const");
}
return true;
}
processImport() {
if (this.tokens.matches2(tt._import, tt.parenL)) {
// Dynamic imports don't need to be transformed.
return false;
}
const snapshot = this.tokens.snapshot();
const allImportsRemoved = this.removeImportTypeBindings();
if (allImportsRemoved) {
this.tokens.restoreToSnapshot(snapshot);
while (!this.tokens.matches1(tt.string)) {
this.tokens.removeToken();
}
this.tokens.removeToken();
removeMaybeImportAttributes(this.tokens);
if (this.tokens.matches1(tt.semi)) {
this.tokens.removeToken();
}
}
return true;
}
/**
* Remove type bindings from this import, leaving the rest of the import intact.
*
* Return true if this import was ONLY types, and thus is eligible for removal. This will bail out
* of the replacement operation, so we can return early here.
*/
removeImportTypeBindings() {
this.tokens.copyExpectedToken(tt._import);
if (
this.tokens.matchesContextual(ContextualKeyword._type) &&
!this.tokens.matches1AtIndex(this.tokens.currentIndex() + 1, tt.comma) &&
!this.tokens.matchesContextualAtIndex(this.tokens.currentIndex() + 1, ContextualKeyword._from)
) {
// This is an "import type" statement, so exit early.
return true;
}
if (this.tokens.matches1(tt.string)) {
// This is a bare import, so we should proceed with the import.
this.tokens.copyToken();
return false;
}
// Skip the "module" token in import reflection.
if (
this.tokens.matchesContextual(ContextualKeyword._module) &&
this.tokens.matchesContextualAtIndex(this.tokens.currentIndex() + 2, ContextualKeyword._from)
) {
this.tokens.copyToken();
}
let foundNonTypeImport = false;
let foundAnyNamedImport = false;
let needsComma = false;
// Handle default import.
if (this.tokens.matches1(tt.name)) {
if (this.shouldAutomaticallyElideImportedName(this.tokens.identifierName())) {
this.tokens.removeToken();
if (this.tokens.matches1(tt.comma)) {
this.tokens.removeToken();
}
} else {
foundNonTypeImport = true;
this.tokens.copyToken();
if (this.tokens.matches1(tt.comma)) {
// We're in a statement like:
// import A, * as B from './A';
// or
// import A, {foo} from './A';
// where the `A` is being kept. The comma should be removed if an only
// if the next part of the import statement is elided, but that's hard
// to determine at this point in the code. Instead, always remove it
// and set a flag to add it back if necessary.
needsComma = true;
this.tokens.removeToken();
}
}
}
if (this.tokens.matches1(tt.star)) {
if (this.shouldAutomaticallyElideImportedName(this.tokens.identifierNameAtRelativeIndex(2))) {
this.tokens.removeToken();
this.tokens.removeToken();
this.tokens.removeToken();
} else {
if (needsComma) {
this.tokens.appendCode(",");
}
foundNonTypeImport = true;
this.tokens.copyExpectedToken(tt.star);
this.tokens.copyExpectedToken(tt.name);
this.tokens.copyExpectedToken(tt.name);
}
} else if (this.tokens.matches1(tt.braceL)) {
if (needsComma) {
this.tokens.appendCode(",");
}
this.tokens.copyToken();
while (!this.tokens.matches1(tt.braceR)) {
foundAnyNamedImport = true;
const specifierInfo = getImportExportSpecifierInfo(this.tokens);
if (
specifierInfo.isType ||
this.shouldAutomaticallyElideImportedName(specifierInfo.rightName)
) {
while (this.tokens.currentIndex() < specifierInfo.endIndex) {
this.tokens.removeToken();
}
if (this.tokens.matches1(tt.comma)) {
this.tokens.removeToken();
}
} else {
foundNonTypeImport = true;
while (this.tokens.currentIndex() < specifierInfo.endIndex) {
this.tokens.copyToken();
}
if (this.tokens.matches1(tt.comma)) {
this.tokens.copyToken();
}
}
}
this.tokens.copyExpectedToken(tt.braceR);
}
if (this.keepUnusedImports) {
return false;
}
if (this.isTypeScriptTransformEnabled) {
return !foundNonTypeImport;
} else if (this.isFlowTransformEnabled) {
// In Flow, unlike TS, `import {} from 'foo';` preserves the import.
return foundAnyNamedImport && !foundNonTypeImport;
} else {
return false;
}
}
shouldAutomaticallyElideImportedName(name) {
return (
this.isTypeScriptTransformEnabled &&
!this.keepUnusedImports &&
!this.nonTypeIdentifiers.has(name)
);
}
processExportDefault() {
if (
shouldElideDefaultExport(
this.isTypeScriptTransformEnabled,
this.keepUnusedImports,
this.tokens,
this.declarationInfo,
)
) {
// If the exported value is just an identifier and should be elided by TypeScript
// rules, then remove it entirely. It will always have the form `export default e`,
// where `e` is an identifier.
this.tokens.removeInitialToken();
this.tokens.removeToken();
this.tokens.removeToken();
return true;
}
const alreadyHasName =
this.tokens.matches4(tt._export, tt._default, tt._function, tt.name) ||
// export default async function
(this.tokens.matches5(tt._export, tt._default, tt.name, tt._function, tt.name) &&
this.tokens.matchesContextualAtIndex(
this.tokens.currentIndex() + 2,
ContextualKeyword._async,
)) ||
this.tokens.matches4(tt._export, tt._default, tt._class, tt.name) ||
this.tokens.matches5(tt._export, tt._default, tt._abstract, tt._class, tt.name);
if (!alreadyHasName && this.reactHotLoaderTransformer) {
// This is a plain "export default E" statement and we need to assign E to a variable.
// Change "export default E" to "let _default; export default _default = E"
const defaultVarName = this.nameManager.claimFreeName("_default");
this.tokens.replaceToken(`let ${defaultVarName}; export`);
this.tokens.copyToken();
this.tokens.appendCode(` ${defaultVarName} =`);
this.reactHotLoaderTransformer.setExtractedDefaultExportName(defaultVarName);
return true;
}
return false;
}
/**
* Handle a statement with one of these forms:
* export {a, type b};
* export {c, type d} from 'foo';
*
* In both cases, any explicit type exports should be removed. In the first
* case, we also need to handle implicit export elision for names declared as
* types. In the second case, we must NOT do implicit named export elision,
* but we must remove the runtime import if all exports are type exports.
*/
processNamedExports() {
if (!this.isTypeScriptTransformEnabled) {
return false;
}
this.tokens.copyExpectedToken(tt._export);
this.tokens.copyExpectedToken(tt.braceL);
const isReExport = isExportFrom(this.tokens);
let foundNonTypeExport = false;
while (!this.tokens.matches1(tt.braceR)) {
const specifierInfo = getImportExportSpecifierInfo(this.tokens);
if (
specifierInfo.isType ||
(!isReExport && this.shouldElideExportedName(specifierInfo.leftName))
) {
// Type export, so remove all tokens, including any comma.
while (this.tokens.currentIndex() < specifierInfo.endIndex) {
this.tokens.removeToken();
}
if (this.tokens.matches1(tt.comma)) {
this.tokens.removeToken();
}
} else {
// Non-type export, so copy all tokens, including any comma.
foundNonTypeExport = true;
while (this.tokens.currentIndex() < specifierInfo.endIndex) {
this.tokens.copyToken();
}
if (this.tokens.matches1(tt.comma)) {
this.tokens.copyToken();
}
}
}
this.tokens.copyExpectedToken(tt.braceR);
if (!this.keepUnusedImports && isReExport && !foundNonTypeExport) {
// This is a type-only re-export, so skip evaluating the other module. Technically this
// leaves the statement as `export {}`, but that's ok since that's a no-op.
this.tokens.removeToken();
this.tokens.removeToken();
removeMaybeImportAttributes(this.tokens);
}
return true;
}
/**
* ESM elides all imports with the rule that we only elide if we see that it's
* a type and never see it as a value. This is in contrast to CJS, which
* elides imports that are completely unknown.
*/
shouldElideExportedName(name) {
return (
this.isTypeScriptTransformEnabled &&
!this.keepUnusedImports &&
this.declarationInfo.typeDeclarations.has(name) &&
!this.declarationInfo.valueDeclarations.has(name)
);
}
}
@@ -0,0 +1 @@
{"version":3,"file":"roller-coaster.js","sources":["../../../src/icons/roller-coaster.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name RollerCoaster\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNiAxOVY1IiAvPgogIDxwYXRoIGQ9Ik0xMCAxOVY2LjgiIC8+CiAgPHBhdGggZD0iTTE0IDE5di03LjgiIC8+CiAgPHBhdGggZD0iTTE4IDV2NCIgLz4KICA8cGF0aCBkPSJNMTggMTl2LTYiIC8+CiAgPHBhdGggZD0iTTIyIDE5VjkiIC8+CiAgPHBhdGggZD0iTTIgMTlWOWE0IDQgMCAwIDEgNC00YzIgMCA0IDEuMzMgNiA0czQgNCA2IDRhNCA0IDAgMSAwLTMtNi42NSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/roller-coaster\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 RollerCoaster = createLucideIcon('RollerCoaster', [\n ['path', { d: 'M6 19V5', key: '1r845m' }],\n ['path', { d: 'M10 19V6.8', key: '9j2tfs' }],\n ['path', { d: 'M14 19v-7.8', key: '10s8qv' }],\n ['path', { d: 'M18 5v4', key: '1tajlv' }],\n ['path', { d: 'M18 19v-6', key: 'ielfq3' }],\n ['path', { d: 'M22 19V9', key: '158nzp' }],\n ['path', { d: 'M2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,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,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,CAAiE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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;AAChG,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,58 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.createMcpExpressApp = createMcpExpressApp;
const express_1 = __importDefault(require("express"));
const hostHeaderValidation_js_1 = require("./middleware/hostHeaderValidation.js");
/**
* Creates an Express application pre-configured for MCP servers.
*
* When the host is '127.0.0.1', 'localhost', or '::1' (the default is '127.0.0.1'),
* DNS rebinding protection middleware is automatically applied to protect against
* DNS rebinding attacks on localhost servers.
*
* @param options - Configuration options
* @returns A configured Express application
*
* @example
* ```typescript
* // Basic usage - defaults to 127.0.0.1 with DNS rebinding protection
* const app = createMcpExpressApp();
*
* // Custom host - DNS rebinding protection only applied for localhost hosts
* const app = createMcpExpressApp({ host: '0.0.0.0' }); // No automatic DNS rebinding protection
* const app = createMcpExpressApp({ host: 'localhost' }); // DNS rebinding protection enabled
*
* // Custom allowed hosts for non-localhost binding
* const app = createMcpExpressApp({ host: '0.0.0.0', allowedHosts: ['myapp.local', 'localhost'] });
* ```
*/
function createMcpExpressApp(options = {}) {
const { host = '127.0.0.1', allowedHosts } = options;
const app = (0, express_1.default)();
// If allowedHosts is explicitly provided, use that for validation
if (allowedHosts) {
app.use((0, hostHeaderValidation_js_1.hostHeaderValidation)(allowedHosts));
}
else {
// Apply DNS rebinding protection automatically for localhost hosts
const localhostHosts = ['127.0.0.1', 'localhost', '::1'];
if (localhostHosts.includes(host)) {
app.use((0, hostHeaderValidation_js_1.localhostHostValidation)());
}
else if (host === '0.0.0.0' || host === '::') {
// Warn when binding to all interfaces without DNS rebinding protection
// eslint-disable-next-line no-console
console.warn(`Warning: Server is binding to ${host} without DNS rebinding protection. ` +
'Consider using the allowedHosts option to restrict allowed hosts, ' +
'or use authentication to protect your server.');
}
}
// The JSON body parser runs after the Host header validation, so a request
// with a disallowed Host is answered 403 without its body being read.
app.use(express_1.default.json());
return app;
}
//# sourceMappingURL=express.js.map
@@ -0,0 +1,292 @@
'use strict';
const { kForOnEventAttribute, kListener } = require('./constants');
const kCode = Symbol('kCode');
const kData = Symbol('kData');
const kError = Symbol('kError');
const kMessage = Symbol('kMessage');
const kReason = Symbol('kReason');
const kTarget = Symbol('kTarget');
const kType = Symbol('kType');
const kWasClean = Symbol('kWasClean');
/**
* Class representing an event.
*/
class Event {
/**
* Create a new `Event`.
*
* @param {String} type The name of the event
* @throws {TypeError} If the `type` argument is not specified
*/
constructor(type) {
this[kTarget] = null;
this[kType] = type;
}
/**
* @type {*}
*/
get target() {
return this[kTarget];
}
/**
* @type {String}
*/
get type() {
return this[kType];
}
}
Object.defineProperty(Event.prototype, 'target', { enumerable: true });
Object.defineProperty(Event.prototype, 'type', { enumerable: true });
/**
* Class representing a close event.
*
* @extends Event
*/
class CloseEvent extends Event {
/**
* Create a new `CloseEvent`.
*
* @param {String} type The name of the event
* @param {Object} [options] A dictionary object that allows for setting
* attributes via object members of the same name
* @param {Number} [options.code=0] The status code explaining why the
* connection was closed
* @param {String} [options.reason=''] A human-readable string explaining why
* the connection was closed
* @param {Boolean} [options.wasClean=false] Indicates whether or not the
* connection was cleanly closed
*/
constructor(type, options = {}) {
super(type);
this[kCode] = options.code === undefined ? 0 : options.code;
this[kReason] = options.reason === undefined ? '' : options.reason;
this[kWasClean] = options.wasClean === undefined ? false : options.wasClean;
}
/**
* @type {Number}
*/
get code() {
return this[kCode];
}
/**
* @type {String}
*/
get reason() {
return this[kReason];
}
/**
* @type {Boolean}
*/
get wasClean() {
return this[kWasClean];
}
}
Object.defineProperty(CloseEvent.prototype, 'code', { enumerable: true });
Object.defineProperty(CloseEvent.prototype, 'reason', { enumerable: true });
Object.defineProperty(CloseEvent.prototype, 'wasClean', { enumerable: true });
/**
* Class representing an error event.
*
* @extends Event
*/
class ErrorEvent extends Event {
/**
* Create a new `ErrorEvent`.
*
* @param {String} type The name of the event
* @param {Object} [options] A dictionary object that allows for setting
* attributes via object members of the same name
* @param {*} [options.error=null] The error that generated this event
* @param {String} [options.message=''] The error message
*/
constructor(type, options = {}) {
super(type);
this[kError] = options.error === undefined ? null : options.error;
this[kMessage] = options.message === undefined ? '' : options.message;
}
/**
* @type {*}
*/
get error() {
return this[kError];
}
/**
* @type {String}
*/
get message() {
return this[kMessage];
}
}
Object.defineProperty(ErrorEvent.prototype, 'error', { enumerable: true });
Object.defineProperty(ErrorEvent.prototype, 'message', { enumerable: true });
/**
* Class representing a message event.
*
* @extends Event
*/
class MessageEvent extends Event {
/**
* Create a new `MessageEvent`.
*
* @param {String} type The name of the event
* @param {Object} [options] A dictionary object that allows for setting
* attributes via object members of the same name
* @param {*} [options.data=null] The message content
*/
constructor(type, options = {}) {
super(type);
this[kData] = options.data === undefined ? null : options.data;
}
/**
* @type {*}
*/
get data() {
return this[kData];
}
}
Object.defineProperty(MessageEvent.prototype, 'data', { enumerable: true });
/**
* This provides methods for emulating the `EventTarget` interface. It's not
* meant to be used directly.
*
* @mixin
*/
const EventTarget = {
/**
* Register an event listener.
*
* @param {String} type A string representing the event type to listen for
* @param {(Function|Object)} handler The listener to add
* @param {Object} [options] An options object specifies characteristics about
* the event listener
* @param {Boolean} [options.once=false] A `Boolean` indicating that the
* listener should be invoked at most once after being added. If `true`,
* the listener would be automatically removed when invoked.
* @public
*/
addEventListener(type, handler, options = {}) {
for (const listener of this.listeners(type)) {
if (
!options[kForOnEventAttribute] &&
listener[kListener] === handler &&
!listener[kForOnEventAttribute]
) {
return;
}
}
let wrapper;
if (type === 'message') {
wrapper = function onMessage(data, isBinary) {
const event = new MessageEvent('message', {
data: isBinary ? data : data.toString()
});
event[kTarget] = this;
callListener(handler, this, event);
};
} else if (type === 'close') {
wrapper = function onClose(code, message) {
const event = new CloseEvent('close', {
code,
reason: message.toString(),
wasClean: this._closeFrameReceived && this._closeFrameSent
});
event[kTarget] = this;
callListener(handler, this, event);
};
} else if (type === 'error') {
wrapper = function onError(error) {
const event = new ErrorEvent('error', {
error,
message: error.message
});
event[kTarget] = this;
callListener(handler, this, event);
};
} else if (type === 'open') {
wrapper = function onOpen() {
const event = new Event('open');
event[kTarget] = this;
callListener(handler, this, event);
};
} else {
return;
}
wrapper[kForOnEventAttribute] = !!options[kForOnEventAttribute];
wrapper[kListener] = handler;
if (options.once) {
this.once(type, wrapper);
} else {
this.on(type, wrapper);
}
},
/**
* Remove an event listener.
*
* @param {String} type A string representing the event type to remove
* @param {(Function|Object)} handler The listener to remove
* @public
*/
removeEventListener(type, handler) {
for (const listener of this.listeners(type)) {
if (listener[kListener] === handler && !listener[kForOnEventAttribute]) {
this.removeListener(type, listener);
break;
}
}
}
};
module.exports = {
CloseEvent,
ErrorEvent,
Event,
EventTarget,
MessageEvent
};
/**
* Call an event listener
*
* @param {(Function|Object)} listener The listener to call
* @param {*} thisArg The value to use as `this`` when calling the listener
* @param {Event} event The event to pass to the listener
* @private
*/
function callListener(listener, thisArg, event) {
if (typeof listener === 'object' && listener.handleEvent) {
listener.handleEvent.call(listener, event);
} else {
listener.call(thisArg, event);
}
}
@@ -0,0 +1,165 @@
function hasWindow() {
return typeof window !== 'undefined';
}
function getNodeName(node) {
if (isNode(node)) {
return (node.nodeName || '').toLowerCase();
}
// Mocked nodes in testing environments may not be instances of Node. By
// returning `#document` an infinite loop won't occur.
// https://github.com/floating-ui/floating-ui/issues/2317
return '#document';
}
function getWindow(node) {
var _node$ownerDocument;
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
}
function getDocumentElement(node) {
var _ref;
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
}
function isNode(value) {
if (!hasWindow()) {
return false;
}
return value instanceof Node || value instanceof getWindow(value).Node;
}
function isElement(value) {
if (!hasWindow()) {
return false;
}
return value instanceof Element || value instanceof getWindow(value).Element;
}
function isHTMLElement(value) {
if (!hasWindow()) {
return false;
}
return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
}
function isShadowRoot(value) {
if (!hasWindow() || typeof ShadowRoot === 'undefined') {
return false;
}
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
}
function isOverflowElement(element) {
const {
overflow,
overflowX,
overflowY,
display
} = getComputedStyle(element);
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== 'inline' && display !== 'contents';
}
function isTableElement(element) {
return /^(table|td|th)$/.test(getNodeName(element));
}
function isTopLayer(element) {
try {
if (element.matches(':popover-open')) {
return true;
}
} catch (_e) {
// no-op
}
try {
return element.matches(':modal');
} catch (_e) {
return false;
}
}
const willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
const containRe = /paint|layout|strict|content/;
const isNotNone = value => !!value && value !== 'none';
let isWebKitValue;
function isContainingBlock(elementOrCss) {
const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
// https://drafts.csswg.org/css-transforms-2/#individual-transforms
return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || '') || containRe.test(css.contain || '');
}
function getContainingBlock(element) {
let currentNode = getParentNode(element);
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
if (isContainingBlock(currentNode)) {
return currentNode;
} else if (isTopLayer(currentNode)) {
return null;
}
currentNode = getParentNode(currentNode);
}
return null;
}
function isWebKit() {
if (isWebKitValue == null) {
isWebKitValue = typeof CSS !== 'undefined' && CSS.supports && CSS.supports('-webkit-backdrop-filter', 'none');
}
return isWebKitValue;
}
function isLastTraversableNode(node) {
return /^(html|body|#document)$/.test(getNodeName(node));
}
function getComputedStyle(element) {
return getWindow(element).getComputedStyle(element);
}
function getNodeScroll(element) {
if (isElement(element)) {
return {
scrollLeft: element.scrollLeft,
scrollTop: element.scrollTop
};
}
return {
scrollLeft: element.scrollX,
scrollTop: element.scrollY
};
}
function getParentNode(node) {
if (getNodeName(node) === 'html') {
return node;
}
const result =
// Step into the shadow DOM of the parent of a slotted node.
node.assignedSlot ||
// DOM Element detected.
node.parentNode ||
// ShadowRoot detected.
isShadowRoot(node) && node.host ||
// Fallback.
getDocumentElement(node);
return isShadowRoot(result) ? result.host : result;
}
function getNearestOverflowAncestor(node) {
const parentNode = getParentNode(node);
if (isLastTraversableNode(parentNode)) {
return node.ownerDocument ? node.ownerDocument.body : node.body;
}
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
return parentNode;
}
return getNearestOverflowAncestor(parentNode);
}
function getOverflowAncestors(node, list, traverseIframes) {
var _node$ownerDocument2;
if (list === void 0) {
list = [];
}
if (traverseIframes === void 0) {
traverseIframes = true;
}
const scrollableAncestor = getNearestOverflowAncestor(node);
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
const win = getWindow(scrollableAncestor);
if (isBody) {
const frameElement = getFrameElement(win);
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
} else {
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
}
}
function getFrameElement(win) {
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
}
export { getComputedStyle, getContainingBlock, getDocumentElement, getFrameElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isTopLayer, isWebKit };
@@ -0,0 +1 @@
{"version":3,"file":"headphone-off.js","sources":["../../../src/icons/headphone-off.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name HeadphoneOff\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjEgMTRoLTEuMzQzIiAvPgogIDxwYXRoIGQ9Ik05LjEyOCAzLjQ3QTkgOSAwIDAgMSAyMSAxMnYzLjM0MyIgLz4KICA8cGF0aCBkPSJtMiAyIDIwIDIwIiAvPgogIDxwYXRoIGQ9Ik0yMC40MTQgMjAuNDE0QTIgMiAwIDAgMSAxOSAyMWgtMWEyIDIgMCAwIDEtMi0ydi0zIiAvPgogIDxwYXRoIGQ9Ik0zIDE0aDNhMiAyIDAgMCAxIDIgMnYzYTIgMiAwIDAgMS0yIDJINWEyIDIgMCAwIDEtMi0ydi03YTkgOSAwIDAgMSAyLjYzNi02LjM2NCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/headphone-off\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst HeadphoneOff = createLucideIcon('HeadphoneOff', [\n ['path', { d: 'M21 14h-1.343', key: '1jdnxi' }],\n ['path', { d: 'M9.128 3.47A9 9 0 0 1 21 12v3.343', key: '6kipu2' }],\n ['path', { d: 'm2 2 20 20', key: '1ooewy' }],\n ['path', { d: 'M20.414 20.414A2 2 0 0 1 19 21h-1a2 2 0 0 1-2-2v-3', key: '9x50f4' }],\n [\n 'path',\n {\n d: 'M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 2.636-6.364',\n key: '1bkxnm',\n },\n ],\n]);\n\nexport default HeadphoneOff;\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,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CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACnF,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;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,83 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const util_1 = require("../util");
exports.default = (0, util_1.createRule)({
name: 'no-var-requires',
meta: {
type: 'problem',
deprecated: {
deprecatedSince: '8.0.0',
replacedBy: [
{
rule: {
name: '@typescript-eslint/no-require-imports',
url: 'https://typescript-eslint.io/rules/no-require-imports',
},
},
],
url: 'https://github.com/typescript-eslint/typescript-eslint/pull/8334',
},
docs: {
description: 'Disallow `require` statements except in import statements',
},
messages: {
noVarReqs: 'Require statement not part of import statement.',
},
replacedBy: ['@typescript-eslint/no-require-imports'],
schema: [
{
type: 'object',
additionalProperties: false,
properties: {
allow: {
type: 'array',
description: 'Patterns of import paths to allow requiring from.',
items: { type: 'string' },
},
},
},
],
},
defaultOptions: [{ allow: [] }],
create(context, options) {
const allowPatterns = options[0].allow.map(pattern => new RegExp(pattern, 'u'));
function isImportPathAllowed(importPath) {
return allowPatterns.some(pattern => importPath.match(pattern));
}
function isStringOrTemplateLiteral(node) {
return ((node.type === utils_1.AST_NODE_TYPES.Literal &&
typeof node.value === 'string') ||
node.type === utils_1.AST_NODE_TYPES.TemplateLiteral);
}
return {
'CallExpression[callee.name="require"]'(node) {
if (node.arguments[0] && isStringOrTemplateLiteral(node.arguments[0])) {
const argValue = (0, util_1.getStaticStringValue)(node.arguments[0]);
if (typeof argValue === 'string' && isImportPathAllowed(argValue)) {
return;
}
}
const parent = node.parent.type === utils_1.AST_NODE_TYPES.ChainExpression
? node.parent.parent
: node.parent;
if ([
utils_1.AST_NODE_TYPES.CallExpression,
utils_1.AST_NODE_TYPES.MemberExpression,
utils_1.AST_NODE_TYPES.NewExpression,
utils_1.AST_NODE_TYPES.TSAsExpression,
utils_1.AST_NODE_TYPES.TSTypeAssertion,
utils_1.AST_NODE_TYPES.VariableDeclarator,
].includes(parent.type)) {
const variable = utils_1.ASTUtils.findVariable(context.sourceCode.getScope(node), 'require');
if (!variable?.identifiers.length) {
context.report({
node,
messageId: 'noVarReqs',
});
}
}
},
};
},
});
@@ -0,0 +1,253 @@
import { URL } from 'node:url'
import { Duplex, Readable, Writable } from 'node:stream'
import { EventEmitter } from 'node:events'
import { Blob } from 'node:buffer'
import { IncomingHttpHeaders, OutgoingHttpHeaders } from './header'
import BodyReadable from './readable'
import { FormData } from './formdata'
import Errors from './errors'
import { Autocomplete } from './utility'
export default Dispatcher
export type UndiciHeaders = OutgoingHttpHeaders | string[] | Iterable<[string, string | string[] | undefined]> | null
/** Dispatcher is the core API used to dispatch requests. */
declare class Dispatcher extends EventEmitter {
/** Dispatches a request. This API is expected to evolve through semver-major versions and is less stable than the preceding higher level APIs. It is primarily intended for library developers who implement higher level APIs on top of this. */
dispatch (options: Dispatcher.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean
/** Starts two-way communications with the requested resource. */
connect<TOpaque = null>(options: Dispatcher.ConnectOptions<TOpaque>, callback: (err: Error | null, data: Dispatcher.ConnectData<TOpaque>) => void): void
connect<TOpaque = null>(options: Dispatcher.ConnectOptions<TOpaque>): Promise<Dispatcher.ConnectData<TOpaque>>
/** Compose a chain of dispatchers */
compose (dispatchers: Dispatcher.DispatcherComposeInterceptor[]): Dispatcher.ComposedDispatcher
compose (...dispatchers: Dispatcher.DispatcherComposeInterceptor[]): Dispatcher.ComposedDispatcher
/** Performs an HTTP request. */
request<TOpaque = null>(options: Dispatcher.RequestOptions<TOpaque>, callback: (err: Error | null, data: Dispatcher.ResponseData<TOpaque>) => void): void
request<TOpaque = null>(options: Dispatcher.RequestOptions<TOpaque>): Promise<Dispatcher.ResponseData<TOpaque>>
/** For easy use with `stream.pipeline`. */
pipeline<TOpaque = null>(options: Dispatcher.PipelineOptions<TOpaque>, handler: Dispatcher.PipelineHandler<TOpaque>): Duplex
/** A faster version of `Dispatcher.request`. */
stream<TOpaque = null>(options: Dispatcher.RequestOptions<TOpaque>, factory: Dispatcher.StreamFactory<TOpaque>, callback: (err: Error | null, data: Dispatcher.StreamData<TOpaque>) => void): void
stream<TOpaque = null>(options: Dispatcher.RequestOptions<TOpaque>, factory: Dispatcher.StreamFactory<TOpaque>): Promise<Dispatcher.StreamData<TOpaque>>
/** Upgrade to a different protocol. */
upgrade (options: Dispatcher.UpgradeOptions, callback: (err: Error | null, data: Dispatcher.UpgradeData) => void): void
upgrade (options: Dispatcher.UpgradeOptions): Promise<Dispatcher.UpgradeData>
/** Closes the client and gracefully waits for enqueued requests to complete before invoking the callback (or returning a promise if no callback is provided). */
close (callback: () => void): void
close (): Promise<void>
/** Destroy the client abruptly with the given err. All the pending and running requests will be asynchronously aborted and error. Waits until socket is closed before invoking the callback (or returning a promise if no callback is provided). Since this operation is asynchronously dispatched there might still be some progress on dispatched requests. */
destroy (err: Error | null, callback: () => void): void
destroy (callback: () => void): void
destroy (err: Error | null): Promise<void>
destroy (): Promise<void>
on (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this
on (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
on (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
on (eventName: 'drain', callback: (origin: URL) => void): this
once (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this
once (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
once (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
once (eventName: 'drain', callback: (origin: URL) => void): this
off (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this
off (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
off (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
off (eventName: 'drain', callback: (origin: URL) => void): this
addListener (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this
addListener (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
addListener (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
addListener (eventName: 'drain', callback: (origin: URL) => void): this
removeListener (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this
removeListener (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
removeListener (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
removeListener (eventName: 'drain', callback: (origin: URL) => void): this
prependListener (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this
prependListener (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
prependListener (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
prependListener (eventName: 'drain', callback: (origin: URL) => void): this
prependOnceListener (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this
prependOnceListener (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
prependOnceListener (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
prependOnceListener (eventName: 'drain', callback: (origin: URL) => void): this
listeners (eventName: 'connect'): ((origin: URL, targets: readonly Dispatcher[]) => void)[]
listeners (eventName: 'disconnect'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[]
listeners (eventName: 'connectionError'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[]
listeners (eventName: 'drain'): ((origin: URL) => void)[]
rawListeners (eventName: 'connect'): ((origin: URL, targets: readonly Dispatcher[]) => void)[]
rawListeners (eventName: 'disconnect'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[]
rawListeners (eventName: 'connectionError'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[]
rawListeners (eventName: 'drain'): ((origin: URL) => void)[]
emit (eventName: 'connect', origin: URL, targets: readonly Dispatcher[]): boolean
emit (eventName: 'disconnect', origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError): boolean
emit (eventName: 'connectionError', origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError): boolean
emit (eventName: 'drain', origin: URL): boolean
}
declare namespace Dispatcher {
export interface ComposedDispatcher extends Dispatcher { }
export type Dispatch = Dispatcher['dispatch']
export type DispatcherComposeInterceptor = (dispatch: Dispatch) => Dispatch
export interface DispatchOptions {
origin?: string | URL;
path: string;
method: HttpMethod;
/** Default: `null` */
body?: string | Buffer | Uint8Array | Readable | null | FormData;
/** Default: `null` */
headers?: UndiciHeaders;
/** Query string params to be embedded in the request URL. Default: `null` */
query?: Record<string, any>;
/** Whether the requests can be safely retried or not. If `false` the request won't be sent until all preceding requests in the pipeline have completed. Default: `true` if `method` is `HEAD` or `GET`. */
idempotent?: boolean;
/** Whether the response is expected to take a long time and would end up blocking the pipeline. When this is set to `true` further pipelining will be avoided on the same connection until headers have been received. Defaults to `method !== 'HEAD'`. */
blocking?: boolean;
/** The IP Type of Service (ToS) value for the request socket. Must be an integer between 0 and 255. */
typeOfService?: number | null;
/** Upgrade the request. Should be used to specify the kind of upgrade i.e. `'Websocket'`. Default: `method === 'CONNECT' || null`. */
upgrade?: boolean | string | null;
/** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers. Defaults to 300 seconds. HTTP/1.1 parser timeouts are not guaranteed to fire with exact millisecond precision: delays up to 1000ms use native timers, while larger delays use lower-overhead fast timers with a target resolution around 500ms. */
headersTimeout?: number | null;
/** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use 0 to disable it entirely. Defaults to 300 seconds. HTTP/1.1 parser timeouts are not guaranteed to fire with exact millisecond precision: delays up to 1000ms use native timers, while larger delays use lower-overhead fast timers with a target resolution around 500ms. */
bodyTimeout?: number | null;
/** Whether the request should stablish a keep-alive or not. Default `false` */
reset?: boolean;
/** For H2, it appends the expect: 100-continue header, and halts the request body until a 100-continue is received from the remote server */
expectContinue?: boolean;
}
export interface ConnectOptions<TOpaque = null> {
origin: string | URL;
path: string;
/** Default: `null` */
headers?: UndiciHeaders;
/** Default: `null` */
signal?: AbortSignal | EventEmitter | null;
/** This argument parameter is passed through to `ConnectData` */
opaque?: TOpaque;
/** Default: `null` */
responseHeaders?: 'raw' | null;
}
export interface RequestOptions<TOpaque = null> extends DispatchOptions {
/** Default: `null` */
opaque?: TOpaque;
/** Default: `null` */
signal?: AbortSignal | EventEmitter | null;
/** Default: `null` */
onInfo?: (info: { statusCode: number, headers: Record<string, string | string[]> }) => void;
/** Default: `null` */
responseHeaders?: 'raw' | null;
/** Default: `64 KiB` */
highWaterMark?: number;
}
export interface PipelineOptions<TOpaque = null> extends RequestOptions<TOpaque> {
/** `true` if the `handler` will return an object stream. Default: `false` */
objectMode?: boolean;
}
export interface UpgradeOptions {
path: string;
/** Default: `'GET'` */
method?: string;
/** Default: `null` */
headers?: UndiciHeaders;
/** A string of comma separated protocols, in descending preference order. Default: `'Websocket'` */
protocol?: string;
/** Default: `null` */
signal?: AbortSignal | EventEmitter | null;
/** Default: `null` */
responseHeaders?: 'raw' | null;
}
export interface ConnectData<TOpaque = null> {
statusCode: number;
headers: IncomingHttpHeaders;
socket: Duplex;
opaque: TOpaque;
}
export interface ResponseData<TOpaque = null> {
statusCode: number;
statusText: string;
headers: IncomingHttpHeaders;
body: BodyReadable & BodyMixin;
trailers: Record<string, string>;
opaque: TOpaque;
context: object;
}
export interface PipelineHandlerData<TOpaque = null> {
statusCode: number;
headers: IncomingHttpHeaders;
opaque: TOpaque;
body: BodyReadable;
context: object;
}
export interface StreamData<TOpaque = null> {
opaque: TOpaque;
trailers: Record<string, string>;
}
export interface UpgradeData<TOpaque = null> {
headers: IncomingHttpHeaders;
socket: Duplex;
opaque: TOpaque;
}
export interface StreamFactoryData<TOpaque = null> {
statusCode: number;
headers: IncomingHttpHeaders;
opaque: TOpaque;
context: object;
}
export type StreamFactory<TOpaque = null> = (data: StreamFactoryData<TOpaque>) => Writable
export interface DispatchController {
get aborted(): boolean
get paused(): boolean
get reason(): Error | null
rawHeaders?: Buffer[] | string[] | IncomingHttpHeaders | null
rawTrailers?: Buffer[] | string[] | IncomingHttpHeaders | null
abort(reason: Error): void
pause(): void
resume(): void
}
export interface DispatchHandler {
onRequestStart?(controller: DispatchController, context: any): void;
onRequestUpgrade?(controller: DispatchController, statusCode: number, headers: IncomingHttpHeaders, socket: Duplex): void;
onResponseStart?(controller: DispatchController, statusCode: number, headers: IncomingHttpHeaders, statusMessage?: string): void;
onResponseData?(controller: DispatchController, chunk: Buffer): void;
onResponseEnd?(controller: DispatchController, trailers: IncomingHttpHeaders): void;
onResponseError?(controller: DispatchController, error: Error): void;
/** Invoked when response is received, before headers have been read. **/
onResponseStarted?(): void;
/** Invoked when a body chunk is sent to the server. May be invoked multiple times for chunked requests */
onBodySent?(chunk: Buffer): void;
/** Invoked after the request body is fully sent. */
onRequestSent?(): void;
}
export type PipelineHandler<TOpaque = null> = (data: PipelineHandlerData<TOpaque>) => Readable
export type HttpMethod = Autocomplete<'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH'>
/**
* @link https://fetch.spec.whatwg.org/#body-mixin
*/
interface BodyMixin {
readonly body?: never;
readonly bodyUsed: boolean;
arrayBuffer(): Promise<ArrayBuffer>;
blob(): Promise<Blob>;
bytes(): Promise<Uint8Array>;
formData(): Promise<never>;
json(): Promise<unknown>;
text(): Promise<string>;
}
export interface DispatchInterceptor {
(dispatch: Dispatch): Dispatch
}
}
@@ -0,0 +1,27 @@
{
"name": "tinybench",
"version": "2.9.0",
"type": "module",
"packageManager": "pnpm@8.4.0",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.cts",
"exports": {
"require": "./dist/index.cjs",
"import": "./dist/index.js",
"default": "./dist/index.js"
},
"files": [
"dist/**"
],
"repository": "tinylibs/tinybench",
"license": "MIT",
"keywords": [
"benchmark",
"tinylibs",
"tiny"
],
"scripts": {
"publish": "npm run build && clean-publish"
}
}
@@ -0,0 +1 @@
{"version":3,"file":"folders.js","sources":["../../../src/icons/folders.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Folders\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjAgMTdhMiAyIDAgMCAwIDItMlY5YTIgMiAwIDAgMC0yLTJoLTMuOWEyIDIgMCAwIDEtMS42OS0uOWwtLjgxLTEuMmEyIDIgMCAwIDAtMS42Ny0uOUg4YTIgMiAwIDAgMC0yIDJ2OWEyIDIgMCAwIDAgMiAyWiIgLz4KICA8cGF0aCBkPSJNMiA4djExYTIgMiAwIDAgMCAyIDJoMTQiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/folders\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 Folders = createLucideIcon('Folders', [\n [\n 'path',\n {\n d: 'M20 17a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3.9a2 2 0 0 1-1.69-.9l-.81-1.2a2 2 0 0 0-1.67-.9H8a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2Z',\n key: '4u7rpt',\n },\n ],\n ['path', { d: 'M2 8v11a2 2 0 0 0 2 2h14', key: '1eicx1' }],\n]);\n\nexport default Folders;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB,SAAW,CAAA,CAAA,CAA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AAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3D,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"names":["_getPrototypeOf","require","_isNativeReflectConstruct","_possibleConstructorReturn","_callSuper","_this","derived","args","getPrototypeOf","possibleConstructorReturn","isNativeReflectConstruct","Reflect","construct","constructor","apply"],"sources":["../../src/helpers/callSuper.ts"],"sourcesContent":["/* @minVersion 7.23.8 */\n\n// This is duplicated to packages/babel-plugin-transform-classes/src/inline-callSuper-helpers.ts\n\nimport getPrototypeOf from \"./getPrototypeOf.ts\";\nimport isNativeReflectConstruct from \"./isNativeReflectConstruct.ts\";\nimport possibleConstructorReturn from \"./possibleConstructorReturn.ts\";\n\nexport default function _callSuper(\n _this: object,\n derived: Function,\n args: ArrayLike<any>,\n) {\n // Super\n derived = getPrototypeOf(derived);\n return possibleConstructorReturn(\n _this,\n isNativeReflectConstruct()\n ? // NOTE: This doesn't work if this.__proto__.constructor has been modified.\n Reflect.construct(\n derived,\n args || [],\n getPrototypeOf(_this).constructor,\n )\n : derived.apply(_this, args),\n );\n}\n"],"mappings":";;;;;;AAIA,IAAAA,eAAA,GAAAC,OAAA;AACA,IAAAC,yBAAA,GAAAD,OAAA;AACA,IAAAE,0BAAA,GAAAF,OAAA;AAEe,SAASG,UAAUA,CAChCC,KAAa,EACbC,OAAiB,EACjBC,IAAoB,EACpB;EAEAD,OAAO,GAAG,IAAAE,uBAAc,EAACF,OAAO,CAAC;EACjC,OAAO,IAAAG,kCAAyB,EAC9BJ,KAAK,EACL,IAAAK,iCAAwB,EAAC,CAAC,GAEtBC,OAAO,CAACC,SAAS,CACfN,OAAO,EACPC,IAAI,IAAI,EAAE,EACV,IAAAC,uBAAc,EAACH,KAAK,CAAC,CAACQ,WACxB,CAAC,GACDP,OAAO,CAACQ,KAAK,CAACT,KAAK,EAAEE,IAAI,CAC/B,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,24 @@
/**
* @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 FileJson = createLucideIcon("FileJson", [
["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: "M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1", key: "1oajmo" }
],
[
"path",
{ d: "M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1", key: "mpwhp6" }
]
]);
export { FileJson as default };
//# sourceMappingURL=file-json.js.map
@@ -0,0 +1,412 @@
flf2a$ 4 3 20 -1 3
LockerGnome by Christopher Joseph Pirillo <pirillc2770@cobra.uni.edu>
Figletized by Simon Bradley <syb3@aber.ac.uk>
$$@
$$@
$$@
$$@@
::| @
`:' @
+ @
@@
::| ::| @
`` `` @
@
@@
:|:| @
::==:| @
:|:| @
@@
.::|::\@
`::|::>@
\::|:/ @
` @@
:| ::/'@
::/ @
,::/ :|@
@@
/:::\ @
\:,:/_, @
:,,,\_ @
@@
::| @
:/ @
@
@@
,:/ @
(:( @
`:\ @
@@
\:, @
):) @
/:' @
@@
\:|:/ @
--:-- @
/:|:\ @
@@
::| @
::::::| @
::| @
@@
@
@
::| @
:/ @@
@
:::::| @
@
@@
@
@
::| @
@@
::/'@
::/ @
,::/ @
@@
,::::,@
: -- |@
`::::'@
@@
::| @
:| @
:::| @
@@
::~~:\@
,:/ @
/::::|@
@@
/:'`:,@
|:< @
\:,,:'@
@@
:| :| @
:::::|@
:| @
@@
:::::|@
`:::\ @
,:::/ @
@@
,::::\@
::---,@
`::::'@
@@
:::::/@
::/ @
::/ @
@@
,::::,@
>----<@
`::::'@
@@
,::::,@
\----|@
,::::'@
@@
@
::) @
::) @
@@
@
::) @
::| @
:/ @@
,:/ @
<:< @
`:\ @
@@
@
:::::| @
:::::| @
@@
\:. @
>:> @
/:' @
@@
/:~~~:\@
,:::/@
++ @
@@
/:::\ @
`\__| ) @
`\:::/ @
@@
::::\ @
::|,::|@
::| ::|@
@@
::::::\@
::>-::<@
::::::/@
@@
,::::\@
::| @
'::::/@
@@
::::::\@
::| ::|@
::::::/@
@@
::::::|@
:::> @
::::::|@
@@
::::::|@
::::> @
::| @
@@
:::::\@
::> ==@
:::::/@
@@
::| ::|@
::::::|@
::| ::|@
@@
::::::|@
::| @
::::::|@
@@
::|@
::> ::|@
::::/ @
@@
::| ::|@
:::::< @
::| ::|@
@@
::| @
::| @
::::::|@
@@
::::::|@
:::"::|@
::| ::|@
@@
::\ ::|@
::::::|@
::| \:|@
@@
::::\ @
::| ::|@
::::/ @
@@
::::::\@
::|_::|@
::|~~~ @
@@
::::\ @
::|,::|@
:::::\@
@@
::::::\@
::|,::|@
::| ::\@
@@
.:::::|@
`:::::>@
,::::/ @
@@
::::::|@
::| @
::| @
@@
::| ::|@
::|_::|@
`:::::|@
@@
::| ::|@
::::/ @
::/ @
@@
::| ::|@
:::"::|@
::::::|@
@@
::| ::|@
>:::< @
::| ::|@
@@
::| ::|@
::::/ @
::| @
@@
<::::\@
,:::::/@
`:::::>@
@@
::= @
:| @
::= @
@@
`::\ @
::\ @
::\,@
@@
=:| @
:| @
=:| @
@@
, @
/:\ @
@
@@
@
@
::::::| @
@@
::|@
:|@
@
@@
@
.::\ @
`::| @
@@
:| @
::'| @
:::| @
@@
@
.::/ @
`::\ @
@@
:| @
:':| @
:::| @
@@
@
:~~/ @
:::, @
@@
,::| @
::| @
:| @
@@
@
/::| @
\::| @
,.:/ @@
:| @
:::| @
:|:| @
@@
++ @
:| @
:| @
@@
++ @
, :| @
\::/ @
@@
:| @
:|_/ @
:|~\ @
@@
:| @
:| @
:| @
@@
@
:\/| @
:::| @
@@
@
:::\ @
:|:| @
@@
@
,::\ @
`::/ @
@@
@
:::\ @
:::/ @
:| @@
@
/::| @
\::| @
:| @@
@
:::| @
:| @
@@
@
<::< @
>::> @
@@
:| @
:::| @
:| @
@@
@
:\:| @
`::| @
@@
@
:\:| @
:/ @
@@
@
:::| @
:/\| @
@@
@
\:/ @
/:\ @
@@
@
:\:| @
`::| @
.,:' @@
@
>::> @
<::< @
@@
,:/ @
>= @
`:\ @
@@
::| @
- @
::| @
@@
\:, @
=< @
/:' @
@@
,-:_, @
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@