fix(products): fix breadcrumbs and product filtering (backport from main)
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled

This commit is contained in:
2026-02-24 16:04:21 +01:00
parent 915eb61613
commit 5397309103
43805 changed files with 4324295 additions and 3 deletions

View File

@@ -0,0 +1,61 @@
{
"name": "css-line-break",
"version": "2.1.0",
"description": "",
"main": "dist/css-line-break.umd.js",
"module": "dist/css-line-break.es5.js",
"typings": "dist/types/index.d.ts",
"scripts": {
"prebuild": "rimraf dist/",
"build": "tsc --module commonjs && rollup -c rollup.config.ts",
"format": "prettier --write \"{src,scripts}/**/*.ts\"",
"lint": "tslint -c tslint.json --project tsconfig.json -t codeFrame src/**/*.ts tests/**/*.ts scripts/**/*.ts",
"generate-trie": "ts-node scripts/generate_line_break_trie.ts",
"generate-tests": "ts-node scripts/generate_line_break_tests.ts",
"mocha": "mocha --require ts-node/register tests/*.ts",
"test": "npm run lint && npm run mocha",
"release": "standard-version"
},
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/niklasvh/css-line-break.git"
},
"keywords": [
"white-space",
"line-break",
"word-break",
"word-wrap",
"overflow-wrap"
],
"dependencies": {
"utrie": "^1.0.2"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^19.0.0",
"@rollup/plugin-node-resolve": "^13.0.0",
"@rollup/plugin-typescript": "^8.2.1",
"@types/mocha": "^8.2.2",
"@types/node": "^16.0.0",
"mocha": "9.0.2",
"prettier": "^2.3.2",
"rimraf": "3.0.2",
"rollup": "^2.52.7",
"rollup-plugin-json": "^4.0.0",
"rollup-plugin-sourcemaps": "^0.6.3",
"standard-version": "^9.3.0",
"ts-node": "^10.0.0",
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.18.0",
"typescript": "^4.3.5"
},
"author": {
"name": "Niklas von Hertzen",
"email": "niklasvh@gmail.com",
"url": "https://hertzen.com"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/niklasvh/css-line-break/issues"
},
"homepage": "https://github.com/niklasvh/css-line-break#readme"
}

View File

@@ -0,0 +1,13 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import * as modDev from './LexicalTabIndentationPlugin.dev.mjs';
import * as modProd from './LexicalTabIndentationPlugin.prod.mjs';
const mod = process.env.NODE_ENV !== 'production' ? modDev : modProd;
export const TabIndentationPlugin = mod.TabIndentationPlugin;
export const registerTabIndentation = mod.registerTabIndentation;

View File

@@ -0,0 +1 @@
{"version":3,"file":"line-chart.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}

View File

@@ -0,0 +1,64 @@
import { constructFrom } from "./constructFrom.mjs";
import { getWeekYear } from "./getWeekYear.mjs";
import { startOfWeek } from "./startOfWeek.mjs";
import { getDefaultOptions } from "./_lib/defaultOptions.mjs";
/**
* The {@link startOfWeekYear} function options.
*/
/**
* @name startOfWeekYear
* @category Week-Numbering Year Helpers
* @summary Return the start of a local week-numbering year for the given date.
*
* @description
* Return the start of a local week-numbering year.
* The exact calculation depends on the values of
* `options.weekStartsOn` (which is the index of the first day of the week)
* and `options.firstWeekContainsDate` (which is the day of January, which is always in
* the first week of the week-numbering year)
*
* Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param date - The original date
* @param options - An object with options
*
* @returns The start of a week-numbering year
*
* @example
* // The start of an a week-numbering year for 2 July 2005 with default settings:
* const result = startOfWeekYear(new Date(2005, 6, 2))
* //=> Sun Dec 26 2004 00:00:00
*
* @example
* // The start of a week-numbering year for 2 July 2005
* // if Monday is the first day of week
* // and 4 January is always in the first week of the year:
* const result = startOfWeekYear(new Date(2005, 6, 2), {
* weekStartsOn: 1,
* firstWeekContainsDate: 4
* })
* //=> Mon Jan 03 2005 00:00:00
*/
export function startOfWeekYear(date, options) {
const defaultOptions = getDefaultOptions();
const firstWeekContainsDate =
options?.firstWeekContainsDate ??
options?.locale?.options?.firstWeekContainsDate ??
defaultOptions.firstWeekContainsDate ??
defaultOptions.locale?.options?.firstWeekContainsDate ??
1;
const year = getWeekYear(date, options);
const firstWeek = constructFrom(date, 0);
firstWeek.setFullYear(year, 0, firstWeekContainsDate);
firstWeek.setHours(0, 0, 0, 0);
const _date = startOfWeek(firstWeek, options);
return _date;
}
// Fallback for modularized imports:
export default startOfWeekYear;

View File

@@ -0,0 +1,29 @@
/**
* @license lucide-react v0.441.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 BugPlay = createLucideIcon("BugPlay", [
[
"path",
{
d: "M12.765 21.522a.5.5 0 0 1-.765-.424v-8.196a.5.5 0 0 1 .765-.424l5.878 3.674a1 1 0 0 1 0 1.696z",
key: "17shqo"
}
],
["path", { d: "M14.12 3.88 16 2", key: "qol33r" }],
["path", { d: "M18 11a4 4 0 0 0-4-4h-4a4 4 0 0 0-4 4v3a6.1 6.1 0 0 0 2 4.5", key: "1tjixy" }],
["path", { d: "M20.97 5c0 2.1-1.6 3.8-3.5 4", key: "18gb23" }],
["path", { d: "M3 21c0-2.1 1.7-3.9 3.8-4", key: "4p0ekp" }],
["path", { d: "M6 13H2", key: "82j7cp" }],
["path", { d: "M6.53 9C4.6 8.8 3 7.1 3 5", key: "32zzws" }],
["path", { d: "m8 2 1.88 1.88", key: "fmnt4t" }],
["path", { d: "M9 7.13v-1a3.003 3.003 0 1 1 6 0v1", key: "d7y7pr" }]
]);
export { BugPlay as default };
//# sourceMappingURL=bug-play.js.map

View File

@@ -0,0 +1,29 @@
import { formatDistance } from "./ar/_lib/formatDistance.mjs";
import { formatLong } from "./ar/_lib/formatLong.mjs";
import { formatRelative } from "./ar/_lib/formatRelative.mjs";
import { localize } from "./ar/_lib/localize.mjs";
import { match } from "./ar/_lib/match.mjs";
/**
* @category Locales
* @summary Arabic locale (Modern Standard Arabic - Al-fussha).
* @language Modern Standard Arabic
* @iso-639-2 ara
* @author Abdallah Hassan [@AbdallahAHO](https://github.com/AbdallahAHO)
* @author Koussay Haj Kacem [@essana3](https://github.com/essana3)
*/
export const ar = {
code: "ar",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 6 /* Saturday */,
firstWeekContainsDate: 1,
},
};
// Fallback for modularized imports:
export default ar;

View File

@@ -0,0 +1,296 @@
'use client';
import { c as _c } from "react/compiler-runtime";
import { jsx as _jsx } from "react/jsx-runtime";
import React from 'react';
import { ArrayField } from '../../fields/Array/index.js';
import { BlocksField } from '../../fields/Blocks/index.js';
import { CheckboxField } from '../../fields/Checkbox/index.js';
import { CodeField } from '../../fields/Code/index.js';
import { CollapsibleField } from '../../fields/Collapsible/index.js';
import { DateTimeField } from '../../fields/DateTime/index.js';
import { EmailField } from '../../fields/Email/index.js';
import { GroupField } from '../../fields/Group/index.js';
import { HiddenField } from '../../fields/Hidden/index.js';
import { JoinField } from '../../fields/Join/index.js';
import { JSONField } from '../../fields/JSON/index.js';
import { NumberField } from '../../fields/Number/index.js';
import { PointField } from '../../fields/Point/index.js';
import { RadioGroupField } from '../../fields/RadioGroup/index.js';
import { RelationshipField } from '../../fields/Relationship/index.js';
import { RichTextField } from '../../fields/RichText/index.js';
import { RowField } from '../../fields/Row/index.js';
import { SelectField } from '../../fields/Select/index.js';
import { TabsField } from '../../fields/Tabs/index.js';
import { TextField } from '../../fields/Text/index.js';
import { TextareaField } from '../../fields/Textarea/index.js';
import { UIField } from '../../fields/UI/index.js';
import { UploadField } from '../../fields/Upload/index.js';
import { useFormFields } from '../../forms/Form/index.js';
export function RenderField(t0) {
const $ = _c(13);
const {
clientFieldConfig,
forceRender,
indexPath,
parentPath,
parentSchemaPath,
path,
permissions,
readOnly,
schemaPath
} = t0;
let t1;
if ($[0] !== path) {
t1 = t2 => {
const [fields] = t2;
return fields && fields?.[path]?.customComponents?.Field;
};
$[0] = path;
$[1] = t1;
} else {
t1 = $[1];
}
const CustomField = useFormFields(t1);
let t2;
if ($[2] !== CustomField || $[3] !== clientFieldConfig || $[4] !== forceRender || $[5] !== indexPath || $[6] !== parentPath || $[7] !== parentSchemaPath || $[8] !== path || $[9] !== permissions || $[10] !== readOnly || $[11] !== schemaPath) {
t2 = Symbol.for("react.early_return_sentinel");
bb0: {
const baseFieldProps = {
forceRender,
permissions,
readOnly,
schemaPath
};
if (clientFieldConfig.admin?.hidden) {
t2 = _jsx(HiddenField, {
...baseFieldProps,
path
});
break bb0;
}
if (CustomField !== undefined) {
t2 = CustomField || null;
break bb0;
}
const iterableFieldProps = {
...baseFieldProps,
indexPath,
parentPath,
parentSchemaPath
};
switch (clientFieldConfig.type) {
case "array":
{
t2 = _jsx(ArrayField, {
...iterableFieldProps,
field: clientFieldConfig,
path
});
break bb0;
}
case "blocks":
{
t2 = _jsx(BlocksField, {
...iterableFieldProps,
field: clientFieldConfig,
path
});
break bb0;
}
case "checkbox":
{
t2 = _jsx(CheckboxField, {
...baseFieldProps,
field: clientFieldConfig,
path
});
break bb0;
}
case "code":
{
t2 = _jsx(CodeField, {
...baseFieldProps,
field: clientFieldConfig,
path
});
break bb0;
}
case "collapsible":
{
t2 = _jsx(CollapsibleField, {
...iterableFieldProps,
field: clientFieldConfig,
path
});
break bb0;
}
case "date":
{
t2 = _jsx(DateTimeField, {
...baseFieldProps,
field: clientFieldConfig,
path
});
break bb0;
}
case "email":
{
t2 = _jsx(EmailField, {
...baseFieldProps,
field: clientFieldConfig,
path
});
break bb0;
}
case "group":
{
t2 = _jsx(GroupField, {
...iterableFieldProps,
field: clientFieldConfig,
path
});
break bb0;
}
case "join":
{
t2 = _jsx(JoinField, {
...baseFieldProps,
field: clientFieldConfig,
path
});
break bb0;
}
case "json":
{
t2 = _jsx(JSONField, {
...baseFieldProps,
field: clientFieldConfig,
path
});
break bb0;
}
case "number":
{
t2 = _jsx(NumberField, {
...baseFieldProps,
field: clientFieldConfig,
path
});
break bb0;
}
case "point":
{
t2 = _jsx(PointField, {
...baseFieldProps,
field: clientFieldConfig,
path
});
break bb0;
}
case "radio":
{
t2 = _jsx(RadioGroupField, {
...baseFieldProps,
field: clientFieldConfig,
path
});
break bb0;
}
case "relationship":
{
t2 = _jsx(RelationshipField, {
...baseFieldProps,
field: clientFieldConfig,
path
});
break bb0;
}
case "richText":
{
t2 = _jsx(RichTextField, {
...baseFieldProps,
field: clientFieldConfig,
path
});
break bb0;
}
case "row":
{
t2 = _jsx(RowField, {
...iterableFieldProps,
field: clientFieldConfig
});
break bb0;
}
case "select":
{
t2 = _jsx(SelectField, {
...baseFieldProps,
field: clientFieldConfig,
path
});
break bb0;
}
case "tabs":
{
t2 = _jsx(TabsField, {
...iterableFieldProps,
field: clientFieldConfig,
path
});
break bb0;
}
case "text":
{
t2 = _jsx(TextField, {
...baseFieldProps,
field: clientFieldConfig,
path
});
break bb0;
}
case "textarea":
{
t2 = _jsx(TextareaField, {
...baseFieldProps,
field: clientFieldConfig,
path
});
break bb0;
}
case "ui":
{
t2 = _jsx(UIField, {});
break bb0;
}
case "upload":
{
t2 = _jsx(UploadField, {
...baseFieldProps,
field: clientFieldConfig,
path
});
break bb0;
}
}
}
$[2] = CustomField;
$[3] = clientFieldConfig;
$[4] = forceRender;
$[5] = indexPath;
$[6] = parentPath;
$[7] = parentSchemaPath;
$[8] = path;
$[9] = permissions;
$[10] = readOnly;
$[11] = schemaPath;
$[12] = t2;
} else {
t2 = $[12];
}
if (t2 !== Symbol.for("react.early_return_sentinel")) {
return t2;
}
}
//# sourceMappingURL=RenderField.js.map

View File

@@ -0,0 +1,49 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = parse;
function parse(input) {
input = input.toUpperCase();
var splitIndex = input.indexOf("P");
var mantissa, exponent;
if (splitIndex !== -1) {
mantissa = input.substring(0, splitIndex);
exponent = parseInt(input.substring(splitIndex + 1));
} else {
mantissa = input;
exponent = 0;
}
var dotIndex = mantissa.indexOf(".");
if (dotIndex !== -1) {
var integerPart = parseInt(mantissa.substring(0, dotIndex), 16);
var sign = Math.sign(integerPart);
integerPart = sign * integerPart;
var fractionLength = mantissa.length - dotIndex - 1;
var fractionalPart = parseInt(mantissa.substring(dotIndex + 1), 16);
var fraction = fractionLength > 0 ? fractionalPart / Math.pow(16, fractionLength) : 0;
if (sign === 0) {
if (fraction === 0) {
mantissa = sign;
} else {
if (Object.is(sign, -0)) {
mantissa = -fraction;
} else {
mantissa = fraction;
}
}
} else {
mantissa = sign * (integerPart + fraction);
}
} else {
mantissa = parseInt(mantissa, 16);
}
return mantissa * (splitIndex !== -1 ? Math.pow(2, exponent) : 1);
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"receipt-pound-sterling.js","sources":["../../../src/icons/receipt-pound-sterling.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ReceiptPoundSterling\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNCAydjIwbDItMSAyIDEgMi0xIDIgMSAyLTEgMiAxIDItMSAyIDFWMmwtMiAxLTItMS0yIDEtMi0xLTIgMS0yLTEtMiAxWiIgLz4KICA8cGF0aCBkPSJNOCAxM2g1IiAvPgogIDxwYXRoIGQ9Ik0xMCAxN1Y5LjVhMi41IDIuNSAwIDAgMSA1IDAiIC8+CiAgPHBhdGggZD0iTTggMTdoNyIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/receipt-pound-sterling\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 ReceiptPoundSterling = createLucideIcon('ReceiptPoundSterling', [\n [\n 'path',\n { d: 'M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z', key: 'q3az6g' },\n ],\n ['path', { d: 'M8 13h5', key: '1k9z8w' }],\n ['path', { d: 'M10 17V9.5a2.5 2.5 0 0 1 5 0', key: '1dzgp0' }],\n ['path', { d: 'M8 17h7', key: '8mjdqu' }],\n]);\n\nexport default ReceiptPoundSterling;\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,CAAA,CAAA,CAAA,CAAA,CAAA,CAAuB,iBAAiB,sBAAwB,CAAA,CAAA,CAAA;AAAA,CACpE,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA,CAAE,CAAA,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA2E,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,QAAS,CAAA,CAAA;AAAA,CAChG,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAgC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC7D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC1C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('conformsTo', require('../conformsTo'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -0,0 +1,10 @@
import type { Locale } from "./types.js";
/**
* @category Locales
* @summary Bulgarian locale.
* @language Bulgarian
* @iso-639-2 bul
* @author Nikolay Stoynov [@arvigeus](https://github.com/arvigeus)
* @author Tsvetan Ovedenski [@fintara](https://github.com/fintara)
*/
export declare const bg: Locale;

View File

@@ -0,0 +1,55 @@
import { createReactRouterV6CompatibleTracingIntegration, createV6CompatibleWithSentryReactRouterRouting, createV6CompatibleWrapCreateBrowserRouter, createV6CompatibleWrapCreateMemoryRouter, createV6CompatibleWrapUseRoutes } from './reactrouter-compat-utils/instrumentation.js';
import '@sentry/core';
import '@sentry/browser';
/**
* A browser tracing integration that uses React Router v7 to instrument navigations.
* Expects `useEffect`, `useLocation`, `useNavigationType`, `createRoutesFromChildren` and `matchRoutes` to be passed as options.
*/
function reactRouterV7BrowserTracingIntegration(
options,
) {
return createReactRouterV6CompatibleTracingIntegration(options, '7');
}
/**
* A higher-order component that adds Sentry routing instrumentation to a React Router v7 Route component.
* This is used to automatically capture route changes as transactions.
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function withSentryReactRouterV7Routing(routes) {
return createV6CompatibleWithSentryReactRouterRouting(routes, '7');
}
/**
* A wrapper function that adds Sentry routing instrumentation to a React Router v7 createBrowserRouter function.
* This is used to automatically capture route changes as transactions when using the createBrowserRouter API.
*/
function wrapCreateBrowserRouterV7
(createRouterFunction) {
return createV6CompatibleWrapCreateBrowserRouter(createRouterFunction, '7');
}
/**
* A wrapper function that adds Sentry routing instrumentation to a React Router v7 createMemoryRouter function.
* This is used to automatically capture route changes as transactions when using the createMemoryRouter API.
* The difference between createBrowserRouter and createMemoryRouter is that with createMemoryRouter,
* optional `initialEntries` are also taken into account.
*/
function wrapCreateMemoryRouterV7
(createMemoryRouterFunction) {
return createV6CompatibleWrapCreateMemoryRouter(createMemoryRouterFunction, '7');
}
/**
* A wrapper function that adds Sentry routing instrumentation to a React Router v7 useRoutes hook.
* This is used to automatically capture route changes as transactions when using the useRoutes hook.
*/
function wrapUseRoutesV7(origUseRoutes) {
return createV6CompatibleWrapUseRoutes(origUseRoutes, '7');
}
export { reactRouterV7BrowserTracingIntegration, withSentryReactRouterV7Routing, wrapCreateBrowserRouterV7, wrapCreateMemoryRouterV7, wrapUseRoutesV7 };
//# sourceMappingURL=reactrouterv7.js.map

View File

@@ -0,0 +1,79 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.cjs";
import type { ColumnBaseConfig } from "../../column.cjs";
import { entityKind } from "../../entity.cjs";
import { type Equal } from "../../utils.cjs";
import { SingleStoreColumnBuilderWithAutoIncrement, SingleStoreColumnWithAutoIncrement } from "./common.cjs";
export type SingleStoreDecimalBuilderInitial<TName extends string> = SingleStoreDecimalBuilder<{
name: TName;
dataType: 'string';
columnType: 'SingleStoreDecimal';
data: string;
driverParam: string;
enumValues: undefined;
generated: undefined;
}>;
export declare class SingleStoreDecimalBuilder<T extends ColumnBuilderBaseConfig<'string', 'SingleStoreDecimal'>> extends SingleStoreColumnBuilderWithAutoIncrement<T, SingleStoreDecimalConfig> {
static readonly [entityKind]: string;
constructor(name: T['name'], config: SingleStoreDecimalConfig | undefined);
}
export declare class SingleStoreDecimal<T extends ColumnBaseConfig<'string', 'SingleStoreDecimal'>> extends SingleStoreColumnWithAutoIncrement<T, SingleStoreDecimalConfig> {
static readonly [entityKind]: string;
readonly precision: number | undefined;
readonly scale: number | undefined;
readonly unsigned: boolean | undefined;
mapFromDriverValue(value: unknown): string;
getSQLType(): string;
}
export type SingleStoreDecimalNumberBuilderInitial<TName extends string> = SingleStoreDecimalNumberBuilder<{
name: TName;
dataType: 'number';
columnType: 'SingleStoreDecimalNumber';
data: number;
driverParam: string;
enumValues: undefined;
generated: undefined;
}>;
export declare class SingleStoreDecimalNumberBuilder<T extends ColumnBuilderBaseConfig<'number', 'SingleStoreDecimalNumber'>> extends SingleStoreColumnBuilderWithAutoIncrement<T, SingleStoreDecimalConfig> {
static readonly [entityKind]: string;
constructor(name: T['name'], config: SingleStoreDecimalConfig | undefined);
}
export declare class SingleStoreDecimalNumber<T extends ColumnBaseConfig<'number', 'SingleStoreDecimalNumber'>> extends SingleStoreColumnWithAutoIncrement<T, SingleStoreDecimalConfig> {
static readonly [entityKind]: string;
readonly precision: number | undefined;
readonly scale: number | undefined;
readonly unsigned: boolean | undefined;
mapFromDriverValue(value: unknown): number;
mapToDriverValue: StringConstructor;
getSQLType(): string;
}
export type SingleStoreDecimalBigIntBuilderInitial<TName extends string> = SingleStoreDecimalBigIntBuilder<{
name: TName;
dataType: 'bigint';
columnType: 'SingleStoreDecimalBigInt';
data: bigint;
driverParam: string;
enumValues: undefined;
generated: undefined;
}>;
export declare class SingleStoreDecimalBigIntBuilder<T extends ColumnBuilderBaseConfig<'bigint', 'SingleStoreDecimalBigInt'>> extends SingleStoreColumnBuilderWithAutoIncrement<T, SingleStoreDecimalConfig> {
static readonly [entityKind]: string;
constructor(name: T['name'], config: SingleStoreDecimalConfig | undefined);
}
export declare class SingleStoreDecimalBigInt<T extends ColumnBaseConfig<'bigint', 'SingleStoreDecimalBigInt'>> extends SingleStoreColumnWithAutoIncrement<T, SingleStoreDecimalConfig> {
static readonly [entityKind]: string;
readonly precision: number | undefined;
readonly scale: number | undefined;
readonly unsigned: boolean | undefined;
mapFromDriverValue: BigIntConstructor;
mapToDriverValue: StringConstructor;
getSQLType(): string;
}
export interface SingleStoreDecimalConfig<T extends 'string' | 'number' | 'bigint' = 'string' | 'number' | 'bigint'> {
precision?: number;
scale?: number;
unsigned?: boolean;
mode?: T;
}
export declare function decimal(): SingleStoreDecimalBuilderInitial<''>;
export declare function decimal<TMode extends 'string' | 'number' | 'bigint'>(config: SingleStoreDecimalConfig<TMode>): Equal<TMode, 'number'> extends true ? SingleStoreDecimalNumberBuilderInitial<''> : Equal<TMode, 'bigint'> extends true ? SingleStoreDecimalBigIntBuilderInitial<''> : SingleStoreDecimalBuilderInitial<''>;
export declare function decimal<TName extends string, TMode extends 'string' | 'number' | 'bigint'>(name: TName, config?: SingleStoreDecimalConfig<TMode>): Equal<TMode, 'number'> extends true ? SingleStoreDecimalNumberBuilderInitial<TName> : Equal<TMode, 'bigint'> extends true ? SingleStoreDecimalBigIntBuilderInitial<TName> : SingleStoreDecimalBuilderInitial<TName>;

View File

@@ -0,0 +1,28 @@
/// <reference types="node" />
/// <reference types="node" />
import { Span } from '@opentelemetry/api';
import { InstrumentationConfig } from '@opentelemetry/instrumentation';
export interface KafkajsMessage {
key?: Buffer | string | null;
value: Buffer | string | null;
partition?: number;
headers?: Record<string, Buffer | string | (Buffer | string)[] | undefined>;
timestamp?: string;
}
export interface MessageInfo<T = KafkajsMessage> {
topic: string;
message: T;
}
export interface KafkaProducerCustomAttributeFunction<T = KafkajsMessage> {
(span: Span, info: MessageInfo<T>): void;
}
export interface KafkaConsumerCustomAttributeFunction<T = KafkajsMessage> {
(span: Span, info: MessageInfo<T>): void;
}
export interface KafkaJsInstrumentationConfig extends InstrumentationConfig {
/** hook for adding custom attributes before producer message is sent */
producerHook?: KafkaProducerCustomAttributeFunction;
/** hook for adding custom attributes before consumer message is processed */
consumerHook?: KafkaConsumerCustomAttributeFunction;
}
//# sourceMappingURL=types.d.ts.map

View File

@@ -0,0 +1,41 @@
"use strict";
exports.formatLong = void 0;
var _index = require("../../_lib/buildFormatLongFn.js");
const dateFormats = {
full: "EEEE, MMMM do, y",
long: "MMMM do, y",
medium: "MMM d, y",
short: "MM/dd/yyyy",
};
const timeFormats = {
full: "h:mm:ss a zzzz",
long: "h:mm:ss a z",
medium: "h:mm:ss a",
short: "h:mm a",
};
const dateTimeFormats = {
full: "{{date}} 'at' {{time}}",
long: "{{date}} 'at' {{time}}",
medium: "{{date}}, {{time}}",
short: "{{date}}, {{time}}",
};
const formatLong = (exports.formatLong = {
date: (0, _index.buildFormatLongFn)({
formats: dateFormats,
defaultWidth: "full",
}),
time: (0, _index.buildFormatLongFn)({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: (0, _index.buildFormatLongFn)({
formats: dateTimeFormats,
defaultWidth: "full",
}),
});

View File

@@ -0,0 +1,6 @@
import { noop } from 'motion-utils';
import { createRenderBatcher } from './batcher.mjs';
const { schedule: frame, cancel: cancelFrame, state: frameData, steps: frameSteps, } = createRenderBatcher(typeof requestAnimationFrame !== "undefined" ? requestAnimationFrame : noop, true);
export { cancelFrame, frame, frameData, frameSteps };

View File

@@ -0,0 +1,116 @@
import * as util from "../core/util.js";
export const parsedType = (data) => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "NaN" : "nombro";
}
case "object": {
if (Array.isArray(data)) {
return "tabelo";
}
if (data === null) {
return "senvalora";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const error = () => {
const Sizable = {
string: { unit: "karaktrojn", verb: "havi" },
file: { unit: "bajtojn", verb: "havi" },
array: { unit: "elementojn", verb: "havi" },
set: { unit: "elementojn", verb: "havi" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const Nouns = {
regex: "enigo",
email: "retadreso",
url: "URL",
emoji: "emoĝio",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "ISO-datotempo",
date: "ISO-dato",
time: "ISO-tempo",
duration: "ISO-daŭro",
ipv4: "IPv4-adreso",
ipv6: "IPv6-adreso",
cidrv4: "IPv4-rango",
cidrv6: "IPv6-rango",
base64: "64-ume kodita karaktraro",
base64url: "URL-64-ume kodita karaktraro",
json_string: "JSON-karaktraro",
e164: "E.164-nombro",
jwt: "JWT",
template_literal: "enigo",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `Nevalida enigo: atendiĝis ${issue.expected}, riceviĝis ${parsedType(issue.input)}`;
case "invalid_value":
if (issue.values.length === 1)
return `Nevalida enigo: atendiĝis ${util.stringifyPrimitive(issue.values[0])}`;
return `Nevalida opcio: atendiĝis unu el ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Tro granda: atendiĝis ke ${issue.origin ?? "valoro"} havu ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elementojn"}`;
return `Tro granda: atendiĝis ke ${issue.origin ?? "valoro"} havu ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `Tro malgranda: atendiĝis ke ${issue.origin} havu ${adj}${issue.minimum.toString()} ${sizing.unit}`;
}
return `Tro malgranda: atendiĝis ke ${issue.origin} estu ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with")
return `Nevalida karaktraro: devas komenciĝi per "${_issue.prefix}"`;
if (_issue.format === "ends_with")
return `Nevalida karaktraro: devas finiĝi per "${_issue.suffix}"`;
if (_issue.format === "includes")
return `Nevalida karaktraro: devas inkluzivi "${_issue.includes}"`;
if (_issue.format === "regex")
return `Nevalida karaktraro: devas kongrui kun la modelo ${_issue.pattern}`;
return `Nevalida ${Nouns[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Nevalida nombro: devas esti oblo de ${issue.divisor}`;
case "unrecognized_keys":
return `Nekonata${issue.keys.length > 1 ? "j" : ""} ŝlosilo${issue.keys.length > 1 ? "j" : ""}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `Nevalida ŝlosilo en ${issue.origin}`;
case "invalid_union":
return "Nevalida enigo";
case "invalid_element":
return `Nevalida valoro en ${issue.origin}`;
default:
return `Nevalida enigo`;
}
};
};
export default function () {
return {
localeError: error(),
};
}

View File

@@ -0,0 +1,197 @@
import { sentryUnpluginFactory, stringToUUID, getDebugIdSnippet, createComponentNameAnnotateHooks } from '@sentry/bundler-plugin-core';
import { createRequire } from 'node:module';
import * as path from 'path';
import { v4 } from 'uuid';
function ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
enumerableOnly && (symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
})), keys.push.apply(keys, symbols);
}
return keys;
}
function _objectSpread2(target) {
for (var i = 1; i < arguments.length; i++) {
var source = null != arguments[i] ? arguments[i] : {};
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
_defineProperty(target, key, source[key]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
}
return target;
}
function _defineProperty(obj, key, value) {
key = _toPropertyKey(key);
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
function _toPrimitive(input, hint) {
if (typeof input !== "object" || input === null) return input;
var prim = input[Symbol.toPrimitive];
if (prim !== undefined) {
var res = prim.call(input, hint || "default");
if (typeof res !== "object") return res;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return (hint === "string" ? String : Number)(input);
}
function _toPropertyKey(arg) {
var key = _toPrimitive(arg, "string");
return typeof key === "symbol" ? key : String(key);
}
// since webpack 5.1 compiler contains webpack module so plugins always use correct webpack version
// https://github.com/webpack/webpack/commit/65eca2e529ce1d79b79200d4bdb1ce1b81141459
function webpackInjectionPlugin(UnsafeBannerPlugin) {
return function (injectionCode, debugIds) {
return {
name: "sentry-webpack-injection-plugin",
webpack: function webpack(compiler) {
var _compiler$webpack;
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore webpack version compatibility shenanigans
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
var BannerPlugin =
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore webpack version compatibility shenanigans
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
(compiler === null || compiler === void 0 ? void 0 : (_compiler$webpack = compiler.webpack) === null || _compiler$webpack === void 0 ? void 0 : _compiler$webpack.BannerPlugin) || UnsafeBannerPlugin;
compiler.options.plugins = compiler.options.plugins || [];
compiler.options.plugins.push(
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-call
new BannerPlugin({
raw: true,
include: /\.(js|ts|jsx|tsx|mjs|cjs)(\?[^?]*)?(#[^#]*)?$/,
banner: function banner(arg) {
var codeToInject = injectionCode.clone();
if (debugIds) {
var _arg$chunk$contentHas, _arg$chunk, _arg$chunk$contentHas2, _arg$chunk2;
var hash = (_arg$chunk$contentHas = arg === null || arg === void 0 ? void 0 : (_arg$chunk = arg.chunk) === null || _arg$chunk === void 0 ? void 0 : (_arg$chunk$contentHas2 = _arg$chunk.contentHash) === null || _arg$chunk$contentHas2 === void 0 ? void 0 : _arg$chunk$contentHas2.javascript) !== null && _arg$chunk$contentHas !== void 0 ? _arg$chunk$contentHas : arg === null || arg === void 0 ? void 0 : (_arg$chunk2 = arg.chunk) === null || _arg$chunk2 === void 0 ? void 0 : _arg$chunk2.hash;
var debugId = hash ? stringToUUID(hash) : v4();
codeToInject.append(getDebugIdSnippet(debugId));
}
return codeToInject.code();
}
}));
}
};
};
}
function webpackComponentNameAnnotatePlugin() {
return function (ignoredComponents, injectIntoHtml) {
return {
name: "sentry-webpack-component-name-annotate-plugin",
enforce: "pre",
// Webpack needs this hook for loader logic, so the plugin is not run on unsupported file types
transformInclude: function transformInclude(id) {
return id.endsWith(".tsx") || id.endsWith(".jsx");
},
transform: createComponentNameAnnotateHooks(ignoredComponents, injectIntoHtml).transform
};
};
}
function webpackBundleSizeOptimizationsPlugin(UnsafeDefinePlugin) {
return function (replacementValues) {
return {
name: "sentry-webpack-bundle-size-optimizations-plugin",
webpack: function webpack(compiler) {
var _compiler$webpack2;
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore webpack version compatibility shenanigans
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
var DefinePlugin =
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore webpack version compatibility shenanigans
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
(compiler === null || compiler === void 0 ? void 0 : (_compiler$webpack2 = compiler.webpack) === null || _compiler$webpack2 === void 0 ? void 0 : _compiler$webpack2.DefinePlugin) || UnsafeDefinePlugin;
compiler.options.plugins = compiler.options.plugins || [];
compiler.options.plugins.push(
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-call
new DefinePlugin(_objectSpread2({}, replacementValues)));
}
};
};
}
function webpackDebugIdUploadPlugin(upload, logger, createDependencyOnBuildArtifacts, forceExitOnBuildCompletion) {
var pluginName = "sentry-webpack-debug-id-upload-plugin";
return {
name: pluginName,
webpack: function webpack(compiler) {
var freeGlobalDependencyOnDebugIdSourcemapArtifacts = createDependencyOnBuildArtifacts();
compiler.hooks.afterEmit.tapAsync(pluginName, function (compilation, callback) {
var _ref;
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
var outputPath = (_ref = compilation.outputOptions.path) !== null && _ref !== void 0 ? _ref : path.resolve();
var buildArtifacts = Object.keys(compilation.assets).map(function (asset) {
return path.join(outputPath, asset);
});
void upload(buildArtifacts).then(function () {
callback();
})["finally"](function () {
freeGlobalDependencyOnDebugIdSourcemapArtifacts();
});
});
if (forceExitOnBuildCompletion && compiler.options.mode === "production") {
compiler.hooks.done.tap(pluginName, function () {
setTimeout(function () {
logger.debug("Exiting process after debug file upload");
process.exit(0);
});
});
}
}
};
}
// Detect webpack major version for telemetry (helps differentiate webpack 4 vs 5 usage)
function getWebpackMajorVersion() {
try {
var _webpack$version, _webpack$default;
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore - Rollup already transpiles this for us
var req = createRequire(import.meta.url);
var webpack = req("webpack");
var version = (_webpack$version = webpack === null || webpack === void 0 ? void 0 : webpack.version) !== null && _webpack$version !== void 0 ? _webpack$version : webpack === null || webpack === void 0 ? void 0 : (_webpack$default = webpack["default"]) === null || _webpack$default === void 0 ? void 0 : _webpack$default.version;
var webpackMajorVersion = version === null || version === void 0 ? void 0 : version.split(".")[0]; // "4" or "5"
return webpackMajorVersion;
} catch (error) {
return undefined;
}
}
/**
* The factory function accepts BannerPlugin and DefinePlugin classes in
* order to avoid direct dependencies on webpack.
*
* This allow us to export version of the plugin for webpack 5.1+ and compatible environments.
*
* Since webpack 5.1 compiler contains webpack module so plugins always use correct webpack version.
*/
function sentryWebpackUnpluginFactory() {
var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
BannerPlugin = _ref2.BannerPlugin,
DefinePlugin = _ref2.DefinePlugin;
return sentryUnpluginFactory({
injectionPlugin: webpackInjectionPlugin(BannerPlugin),
componentNameAnnotatePlugin: webpackComponentNameAnnotatePlugin(),
debugIdUploadPlugin: webpackDebugIdUploadPlugin,
bundleSizeOptimizationsPlugin: webpackBundleSizeOptimizationsPlugin(DefinePlugin),
getBundlerMajorVersion: getWebpackMajorVersion
});
}
export { sentryWebpackUnpluginFactory as s };
//# sourceMappingURL=webpack4and5.mjs.map

View File

@@ -0,0 +1,48 @@
import type {
ContextOptions,
DateArg,
LocalizedOptions,
WeekOptions,
} from "./types.js";
/**
* The {@link setDay} function options.
*/
export interface SetDayOptions<DateType extends Date = Date>
extends LocalizedOptions<"options">,
WeekOptions,
ContextOptions<DateType> {}
/**
* @name setDay
* @category Weekday Helpers
* @summary Set the day of the week to the given date.
*
* @description
* Set the day of the week to the given date.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The date to be changed
* @param day - The day of the week of the new date
* @param options - An object with options.
*
* @returns The new date with the day of the week set
*
* @example
* // Set week day to Sunday, with the default weekStartsOn of Sunday:
* const result = setDay(new Date(2014, 8, 1), 0)
* //=> Sun Aug 31 2014 00:00:00
*
* @example
* // Set week day to Sunday, with a weekStartsOn of Monday:
* const result = setDay(new Date(2014, 8, 1), 0, { weekStartsOn: 1 })
* //=> Sun Sep 07 2014 00:00:00
*/
export declare function setDay<
DateType extends Date,
ResultDate extends Date = DateType,
>(
date: DateArg<DateType>,
day: number,
options?: SetDayOptions<ResultDate>,
): ResultDate;

View File

@@ -0,0 +1,194 @@
import { createStackParser, UNKNOWN_FUNCTION } from '@sentry/core';
const OPERA10_PRIORITY = 10;
const OPERA11_PRIORITY = 20;
const CHROME_PRIORITY = 30;
const WINJS_PRIORITY = 40;
const GECKO_PRIORITY = 50;
function createFrame(filename, func, lineno, colno) {
const frame = {
filename,
function: func === '<anonymous>' ? UNKNOWN_FUNCTION : func,
in_app: true, // All browser frames are considered in_app
};
if (lineno !== undefined) {
frame.lineno = lineno;
}
if (colno !== undefined) {
frame.colno = colno;
}
return frame;
}
// This regex matches frames that have no function name (ie. are at the top level of a module).
// For example "at http://localhost:5000//script.js:1:126"
// Frames _with_ function names usually look as follows: "at commitLayoutEffects (react-dom.development.js:23426:1)"
const chromeRegexNoFnName = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i;
// This regex matches all the frames that have a function name.
const chromeRegex =
/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i;
const chromeEvalRegex = /\((\S*)(?::(\d+))(?::(\d+))\)/;
// Matches stack frames with data URIs instead of filename so we can still get the function name
// Example: "at dynamicFn (data:application/javascript,export function dynamicFn() {..."
const chromeDataUriRegex = /at (.+?) ?\(data:(.+?),/;
// Chromium based browsers: Chrome, Brave, new Opera, new Edge
// We cannot call this variable `chrome` because it can conflict with global `chrome` variable in certain environments
// See: https://github.com/getsentry/sentry-javascript/issues/6880
const chromeStackParserFn = line => {
const dataUriMatch = line.match(chromeDataUriRegex);
if (dataUriMatch) {
return {
filename: `<data:${dataUriMatch[2]}>`,
function: dataUriMatch[1],
};
}
// If the stack line has no function name, we need to parse it differently
const noFnParts = chromeRegexNoFnName.exec(line) ;
if (noFnParts) {
const [, filename, line, col] = noFnParts;
return createFrame(filename, UNKNOWN_FUNCTION, +line, +col);
}
const parts = chromeRegex.exec(line) ;
if (parts) {
const isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line
if (isEval) {
const subMatch = chromeEvalRegex.exec(parts[2]) ;
if (subMatch) {
// throw out eval line/column and use top-most line/column number
parts[2] = subMatch[1]; // url
parts[3] = subMatch[2]; // line
parts[4] = subMatch[3]; // column
}
}
// Kamil: One more hack won't hurt us right? Understanding and adding more rules on top of these regexps right now
// would be way too time consuming. (TODO: Rewrite whole RegExp to be more readable)
const [func, filename] = extractSafariExtensionDetails(parts[1] || UNKNOWN_FUNCTION, parts[2]);
return createFrame(filename, func, parts[3] ? +parts[3] : undefined, parts[4] ? +parts[4] : undefined);
}
return;
};
const chromeStackLineParser = [CHROME_PRIORITY, chromeStackParserFn];
// gecko regex: `(?:bundle|\d+\.js)`: `bundle` is for react native, `\d+\.js` also but specifically for ram bundles because it
// generates filenames without a prefix like `file://` the filenames in the stacktrace are just 42.js
// We need this specific case for now because we want no other regex to match.
const geckoREgex =
/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i;
const geckoEvalRegex = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i;
const gecko = line => {
const parts = geckoREgex.exec(line) ;
if (parts) {
const isEval = parts[3] && parts[3].indexOf(' > eval') > -1;
if (isEval) {
const subMatch = geckoEvalRegex.exec(parts[3]) ;
if (subMatch) {
// throw out eval line/column and use top-most line number
parts[1] = parts[1] || 'eval';
parts[3] = subMatch[1];
parts[4] = subMatch[2];
parts[5] = ''; // no column when eval
}
}
let filename = parts[3];
let func = parts[1] || UNKNOWN_FUNCTION;
[func, filename] = extractSafariExtensionDetails(func, filename);
return createFrame(filename, func, parts[4] ? +parts[4] : undefined, parts[5] ? +parts[5] : undefined);
}
return;
};
const geckoStackLineParser = [GECKO_PRIORITY, gecko];
const winjsRegex = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i;
const winjs = line => {
const parts = winjsRegex.exec(line) ;
return parts
? createFrame(parts[2], parts[1] || UNKNOWN_FUNCTION, +parts[3], parts[4] ? +parts[4] : undefined)
: undefined;
};
const winjsStackLineParser = [WINJS_PRIORITY, winjs];
const opera10Regex = / line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i;
const opera10 = line => {
const parts = opera10Regex.exec(line) ;
return parts ? createFrame(parts[2], parts[3] || UNKNOWN_FUNCTION, +parts[1]) : undefined;
};
const opera10StackLineParser = [OPERA10_PRIORITY, opera10];
const opera11Regex =
/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i;
const opera11 = line => {
const parts = opera11Regex.exec(line) ;
return parts ? createFrame(parts[5], parts[3] || parts[4] || UNKNOWN_FUNCTION, +parts[1], +parts[2]) : undefined;
};
const opera11StackLineParser = [OPERA11_PRIORITY, opera11];
const defaultStackLineParsers = [chromeStackLineParser, geckoStackLineParser];
const defaultStackParser = createStackParser(...defaultStackLineParsers);
/**
* Safari web extensions, starting version unknown, can produce "frames-only" stacktraces.
* What it means, is that instead of format like:
*
* Error: wat
* at function@url:row:col
* at function@url:row:col
* at function@url:row:col
*
* it produces something like:
*
* function@url:row:col
* function@url:row:col
* function@url:row:col
*
* Because of that, it won't be captured by `chrome` RegExp and will fall into `Gecko` branch.
* This function is extracted so that we can use it in both places without duplicating the logic.
* Unfortunately "just" changing RegExp is too complicated now and making it pass all tests
* and fix this case seems like an impossible, or at least way too time-consuming task.
*/
const extractSafariExtensionDetails = (func, filename) => {
const isSafariExtension = func.indexOf('safari-extension') !== -1;
const isSafariWebExtension = func.indexOf('safari-web-extension') !== -1;
return isSafariExtension || isSafariWebExtension
? [
func.indexOf('@') !== -1 ? (func.split('@')[0] ) : UNKNOWN_FUNCTION,
isSafariExtension ? `safari-extension:${filename}` : `safari-web-extension:${filename}`,
]
: [func, filename];
};
export { chromeStackLineParser, defaultStackLineParsers, defaultStackParser, geckoStackLineParser, opera10StackLineParser, opera11StackLineParser, winjsStackLineParser };
//# sourceMappingURL=stack-parsers.js.map

View File

@@ -0,0 +1,65 @@
(function (Prism) {
// https://mc-stan.org/docs/2_28/reference-manual/bnf-grammars.html
var higherOrderFunctions = /\b(?:algebra_solver|algebra_solver_newton|integrate_1d|integrate_ode|integrate_ode_bdf|integrate_ode_rk45|map_rect|ode_(?:adams|bdf|ckrk|rk45)(?:_tol)?|ode_adjoint_tol_ctl|reduce_sum|reduce_sum_static)\b/;
Prism.languages.stan = {
'comment': /\/\/.*|\/\*[\s\S]*?\*\/|#(?!include).*/,
'string': {
// String literals can contain spaces and any printable ASCII characters except for " and \
// https://mc-stan.org/docs/2_24/reference-manual/print-statements-section.html#string-literals
pattern: /"[\x20\x21\x23-\x5B\x5D-\x7E]*"/,
greedy: true
},
'directive': {
pattern: /^([ \t]*)#include\b.*/m,
lookbehind: true,
alias: 'property'
},
'function-arg': {
pattern: RegExp(
'(' +
higherOrderFunctions.source +
/\s*\(\s*/.source +
')' +
/[a-zA-Z]\w*/.source
),
lookbehind: true,
alias: 'function'
},
'constraint': {
pattern: /(\b(?:int|matrix|real|row_vector|vector)\s*)<[^<>]*>/,
lookbehind: true,
inside: {
'expression': {
pattern: /(=\s*)\S(?:\S|\s+(?!\s))*?(?=\s*(?:>$|,\s*\w+\s*=))/,
lookbehind: true,
inside: null // see below
},
'property': /\b[a-z]\w*(?=\s*=)/i,
'operator': /=/,
'punctuation': /^<|>$|,/
}
},
'keyword': [
{
pattern: /\bdata(?=\s*\{)|\b(?:functions|generated|model|parameters|quantities|transformed)\b/,
alias: 'program-block'
},
/\b(?:array|break|cholesky_factor_corr|cholesky_factor_cov|complex|continue|corr_matrix|cov_matrix|data|else|for|if|in|increment_log_prob|int|matrix|ordered|positive_ordered|print|real|reject|return|row_vector|simplex|target|unit_vector|vector|void|while)\b/,
// these are functions that are known to take another function as their first argument.
higherOrderFunctions
],
'function': /\b[a-z]\w*(?=\s*\()/i,
'number': /(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:E[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,
'boolean': /\b(?:false|true)\b/,
'operator': /<-|\.[*/]=?|\|\|?|&&|[!=<>+\-*/]=?|['^%~?:]/,
'punctuation': /[()\[\]{},;]/
};
Prism.languages.stan.constraint.inside.expression.inside = Prism.languages.stan;
}(Prism));

View File

@@ -0,0 +1,38 @@
/**
* An exported enum describing the different kinds of tokens that the
* lexer emits.
*/
var TokenKind;
(function (TokenKind) {
TokenKind['SOF'] = '<SOF>';
TokenKind['EOF'] = '<EOF>';
TokenKind['BANG'] = '!';
TokenKind['DOLLAR'] = '$';
TokenKind['AMP'] = '&';
TokenKind['PAREN_L'] = '(';
TokenKind['PAREN_R'] = ')';
TokenKind['DOT'] = '.';
TokenKind['SPREAD'] = '...';
TokenKind['COLON'] = ':';
TokenKind['EQUALS'] = '=';
TokenKind['AT'] = '@';
TokenKind['BRACKET_L'] = '[';
TokenKind['BRACKET_R'] = ']';
TokenKind['BRACE_L'] = '{';
TokenKind['PIPE'] = '|';
TokenKind['BRACE_R'] = '}';
TokenKind['NAME'] = 'Name';
TokenKind['INT'] = 'Int';
TokenKind['FLOAT'] = 'Float';
TokenKind['STRING'] = 'String';
TokenKind['BLOCK_STRING'] = 'BlockString';
TokenKind['COMMENT'] = 'Comment';
})(TokenKind || (TokenKind = {}));
export { TokenKind };
/**
* The enum type representing the token kinds values.
*
* @deprecated Please use `TokenKind`. Will be remove in v17.
*/

View File

@@ -0,0 +1,57 @@
import { getClient, debug } from '@sentry/core';
import { DEBUG_BUILD } from '../debug-build.js';
/**
* Starts the Sentry UI profiler.
* This mode is exclusive with the transaction profiler and will only work if the profilesSampleRate is set to a falsy value.
* In UI profiling mode, the profiler will keep reporting profile chunks to Sentry until it is stopped, which allows for continuous profiling of the application.
*/
function startProfiler() {
const client = getClient();
if (!client) {
DEBUG_BUILD && debug.warn('No Sentry client available, profiling is not started');
return;
}
const integration = client.getIntegrationByName('BrowserProfiling');
if (!integration) {
DEBUG_BUILD && debug.warn('BrowserProfiling integration is not available');
return;
}
client.emit('startUIProfiler');
}
/**
* Stops the Sentry UI profiler.
* Calls to stop will stop the profiler and flush the currently collected profile data to Sentry.
*/
function stopProfiler() {
const client = getClient();
if (!client) {
DEBUG_BUILD && debug.warn('No Sentry client available, profiling is not started');
return;
}
const integration = client.getIntegrationByName('BrowserProfiling');
if (!integration) {
DEBUG_BUILD && debug.warn('ProfilingIntegration is not available');
return;
}
client.emit('stopUIProfiler');
}
/**
* Profiler namespace for controlling the JS profiler in 'manual' mode.
*
* Requires the `browserProfilingIntegration` from the `@sentry/browser` package.
*/
const uiProfiler = {
startProfiler,
stopProfiler,
};
export { uiProfiler };
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,48 @@
import { entityKind, is } from "../entity.js";
import { SQL, sql } from "../sql/sql.js";
import { gelSequenceWithSchema } from "./sequence.js";
import { gelTableWithSchema } from "./table.js";
class GelSchema {
constructor(schemaName) {
this.schemaName = schemaName;
}
static [entityKind] = "GelSchema";
table = (name, columns, extraConfig) => {
return gelTableWithSchema(name, columns, extraConfig, this.schemaName);
};
// view = ((name, columns) => {
// return gelViewWithSchema(name, columns, this.schemaName);
// }) as typeof gelView;
// materializedView = ((name, columns) => {
// return gelMaterializedViewWithSchema(name, columns, this.schemaName);
// }) as typeof gelMaterializedView;
// enum: typeof gelEnum = ((name, values) => {
// return gelEnumWithSchema(name, values, this.schemaName);
// });
sequence = (name, options) => {
return gelSequenceWithSchema(name, options, this.schemaName);
};
getSQL() {
return new SQL([sql.identifier(this.schemaName)]);
}
shouldOmitSQLParens() {
return true;
}
}
function isGelSchema(obj) {
return is(obj, GelSchema);
}
function gelSchema(name) {
if (name === "public") {
throw new Error(
`You can't specify 'public' as schema name. Postgres is using public schema by default. If you want to use 'public' schema, just use GelTable() instead of creating a schema`
);
}
return new GelSchema(name);
}
export {
GelSchema,
gelSchema,
isGelSchema
};
//# sourceMappingURL=schema.js.map

View File

@@ -0,0 +1,226 @@
function declensionGroup(scheme, count) {
if (count === 1 && scheme.one) {
return scheme.one;
}
if (count >= 2 && count <= 4 && scheme.twoFour) {
return scheme.twoFour;
}
// if count === null || count === 0 || count >= 5
return scheme.other;
}
function declension(scheme, count, time) {
const group = declensionGroup(scheme, count);
const finalText = group[time];
return finalText.replace("{{count}}", String(count));
}
function extractPreposition(token) {
const result = ["lessThan", "about", "over", "almost"].filter(
function (preposition) {
return !!token.match(new RegExp("^" + preposition));
},
);
return result[0];
}
function prefixPreposition(preposition) {
let translation = "";
if (preposition === "almost") {
translation = "takmer";
}
if (preposition === "about") {
translation = "približne";
}
return translation.length > 0 ? translation + " " : "";
}
function suffixPreposition(preposition) {
let translation = "";
if (preposition === "lessThan") {
translation = "menej než";
}
if (preposition === "over") {
translation = "viac než";
}
return translation.length > 0 ? translation + " " : "";
}
function lowercaseFirstLetter(string) {
return string.charAt(0).toLowerCase() + string.slice(1);
}
const formatDistanceLocale = {
xSeconds: {
one: {
present: "sekunda",
past: "sekundou",
future: "sekundu",
},
twoFour: {
present: "{{count}} sekundy",
past: "{{count}} sekundami",
future: "{{count}} sekundy",
},
other: {
present: "{{count}} sekúnd",
past: "{{count}} sekundami",
future: "{{count}} sekúnd",
},
},
halfAMinute: {
other: {
present: "pol minúty",
past: "pol minútou",
future: "pol minúty",
},
},
xMinutes: {
one: {
present: "minúta",
past: "minútou",
future: "minútu",
},
twoFour: {
present: "{{count}} minúty",
past: "{{count}} minútami",
future: "{{count}} minúty",
},
other: {
present: "{{count}} minút",
past: "{{count}} minútami",
future: "{{count}} minút",
},
},
xHours: {
one: {
present: "hodina",
past: "hodinou",
future: "hodinu",
},
twoFour: {
present: "{{count}} hodiny",
past: "{{count}} hodinami",
future: "{{count}} hodiny",
},
other: {
present: "{{count}} hodín",
past: "{{count}} hodinami",
future: "{{count}} hodín",
},
},
xDays: {
one: {
present: "deň",
past: "dňom",
future: "deň",
},
twoFour: {
present: "{{count}} dni",
past: "{{count}} dňami",
future: "{{count}} dni",
},
other: {
present: "{{count}} dní",
past: "{{count}} dňami",
future: "{{count}} dní",
},
},
xWeeks: {
one: {
present: "týždeň",
past: "týždňom",
future: "týždeň",
},
twoFour: {
present: "{{count}} týždne",
past: "{{count}} týždňami",
future: "{{count}} týždne",
},
other: {
present: "{{count}} týždňov",
past: "{{count}} týždňami",
future: "{{count}} týždňov",
},
},
xMonths: {
one: {
present: "mesiac",
past: "mesiacom",
future: "mesiac",
},
twoFour: {
present: "{{count}} mesiace",
past: "{{count}} mesiacmi",
future: "{{count}} mesiace",
},
other: {
present: "{{count}} mesiacov",
past: "{{count}} mesiacmi",
future: "{{count}} mesiacov",
},
},
xYears: {
one: {
present: "rok",
past: "rokom",
future: "rok",
},
twoFour: {
present: "{{count}} roky",
past: "{{count}} rokmi",
future: "{{count}} roky",
},
other: {
present: "{{count}} rokov",
past: "{{count}} rokmi",
future: "{{count}} rokov",
},
},
};
export const formatDistance = (token, count, options) => {
const preposition = extractPreposition(token) || "";
const key = lowercaseFirstLetter(token.substring(preposition.length));
const scheme = formatDistanceLocale[key];
if (!options?.addSuffix) {
return (
prefixPreposition(preposition) +
suffixPreposition(preposition) +
declension(scheme, count, "present")
);
}
if (options.comparison && options.comparison > 0) {
return (
prefixPreposition(preposition) +
"o " +
suffixPreposition(preposition) +
declension(scheme, count, "future")
);
} else {
return (
prefixPreposition(preposition) +
"pred " +
suffixPreposition(preposition) +
declension(scheme, count, "past")
);
}
};

View File

@@ -0,0 +1,105 @@
"use strict";
exports.formatDistance = void 0;
const formatDistanceLocale = {
lessThanXSeconds: {
one: "mens duna segonda",
other: "mens de {{count}} segondas",
},
xSeconds: {
one: "1 segonda",
other: "{{count}} segondas",
},
halfAMinute: "30 segondas",
lessThanXMinutes: {
one: "mens duna minuta",
other: "mens de {{count}} minutas",
},
xMinutes: {
one: "1 minuta",
other: "{{count}} minutas",
},
aboutXHours: {
one: "environ 1 ora",
other: "environ {{count}} oras",
},
xHours: {
one: "1 ora",
other: "{{count}} oras",
},
xDays: {
one: "1 jorn",
other: "{{count}} jorns",
},
aboutXWeeks: {
one: "environ 1 setmana",
other: "environ {{count}} setmanas",
},
xWeeks: {
one: "1 setmana",
other: "{{count}} setmanas",
},
aboutXMonths: {
one: "environ 1 mes",
other: "environ {{count}} meses",
},
xMonths: {
one: "1 mes",
other: "{{count}} meses",
},
aboutXYears: {
one: "environ 1 an",
other: "environ {{count}} ans",
},
xYears: {
one: "1 an",
other: "{{count}} ans",
},
overXYears: {
one: "mai dun an",
other: "mai de {{count}} ans",
},
almostXYears: {
one: "gaireben un an",
other: "gaireben {{count}} ans",
},
};
const formatDistance = (token, count, options) => {
let result;
const tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
result = tokenValue.one;
} else {
result = tokenValue.other.replace("{{count}}", String(count));
}
if (options?.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "daquí " + result;
} else {
return "fa " + result;
}
}
return result;
};
exports.formatDistance = formatDistance;

View File

@@ -0,0 +1,56 @@
@import '../../../scss/styles.scss';
@layer payload-default {
.localizer-button {
display: flex;
align-items: center;
white-space: nowrap;
display: flex;
padding-inline-start: base(0.4);
padding-inline-end: base(0.2);
background-color: var(--theme-elevation-100);
border-radius: var(--style-radius-s);
&__label {
color: var(--theme-elevation-500);
}
&__chevron {
.stroke {
stroke: currentColor;
}
}
&__current {
display: flex;
align-items: center;
}
button {
color: currentColor;
padding: 0;
font-size: 1rem;
line-height: base(1);
background: transparent;
border: 0;
font-weight: 600;
cursor: pointer;
&:hover,
&:focus-visible {
text-decoration: underline;
}
&:active,
&:focus {
outline: none;
}
}
@include small-break {
&__label {
display: none;
}
}
}
}

View File

@@ -0,0 +1,29 @@
import { entityKind } from "../../entity.cjs";
import type { SingleStoreDialectConfig } from "../dialect.cjs";
import { SingleStoreDialect } from "../dialect.cjs";
import type { WithBuilder } from "../subquery.cjs";
import { WithSubquery } from "../../subquery.cjs";
import { SingleStoreSelectBuilder } from "./select.cjs";
import type { SelectedFields } from "./select.types.cjs";
export declare class QueryBuilder {
static readonly [entityKind]: string;
private dialect;
private dialectConfig;
constructor(dialect?: SingleStoreDialect | SingleStoreDialectConfig);
$with: WithBuilder;
with(...queries: WithSubquery[]): {
select: {
(): SingleStoreSelectBuilder<undefined, never, "qb">;
<TSelection extends SelectedFields>(fields: TSelection): SingleStoreSelectBuilder<TSelection, never, "qb">;
};
selectDistinct: {
(): SingleStoreSelectBuilder<undefined, never, "qb">;
<TSelection extends SelectedFields>(fields: TSelection): SingleStoreSelectBuilder<TSelection, never, "qb">;
};
};
select(): SingleStoreSelectBuilder<undefined, never, 'qb'>;
select<TSelection extends SelectedFields>(fields: TSelection): SingleStoreSelectBuilder<TSelection, never, 'qb'>;
selectDistinct(): SingleStoreSelectBuilder<undefined, never, 'qb'>;
selectDistinct<TSelection extends SelectedFields>(fields: TSelection): SingleStoreSelectBuilder<TSelection, never, 'qb'>;
private getDialect;
}

View File

@@ -0,0 +1,38 @@
/**
* The utility consumer functions provide common options for consuming
* streams.
* @since v16.7.0
*/
declare module "stream/consumers" {
import { Blob as NodeBlob, NonSharedBuffer } from "node:buffer";
import { ReadableStream as WebReadableStream } from "node:stream/web";
/**
* @since v16.7.0
* @returns Fulfills with an `ArrayBuffer` containing the full contents of the stream.
*/
function arrayBuffer(stream: WebReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<ArrayBuffer>;
/**
* @since v16.7.0
* @returns Fulfills with a `Blob` containing the full contents of the stream.
*/
function blob(stream: WebReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<NodeBlob>;
/**
* @since v16.7.0
* @returns Fulfills with a `Buffer` containing the full contents of the stream.
*/
function buffer(stream: WebReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<NonSharedBuffer>;
/**
* @since v16.7.0
* @returns Fulfills with the contents of the stream parsed as a
* UTF-8 encoded string that is then passed through `JSON.parse()`.
*/
function json(stream: WebReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<unknown>;
/**
* @since v16.7.0
* @returns Fulfills with the contents of the stream parsed as a UTF-8 encoded string.
*/
function text(stream: WebReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<string>;
}
declare module "node:stream/consumers" {
export * from "stream/consumers";
}

View File

@@ -0,0 +1,61 @@
Prism.languages.concurnas = {
'comment': {
pattern: /(^|[^\\])(?:\/\*[\s\S]*?(?:\*\/|$)|\/\/.*)/,
lookbehind: true,
greedy: true
},
'langext': {
pattern: /\b\w+\s*\|\|[\s\S]+?\|\|/,
greedy: true,
inside: {
'class-name': /^\w+/,
'string': {
pattern: /(^\s*\|\|)[\s\S]+(?=\|\|$)/,
lookbehind: true
},
'punctuation': /\|\|/
}
},
'function': {
pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/,
lookbehind: true
},
'keyword': /\b(?:abstract|actor|also|annotation|assert|async|await|bool|boolean|break|byte|case|catch|changed|char|class|closed|constant|continue|def|default|del|double|elif|else|enum|every|extends|false|finally|float|for|from|global|gpudef|gpukernel|if|import|in|init|inject|int|lambda|local|long|loop|match|new|nodefault|null|of|onchange|open|out|override|package|parfor|parforsync|post|pre|private|protected|provide|provider|public|return|shared|short|single|size_t|sizeof|super|sync|this|throw|trait|trans|transient|true|try|typedef|unchecked|using|val|var|void|while|with)\b/,
'boolean': /\b(?:false|true)\b/,
'number': /\b0b[01][01_]*L?\b|\b0x(?:[\da-f_]*\.)?[\da-f_p+-]+\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfls]?/i,
'punctuation': /[{}[\];(),.:]/,
'operator': /<==|>==|=>|->|<-|<>|&==|&<>|\?:?|\.\?|\+\+|--|[-+*/=<>]=?|[!^~]|\b(?:and|as|band|bor|bxor|comp|is|isnot|mod|or)\b=?/,
'annotation': {
pattern: /@(?:\w+:)?(?:\w+|\[[^\]]+\])?/,
alias: 'builtin'
}
};
Prism.languages.insertBefore('concurnas', 'langext', {
'regex-literal': {
pattern: /\br("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
greedy: true,
inside: {
'interpolation': {
pattern: /((?:^|[^\\])(?:\\{2})*)\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
lookbehind: true,
inside: Prism.languages.concurnas
},
'regex': /[\s\S]+/
}
},
'string-literal': {
pattern: /(?:\B|\bs)("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
greedy: true,
inside: {
'interpolation': {
pattern: /((?:^|[^\\])(?:\\{2})*)\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
lookbehind: true,
inside: Prism.languages.concurnas
},
'string': /[\s\S]+/
}
}
});
Prism.languages.conc = Prism.languages.concurnas;

View File

@@ -0,0 +1,24 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.logger = exports.Logger = void 0;
var Logger = /** @class */ (function () {
function Logger() {
}
// eslint-disable-next-line @typescript-eslint/no-empty-function
Logger.prototype.debug = function () { };
// eslint-disable-next-line @typescript-eslint/no-empty-function
Logger.create = function () { };
// eslint-disable-next-line @typescript-eslint/no-empty-function
Logger.destroy = function () { };
Logger.getInstance = function () {
return exports.logger;
};
// eslint-disable-next-line @typescript-eslint/no-empty-function
Logger.prototype.info = function () { };
// eslint-disable-next-line @typescript-eslint/no-empty-function
Logger.prototype.error = function () { };
return Logger;
}());
exports.Logger = Logger;
exports.logger = new Logger();
//# sourceMappingURL=logger.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"recursiveRef.js","sourceRoot":"","sources":["../../../lib/vocabularies/dynamic/recursiveRef.ts"],"names":[],"mappings":";;AACA,6CAAuC;AAEvC,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,eAAe;IACxB,UAAU,EAAE,QAAQ;IACpB,IAAI,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,IAAA,uBAAU,EAAC,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC;CAC3C,CAAA;AAED,kBAAe,GAAG,CAAA"}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/postgres/deleteWhere.ts"],"sourcesContent":["import type { TransactionPg } from '../types.js'\nimport type { DeleteWhere } from './types.js'\n\nexport const deleteWhere: DeleteWhere = async function deleteWhere({ db, tableName, where }) {\n const table = this.tables[tableName]\n await (db as TransactionPg).delete(table).where(where)\n}\n"],"names":["deleteWhere","db","tableName","where","table","tables","delete"],"mappings":"AAGA,OAAO,MAAMA,cAA2B,eAAeA,YAAY,EAAEC,EAAE,EAAEC,SAAS,EAAEC,KAAK,EAAE;IACzF,MAAMC,QAAQ,IAAI,CAACC,MAAM,CAACH,UAAU;IACpC,MAAM,AAACD,GAAqBK,MAAM,CAACF,OAAOD,KAAK,CAACA;AAClD,EAAC"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/elements/LeaveWithoutSaving/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAsB,MAAM,OAAO,CAAA;AAE1C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAA;AAS7D,KAAK,uBAAuB,GAAG;IAC7B,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;IACtC,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,IAAI,GAAG,MAAM,KAAK,IAAI,CAAA;CAC9C,CAAA;AAID,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA+ChE,CAAA;AAED,eAAO,MAAM,uBAAuB,wCAIjC;IACD,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,SAAS,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;CACtC,sBAcA,CAAA"}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/uploads/isImage.ts"],"sourcesContent":["export function isImage(mimeType: string): boolean {\n return (\n [\n 'image/jpeg',\n 'image/png',\n 'image/gif',\n 'image/svg+xml',\n 'image/webp',\n 'image/avif',\n 'image/jxl',\n ].indexOf(mimeType) > -1\n )\n}\n"],"names":["isImage","mimeType","indexOf"],"mappings":"AAAA,OAAO,SAASA,QAAQC,QAAgB;IACtC,OACE;QACE;QACA;QACA;QACA;QACA;QACA;QACA;KACD,CAACC,OAAO,CAACD,YAAY,CAAC;AAE3B"}

View File

@@ -0,0 +1,31 @@
import { GraphQLObjectType } from 'graphql';
import { fieldToSchemaMap } from './fieldToSchemaMap.js';
export function buildObjectType({ name, baseFields = {}, collectionSlug, config, fields, forceNullable, graphqlResult, parentIsLocalized, parentName }) {
const objectSchema = {
name,
fields: ()=>fields.reduce((objectTypeConfig, field)=>{
const fieldSchema = fieldToSchemaMap[field.type];
if (typeof fieldSchema !== 'function') {
return objectTypeConfig;
}
return {
...objectTypeConfig,
...fieldSchema({
collectionSlug,
config,
field,
forceNullable,
graphqlResult,
newlyCreatedBlockType,
objectTypeConfig,
parentIsLocalized,
parentName
})
};
}, baseFields)
};
const newlyCreatedBlockType = new GraphQLObjectType(objectSchema);
return newlyCreatedBlockType;
}
//# sourceMappingURL=buildObjectType.js.map

View File

@@ -0,0 +1,19 @@
/**
* @license lucide-react v0.441.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 SquareParkingOff = createLucideIcon("SquareParkingOff", [
["path", { d: "M3.6 3.6A2 2 0 0 1 5 3h14a2 2 0 0 1 2 2v14a2 2 0 0 1-.59 1.41", key: "9l1ft6" }],
["path", { d: "M3 8.7V19a2 2 0 0 0 2 2h10.3", key: "17knke" }],
["path", { d: "m2 2 20 20", key: "1ooewy" }],
["path", { d: "M13 13a3 3 0 1 0 0-6H9v2", key: "uoagbd" }],
["path", { d: "M9 17v-2.3", key: "1jxgo2" }]
]);
export { SquareParkingOff as default };
//# sourceMappingURL=square-parking-off.js.map

View File

@@ -0,0 +1,18 @@
import type {MacroKeywordDefinition} from "ajv"
export default function getDef(): MacroKeywordDefinition {
return {
keyword: "allRequired",
type: "object",
schemaType: "boolean",
macro(schema: boolean, parentSchema) {
if (!schema) return true
const required = Object.keys(parentSchema.properties)
if (required.length === 0) return true
return {required}
},
dependencies: ["properties"],
}
}
module.exports = getDef

View File

@@ -0,0 +1,2 @@
export * from 'drizzle-orm/relations';
//# sourceMappingURL=relations.d.ts.map

View File

@@ -0,0 +1,148 @@
import Container from './container.js'
import Node from './node.js'
declare namespace Declaration {
export interface DeclarationRaws extends Record<string, unknown> {
/**
* The space symbols before the node. It also stores `*`
* and `_` symbols before the declaration (IE hack).
*/
before?: string
/**
* The symbols between the property and value for declarations.
*/
between?: string
/**
* The content of the important statement, if it is not just `!important`.
*/
important?: string
/**
* Declaration value with comments.
*/
value?: {
raw: string
value: string
}
}
export interface DeclarationProps {
/** Whether the declaration has an `!important` annotation. */
important?: boolean
/** Name of the declaration. */
prop: string
/** Information used to generate byte-to-byte equal node string as it was in the origin input. */
raws?: DeclarationRaws
/** Value of the declaration. */
value: string
}
// eslint-disable-next-line @typescript-eslint/no-use-before-define
export { Declaration_ as default }
}
/**
* It represents a class that handles
* [CSS declarations](https://developer.mozilla.org/en-US/docs/Web/CSS/Syntax#css_declarations)
*
* ```js
* Once (root, { Declaration }) {
* const color = new Declaration({ prop: 'color', value: 'black' })
* root.append(color)
* }
* ```
*
* ```js
* const root = postcss.parse('a { color: black }')
* const decl = root.first?.first
*
* decl.type //=> 'decl'
* decl.toString() //=> ' color: black'
* ```
*/
declare class Declaration_ extends Node {
/**
* It represents a specificity of the declaration.
*
* If true, the CSS declaration will have an
* [important](https://developer.mozilla.org/en-US/docs/Web/CSS/important)
* specifier.
*
* ```js
* const root = postcss.parse('a { color: black !important; color: red }')
*
* root.first.first.important //=> true
* root.first.last.important //=> undefined
* ```
*/
important: boolean
parent: Container | undefined
/**
* The property name for a CSS declaration.
*
* ```js
* const root = postcss.parse('a { color: black }')
* const decl = root.first.first
*
* decl.prop //=> 'color'
* ```
*/
prop: string
raws: Declaration.DeclarationRaws
type: 'decl'
/**
* The property value for a CSS declaration.
*
* Any CSS comments inside the value string will be filtered out.
* CSS comments present in the source value will be available in
* the `raws` property.
*
* Assigning new `value` would ignore the comments in `raws`
* property while compiling node to string.
*
* ```js
* const root = postcss.parse('a { color: black }')
* const decl = root.first.first
*
* decl.value //=> 'black'
* ```
*/
value: string
/**
* It represents a getter that returns `true` if a declaration starts with
* `--` or `$`, which are used to declare variables in CSS and SASS/SCSS.
*
* ```js
* const root = postcss.parse(':root { --one: 1 }')
* const one = root.first.first
*
* one.variable //=> true
* ```
*
* ```js
* const root = postcss.parse('$one: 1')
* const one = root.first
*
* one.variable //=> true
* ```
*/
variable: boolean
constructor(defaults?: Declaration.DeclarationProps)
assign(overrides: Declaration.DeclarationProps | object): this
clone(overrides?: Partial<Declaration.DeclarationProps>): Declaration
cloneAfter(overrides?: Partial<Declaration.DeclarationProps>): Declaration
cloneBefore(overrides?: Partial<Declaration.DeclarationProps>): Declaration
}
declare class Declaration extends Declaration_ {}
export = Declaration

View File

@@ -0,0 +1 @@
{"version":3,"file":"calculator.js","sources":["../../../src/icons/calculator.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Calculator\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTYiIGhlaWdodD0iMjAiIHg9IjQiIHk9IjIiIHJ4PSIyIiAvPgogIDxsaW5lIHgxPSI4IiB4Mj0iMTYiIHkxPSI2IiB5Mj0iNiIgLz4KICA8bGluZSB4MT0iMTYiIHgyPSIxNiIgeTE9IjE0IiB5Mj0iMTgiIC8+CiAgPHBhdGggZD0iTTE2IDEwaC4wMSIgLz4KICA8cGF0aCBkPSJNMTIgMTBoLjAxIiAvPgogIDxwYXRoIGQ9Ik04IDEwaC4wMSIgLz4KICA8cGF0aCBkPSJNMTIgMTRoLjAxIiAvPgogIDxwYXRoIGQ9Ik04IDE0aC4wMSIgLz4KICA8cGF0aCBkPSJNMTIgMThoLjAxIiAvPgogIDxwYXRoIGQ9Ik04IDE4aC4wMSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/calculator\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 Calculator = createLucideIcon('Calculator', [\n ['rect', { width: '16', height: '20', x: '4', y: '2', rx: '2', key: '1nb95v' }],\n ['line', { x1: '8', x2: '16', y1: '6', y2: '6', key: 'x4nwl0' }],\n ['line', { x1: '16', x2: '16', y1: '14', y2: '18', key: 'wjye3r' }],\n ['path', { d: 'M16 10h.01', key: '1m94wz' }],\n ['path', { d: 'M12 10h.01', key: '1nrarc' }],\n ['path', { d: 'M8 10h.01', key: '19clt8' }],\n ['path', { d: 'M12 14h.01', key: '1etili' }],\n ['path', { d: 'M8 14h.01', key: '6423bh' }],\n ['path', { d: 'M12 18h.01', key: 'mhygvu' }],\n ['path', { d: 'M8 18h.01', key: 'lrp35t' }],\n]);\n\nexport default Calculator;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,iBAAiB,YAAc,CAAA,CAAA,CAAA;AAAA,CAAA,CAChD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAC9E,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAC/D,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAClE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC3C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC3C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,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,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC3C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,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,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC3C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC5C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,203 @@
import { buildLocalizeFn } from "../../_lib/buildLocalizeFn.js";
const eraValues = {
narrow: ["ab. J.C.", "apr. J.C."],
abbreviated: ["ab. J.C.", "apr. J.C."],
wide: ["abans Jèsus-Crist", "après Jèsus-Crist"],
};
const quarterValues = {
narrow: ["T1", "T2", "T3", "T4"],
abbreviated: ["1èr trim.", "2nd trim.", "3en trim.", "4en trim."],
wide: ["1èr trimèstre", "2nd trimèstre", "3en trimèstre", "4en trimèstre"],
};
const monthValues = {
narrow: [
"GN",
"FB",
"MÇ",
"AB",
"MA",
"JN",
"JL",
"AG",
"ST",
"OC",
"NV",
"DC",
],
abbreviated: [
"gen.",
"febr.",
"març",
"abr.",
"mai",
"junh",
"jul.",
"ag.",
"set.",
"oct.",
"nov.",
"dec.",
],
wide: [
"genièr",
"febrièr",
"març",
"abril",
"mai",
"junh",
"julhet",
"agost",
"setembre",
"octòbre",
"novembre",
"decembre",
],
};
const dayValues = {
narrow: ["dg.", "dl.", "dm.", "dc.", "dj.", "dv.", "ds."],
short: ["dg.", "dl.", "dm.", "dc.", "dj.", "dv.", "ds."],
abbreviated: ["dg.", "dl.", "dm.", "dc.", "dj.", "dv.", "ds."],
wide: [
"dimenge",
"diluns",
"dimars",
"dimècres",
"dijòus",
"divendres",
"dissabte",
],
};
const dayPeriodValues = {
narrow: {
am: "am",
pm: "pm",
midnight: "mièjanuèch",
noon: "miègjorn",
morning: "matin",
afternoon: "aprèp-miègjorn",
evening: "vèspre",
night: "nuèch",
},
abbreviated: {
am: "a.m.",
pm: "p.m.",
midnight: "mièjanuèch",
noon: "miègjorn",
morning: "matin",
afternoon: "aprèp-miègjorn",
evening: "vèspre",
night: "nuèch",
},
wide: {
am: "a.m.",
pm: "p.m.",
midnight: "mièjanuèch",
noon: "miègjorn",
morning: "matin",
afternoon: "aprèp-miègjorn",
evening: "vèspre",
night: "nuèch",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "am",
pm: "pm",
midnight: "mièjanuèch",
noon: "miègjorn",
morning: "del matin",
afternoon: "de laprèp-miègjorn",
evening: "del ser",
night: "de la nuèch",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "mièjanuèch",
noon: "miègjorn",
morning: "del matin",
afternoon: "de laprèp-miègjorn",
evening: "del ser",
night: "de la nuèch",
},
wide: {
am: "ante meridiem",
pm: "post meridiem",
midnight: "mièjanuèch",
noon: "miègjorn",
morning: "del matin",
afternoon: "de laprèp-miègjorn",
evening: "del ser",
night: "de la nuèch",
},
};
const ordinalNumber = (dirtyNumber, options) => {
const number = Number(dirtyNumber);
const unit = options?.unit;
let ordinal;
switch (number) {
case 1:
ordinal = "èr";
break;
case 2:
ordinal = "nd";
break;
default:
ordinal = "en";
}
// feminine for year, week, hour, minute, second
if (
unit === "year" ||
unit === "week" ||
unit === "hour" ||
unit === "minute" ||
unit === "second"
) {
ordinal += "a";
}
return number + ordinal;
};
export const localize = {
ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide",
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide",
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
};

View File

@@ -0,0 +1,14 @@
/* eslint-disable no-new-func, camelcase */
/* globals __non_webpack__require__ */
const realImport = new Function('modulePath', 'return import(modulePath)')
function realRequire(modulePath) {
if (typeof __non_webpack__require__ === 'function') {
return __non_webpack__require__(modulePath)
}
return require(modulePath)
}
module.exports = { realImport, realRequire }

View File

@@ -0,0 +1 @@
{"version":3,"file":"fields.js","names":[],"sources":["../../../../src/rest/commands/create/fields.ts"],"sourcesContent":["import type { DirectusField } from '../../../schema/field.js';\nimport type { ApplyQueryFields, FieldQuery, NestedPartial, Query } from '../../../types/index.js';\nimport type { RestCommand } from '../../types.js';\n\nexport type CreateFieldOutput<\n\tSchema,\n\tTQuery extends Query<Schema, Item>,\n\tItem extends object = DirectusField<Schema>,\n> = ApplyQueryFields<Schema, Item, TQuery['fields']>;\n\n/**\n * Create a new field in the given collection.\n *\n * @param collection The collection to create a field for\n * @param item The field to create\n * @param query Optional return data query\n *\n * @returns The field object for the created field.\n */\nexport const createField =\n\t<Schema, const TQuery extends FieldQuery<Schema, DirectusField<Schema>>>(\n\t\tcollection: keyof Schema,\n\t\titem: NestedPartial<DirectusField<Schema>>,\n\t\tquery?: TQuery,\n\t): RestCommand<CreateFieldOutput<Schema, TQuery>, Schema> =>\n\t() => ({\n\t\tpath: `/fields/${collection as string}`,\n\t\tparams: query ?? {},\n\t\tbody: JSON.stringify(item),\n\t\tmethod: 'POST',\n\t});\n"],"mappings":"AAmBA,MAAa,GAEX,EACA,EACA,SAEM,CACN,KAAM,WAAW,IACjB,OAAQ,GAAS,EAAE,CACnB,KAAM,KAAK,UAAU,EAAK,CAC1B,OAAQ,OACR"}

View File

@@ -0,0 +1,653 @@
'use strict';
const { Readable, Writable } = require('stream');
const StreamSearch = require('streamsearch');
const {
basename,
convertToUTF8,
getDecoder,
parseContentType,
parseDisposition,
} = require('../utils.js');
const BUF_CRLF = Buffer.from('\r\n');
const BUF_CR = Buffer.from('\r');
const BUF_DASH = Buffer.from('-');
function noop() {}
const MAX_HEADER_PAIRS = 2000; // From node
const MAX_HEADER_SIZE = 16 * 1024; // From node (its default value)
const HPARSER_NAME = 0;
const HPARSER_PRE_OWS = 1;
const HPARSER_VALUE = 2;
class HeaderParser {
constructor(cb) {
this.header = Object.create(null);
this.pairCount = 0;
this.byteCount = 0;
this.state = HPARSER_NAME;
this.name = '';
this.value = '';
this.crlf = 0;
this.cb = cb;
}
reset() {
this.header = Object.create(null);
this.pairCount = 0;
this.byteCount = 0;
this.state = HPARSER_NAME;
this.name = '';
this.value = '';
this.crlf = 0;
}
push(chunk, pos, end) {
let start = pos;
while (pos < end) {
switch (this.state) {
case HPARSER_NAME: {
let done = false;
for (; pos < end; ++pos) {
if (this.byteCount === MAX_HEADER_SIZE)
return -1;
++this.byteCount;
const code = chunk[pos];
if (TOKEN[code] !== 1) {
if (code !== 58/* ':' */)
return -1;
this.name += chunk.latin1Slice(start, pos);
if (this.name.length === 0)
return -1;
++pos;
done = true;
this.state = HPARSER_PRE_OWS;
break;
}
}
if (!done) {
this.name += chunk.latin1Slice(start, pos);
break;
}
// FALLTHROUGH
}
case HPARSER_PRE_OWS: {
// Skip optional whitespace
let done = false;
for (; pos < end; ++pos) {
if (this.byteCount === MAX_HEADER_SIZE)
return -1;
++this.byteCount;
const code = chunk[pos];
if (code !== 32/* ' ' */ && code !== 9/* '\t' */) {
start = pos;
done = true;
this.state = HPARSER_VALUE;
break;
}
}
if (!done)
break;
// FALLTHROUGH
}
case HPARSER_VALUE:
switch (this.crlf) {
case 0: // Nothing yet
for (; pos < end; ++pos) {
if (this.byteCount === MAX_HEADER_SIZE)
return -1;
++this.byteCount;
const code = chunk[pos];
if (FIELD_VCHAR[code] !== 1) {
if (code !== 13/* '\r' */)
return -1;
++this.crlf;
break;
}
}
this.value += chunk.latin1Slice(start, pos++);
break;
case 1: // Received CR
if (this.byteCount === MAX_HEADER_SIZE)
return -1;
++this.byteCount;
if (chunk[pos++] !== 10/* '\n' */)
return -1;
++this.crlf;
break;
case 2: { // Received CR LF
if (this.byteCount === MAX_HEADER_SIZE)
return -1;
++this.byteCount;
const code = chunk[pos];
if (code === 32/* ' ' */ || code === 9/* '\t' */) {
// Folded value
start = pos;
this.crlf = 0;
} else {
if (++this.pairCount < MAX_HEADER_PAIRS) {
this.name = this.name.toLowerCase();
if (this.header[this.name] === undefined)
this.header[this.name] = [this.value];
else
this.header[this.name].push(this.value);
}
if (code === 13/* '\r' */) {
++this.crlf;
++pos;
} else {
// Assume start of next header field name
start = pos;
this.crlf = 0;
this.state = HPARSER_NAME;
this.name = '';
this.value = '';
}
}
break;
}
case 3: { // Received CR LF CR
if (this.byteCount === MAX_HEADER_SIZE)
return -1;
++this.byteCount;
if (chunk[pos++] !== 10/* '\n' */)
return -1;
// End of header
const header = this.header;
this.reset();
this.cb(header);
return pos;
}
}
break;
}
}
return pos;
}
}
class FileStream extends Readable {
constructor(opts, owner) {
super(opts);
this.truncated = false;
this._readcb = null;
this.once('end', () => {
// We need to make sure that we call any outstanding _writecb() that is
// associated with this file so that processing of the rest of the form
// can continue. This may not happen if the file stream ends right after
// backpressure kicks in, so we force it here.
this._read();
if (--owner._fileEndsLeft === 0 && owner._finalcb) {
const cb = owner._finalcb;
owner._finalcb = null;
// Make sure other 'end' event handlers get a chance to be executed
// before busboy's 'finish' event is emitted
process.nextTick(cb);
}
});
}
_read(n) {
const cb = this._readcb;
if (cb) {
this._readcb = null;
cb();
}
}
}
const ignoreData = {
push: (chunk, pos) => {},
destroy: () => {},
};
function callAndUnsetCb(self, err) {
const cb = self._writecb;
self._writecb = null;
if (err)
self.destroy(err);
else if (cb)
cb();
}
function nullDecoder(val, hint) {
return val;
}
class Multipart extends Writable {
constructor(cfg) {
const streamOpts = {
autoDestroy: true,
emitClose: true,
highWaterMark: (typeof cfg.highWaterMark === 'number'
? cfg.highWaterMark
: undefined),
};
super(streamOpts);
if (!cfg.conType.params || typeof cfg.conType.params.boundary !== 'string')
throw new Error('Multipart: Boundary not found');
const boundary = cfg.conType.params.boundary;
const paramDecoder = (typeof cfg.defParamCharset === 'string'
&& cfg.defParamCharset
? getDecoder(cfg.defParamCharset)
: nullDecoder);
const defCharset = (cfg.defCharset || 'utf8');
const preservePath = cfg.preservePath;
const fileOpts = {
autoDestroy: true,
emitClose: true,
highWaterMark: (typeof cfg.fileHwm === 'number'
? cfg.fileHwm
: undefined),
};
const limits = cfg.limits;
const fieldSizeLimit = (limits && typeof limits.fieldSize === 'number'
? limits.fieldSize
: 1 * 1024 * 1024);
const fileSizeLimit = (limits && typeof limits.fileSize === 'number'
? limits.fileSize
: Infinity);
const filesLimit = (limits && typeof limits.files === 'number'
? limits.files
: Infinity);
const fieldsLimit = (limits && typeof limits.fields === 'number'
? limits.fields
: Infinity);
const partsLimit = (limits && typeof limits.parts === 'number'
? limits.parts
: Infinity);
let parts = -1; // Account for initial boundary
let fields = 0;
let files = 0;
let skipPart = false;
this._fileEndsLeft = 0;
this._fileStream = undefined;
this._complete = false;
let fileSize = 0;
let field;
let fieldSize = 0;
let partCharset;
let partEncoding;
let partType;
let partName;
let partTruncated = false;
let hitFilesLimit = false;
let hitFieldsLimit = false;
this._hparser = null;
const hparser = new HeaderParser((header) => {
this._hparser = null;
skipPart = false;
partType = 'text/plain';
partCharset = defCharset;
partEncoding = '7bit';
partName = undefined;
partTruncated = false;
let filename;
if (!header['content-disposition']) {
skipPart = true;
return;
}
const disp = parseDisposition(header['content-disposition'][0],
paramDecoder);
if (!disp || disp.type !== 'form-data') {
skipPart = true;
return;
}
if (disp.params) {
if (disp.params.name)
partName = disp.params.name;
if (disp.params['filename*'])
filename = disp.params['filename*'];
else if (disp.params.filename)
filename = disp.params.filename;
if (filename !== undefined && !preservePath)
filename = basename(filename);
}
if (header['content-type']) {
const conType = parseContentType(header['content-type'][0]);
if (conType) {
partType = `${conType.type}/${conType.subtype}`;
if (conType.params && typeof conType.params.charset === 'string')
partCharset = conType.params.charset.toLowerCase();
}
}
if (header['content-transfer-encoding'])
partEncoding = header['content-transfer-encoding'][0].toLowerCase();
if (partType === 'application/octet-stream' || filename !== undefined) {
// File
if (files === filesLimit) {
if (!hitFilesLimit) {
hitFilesLimit = true;
this.emit('filesLimit');
}
skipPart = true;
return;
}
++files;
if (this.listenerCount('file') === 0) {
skipPart = true;
return;
}
fileSize = 0;
this._fileStream = new FileStream(fileOpts, this);
++this._fileEndsLeft;
this.emit(
'file',
partName,
this._fileStream,
{ filename,
encoding: partEncoding,
mimeType: partType }
);
} else {
// Non-file
if (fields === fieldsLimit) {
if (!hitFieldsLimit) {
hitFieldsLimit = true;
this.emit('fieldsLimit');
}
skipPart = true;
return;
}
++fields;
if (this.listenerCount('field') === 0) {
skipPart = true;
return;
}
field = [];
fieldSize = 0;
}
});
let matchPostBoundary = 0;
const ssCb = (isMatch, data, start, end, isDataSafe) => {
retrydata:
while (data) {
if (this._hparser !== null) {
const ret = this._hparser.push(data, start, end);
if (ret === -1) {
this._hparser = null;
hparser.reset();
this.emit('error', new Error('Malformed part header'));
break;
}
start = ret;
}
if (start === end)
break;
if (matchPostBoundary !== 0) {
if (matchPostBoundary === 1) {
switch (data[start]) {
case 45: // '-'
// Try matching '--' after boundary
matchPostBoundary = 2;
++start;
break;
case 13: // '\r'
// Try matching CR LF before header
matchPostBoundary = 3;
++start;
break;
default:
matchPostBoundary = 0;
}
if (start === end)
return;
}
if (matchPostBoundary === 2) {
matchPostBoundary = 0;
if (data[start] === 45/* '-' */) {
// End of multipart data
this._complete = true;
this._bparser = ignoreData;
return;
}
// We saw something other than '-', so put the dash we consumed
// "back"
const writecb = this._writecb;
this._writecb = noop;
ssCb(false, BUF_DASH, 0, 1, false);
this._writecb = writecb;
} else if (matchPostBoundary === 3) {
matchPostBoundary = 0;
if (data[start] === 10/* '\n' */) {
++start;
if (parts >= partsLimit)
break;
// Prepare the header parser
this._hparser = hparser;
if (start === end)
break;
// Process the remaining data as a header
continue retrydata;
} else {
// We saw something other than LF, so put the CR we consumed
// "back"
const writecb = this._writecb;
this._writecb = noop;
ssCb(false, BUF_CR, 0, 1, false);
this._writecb = writecb;
}
}
}
if (!skipPart) {
if (this._fileStream) {
let chunk;
const actualLen = Math.min(end - start, fileSizeLimit - fileSize);
if (!isDataSafe) {
chunk = Buffer.allocUnsafe(actualLen);
data.copy(chunk, 0, start, start + actualLen);
} else {
chunk = data.slice(start, start + actualLen);
}
fileSize += chunk.length;
if (fileSize === fileSizeLimit) {
if (chunk.length > 0)
this._fileStream.push(chunk);
this._fileStream.emit('limit');
this._fileStream.truncated = true;
skipPart = true;
} else if (!this._fileStream.push(chunk)) {
if (this._writecb)
this._fileStream._readcb = this._writecb;
this._writecb = null;
}
} else if (field !== undefined) {
let chunk;
const actualLen = Math.min(
end - start,
fieldSizeLimit - fieldSize
);
if (!isDataSafe) {
chunk = Buffer.allocUnsafe(actualLen);
data.copy(chunk, 0, start, start + actualLen);
} else {
chunk = data.slice(start, start + actualLen);
}
fieldSize += actualLen;
field.push(chunk);
if (fieldSize === fieldSizeLimit) {
skipPart = true;
partTruncated = true;
}
}
}
break;
}
if (isMatch) {
matchPostBoundary = 1;
if (this._fileStream) {
// End the active file stream if the previous part was a file
this._fileStream.push(null);
this._fileStream = null;
} else if (field !== undefined) {
let data;
switch (field.length) {
case 0:
data = '';
break;
case 1:
data = convertToUTF8(field[0], partCharset, 0);
break;
default:
data = convertToUTF8(
Buffer.concat(field, fieldSize),
partCharset,
0
);
}
field = undefined;
fieldSize = 0;
this.emit(
'field',
partName,
data,
{ nameTruncated: false,
valueTruncated: partTruncated,
encoding: partEncoding,
mimeType: partType }
);
}
if (++parts === partsLimit)
this.emit('partsLimit');
}
};
this._bparser = new StreamSearch(`\r\n--${boundary}`, ssCb);
this._writecb = null;
this._finalcb = null;
// Just in case there is no preamble
this.write(BUF_CRLF);
}
static detect(conType) {
return (conType.type === 'multipart' && conType.subtype === 'form-data');
}
_write(chunk, enc, cb) {
this._writecb = cb;
this._bparser.push(chunk, 0);
if (this._writecb)
callAndUnsetCb(this);
}
_destroy(err, cb) {
this._hparser = null;
this._bparser = ignoreData;
if (!err)
err = checkEndState(this);
const fileStream = this._fileStream;
if (fileStream) {
this._fileStream = null;
fileStream.destroy(err);
}
cb(err);
}
_final(cb) {
this._bparser.destroy();
if (!this._complete)
return cb(new Error('Unexpected end of form'));
if (this._fileEndsLeft)
this._finalcb = finalcb.bind(null, this, cb);
else
finalcb(this, cb);
}
}
function finalcb(self, cb, err) {
if (err)
return cb(err);
err = checkEndState(self);
cb(err);
}
function checkEndState(self) {
if (self._hparser)
return new Error('Malformed part header');
const fileStream = self._fileStream;
if (fileStream) {
self._fileStream = null;
fileStream.destroy(new Error('Unexpected end of file'));
}
if (!self._complete)
return new Error('Unexpected end of form');
}
const TOKEN = [
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
];
const FIELD_VCHAR = [
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
];
module.exports = Multipart;

View File

@@ -0,0 +1,10 @@
"use strict";
exports.addMinutes = void 0;
var _index = require("../addMinutes.js");
var _index2 = require("./_lib/convertToFP.js"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
const addMinutes = (exports.addMinutes = (0, _index2.convertToFP)(
_index.addMinutes,
2,
));

View File

@@ -0,0 +1,57 @@
import { DEBUG_BUILD } from '../debug-build.js';
import { debug } from '../utils/debug-logger.js';
import { spanToJSON, getRootSpan, spanIsSampled } from '../utils/spanUtils.js';
/**
* Print a log message for a started span.
*/
function logSpanStart(span) {
if (!DEBUG_BUILD) return;
const { description = '< unknown name >', op = '< unknown op >', parent_span_id: parentSpanId } = spanToJSON(span);
const { spanId } = span.spanContext();
const sampled = spanIsSampled(span);
const rootSpan = getRootSpan(span);
const isRootSpan = rootSpan === span;
const header = `[Tracing] Starting ${sampled ? 'sampled' : 'unsampled'} ${isRootSpan ? 'root ' : ''}span`;
const infoParts = [`op: ${op}`, `name: ${description}`, `ID: ${spanId}`];
if (parentSpanId) {
infoParts.push(`parent ID: ${parentSpanId}`);
}
if (!isRootSpan) {
const { op, description } = spanToJSON(rootSpan);
infoParts.push(`root ID: ${rootSpan.spanContext().spanId}`);
if (op) {
infoParts.push(`root op: ${op}`);
}
if (description) {
infoParts.push(`root description: ${description}`);
}
}
debug.log(`${header}
${infoParts.join('\n ')}`);
}
/**
* Print a log message for an ended span.
*/
function logSpanEnd(span) {
if (!DEBUG_BUILD) return;
const { description = '< unknown name >', op = '< unknown op >' } = spanToJSON(span);
const { spanId } = span.spanContext();
const rootSpan = getRootSpan(span);
const isRootSpan = rootSpan === span;
const msg = `[Tracing] Finishing "${op}" ${isRootSpan ? 'root ' : ''}span "${description}" with ID ${spanId}`;
debug.log(msg);
}
export { logSpanEnd, logSpanStart };
//# sourceMappingURL=logSpans.js.map

View File

@@ -0,0 +1,23 @@
/**
* @license lucide-react v0.441.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 Tractor = createLucideIcon("Tractor", [
["path", { d: "m10 11 11 .9a1 1 0 0 1 .8 1.1l-.665 4.158a1 1 0 0 1-.988.842H20", key: "she1j9" }],
["path", { d: "M16 18h-5", key: "bq60fd" }],
["path", { d: "M18 5a1 1 0 0 0-1 1v5.573", key: "1kv8ia" }],
["path", { d: "M3 4h8.129a1 1 0 0 1 .99.863L13 11.246", key: "1q1ert" }],
["path", { d: "M4 11V4", key: "9ft8pt" }],
["path", { d: "M7 15h.01", key: "k5ht0j" }],
["path", { d: "M8 10.1V4", key: "1jgyzo" }],
["circle", { cx: "18", cy: "18", r: "2", key: "1emm8v" }],
["circle", { cx: "7", cy: "15", r: "5", key: "ddtuc" }]
]);
export { Tractor as default };
//# sourceMappingURL=tractor.js.map

View File

@@ -0,0 +1,17 @@
/** Used to match `RegExp` flags from their coerced string values. */
var reFlags = /\w*$/;
/**
* Creates a clone of `regexp`.
*
* @private
* @param {Object} regexp The regexp to clone.
* @returns {Object} Returns the cloned regexp.
*/
function cloneRegExp(regexp) {
var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
result.lastIndex = regexp.lastIndex;
return result;
}
module.exports = cloneRegExp;

View File

@@ -0,0 +1,19 @@
/**
* NOTE: the `graphql/subscription` module has been deprecated with its
* exported functions integrated into the `graphql/execution` module, to
* better conform with the terminology of the GraphQL specification.
*
* For backwards compatibility, the `graphql/subscription` module
* currently re-exports the moved functions from the `graphql/execution`
* module. In the next major release, the `graphql/subscription` module
* will be dropped entirely.
*/
/**
* @deprecated use ExecutionArgs instead. Will be removed in v17
*
* ExecutionArgs has been broadened to include all properties within SubscriptionArgs.
* The SubscriptionArgs type is retained for backwards compatibility.
*/
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export { subscribe, createSourceEventStream } from '../execution/subscribe.mjs';

View File

@@ -0,0 +1,31 @@
import { addDays } from "./addDays.js";
/**
* The {@link subDays} function options.
*/
/**
* @name subDays
* @category Day Helpers
* @summary Subtract the specified number of days from the given date.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The date to be changed
* @param amount - The amount of days to be subtracted.
* @param options - An object with options
*
* @returns The new date with the days subtracted
*
* @example
* // Subtract 10 days from 1 September 2014:
* const result = subDays(new Date(2014, 8, 1), 10)
* //=> Fri Aug 22 2014 00:00:00
*/
export function subDays(date, amount, options) {
return addDays(date, -amount, options);
}
// Fallback for modularized imports:
export default subDays;

View File

@@ -0,0 +1 @@
{"version":3,"names":["_getPrototypeOf","require","_setPrototypeOf","_isNativeFunction","_construct","_wrapNativeSuper","Class","_cache","Map","undefined","exports","default","isNativeFunction","TypeError","has","get","set","Wrapper","construct","arguments","getPrototypeOf","constructor","prototype","Object","create","value","enumerable","writable","configurable","setPrototypeOf"],"sources":["../../src/helpers/wrapNativeSuper.ts"],"sourcesContent":["/* @minVersion 7.0.0-beta.0 */\n\n// Based on https://github.com/WebReflection/babel-plugin-transform-builtin-classes\n\nimport getPrototypeOf from \"./getPrototypeOf.ts\";\nimport setPrototypeOf from \"./setPrototypeOf.ts\";\nimport isNativeFunction from \"./isNativeFunction.ts\";\nimport construct from \"./construct.ts\";\n\nexport default function _wrapNativeSuper(Class: Function | null) {\n var _cache = typeof Map === \"function\" ? new Map() : undefined;\n\n // @ts-expect-error -- reuse function id for helper size\n _wrapNativeSuper = function _wrapNativeSuper(Class: Function | null) {\n if (Class === null || !isNativeFunction(Class)) return Class;\n if (typeof Class !== \"function\") {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n if (_cache !== undefined) {\n if (_cache.has(Class)) return _cache.get(Class);\n _cache.set(Class, Wrapper);\n }\n\n function Wrapper() {\n // @ts-expect-error -- we are sure Class is a function here\n return construct(Class, arguments, getPrototypeOf(this).constructor);\n }\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true,\n },\n });\n\n return setPrototypeOf(Wrapper, Class);\n };\n\n return _wrapNativeSuper(Class);\n}\n"],"mappings":";;;;;;AAIA,IAAAA,eAAA,GAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AAEe,SAASI,gBAAgBA,CAACC,KAAsB,EAAE;EAC/D,IAAIC,MAAM,GAAG,OAAOC,GAAG,KAAK,UAAU,GAAG,IAAIA,GAAG,CAAC,CAAC,GAAGC,SAAS;EAG9DC,OAAA,CAAAC,OAAA,GAAAN,gBAAgB,GAAG,SAASA,gBAAgBA,CAACC,KAAsB,EAAE;IACnE,IAAIA,KAAK,KAAK,IAAI,IAAI,CAAC,IAAAM,yBAAgB,EAACN,KAAK,CAAC,EAAE,OAAOA,KAAK;IAC5D,IAAI,OAAOA,KAAK,KAAK,UAAU,EAAE;MAC/B,MAAM,IAAIO,SAAS,CAAC,oDAAoD,CAAC;IAC3E;IACA,IAAIN,MAAM,KAAKE,SAAS,EAAE;MACxB,IAAIF,MAAM,CAACO,GAAG,CAACR,KAAK,CAAC,EAAE,OAAOC,MAAM,CAACQ,GAAG,CAACT,KAAK,CAAC;MAC/CC,MAAM,CAACS,GAAG,CAACV,KAAK,EAAEW,OAAO,CAAC;IAC5B;IAEA,SAASA,OAAOA,CAAA,EAAG;MAEjB,OAAO,IAAAC,kBAAS,EAACZ,KAAK,EAAEa,SAAS,EAAE,IAAAC,uBAAc,EAAC,IAAI,CAAC,CAACC,WAAW,CAAC;IACtE;IACAJ,OAAO,CAACK,SAAS,GAAGC,MAAM,CAACC,MAAM,CAAClB,KAAK,CAACgB,SAAS,EAAE;MACjDD,WAAW,EAAE;QACXI,KAAK,EAAER,OAAO;QACdS,UAAU,EAAE,KAAK;QACjBC,QAAQ,EAAE,IAAI;QACdC,YAAY,EAAE;MAChB;IACF,CAAC,CAAC;IAEF,OAAO,IAAAC,uBAAc,EAACZ,OAAO,EAAEX,KAAK,CAAC;EACvC,CAAC;EAED,OAAOD,gBAAgB,CAACC,KAAK,CAAC;AAChC","ignoreList":[]}

View File

@@ -0,0 +1,31 @@
/** Check if attribute name and value are word-like. */
export declare function attr(name: string, value: string): boolean;
/** Check if id name is word-like. */
export declare function idName(name: string): boolean;
/** Check if class name is word-like. */
export declare function className(name: string): boolean;
/** Check if tag name is word-like. */
export declare function tagName(name: string): boolean;
/** Configuration options for the finder. */
export type Options = {
/** The root element to start the search from. */
root: Element;
/** Function that determines if an id name may be used in a selector. */
idName: (name: string) => boolean;
/** Function that determines if a class name may be used in a selector. */
className: (name: string) => boolean;
/** Function that determines if a tag name may be used in a selector. */
tagName: (name: string) => boolean;
/** Function that determines if an attribute may be used in a selector. */
attr: (name: string, value: string) => boolean;
/** Timeout to search for a selector. */
timeoutMs: number;
/** Minimum length of levels in fining selector. */
seedMinLength: number;
/** Minimum length for optimising selector. */
optimizedMinLength: number;
/** Maximum number of path checks. */
maxNumberOfPathChecks: number;
};
/** Finds unique CSS selectors for the given element. */
export declare function finder(input: Element, options?: Partial<Options>): string;

View File

@@ -0,0 +1,381 @@
import { expect, test } from "vitest";
import * as z from "zod/v4";
/// string
const stringSchema = z.string();
test("string async parse", async () => {
const goodData = "XXX";
const badData = 12;
const goodResult = await stringSchema.safeParseAsync(goodData);
expect(goodResult.success).toBe(true);
if (goodResult.success) expect(goodResult.data).toEqual(goodData);
const badResult = await stringSchema.safeParseAsync(badData);
expect(badResult.success).toBe(false);
if (!badResult.success) expect(badResult.error).toBeInstanceOf(z.ZodError);
});
/// number
const numberSchema = z.number();
test("number async parse", async () => {
const goodData = 1234.2353;
const badData = "1234";
const goodResult = await numberSchema.safeParseAsync(goodData);
expect(goodResult.success).toBe(true);
if (goodResult.success) expect(goodResult.data).toEqual(goodData);
const badResult = await numberSchema.safeParseAsync(badData);
expect(badResult.success).toBe(false);
if (!badResult.success) expect(badResult.error).toBeInstanceOf(z.ZodError);
});
/// bigInt
const bigIntSchema = z.bigint();
test("bigInt async parse", async () => {
const goodData = BigInt(145);
const badData = 134;
const goodResult = await bigIntSchema.safeParseAsync(goodData);
expect(goodResult.success).toBe(true);
if (goodResult.success) expect(goodResult.data).toEqual(goodData);
const badResult = await bigIntSchema.safeParseAsync(badData);
expect(badResult.success).toBe(false);
if (!badResult.success) expect(badResult.error).toBeInstanceOf(z.ZodError);
});
/// boolean
const booleanSchema = z.boolean();
test("boolean async parse", async () => {
const goodData = true;
const badData = 1;
const goodResult = await booleanSchema.safeParseAsync(goodData);
expect(goodResult.success).toBe(true);
if (goodResult.success) expect(goodResult.data).toEqual(goodData);
const badResult = await booleanSchema.safeParseAsync(badData);
expect(badResult.success).toBe(false);
if (!badResult.success) expect(badResult.error).toBeInstanceOf(z.ZodError);
});
/// date
const dateSchema = z.date();
test("date async parse", async () => {
const goodData = new Date();
const badData = new Date().toISOString();
const goodResult = await dateSchema.safeParseAsync(goodData);
expect(goodResult.success).toBe(true);
if (goodResult.success) expect(goodResult.data).toEqual(goodData);
const badResult = await dateSchema.safeParseAsync(badData);
expect(badResult.success).toBe(false);
if (!badResult.success) expect(badResult.error).toBeInstanceOf(z.ZodError);
});
/// undefined
const undefinedSchema = z.undefined();
test("undefined async parse", async () => {
const goodData = undefined;
const badData = "XXX";
const goodResult = await undefinedSchema.safeParseAsync(goodData);
expect(goodResult.success).toBe(true);
if (goodResult.success) expect(goodResult.data).toEqual(undefined);
const badResult = await undefinedSchema.safeParseAsync(badData);
expect(badResult.success).toBe(false);
if (!badResult.success) expect(badResult.error).toBeInstanceOf(z.ZodError);
});
/// null
const nullSchema = z.null();
test("null async parse", async () => {
const goodData = null;
const badData = undefined;
const goodResult = await nullSchema.safeParseAsync(goodData);
expect(goodResult.success).toBe(true);
if (goodResult.success) expect(goodResult.data).toEqual(goodData);
const badResult = await nullSchema.safeParseAsync(badData);
expect(badResult.success).toBe(false);
if (!badResult.success) expect(badResult.error).toBeInstanceOf(z.ZodError);
});
/// any
const anySchema = z.any();
test("any async parse", async () => {
const goodData = [{}];
// const badData = 'XXX';
const goodResult = await anySchema.safeParseAsync(goodData);
expect(goodResult.success).toBe(true);
if (goodResult.success) expect(goodResult.data).toEqual(goodData);
// const badResult = await anySchema.safeParseAsync(badData);
// expect(badResult.success).toBe(false);
// if (!badResult.success) expect(badResult.error).toBeInstanceOf(z.ZodError);
});
/// unknown
const unknownSchema = z.unknown();
test("unknown async parse", async () => {
const goodData = ["asdf", 124, () => {}];
// const badData = 'XXX';
const goodResult = await unknownSchema.safeParseAsync(goodData);
expect(goodResult.success).toBe(true);
if (goodResult.success) expect(goodResult.data).toEqual(goodData);
// const badResult = await unknownSchema.safeParseAsync(badData);
// expect(badResult.success).toBe(false);
// if (!badResult.success) expect(badResult.error).toBeInstanceOf(z.ZodError);
});
/// void
const voidSchema = z.void();
test("void async parse", async () => {
const goodData = undefined;
const badData = 0;
const goodResult = await voidSchema.safeParseAsync(goodData);
expect(goodResult.success).toBe(true);
if (goodResult.success) expect(goodResult.data).toEqual(goodData);
const badResult = await voidSchema.safeParseAsync(badData);
expect(badResult.success).toBe(false);
if (!badResult.success) expect(badResult.error).toBeInstanceOf(z.ZodError);
});
/// array
const arraySchema = z.array(z.string());
test("array async parse", async () => {
const goodData = ["XXX"];
const badData = "XXX";
const goodResult = await arraySchema.safeParseAsync(goodData);
expect(goodResult.success).toBe(true);
if (goodResult.success) expect(goodResult.data).toEqual(goodData);
const badResult = await arraySchema.safeParseAsync(badData);
expect(badResult.success).toBe(false);
if (!badResult.success) expect(badResult.error).toBeInstanceOf(z.ZodError);
});
/// object
const objectSchema = z.object({ string: z.string() });
test("object async parse", async () => {
const goodData = { string: "XXX" };
const badData = { string: 12 };
const goodResult = await objectSchema.safeParseAsync(goodData);
expect(goodResult.success).toBe(true);
if (goodResult.success) expect(goodResult.data).toEqual(goodData);
const badResult = await objectSchema.safeParseAsync(badData);
expect(badResult.success).toBe(false);
if (!badResult.success) expect(badResult.error).toBeInstanceOf(z.ZodError);
});
/// union
const unionSchema = z.union([z.string(), z.undefined()]);
test("union async parse", async () => {
const goodData = undefined;
const badData = null;
const goodResult = await unionSchema.safeParseAsync(goodData);
expect(goodResult.success).toBe(true);
if (goodResult.success) expect(goodResult.data).toEqual(goodData);
const badResult = await unionSchema.safeParseAsync(badData);
expect(badResult.success).toBe(false);
if (!badResult.success) expect(badResult.error).toBeInstanceOf(z.ZodError);
});
/// record
const recordSchema = z.record(z.string(), z.object({}));
test("record async parse", async () => {
const goodData = { adsf: {}, asdf: {} };
const badData = [{}];
const goodResult = await recordSchema.safeParseAsync(goodData);
expect(goodResult.success).toBe(true);
if (goodResult.success) expect(goodResult.data).toEqual(goodData);
const badResult = await recordSchema.safeParseAsync(badData);
expect(badResult.success).toBe(false);
if (!badResult.success) expect(badResult.error).toBeInstanceOf(z.ZodError);
});
/// function
// const functionSchema = z.function();
// test("function async parse", async () => {
// const goodData = () => {};
// const badData = "XXX";
// const goodResult = await functionSchema.safeParseAsync(goodData);
// expect(goodResult.success).toBe(true);
// if (goodResult.success) expect(typeof goodResult.data).toEqual("function");
// const badResult = await functionSchema.safeParseAsync(badData);
// expect(badResult.success).toBe(false);
// if (!badResult.success) expect(badResult.error).toBeInstanceOf(z.ZodError);
// });
/// literal
const literalSchema = z.literal("asdf");
test("literal async parse", async () => {
const goodData = "asdf";
const badData = "asdff";
const goodResult = await literalSchema.safeParseAsync(goodData);
expect(goodResult.success).toBe(true);
if (goodResult.success) expect(goodResult.data).toEqual(goodData);
const badResult = await literalSchema.safeParseAsync(badData);
expect(badResult.success).toBe(false);
if (!badResult.success) expect(badResult.error).toBeInstanceOf(z.ZodError);
});
/// enum
const enumSchema = z.enum(["fish", "whale"]);
test("enum async parse", async () => {
const goodData = "whale";
const badData = "leopard";
const goodResult = await enumSchema.safeParseAsync(goodData);
expect(goodResult.success).toBe(true);
if (goodResult.success) expect(goodResult.data).toEqual(goodData);
const badResult = await enumSchema.safeParseAsync(badData);
expect(badResult.success).toBe(false);
if (!badResult.success) expect(badResult.error).toBeInstanceOf(z.ZodError);
});
/// nativeEnum
enum nativeEnumTest {
asdf = "qwer",
}
// @ts-ignore
const nativeEnumSchema = z.nativeEnum(nativeEnumTest);
test("nativeEnum async parse", async () => {
const goodData = nativeEnumTest.asdf;
const badData = "asdf";
const goodResult = await nativeEnumSchema.safeParseAsync(goodData);
expect(goodResult.success).toBe(true);
if (goodResult.success) expect(goodResult.data).toEqual(goodData);
const badResult = await nativeEnumSchema.safeParseAsync(badData);
expect(badResult.success).toBe(false);
if (!badResult.success) expect(badResult.error).toBeInstanceOf(z.ZodError);
});
/// promise
const promiseSchema = z.promise(z.number());
test("promise async parse good", async () => {
const goodData = Promise.resolve(123);
const goodResult = await promiseSchema.safeParseAsync(goodData);
expect(goodResult.success).toBe(true);
expect(typeof goodResult.data).toEqual("number");
expect(goodResult.data).toEqual(123);
});
test("promise async parse bad", async () => {
const badData = Promise.resolve("XXX");
const badResult = await promiseSchema.safeParseAsync(badData);
expect(badResult.success).toBe(false);
expect(badResult.error).toBeInstanceOf(z.ZodError);
});
test("async validation non-empty strings", async () => {
const base = z.object({
hello: z.string().refine((x) => x && x.length > 0),
foo: z.string().refine((x) => x && x.length > 0),
});
const testval = { hello: "", foo: "" };
const result1 = base.safeParse(testval);
const result2 = base.safeParseAsync(testval);
const r1 = result1;
await result2.then((r2) => {
expect(r1.error!.issues.length).toBe(r2.error!.issues.length);
});
});
test("async validation multiple errors 1", async () => {
const base = z.object({
hello: z.string(),
foo: z.number(),
});
const testval = { hello: 3, foo: "hello" };
const result1 = base.safeParse(testval);
const result2 = base.safeParseAsync(testval);
await result2.then((result2) => {
expect(result2.error!.issues.length).toBe(result1.error!.issues.length);
});
});
test("async validation multiple errors 2", async () => {
const base = (is_async?: boolean) =>
z.object({
hello: z.string(),
foo: z.object({
bar: z.number().refine(
is_async
? async () =>
new Promise((resolve) => {
setTimeout(() => resolve(false), 500);
})
: () => false
),
}),
});
const testval = { hello: 3, foo: { bar: 4 } };
const result1 = base().safeParse(testval);
const result2 = base(true).safeParseAsync(testval);
await result2.then((result2) => {
expect(result1.error!.issues.length).toBe(result2.error!.issues.length);
});
});
test("ensure early async failure prevents follow-up refinement checks", async () => {
let count = 0;
const base = z.object({
hello: z.string(),
foo: z
.number()
.refine(async () => {
count++;
return true;
})
.refine(async () => {
count++;
return true;
}, "Good"),
});
const testval = { hello: "bye", foo: 3 };
const result = await base.safeParseAsync(testval);
if (result.success === false) {
expect(result.error.issues.length).toBe(1);
expect(count).toBe(1);
}
// await result.then((r) => {
// if (r.success === false) expect(r.error.issues.length).toBe(1);
// expect(count).toBe(2);
// });
});

View File

@@ -0,0 +1,48 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://json-schema.org/draft/2020-12/meta/applicator",
"$vocabulary": {
"https://json-schema.org/draft/2020-12/vocab/applicator": true
},
"$dynamicAnchor": "meta",
"title": "Applicator vocabulary meta-schema",
"type": ["object", "boolean"],
"properties": {
"prefixItems": {"$ref": "#/$defs/schemaArray"},
"items": {"$dynamicRef": "#meta"},
"contains": {"$dynamicRef": "#meta"},
"additionalProperties": {"$dynamicRef": "#meta"},
"properties": {
"type": "object",
"additionalProperties": {"$dynamicRef": "#meta"},
"default": {}
},
"patternProperties": {
"type": "object",
"additionalProperties": {"$dynamicRef": "#meta"},
"propertyNames": {"format": "regex"},
"default": {}
},
"dependentSchemas": {
"type": "object",
"additionalProperties": {"$dynamicRef": "#meta"},
"default": {}
},
"propertyNames": {"$dynamicRef": "#meta"},
"if": {"$dynamicRef": "#meta"},
"then": {"$dynamicRef": "#meta"},
"else": {"$dynamicRef": "#meta"},
"allOf": {"$ref": "#/$defs/schemaArray"},
"anyOf": {"$ref": "#/$defs/schemaArray"},
"oneOf": {"$ref": "#/$defs/schemaArray"},
"not": {"$dynamicRef": "#meta"}
},
"$defs": {
"schemaArray": {
"type": "array",
"minItems": 1,
"items": {"$dynamicRef": "#meta"}
}
}
}

View File

@@ -0,0 +1,10 @@
"use strict";
exports.subISOWeekYears = void 0;
var _index = require("../subISOWeekYears.cjs");
var _index2 = require("./_lib/convertToFP.cjs"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
const subISOWeekYears = (exports.subISOWeekYears = (0, _index2.convertToFP)(
_index.subISOWeekYears,
2,
));

View File

@@ -0,0 +1 @@
{"version":3,"file":"disc.js","sources":["../../../src/icons/disc.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Disc\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIgLz4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/disc\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 Disc = createLucideIcon('Disc', [\n ['circle', { cx: '12', cy: '12', r: '10', key: '1mglay' }],\n ['circle', { cx: '12', cy: '12', r: '2', key: '1c9p78' }],\n]);\n\nexport default Disc;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,iBAAiB,MAAQ,CAAA,CAAA,CAAA;AAAA,CACpC,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CACzD,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA;AAC1D,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,77 @@
{
"definitions": {
"VirtualModule": {
"description": "A virtual module definition.",
"type": "object",
"additionalProperties": false,
"properties": {
"source": {
"description": "The source function that provides the virtual content.",
"instanceof": "Function",
"tsType": "(import('../../../lib/schemes/VirtualUrlPlugin').SourceFn)"
},
"type": {
"description": "The module type.",
"type": "string"
},
"version": {
"description": "Optional version function or value for cache invalidation.",
"anyOf": [
{
"type": "boolean",
"enum": [true]
},
{
"type": "string"
},
{
"instanceof": "Function",
"tsType": "(import('../../../lib/schemes/VirtualUrlPlugin').VersionFn)"
}
]
}
},
"required": ["source"]
},
"VirtualModuleContent": {
"description": "A virtual module can be a string, a function, or a VirtualModule object.",
"anyOf": [
{
"type": "string"
},
{
"instanceof": "Function",
"tsType": "(import('../../../lib/schemes/VirtualUrlPlugin').SourceFn)"
},
{
"$ref": "#/definitions/VirtualModule"
}
]
},
"VirtualUrlOptions": {
"description": "Options for building virtual resources.",
"type": "object",
"additionalProperties": false,
"properties": {
"modules": {
"description": "The virtual modules configuration.",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/VirtualModuleContent"
}
},
"scheme": {
"description": "The URL scheme to use for virtual resources.",
"type": "string"
}
},
"required": ["modules"]
}
},
"title": "VirtualUrlPluginOptions",
"oneOf": [
{
"$ref": "#/definitions/VirtualUrlOptions"
}
]
}

View File

@@ -0,0 +1,2 @@
import { IPropertyValueDescriptor } from '../IPropertyDescriptor';
export declare const opacity: IPropertyValueDescriptor<number>;

View File

@@ -0,0 +1,28 @@
import { formatDistance } from "./en-US/_lib/formatDistance.mjs";
import { formatLong } from "./en-AU/_lib/formatLong.mjs";
import { formatRelative } from "./en-US/_lib/formatRelative.mjs";
import { localize } from "./en-US/_lib/localize.mjs";
import { match } from "./en-US/_lib/match.mjs";
/**
* @category Locales
* @summary English locale (Australia).
* @language English
* @iso-639-2 eng
* @author Julien Malige [@JulienMalige](https://github.com/JulienMalige)
*/
export const enAU = {
code: "en-AU",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 1 /* Monday */,
firstWeekContainsDate: 4,
},
};
// Fallback for modularized imports:
export default enAU;

View File

@@ -0,0 +1,8 @@
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
import { isExists as fn } from "../isExists.mjs";
import { convertToFP } from "./_lib/convertToFP.mjs";
export const isExists = convertToFP(fn, 3);
// Fallback for modularized imports:
export default isExists;

View File

@@ -0,0 +1,22 @@
name: Node CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm test
run: npm ci && npm run test
env:
CI: true

View File

@@ -0,0 +1,23 @@
/**
* @license lucide-react v0.441.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 PenOff = createLucideIcon("PenOff", [
[
"path",
{
d: "m10 10-6.157 6.162a2 2 0 0 0-.5.833l-1.322 4.36a.5.5 0 0 0 .622.624l4.358-1.323a2 2 0 0 0 .83-.5L14 13.982",
key: "bjo8r8"
}
],
["path", { d: "m12.829 7.172 4.359-4.346a1 1 0 1 1 3.986 3.986l-4.353 4.353", key: "16h5ne" }],
["path", { d: "m2 2 20 20", key: "1ooewy" }]
]);
export { PenOff as default };
//# sourceMappingURL=pen-off.js.map

View File

@@ -0,0 +1,3 @@
import type { WithServerSidePropsComponent } from 'payload';
export declare const WithServerSideProps: WithServerSidePropsComponent;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,28 @@
/**
* Produces the value of a block string from its parsed raw value, similar to
* CoffeeScript's block string, Python's docstring trim or Ruby's strip_heredoc.
*
* This implements the GraphQL spec's BlockStringValue() static algorithm.
*
* @internal
*/
export declare function dedentBlockStringLines(
lines: ReadonlyArray<string>,
): Array<string>;
/**
* @internal
*/
export declare function isPrintableAsBlockString(value: string): boolean;
/**
* Print a block string in the indented block form by adding a leading and
* trailing blank line. However, if a block string starts with whitespace and is
* a single-line, adding a leading blank line would strip that whitespace.
*
* @internal
*/
export declare function printBlockString(
value: string,
options?: {
minimize?: boolean;
},
): string;

View File

@@ -0,0 +1,2 @@
import type { Transform } from '@dnd-kit/utilities';
export declare function parseTransform(transform: string): Transform | null;

View File

@@ -0,0 +1,11 @@
import type { I18nClient } from '@payloadcms/translations';
import React from 'react';
import './index.scss';
export type ErrorPillProps = {
className?: string;
count: number;
i18n: I18nClient;
withMessage?: boolean;
};
export declare const ErrorPill: React.FC<ErrorPillProps>;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,85 @@
"use strict";
exports.QuarterParser = void 0;
var _Parser = require("../Parser.js");
var _utils = require("../utils.js");
class QuarterParser extends _Parser.Parser {
priority = 120;
parse(dateString, token, match) {
switch (token) {
// 1, 2, 3, 4
case "Q":
case "QQ": // 01, 02, 03, 04
return (0, _utils.parseNDigits)(token.length, dateString);
// 1st, 2nd, 3rd, 4th
case "Qo":
return match.ordinalNumber(dateString, { unit: "quarter" });
// Q1, Q2, Q3, Q4
case "QQQ":
return (
match.quarter(dateString, {
width: "abbreviated",
context: "formatting",
}) ||
match.quarter(dateString, {
width: "narrow",
context: "formatting",
})
);
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
case "QQQQQ":
return match.quarter(dateString, {
width: "narrow",
context: "formatting",
});
// 1st quarter, 2nd quarter, ...
case "QQQQ":
default:
return (
match.quarter(dateString, {
width: "wide",
context: "formatting",
}) ||
match.quarter(dateString, {
width: "abbreviated",
context: "formatting",
}) ||
match.quarter(dateString, {
width: "narrow",
context: "formatting",
})
);
}
}
validate(_date, value) {
return value >= 1 && value <= 4;
}
set(date, _flags, value) {
date.setMonth((value - 1) * 3, 1);
date.setHours(0, 0, 0, 0);
return date;
}
incompatibleTokens = [
"Y",
"R",
"q",
"M",
"L",
"w",
"I",
"d",
"D",
"i",
"e",
"c",
"t",
"T",
];
}
exports.QuarterParser = QuarterParser;

View File

@@ -0,0 +1,22 @@
The MIT License (MIT)
Copyright (c) 2014-2022 Matteo Collina
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.

View File

@@ -0,0 +1,7 @@
import type { ColumnBuilderBaseConfig, ColumnDataType } from "../../column-builder.cjs";
import { entityKind } from "../../entity.cjs";
import { PgColumnBuilder } from "./common.cjs";
export declare abstract class PgDateColumnBaseBuilder<T extends ColumnBuilderBaseConfig<ColumnDataType, string>, TRuntimeConfig extends object = object> extends PgColumnBuilder<T, TRuntimeConfig> {
static readonly [entityKind]: string;
defaultNow(): import("../../column-builder.ts").HasDefault<this>;
}

View File

@@ -0,0 +1,10 @@
"use strict";
exports.nextFriday = void 0;
var _index = require("../nextFriday.js");
var _index2 = require("./_lib/convertToFP.js"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
const nextFriday = (exports.nextFriday = (0, _index2.convertToFP)(
_index.nextFriday,
1,
));

View File

@@ -0,0 +1,308 @@
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define(['exports'], factory);
} else if (typeof exports !== "undefined") {
factory(exports);
} else {
var mod = {
exports: {}
};
factory(mod.exports);
global.bodyScrollLock = mod.exports;
}
})(this, function (exports) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
function _toConsumableArray(arr) {
if (Array.isArray(arr)) {
for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {
arr2[i] = arr[i];
}
return arr2;
} else {
return Array.from(arr);
}
}
// Older browsers don't support event options, feature detect it.
// Adopted and modified solution from Bohdan Didukh (2017)
// https://stackoverflow.com/questions/41594997/ios-10-safari-prevent-scrolling-behind-a-fixed-overlay-and-maintain-scroll-posi
var hasPassiveEvents = false;
if (typeof window !== 'undefined') {
var passiveTestOptions = {
get passive() {
hasPassiveEvents = true;
return undefined;
}
};
window.addEventListener('testPassive', null, passiveTestOptions);
window.removeEventListener('testPassive', null, passiveTestOptions);
}
var isIosDevice = typeof window !== 'undefined' && window.navigator && window.navigator.platform && (/iP(ad|hone|od)/.test(window.navigator.platform) || window.navigator.platform === 'MacIntel' && window.navigator.maxTouchPoints > 1);
var locks = [];
var documentListenerAdded = false;
var initialClientY = -1;
var previousBodyOverflowSetting = void 0;
var previousBodyPosition = void 0;
var previousBodyPaddingRight = void 0;
// returns true if `el` should be allowed to receive touchmove events.
var allowTouchMove = function allowTouchMove(el) {
return locks.some(function (lock) {
if (lock.options.allowTouchMove && lock.options.allowTouchMove(el)) {
return true;
}
return false;
});
};
var preventDefault = function preventDefault(rawEvent) {
var e = rawEvent || window.event;
// For the case whereby consumers adds a touchmove event listener to document.
// Recall that we do document.addEventListener('touchmove', preventDefault, { passive: false })
// in disableBodyScroll - so if we provide this opportunity to allowTouchMove, then
// the touchmove event on document will break.
if (allowTouchMove(e.target)) {
return true;
}
// Do not prevent if the event has more than one touch (usually meaning this is a multi touch gesture like pinch to zoom).
if (e.touches.length > 1) return true;
if (e.preventDefault) e.preventDefault();
return false;
};
var setOverflowHidden = function setOverflowHidden(options) {
// If previousBodyPaddingRight is already set, don't set it again.
if (previousBodyPaddingRight === undefined) {
var _reserveScrollBarGap = !!options && options.reserveScrollBarGap === true;
var scrollBarGap = window.innerWidth - document.documentElement.clientWidth;
if (_reserveScrollBarGap && scrollBarGap > 0) {
var computedBodyPaddingRight = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right'), 10);
previousBodyPaddingRight = document.body.style.paddingRight;
document.body.style.paddingRight = computedBodyPaddingRight + scrollBarGap + 'px';
}
}
// If previousBodyOverflowSetting is already set, don't set it again.
if (previousBodyOverflowSetting === undefined) {
previousBodyOverflowSetting = document.body.style.overflow;
document.body.style.overflow = 'hidden';
}
};
var restoreOverflowSetting = function restoreOverflowSetting() {
if (previousBodyPaddingRight !== undefined) {
document.body.style.paddingRight = previousBodyPaddingRight;
// Restore previousBodyPaddingRight to undefined so setOverflowHidden knows it
// can be set again.
previousBodyPaddingRight = undefined;
}
if (previousBodyOverflowSetting !== undefined) {
document.body.style.overflow = previousBodyOverflowSetting;
// Restore previousBodyOverflowSetting to undefined
// so setOverflowHidden knows it can be set again.
previousBodyOverflowSetting = undefined;
}
};
var setPositionFixed = function setPositionFixed() {
return window.requestAnimationFrame(function () {
// If previousBodyPosition is already set, don't set it again.
if (previousBodyPosition === undefined) {
previousBodyPosition = {
position: document.body.style.position,
top: document.body.style.top,
left: document.body.style.left
};
// Update the dom inside an animation frame
var _window = window,
scrollY = _window.scrollY,
scrollX = _window.scrollX,
innerHeight = _window.innerHeight;
document.body.style.position = 'fixed';
document.body.style.top = -scrollY;
document.body.style.left = -scrollX;
setTimeout(function () {
return window.requestAnimationFrame(function () {
// Attempt to check if the bottom bar appeared due to the position change
var bottomBarHeight = innerHeight - window.innerHeight;
if (bottomBarHeight && scrollY >= innerHeight) {
// Move the content further up so that the bottom bar doesn't hide it
document.body.style.top = -(scrollY + bottomBarHeight);
}
});
}, 300);
}
});
};
var restorePositionSetting = function restorePositionSetting() {
if (previousBodyPosition !== undefined) {
// Convert the position from "px" to Int
var y = -parseInt(document.body.style.top, 10);
var x = -parseInt(document.body.style.left, 10);
// Restore styles
document.body.style.position = previousBodyPosition.position;
document.body.style.top = previousBodyPosition.top;
document.body.style.left = previousBodyPosition.left;
// Restore scroll
window.scrollTo(x, y);
previousBodyPosition = undefined;
}
};
// https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollHeight#Problems_and_solutions
var isTargetElementTotallyScrolled = function isTargetElementTotallyScrolled(targetElement) {
return targetElement ? targetElement.scrollHeight - targetElement.scrollTop <= targetElement.clientHeight : false;
};
var handleScroll = function handleScroll(event, targetElement) {
var clientY = event.targetTouches[0].clientY - initialClientY;
if (allowTouchMove(event.target)) {
return false;
}
if (targetElement && targetElement.scrollTop === 0 && clientY > 0) {
// element is at the top of its scroll.
return preventDefault(event);
}
if (isTargetElementTotallyScrolled(targetElement) && clientY < 0) {
// element is at the bottom of its scroll.
return preventDefault(event);
}
event.stopPropagation();
return true;
};
var disableBodyScroll = exports.disableBodyScroll = function disableBodyScroll(targetElement, options) {
// targetElement must be provided
if (!targetElement) {
// eslint-disable-next-line no-console
console.error('disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.');
return;
}
// disableBodyScroll must not have been called on this targetElement before
if (locks.some(function (lock) {
return lock.targetElement === targetElement;
})) {
return;
}
var lock = {
targetElement: targetElement,
options: options || {}
};
locks = [].concat(_toConsumableArray(locks), [lock]);
if (isIosDevice) {
setPositionFixed();
} else {
setOverflowHidden(options);
}
if (isIosDevice) {
targetElement.ontouchstart = function (event) {
if (event.targetTouches.length === 1) {
// detect single touch.
initialClientY = event.targetTouches[0].clientY;
}
};
targetElement.ontouchmove = function (event) {
if (event.targetTouches.length === 1) {
// detect single touch.
handleScroll(event, targetElement);
}
};
if (!documentListenerAdded) {
document.addEventListener('touchmove', preventDefault, hasPassiveEvents ? { passive: false } : undefined);
documentListenerAdded = true;
}
}
};
var clearAllBodyScrollLocks = exports.clearAllBodyScrollLocks = function clearAllBodyScrollLocks() {
if (isIosDevice) {
// Clear all locks ontouchstart/ontouchmove handlers, and the references.
locks.forEach(function (lock) {
lock.targetElement.ontouchstart = null;
lock.targetElement.ontouchmove = null;
});
if (documentListenerAdded) {
document.removeEventListener('touchmove', preventDefault, hasPassiveEvents ? { passive: false } : undefined);
documentListenerAdded = false;
}
// Reset initial clientY.
initialClientY = -1;
}
if (isIosDevice) {
restorePositionSetting();
} else {
restoreOverflowSetting();
}
locks = [];
};
var enableBodyScroll = exports.enableBodyScroll = function enableBodyScroll(targetElement) {
if (!targetElement) {
// eslint-disable-next-line no-console
console.error('enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.');
return;
}
locks = locks.filter(function (lock) {
return lock.targetElement !== targetElement;
});
if (isIosDevice) {
targetElement.ontouchstart = null;
targetElement.ontouchmove = null;
if (documentListenerAdded && locks.length === 0) {
document.removeEventListener('touchmove', preventDefault, hasPassiveEvents ? { passive: false } : undefined);
documentListenerAdded = false;
}
}
if (isIosDevice) {
restorePositionSetting();
} else {
restoreOverflowSetting();
}
};
});

View File

@@ -0,0 +1,25 @@
import { email } from '../../fields/validations.js';
export const emailFieldConfig = {
name: 'email',
type: 'email',
admin: {
components: {
Field: false
}
},
hooks: {
beforeChange: [
({ value })=>{
if (value) {
return value.toLowerCase().trim();
}
}
]
},
label: ({ t })=>t('general:email'),
required: true,
unique: true,
validate: email
};
//# sourceMappingURL=email.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"route.js","sources":["../../../src/icons/route.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Route\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSI2IiBjeT0iMTkiIHI9IjMiIC8+CiAgPHBhdGggZD0iTTkgMTloOC41YTMuNSAzLjUgMCAwIDAgMC03aC0xMWEzLjUgMy41IDAgMCAxIDAtN0gxNSIgLz4KICA8Y2lyY2xlIGN4PSIxOCIgY3k9IjUiIHI9IjMiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/route\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 Route = createLucideIcon('Route', [\n ['circle', { cx: '6', cy: '19', r: '3', key: '1kj8tv' }],\n ['path', { d: 'M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15', key: '1d8sl' }],\n ['circle', { cx: '18', cy: '5', r: '3', key: 'gq8acd' }],\n]);\n\nexport default Route;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,iBAAiB,OAAS,CAAA,CAAA,CAAA;AAAA,CACtC,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,EAAK,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,CACvD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAwD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,SAAS,CAAA,CAAA;AAAA,CACpF,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA;AACzD,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9saWIvc3RyaWN0LWV4Y2x1ZGUvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCB0eXBlIFN0cmljdEV4Y2x1ZGU8VW5pb25UeXBlLCBFeGNsdWRlZE1lbWJlcnMgZXh0ZW5kcyBVbmlvblR5cGU+ID0gRXhjbHVkZTxVbmlvblR5cGUsIEV4Y2x1ZGVkTWVtYmVycz47XG4iXX0=

View File

@@ -0,0 +1,34 @@
var chain = require('./chain');
/**
* Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
*
* @name chain
* @memberOf _
* @since 0.1.0
* @category Seq
* @returns {Object} Returns the new `lodash` wrapper instance.
* @example
*
* var users = [
* { 'user': 'barney', 'age': 36 },
* { 'user': 'fred', 'age': 40 }
* ];
*
* // A sequence without explicit chaining.
* _(users).head();
* // => { 'user': 'barney', 'age': 36 }
*
* // A sequence with explicit chaining.
* _(users)
* .chain()
* .head()
* .pick('user')
* .value();
* // => { 'user': 'barney' }
*/
function wrapperChain() {
return chain(this);
}
module.exports = wrapperChain;

View File

@@ -0,0 +1,32 @@
import { entityKind } from "../../entity.js";
import { PgColumn, PgColumnBuilder } from "./common.js";
class PgSmallSerialBuilder extends PgColumnBuilder {
static [entityKind] = "PgSmallSerialBuilder";
constructor(name) {
super(name, "number", "PgSmallSerial");
this.config.hasDefault = true;
this.config.notNull = true;
}
/** @internal */
build(table) {
return new PgSmallSerial(
table,
this.config
);
}
}
class PgSmallSerial extends PgColumn {
static [entityKind] = "PgSmallSerial";
getSQLType() {
return "smallserial";
}
}
function smallserial(name) {
return new PgSmallSerialBuilder(name ?? "");
}
export {
PgSmallSerial,
PgSmallSerialBuilder,
smallserial
};
//# sourceMappingURL=smallserial.js.map

View File

@@ -0,0 +1,14 @@
import type { Collection, CollectionSlug, DataFromCollectionSlug, PayloadRequest } from 'payload';
export type Resolver<TSlug extends CollectionSlug> = (_: unknown, args: {
autosave: boolean;
data: DataFromCollectionSlug<TSlug>;
draft: boolean;
fallbackLocale?: string;
id: number | string;
locale?: string;
trash?: boolean;
}, context: {
req: PayloadRequest;
}) => Promise<DataFromCollectionSlug<TSlug>>;
export declare function updateResolver<TSlug extends CollectionSlug>(collection: Collection): Resolver<TSlug>;
//# sourceMappingURL=update.d.ts.map

View File

@@ -0,0 +1,52 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var sequence_exports = {};
__export(sequence_exports, {
GelSequence: () => GelSequence,
gelSequence: () => gelSequence,
gelSequenceWithSchema: () => gelSequenceWithSchema,
isGelSequence: () => isGelSequence
});
module.exports = __toCommonJS(sequence_exports);
var import_entity = require("../entity.cjs");
class GelSequence {
constructor(seqName, seqOptions, schema) {
this.seqName = seqName;
this.seqOptions = seqOptions;
this.schema = schema;
}
static [import_entity.entityKind] = "GelSequence";
}
function gelSequence(name, options) {
return gelSequenceWithSchema(name, options, void 0);
}
function gelSequenceWithSchema(name, options, schema) {
return new GelSequence(name, options, schema);
}
function isGelSequence(obj) {
return (0, import_entity.is)(obj, GelSequence);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
GelSequence,
gelSequence,
gelSequenceWithSchema,
isGelSequence
});
//# sourceMappingURL=sequence.cjs.map

View File

@@ -0,0 +1,23 @@
'use client';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import React from 'react';
export const Info = () => {
return /*#__PURE__*/_jsxs("svg", {
fill: "none",
height: "26",
viewBox: "0 0 26 26",
width: "26",
xmlns: "http://www.w3.org/2000/svg",
children: [/*#__PURE__*/_jsx("path", {
d: "M13 21C17.4183 21 21 17.4183 21 13C21 8.58172 17.4183 5 13 5C8.58172 5 5 8.58172 5 13C5 17.4183 8.58172 21 13 21Z",
fill: "var(--theme-elevation-500)"
}), /*#__PURE__*/_jsx("path", {
d: "M13 16.1998V12.9998M13 9.7998H13.0077",
stroke: "var(--theme-elevation-50)",
strokeLinecap: "round",
strokeLinejoin: "round"
})]
});
};
//# sourceMappingURL=Info.js.map

View File

@@ -0,0 +1,76 @@
import type { Request, Response, Handler } from 'express';
import { HandlerOptions as RawHandlerOptions, OperationContext } from '../handler';
import { RequestParams } from '../common';
/**
* The context in the request for the handler.
*
* @category Server/express
*/
export interface RequestContext {
res: Response;
}
/**
* The GraphQL over HTTP spec compliant request parser for an incoming GraphQL request.
*
* If the HTTP request _is not_ a [well-formatted GraphQL over HTTP request](https://graphql.github.io/graphql-over-http/draft/#sec-Request), the function will respond
* on the `Response` argument and return `null`.
*
* If the HTTP request _is_ a [well-formatted GraphQL over HTTP request](https://graphql.github.io/graphql-over-http/draft/#sec-Request), but is invalid or malformed,
* the function will throw an error and it is up to the user to handle and respond as they see fit.
*
* ```js
* import express from 'express'; // yarn add express
* import { parseRequestParams } from 'graphql-http/lib/use/express';
*
* const app = express();
* app.all('/graphql', async (req, res) => {
* try {
* const maybeParams = await parseRequestParams(req, res);
* if (!maybeParams) {
* // not a well-formatted GraphQL over HTTP request,
* // parser responded and there's nothing else to do
* return;
* }
*
* // well-formatted GraphQL over HTTP request,
* // with valid parameters
* res.writeHead(200).end(JSON.stringify(maybeParams, null, ' '));
* } catch (err) {
* // well-formatted GraphQL over HTTP request,
* // but with invalid parameters
* res.writeHead(400).end(err.message);
* }
* });
*
* app.listen({ port: 4000 });
* console.log('Listening to port 4000');
* ```
*
* @category Server/express
*/
export declare function parseRequestParams(req: Request, res: Response): Promise<RequestParams | null>;
/**
* Handler options when using the express adapter.
*
* @category Server/express
*/
export type HandlerOptions<Context extends OperationContext = undefined> = RawHandlerOptions<Request, RequestContext, Context>;
/**
* Create a GraphQL over HTTP spec compliant request handler for
* the express framework.
*
* ```js
* import express from 'express'; // yarn add express
* import { createHandler } from 'graphql-http/lib/use/express';
* import { schema } from './my-graphql-schema';
*
* const app = express();
* app.all('/graphql', createHandler({ schema }));
*
* app.listen({ port: 4000 });
* console.log('Listening to port 4000');
* ```
*
* @category Server/express
*/
export declare function createHandler<Context extends OperationContext = undefined>(options: HandlerOptions<Context>): Handler;

View File

@@ -0,0 +1,2 @@
const e=(e,t)=>()=>({path:`/comments`,params:t??{},body:JSON.stringify(e),method:`POST`}),t=(e,t)=>()=>({path:`/comments`,params:t??{},body:JSON.stringify(e),method:`POST`});exports.createComment=t,exports.createComments=e;
//# sourceMappingURL=comments.cjs.map

View File

@@ -0,0 +1,160 @@
'use client';
import { c as _c } from "react/compiler-runtime";
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { getTranslation } from '@payloadcms/translations';
import { formatFilesize } from 'payload/shared';
import React from 'react';
import { Button } from '../../../elements/Button/index.js';
import { useDocumentDrawer } from '../../../elements/DocumentDrawer/index.js';
import { Pill } from '../../../elements/Pill/index.js';
import { ThumbnailComponent } from '../../../elements/Thumbnail/index.js';
import './index.scss';
import { useConfig } from '../../../providers/Config/index.js';
import { useTranslation } from '../../../providers/Translation/index.js';
const baseClass = 'upload-relationship-details';
export function RelationshipContent(props) {
const $ = _c(11);
const {
id,
allowEdit,
allowRemove,
alt,
byteSize,
className,
collectionSlug,
displayPreview,
filename,
mimeType,
onRemove,
reloadDoc,
showCollectionSlug: t0,
src,
thumbnailSrc,
updatedAt,
withMeta: t1,
x,
y
} = props;
const showCollectionSlug = t0 === undefined ? false : t0;
const withMeta = t1 === undefined ? true : t1;
const {
config
} = useConfig();
const {
i18n
} = useTranslation();
const collectionConfig = "collections" in config ? config.collections.find(collection => collection.slug === collectionSlug) : undefined;
const t2 = id ?? undefined;
let t3;
if ($[0] !== collectionSlug || $[1] !== t2) {
t3 = {
id: t2,
collectionSlug
};
$[0] = collectionSlug;
$[1] = t2;
$[2] = t3;
} else {
t3 = $[2];
}
const [DocumentDrawer,, t4] = useDocumentDrawer(t3);
const {
openDrawer
} = t4;
let t5;
if ($[3] !== collectionSlug || $[4] !== reloadDoc) {
t5 = async t6 => {
const {
doc
} = t6;
return reloadDoc(doc.id, collectionSlug);
};
$[3] = collectionSlug;
$[4] = reloadDoc;
$[5] = t5;
} else {
t5 = $[5];
}
const onSave = t5;
let t6;
if ($[6] !== x || $[7] !== y) {
t6 = function generateMetaText(mimeType_0, size) {
const sections = [];
if (size) {
sections.push(formatFilesize(size));
}
if (x && y) {
sections.push(`${x}x${y}`);
}
if (mimeType_0) {
sections.push(mimeType_0);
}
return sections.join(" \u2014 ");
};
$[6] = x;
$[7] = y;
$[8] = t6;
} else {
t6 = $[8];
}
const generateMetaText = t6;
const metaText = withMeta ? generateMetaText(mimeType, byteSize) : "";
const previewAllowed = displayPreview ?? collectionConfig?.upload?.displayPreview ?? true;
let t7;
if ($[9] !== className) {
t7 = [baseClass, className].filter(Boolean);
$[9] = className;
$[10] = t7;
} else {
t7 = $[10];
}
return _jsxs("div", {
className: t7.join(" "),
children: [_jsxs("div", {
className: `${baseClass}__imageAndDetails`,
children: [previewAllowed && _jsx(ThumbnailComponent, {
alt,
className: `${baseClass}__thumbnail`,
filename,
fileSrc: thumbnailSrc,
imageCacheTag: collectionConfig?.upload?.cacheTags && updatedAt,
size: "small"
}), showCollectionSlug && collectionConfig ? _jsx(Pill, {
size: "small",
children: getTranslation(collectionConfig.labels.singular, i18n)
}) : null, _jsxs("div", {
className: `${baseClass}__details`,
children: [_jsx("p", {
className: `${baseClass}__filename`,
children: src ? _jsx("a", {
href: src,
target: "_blank",
children: filename
}) : filename
}), withMeta ? _jsx("p", {
className: `${baseClass}__meta`,
children: metaText
}) : null]
})]
}), allowEdit !== false || allowRemove !== false ? _jsxs("div", {
className: `${baseClass}__actions`,
children: [allowEdit !== false ? _jsx(Button, {
buttonStyle: "icon-label",
className: `${baseClass}__edit`,
icon: "edit",
iconStyle: "none",
onClick: openDrawer
}) : null, allowRemove !== false ? _jsx(Button, {
buttonStyle: "icon-label",
className: `${baseClass}__remove`,
icon: "x",
iconStyle: "none",
onClick: () => onRemove()
}) : null, _jsx(DocumentDrawer, {
onSave
})]
}) : null]
});
}
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/elements/DrawerContentContainer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,cAAc,CAAA;AAIrB,KAAK,KAAK,GAAG;IACX,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IAClC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAC5B,CAAA;AACD,wBAAgB,sBAAsB,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,KAAK,qBAEpE"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"package-search.js","sources":["../../../src/icons/package-search.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name PackageSearch\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjEgMTBWOGEyIDIgMCAwIDAtMS0xLjczbC03LTRhMiAyIDAgMCAwLTIgMGwtNyA0QTIgMiAwIDAgMCAzIDh2OGEyIDIgMCAwIDAgMSAxLjczbDcgNGEyIDIgMCAwIDAgMiAwbDItMS4xNCIgLz4KICA8cGF0aCBkPSJtNy41IDQuMjcgOSA1LjE1IiAvPgogIDxwb2x5bGluZSBwb2ludHM9IjMuMjkgNyAxMiAxMiAyMC43MSA3IiAvPgogIDxsaW5lIHgxPSIxMiIgeDI9IjEyIiB5MT0iMjIiIHkyPSIxMiIgLz4KICA8Y2lyY2xlIGN4PSIxOC41IiBjeT0iMTUuNSIgcj0iMi41IiAvPgogIDxwYXRoIGQ9Ik0yMC4yNyAxNy4yNyAyMiAxOSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/package-search\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst PackageSearch = createLucideIcon('PackageSearch', [\n [\n 'path',\n {\n d: 'M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14',\n key: 'e7tb2h',\n },\n ],\n ['path', { d: 'm7.5 4.27 9 5.15', key: '1c824w' }],\n ['polyline', { points: '3.29 7 12 12 20.71 7', key: 'ousv84' }],\n ['line', { x1: '12', x2: '12', y1: '22', y2: '12', key: 'a4e8g8' }],\n ['circle', { cx: '18.5', cy: '15.5', r: '2.5', key: 'b5zd12' }],\n ['path', { d: 'M20.27 17.27 22 19', key: '1l4muz' }],\n]);\n\nexport default PackageSearch;\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,CAAgB,iBAAiB,eAAiB,CAAA,CAAA,CAAA;AAAA,CACtD,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,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,CAAA,CACjD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,CAAA,CAAA,CAAA,CAAE,QAAQ,CAAwB,CAAA,CAAA,CAAA,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,CAC9D,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,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAClE,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,CAAA;AAAA,CAAA,CAC9D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAsB,CAAA,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;AACrD,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,31 @@
// Copied from https://github.com/jeluard/prism-clojure
Prism.languages.clojure = {
'comment': {
pattern: /;.*/,
greedy: true
},
'string': {
pattern: /"(?:[^"\\]|\\.)*"/,
greedy: true
},
'char': /\\\w+/,
'symbol': {
pattern: /(^|[\s()\[\]{},])::?[\w*+!?'<>=/.-]+/,
lookbehind: true
},
'keyword': {
pattern: /(\()(?:-|->|->>|\.|\.\.|\*|\/|\+|<|<=|=|==|>|>=|accessor|agent|agent-errors|aget|alength|all-ns|alter|and|append-child|apply|array-map|aset|aset-boolean|aset-byte|aset-char|aset-double|aset-float|aset-int|aset-long|aset-short|assert|assoc|await|await-for|bean|binding|bit-and|bit-not|bit-or|bit-shift-left|bit-shift-right|bit-xor|boolean|branch\?|butlast|byte|cast|char|children|class|clear-agent-errors|comment|commute|comp|comparator|complement|concat|cond|conj|cons|constantly|construct-proxy|contains\?|count|create-ns|create-struct|cycle|dec|declare|def|def-|definline|definterface|defmacro|defmethod|defmulti|defn|defn-|defonce|defproject|defprotocol|defrecord|defstruct|deftype|deref|difference|disj|dissoc|distinct|do|doall|doc|dorun|doseq|dosync|dotimes|doto|double|down|drop|drop-while|edit|end\?|ensure|eval|every\?|false\?|ffirst|file-seq|filter|find|find-doc|find-ns|find-var|first|float|flush|fn|fnseq|for|frest|gensym|get|get-proxy-class|hash-map|hash-set|identical\?|identity|if|if-let|if-not|import|in-ns|inc|index|insert-child|insert-left|insert-right|inspect-table|inspect-tree|instance\?|int|interleave|intersection|into|into-array|iterate|join|key|keys|keyword|keyword\?|last|lazy-cat|lazy-cons|left|lefts|let|line-seq|list|list\*|load|load-file|locking|long|loop|macroexpand|macroexpand-1|make-array|make-node|map|map-invert|map\?|mapcat|max|max-key|memfn|merge|merge-with|meta|min|min-key|monitor-enter|name|namespace|neg\?|new|newline|next|nil\?|node|not|not-any\?|not-every\?|not=|ns|ns-imports|ns-interns|ns-map|ns-name|ns-publics|ns-refers|ns-resolve|ns-unmap|nth|nthrest|or|parse|partial|path|peek|pop|pos\?|pr|pr-str|print|print-str|println|println-str|prn|prn-str|project|proxy|proxy-mappings|quot|quote|rand|rand-int|range|re-find|re-groups|re-matcher|re-matches|re-pattern|re-seq|read|read-line|recur|reduce|ref|ref-set|refer|rem|remove|remove-method|remove-ns|rename|rename-keys|repeat|replace|replicate|resolve|rest|resultset-seq|reverse|rfirst|right|rights|root|rrest|rseq|second|select|select-keys|send|send-off|seq|seq-zip|seq\?|set|set!|short|slurp|some|sort|sort-by|sorted-map|sorted-map-by|sorted-set|special-symbol\?|split-at|split-with|str|string\?|struct|struct-map|subs|subvec|symbol|symbol\?|sync|take|take-nth|take-while|test|throw|time|to-array|to-array-2d|tree-seq|true\?|try|union|up|update-proxy|val|vals|var|var-get|var-set|var\?|vector|vector-zip|vector\?|when|when-first|when-let|when-not|with-local-vars|with-meta|with-open|with-out-str|xml-seq|xml-zip|zero\?|zipmap|zipper)(?=[\s)]|$)/,
lookbehind: true
},
'boolean': /\b(?:false|nil|true)\b/,
'number': {
pattern: /(^|[^\w$@])(?:\d+(?:[/.]\d+)?(?:e[+-]?\d+)?|0x[a-f0-9]+|[1-9]\d?r[a-z0-9]+)[lmn]?(?![\w$@])/i,
lookbehind: true
},
'function': {
pattern: /((?:^|[^'])\()[\w*+!?'<>=/.-]+(?=[\s)]|$)/,
lookbehind: true
},
'operator': /[#@^`~]/,
'punctuation': /[{}\[\](),]/
};

View File

@@ -0,0 +1 @@
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/elements/TimezonePicker/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAEhD,MAAM,MAAM,KAAK,GAAG;IAClB,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B,GAAG,IAAI,CAAC,iBAAiB,EAAE,SAAS,CAAC,CAAA"}

View File

@@ -0,0 +1,72 @@
import { Feature } from '../Feature.mjs';
import { observeIntersection } from './observers.mjs';
const thresholdNames = {
some: 0,
all: 1,
};
class InViewFeature extends Feature {
constructor() {
super(...arguments);
this.hasEnteredView = false;
this.isInView = false;
}
startObserver() {
this.unmount();
const { viewport = {} } = this.node.getProps();
const { root, margin: rootMargin, amount = "some", once } = viewport;
const options = {
root: root ? root.current : undefined,
rootMargin,
threshold: typeof amount === "number" ? amount : thresholdNames[amount],
};
const onIntersectionUpdate = (entry) => {
const { isIntersecting } = entry;
/**
* If there's been no change in the viewport state, early return.
*/
if (this.isInView === isIntersecting)
return;
this.isInView = isIntersecting;
/**
* Handle hasEnteredView. If this is only meant to run once, and
* element isn't visible, early return. Otherwise set hasEnteredView to true.
*/
if (once && !isIntersecting && this.hasEnteredView) {
return;
}
else if (isIntersecting) {
this.hasEnteredView = true;
}
if (this.node.animationState) {
this.node.animationState.setActive("whileInView", isIntersecting);
}
/**
* Use the latest committed props rather than the ones in scope
* when this observer is created
*/
const { onViewportEnter, onViewportLeave } = this.node.getProps();
const callback = isIntersecting ? onViewportEnter : onViewportLeave;
callback && callback(entry);
};
return observeIntersection(this.node.current, options, onIntersectionUpdate);
}
mount() {
this.startObserver();
}
update() {
if (typeof IntersectionObserver === "undefined")
return;
const { props, prevProps } = this.node;
const hasOptionsChanged = ["amount", "margin", "root"].some(hasViewportOptionChanged(props, prevProps));
if (hasOptionsChanged) {
this.startObserver();
}
}
unmount() { }
}
function hasViewportOptionChanged({ viewport = {} }, { viewport: prevViewport = {} } = {}) {
return (name) => viewport[name] !== prevViewport[name];
}
export { InViewFeature };

View File

@@ -0,0 +1,173 @@
A pure JavaScript implementation of [Sass][sass]. **Sass makes CSS fun again**.
<table>
<tr>
<td>
<img width="118px" alt="Sass logo" src="https://rawgit.com/sass/sass-site/master/source/assets/img/logos/logo.svg" />
</td>
<td valign="middle">
<a href="https://www.npmjs.com/package/sass"><img width="100%" alt="npm statistics" src="https://nodei.co/npm/sass.png?downloads=true"></a>
</td>
<td valign="middle">
<a href="https://github.com/sass/dart-sass/actions"><img alt="GitHub actions build status" src="https://github.com/sass/dart-sass/workflows/CI/badge.svg"></a>
<br>
<a href="https://ci.appveyor.com/project/nex3/dart-sass"><img alt="Appveyor build status" src="https://ci.appveyor.com/api/projects/status/84rl9hvu8uoecgef?svg=true"></a>
</td>
</tr>
</table>
[sass]: https://sass-lang.com/
This package is a distribution of [Dart Sass][], compiled to pure JavaScript
with no native code or external dependencies. It provides a command-line `sass`
executable and a Node.js API.
[Dart Sass]: https://github.com/sass/dart-sass
* [Usage](#usage)
* [See Also](#see-also)
* [Behavioral Differences from Ruby Sass](#behavioral-differences-from-ruby-sass)
## Usage
You can install Sass globally using `npm install -g sass` which will provide
access to the `sass` executable. You can also add it to your project using
`npm install --save-dev sass`. This provides the executable as well as a
library:
[npm]: https://www.npmjs.com/package/sass
```js
const sass = require('sass');
const result = sass.compile(scssFilename);
// OR
// Note that `compileAsync()` is substantially slower than `compile()`.
const result = await sass.compileAsync(scssFilename);
```
See [the Sass website][js api] for full API documentation.
[js api]: https://sass-lang.com/documentation/js-api
### Legacy API
Dart Sass also supports an older JavaScript API that's fully compatible with
[Node Sass] (with a few exceptions listed below), with support for both the
[`render()`] and [`renderSync()`] functions. This API is considered deprecated
and will be removed in Dart Sass 2.0.0, so it should be avoided in new projects.
[Node Sass]: https://github.com/sass/node-sass
[`render()`]: https://sass-lang.com/documentation/js-api/functions/render
[`renderSync()`]: https://sass-lang.com/documentation/js-api/functions/renderSync
Sass's support for the legacy JavaScript API has the following limitations:
* Only the `"expanded"` and `"compressed"` values of [`outputStyle`] are
supported.
* Dart Sass doesn't support the [`precision`] option. Dart Sass defaults to a
sufficiently high precision for all existing browsers, and making this
customizable would make the code substantially less efficient.
* Dart Sass doesn't support the [`sourceComments`] option. Source maps are the
recommended way of locating the origin of generated selectors.
[`outputStyle`]: https://sass-lang.com/documentation/js-api/interfaces/LegacySharedOptions#outputStyle
[`precision`]: https://github.com/sass/node-sass#precision
[`sourceComments`]: https://github.com/sass/node-sass#sourcecomments
## See Also
* [Dart Sass][], from which this package is compiled, can be used either as a
stand-alone executable or as a Dart library. Running Dart Sass on the Dart VM
is substantially faster than running the pure JavaScript version, so this may
be appropriate for performance-sensitive applications. The Dart API is also
(currently) more user-friendly than the JavaScript API. See
[the Dart Sass README][Using Dart Sass] for details on how to use it.
* [Node Sass][], which is a wrapper around [LibSass][], the C++ implementation
of Sass. Node Sass supports the same API as this package and is also faster
(although it's usually a little slower than Dart Sass). However, it requires a
native library which may be difficult to install, and it's generally slower to
add features and fix bugs.
[Using Dart Sass]: https://github.com/sass/dart-sass#using-dart-sass
[Node Sass]: https://www.npmjs.com/package/node-sass
[LibSass]: https://sass-lang.com/libsass
## Behavioral Differences from Ruby Sass
There are a few intentional behavioral differences between Dart Sass and Ruby
Sass. These are generally places where Ruby Sass has an undesired behavior, and
it's substantially easier to implement the correct behavior than it would be to
implement compatible behavior. These should all have tracking bugs against Ruby
Sass to update the reference behavior.
1. `@extend` only accepts simple selectors, as does the second argument of
`selector-extend()`. See [issue 1599][].
2. Subject selectors are not supported. See [issue 1126][].
3. Pseudo selector arguments are parsed as `<declaration-value>`s rather than
having a more limited custom parsing. See [issue 2120][].
4. The numeric precision is set to 10. See [issue 1122][].
5. The indented syntax parser is more flexible: it doesn't require consistent
indentation across the whole document. See [issue 2176][].
6. Colors do not support channel-by-channel arithmetic. See [issue 2144][].
7. Unitless numbers aren't `==` to unit numbers with the same value. In
addition, map keys follow the same logic as `==`-equality. See
[issue 1496][].
8. `rgba()` and `hsla()` alpha values with percentage units are interpreted as
percentages. Other units are forbidden. See [issue 1525][].
9. Too many variable arguments passed to a function is an error. See
[issue 1408][].
10. Allow `@extend` to reach outside a media query if there's an identical
`@extend` defined outside that query. This isn't tracked explicitly, because
it'll be irrelevant when [issue 1050][] is fixed.
11. Some selector pseudos containing placeholder selectors will be compiled
where they wouldn't be in Ruby Sass. This better matches the semantics of
the selectors in question, and is more efficient. See [issue 2228][].
12. The old-style `:property value` syntax is not supported in the indented
syntax. See [issue 2245][].
13. The reference combinator is not supported. See [issue 303][].
14. Universal selector unification is symmetrical. See [issue 2247][].
15. `@extend` doesn't produce an error if it matches but fails to unify. See
[issue 2250][].
16. Dart Sass currently only supports UTF-8 documents. We'd like to support
more, but Dart currently doesn't support them. See [dart-lang/sdk#11744][],
for example.
[issue 1599]: https://github.com/sass/sass/issues/1599
[issue 1126]: https://github.com/sass/sass/issues/1126
[issue 2120]: https://github.com/sass/sass/issues/2120
[issue 1122]: https://github.com/sass/sass/issues/1122
[issue 2176]: https://github.com/sass/sass/issues/2176
[issue 2144]: https://github.com/sass/sass/issues/2144
[issue 1496]: https://github.com/sass/sass/issues/1496
[issue 1525]: https://github.com/sass/sass/issues/1525
[issue 1408]: https://github.com/sass/sass/issues/1408
[issue 1050]: https://github.com/sass/sass/issues/1050
[issue 2228]: https://github.com/sass/sass/issues/2228
[issue 2245]: https://github.com/sass/sass/issues/2245
[issue 303]: https://github.com/sass/sass/issues/303
[issue 2247]: https://github.com/sass/sass/issues/2247
[issue 2250]: https://github.com/sass/sass/issues/2250
[dart-lang/sdk#11744]: https://github.com/dart-lang/sdk/issues/11744
Disclaimer: this is not an official Google product.

View File

@@ -0,0 +1,18 @@
/**
* @license lucide-react v0.441.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 Library = createLucideIcon("Library", [
["path", { d: "m16 6 4 14", key: "ji33uf" }],
["path", { d: "M12 6v14", key: "1n7gus" }],
["path", { d: "M8 8v12", key: "1gg7y9" }],
["path", { d: "M4 4v16", key: "6qkkli" }]
]);
export { Library as default };
//# sourceMappingURL=library.js.map

Some files were not shown because too many files have changed in this diff Show More