fix(products): fix breadcrumbs and product filtering (backport from main)
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
@@ -0,0 +1,202 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const core = require('@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>' ? core.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, core.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] || core.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] || core.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] || core.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] || core.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] || core.UNKNOWN_FUNCTION, +parts[1], +parts[2]) : undefined;
};
const opera11StackLineParser = [OPERA11_PRIORITY, opera11];
const defaultStackLineParsers = [chromeStackLineParser, geckoStackLineParser];
const defaultStackParser = core.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] ) : core.UNKNOWN_FUNCTION,
isSafariExtension ? `safari-extension:${filename}` : `safari-web-extension:${filename}`,
]
: [func, filename];
};
exports.chromeStackLineParser = chromeStackLineParser;
exports.defaultStackLineParsers = defaultStackLineParsers;
exports.defaultStackParser = defaultStackParser;
exports.geckoStackLineParser = geckoStackLineParser;
exports.opera10StackLineParser = opera10StackLineParser;
exports.opera11StackLineParser = opera11StackLineParser;
exports.winjsStackLineParser = winjsStackLineParser;
//# sourceMappingURL=stack-parsers.js.map
@@ -0,0 +1,21 @@
import * as React from 'react';
import './index.scss';
export type ShimmerEffectProps = {
readonly animationDelay?: string;
readonly className?: string;
readonly disableInlineStyles?: boolean;
readonly height?: number | string;
readonly width?: number | string;
};
export declare const ShimmerEffect: React.FC<ShimmerEffectProps>;
export type StaggeredShimmersProps = {
className?: string;
count: number;
height?: number | string;
renderDelay?: number;
shimmerDelay?: number | string;
shimmerItemClassName?: string;
width?: number | string;
};
export declare const StaggeredShimmers: React.FC<StaggeredShimmersProps>;
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,10 @@
"use strict";
exports.formatRFC7231 = void 0;
var _index = require("../formatRFC7231.js");
var _index2 = require("./_lib/convertToFP.js"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
const formatRFC7231 = (exports.formatRFC7231 = (0, _index2.convertToFP)(
_index.formatRFC7231,
1,
));
@@ -0,0 +1,29 @@
"use strict";
exports.getYear = getYear;
var _index = require("./toDate.cjs");
/**
* The {@link getYear} function options.
*/
/**
* @name getYear
* @category Year Helpers
* @summary Get the year of the given date.
*
* @description
* Get the year of the given date.
*
* @param date - The given date
* @param options - An object with options
*
* @returns The year
*
* @example
* // Which year is 2 July 2014?
* const result = getYear(new Date(2014, 6, 2))
* //=> 2014
*/
function getYear(date, options) {
return (0, _index.toDate)(date, options?.in).getFullYear();
}
@@ -0,0 +1,346 @@
#!/usr/bin/env node
import { foregroundChild } from 'foreground-child';
import { existsSync } from 'fs';
import { jack } from 'jackspeak';
import { loadPackageJson } from 'package-json-from-dist';
import { basename, join } from 'path';
import { globStream } from './index.js';
const { version } = loadPackageJson(import.meta.url, '../package.json');
const j = jack({
usage: 'glob [options] [<pattern> [<pattern> ...]]',
})
.description(`
Glob v${version}
Expand the positional glob expression arguments into any matching file
system paths found.
`)
.opt({
cmd: {
short: 'c',
hint: 'command',
description: `Run the command provided, passing the glob expression
matches as arguments.`,
},
})
.opt({
default: {
short: 'p',
hint: 'pattern',
description: `If no positional arguments are provided, glob will use
this pattern`,
},
})
.flag({
shell: {
default: false,
description: `Interpret the command as a shell command by passing it
to the shell, with all matched filesystem paths appended,
**even if this cannot be done safely**.
This is **not** unsafe (and usually unnecessary) when using
the known Unix shells sh, bash, zsh, and fish, as these can
all be executed in such a way as to pass positional
arguments safely.
**Note**: THIS IS UNSAFE IF THE FILE PATHS ARE UNTRUSTED,
because a path like \`'some/path/\\$\\(cmd)'\` will be
executed by the shell.
If you do have positional arguments that you wish to pass to
the command ahead of the glob pattern matches, use the
\`--cmd-arg\`/\`-g\` option instead.
The next major release of glob will fully remove the ability
to use this option unsafely.`,
},
})
.optList({
'cmd-arg': {
short: 'g',
hint: 'arg',
default: [],
description: `Pass the provided values to the supplied command, ahead of
the glob matches.
For example, the command:
glob -c echo -g"hello" -g"world" *.txt
might output:
hello world a.txt b.txt
This is a safer (and future-proof) alternative than putting
positional arguments in the \`-c\`/\`--cmd\` option.`,
},
})
.flag({
all: {
short: 'A',
description: `By default, the glob cli command will not expand any
arguments that are an exact match to a file on disk.
This prevents double-expanding, in case the shell expands
an argument whose filename is a glob expression.
For example, if 'app/*.ts' would match 'app/[id].ts', then
on Windows powershell or cmd.exe, 'glob app/*.ts' will
expand to 'app/[id].ts', as expected. However, in posix
shells such as bash or zsh, the shell will first expand
'app/*.ts' to a list of filenames. Then glob will look
for a file matching 'app/[id].ts' (ie, 'app/i.ts' or
'app/d.ts'), which is unexpected.
Setting '--all' prevents this behavior, causing glob
to treat ALL patterns as glob expressions to be expanded,
even if they are an exact match to a file on disk.
When setting this option, be sure to enquote arguments
so that the shell will not expand them prior to passing
them to the glob command process.
`,
},
absolute: {
short: 'a',
description: 'Expand to absolute paths',
},
'dot-relative': {
short: 'd',
description: `Prepend './' on relative matches`,
},
mark: {
short: 'm',
description: `Append a / on any directories matched`,
},
posix: {
short: 'x',
description: `Always resolve to posix style paths, using '/' as the
directory separator, even on Windows. Drive letter
absolute matches on Windows will be expanded to their
full resolved UNC paths, eg instead of 'C:\\foo\\bar',
it will expand to '//?/C:/foo/bar'.
`,
},
follow: {
short: 'f',
description: `Follow symlinked directories when expanding '**'`,
},
realpath: {
short: 'R',
description: `Call 'fs.realpath' on all of the results. In the case
of an entry that cannot be resolved, the entry is
omitted. This incurs a slight performance penalty, of
course, because of the added system calls.`,
},
stat: {
short: 's',
description: `Call 'fs.lstat' on all entries, whether required or not
to determine if it's a valid match.`,
},
'match-base': {
short: 'b',
description: `Perform a basename-only match if the pattern does not
contain any slash characters. That is, '*.js' would be
treated as equivalent to '**/*.js', matching js files
in all directories.
`,
},
dot: {
description: `Allow patterns to match files/directories that start
with '.', even if the pattern does not start with '.'
`,
},
nobrace: {
description: 'Do not expand {...} patterns',
},
nocase: {
description: `Perform a case-insensitive match. This defaults to
'true' on macOS and Windows platforms, and false on
all others.
Note: 'nocase' should only be explicitly set when it is
known that the filesystem's case sensitivity differs
from the platform default. If set 'true' on
case-insensitive file systems, then the walk may return
more or less results than expected.
`,
},
nodir: {
description: `Do not match directories, only files.
Note: to *only* match directories, append a '/' at the
end of the pattern.
`,
},
noext: {
description: `Do not expand extglob patterns, such as '+(a|b)'`,
},
noglobstar: {
description: `Do not expand '**' against multiple path portions.
Ie, treat it as a normal '*' instead.`,
},
'windows-path-no-escape': {
description: `Use '\\' as a path separator *only*, and *never* as an
escape character. If set, all '\\' characters are
replaced with '/' in the pattern.`,
},
})
.num({
'max-depth': {
short: 'D',
description: `Maximum depth to traverse from the current
working directory`,
},
})
.opt({
cwd: {
short: 'C',
description: 'Current working directory to execute/match in',
default: process.cwd(),
},
root: {
short: 'r',
description: `A string path resolved against the 'cwd', which is
used as the starting point for absolute patterns that
start with '/' (but not drive letters or UNC paths
on Windows).
Note that this *doesn't* necessarily limit the walk to
the 'root' directory, and doesn't affect the cwd
starting point for non-absolute patterns. A pattern
containing '..' will still be able to traverse out of
the root directory, if it is not an actual root directory
on the filesystem, and any non-absolute patterns will
still be matched in the 'cwd'.
To start absolute and non-absolute patterns in the same
path, you can use '--root=' to set it to the empty
string. However, be aware that on Windows systems, a
pattern like 'x:/*' or '//host/share/*' will *always*
start in the 'x:/' or '//host/share/' directory,
regardless of the --root setting.
`,
},
platform: {
description: `Defaults to the value of 'process.platform' if
available, or 'linux' if not. Setting --platform=win32
on non-Windows systems may cause strange behavior!`,
validOptions: [
'aix',
'android',
'darwin',
'freebsd',
'haiku',
'linux',
'openbsd',
'sunos',
'win32',
'cygwin',
'netbsd',
],
},
})
.optList({
ignore: {
short: 'i',
description: `Glob patterns to ignore`,
},
})
.flag({
debug: {
short: 'v',
description: `Output a huge amount of noisy debug information about
patterns as they are parsed and used to match files.`,
},
version: {
short: 'V',
description: `Output the version (${version})`,
},
help: {
short: 'h',
description: 'Show this usage information',
},
});
try {
const { positionals, values } = j.parse();
const { cmd, shell, all, default: def, version: showVersion, help, absolute, cwd, dot, 'dot-relative': dotRelative, follow, ignore, 'match-base': matchBase, 'max-depth': maxDepth, mark, nobrace, nocase, nodir, noext, noglobstar, platform, realpath, root, stat, debug, posix, 'cmd-arg': cmdArg, } = values;
if (showVersion) {
console.log(version);
process.exit(0);
}
if (help) {
console.log(j.usage());
process.exit(0);
}
//const { shell, help } = values
if (positionals.length === 0 && !def)
throw 'No patterns provided';
if (positionals.length === 0 && def)
positionals.push(def);
const patterns = all ? positionals : positionals.filter(p => !existsSync(p));
const matches = all ? [] : positionals.filter(p => existsSync(p)).map(p => join(p));
const stream = globStream(patterns, {
absolute,
cwd,
dot,
dotRelative,
follow,
ignore,
mark,
matchBase,
maxDepth,
nobrace,
nocase,
nodir,
noext,
noglobstar,
platform: platform,
realpath,
root,
stat,
debug,
posix,
});
if (!cmd) {
matches.forEach(m => console.log(m));
stream.on('data', f => console.log(f));
}
else {
cmdArg.push(...matches);
stream.on('data', f => cmdArg.push(f));
// Attempt to support commands that contain spaces and otherwise require
// shell interpretation, but do NOT shell-interpret the arguments, to avoid
// injections via filenames. This affordance can only be done on known Unix
// shells, unfortunately.
//
// 'bash', ['-c', cmd + ' "$@"', 'bash', ...matches]
// 'zsh', ['-c', cmd + ' "$@"', 'zsh', ...matches]
// 'fish', ['-c', cmd + ' "$argv"', ...matches]
const { SHELL = 'unknown' } = process.env;
const shellBase = basename(SHELL);
const knownShells = ['sh', 'ksh', 'zsh', 'bash', 'fish'];
if ((shell || /[ "']/.test(cmd)) &&
knownShells.includes(shellBase)) {
const cmdWithArgs = `${cmd} "\$${shellBase === 'fish' ? 'argv' : '@'}"`;
if (shellBase !== 'fish') {
cmdArg.unshift(SHELL);
}
cmdArg.unshift('-c', cmdWithArgs);
stream.on('end', () => foregroundChild(SHELL, cmdArg));
}
else {
if (shell) {
process.emitWarning('The --shell option is unsafe, and will be removed. To pass ' +
'positional arguments to the subprocess, use -g/--cmd-arg instead.', 'DeprecationWarning', 'GLOB_SHELL');
}
stream.on('end', () => foregroundChild(cmd, cmdArg, { shell }));
}
}
}
catch (e) {
console.error(j.usage());
console.error(e instanceof Error ? e.message : String(e));
process.exit(1);
}
//# sourceMappingURL=bin.mjs.map
@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["c","_c","getTranslation","useTranslation","React","useSelectedLocales","DiffCollapser","RenderVersionFieldsToDiff","baseClass","Collapsible","t0","$","baseVersionField","comparisonValue","valueFrom","field","parentIsLocalized","versionValue","valueTo","i18n","selectedLocales","fields","length","t1","_jsx","className","children","Label","label","localized","versionFields"],"sources":["../../../../../../src/views/Version/RenderFieldsToDiff/fields/Collapsible/index.tsx"],"sourcesContent":["'use client'\nimport type { CollapsibleFieldDiffClientComponent } from 'payload'\n\nimport { getTranslation } from '@payloadcms/translations'\nimport { useTranslation } from '@payloadcms/ui'\nimport React from 'react'\n\nimport { useSelectedLocales } from '../../../Default/SelectedLocalesContext.js'\nimport { DiffCollapser } from '../../DiffCollapser/index.js'\nimport { RenderVersionFieldsToDiff } from '../../RenderVersionFieldsToDiff.js'\n\nconst baseClass = 'collapsible-diff'\n\nexport const Collapsible: CollapsibleFieldDiffClientComponent = ({\n baseVersionField,\n comparisonValue: valueFrom,\n field,\n parentIsLocalized,\n versionValue: valueTo,\n}) => {\n const { i18n } = useTranslation()\n const { selectedLocales } = useSelectedLocales()\n\n if (!baseVersionField.fields?.length) {\n return null\n }\n\n return (\n <div className={baseClass}>\n <DiffCollapser\n fields={field.fields}\n Label={\n 'label' in field &&\n field.label &&\n typeof field.label !== 'function' && <span>{getTranslation(field.label, i18n)}</span>\n }\n locales={selectedLocales}\n parentIsLocalized={parentIsLocalized || field.localized}\n valueFrom={valueFrom}\n valueTo={valueTo}\n >\n <RenderVersionFieldsToDiff versionFields={baseVersionField.fields} />\n </DiffCollapser>\n </div>\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAGA,SAASC,cAAc,QAAQ;AAC/B,SAASC,cAAc,QAAQ;AAC/B,OAAOC,KAAA,MAAW;AAElB,SAASC,kBAAkB,QAAQ;AACnC,SAASC,aAAa,QAAQ;AAC9B,SAASC,yBAAyB,QAAQ;AAE1C,MAAMC,SAAA,GAAY;AAElB,OAAO,MAAMC,WAAA,GAAmDC,EAAA;EAAA,MAAAC,CAAA,GAAAV,EAAA;EAAC;IAAAW,gBAAA;IAAAC,eAAA,EAAAC,SAAA;IAAAC,KAAA;IAAAC,iBAAA;IAAAC,YAAA,EAAAC;EAAA,IAAAR,EAMhE;EACC;IAAAS;EAAA,IAAiBhB,cAAA;EACjB;IAAAiB;EAAA,IAA4Bf,kBAAA;EAAA,KAEvBO,gBAAA,CAAAS,MAAA,EAAAC,MAAA;IAAA;EAAA;EAAA,IAAAC,EAAA;EAAA,IAAAZ,CAAA,QAAAC,gBAAA,CAAAS,MAAA,IAAAV,CAAA,QAAAI,KAAA,IAAAJ,CAAA,QAAAQ,IAAA,IAAAR,CAAA,QAAAK,iBAAA,IAAAL,CAAA,QAAAS,eAAA,IAAAT,CAAA,QAAAG,SAAA,IAAAH,CAAA,QAAAO,OAAA;IAKHK,EAAA,GAAAC,IAAA,CAAC;MAAAC,SAAA,EAAAjB,SAAA;MAAAkB,QAAA,EACCF,IAAA,CAAAlB,aAAA;QAAAe,MAAA,EACUN,KAAA,CAAAM,MAAA;QAAAM,KAAA,EAEN,WAAWZ,KAAA,IACXA,KAAA,CAAAa,KAAW,IACX,OAAOb,KAAA,CAAAa,KAAA,KAAgB,cAAcJ,IAAA,CAAC;UAAAE,QAAA,EAAMxB,cAAA,CAAea,KAAA,CAAAa,KAAA,EAAaT,IAAA;QAAA,C;iBAEjEC,eAAA;QAAAJ,iBAAA,EACUA,iBAAA,IAAqBD,KAAA,CAAAc,SAAe;QAAAf,SAAA;QAAAI,OAAA;QAAAQ,QAAA,EAIvDF,IAAA,CAAAjB,yBAAA;UAAAuB,aAAA,EAA0ClB,gBAAA,CAAAS;QAAA,C;;;;;;;;;;;;;;SAb9CE,E;CAiBJ","ignoreList":[]}
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fields/FieldLabel/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAGhD,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,OAAO,cAAc,CAAA;AAErB,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAsClD,CAAA"}
@@ -0,0 +1,8 @@
import type { PayloadRequest } from '../types/index.js';
type AddDataAndFileToRequest = (req: PayloadRequest) => Promise<void>;
/**
* Mutates the Request, appending 'data' and 'file' if found
*/
export declare const addDataAndFileToRequest: AddDataAndFileToRequest;
export {};
//# sourceMappingURL=addDataAndFileToRequest.d.ts.map
@@ -0,0 +1,9 @@
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
import { isEqual as fn } from "../isEqual.js";
import { convertToFP } from "./_lib/convertToFP.js";
export const isEqual = convertToFP(fn, 2);
// Fallback for modularized imports:
export default isEqual;
@@ -0,0 +1,113 @@
import { LANGCHAIN_INTEGRATION_NAME, defineIntegration } from '@sentry/core';
import { generateInstrumentOnce } from '@sentry/node-core';
import { SentryLangChainInstrumentation } from './instrumentation.js';
const instrumentLangChain = generateInstrumentOnce(
LANGCHAIN_INTEGRATION_NAME,
options => new SentryLangChainInstrumentation(options),
);
const _langChainIntegration = ((options = {}) => {
return {
name: LANGCHAIN_INTEGRATION_NAME,
setupOnce() {
instrumentLangChain(options);
},
};
}) ;
/**
* Adds Sentry tracing instrumentation for LangChain.
*
* This integration is enabled by default.
*
* When configured, this integration automatically instruments LangChain runnable instances
* to capture telemetry data by injecting Sentry callback handlers into all LangChain calls.
*
* **Important:** This integration automatically skips wrapping the OpenAI, Anthropic, and Google GenAI
* providers to prevent duplicate spans when using LangChain with these AI providers.
* LangChain handles the instrumentation for all underlying AI providers.
*
* @example
* ```javascript
* import * as Sentry from '@sentry/node';
* import { ChatOpenAI } from '@langchain/openai';
*
* Sentry.init({
* integrations: [Sentry.langChainIntegration()],
* sendDefaultPii: true, // Enable to record inputs/outputs
* });
*
* // LangChain calls are automatically instrumented
* const model = new ChatOpenAI();
* await model.invoke("What is the capital of France?");
* ```
*
* ## Manual Callback Handler
*
* You can also manually add the Sentry callback handler alongside other callbacks:
*
* @example
* ```javascript
* import * as Sentry from '@sentry/node';
* import { ChatOpenAI } from '@langchain/openai';
*
* const sentryHandler = Sentry.createLangChainCallbackHandler({
* recordInputs: true,
* recordOutputs: true
* });
*
* const model = new ChatOpenAI();
* await model.invoke(
* "What is the capital of France?",
* { callbacks: [sentryHandler, myOtherCallback] }
* );
* ```
*
* ## Options
*
* - `recordInputs`: Whether to record input messages/prompts (default: respects `sendDefaultPii` client option)
* - `recordOutputs`: Whether to record response text (default: respects `sendDefaultPii` client option)
*
* ### Default Behavior
*
* By default, the integration will:
* - Record inputs and outputs ONLY if `sendDefaultPii` is set to `true` in your Sentry client options
* - Otherwise, inputs and outputs are NOT recorded unless explicitly enabled
*
* @example
* ```javascript
* // Record inputs and outputs when sendDefaultPii is false
* Sentry.init({
* integrations: [
* Sentry.langChainIntegration({
* recordInputs: true,
* recordOutputs: true
* })
* ],
* });
*
* // Never record inputs/outputs regardless of sendDefaultPii
* Sentry.init({
* sendDefaultPii: true,
* integrations: [
* Sentry.langChainIntegration({
* recordInputs: false,
* recordOutputs: false
* })
* ],
* });
* ```
*
* ## Supported Events
*
* The integration captures the following LangChain lifecycle events:
* - LLM/Chat Model: start, end, error
* - Chain: start, end, error
* - Tool: start, end, error
*
*/
const langChainIntegration = defineIntegration(_langChainIntegration);
export { instrumentLangChain, langChainIntegration };
//# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
"use strict";
exports.setYear = void 0;
var _index = require("../setYear.cjs");
var _index2 = require("./_lib/convertToFP.cjs"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
const setYear = (exports.setYear = (0, _index2.convertToFP)(_index.setYear, 2));
@@ -0,0 +1,11 @@
import { _ as _get_prototype_of } from "./_get_prototype_of.js";
function _super_prop_base(object, property) {
while (!Object.prototype.hasOwnProperty.call(object, property)) {
object = _get_prototype_of(object);
if (object === null) break;
}
return object;
}
export { _super_prop_base as _ };
@@ -0,0 +1,40 @@
pre[class*="language-"].line-numbers {
position: relative;
padding-left: 3.8em;
counter-reset: linenumber;
}
pre[class*="language-"].line-numbers > code {
position: relative;
white-space: inherit;
}
.line-numbers .line-numbers-rows {
position: absolute;
pointer-events: none;
top: 0;
font-size: 100%;
left: -3.8em;
width: 3em; /* works for line-numbers below 1000 lines */
letter-spacing: -1px;
border-right: 1px solid #999;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.line-numbers-rows > span {
display: block;
counter-increment: linenumber;
}
.line-numbers-rows > span:before {
content: counter(linenumber);
color: #999;
display: block;
padding-right: 0.8em;
text-align: right;
}
@@ -0,0 +1,30 @@
import type {CodeKeywordDefinition, KeywordErrorDefinition} from "../../types"
import type {KeywordCxt} from "../../compile/validate"
import {_, str, operators} from "../../compile/codegen"
import {useFunc} from "../../compile/util"
import ucs2length from "../../runtime/ucs2length"
const error: KeywordErrorDefinition = {
message({keyword, schemaCode}) {
const comp = keyword === "maxLength" ? "more" : "fewer"
return str`must NOT have ${comp} than ${schemaCode} characters`
},
params: ({schemaCode}) => _`{limit: ${schemaCode}}`,
}
const def: CodeKeywordDefinition = {
keyword: ["maxLength", "minLength"],
type: "string",
schemaType: "number",
$data: true,
error,
code(cxt: KeywordCxt) {
const {keyword, data, schemaCode, it} = cxt
const op = keyword === "maxLength" ? operators.GT : operators.LT
const len =
it.opts.unicode === false ? _`${data}.length` : _`${useFunc(cxt.gen, ucs2length)}(${data})`
cxt.fail$data(_`${len} ${op} ${schemaCode}`)
},
}
export default def
@@ -0,0 +1,40 @@
# Bundling
Due to its internal architecture based on Worker Threads, it is not possible to bundle Pino *without* generating additional files.
In particular, a bundler must ensure that the following files are also bundled separately:
* `lib/worker.js` from the `thread-stream` dependency
* `file.js`
* `lib/worker.js`
* Any transport used by the user (like `pino-pretty`)
Once the files above have been generated, the bundler must also add information about the files above by injecting a code that sets `__bundlerPathsOverrides` in the `globalThis` object.
The variable is an object whose keys are an identifier for the files and the values are the paths of files relative to the currently bundle files.
Example:
```javascript
// Inject this using your bundle plugin
globalThis.__bundlerPathsOverrides = {
'thread-stream-worker': pinoWebpackAbsolutePath('./thread-stream-worker.js')
'pino/file': pinoWebpackAbsolutePath('./pino-file.js'),
'pino-worker': pinoWebpackAbsolutePath('./pino-worker.js'),
'pino-pretty': pinoWebpackAbsolutePath('./pino-pretty.js'),
};
```
Note that `pino/file`, `pino-worker` and `thread-stream-worker` are required identifiers. Other identifiers are possible based on the user configuration.
## Webpack Plugin
If you are a Webpack user, you can achieve this with [pino-webpack-plugin](https://github.com/pinojs/pino-webpack-plugin) without manual configuration of `__bundlerPathsOverrides`; however, you still need to configure it manually if you are using other bundlers.
## Esbuild Plugin
[esbuild-plugin-pino](https://github.com/davipon/esbuild-plugin-pino) is the esbuild plugin to generate extra pino files for bundling.
## Bun Plugin
[bun-plugin-pino](https://github.com/vktrl/bun-plugin-pino) is the Bun plugin to generate extra pino files for bundling.
@@ -0,0 +1,166 @@
import { Ono } from "@jsdevtools/ono";
import { getHash, stripHash, toFileSystemPath } from "./url.js";
import type $RefParser from "../index.js";
import type { ParserOptions } from "../index.js";
import type { JSONSchema } from "../index.js";
import type $Ref from "../ref";
export type JSONParserErrorType =
| "EUNKNOWN"
| "EPARSER"
| "EUNMATCHEDPARSER"
| "ETIMEOUT"
| "ERESOLVER"
| "EUNMATCHEDRESOLVER"
| "EMISSINGPOINTER"
| "EINVALIDPOINTER";
export class JSONParserError extends Error {
public readonly name: string;
public readonly message: string;
public source: string | undefined;
public path: Array<string | number> | null;
public readonly code: JSONParserErrorType;
public constructor(message: string, source?: string) {
super();
this.code = "EUNKNOWN";
this.name = "JSONParserError";
this.message = message;
this.source = source;
this.path = null;
Ono.extend(this);
}
get footprint() {
return `${this.path}+${this.source}+${this.code}+${this.message}`;
}
}
export class JSONParserErrorGroup<
S extends object = JSONSchema,
O extends ParserOptions<S> = ParserOptions<S>,
> extends Error {
files: $RefParser<S, O>;
constructor(parser: $RefParser<S, O>) {
super();
this.files = parser;
this.name = "JSONParserErrorGroup";
this.message = `${this.errors.length} error${
this.errors.length > 1 ? "s" : ""
} occurred while reading '${toFileSystemPath(parser.$refs._root$Ref!.path)}'`;
Ono.extend(this);
}
static getParserErrors<S extends object = JSONSchema, O extends ParserOptions<S> = ParserOptions<S>>(
parser: $RefParser<S, O>,
) {
const errors = [];
for (const $ref of Object.values(parser.$refs._$refs) as $Ref<S, O>[]) {
if ($ref.errors) {
errors.push(...$ref.errors);
}
}
return errors;
}
get errors(): Array<
| JSONParserError
| InvalidPointerError
| ResolverError
| ParserError
| MissingPointerError
| UnmatchedParserError
| UnmatchedResolverError
> {
return JSONParserErrorGroup.getParserErrors<S, O>(this.files);
}
}
export class ParserError extends JSONParserError {
code = "EPARSER" as JSONParserErrorType;
name = "ParserError";
constructor(message: any, source: any) {
super(`Error parsing ${source}: ${message}`, source);
}
}
export class UnmatchedParserError extends JSONParserError {
code = "EUNMATCHEDPARSER" as JSONParserErrorType;
name = "UnmatchedParserError";
constructor(source: string) {
super(`Could not find parser for "${source}"`, source);
}
}
export class ResolverError extends JSONParserError {
code = "ERESOLVER" as JSONParserErrorType;
name = "ResolverError";
ioErrorCode?: string;
constructor(ex: Error | any, source?: string) {
super(ex.message || `Error reading file "${source}"`, source);
if ("code" in ex) {
this.ioErrorCode = String(ex.code);
}
}
}
export class UnmatchedResolverError extends JSONParserError {
code = "EUNMATCHEDRESOLVER" as JSONParserErrorType;
name = "UnmatchedResolverError";
constructor(source: any) {
super(`Could not find resolver for "${source}"`, source);
}
}
export class MissingPointerError extends JSONParserError {
code = "EMISSINGPOINTER" as JSONParserErrorType;
name = "MissingPointerError";
public targetToken: any;
public targetRef: string;
public targetFound: string;
public parentPath: string;
constructor(token: any, path: any, targetRef: any, targetFound: any, parentPath: any) {
super(`Missing $ref pointer "${getHash(path)}". Token "${token}" does not exist.`, stripHash(path));
this.targetToken = token;
this.targetRef = targetRef;
this.targetFound = targetFound;
this.parentPath = parentPath;
}
}
export class TimeoutError extends JSONParserError {
code = "ETIMEOUT" as JSONParserErrorType;
name = "TimeoutError";
constructor(timeout: number) {
super(`Dereferencing timeout reached: ${timeout}ms`);
}
}
export class InvalidPointerError extends JSONParserError {
code = "EUNMATCHEDRESOLVER" as JSONParserErrorType;
name = "InvalidPointerError";
constructor(pointer: string, path: string) {
super(`Invalid $ref pointer "${pointer}". Pointers must begin with "#/"`, stripHash(path));
}
}
export function isHandledError(err: any): err is JSONParserError {
return err instanceof JSONParserError || err instanceof JSONParserErrorGroup;
}
export function normalizeError(err: any) {
if (err.path === null) {
err.path = [];
}
return err;
}
@@ -0,0 +1,12 @@
export { getLabelFromPath } from './label'
export { getSourceMap } from './source-maps'
export { getTargetClassName } from './get-target-class-name'
export { simplifyObject } from './object-to-string'
export { transformExpressionWithStyles } from './transform-expression-with-styles'
export { getStyledOptions } from './get-styled-options'
export {
appendStringReturningExpressionToArguments,
joinStringLiterals
} from './strings'
export { addImport } from './add-import'
export { createTransformerMacro } from './transformer-macro'
@@ -0,0 +1,33 @@
import { CursorOptions, CursorResult, Options, SupportInfo } from "./index.js";
/**
* formatWithCursor both formats the code, and translates a cursor position from unformatted code to formatted code.
* This is useful for editor integrations, to prevent the cursor from moving when code is formatted
*
* The cursorOffset option should be provided, to specify where the cursor is.
*
* ```js
* await prettier.formatWithCursor(" 1", { cursorOffset: 2, parser: "babel" });
* ```
* `-> { formatted: "1;\n", cursorOffset: 1 }`
*/
export function formatWithCursor(
source: string,
options: CursorOptions,
): Promise<CursorResult>;
/**
* `format` is used to format text using Prettier. [Options](https://prettier.io/docs/en/options.html) may be provided to override the defaults.
*/
export function format(source: string, options?: Options): Promise<string>;
/**
* `check` checks to see if the file has been formatted with Prettier given those options and returns a `Boolean`.
* This is similar to the `--list-different` parameter in the CLI and is useful for running Prettier in CI scenarios.
*/
export function check(source: string, options?: Options): Promise<boolean>;
/**
* Returns an object representing the parsers, languages and file types Prettier supports for the current version.
*/
export function getSupportInfo(): Promise<SupportInfo>;
@@ -0,0 +1,139 @@
# OpenTelemetry ioredis Instrumentation for Node.js
[![NPM Published Version][npm-img]][npm-url]
[![Apache License][license-image]][license-image]
This module provides automatic instrumentation for the [`ioredis`](https://github.com/luin/ioredis) module, which may be loaded using the [`@opentelemetry/sdk-trace-node`](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-node) package and is included in the [`@opentelemetry/auto-instrumentations-node`](https://www.npmjs.com/package/@opentelemetry/auto-instrumentations-node) bundle.
If total installation size is not constrained, it is recommended to use the [`@opentelemetry/auto-instrumentations-node`](https://www.npmjs.com/package/@opentelemetry/auto-instrumentations-node) bundle with [@opentelemetry/sdk-node](`https://www.npmjs.com/package/@opentelemetry/sdk-node`) for the most seamless instrumentation experience.
Compatible with OpenTelemetry JS API and SDK `1.0+`.
## Installation
```sh
npm install --save @opentelemetry/instrumentation-ioredis
```
### Supported Versions
- [`ioredis`](https://www.npmjs.com/package/ioredis) versions `>=2.0.0 <6`
## Usage
To load a specific instrumentation (**ioredis** in this case), specify it in the registerInstrumentations's configuration
```javascript
const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node');
const {
IORedisInstrumentation,
} = require('@opentelemetry/instrumentation-ioredis');
const { registerInstrumentations } = require('@opentelemetry/instrumentation');
const provider = new NodeTracerProvider();
provider.register();
registerInstrumentations({
instrumentations: [
new IORedisInstrumentation({
// see under for available configuration
}),
],
});
```
### IORedis Instrumentation Options
IORedis instrumentation has few options available to choose from. You can set the following:
| Options | Type | Description |
| ----------------------- | ------------------------------------------------- | ----------- |
| `dbStatementSerializer` | `DbStatementSerializer` | IORedis instrumentation will serialize db.statement using the specified function. |
| `requestHook` | `RedisRequestCustomAttributeFunction` (function) | Function for adding custom attributes on db request. Receives params: `span, { moduleVersion, cmdName, cmdArgs }` |
| `responseHook` | `RedisResponseCustomAttributeFunction` (function) | Function for adding custom attributes on db response |
| `requireParentSpan` | `boolean` | Require parent to create ioredis span, default when unset is true |
#### Custom db.statement Serializer
The instrumentation serializes the command into a Span attribute called `db.statement`. The standard serialization format attempts to be as informative
as possible while avoiding the export of potentially sensitive data. The number of serialized arguments depends on the specific command, see the configuration
list in `@opentelemetry/redis-common`.
It is also possible to define a custom serialization function. The function will receive the command name and arguments and must return a string.
Here is a simple example to serialize the command name skipping arguments:
```javascript
const { IORedisInstrumentation } = require('@opentelemetry/instrumentation-ioredis');
const ioredisInstrumentation = new IORedisInstrumentation({
dbStatementSerializer: function (cmdName, cmdArgs) {
return cmdName;
},
});
```
#### Using `requestHook`
Instrumentation user can configure a custom "hook" function which will be called on every request with the relevant span and request information. User can then set custom attributes on the span or run any instrumentation-extension logic per request.
Here is a simple example that adds a span attribute of `ioredis` instrumented version on each request:
```javascript
const { IORedisInstrumentation } = require('@opentelemetry/instrumentation-ioredis');
const ioredisInstrumentation = new IORedisInstrumentation({
requestHook: function (
span: Span,
requestInfo: IORedisRequestHookInformation
) {
if (requestInfo.moduleVersion) {
span.setAttribute(
'instrumented_library.version',
requestInfo.moduleVersion
);
}
}
});
```
## Semantic Conventions
This instrumentation implements Semantic Conventions (semconv) v1.7.0. Since then, networking (in semconv v1.23.1) and database (in semconv v1.33.0) semantic conventions were stabilized. As of `@opentelemetry/instrumentation-ioredis@0.57.0` support has been added for migrating to the stable semantic conventions using the `OTEL_SEMCONV_STABILITY_OPT_IN` environment variable as follows:
1. Upgrade to the latest version of this instrumentation package.
2. Set `OTEL_SEMCONV_STABILITY_OPT_IN=http/dup,database/dup` to emit both old and stable semantic conventions. (The `http` token is used to control the `net.*` attributes, the `database` token to control to `db.*` attributes.)
3. Modify alerts, dashboards, metrics, and other processes in your Observability system to use the stable semantic conventions.
4. Set `OTEL_SEMCONV_STABILITY_OPT_IN=http,database` to emit only the stable semantic conventions.
By default, if `OTEL_SEMCONV_STABILITY_OPT_IN` includes neither of the above tokens, the old v1.7.0 semconv is used.
The intent is to provide an approximate 6 month time window for users of this instrumentation to migrate to the new database and networking semconv, after which a new minor version will use the new semconv by default and drop support for the old semconv.
See [the HTTP migration guide](https://opentelemetry.io/docs/specs/semconv/non-normative/http-migration/) and the [database migration guide](https://opentelemetry.io/docs/specs/semconv/non-normative/db-migration/) for details.
Attributes collected:
| Old semconv | Stable semconv | Description |
| ---------------------- | ---------------- | ----------- |
| `db.connection_string` | Removed | |
| `db.system` | `db.system.name` | 'redis' |
| `db.statement` | `db.query.text` | The database query being executed. |
| `net.peer.port` | `server.port` | Remote port number. |
| `net.peer.name` | `server.address` | Remote hostname or similar. |
## Useful links
- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>
- For more about OpenTelemetry JavaScript: <https://github.com/open-telemetry/opentelemetry-js>
- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]
## License
Apache 2.0 - See [LICENSE][license-url] for more information.
[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions
[license-url]: https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/LICENSE
[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat
[npm-url]: https://www.npmjs.com/package/@opentelemetry/instrumentation-ioredis
[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Finstrumentation-ioredis.svg
@@ -0,0 +1,11 @@
/**
* 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.
*
*/
'use strict'
const LexicalCode = process.env.NODE_ENV !== 'production' ? require('./LexicalCode.dev.js') : require('./LexicalCode.prod.js');
module.exports = LexicalCode;
@@ -0,0 +1,16 @@
import type { EvaluationDetails, HookContext, HookHints, JsonValue, OpenFeatureHook } from './types';
export declare const openFeatureIntegration: () => import("@sentry/core").Integration;
/**
* OpenFeature Hook class implementation.
*/
export declare class OpenFeatureIntegrationHook implements OpenFeatureHook {
/**
* Successful evaluation result.
*/
after(_hookContext: Readonly<HookContext<JsonValue>>, evaluationDetails: EvaluationDetails<JsonValue>): void;
/**
* On error evaluation result.
*/
error(hookContext: Readonly<HookContext<JsonValue>>, _error: unknown, _hookHints?: HookHints): void;
}
//# sourceMappingURL=integration.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"cloud-snow.js","sources":["../../../src/icons/cloud-snow.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name CloudSnow\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNCAxNC44OTlBNyA3IDAgMSAxIDE1LjcxIDhoMS43OWE0LjUgNC41IDAgMCAxIDIuNSA4LjI0MiIgLz4KICA8cGF0aCBkPSJNOCAxNWguMDEiIC8+CiAgPHBhdGggZD0iTTggMTloLjAxIiAvPgogIDxwYXRoIGQ9Ik0xMiAxN2guMDEiIC8+CiAgPHBhdGggZD0iTTEyIDIxaC4wMSIgLz4KICA8cGF0aCBkPSJNMTYgMTVoLjAxIiAvPgogIDxwYXRoIGQ9Ik0xNiAxOWguMDEiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/cloud-snow\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 CloudSnow = createLucideIcon('CloudSnow', [\n ['path', { d: 'M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242', key: '1pljnt' }],\n ['path', { d: 'M8 15h.01', key: 'a7atzg' }],\n ['path', { d: 'M8 19h.01', key: 'puxtts' }],\n ['path', { d: 'M12 17h.01', key: 'p32p05' }],\n ['path', { d: 'M12 21h.01', key: 'h35vbk' }],\n ['path', { d: 'M16 15h.01', key: 'rnfrdf' }],\n ['path', { d: 'M16 19h.01', key: '1vcnzz' }],\n]);\n\nexport default CloudSnow;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,iBAAiB,WAAa,CAAA,CAAA,CAAA;AAAA,CAAA,CAC9C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACzF,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,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,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,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC7C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,23 @@
import { createRendererMotionComponent } from '../../motion/index.mjs';
import { isSVGComponent } from '../dom/utils/is-svg-component.mjs';
import { svgMotionConfig } from '../svg/config-motion.mjs';
import { htmlMotionConfig } from '../html/config-motion.mjs';
import { createUseRender } from '../dom/use-render.mjs';
function createMotionComponentFactory(preloadedFeatures, createVisualElement) {
return function createMotionComponent(Component, { forwardMotionProps } = { forwardMotionProps: false }) {
const baseConfig = isSVGComponent(Component)
? svgMotionConfig
: htmlMotionConfig;
const config = {
...baseConfig,
preloadedFeatures,
useRender: createUseRender(forwardMotionProps),
createVisualElement,
Component,
};
return createRendererMotionComponent(config);
};
}
export { createMotionComponentFactory };
@@ -0,0 +1 @@
{"version":3,"file":"manipulation.js","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/0ab8bcf1ecfc70dfc93291a4cb2496578ac25e9c/src/","sources":["manipulation.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAAC,IAAe;IACzC,IAAI,IAAI,CAAC,IAAI;QAAE,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;IAC1C,IAAI,IAAI,CAAC,IAAI;QAAE,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;IAE1C,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;QACd,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC;QACpC,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAC7C,IAAI,WAAW,IAAI,CAAC,EAAE,CAAC;YACnB,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;QAClC,CAAC;IACL,CAAC;IACD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACjB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;AACvB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,IAAe,EAAE,WAAsB;IAClE,MAAM,IAAI,GAAG,CAAC,WAAW,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5C,IAAI,IAAI,EAAE,CAAC;QACP,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;IAC5B,CAAC;IAED,MAAM,IAAI,GAAG,CAAC,WAAW,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5C,IAAI,IAAI,EAAE,CAAC;QACP,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;IAC5B,CAAC;IAED,MAAM,MAAM,GAAG,CAAC,WAAW,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;IAClD,IAAI,MAAM,EAAE,CAAC;QACT,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC;QAC/B,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,GAAG,WAAW,CAAC;QAC/C,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;IACvB,CAAC;AACL,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CAAC,MAAkB,EAAE,KAAgB;IAC5D,aAAa,CAAC,KAAK,CAAC,CAAC;IAErB,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;IAClB,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;IAEtB,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;QAClC,MAAM,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAC5D,OAAO,CAAC,IAAI,GAAG,KAAK,CAAC;QACrB,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC;IACzB,CAAC;SAAM,CAAC;QACJ,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;IACtB,CAAC;AACL,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,MAAM,CAAC,IAAe,EAAE,IAAe;IACnD,aAAa,CAAC,IAAI,CAAC,CAAC;IAEpB,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACxB,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC;IAE3B,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC;IACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACjB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IAErB,IAAI,QAAQ,EAAE,CAAC;QACX,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC;QACrB,IAAI,MAAM,EAAE,CAAC;YACT,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC;YAC/B,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;QACzD,CAAC;IACL,CAAC;SAAM,IAAI,MAAM,EAAE,CAAC;QAChB,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;AACL,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAAC,MAAkB,EAAE,KAAgB;IAC7D,aAAa,CAAC,KAAK,CAAC,CAAC;IAErB,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;IACtB,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;IAElB,IAAI,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;QACvC,MAAM,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;QACnC,OAAO,CAAC,IAAI,GAAG,KAAK,CAAC;QACrB,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC;IACzB,CAAC;SAAM,CAAC;QACJ,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;IACtB,CAAC;AACL,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,OAAO,CAAC,IAAe,EAAE,IAAe;IACpD,aAAa,CAAC,IAAI,CAAC,CAAC;IAEpB,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACxB,IAAI,MAAM,EAAE,CAAC;QACT,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC;QAC/B,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;IACjD,CAAC;IAED,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;QACZ,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IAC1B,CAAC;IAED,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;IACtB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AACrB,CAAC"}
@@ -0,0 +1,16 @@
"use strict";
exports.formatRelative = void 0;
const formatRelativeLocale = {
lastWeek: "先週のeeeeのp",
yesterday: "昨日のp",
today: "今日のp",
tomorrow: "明日のp",
nextWeek: "翌週のeeeeのp",
other: "P",
};
const formatRelative = (token, _date, _baseDate, _options) => {
return formatRelativeLocale[token];
};
exports.formatRelative = formatRelative;
@@ -0,0 +1,5 @@
export declare const endOfYearWithOptions: import("./types.js").FPFn2<
Date,
import("../endOfYear.js").EndOfYearOptions<Date> | undefined,
import("../fp.js").DateArg<Date>
>;
@@ -0,0 +1 @@
{"version":3,"sources":["../../src/exports/utilities.ts"],"sourcesContent":["export { deepMergeSimple } from '../utilities/deepMergeSimple.js'\n"],"names":["deepMergeSimple"],"mappings":"AAAA,SAASA,eAAe,QAAQ,kCAAiC"}
@@ -0,0 +1,253 @@
'use strict';
// FIXME:
// replace this Transform mess with a method that pipes input argument to output argument
const MessageParser = require('./message-parser');
const RelaxedBody = require('./relaxed-body');
const sign = require('./sign');
const PassThrough = require('stream').PassThrough;
const fs = require('fs');
const path = require('path');
const crypto = require('crypto');
const DKIM_ALGO = 'sha256';
const MAX_MESSAGE_SIZE = 2 * 1024 * 1024; // buffer messages larger than this to disk
/*
// Usage:
let dkim = new DKIM({
domainName: 'example.com',
keySelector: 'key-selector',
privateKey,
cacheDir: '/tmp'
});
dkim.sign(input).pipe(process.stdout);
// Where inputStream is a rfc822 message (either a stream, string or Buffer)
// and outputStream is a DKIM signed rfc822 message
*/
class DKIMSigner {
constructor(options, keys, input, output) {
this.options = options || {};
this.keys = keys;
this.cacheTreshold = Number(this.options.cacheTreshold) || MAX_MESSAGE_SIZE;
this.hashAlgo = this.options.hashAlgo || DKIM_ALGO;
this.cacheDir = this.options.cacheDir || false;
this.chunks = [];
this.chunklen = 0;
this.readPos = 0;
this.cachePath = this.cacheDir
? path.join(this.cacheDir, 'message.' + Date.now() + '-' + crypto.randomBytes(14).toString('hex'))
: false;
this.cache = false;
this.headers = false;
this.bodyHash = false;
this.parser = false;
this.relaxedBody = false;
this.input = input;
this.output = output;
this.output.usingCache = false;
this.hasErrored = false;
this.input.on('error', err => {
this.hasErrored = true;
this.cleanup();
output.emit('error', err);
});
}
cleanup() {
if (!this.cache || !this.cachePath) {
return;
}
fs.unlink(this.cachePath, () => false);
}
createReadCache() {
// pipe remainings to cache file
this.cache = fs.createReadStream(this.cachePath);
this.cache.once('error', err => {
this.cleanup();
this.output.emit('error', err);
});
this.cache.once('close', () => {
this.cleanup();
});
this.cache.pipe(this.output);
}
sendNextChunk() {
if (this.hasErrored) {
return;
}
if (this.readPos >= this.chunks.length) {
if (!this.cache) {
return this.output.end();
}
return this.createReadCache();
}
let chunk = this.chunks[this.readPos++];
if (this.output.write(chunk) === false) {
return this.output.once('drain', () => {
this.sendNextChunk();
});
}
setImmediate(() => this.sendNextChunk());
}
sendSignedOutput() {
let keyPos = 0;
let signNextKey = () => {
if (keyPos >= this.keys.length) {
this.output.write(this.parser.rawHeaders);
return setImmediate(() => this.sendNextChunk());
}
let key = this.keys[keyPos++];
let dkimField = sign(this.headers, this.hashAlgo, this.bodyHash, {
domainName: key.domainName,
keySelector: key.keySelector,
privateKey: key.privateKey,
headerFieldNames: this.options.headerFieldNames,
skipFields: this.options.skipFields
});
if (dkimField) {
this.output.write(Buffer.from(dkimField + '\r\n'));
}
return setImmediate(signNextKey);
};
if (this.bodyHash && this.headers) {
return signNextKey();
}
this.output.write(this.parser.rawHeaders);
this.sendNextChunk();
}
createWriteCache() {
this.output.usingCache = true;
// pipe remainings to cache file
this.cache = fs.createWriteStream(this.cachePath);
this.cache.once('error', err => {
this.cleanup();
// drain input
this.relaxedBody.unpipe(this.cache);
this.relaxedBody.on('readable', () => {
while (this.relaxedBody.read() !== null) {
// do nothing
}
});
this.hasErrored = true;
// emit error
this.output.emit('error', err);
});
this.cache.once('close', () => {
this.sendSignedOutput();
});
this.relaxedBody.removeAllListeners('readable');
this.relaxedBody.pipe(this.cache);
}
signStream() {
this.parser = new MessageParser();
this.relaxedBody = new RelaxedBody({
hashAlgo: this.hashAlgo
});
this.parser.on('headers', value => {
this.headers = value;
});
this.relaxedBody.on('hash', value => {
this.bodyHash = value;
});
this.relaxedBody.on('readable', () => {
let chunk;
if (this.cache) {
return;
}
while ((chunk = this.relaxedBody.read()) !== null) {
this.chunks.push(chunk);
this.chunklen += chunk.length;
if (this.chunklen >= this.cacheTreshold && this.cachePath) {
return this.createWriteCache();
}
}
});
this.relaxedBody.on('end', () => {
if (this.cache) {
return;
}
this.sendSignedOutput();
});
this.parser.pipe(this.relaxedBody);
setImmediate(() => this.input.pipe(this.parser));
}
}
class DKIM {
constructor(options) {
this.options = options || {};
this.keys = [].concat(
this.options.keys || {
domainName: options.domainName,
keySelector: options.keySelector,
privateKey: options.privateKey
}
);
}
sign(input, extraOptions) {
let output = new PassThrough();
let inputStream = input;
let writeValue = false;
if (Buffer.isBuffer(input)) {
writeValue = input;
inputStream = new PassThrough();
} else if (typeof input === 'string') {
writeValue = Buffer.from(input);
inputStream = new PassThrough();
}
let options = this.options;
if (extraOptions && Object.keys(extraOptions).length) {
options = {};
Object.keys(this.options || {}).forEach(key => {
options[key] = this.options[key];
});
Object.keys(extraOptions || {}).forEach(key => {
if (!(key in options)) {
options[key] = extraOptions[key];
}
});
}
let signer = new DKIMSigner(options, this.keys, inputStream, output);
setImmediate(() => {
signer.signStream();
if (writeValue) {
setImmediate(() => {
inputStream.end(writeValue);
});
}
});
return output;
}
}
module.exports = DKIM;
@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/mysql-core/columns/float.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyMySqlTable } from '~/mysql-core/table.ts';\nimport { getColumnNameAndConfig } from '~/utils.ts';\nimport { MySqlColumnBuilderWithAutoIncrement, MySqlColumnWithAutoIncrement } from './common.ts';\n\nexport type MySqlFloatBuilderInitial<TName extends string> = MySqlFloatBuilder<{\n\tname: TName;\n\tdataType: 'number';\n\tcolumnType: 'MySqlFloat';\n\tdata: number;\n\tdriverParam: number | string;\n\tenumValues: undefined;\n}>;\n\nexport class MySqlFloatBuilder<T extends ColumnBuilderBaseConfig<'number', 'MySqlFloat'>>\n\textends MySqlColumnBuilderWithAutoIncrement<T, MySqlFloatConfig>\n{\n\tstatic override readonly [entityKind]: string = 'MySqlFloatBuilder';\n\n\tconstructor(name: T['name'], config: MySqlFloatConfig | undefined) {\n\t\tsuper(name, 'number', 'MySqlFloat');\n\t\tthis.config.precision = config?.precision;\n\t\tthis.config.scale = config?.scale;\n\t\tthis.config.unsigned = config?.unsigned;\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyMySqlTable<{ name: TTableName }>,\n\t): MySqlFloat<MakeColumnConfig<T, TTableName>> {\n\t\treturn new MySqlFloat<MakeColumnConfig<T, TTableName>>(table, this.config as ColumnBuilderRuntimeConfig<any, any>);\n\t}\n}\n\nexport class MySqlFloat<T extends ColumnBaseConfig<'number', 'MySqlFloat'>>\n\textends MySqlColumnWithAutoIncrement<T, MySqlFloatConfig>\n{\n\tstatic override readonly [entityKind]: string = 'MySqlFloat';\n\n\treadonly precision: number | undefined = this.config.precision;\n\treadonly scale: number | undefined = this.config.scale;\n\treadonly unsigned: boolean | undefined = this.config.unsigned;\n\n\tgetSQLType(): string {\n\t\tlet type = '';\n\t\tif (this.precision !== undefined && this.scale !== undefined) {\n\t\t\ttype += `float(${this.precision},${this.scale})`;\n\t\t} else if (this.precision === undefined) {\n\t\t\ttype += 'float';\n\t\t} else {\n\t\t\ttype += `float(${this.precision})`;\n\t\t}\n\t\treturn this.unsigned ? `${type} unsigned` : type;\n\t}\n}\n\nexport interface MySqlFloatConfig {\n\tprecision?: number;\n\tscale?: number;\n\tunsigned?: boolean;\n}\n\nexport function float(): MySqlFloatBuilderInitial<''>;\nexport function float(\n\tconfig?: MySqlFloatConfig,\n): MySqlFloatBuilderInitial<''>;\nexport function float<TName extends string>(\n\tname: TName,\n\tconfig?: MySqlFloatConfig,\n): MySqlFloatBuilderInitial<TName>;\nexport function float(a?: string | MySqlFloatConfig, b?: MySqlFloatConfig) {\n\tconst { name, config } = getColumnNameAndConfig<MySqlFloatConfig>(a, b);\n\treturn new MySqlFloatBuilder(name, config);\n}\n"],"mappings":"AAEA,SAAS,kBAAkB;AAE3B,SAAS,8BAA8B;AACvC,SAAS,qCAAqC,oCAAoC;AAW3E,MAAM,0BACJ,oCACT;AAAA,EACC,QAA0B,UAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB,QAAsC;AAClE,UAAM,MAAM,UAAU,YAAY;AAClC,SAAK,OAAO,YAAY,QAAQ;AAChC,SAAK,OAAO,QAAQ,QAAQ;AAC5B,SAAK,OAAO,WAAW,QAAQ;AAAA,EAChC;AAAA;AAAA,EAGS,MACR,OAC8C;AAC9C,WAAO,IAAI,WAA4C,OAAO,KAAK,MAA8C;AAAA,EAClH;AACD;AAEO,MAAM,mBACJ,6BACT;AAAA,EACC,QAA0B,UAAU,IAAY;AAAA,EAEvC,YAAgC,KAAK,OAAO;AAAA,EAC5C,QAA4B,KAAK,OAAO;AAAA,EACxC,WAAgC,KAAK,OAAO;AAAA,EAErD,aAAqB;AACpB,QAAI,OAAO;AACX,QAAI,KAAK,cAAc,UAAa,KAAK,UAAU,QAAW;AAC7D,cAAQ,SAAS,KAAK,SAAS,IAAI,KAAK,KAAK;AAAA,IAC9C,WAAW,KAAK,cAAc,QAAW;AACxC,cAAQ;AAAA,IACT,OAAO;AACN,cAAQ,SAAS,KAAK,SAAS;AAAA,IAChC;AACA,WAAO,KAAK,WAAW,GAAG,IAAI,cAAc;AAAA,EAC7C;AACD;AAgBO,SAAS,MAAM,GAA+B,GAAsB;AAC1E,QAAM,EAAE,MAAM,OAAO,IAAI,uBAAyC,GAAG,CAAC;AACtE,SAAO,IAAI,kBAAkB,MAAM,MAAM;AAC1C;","names":[]}
@@ -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 MegaphoneOff = createLucideIcon("MegaphoneOff", [
["path", { d: "M9.26 9.26 3 11v3l14.14 3.14", key: "3429n" }],
["path", { d: "M21 15.34V6l-7.31 2.03", key: "4o1dh8" }],
["path", { d: "M11.6 16.8a3 3 0 1 1-5.8-1.6", key: "1yl0tm" }],
["line", { x1: "2", x2: "22", y1: "2", y2: "22", key: "a6p6uj" }]
]);
export { MegaphoneOff as default };
//# sourceMappingURL=megaphone-off.js.map
@@ -0,0 +1 @@
{"version":3,"file":"zap-off.js","sources":["../../../src/icons/zap-off.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ZapOff\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTAuNTEzIDQuODU2IDEzLjEyIDIuMTdhLjUuNSAwIDAgMSAuODYuNDZsLTEuMzc3IDQuMzE3IiAvPgogIDxwYXRoIGQ9Ik0xNS42NTYgMTBIMjBhMSAxIDAgMCAxIC43OCAxLjYzbC0xLjcyIDEuNzczIiAvPgogIDxwYXRoIGQ9Ik0xNi4yNzMgMTYuMjczIDEwLjg4IDIxLjgzYS41LjUgMCAwIDEtLjg2LS40NmwxLjkyLTYuMDJBMSAxIDAgMCAwIDExIDE0SDRhMSAxIDAgMCAxLS43OC0xLjYzbDQuNTA3LTQuNjQzIiAvPgogIDxwYXRoIGQ9Im0yIDIgMjAgMjAiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/zap-off\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ZapOff = createLucideIcon('ZapOff', [\n ['path', { d: 'M10.513 4.856 13.12 2.17a.5.5 0 0 1 .86.46l-1.377 4.317', key: '193nxd' }],\n ['path', { d: 'M15.656 10H20a1 1 0 0 1 .78 1.63l-1.72 1.773', key: '27a7lr' }],\n [\n 'path',\n {\n d: 'M16.273 16.273 10.88 21.83a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14H4a1 1 0 0 1-.78-1.63l4.507-4.643',\n key: '1e0qe9',\n },\n ],\n ['path', { d: 'm2 2 20 20', key: '1ooewy' }],\n]);\n\nexport default ZapOff;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,iBAAiB,QAAU,CAAA,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACxF,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAgD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC7E,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;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,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC7C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,122 @@
"use strict";
exports.match = void 0;
var _index = require("../../_lib/buildMatchFn.cjs");
var _index2 = require("../../_lib/buildMatchPatternFn.cjs");
const matchOrdinalNumberPattern =
/^だ?い?\d+(ねん|しはんき|がつ|しゅう|にち|じ|ふん|びょう)?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(B\.?C\.?|A\.?D\.?)/i,
abbreviated: /^(きげん[前後]|せいれき)/i,
wide: /^(きげん[前後]|せいれき)/i,
};
const parseEraPatterns = {
narrow: [/^B/i, /^A/i],
any: [/^(きげんぜん)/i, /^(せいれき|きげんご)/i],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^Q[1234]/i,
wide: /^だい[1234一二三四1234]しはんき/i,
};
const parseQuarterPatterns = {
any: [/(1|一|1)/i, /(2|二|2)/i, /(3|三|3)/i, /(4|四|4)/i],
};
const matchMonthPatterns = {
narrow: /^([123456789]|1[012])/,
abbreviated: /^([123456789]|1[012])がつ/i,
wide: /^([123456789]|1[012])がつ/i,
};
const parseMonthPatterns = {
any: [
/^1\D/,
/^2/,
/^3/,
/^4/,
/^5/,
/^6/,
/^7/,
/^8/,
/^9/,
/^10/,
/^11/,
/^12/,
],
};
const matchDayPatterns = {
narrow: /^(にち|げつ|か|すい|もく|きん|ど)/,
short: /^(にち|げつ|か|すい|もく|きん|ど)/,
abbreviated: /^(にち|げつ|か|すい|もく|きん|ど)/,
wide: /^(にち|げつ|か|すい|もく|きん|ど)ようび/,
};
const parseDayPatterns = {
any: [/^にち/, /^げつ/, /^か/, /^すい/, /^もく/, /^きん/, /^ど/],
};
const matchDayPeriodPatterns = {
any: /^(AM|PM|ごぜん|ごご|しょうご|しんや|まよなか|よる|あさ)/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^(A|ごぜん)/i,
pm: /^(P|ごご)/i,
midnight: /^しんや|まよなか/i,
noon: /^しょうご/i,
morning: /^あさ/i,
afternoon: /^ごご/i,
evening: /^よる/i,
night: /^しんや/i,
},
};
const match = (exports.match = {
ordinalNumber: (0, _index2.buildMatchPatternFn)({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: function (value) {
return parseInt(value, 10);
},
}),
era: (0, _index.buildMatchFn)({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: (0, _index.buildMatchFn)({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => index + 1,
}),
month: (0, _index.buildMatchFn)({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any",
}),
day: (0, _index.buildMatchFn)({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any",
}),
dayPeriod: (0, _index.buildMatchFn)({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
});
@@ -0,0 +1,177 @@
import { isArgumentElement, isDateElement, isNumberElement, isPluralElement, isPoundElement, isSelectElement, isTagElement, isTimeElement, TYPE } from "./types.js";
function cloneDeep(obj) {
if (Array.isArray(obj)) {
// @ts-expect-error meh
return obj.map(cloneDeep);
}
if (obj !== null && typeof obj === "object") {
// @ts-expect-error meh
return Object.keys(obj).reduce((cloned, k) => {
// @ts-expect-error meh
cloned[k] = cloneDeep(obj[k]);
return cloned;
}, {});
}
return obj;
}
/**
* Replace pound elements with number elements referencing the given variable.
* This is needed when nesting plurals - the # in the outer plural should become
* an explicit variable reference when nested inside another plural.
* GH #4202
*/
function replacePoundWithArgument(ast, variableName) {
return ast.map((el) => {
if (isPoundElement(el)) {
// Replace # with {variableName, number}
return {
type: TYPE.number,
value: variableName,
style: null,
location: el.location
};
}
if (isPluralElement(el) || isSelectElement(el)) {
// Recursively process options
const newOptions = {};
for (const key of Object.keys(el.options)) {
newOptions[key] = { value: replacePoundWithArgument(el.options[key].value, variableName) };
}
return {
...el,
options: newOptions
};
}
if (isTagElement(el)) {
return {
...el,
children: replacePoundWithArgument(el.children, variableName)
};
}
return el;
});
}
function hoistPluralOrSelectElement(ast, el, positionToInject) {
// pull this out of the ast and move it to the top
const cloned = cloneDeep(el);
const { options } = cloned;
// GH #4202: Check if there are other plural/select elements after this one
const afterElements = ast.slice(positionToInject + 1);
const hasSubsequentPluralOrSelect = afterElements.some(isPluralOrSelectElement);
cloned.options = Object.keys(options).reduce((all, k) => {
let optionValue = options[k].value;
// GH #4202: If there are subsequent plurals/selects and this is a plural,
// replace # with explicit variable reference to avoid ambiguity
if (hasSubsequentPluralOrSelect && isPluralElement(el)) {
optionValue = replacePoundWithArgument(optionValue, el.value);
}
const newValue = hoistSelectors([
...ast.slice(0, positionToInject),
...optionValue,
...afterElements
]);
all[k] = { value: newValue };
return all;
}, {});
return cloned;
}
function isPluralOrSelectElement(el) {
return isPluralElement(el) || isSelectElement(el);
}
function findPluralOrSelectElement(ast) {
return !!ast.find((el) => {
if (isPluralOrSelectElement(el)) {
return true;
}
if (isTagElement(el)) {
return findPluralOrSelectElement(el.children);
}
return false;
});
}
/**
* Hoist all selectors to the beginning of the AST & flatten the
* resulting options. E.g:
* "I have {count, plural, one{a dog} other{many dogs}}"
* becomes "{count, plural, one{I have a dog} other{I have many dogs}}".
* If there are multiple selectors, the order of which one is hoisted 1st
* is non-deterministic.
* The goal is to provide as many full sentences as possible since fragmented
* sentences are not translator-friendly
* @param ast AST
*/
export function hoistSelectors(ast) {
for (let i = 0; i < ast.length; i++) {
const el = ast[i];
if (isPluralOrSelectElement(el)) {
return [hoistPluralOrSelectElement(ast, el, i)];
}
if (isTagElement(el) && findPluralOrSelectElement([el])) {
throw new Error("Cannot hoist plural/select within a tag element. Please put the tag element inside each plural/select option");
}
}
return ast;
}
/**
* Collect all variables in an AST to Record<string, TYPE>
* @param ast AST to collect variables from
* @param vars Record of variable name to variable type
*/
function collectVariables(ast, vars = new Map()) {
ast.forEach((el) => {
if (isArgumentElement(el) || isDateElement(el) || isTimeElement(el) || isNumberElement(el)) {
if (el.value in vars && vars.get(el.value) !== el.type) {
throw new Error(`Variable ${el.value} has conflicting types`);
}
vars.set(el.value, el.type);
}
if (isPluralElement(el) || isSelectElement(el)) {
vars.set(el.value, el.type);
Object.keys(el.options).forEach((k) => {
collectVariables(el.options[k].value, vars);
});
}
if (isTagElement(el)) {
vars.set(el.value, el.type);
collectVariables(el.children, vars);
}
});
}
/**
* Check if 2 ASTs are structurally the same. This primarily means that
* they have the same variables with the same type
* @param a
* @param b
* @returns
*/
export function isStructurallySame(a, b) {
const aVars = new Map();
const bVars = new Map();
collectVariables(a, aVars);
collectVariables(b, bVars);
if (aVars.size !== bVars.size) {
return {
success: false,
error: new Error(`Different number of variables: [${Array.from(aVars.keys()).join(", ")}] vs [${Array.from(bVars.keys()).join(", ")}]`)
};
}
return Array.from(aVars.entries()).reduce((result, [key, type]) => {
if (!result.success) {
return result;
}
const bType = bVars.get(key);
if (bType == null) {
return {
success: false,
error: new Error(`Missing variable ${key} in message`)
};
}
if (bType !== type) {
return {
success: false,
error: new Error(`Variable ${key} has conflicting types: ${TYPE[type]} vs ${TYPE[bType]}`)
};
}
return result;
}, { success: true });
}
@@ -0,0 +1,10 @@
import { LIST_STYLE_TYPE } from '../../property-descriptors/list-style-type';
import { CSSParsedCounterDeclaration } from '../../index';
export declare class CounterState {
private readonly counters;
getCounterValue(name: string): number;
getCounterValues(name: string): readonly number[];
pop(counters: string[]): void;
parse(style: CSSParsedCounterDeclaration): string[];
}
export declare const createCounterText: (value: number, type: LIST_STYLE_TYPE, appendSuffix: boolean) => string;
@@ -0,0 +1,37 @@
/**
* 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 './LexicalCode.dev.mjs';
import * as modProd from './LexicalCode.prod.mjs';
const mod = process.env.NODE_ENV !== 'production' ? modDev : modProd;
export const $createCodeHighlightNode = mod.$createCodeHighlightNode;
export const $createCodeNode = mod.$createCodeNode;
export const $getEndOfCodeInLine = mod.$getEndOfCodeInLine;
export const $getFirstCodeNodeOfLine = mod.$getFirstCodeNodeOfLine;
export const $getLastCodeNodeOfLine = mod.$getLastCodeNodeOfLine;
export const $getStartOfCodeInLine = mod.$getStartOfCodeInLine;
export const $isCodeHighlightNode = mod.$isCodeHighlightNode;
export const $isCodeNode = mod.$isCodeNode;
export const CODE_LANGUAGE_FRIENDLY_NAME_MAP = mod.CODE_LANGUAGE_FRIENDLY_NAME_MAP;
export const CODE_LANGUAGE_MAP = mod.CODE_LANGUAGE_MAP;
export const CodeHighlightNode = mod.CodeHighlightNode;
export const CodeNode = mod.CodeNode;
export const DEFAULT_CODE_LANGUAGE = mod.DEFAULT_CODE_LANGUAGE;
export const PrismTokenizer = mod.PrismTokenizer;
export const getCodeLanguageOptions = mod.getCodeLanguageOptions;
export const getCodeLanguages = mod.getCodeLanguages;
export const getCodeThemeOptions = mod.getCodeThemeOptions;
export const getDefaultCodeLanguage = mod.getDefaultCodeLanguage;
export const getEndOfCodeInLine = mod.getEndOfCodeInLine;
export const getFirstCodeNodeOfLine = mod.getFirstCodeNodeOfLine;
export const getLanguageFriendlyName = mod.getLanguageFriendlyName;
export const getLastCodeNodeOfLine = mod.getLastCodeNodeOfLine;
export const getStartOfCodeInLine = mod.getStartOfCodeInLine;
export const normalizeCodeLang = mod.normalizeCodeLang;
export const normalizeCodeLanguage = mod.normalizeCodeLanguage;
export const registerCodeHighlighting = mod.registerCodeHighlighting;
@@ -0,0 +1,6 @@
"use strict";
function _read_only_error(name) {
throw new TypeError("\"" + name + "\" is read-only");
}
exports._ = _read_only_error;
@@ -0,0 +1 @@
{"version":3,"file":"groupItemIDsByRelation.js","names":["groupItemIDsByRelation","items","reduce","acc","item","relationTo","push","value","id"],"sources":["../../../src/providers/Folders/groupItemIDsByRelation.ts"],"sourcesContent":["import type { FolderOrDocument } from 'payload/shared'\n\nexport function groupItemIDsByRelation(items: FolderOrDocument[]) {\n return items.reduce(\n (acc, item) => {\n if (!acc[item.relationTo]) {\n acc[item.relationTo] = []\n }\n acc[item.relationTo].push(item.value.id)\n\n return acc\n },\n {} as Record<string, (number | string)[]>,\n )\n}\n"],"mappings":"AAEA,OAAO,SAASA,uBAAuBC,KAAyB;EAC9D,OAAOA,KAAA,CAAMC,MAAM,CACjB,CAACC,GAAA,EAAKC,IAAA;IACJ,IAAI,CAACD,GAAG,CAACC,IAAA,CAAKC,UAAU,CAAC,EAAE;MACzBF,GAAG,CAACC,IAAA,CAAKC,UAAU,CAAC,GAAG,EAAE;IAC3B;IACAF,GAAG,CAACC,IAAA,CAAKC,UAAU,CAAC,CAACC,IAAI,CAACF,IAAA,CAAKG,KAAK,CAACC,EAAE;IAEvC,OAAOL,GAAA;EACT,GACA,CAAC;AAEL","ignoreList":[]}
@@ -0,0 +1,34 @@
"use strict";
exports.differenceInCalendarISOWeekYears = differenceInCalendarISOWeekYears;
var _index = require("./getISOWeekYear.js");
/**
* @name differenceInCalendarISOWeekYears
* @category ISO Week-Numbering Year Helpers
* @summary Get the number of calendar ISO week-numbering years between the given dates.
*
* @description
* Get the number of calendar ISO week-numbering years between the given dates.
*
* ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_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).
*
* @param dateLeft - The later date
* @param dateRight - The earlier date
*
* @returns The number of calendar ISO week-numbering years
*
* @example
* // How many calendar ISO week-numbering years are 1 January 2010 and 1 January 2012?
* const result = differenceInCalendarISOWeekYears(
* new Date(2012, 0, 1),
* new Date(2010, 0, 1)
* )
* //=> 2
*/
function differenceInCalendarISOWeekYears(dateLeft, dateRight) {
return (
(0, _index.getISOWeekYear)(dateLeft) - (0, _index.getISOWeekYear)(dateRight)
);
}
@@ -0,0 +1,4 @@
import type { DefaultTranslationsObject, Language } from '../types.js';
export declare const heTranslations: DefaultTranslationsObject;
export declare const he: Language;
//# sourceMappingURL=he.d.ts.map
@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/exports/i18n/he.ts"],"sourcesContent":["export { he } from '@payloadcms/translations/languages/he'\n"],"names":["he"],"mappings":"AAAA,SAASA,EAAE,QAAQ,wCAAuC"}
@@ -0,0 +1,113 @@
import { createHandler as createRawHandler, parseRequestParams as rawParseRequestParams, } from '../handler.mjs';
/**
* 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 `ServerResponse` 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 http from 'http';
* import { parseRequestParams } from 'graphql-http/lib/use/http';
*
* const server = http.createServer(async (req, res) => {
* if (req.url.startsWith('/graphql')) {
* 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);
* }
* } else {
* res.writeHead(404).end();
* }
* });
*
* server.listen(4000);
* console.log('Listening to port 4000');
* ```
*
* @category Server/http
*/
export async function parseRequestParams(req, res) {
const rawReq = toRequest(req, res);
const paramsOrRes = await rawParseRequestParams(rawReq);
if (!('query' in paramsOrRes)) {
const [body, init] = paramsOrRes;
res.writeHead(init.status, init.statusText, init.headers).end(body);
return null;
}
return paramsOrRes;
}
/**
* Create a GraphQL over HTTP spec compliant request handler for
* the Node environment http module.
*
* ```js
* import http from 'http';
* import { createHandler } from 'graphql-http/lib/use/http';
* import { schema } from './my-graphql-schema/index.mjs';
*
* const server = http.createServer(createHandler({ schema }));
*
* server.listen(4000);
* console.log('Listening to port 4000');
* ```
*
* @category Server/http
*/
export function createHandler(options) {
const handle = createRawHandler(options);
return async function requestListener(req, res) {
try {
if (!req.url) {
throw new Error('Missing request URL');
}
if (!req.method) {
throw new Error('Missing request method');
}
const [body, init] = await handle(toRequest(req, res));
res.writeHead(init.status, init.statusText, init.headers).end(body);
}
catch (err) {
// The handler shouldnt throw errors.
// If you wish to handle them differently, consider implementing your own request handler.
console.error('Internal error occurred during request handling. ' +
'Please check your implementation.', err);
res.writeHead(500).end();
}
};
}
function toRequest(req, res) {
if (!req.url) {
throw new Error('Missing request URL');
}
if (!req.method) {
throw new Error('Missing request method');
}
return {
url: req.url,
method: req.method,
headers: req.headers,
body: () => new Promise((resolve) => {
let body = '';
req.setEncoding('utf-8');
req.on('data', (chunk) => (body += chunk));
req.on('end', () => resolve(body));
}),
raw: req,
context: { res },
};
}
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/integrations/mcp-server/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAqB,uBAAuB,EAAoC,MAAM,SAAS,CAAC;AAS5G;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,MAAM,EAAE,iBAAiB,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,uBAAuB,GAAG,CAAC,CAuCpH"}
@@ -0,0 +1 @@
{"version":3,"file":"trace.d.ts","sourceRoot":"","sources":["../../src/trace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAW,IAAI,EAAoC,MAAM,oBAAoB,CAAC;AAG1F,OAAO,KAAK,EACV,MAAM,EACN,aAAa,IAAI,iBAAiB,EAClC,sBAAsB,EACtB,KAAK,EAEL,YAAY,EACb,MAAM,cAAc,CAAC;AAgBtB,OAAO,KAAK,EAAuB,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAwE7E;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,OAAO,EAAE,wBAAwB,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,CAAC,GAAG,CAAC,CAE9F;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAC/B,OAAO,EAAE,wBAAwB,EACjC,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,IAAI,KAAK,CAAC,GAC9C,CAAC,CAEH;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,wBAAwB,GAAG,IAAI,CAqBzE;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,CAAC,GAAG,CAAC,CAGrF;AA0FD;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,OAAO,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,GAAG,CAAC,CAEvG;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,KAAK,GACX,CAAC,sBAAsB,EAAE,OAAO,CAAC,sBAAsB,CAAC,EAAE,YAAY,EAAE,YAAY,CAAC,CAUvF"}
@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["React","CodeBlockIcon","_jsx","className","focusable","viewBox","xmlns","d","strokeLinecap"],"sources":["../../../src/icons/CodeBlock/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const CodeBlockIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"graphic code-block-icon\"\n focusable=\"false\"\n viewBox=\"0 0 20 20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n className=\"stroke\"\n d=\"M14 12.6667L16.6667 9.99999L14 7.33332M5.99999 7.33332L3.33333 9.99999L5.99999 12.6667M11.6667 4.66666L8.33333 15.3333\"\n strokeLinecap=\"square\"\n />\n </svg>\n)\n"],"mappings":";AAAA,OAAOA,KAAA,MAAW;AAElB,OAAO,MAAMC,aAAA,GAA0BA,CAAA,kBACrCC,IAAA,CAAC;EACC,eAAY;EACZC,SAAA,EAAU;EACVC,SAAA,EAAU;EACVC,OAAA,EAAQ;EACRC,KAAA,EAAM;YAEN,aAAAJ,IAAA,CAAC;IACCC,SAAA,EAAU;IACVI,CAAA,EAAE;IACFC,aAAA,EAAc","ignoreList":[]}
@@ -0,0 +1,30 @@
import { toDate } from "./toDate.mjs";
/**
* @name endOfDay
* @category Day Helpers
* @summary Return the end of a day for the given date.
*
* @description
* Return the end of a day for the given date.
* The result will be in the local timezone.
*
* @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
*
* @returns The end of a day
*
* @example
* // The end of a day for 2 September 2014 11:55:00:
* const result = endOfDay(new Date(2014, 8, 2, 11, 55, 0))
* //=> Tue Sep 02 2014 23:59:59.999
*/
export function endOfDay(date) {
const _date = toDate(date);
_date.setHours(23, 59, 59, 999);
return _date;
}
// Fallback for modularized imports:
export default endOfDay;
@@ -0,0 +1,7 @@
/**
* WARNING: This file contains exports that can only be safely used in Node environments.
*/
export { generateTypes } from '../bin/generateTypes.js';
export { loadEnv } from '../bin/loadEnv.js';
export { findConfig } from '../config/find.js';
//# sourceMappingURL=node.d.ts.map
@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/admin/views/list.ts"],"sourcesContent":["import type { SanitizedCollectionPermission } from '../../auth/types.js'\nimport type {\n CollectionAdminOptions,\n SanitizedCollectionConfig,\n} from '../../collections/config/types.js'\nimport type { ServerProps } from '../../config/types.js'\nimport type { CollectionPreferences } from '../../preferences/types.js'\nimport type { QueryPreset } from '../../query-presets/types.js'\nimport type { ResolvedFilterOptions } from '../../types/index.js'\nimport type { Column } from '../elements/Table.js'\nimport type { Data, ViewTypes } from '../types.js'\n\nexport type ListViewSlots = {\n AfterList?: React.ReactNode\n AfterListTable?: React.ReactNode\n BeforeList?: React.ReactNode\n BeforeListTable?: React.ReactNode\n Description?: React.ReactNode\n listMenuItems?: React.ReactNode[]\n Table: React.ReactNode | React.ReactNode[]\n}\n\n/**\n * The `ListViewServerPropsOnly` approach is needed to ensure type strictness when injecting component props\n * There is no way to do something like `Omit<ListViewServerProps, keyof ListViewClientProps>`\n * This is because `ListViewClientProps` is a union which is impossible to exclude from\n * Exporting explicitly defined `ListViewServerPropsOnly`, etc. allows for the strictest typing\n */\nexport type ListViewServerPropsOnly = {\n collectionConfig: SanitizedCollectionConfig\n data: Data\n limit: number\n listPreferences: CollectionPreferences\n listSearchableFields: CollectionAdminOptions['listSearchableFields']\n} & ServerProps\n\nexport type ListViewServerProps = ListViewClientProps & ListViewServerPropsOnly\n\nexport type ListViewClientProps = {\n beforeActions?: React.ReactNode[]\n collectionSlug: SanitizedCollectionConfig['slug']\n columnState: Column[]\n disableBulkDelete?: boolean\n disableBulkEdit?: boolean\n disableQueryPresets?: boolean\n enableRowSelections?: boolean\n hasCreatePermission: boolean\n hasDeletePermission?: boolean\n /**\n * @deprecated\n */\n listPreferences?: CollectionPreferences\n newDocumentURL: string\n /**\n * @deprecated\n */\n preferenceKey?: string\n queryPreset?: QueryPreset\n queryPresetPermissions?: SanitizedCollectionPermission\n renderedFilters?: Map<string, React.ReactNode>\n resolvedFilterOptions?: Map<string, ResolvedFilterOptions>\n viewType: ViewTypes\n} & ListViewSlots\n\nexport type ListViewSlotSharedClientProps = {\n collectionSlug: SanitizedCollectionConfig['slug']\n hasCreatePermission: boolean\n hasDeletePermission?: boolean\n newDocumentURL: string\n}\n\n// BeforeList\nexport type BeforeListClientProps = ListViewSlotSharedClientProps\nexport type BeforeListServerPropsOnly = {} & ListViewServerPropsOnly\nexport type BeforeListServerProps = BeforeListClientProps & BeforeListServerPropsOnly\n\n// BeforeListTable\nexport type BeforeListTableClientProps = ListViewSlotSharedClientProps\nexport type BeforeListTableServerPropsOnly = {} & ListViewServerPropsOnly\nexport type BeforeListTableServerProps = BeforeListTableClientProps & BeforeListTableServerPropsOnly\n\n// AfterList\nexport type AfterListClientProps = ListViewSlotSharedClientProps\nexport type AfterListServerPropsOnly = {} & ListViewServerPropsOnly\nexport type AfterListServerProps = AfterListClientProps & AfterListServerPropsOnly\n\n// AfterListTable\nexport type AfterListTableClientProps = ListViewSlotSharedClientProps\nexport type AfterListTableServerPropsOnly = {} & ListViewServerPropsOnly\nexport type AfterListTableServerProps = AfterListTableClientProps & AfterListTableServerPropsOnly\n"],"names":[],"mappings":"AAyFA,WAAiG"}
@@ -0,0 +1 @@
{"version":3,"file":"cloudy.js","sources":["../../../src/icons/cloudy.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Cloudy\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTcuNSAyMUg5YTcgNyAwIDEgMSA2LjcxLTloMS43OWE0LjUgNC41IDAgMSAxIDAgOVoiIC8+CiAgPHBhdGggZD0iTTIyIDEwYTMgMyAwIDAgMC0zLTNoLTIuMjA3YTUuNTAyIDUuNTAyIDAgMCAwLTEwLjcwMi41IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/cloudy\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 Cloudy = createLucideIcon('Cloudy', [\n ['path', { d: 'M17.5 21H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z', key: 'gqqjvc' }],\n ['path', { d: 'M22 10a3 3 0 0 0-3-3h-2.207a5.502 5.502 0 0 0-10.702.5', key: '1p2s76' }],\n]);\n\nexport default Cloudy;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,iBAAiB,QAAU,CAAA,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAuD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACpF,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA0D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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;AACzF,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,5 @@
import { Colors } from "./types"
declare const picocolors: Colors & { createColors: (enabled?: boolean) => Colors }
export = picocolors
@@ -0,0 +1,58 @@
export declare enum SemconvStability {
/** Emit only stable semantic conventions. */
STABLE = 1,
/** Emit only old semantic conventions. */
OLD = 2,
/** Emit both stable and old semantic conventions. */
DUPLICATE = 3
}
type SemConvStabilityNamespace = 'http' | 'messaging' | 'database' | 'k8s' | (string & {});
/**
* Determine the appropriate semconv stability for the given namespace.
*
* This will parse the given string of comma-separated values (often
* `process.env.OTEL_SEMCONV_STABILITY_OPT_IN`) looking for the `${namespace}`
* or `${namespace}/dup` tokens. This is a pattern defined by a number of
* non-normative semconv documents.
*
* For example:
* - namespace 'http': https://opentelemetry.io/docs/specs/semconv/non-normative/http-migration/
* - namespace 'database': https://opentelemetry.io/docs/specs/semconv/non-normative/database-migration/
* - namespace 'k8s': https://opentelemetry.io/docs/specs/semconv/non-normative/k8s-migration/
*
* Usage:
*
* import {SemconvStability, semconvStabilityFromStr} from '@opentelemetry/instrumentation';
*
* export class FooInstrumentation extends InstrumentationBase<FooInstrumentationConfig> {
* private _semconvStability: SemconvStability;
* constructor(config: FooInstrumentationConfig = {}) {
* super('@opentelemetry/instrumentation-foo', VERSION, config);
*
* // When supporting the OTEL_SEMCONV_STABILITY_OPT_IN envvar
* this._semconvStability = semconvStabilityFromStr(
* 'http',
* process.env.OTEL_SEMCONV_STABILITY_OPT_IN
* );
*
* // or when supporting a `semconvStabilityOptIn` config option (e.g. for
* // the web where there are no envvars).
* this._semconvStability = semconvStabilityFromStr(
* 'http',
* config?.semconvStabilityOptIn
* );
* }
* }
*
* // Then, to apply semconv, use the following or similar:
* if (this._semconvStability & SemconvStability.OLD) {
* // ...
* }
* if (this._semconvStability & SemconvStability.STABLE) {
* // ...
* }
*
*/
export declare function semconvStabilityFromStr(namespace: SemConvStabilityNamespace, str: string | undefined): SemconvStability;
export {};
//# sourceMappingURL=semconvStability.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"sofa.js","sources":["../../../src/icons/sofa.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Sofa\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjAgOVY2YTIgMiAwIDAgMC0yLTJINmEyIDIgMCAwIDAtMiAydjMiIC8+CiAgPHBhdGggZD0iTTIgMTZhMiAyIDAgMCAwIDIgMmgxNmEyIDIgMCAwIDAgMi0ydi01YTIgMiAwIDAgMC00IDB2MS41YS41LjUgMCAwIDEtLjUuNWgtMTFhLjUuNSAwIDAgMS0uNS0uNVYxMWEyIDIgMCAwIDAtNCAweiIgLz4KICA8cGF0aCBkPSJNNCAxOHYyIiAvPgogIDxwYXRoIGQ9Ik0yMCAxOHYyIiAvPgogIDxwYXRoIGQ9Ik0xMiA0djkiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/sofa\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 Sofa = createLucideIcon('Sofa', [\n ['path', { d: 'M20 9V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v3', key: '1dgpiv' }],\n [\n 'path',\n {\n d: 'M2 16a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5a2 2 0 0 0-4 0v1.5a.5.5 0 0 1-.5.5h-11a.5.5 0 0 1-.5-.5V11a2 2 0 0 0-4 0z',\n key: 'xacw8m',\n },\n ],\n ['path', { d: 'M4 18v2', key: 'jwo5n2' }],\n ['path', { d: 'M20 18v2', key: '1ar1qi' }],\n ['path', { d: 'M12 4v9', key: 'oqhhn3' }],\n]);\n\nexport default Sofa;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,iBAAiB,MAAQ,CAAA,CAAA,CAAA;AAAA,CAAA,CACpC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACxE,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,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,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,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC1C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,6 @@
import type { CodeKeywordDefinition, AddedKeywordDefinition, ErrorObject, AnySchema } from "../../types";
export type AdditionalPropertiesError = ErrorObject<"additionalProperties", {
additionalProperty: string;
}, AnySchema>;
declare const def: CodeKeywordDefinition & AddedKeywordDefinition;
export default def;
@@ -0,0 +1,8 @@
import { APIError } from './APIError.js';
export class ReservedFieldName extends APIError {
constructor(field, fieldName){
super(`Field ${field.label} has reserved name '${fieldName}'.`);
}
}
//# sourceMappingURL=ReservedFieldName.js.map
@@ -0,0 +1,9 @@
import type { WebFetchHeaders } from '@sentry/core';
export interface RequestAsyncStorage {
getStore: () => {
headers: WebFetchHeaders;
} | undefined;
}
export declare const requestAsyncStorage: undefined;
export declare const workUnitAsyncStorage: undefined;
//# sourceMappingURL=requestAsyncStorageShim.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"diameter.js","sources":["../../../src/icons/diameter.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Diameter\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxOSIgY3k9IjE5IiByPSIyIiAvPgogIDxjaXJjbGUgY3g9IjUiIGN5PSI1IiByPSIyIiAvPgogIDxwYXRoIGQ9Ik02LjQ4IDMuNjZhMTAgMTAgMCAwIDEgMTMuODYgMTMuODYiIC8+CiAgPHBhdGggZD0ibTYuNDEgNi40MSAxMS4xOCAxMS4xOCIgLz4KICA8cGF0aCBkPSJNMy42NiA2LjQ4YTEwIDEwIDAgMCAwIDEzLjg2IDEzLjg2IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/diameter\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 Diameter = createLucideIcon('Diameter', [\n ['circle', { cx: '19', cy: '19', r: '2', key: '17f5cg' }],\n ['circle', { cx: '5', cy: '5', r: '2', key: '1gwv83' }],\n ['path', { d: 'M6.48 3.66a10 10 0 0 1 13.86 13.86', key: 'xr8kdq' }],\n ['path', { d: 'm6.41 6.41 11.18 11.18', key: 'uhpjw7' }],\n ['path', { d: 'M3.66 6.48a10 10 0 0 0 13.86 13.86', key: 'cldpwv' }],\n]);\n\nexport default Diameter;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAC5C,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CACxD,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,EAAK,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACtD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAsC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACnE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA0B,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACvD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAsC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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;AACrE,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,9 @@
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
import { setISOWeek as fn } from "../setISOWeek.js";
import { convertToFP } from "./_lib/convertToFP.js";
export const setISOWeek = convertToFP(fn, 2);
// Fallback for modularized imports:
export default setISOWeek;
@@ -0,0 +1,42 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const core = require('@sentry/core');
/**
* Creates an envelope from a user feedback.
*/
function createUserFeedbackEnvelope(
feedback,
{
metadata,
tunnel,
dsn,
}
,
) {
const headers = {
event_id: feedback.event_id,
sent_at: new Date().toISOString(),
...(metadata?.sdk && {
sdk: {
name: metadata.sdk.name,
version: metadata.sdk.version,
},
}),
...(!!tunnel && !!dsn && { dsn: core.dsnToString(dsn) }),
};
const item = createUserFeedbackEnvelopeItem(feedback);
return core.createEnvelope(headers, [item]);
}
function createUserFeedbackEnvelopeItem(feedback) {
const feedbackHeaders = {
type: 'user_report',
};
return [feedbackHeaders, feedback];
}
exports.createUserFeedbackEnvelope = createUserFeedbackEnvelope;
//# sourceMappingURL=userfeedback.js.map
@@ -0,0 +1,9 @@
import { cache } from 'react';
function defaultNow() {
// See https://next-intl.dev/docs/usage/dates-times#relative-times-server
return new Date();
}
const getDefaultNow = cache(defaultNow);
export { getDefaultNow as default };
@@ -0,0 +1 @@
{"version":3,"file":"gantt-chart-square.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,232 @@
import { browserTracingIntegration, startBrowserTracingPageLoadSpan, startBrowserTracingNavigationSpan, WINDOW } from '@sentry/browser';
import { SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_OP, getCurrentScope, getActiveSpan, getRootSpan, spanToJSON } from '@sentry/core';
import * as React from 'react';
import { hoistNonReactStatics } from './hoist-non-react-statics.js';
// We need to disable eslint no-explicit-any because any is required for the
// react-router typings.
/**
* A browser tracing integration that uses React Router v4 to instrument navigations.
* Expects `history` (and optionally `routes` and `matchPath`) to be passed as options.
*/
function reactRouterV4BrowserTracingIntegration(
options,
) {
const integration = browserTracingIntegration({
...options,
instrumentPageLoad: false,
instrumentNavigation: false,
});
const { history, routes, matchPath, instrumentPageLoad = true, instrumentNavigation = true } = options;
return {
...integration,
afterAllSetup(client) {
integration.afterAllSetup(client);
instrumentReactRouter(
client,
instrumentPageLoad,
instrumentNavigation,
history,
'reactrouter_v4',
routes,
matchPath,
);
},
};
}
/**
* A browser tracing integration that uses React Router v5 to instrument navigations.
* Expects `history` (and optionally `routes` and `matchPath`) to be passed as options.
*/
function reactRouterV5BrowserTracingIntegration(
options,
) {
const integration = browserTracingIntegration({
...options,
instrumentPageLoad: false,
instrumentNavigation: false,
});
const { history, routes, matchPath, instrumentPageLoad = true, instrumentNavigation = true } = options;
return {
...integration,
afterAllSetup(client) {
integration.afterAllSetup(client);
instrumentReactRouter(
client,
instrumentPageLoad,
instrumentNavigation,
history,
'reactrouter_v5',
routes,
matchPath,
);
},
};
}
function instrumentReactRouter(
client,
instrumentPageLoad,
instrumentNavigation,
history,
instrumentationName,
allRoutes = [],
matchPath,
) {
function getInitPathName() {
if (history.location) {
return history.location.pathname;
}
if (WINDOW.location) {
return WINDOW.location.pathname;
}
return undefined;
}
/**
* Normalizes a transaction name. Returns the new name as well as the
* source of the transaction.
*
* @param pathname The initial pathname we normalize
*/
function normalizeTransactionName(pathname) {
if (allRoutes.length === 0 || !matchPath) {
return [pathname, 'url'];
}
const branches = matchRoutes(allRoutes, pathname, matchPath);
for (const branch of branches) {
if (branch.match.isExact) {
return [branch.match.path, 'route'];
}
}
return [pathname, 'url'];
}
if (instrumentPageLoad) {
const initPathName = getInitPathName();
if (initPathName) {
const [name, source] = normalizeTransactionName(initPathName);
startBrowserTracingPageLoadSpan(client, {
name,
attributes: {
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'pageload',
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: `auto.pageload.react.${instrumentationName}`,
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: source,
},
});
}
}
if (instrumentNavigation && history.listen) {
history.listen((location, action) => {
if (action && (action === 'PUSH' || action === 'POP')) {
const [name, source] = normalizeTransactionName(location.pathname);
startBrowserTracingNavigationSpan(client, {
name,
attributes: {
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'navigation',
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: `auto.navigation.react.${instrumentationName}`,
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: source,
},
});
}
});
}
}
/**
* Matches a set of routes to a pathname
* Based on implementation from
*/
function matchRoutes(
routes,
pathname,
matchPath,
branch = [],
) {
routes.some(route => {
const match = route.path
? matchPath(pathname, route)
: branch.length
? // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
branch[branch.length - 1].match // use parent match
: computeRootMatch(pathname); // use default "root" match
if (match) {
branch.push({ route, match });
if (route.routes) {
matchRoutes(route.routes, pathname, matchPath, branch);
}
}
return !!match;
});
return branch;
}
function computeRootMatch(pathname) {
return { path: '/', url: '/', params: {}, isExact: pathname === '/' };
}
/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */
function withSentryRouting(Route) {
const componentDisplayName = Route.displayName || Route.name;
const WrappedRoute = (props) => {
if (props?.computedMatch?.isExact) {
const route = props.computedMatch.path;
const activeRootSpan = getActiveRootSpan();
getCurrentScope().setTransactionName(route);
if (activeRootSpan) {
activeRootSpan.updateName(route);
activeRootSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, 'route');
}
}
// @ts-expect-error Setting more specific React Component typing for `R` generic above
// will break advanced type inference done by react router params:
// https://github.com/DefinitelyTyped/DefinitelyTyped/blob/13dc4235c069e25fe7ee16e11f529d909f9f3ff8/types/react-router/index.d.ts#L154-L164
return React.createElement(Route, { ...props,} );
};
WrappedRoute.displayName = `sentryRoute(${componentDisplayName})`;
hoistNonReactStatics(WrappedRoute, Route);
// @ts-expect-error Setting more specific React Component typing for `R` generic above
// will break advanced type inference done by react router params:
// https://github.com/DefinitelyTyped/DefinitelyTyped/blob/13dc4235c069e25fe7ee16e11f529d909f9f3ff8/types/react-router/index.d.ts#L154-L164
return WrappedRoute;
}
/* eslint-enable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */
function getActiveRootSpan() {
const span = getActiveSpan();
const rootSpan = span && getRootSpan(span);
if (!rootSpan) {
return undefined;
}
const op = spanToJSON(rootSpan).op;
// Only use this root span if it is a pageload or navigation span
return op === 'navigation' || op === 'pageload' ? rootSpan : undefined;
}
export { reactRouterV4BrowserTracingIntegration, reactRouterV5BrowserTracingIntegration, withSentryRouting };
//# sourceMappingURL=reactrouter.js.map
@@ -0,0 +1,542 @@
import { fieldIsVirtual, fieldShouldBeLocalized } from 'payload/shared';
import toSnakeCase from 'to-snake-case';
import { getArrayRelationName } from '../../utilities/getArrayRelationName.js';
import { resolveBlockTableName } from '../../utilities/validateExistingBlockIsIdentical.js';
import { transformHasManyNumber } from './hasManyNumber.js';
import { transformHasManyText } from './hasManyText.js';
import { transformRelationship } from './relationship.js';
// Traverse fields recursively, transforming data
// for each field type into required Payload shape
export const traverseFields = ({ adapter, blocks, config, currentTableName, dataRef, deletions, fieldPrefix, fields, joinQuery, numbers, parentIsLocalized, path, relationships, table, tablePath, texts, topLevelTableName, withinArrayOrBlockLocale })=>{
const sanitizedPath = path ? `${path}.` : path;
const localeCodes = adapter.payload.config.localization && adapter.payload.config.localization.localeCodes;
const formatted = fields.reduce((result, field)=>{
if (fieldIsVirtual(field)) {
return result;
}
const fieldName = `${fieldPrefix || ''}${field.name}`;
let fieldData = table[fieldName];
const localizedFieldData = {};
const valuesToTransform = [];
if (fieldPrefix) {
deletions.push(()=>delete table[fieldName]);
}
const isLocalized = fieldShouldBeLocalized({
field,
parentIsLocalized
});
if (field.type === 'array') {
const arrayTableName = adapter.tableNameMap.get(`${currentTableName}_${tablePath}${toSnakeCase(field.name)}`);
fieldData = table[getArrayRelationName({
field,
path: fieldName,
tableName: arrayTableName
})];
if (Array.isArray(fieldData)) {
if (isLocalized) {
result[field.name] = fieldData.reduce((arrayResult, row)=>{
if (typeof row._locale === 'string') {
if (!arrayResult[row._locale]) {
arrayResult[row._locale] = [];
}
const locale = row._locale;
const data = {};
delete row._locale;
if (row._uuid) {
row.id = row._uuid;
delete row._uuid;
}
const rowResult = traverseFields({
adapter,
blocks,
config,
currentTableName: arrayTableName,
dataRef: data,
deletions,
fieldPrefix: '',
fields: field.flattenedFields,
numbers,
parentIsLocalized: parentIsLocalized || field.localized,
path: `${sanitizedPath}${field.name}.${row._order - 1}`,
relationships,
table: row,
tablePath: '',
texts,
topLevelTableName,
withinArrayOrBlockLocale: locale
});
if ('_order' in rowResult) {
delete rowResult._order;
}
arrayResult[locale].push(rowResult);
}
return arrayResult;
}, {});
} else {
result[field.name] = fieldData.reduce((acc, row, i)=>{
if (row._uuid) {
row.id = row._uuid;
delete row._uuid;
}
if ('_order' in row) {
delete row._order;
}
if (!withinArrayOrBlockLocale || withinArrayOrBlockLocale && withinArrayOrBlockLocale === row._locale) {
if (row._locale) {
delete row._locale;
}
acc.push(traverseFields({
adapter,
blocks,
config,
currentTableName: arrayTableName,
dataRef: row,
deletions,
fieldPrefix: '',
fields: field.flattenedFields,
numbers,
parentIsLocalized: parentIsLocalized || field.localized,
path: `${sanitizedPath}${field.name}.${i}`,
relationships,
table: row,
tablePath: '',
texts,
topLevelTableName,
withinArrayOrBlockLocale
}));
}
return acc;
}, []);
}
}
return result;
}
if (field.type === 'blocks' && !adapter.blocksAsJSON) {
const blockFieldPath = `${sanitizedPath}${field.name}`;
const blocksByPath = blocks[blockFieldPath];
if (Array.isArray(blocksByPath)) {
if (isLocalized) {
result[field.name] = {};
blocksByPath.forEach((row)=>{
if (row._uuid) {
row.id = row._uuid;
delete row._uuid;
}
if (typeof row._locale === 'string') {
if (!result[field.name][row._locale]) {
result[field.name][row._locale] = [];
}
result[field.name][row._locale].push(row);
delete row._locale;
}
});
Object.entries(result[field.name]).forEach(([locale, localizedBlocks])=>{
result[field.name][locale] = localizedBlocks.map((row)=>{
const block = adapter.payload.blocks[row.blockType] ?? (field.blockReferences ?? field.blocks).find((block)=>typeof block !== 'string' && block.slug === row.blockType);
const tableName = resolveBlockTableName(block, adapter.tableNameMap.get(`${topLevelTableName}_blocks_${toSnakeCase(block.slug)}`));
if (block) {
const blockResult = traverseFields({
adapter,
blocks,
config,
currentTableName: tableName,
dataRef: row,
deletions,
fieldPrefix: '',
fields: block.flattenedFields,
numbers,
parentIsLocalized: parentIsLocalized || field.localized,
path: `${blockFieldPath}.${row._order - 1}`,
relationships,
table: row,
tablePath: '',
texts,
topLevelTableName,
withinArrayOrBlockLocale: locale
});
delete blockResult._order;
return blockResult;
}
return {};
});
});
} else {
// Add locale-specific index to have a proper blockFieldPath for current locale
// because blocks can be in the same array for different locales!
if (withinArrayOrBlockLocale && config.localization) {
for (const locale of config.localization.localeCodes){
let localeIndex = 0;
for(let i = 0; i < blocksByPath.length; i++){
const row = blocksByPath[i];
if (row._locale === locale) {
row._index = localeIndex;
localeIndex++;
}
}
}
}
result[field.name] = blocksByPath.reduce((acc, row, i)=>{
delete row._order;
if (row._uuid) {
row.id = row._uuid;
delete row._uuid;
}
if (typeof row.blockType !== 'string') {
return acc;
}
const block = adapter.payload.blocks[row.blockType] ?? (field.blockReferences ?? field.blocks).find((block)=>typeof block !== 'string' && block.slug === row.blockType);
if (block) {
if (!withinArrayOrBlockLocale || withinArrayOrBlockLocale && withinArrayOrBlockLocale === row._locale) {
if (row._locale) {
delete row._locale;
}
if (typeof row._index === 'number') {
i = row._index;
delete row._index;
}
const tableName = resolveBlockTableName(block, adapter.tableNameMap.get(`${topLevelTableName}_blocks_${toSnakeCase(block.slug)}`));
acc.push(traverseFields({
adapter,
blocks,
config,
currentTableName: tableName,
dataRef: row,
deletions,
fieldPrefix: '',
fields: block.flattenedFields,
numbers,
parentIsLocalized: parentIsLocalized || field.localized,
path: `${blockFieldPath}.${i}`,
relationships,
table: row,
tablePath: '',
texts,
topLevelTableName,
withinArrayOrBlockLocale
}));
return acc;
}
} else {
acc.push({});
}
return acc;
}, []);
}
}
return result;
}
if ((field.type === 'relationship' || field.type === 'upload') && (Array.isArray(field.relationTo) || field.hasMany)) {
const relationPathMatch = relationships[`${sanitizedPath}${field.name}`];
if (!relationPathMatch) {
if ('hasMany' in field && field.hasMany) {
if (isLocalized && config.localization && config.localization.locales) {
result[field.name] = {
[config.localization.defaultLocale]: []
};
} else {
result[field.name] = [];
}
}
return result;
}
if (isLocalized) {
result[field.name] = {};
const relationsByLocale = {};
relationPathMatch.forEach((row)=>{
if (typeof row.locale === 'string') {
if (!relationsByLocale[row.locale]) {
relationsByLocale[row.locale] = [];
}
relationsByLocale[row.locale].push(row);
}
});
Object.entries(relationsByLocale).forEach(([locale, relations])=>{
transformRelationship({
field,
locale,
ref: result,
relations
});
});
} else {
transformRelationship({
field,
ref: result,
relations: relationPathMatch,
withinArrayOrBlockLocale
});
}
return result;
}
if (field.type === 'join') {
const { count, limit = field.defaultLimit ?? 10 } = joinQuery?.[`${fieldPrefix.replaceAll('_', '.')}${field.name}`] || {};
// raw hasMany results from SQLite
if (typeof fieldData === 'string') {
fieldData = JSON.parse(fieldData);
}
let fieldResult;
if (Array.isArray(fieldData)) {
if (isLocalized && adapter.payload.config.localization) {
fieldResult = fieldData.reduce((joinResult, row)=>{
if (typeof row.locale === 'string') {
joinResult[row.locale].docs.push(row.id);
}
return joinResult;
}, // initialize with defaults so empty won't be undefined
adapter.payload.config.localization.localeCodes.reduce((acc, code)=>{
acc[code] = {
docs: [],
hasNextPage: false
};
return acc;
}, {}));
Object.keys(fieldResult).forEach((locale)=>{
fieldResult[locale].hasNextPage = fieldResult[locale].docs.length > limit;
fieldResult[locale].docs = fieldResult[locale].docs.slice(0, limit);
});
} else {
const hasNextPage = limit !== 0 && fieldData.length > limit;
fieldResult = {
docs: (hasNextPage ? fieldData.slice(0, limit) : fieldData).map(({ id, relationTo })=>{
if (relationTo) {
return {
relationTo,
value: id
};
}
return {
id
};
}),
hasNextPage
};
}
}
if (count) {
const countPath = `${fieldName}_count`;
if (typeof table[countPath] !== 'undefined') {
let value = Number(table[countPath]);
if (Number.isNaN(value)) {
value = 0;
}
fieldResult.totalDocs = value;
}
}
result[field.name] = fieldResult;
return result;
}
if (field.type === 'text' && field?.hasMany) {
const textPathMatch = texts[`${sanitizedPath}${field.name}`];
if (!textPathMatch) {
result[field.name] = isLocalized && localeCodes ? Object.fromEntries(localeCodes.map((locale)=>[
locale,
[]
])) : [];
return result;
}
if (isLocalized) {
result[field.name] = {};
const textsByLocale = {};
textPathMatch.forEach((row)=>{
if (typeof row.locale === 'string') {
if (!textsByLocale[row.locale]) {
textsByLocale[row.locale] = [];
}
textsByLocale[row.locale].push(row);
}
});
Object.entries(textsByLocale).forEach(([locale, texts])=>{
transformHasManyText({
field,
locale,
ref: result,
textRows: texts
});
});
} else {
transformHasManyText({
field,
ref: result,
textRows: textPathMatch,
withinArrayOrBlockLocale
});
}
return result;
}
if (field.type === 'number' && field.hasMany) {
const numberPathMatch = numbers[`${sanitizedPath}${field.name}`];
if (!numberPathMatch) {
result[field.name] = isLocalized && localeCodes ? Object.fromEntries(localeCodes.map((locale)=>[
locale,
[]
])) : [];
return result;
}
if (isLocalized) {
result[field.name] = {};
const numbersByLocale = {};
numberPathMatch.forEach((row)=>{
if (typeof row.locale === 'string') {
if (!numbersByLocale[row.locale]) {
numbersByLocale[row.locale] = [];
}
numbersByLocale[row.locale].push(row);
}
});
Object.entries(numbersByLocale).forEach(([locale, numbers])=>{
transformHasManyNumber({
field,
locale,
numberRows: numbers,
ref: result
});
});
} else {
transformHasManyNumber({
field,
numberRows: numberPathMatch,
ref: result,
withinArrayOrBlockLocale
});
}
return result;
}
if (field.type === 'select' && field.hasMany) {
if (Array.isArray(fieldData)) {
if (isLocalized) {
result[field.name] = fieldData.reduce((selectResult, row)=>{
if (typeof row.locale === 'string') {
if (!selectResult[row.locale]) {
selectResult[row.locale] = [];
}
selectResult[row.locale].push(row.value);
}
return selectResult;
}, {});
} else {
let selectData = fieldData;
if (withinArrayOrBlockLocale) {
selectData = selectData.filter(({ locale })=>locale === withinArrayOrBlockLocale);
}
result[field.name] = selectData.map(({ value })=>value);
}
}
return result;
}
if (isLocalized && Array.isArray(table._locales)) {
if (!table._locales.length && localeCodes) {
localeCodes.forEach((_locale)=>table._locales.push({
_locale
}));
}
table._locales.forEach((localeRow)=>{
valuesToTransform.push({
ref: localizedFieldData,
table: {
...table,
...localeRow
}
});
});
} else {
valuesToTransform.push({
ref: result,
table
});
}
valuesToTransform.forEach(({ ref, table })=>{
const fieldData = table[`${fieldPrefix || ''}${field.name}`];
const locale = table?._locale;
let val = fieldData;
switch(field.type){
case 'date':
{
if (typeof fieldData === 'string') {
val = new Date(fieldData).toISOString();
}
break;
}
case 'group':
case 'tab':
{
const groupFieldPrefix = `${fieldPrefix || ''}${field.name}_`;
const groupData = {};
const locale = table._locale;
const refKey = isLocalized && locale ? locale : field.name;
if (isLocalized && locale) {
delete table._locale;
}
ref[refKey] = traverseFields({
adapter,
blocks,
config,
currentTableName,
dataRef: groupData,
deletions,
fieldPrefix: groupFieldPrefix,
fields: field.flattenedFields,
joinQuery,
numbers,
parentIsLocalized: parentIsLocalized || field.localized,
path: `${sanitizedPath}${field.name}`,
relationships,
table,
tablePath: `${tablePath}${toSnakeCase(field.name)}_`,
texts,
topLevelTableName,
withinArrayOrBlockLocale: locale || withinArrayOrBlockLocale
});
return;
}
case 'number':
{
if (typeof fieldData === 'string') {
val = Number.parseFloat(fieldData);
}
break;
}
case 'point':
{
if (typeof fieldData === 'string') {
val = JSON.parse(fieldData);
}
break;
}
case 'relationship':
case 'upload':
{
if (val && typeof field.relationTo === 'string' && adapter.payload.collections[field.relationTo].customIDType === 'number') {
val = Number(val);
}
break;
}
case 'text':
{
if (typeof fieldData === 'string') {
val = String(fieldData);
}
break;
}
default:
{
break;
}
}
if (typeof locale === 'string') {
ref[locale] = val;
} else {
result[field.name] = val;
}
});
if (Object.keys(localizedFieldData).length > 0) {
result[field.name] = localizedFieldData;
}
return result;
}, dataRef);
if (Array.isArray(table._locales)) {
deletions.push(()=>delete table._locales);
}
return formatted;
};
//# sourceMappingURL=traverseFields.js.map
@@ -0,0 +1,8 @@
/**
* Collects all child elements of an element.
*
* @param node the element
*/
export default function childElements(node) {
return node ? Array.from(node.children) : [];
}
@@ -0,0 +1,545 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.monaco_loader = factory());
})(this, (function () { 'use strict';
function _arrayLikeToArray(r, a) {
(null == a || a > r.length) && (a = r.length);
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
return n;
}
function _arrayWithHoles(r) {
if (Array.isArray(r)) return r;
}
function _defineProperty$1(e, r, t) {
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
value: t,
enumerable: true,
configurable: true,
writable: true
}) : e[r] = t, e;
}
function _iterableToArrayLimit(r, l) {
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
if (null != t) {
var e,
n,
i,
u,
a = [],
f = true,
o = false;
try {
if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
} catch (r) {
o = true, n = r;
} finally {
try {
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
} finally {
if (o) throw n;
}
}
return a;
}
}
function _nonIterableRest() {
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
function ownKeys$1(e, r) {
var t = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var o = Object.getOwnPropertySymbols(e);
r && (o = o.filter(function (r) {
return Object.getOwnPropertyDescriptor(e, r).enumerable;
})), t.push.apply(t, o);
}
return t;
}
function _objectSpread2$1(e) {
for (var r = 1; r < arguments.length; r++) {
var t = null != arguments[r] ? arguments[r] : {};
r % 2 ? ownKeys$1(Object(t), true).forEach(function (r) {
_defineProperty$1(e, r, t[r]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) {
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
});
}
return e;
}
function _objectWithoutProperties(e, t) {
if (null == e) return {};
var o,
r,
i = _objectWithoutPropertiesLoose(e, t);
if (Object.getOwnPropertySymbols) {
var n = Object.getOwnPropertySymbols(e);
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
}
return i;
}
function _objectWithoutPropertiesLoose(r, e) {
if (null == r) return {};
var t = {};
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
if (-1 !== e.indexOf(n)) continue;
t[n] = r[n];
}
return t;
}
function _slicedToArray(r, e) {
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
}
function _toPrimitive(t, r) {
if ("object" != typeof t || !t) return t;
var e = t[Symbol.toPrimitive];
if (void 0 !== e) {
var i = e.call(t, r);
if ("object" != typeof i) return i;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return ("string" === r ? String : Number)(t);
}
function _toPropertyKey(t) {
var i = _toPrimitive(t, "string");
return "symbol" == typeof i ? i : i + "";
}
function _unsupportedIterableToArray(r, a) {
if (r) {
if ("string" == typeof r) return _arrayLikeToArray(r, a);
var t = {}.toString.call(r).slice(8, -1);
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
}
}
function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
function ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (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 = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
ownKeys(Object(source), true).forEach(function (key) {
_defineProperty(target, key, source[key]);
});
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
} else {
ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
}
}
return target;
}
function compose$1() {
for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {
fns[_key] = arguments[_key];
}
return function (x) {
return fns.reduceRight(function (y, f) {
return f(y);
}, x);
};
}
function curry$1(fn) {
return function curried() {
var _this = this;
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
return args.length >= fn.length ? fn.apply(this, args) : function () {
for (var _len3 = arguments.length, nextArgs = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
nextArgs[_key3] = arguments[_key3];
}
return curried.apply(_this, [].concat(args, nextArgs));
};
};
}
function isObject$1(value) {
return {}.toString.call(value).includes('Object');
}
function isEmpty(obj) {
return !Object.keys(obj).length;
}
function isFunction(value) {
return typeof value === 'function';
}
function hasOwnProperty(object, property) {
return Object.prototype.hasOwnProperty.call(object, property);
}
function validateChanges(initial, changes) {
if (!isObject$1(changes)) errorHandler$1('changeType');
if (Object.keys(changes).some(function (field) {
return !hasOwnProperty(initial, field);
})) errorHandler$1('changeField');
return changes;
}
function validateSelector(selector) {
if (!isFunction(selector)) errorHandler$1('selectorType');
}
function validateHandler(handler) {
if (!(isFunction(handler) || isObject$1(handler))) errorHandler$1('handlerType');
if (isObject$1(handler) && Object.values(handler).some(function (_handler) {
return !isFunction(_handler);
})) errorHandler$1('handlersType');
}
function validateInitial(initial) {
if (!initial) errorHandler$1('initialIsRequired');
if (!isObject$1(initial)) errorHandler$1('initialType');
if (isEmpty(initial)) errorHandler$1('initialContent');
}
function throwError$1(errorMessages, type) {
throw new Error(errorMessages[type] || errorMessages["default"]);
}
var errorMessages$1 = {
initialIsRequired: 'initial state is required',
initialType: 'initial state should be an object',
initialContent: 'initial state shouldn\'t be an empty object',
handlerType: 'handler should be an object or a function',
handlersType: 'all handlers should be a functions',
selectorType: 'selector should be a function',
changeType: 'provided value of changes should be an object',
changeField: 'it seams you want to change a field in the state which is not specified in the "initial" state',
"default": 'an unknown error accured in `state-local` package'
};
var errorHandler$1 = curry$1(throwError$1)(errorMessages$1);
var validators$1 = {
changes: validateChanges,
selector: validateSelector,
handler: validateHandler,
initial: validateInitial
};
function create(initial) {
var handler = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
validators$1.initial(initial);
validators$1.handler(handler);
var state = {
current: initial
};
var didUpdate = curry$1(didStateUpdate)(state, handler);
var update = curry$1(updateState)(state);
var validate = curry$1(validators$1.changes)(initial);
var getChanges = curry$1(extractChanges)(state);
function getState() {
var selector = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function (state) {
return state;
};
validators$1.selector(selector);
return selector(state.current);
}
function setState(causedChanges) {
compose$1(didUpdate, update, validate, getChanges)(causedChanges);
}
return [getState, setState];
}
function extractChanges(state, causedChanges) {
return isFunction(causedChanges) ? causedChanges(state.current) : causedChanges;
}
function updateState(state, changes) {
state.current = _objectSpread2(_objectSpread2({}, state.current), changes);
return changes;
}
function didStateUpdate(state, handler, changes) {
isFunction(handler) ? handler(state.current) : Object.keys(changes).forEach(function (field) {
var _handler$field;
return (_handler$field = handler[field]) === null || _handler$field === void 0 ? void 0 : _handler$field.call(handler, state.current[field]);
});
return changes;
}
var index = {
create: create
};
var config$1 = {
paths: {
vs: 'https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs'
}
};
function curry(fn) {
return function curried() {
var _this = this;
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return args.length >= fn.length ? fn.apply(this, args) : function () {
for (var _len2 = arguments.length, nextArgs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
nextArgs[_key2] = arguments[_key2];
}
return curried.apply(_this, [].concat(args, nextArgs));
};
};
}
function isObject(value) {
return {}.toString.call(value).includes('Object');
}
/**
* validates the configuration object and informs about deprecation
* @param {Object} config - the configuration object
* @return {Object} config - the validated configuration object
*/
function validateConfig(config) {
if (!config) errorHandler('configIsRequired');
if (!isObject(config)) errorHandler('configType');
if (config.urls) {
informAboutDeprecation();
return {
paths: {
vs: config.urls.monacoBase
}
};
}
return config;
}
/**
* logs deprecation message
*/
function informAboutDeprecation() {
console.warn(errorMessages.deprecation);
}
function throwError(errorMessages, type) {
throw new Error(errorMessages[type] || errorMessages["default"]);
}
var errorMessages = {
configIsRequired: 'the configuration object is required',
configType: 'the configuration object should be an object',
"default": 'an unknown error accured in `@monaco-editor/loader` package',
deprecation: "Deprecation warning!\n You are using deprecated way of configuration.\n\n Instead of using\n monaco.config({ urls: { monacoBase: '...' } })\n use\n monaco.config({ paths: { vs: '...' } })\n\n For more please check the link https://github.com/suren-atoyan/monaco-loader#config\n "
};
var errorHandler = curry(throwError)(errorMessages);
var validators = {
config: validateConfig
};
var compose = function compose() {
for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {
fns[_key] = arguments[_key];
}
return function (x) {
return fns.reduceRight(function (y, f) {
return f(y);
}, x);
};
};
function merge(target, source) {
Object.keys(source).forEach(function (key) {
if (source[key] instanceof Object) {
if (target[key]) {
Object.assign(source[key], merge(target[key], source[key]));
}
}
});
return _objectSpread2$1(_objectSpread2$1({}, target), source);
}
// The source (has been changed) is https://github.com/facebook/react/issues/5465#issuecomment-157888325
var CANCELATION_MESSAGE = {
type: 'cancelation',
msg: 'operation is manually canceled'
};
function makeCancelable(promise) {
var hasCanceled_ = false;
var wrappedPromise = new Promise(function (resolve, reject) {
promise.then(function (val) {
return hasCanceled_ ? reject(CANCELATION_MESSAGE) : resolve(val);
});
promise["catch"](reject);
});
return wrappedPromise.cancel = function () {
return hasCanceled_ = true;
}, wrappedPromise;
}
var _excluded = ["monaco"];
/** the local state of the module */
var _state$create = index.create({
config: config$1,
isInitialized: false,
resolve: null,
reject: null,
monaco: null
}),
_state$create2 = _slicedToArray(_state$create, 2),
getState = _state$create2[0],
setState = _state$create2[1];
/**
* set the loader configuration
* @param {Object} config - the configuration object
*/
function config(globalConfig) {
var _validators$config = validators.config(globalConfig),
monaco = _validators$config.monaco,
config = _objectWithoutProperties(_validators$config, _excluded);
setState(function (state) {
return {
config: merge(state.config, config),
monaco: monaco
};
});
}
/**
* handles the initialization of the monaco-editor
* @return {Promise} - returns an instance of monaco (with a cancelable promise)
*/
function init() {
var state = getState(function (_ref) {
var monaco = _ref.monaco,
isInitialized = _ref.isInitialized,
resolve = _ref.resolve;
return {
monaco: monaco,
isInitialized: isInitialized,
resolve: resolve
};
});
if (!state.isInitialized) {
setState({
isInitialized: true
});
if (state.monaco) {
state.resolve(state.monaco);
return makeCancelable(wrapperPromise);
}
if (window.monaco && window.monaco.editor) {
storeMonacoInstance(window.monaco);
state.resolve(window.monaco);
return makeCancelable(wrapperPromise);
}
compose(injectScripts, getMonacoLoaderScript)(configureLoader);
}
return makeCancelable(wrapperPromise);
}
/**
* injects provided scripts into the document.body
* @param {Object} script - an HTML script element
* @return {Object} - the injected HTML script element
*/
function injectScripts(script) {
return document.body.appendChild(script);
}
/**
* creates an HTML script element with/without provided src
* @param {string} [src] - the source path of the script
* @return {Object} - the created HTML script element
*/
function createScript(src) {
var script = document.createElement('script');
return src && (script.src = src), script;
}
/**
* creates an HTML script element with the monaco loader src
* @return {Object} - the created HTML script element
*/
function getMonacoLoaderScript(configureLoader) {
var state = getState(function (_ref2) {
var config = _ref2.config,
reject = _ref2.reject;
return {
config: config,
reject: reject
};
});
var loaderScript = createScript("".concat(state.config.paths.vs, "/loader.js"));
loaderScript.onload = function () {
return configureLoader();
};
loaderScript.onerror = state.reject;
return loaderScript;
}
/**
* configures the monaco loader
*/
function configureLoader() {
var state = getState(function (_ref3) {
var config = _ref3.config,
resolve = _ref3.resolve,
reject = _ref3.reject;
return {
config: config,
resolve: resolve,
reject: reject
};
});
var require = window.require;
require.config(state.config);
require(['vs/editor/editor.main'], function (loaded) {
var monaco = loaded.m /* for 0.53 & 0.54 */ || loaded /* for other versions */;
storeMonacoInstance(monaco);
state.resolve(monaco);
}, function (error) {
state.reject(error);
});
}
/**
* store monaco instance in local state
*/
function storeMonacoInstance(monaco) {
if (!getState().monaco) {
setState({
monaco: monaco
});
}
}
/**
* internal helper function
* extracts stored monaco instance
* @return {Object|null} - the monaco instance
*/
function __getMonacoInstance() {
return getState(function (_ref4) {
var monaco = _ref4.monaco;
return monaco;
});
}
var wrapperPromise = new Promise(function (resolve, reject) {
return setState({
resolve: resolve,
reject: reject
});
});
var loader = {
config: config,
init: init,
__getMonacoInstance: __getMonacoInstance
};
return loader;
}));
@@ -0,0 +1 @@
{"version":3,"file":"querying.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/0ab8bcf1ecfc70dfc93291a4cb2496578ac25e9c/src/","sources":["querying.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE9E;;;;;;;;;GASG;AACH,wBAAgB,MAAM,CAClB,IAAI,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,EAChC,IAAI,EAAE,OAAO,GAAG,OAAO,EAAE,EACzB,OAAO,UAAO,EACd,KAAK,GAAE,MAAiB,GACzB,OAAO,EAAE,CAEX;AAED;;;;;;;;;GASG;AACH,wBAAgB,IAAI,CAChB,IAAI,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,EAChC,KAAK,EAAE,OAAO,EAAE,GAAG,UAAU,EAC7B,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,MAAM,GACd,OAAO,EAAE,CAuCX;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAC1B,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,EAC1B,KAAK,EAAE,CAAC,EAAE,GACX,CAAC,GAAG,SAAS,CAEf;AAED;;;;;;;;GAQG;AACH,wBAAgB,OAAO,CACnB,IAAI,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,EAChC,KAAK,EAAE,OAAO,EAAE,GAAG,UAAU,EAC7B,OAAO,UAAO,GACf,OAAO,GAAG,IAAI,CAchB;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CACrB,IAAI,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,EAChC,KAAK,EAAE,OAAO,EAAE,GAAG,UAAU,GAC9B,OAAO,CAMT;AAED;;;;;;;;;GASG;AACH,wBAAgB,OAAO,CACnB,IAAI,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,EAChC,KAAK,EAAE,OAAO,EAAE,GAAG,UAAU,GAC9B,OAAO,EAAE,CA4BX"}
@@ -0,0 +1,83 @@
/**
* 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.
*
* @flow strict
*/
import type {LexicalCommand, LexicalEditor, NodeKey, TextNode} from 'lexical';
import * as React from 'react';
export type MenuTextMatch = {
leadOffset: number,
matchingString: string,
replaceableString: string,
};
export type MenuResolution = {
match?: MenuTextMatch,
getRect: () => ClientRect,
};
export const PUNCTUATION: string =
'\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%\'"~=<>_:;';
declare export class MenuOption {
key: string;
ref: {current: HTMLElement | null};
constructor(key: string): void;
setRefElement(element: HTMLElement | null): void;
}
declare export var SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND: LexicalCommand<{
index: number,
option: MenuOption,
}>;
export type MenuRenderFn<TOption> = (
anchorElementRef: {current: HTMLElement | null},
itemProps: {
selectedIndex: number | null,
selectOptionAndCleanUp: (option: TOption) => void,
setHighlightedIndex: (index: number) => void,
options: Array<TOption>,
},
matchingString: string,
) => React.Portal | React.MixedElement | null;
declare export function getScrollParent(
element: HTMLElement,
includeHidden: boolean,
): HTMLElement | HTMLBodyElement;
declare export function useBasicTypeaheadTriggerMatch(
trigger: string,
options: {minLength?: number, maxLength?: number},
): TriggerFn;
export type TypeaheadMenuPluginProps<TOption> = {
onQueryChange: (matchingString: string | null) => void,
onSelectOption: (
option: TOption,
textNodeContainingQuery: TextNode | null,
closeMenu: () => void,
matchingString: string,
) => void,
options: Array<TOption>,
menuRenderFn: MenuRenderFn<TOption>,
triggerFn: TriggerFn,
onOpen?: (resolution: MenuResolution) => void,
onClose?: () => void,
anchorClassName?: string,
};
export type TriggerFn = (
text: string,
editor: LexicalEditor,
) => MenuTextMatch | null;
declare export function LexicalTypeaheadMenuPlugin<TOption>(
options: TypeaheadMenuPluginProps<TOption>,
): React.MixedElement | null;
@@ -0,0 +1,33 @@
var baseDifference = require('./_baseDifference'),
baseFlatten = require('./_baseFlatten'),
baseRest = require('./_baseRest'),
isArrayLikeObject = require('./isArrayLikeObject');
/**
* Creates an array of `array` values not included in the other given arrays
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* for equality comparisons. The order and references of result values are
* determined by the first array.
*
* **Note:** Unlike `_.pullAll`, this method returns a new array.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {Array} array The array to inspect.
* @param {...Array} [values] The values to exclude.
* @returns {Array} Returns the new array of filtered values.
* @see _.without, _.xor
* @example
*
* _.difference([2, 1], [2, 3]);
* // => [1]
*/
var difference = baseRest(function(array, values) {
return isArrayLikeObject(array)
? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
: [];
});
module.exports = difference;
@@ -0,0 +1,20 @@
/**
* @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 FileScan = createLucideIcon("FileScan", [
["path", { d: "M20 10V7l-5-5H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h4", key: "1rdf37" }],
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
["path", { d: "M16 14a2 2 0 0 0-2 2", key: "ceaadl" }],
["path", { d: "M20 14a2 2 0 0 1 2 2", key: "1ny6zw" }],
["path", { d: "M20 22a2 2 0 0 0 2-2", key: "1l9q4k" }],
["path", { d: "M16 22a2 2 0 0 1-2-2", key: "1wqh5n" }]
]);
export { FileScan as default };
//# sourceMappingURL=file-scan.js.map
@@ -0,0 +1 @@
{"version":3,"file":"cast.js","sources":["../../../src/icons/cast.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Cast\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMiA4VjZhMiAyIDAgMCAxIDItMmgxNmEyIDIgMCAwIDEgMiAydjEyYTIgMiAwIDAgMS0yIDJoLTYiIC8+CiAgPHBhdGggZD0iTTIgMTJhOSA5IDAgMCAxIDggOCIgLz4KICA8cGF0aCBkPSJNMiAxNmE1IDUgMCAwIDEgNCA0IiAvPgogIDxsaW5lIHgxPSIyIiB4Mj0iMi4wMSIgeTE9IjIwIiB5Mj0iMjAiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/cast\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 Cast = createLucideIcon('Cast', [\n ['path', { d: 'M2 8V6a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-6', key: '3zrzxg' }],\n ['path', { d: 'M2 12a9 9 0 0 1 8 8', key: 'g6cvee' }],\n ['path', { d: 'M2 16a5 5 0 0 1 4 4', key: '1y1dii' }],\n ['line', { x1: '2', x2: '2.01', y1: '20', y2: '20', key: 'xu2jvo' }],\n]);\n\nexport default Cast;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,iBAAiB,MAAQ,CAAA,CAAA,CAAA;AAAA,CAAA,CACpC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC1F,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAuB,CAAA,CAAA,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,CACpD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAuB,CAAA,CAAA,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,CACpD,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAQ,CAAA,CAAA,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;AACrE,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,7 @@
"use strict";
exports.sub = void 0;
var _index = require("../sub.cjs");
var _index2 = require("./_lib/convertToFP.cjs"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
const sub = (exports.sub = (0, _index2.convertToFP)(_index.sub, 2));
@@ -0,0 +1,47 @@
"use strict";
exports.isSameSecond = isSameSecond;
var _index = require("./startOfSecond.cjs");
/**
* @name isSameSecond
* @category Second Helpers
* @summary Are the given dates in the same second (and hour and day)?
*
* @description
* Are the given dates in the same second (and hour and day)?
*
* @param laterDate - The first date to check
* @param earlierDate - The second date to check
*
* @returns The dates are in the same second (and hour and day)
*
* @example
* // Are 4 September 2014 06:30:15.000 and 4 September 2014 06:30.15.500 in the same second?
* const result = isSameSecond(
* new Date(2014, 8, 4, 6, 30, 15),
* new Date(2014, 8, 4, 6, 30, 15, 500)
* )
* //=> true
*
* @example
* // Are 4 September 2014 06:00:15.000 and 4 September 2014 06:01.15.000 in the same second?
* const result = isSameSecond(
* new Date(2014, 8, 4, 6, 0, 15),
* new Date(2014, 8, 4, 6, 1, 15)
* )
* //=> false
*
* @example
* // Are 4 September 2014 06:00:15.000 and 5 September 2014 06:00.15.000 in the same second?
* const result = isSameSecond(
* new Date(2014, 8, 4, 6, 0, 15),
* new Date(2014, 8, 5, 6, 0, 15)
* )
* //=> false
*/
function isSameSecond(laterDate, earlierDate) {
return (
+(0, _index.startOfSecond)(laterDate) ===
+(0, _index.startOfSecond)(earlierDate)
);
}
@@ -0,0 +1,40 @@
import { entityKind } from "../../entity.cjs";
import type { GelDialectConfig } from "../dialect.cjs";
import { GelDialect } from "../dialect.cjs";
import type { TypedQueryBuilder } from "../../query-builders/query-builder.cjs";
import type { ColumnsSelection, SQLWrapper } from "../../sql/sql.cjs";
import { WithSubquery } from "../../subquery.cjs";
import type { GelColumn } from "../columns/index.cjs";
import type { WithSubqueryWithSelection } from "../subquery.cjs";
import { GelSelectBuilder } from "./select.cjs";
import type { SelectedFields } from "./select.types.cjs";
export declare class QueryBuilder {
static readonly [entityKind]: string;
private dialect;
private dialectConfig;
constructor(dialect?: GelDialect | GelDialectConfig);
$with<TAlias extends string>(alias: TAlias): {
as<TSelection extends ColumnsSelection>(qb: TypedQueryBuilder<TSelection> | ((qb: QueryBuilder) => TypedQueryBuilder<TSelection>)): WithSubqueryWithSelection<TSelection, TAlias>;
};
with(...queries: WithSubquery[]): {
select: {
(): GelSelectBuilder<undefined, "qb">;
<TSelection extends SelectedFields>(fields: TSelection): GelSelectBuilder<TSelection, "qb">;
};
selectDistinct: {
(): GelSelectBuilder<undefined, "qb">;
<TSelection extends SelectedFields>(fields: TSelection): GelSelectBuilder<TSelection, "qb">;
};
selectDistinctOn: {
(on: (GelColumn | SQLWrapper)[]): GelSelectBuilder<undefined, "qb">;
<TSelection extends SelectedFields>(on: (GelColumn | SQLWrapper)[], fields: TSelection): GelSelectBuilder<TSelection, "qb">;
};
};
select(): GelSelectBuilder<undefined, 'qb'>;
select<TSelection extends SelectedFields>(fields: TSelection): GelSelectBuilder<TSelection, 'qb'>;
selectDistinct(): GelSelectBuilder<undefined>;
selectDistinct<TSelection extends SelectedFields>(fields: TSelection): GelSelectBuilder<TSelection>;
selectDistinctOn(on: (GelColumn | SQLWrapper)[]): GelSelectBuilder<undefined>;
selectDistinctOn<TSelection extends SelectedFields>(on: (GelColumn | SQLWrapper)[], fields: TSelection): GelSelectBuilder<TSelection>;
private getDialect;
}
@@ -0,0 +1,43 @@
import type { RequestEventData } from '../types-hoist/request';
import type { WebFetchHeaders, WebFetchRequest } from '../types-hoist/webfetchapi';
/**
* Transforms a `Headers` object that implements the `Web Fetch API` (https://developer.mozilla.org/en-US/docs/Web/API/Headers) into a simple key-value dict.
* The header keys will be lower case: e.g. A "Content-Type" header will be stored as "content-type".
*/
export declare function winterCGHeadersToDict(winterCGHeaders: WebFetchHeaders): Record<string, string>;
/**
* Convert common request headers to a simple dictionary.
*/
export declare function headersToDict(reqHeaders: Record<string, string | string[] | undefined>): Record<string, string>;
/**
* Converts a `Request` object that implements the `Web Fetch API` (https://developer.mozilla.org/en-US/docs/Web/API/Headers) into the format that the `RequestData` integration understands.
*/
export declare function winterCGRequestToRequestData(req: WebFetchRequest): RequestEventData;
/**
* Convert a HTTP request object to RequestEventData to be passed as normalizedRequest.
* Instead of allowing `PolymorphicRequest` to be passed,
* we want to be more specific and generally require a http.IncomingMessage-like object.
*/
export declare function httpRequestToRequestData(request: {
method?: string;
url?: string;
headers?: {
[key: string]: string | string[] | undefined;
};
protocol?: string;
socket?: {
encrypted?: boolean;
remoteAddress?: string;
};
}): RequestEventData;
/**
* Converts incoming HTTP request headers to OpenTelemetry span attributes following semantic conventions.
* Header names are converted to the format: http.request.header.<key>
* where <key> is the header name in lowercase with dashes converted to underscores.
*
* @see https://opentelemetry.io/docs/specs/semconv/registry/attributes/http/#http-request-header
*/
export declare function httpHeadersToSpanAttributes(headers: Record<string, string | string[] | undefined>, sendDefaultPii?: boolean): Record<string, string>;
/** Extract the query params from an URL. */
export declare function extractQueryParamsFromUrl(url: string): string | undefined;
//# sourceMappingURL=request.d.ts.map
@@ -0,0 +1,229 @@
"use strict";
exports.localize = void 0;
var _index = require("../../_lib/buildLocalizeFn.cjs");
const eraValues = {
narrow: ["pr.n.e.", "AD"],
abbreviated: ["pr. Hr.", "po. Hr."],
wide: ["Prije Hrista", "Poslije Hrista"],
};
const quarterValues = {
narrow: ["1.", "2.", "3.", "4."],
abbreviated: ["1. kv.", "2. kv.", "3. kv.", "4. kv."],
wide: ["1. kvartal", "2. kvartal", "3. kvartal", "4. kvartal"],
};
const monthValues = {
narrow: [
"1.",
"2.",
"3.",
"4.",
"5.",
"6.",
"7.",
"8.",
"9.",
"10.",
"11.",
"12.",
],
abbreviated: [
"jan",
"feb",
"mar",
"apr",
"maj",
"jun",
"jul",
"avg",
"sep",
"okt",
"nov",
"dec",
],
wide: [
"januar",
"februar",
"mart",
"april",
"maj",
"juni",
"juli",
"avgust",
"septembar",
"oktobar",
"novembar",
"decembar",
],
};
const formattingMonthValues = {
narrow: [
"1.",
"2.",
"3.",
"4.",
"5.",
"6.",
"7.",
"8.",
"9.",
"10.",
"11.",
"12.",
],
abbreviated: [
"jan",
"feb",
"mar",
"apr",
"maj",
"jun",
"jul",
"avg",
"sep",
"okt",
"nov",
"dec",
],
wide: [
"januar",
"februar",
"mart",
"april",
"maj",
"juni",
"juli",
"avgust",
"septembar",
"oktobar",
"novembar",
"decembar",
],
};
const dayValues = {
narrow: ["N", "P", "U", "S", "Č", "P", "S"],
short: ["ned", "pon", "uto", "sre", "čet", "pet", "sub"],
abbreviated: ["ned", "pon", "uto", "sre", "čet", "pet", "sub"],
wide: [
"nedjelja",
"ponedjeljak",
"utorak",
"srijeda",
"četvrtak",
"petak",
"subota",
],
};
const dayPeriodValues = {
narrow: {
am: "AM",
pm: "PM",
midnight: "ponoć",
noon: "podne",
morning: "ujutru",
afternoon: "popodne",
evening: "uveče",
night: "noću",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "ponoć",
noon: "podne",
morning: "ujutru",
afternoon: "popodne",
evening: "uveče",
night: "noću",
},
wide: {
am: "AM",
pm: "PM",
midnight: "ponoć",
noon: "podne",
morning: "ujutru",
afternoon: "poslije podne",
evening: "uveče",
night: "noću",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "AM",
pm: "PM",
midnight: "ponoć",
noon: "podne",
morning: "ujutru",
afternoon: "popodne",
evening: "uveče",
night: "noću",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "ponoć",
noon: "podne",
morning: "ujutru",
afternoon: "popodne",
evening: "uveče",
night: "noću",
},
wide: {
am: "AM",
pm: "PM",
midnight: "ponoć",
noon: "podne",
morning: "ujutru",
afternoon: "poslije podne",
evening: "uveče",
night: "noću",
},
};
const ordinalNumber = (dirtyNumber, _options) => {
const number = Number(dirtyNumber);
return String(number) + ".";
};
const localize = (exports.localize = {
ordinalNumber,
era: (0, _index.buildLocalizeFn)({
values: eraValues,
defaultWidth: "wide",
}),
quarter: (0, _index.buildLocalizeFn)({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: (0, _index.buildLocalizeFn)({
values: monthValues,
defaultWidth: "wide",
formattingValues: formattingMonthValues,
defaultFormattingWidth: "wide",
}),
day: (0, _index.buildLocalizeFn)({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: (0, _index.buildLocalizeFn)({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
});
@@ -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 MonitorSmartphone = createLucideIcon("MonitorSmartphone", [
["path", { d: "M18 8V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h8", key: "10dyio" }],
["path", { d: "M10 19v-3.96 3.15", key: "1irgej" }],
["path", { d: "M7 19h5", key: "qswx4l" }],
["rect", { width: "6", height: "10", x: "16", y: "12", rx: "2", key: "1egngj" }]
]);
export { MonitorSmartphone as default };
//# sourceMappingURL=monitor-smartphone.js.map
@@ -0,0 +1 @@
{"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../../src/views/Unauthorized/metadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAI5D,eAAO,MAAM,gCAAgC,EAAE,oBAU3C,CAAA"}
@@ -0,0 +1,67 @@
'use client';
import { c as _c } from "react/compiler-runtime";
import { jsx as _jsx } from "react/jsx-runtime";
import React from 'react';
import { Tooltip } from '../../elements/Tooltip/index.js';
import { useFormFields, useFormSubmitted } from '../../forms/Form/context.js';
import './index.scss';
const baseClass = 'field-error';
export const FieldError = props => {
const $ = _c(8);
const {
alignCaret: t0,
message: messageFromProps,
path,
showError: showErrorFromProps
} = props;
const alignCaret = t0 === undefined ? "right" : t0;
const hasSubmitted = useFormSubmitted();
let t1;
if ($[0] !== path) {
t1 = t2 => {
const [fields] = t2;
return fields && fields?.[path] || null;
};
$[0] = path;
$[1] = t1;
} else {
t1 = $[1];
}
const field = useFormFields(t1);
let t2;
if ($[2] !== alignCaret || $[3] !== field || $[4] !== hasSubmitted || $[5] !== messageFromProps || $[6] !== showErrorFromProps) {
t2 = Symbol.for("react.early_return_sentinel");
bb0: {
const {
errorMessage,
valid
} = field || {};
const message = messageFromProps || errorMessage;
const showMessage = showErrorFromProps || hasSubmitted && valid === false;
if (showMessage && message?.length) {
t2 = _jsx(Tooltip, {
alignCaret,
className: baseClass,
delay: 0,
staticPositioning: true,
children: message
});
break bb0;
}
}
$[2] = alignCaret;
$[3] = field;
$[4] = hasSubmitted;
$[5] = messageFromProps;
$[6] = showErrorFromProps;
$[7] = t2;
} else {
t2 = $[7];
}
if (t2 !== Symbol.for("react.early_return_sentinel")) {
return t2;
}
return null;
};
//# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
{"version":3,"file":"httpServerSpansIntegration.d.ts","sourceRoot":"","sources":["../../../../src/integrations/http/httpServerSpansIntegration.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAuB,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAYrG,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAiB,IAAI,EAA8B,MAAM,cAAc,CAAC;AAaxG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAQnD,MAAM,WAAW,iCAAiC;IAChD;;;;;;;;;OASG;IACH,sBAAsB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,KAAK,OAAO,CAAC;IAEhF;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,CAAC,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC;IAElD;;OAEG;IACH,eAAe,CAAC,EAAE;QAChB,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,aAAa,GAAG,eAAe,KAAK,IAAI,CAAC;QACzE,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,eAAe,GAAG,cAAc,KAAK,IAAI,CAAC;QAChF,2BAA2B,CAAC,EAAE,CAC5B,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,aAAa,GAAG,eAAe,EACxC,QAAQ,EAAE,eAAe,GAAG,cAAc,KACvC,IAAI,CAAC;KACX,CAAC;IAEF;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,cAAc,KAAK,IAAI,CAAC;CAC1F;AA4KD;;;GAGG;AACH,eAAO,MAAM,0BAA0B,EAAkC,CACvE,OAAO,CAAC,EAAE,iCAAiC,KACxC,WAAW,GAAG;IACjB,IAAI,EAAE,iBAAiB,CAAC;IACxB,KAAK,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;IACpC,YAAY,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,KAAK,GAAG,IAAI,CAAC;CAC9C,CAAC;AAOF;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAa7D"}
@@ -0,0 +1,19 @@
# @babel/helper-module-imports
> Babel helper functions for inserting module loads
See our website [@babel/helper-module-imports](https://babeljs.io/docs/babel-helper-module-imports) for more information.
## Install
Using npm:
```sh
npm install --save @babel/helper-module-imports
```
or using yarn:
```sh
yarn add @babel/helper-module-imports
```
@@ -0,0 +1,9 @@
/**
* @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.
*/
export { default } from './rectangle-ellipsis.js';
//# sourceMappingURL=form-input.js.map
@@ -0,0 +1,28 @@
import { formatDistance } from "./zh-HK/_lib/formatDistance.mjs";
import { formatLong } from "./zh-HK/_lib/formatLong.mjs";
import { formatRelative } from "./zh-HK/_lib/formatRelative.mjs";
import { localize } from "./zh-HK/_lib/localize.mjs";
import { match } from "./zh-HK/_lib/match.mjs";
/**
* @category Locales
* @summary Chinese Traditional locale.
* @language Chinese Traditional
* @iso-639-2 zho
* @author Gary Ip [@gaplo](https://github.com/gaplo)
*/
export const zhHK = {
code: "zh-HK",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 0 /* Sunday */,
firstWeekContainsDate: 1,
},
};
// Fallback for modularized imports:
export default zhHK;
@@ -0,0 +1,71 @@
import { InstrumentationConfig } from '@opentelemetry/instrumentation';
import type * as api from '@opentelemetry/api';
export interface GraphQLInstrumentationExecutionResponseHook {
(span: api.Span, data: any): void;
}
export interface GraphQLInstrumentationConfig extends InstrumentationConfig {
/**
* When set to true it will not remove attributes values from schema source.
* By default all values that can be sensitive are removed and replaced
* with "*"
*
* @default false
*/
allowValues?: boolean;
/**
* The maximum depth of fields/resolvers to instrument.
* When set to 0 it will not instrument fields and resolvers
*
* @default undefined
*/
depth?: number;
/**
* Do not create spans for resolvers.
*
* @default false
*/
ignoreResolveSpans?: boolean;
/**
* Don't create spans for the execution of the default resolver on object properties.
*
* When a resolver function is not defined on the schema for a field, graphql will
* use the default resolver which just looks for a property with that name on the object.
* If the property is not a function, it's not very interesting to trace.
* This option can reduce noise and number of spans created.
*
* @default false
*/
ignoreTrivialResolveSpans?: boolean;
/**
* Place all resolve spans under the same parent instead of producing a nested tree structure.
*
* @default false
*/
flatResolveSpans?: boolean;
/**
* Whether to merge list items into a single element.
*
* @example `users.*.name` instead of `users.0.name`, `users.1.name`
*
* @default false
*/
mergeItems?: boolean;
/**
* Hook that allows adding custom span attributes based on the data
* returned from "execute" GraphQL action.
*
* @param data - A GraphQL `ExecutionResult` object. For the exact type definitions, see the following:
* - {@linkcode https://github.com/graphql/graphql-js/blob/v14.7.0/src/execution/execute.js#L115 graphql@14}
* - {@linkcode https://github.com/graphql/graphql-js/blob/15.x.x/src/execution/execute.d.ts#L31 graphql@15}
* - {@linkcode https://github.com/graphql/graphql-js/blob/16.x.x/src/execution/execute.ts#L127 graphql@16}
*
* @default undefined
*/
responseHook?: GraphQLInstrumentationExecutionResponseHook;
}
type RequireSpecificKeys<T, K extends keyof T> = T & {
[P in K]-?: T[P];
};
export type GraphQLInstrumentationParsedConfig = RequireSpecificKeys<GraphQLInstrumentationConfig, 'mergeItems' | 'depth' | 'allowValues' | 'ignoreResolveSpans'>;
export {};
//# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,21 @@
/**
* @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 ReceiptText = createLucideIcon("ReceiptText", [
[
"path",
{ 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" }
],
["path", { d: "M14 8H8", key: "1l3xfs" }],
["path", { d: "M16 12H8", key: "1fr5h0" }],
["path", { d: "M13 16H8", key: "wsln4y" }]
]);
export { ReceiptText as default };
//# sourceMappingURL=receipt-text.js.map
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/elements/Pagination/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,cAAc,CAAA;AAYrB,MAAM,MAAM,eAAe,GAAG;IAC5B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,IAAI,GACZ;IACE,KAAK,CAAC,EAAE;QACN,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;QAC5B,UAAU,CAAC,EAAE,OAAO,CAAA;QACpB,WAAW,CAAC,EAAE,OAAO,CAAA;QACrB,UAAU,CAAC,EAAE,OAAO,CAAA;QACpB,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,UAAU,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;KACpC,CAAA;IACD,IAAI,EAAE,gBAAgB,GAAG,MAAM,GAAG,WAAW,CAAA;CAC9C,GACD,MAAM,CAAA;AAEV,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA0GhD,CAAA"}
@@ -0,0 +1,32 @@
# Changelog
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## [1.0.2](https://github.com/niklasvh/utrie/compare/v1.0.1...v1.0.2) (2022-01-22)
### fix
* sourcemaps ([1e6e126](https://github.com/niklasvh/utrie/commit/1e6e12671fa187b5fbaca893460f114b085ce054))
## [1.0.1](https://github.com/niklasvh/utrie/compare/v1.0.0...v1.0.1) (2021-08-10)
### deps
* update base64-arraybuffer ([6a731a7](https://github.com/niklasvh/utrie/commit/6a731a77d34165905f7d91adc6fa3f4bb8a317d2))
# 1.0.0 (2021-08-09)
### deps
* add tslib ([3aaa8b1](https://github.com/niklasvh/utrie/commit/3aaa8b181e4eede4b55e50b0145e4bffb1366f82))
### fix
* main branch ([54e8310](https://github.com/niklasvh/utrie/commit/54e83101d7443e8b0e5761c7985ec94ee8ad1f6d))
@@ -0,0 +1,16 @@
/**
* @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 Music2 = createLucideIcon("Music2", [
["circle", { cx: "8", cy: "18", r: "4", key: "1fc0mg" }],
["path", { d: "M12 18V2l7 4", key: "g04rme" }]
]);
export { Music2 as default };
//# sourceMappingURL=music-2.js.map
@@ -0,0 +1,22 @@
/** JSDoc */
export interface StackFrame {
filename?: string;
function?: string;
module?: string;
platform?: string;
lineno?: number;
colno?: number;
abs_path?: string;
context_line?: string;
pre_context?: string[];
post_context?: string[];
in_app?: boolean;
instruction_addr?: string;
addr_mode?: string;
vars?: {
[key: string]: any;
};
debug_id?: string;
module_metadata?: any;
}
//# sourceMappingURL=stackframe.d.ts.map
@@ -0,0 +1,5 @@
export declare const getDaysInMonthWithOptions: import("./types.js").FPFn2<
number,
import("../getDaysInMonth.js").GetDaysInMonthOptions | undefined,
string | number | Date
>;
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B zC"},B:{"1":"0 1 2 3 4 5 6 7 8 o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I","2":"C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n"},C:{"1":"0 1 2 3 4 5 6 7 8 t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC 1C 2C 3C","2":"9 0C VC J bB K D E F A B C L M G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s 4C 5C"},D:{"1":"0 1 2 3 4 5 6 7 8 o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC","2":"9 J bB K D E F A B C L M G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R S T U V W X Y Z a b","194":"k l m n","450":"c d e f g h i j"},E:{"1":"SC fC gC hC iC jC FD TC kC lC mC nC oC GD UC pC qC rC sC HD tC uC vC wC ID","2":"J bB K D E F A B C L M G 6C bC 7C 8C 9C AD cC PC QC BD CD DD dC eC RC ED"},F:{"1":"0 1 2 3 4 5 6 7 8 a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"9 F B C G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC JD KD LD MD PC xC ND QC","194":"Q H R YC S T U V W X Y Z"},G:{"1":"SC fC gC hC iC jC jD TC kC lC mC nC oC kD UC pC qC rC sC lD tC uC vC wC","2":"E bC OD yC PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD eD fD gD hD dC eC RC iD"},H:{"2":"mD"},I:{"1":"I","2":"VC J nD oD pD qD yC rD sD"},J:{"2":"D A"},K:{"1":"H","2":"A B C PC xC QC"},L:{"1":"I"},M:{"1":"OC"},N:{"2":"A B"},O:{"2":"RC"},P:{"1":"9 AB BB CB DB EB FB GB HB IB","2":"J tD uD vD wD xD cC yD zD 0D 1D 2D SC TC UC 3D"},Q:{"2":"4D"},R:{"2":"5D"},S:{"2":"6D 7D"}},B:5,C:"CSS Container Query Units",D:true};
@@ -0,0 +1,21 @@
import { useEffect, useState } from 'react';
/**
* A custom React hook to throttle a value so that it updates no more than once every `delay` milliseconds.
* @param {any} value - The value to be throttled.
* @param {number} delay - The minimum delay (in milliseconds) between updates.
* @returns {any} - The throttled value.
*/
export function useThrottledValue(value, delay) {
const [throttledValue, setThrottledValue] = useState(value);
useEffect(() => {
const handler = setTimeout(() => {
setThrottledValue(value);
}, delay);
// Cleanup the timeout if the value changes before the delay is completed
return () => {
clearTimeout(handler);
};
}, [value, delay]);
return throttledValue;
}
//# sourceMappingURL=useThrottledValue.js.map
@@ -0,0 +1,137 @@
import { buildMatchFn } from "../../_lib/buildMatchFn.mjs";
import { buildMatchPatternFn } from "../../_lib/buildMatchPatternFn.mjs";
const matchOrdinalNumberPattern = /^(\d+)?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(Î|D)/i,
abbreviated:
/^(Î\.?\s?d\.?\s?C\.?|Î\.?\s?e\.?\s?n\.?|D\.?\s?C\.?|e\.?\s?n\.?)/i,
wide: /^(Înainte de Cristos|Înaintea erei noastre|După Cristos|Era noastră)/i,
};
const parseEraPatterns = {
any: [/^ÎC/i, /^DC/i],
wide: [
/^(Înainte de Cristos|Înaintea erei noastre)/i,
/^(După Cristos|Era noastră)/i,
],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^T[1234]/i,
wide: /^trimestrul [1234]/i,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
narrow: /^[ifmaasond]/i,
abbreviated: /^(ian|feb|mar|apr|mai|iun|iul|aug|sep|oct|noi|dec)/i,
wide: /^(ianuarie|februarie|martie|aprilie|mai|iunie|iulie|august|septembrie|octombrie|noiembrie|decembrie)/i,
};
const parseMonthPatterns = {
narrow: [
/^i/i,
/^f/i,
/^m/i,
/^a/i,
/^m/i,
/^i/i,
/^i/i,
/^a/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i,
],
any: [
/^ia/i,
/^f/i,
/^mar/i,
/^ap/i,
/^mai/i,
/^iun/i,
/^iul/i,
/^au/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i,
],
};
const matchDayPatterns = {
narrow: /^[dlmjvs]/i,
short: /^(d|l|ma|mi|j|v|s)/i,
abbreviated: /^(dum|lun|mar|mie|jo|vi|sâ)/i,
wide: /^(duminica|luni|marţi|miercuri|joi|vineri|sâmbătă)/i,
};
const parseDayPatterns = {
narrow: [/^d/i, /^l/i, /^m/i, /^m/i, /^j/i, /^v/i, /^s/i],
any: [/^d/i, /^l/i, /^ma/i, /^mi/i, /^j/i, /^v/i, /^s/i],
};
const matchDayPeriodPatterns = {
narrow: /^(a|p|mn|a|(dimineaţa|după-amiaza|seara|noaptea))/i,
any: /^([ap]\.?\s?m\.?|miezul nopții|amiaza|(dimineaţa|după-amiaza|seara|noaptea))/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^a/i,
pm: /^p/i,
midnight: /^mn/i,
noon: /amiaza/i,
morning: /dimineaţa/i,
afternoon: /după-amiaza/i,
evening: /seara/i,
night: /noaptea/i,
},
};
export const match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value, 10),
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => index + 1,
}),
month: buildMatchFn({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any",
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any",
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
};
@@ -0,0 +1,29 @@
import { formatDistance } from "./sl/_lib/formatDistance.mjs";
import { formatLong } from "./sl/_lib/formatLong.mjs";
import { formatRelative } from "./sl/_lib/formatRelative.mjs";
import { localize } from "./sl/_lib/localize.mjs";
import { match } from "./sl/_lib/match.mjs";
/**
* @category Locales
* @summary Slovenian locale.
* @language Slovenian
* @iso-639-2 slv
* @author Adam Stradovnik [@Neoglyph](https://github.com/Neoglyph)
* @author Mato Žgajner [@mzgajner](https://github.com/mzgajner)
*/
export const sl = {
code: "sl",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 1 /* Monday */,
firstWeekContainsDate: 1,
},
};
// Fallback for modularized imports:
export default sl;
@@ -0,0 +1 @@
{"version":3,"file":"debugger.js","sourceRoot":"","sources":["../../../src/core/debugger.ts"],"names":[],"mappings":";;;AAAA,IAAM,wBAAwB,GAAG,wBAAwB,CAAC;AAS1D,IAAM,mBAAmB,GAAG,UAAC,OAAgB;IACzC,IAAM,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,wBAAwB,CAAC,CAAC;IACjE,QAAQ,SAAS,EAAE;QACf,KAAK,KAAK;YACN,mBAAwB;QAC5B,KAAK,OAAO;YACR,qBAA0B;QAC9B,KAAK,OAAO;YACR,qBAA0B;QAC9B,KAAK,QAAQ;YACT,sBAA2B;QAC/B;YACI,oBAAyB;KAChC;AACL,CAAC,CAAC;AAEK,IAAM,WAAW,GAAG,UAAC,OAAgB,EAAE,IAA2C;IACrF,IAAM,WAAW,GAAG,mBAAmB,CAAC,OAAO,CAAC,CAAC;IACjD,OAAO,WAAW,gBAAqB,IAAI,IAAI,KAAK,WAAW,CAAC;AACpE,CAAC,CAAC;AAHW,QAAA,WAAW,eAGtB"}

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