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

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

View File

@@ -0,0 +1,157 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var session_exports = {};
__export(session_exports, {
OPSQLitePreparedQuery: () => OPSQLitePreparedQuery,
OPSQLiteSession: () => OPSQLiteSession,
OPSQLiteTransaction: () => OPSQLiteTransaction
});
module.exports = __toCommonJS(session_exports);
var import_core = require("../cache/core/index.cjs");
var import_entity = require("../entity.cjs");
var import_logger = require("../logger.cjs");
var import_sql = require("../sql/sql.cjs");
var import_sqlite_core = require("../sqlite-core/index.cjs");
var import_session = require("../sqlite-core/session.cjs");
var import_utils = require("../utils.cjs");
class OPSQLiteSession extends import_session.SQLiteSession {
constructor(client, dialect, schema, options = {}) {
super(dialect);
this.client = client;
this.schema = schema;
this.logger = options.logger ?? new import_logger.NoopLogger();
this.cache = options.cache ?? new import_core.NoopCache();
}
static [import_entity.entityKind] = "OPSQLiteSession";
logger;
cache;
prepareQuery(query, fields, executeMethod, isResponseInArrayMode, customResultMapper, queryMetadata, cacheConfig) {
return new OPSQLitePreparedQuery(
this.client,
query,
this.logger,
this.cache,
queryMetadata,
cacheConfig,
fields,
executeMethod,
isResponseInArrayMode,
customResultMapper
);
}
transaction(transaction, config = {}) {
const tx = new OPSQLiteTransaction("async", this.dialect, this, this.schema);
this.run(import_sql.sql.raw(`begin${config?.behavior ? " " + config.behavior : ""}`));
try {
const result = transaction(tx);
this.run(import_sql.sql`commit`);
return result;
} catch (err) {
this.run(import_sql.sql`rollback`);
throw err;
}
}
}
class OPSQLiteTransaction extends import_sqlite_core.SQLiteTransaction {
static [import_entity.entityKind] = "OPSQLiteTransaction";
transaction(transaction) {
const savepointName = `sp${this.nestedIndex}`;
const tx = new OPSQLiteTransaction("async", this.dialect, this.session, this.schema, this.nestedIndex + 1);
this.session.run(import_sql.sql.raw(`savepoint ${savepointName}`));
try {
const result = transaction(tx);
this.session.run(import_sql.sql.raw(`release savepoint ${savepointName}`));
return result;
} catch (err) {
this.session.run(import_sql.sql.raw(`rollback to savepoint ${savepointName}`));
throw err;
}
}
}
class OPSQLitePreparedQuery extends import_session.SQLitePreparedQuery {
constructor(client, query, logger, cache, queryMetadata, cacheConfig, fields, executeMethod, _isResponseInArrayMode, customResultMapper) {
super("sync", executeMethod, query, cache, queryMetadata, cacheConfig);
this.client = client;
this.logger = logger;
this.fields = fields;
this._isResponseInArrayMode = _isResponseInArrayMode;
this.customResultMapper = customResultMapper;
}
static [import_entity.entityKind] = "OPSQLitePreparedQuery";
async run(placeholderValues) {
const params = (0, import_sql.fillPlaceholders)(this.query.params, placeholderValues ?? {});
this.logger.logQuery(this.query.sql, params);
return await this.queryWithCache(this.query.sql, params, async () => {
return this.client.executeAsync(this.query.sql, params);
});
}
async all(placeholderValues) {
const { fields, joinsNotNullableMap, query, logger, customResultMapper, client } = this;
if (!fields && !customResultMapper) {
const params = (0, import_sql.fillPlaceholders)(query.params, placeholderValues ?? {});
logger.logQuery(query.sql, params);
return await this.queryWithCache(query.sql, params, async () => {
return client.execute(query.sql, params).rows?._array || [];
});
}
const rows = await this.values(placeholderValues);
if (customResultMapper) {
return customResultMapper(rows);
}
return rows.map((row) => (0, import_utils.mapResultRow)(fields, row, joinsNotNullableMap));
}
async get(placeholderValues) {
const { fields, joinsNotNullableMap, customResultMapper, query, logger, client } = this;
const params = (0, import_sql.fillPlaceholders)(query.params, placeholderValues ?? {});
logger.logQuery(query.sql, params);
if (!fields && !customResultMapper) {
const rows2 = await this.queryWithCache(query.sql, params, async () => {
return client.execute(query.sql, params).rows?._array || [];
});
return rows2[0];
}
const rows = await this.values(placeholderValues);
const row = rows[0];
if (!row) {
return void 0;
}
if (customResultMapper) {
return customResultMapper(rows);
}
return (0, import_utils.mapResultRow)(fields, row, joinsNotNullableMap);
}
async values(placeholderValues) {
const params = (0, import_sql.fillPlaceholders)(this.query.params, placeholderValues ?? {});
this.logger.logQuery(this.query.sql, params);
return await this.queryWithCache(this.query.sql, params, async () => {
return await this.client.executeRawAsync(this.query.sql, params);
});
}
/** @internal */
isResponseInArrayMode() {
return this._isResponseInArrayMode;
}
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
OPSQLitePreparedQuery,
OPSQLiteSession,
OPSQLiteTransaction
});
//# sourceMappingURL=session.cjs.map

View File

@@ -0,0 +1,8 @@
import { transformProps } from '../../render/html/utils/keys-transform.mjs';
const appearStoreId = (elementId, valueName) => {
const key = transformProps.has(valueName) ? "transform" : valueName;
return `${elementId}: ${key}`;
};
export { appearStoreId };

View File

@@ -0,0 +1,63 @@
import type { Span } from '@opentelemetry/api';
import type { Client, continueTrace as baseContinueTrace, DynamicSamplingContext, Scope, TraceContext } from '@sentry/core';
import type { OpenTelemetrySpanContext } from './types';
/**
* Wraps a function with a transaction/span and finishes the span after the function is done.
* The created span is the active span and will be used as parent by other spans created inside the function
* and can be accessed via `Sentry.getActiveSpan()`, as long as the function is executed while the scope is active.
*
* If you want to create a span that is not set as active, use {@link startInactiveSpan}.
*
* You'll always get a span passed to the callback,
* it may just be a non-recording span if the span is not sampled or if tracing is disabled.
*/
export declare function startSpan<T>(options: OpenTelemetrySpanContext, callback: (span: Span) => T): T;
/**
* Similar to `Sentry.startSpan`. Wraps a function with a span, but does not finish the span
* after the function is done automatically. You'll have to call `span.end()` or the `finish` function passed to the callback manually.
*
* The created span is the active span and will be used as parent by other spans created inside the function
* and can be accessed via `Sentry.getActiveSpan()`, as long as the function is executed while the scope is active.
*
* You'll always get a span passed to the callback,
* it may just be a non-recording span if the span is not sampled or if tracing is disabled.
*/
export declare function startSpanManual<T>(options: OpenTelemetrySpanContext, callback: (span: Span, finish: () => void) => T): T;
/**
* Creates a span. This span is not set as active, so will not get automatic instrumentation spans
* as children or be able to be accessed via `Sentry.getActiveSpan()`.
*
* If you want to create a span that is set as active, use {@link startSpan}.
*
* This function will always return a span,
* it may just be a non-recording span if the span is not sampled or if tracing is disabled.
*/
export declare function startInactiveSpan(options: OpenTelemetrySpanContext): Span;
/**
* Forks the current scope and sets the provided span as active span in the context of the provided callback. Can be
* passed `null` to start an entirely new span tree.
*
* @param span Spans started in the context of the provided callback will be children of this span. If `null` is passed,
* spans started within the callback will be root spans.
* @param callback Execution context in which the provided span will be active. Is passed the newly forked scope.
* @returns the value returned from the provided callback function.
*/
export declare function withActiveSpan<T>(span: Span | null, callback: (scope: Scope) => T): T;
/**
* Continue a trace from `sentry-trace` and `baggage` values.
* These values can be obtained from incoming request headers, or in the browser from `<meta name="sentry-trace">`
* and `<meta name="baggage">` HTML tags.
*
* Spans started with `startSpan`, `startSpanManual` and `startInactiveSpan`, within the callback will automatically
* be attached to the incoming trace.
*
* This is a custom version of `continueTrace` that is used in OTEL-powered environments.
* It propagates the trace as a remote span, in addition to setting it on the propagation context.
*/
export declare function continueTrace<T>(options: Parameters<typeof baseContinueTrace>[0], callback: () => T): T;
/**
* Get the trace context for a given scope.
* We have a custom implementation here because we need an OTEL-specific way to get the span from a scope.
*/
export declare function getTraceContextForScope(client: Client, scope: Scope): [dynamicSamplingContext: Partial<DynamicSamplingContext>, traceContext: TraceContext];
//# sourceMappingURL=trace.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"feedback.d.ts","sourceRoot":"","sources":["../../src/feedback.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAiB,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAEhF;;GAEG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,kBAAkB,EAC1B,IAAI,GAAE,SAAS,GAAG;IAAE,aAAa,CAAC,EAAE,OAAO,CAAA;CAAO,EAClD,KAAK,0BAAoB,GACxB,MAAM,CA4BR"}

View File

@@ -0,0 +1,526 @@
'use strict';
const fs = require('fs');
const sysPath = require('path');
const { promisify } = require('util');
let fsevents;
try {
fsevents = require('fsevents');
} catch (error) {
if (process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR) console.error(error);
}
if (fsevents) {
// TODO: real check
const mtch = process.version.match(/v(\d+)\.(\d+)/);
if (mtch && mtch[1] && mtch[2]) {
const maj = Number.parseInt(mtch[1], 10);
const min = Number.parseInt(mtch[2], 10);
if (maj === 8 && min < 16) {
fsevents = undefined;
}
}
}
const {
EV_ADD,
EV_CHANGE,
EV_ADD_DIR,
EV_UNLINK,
EV_ERROR,
STR_DATA,
STR_END,
FSEVENT_CREATED,
FSEVENT_MODIFIED,
FSEVENT_DELETED,
FSEVENT_MOVED,
// FSEVENT_CLONED,
FSEVENT_UNKNOWN,
FSEVENT_FLAG_MUST_SCAN_SUBDIRS,
FSEVENT_TYPE_FILE,
FSEVENT_TYPE_DIRECTORY,
FSEVENT_TYPE_SYMLINK,
ROOT_GLOBSTAR,
DIR_SUFFIX,
DOT_SLASH,
FUNCTION_TYPE,
EMPTY_FN,
IDENTITY_FN
} = require('./constants');
const Depth = (value) => isNaN(value) ? {} : {depth: value};
const stat = promisify(fs.stat);
const lstat = promisify(fs.lstat);
const realpath = promisify(fs.realpath);
const statMethods = { stat, lstat };
/**
* @typedef {String} Path
*/
/**
* @typedef {Object} FsEventsWatchContainer
* @property {Set<Function>} listeners
* @property {Function} rawEmitter
* @property {{stop: Function}} watcher
*/
// fsevents instance helper functions
/**
* Object to hold per-process fsevents instances (may be shared across chokidar FSWatcher instances)
* @type {Map<Path,FsEventsWatchContainer>}
*/
const FSEventsWatchers = new Map();
// Threshold of duplicate path prefixes at which to start
// consolidating going forward
const consolidateThreshhold = 10;
const wrongEventFlags = new Set([
69888, 70400, 71424, 72704, 73472, 131328, 131840, 262912
]);
/**
* Instantiates the fsevents interface
* @param {Path} path path to be watched
* @param {Function} callback called when fsevents is bound and ready
* @returns {{stop: Function}} new fsevents instance
*/
const createFSEventsInstance = (path, callback) => {
const stop = fsevents.watch(path, callback);
return {stop};
};
/**
* Instantiates the fsevents interface or binds listeners to an existing one covering
* the same file tree.
* @param {Path} path - to be watched
* @param {Path} realPath - real path for symlinks
* @param {Function} listener - called when fsevents emits events
* @param {Function} rawEmitter - passes data to listeners of the 'raw' event
* @returns {Function} closer
*/
function setFSEventsListener(path, realPath, listener, rawEmitter) {
let watchPath = sysPath.extname(realPath) ? sysPath.dirname(realPath) : realPath;
const parentPath = sysPath.dirname(watchPath);
let cont = FSEventsWatchers.get(watchPath);
// If we've accumulated a substantial number of paths that
// could have been consolidated by watching one directory
// above the current one, create a watcher on the parent
// path instead, so that we do consolidate going forward.
if (couldConsolidate(parentPath)) {
watchPath = parentPath;
}
const resolvedPath = sysPath.resolve(path);
const hasSymlink = resolvedPath !== realPath;
const filteredListener = (fullPath, flags, info) => {
if (hasSymlink) fullPath = fullPath.replace(realPath, resolvedPath);
if (
fullPath === resolvedPath ||
!fullPath.indexOf(resolvedPath + sysPath.sep)
) listener(fullPath, flags, info);
};
// check if there is already a watcher on a parent path
// modifies `watchPath` to the parent path when it finds a match
let watchedParent = false;
for (const watchedPath of FSEventsWatchers.keys()) {
if (realPath.indexOf(sysPath.resolve(watchedPath) + sysPath.sep) === 0) {
watchPath = watchedPath;
cont = FSEventsWatchers.get(watchPath);
watchedParent = true;
break;
}
}
if (cont || watchedParent) {
cont.listeners.add(filteredListener);
} else {
cont = {
listeners: new Set([filteredListener]),
rawEmitter,
watcher: createFSEventsInstance(watchPath, (fullPath, flags) => {
if (!cont.listeners.size) return;
if (flags & FSEVENT_FLAG_MUST_SCAN_SUBDIRS) return;
const info = fsevents.getInfo(fullPath, flags);
cont.listeners.forEach(list => {
list(fullPath, flags, info);
});
cont.rawEmitter(info.event, fullPath, info);
})
};
FSEventsWatchers.set(watchPath, cont);
}
// removes this instance's listeners and closes the underlying fsevents
// instance if there are no more listeners left
return () => {
const lst = cont.listeners;
lst.delete(filteredListener);
if (!lst.size) {
FSEventsWatchers.delete(watchPath);
if (cont.watcher) return cont.watcher.stop().then(() => {
cont.rawEmitter = cont.watcher = undefined;
Object.freeze(cont);
});
}
};
}
// Decide whether or not we should start a new higher-level
// parent watcher
const couldConsolidate = (path) => {
let count = 0;
for (const watchPath of FSEventsWatchers.keys()) {
if (watchPath.indexOf(path) === 0) {
count++;
if (count >= consolidateThreshhold) {
return true;
}
}
}
return false;
};
// returns boolean indicating whether fsevents can be used
const canUse = () => fsevents && FSEventsWatchers.size < 128;
// determines subdirectory traversal levels from root to path
const calcDepth = (path, root) => {
let i = 0;
while (!path.indexOf(root) && (path = sysPath.dirname(path)) !== root) i++;
return i;
};
// returns boolean indicating whether the fsevents' event info has the same type
// as the one returned by fs.stat
const sameTypes = (info, stats) => (
info.type === FSEVENT_TYPE_DIRECTORY && stats.isDirectory() ||
info.type === FSEVENT_TYPE_SYMLINK && stats.isSymbolicLink() ||
info.type === FSEVENT_TYPE_FILE && stats.isFile()
)
/**
* @mixin
*/
class FsEventsHandler {
/**
* @param {import('../index').FSWatcher} fsw
*/
constructor(fsw) {
this.fsw = fsw;
}
checkIgnored(path, stats) {
const ipaths = this.fsw._ignoredPaths;
if (this.fsw._isIgnored(path, stats)) {
ipaths.add(path);
if (stats && stats.isDirectory()) {
ipaths.add(path + ROOT_GLOBSTAR);
}
return true;
}
ipaths.delete(path);
ipaths.delete(path + ROOT_GLOBSTAR);
}
addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts) {
const event = watchedDir.has(item) ? EV_CHANGE : EV_ADD;
this.handleEvent(event, path, fullPath, realPath, parent, watchedDir, item, info, opts);
}
async checkExists(path, fullPath, realPath, parent, watchedDir, item, info, opts) {
try {
const stats = await stat(path)
if (this.fsw.closed) return;
if (sameTypes(info, stats)) {
this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts);
} else {
this.handleEvent(EV_UNLINK, path, fullPath, realPath, parent, watchedDir, item, info, opts);
}
} catch (error) {
if (error.code === 'EACCES') {
this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts);
} else {
this.handleEvent(EV_UNLINK, path, fullPath, realPath, parent, watchedDir, item, info, opts);
}
}
}
handleEvent(event, path, fullPath, realPath, parent, watchedDir, item, info, opts) {
if (this.fsw.closed || this.checkIgnored(path)) return;
if (event === EV_UNLINK) {
const isDirectory = info.type === FSEVENT_TYPE_DIRECTORY
// suppress unlink events on never before seen files
if (isDirectory || watchedDir.has(item)) {
this.fsw._remove(parent, item, isDirectory);
}
} else {
if (event === EV_ADD) {
// track new directories
if (info.type === FSEVENT_TYPE_DIRECTORY) this.fsw._getWatchedDir(path);
if (info.type === FSEVENT_TYPE_SYMLINK && opts.followSymlinks) {
// push symlinks back to the top of the stack to get handled
const curDepth = opts.depth === undefined ?
undefined : calcDepth(fullPath, realPath) + 1;
return this._addToFsEvents(path, false, true, curDepth);
}
// track new paths
// (other than symlinks being followed, which will be tracked soon)
this.fsw._getWatchedDir(parent).add(item);
}
/**
* @type {'add'|'addDir'|'unlink'|'unlinkDir'}
*/
const eventName = info.type === FSEVENT_TYPE_DIRECTORY ? event + DIR_SUFFIX : event;
this.fsw._emit(eventName, path);
if (eventName === EV_ADD_DIR) this._addToFsEvents(path, false, true);
}
}
/**
* Handle symlinks encountered during directory scan
* @param {String} watchPath - file/dir path to be watched with fsevents
* @param {String} realPath - real path (in case of symlinks)
* @param {Function} transform - path transformer
* @param {Function} globFilter - path filter in case a glob pattern was provided
* @returns {Function} closer for the watcher instance
*/
_watchWithFsEvents(watchPath, realPath, transform, globFilter) {
if (this.fsw.closed || this.fsw._isIgnored(watchPath)) return;
const opts = this.fsw.options;
const watchCallback = async (fullPath, flags, info) => {
if (this.fsw.closed) return;
if (
opts.depth !== undefined &&
calcDepth(fullPath, realPath) > opts.depth
) return;
const path = transform(sysPath.join(
watchPath, sysPath.relative(watchPath, fullPath)
));
if (globFilter && !globFilter(path)) return;
// ensure directories are tracked
const parent = sysPath.dirname(path);
const item = sysPath.basename(path);
const watchedDir = this.fsw._getWatchedDir(
info.type === FSEVENT_TYPE_DIRECTORY ? path : parent
);
// correct for wrong events emitted
if (wrongEventFlags.has(flags) || info.event === FSEVENT_UNKNOWN) {
if (typeof opts.ignored === FUNCTION_TYPE) {
let stats;
try {
stats = await stat(path);
} catch (error) {}
if (this.fsw.closed) return;
if (this.checkIgnored(path, stats)) return;
if (sameTypes(info, stats)) {
this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts);
} else {
this.handleEvent(EV_UNLINK, path, fullPath, realPath, parent, watchedDir, item, info, opts);
}
} else {
this.checkExists(path, fullPath, realPath, parent, watchedDir, item, info, opts);
}
} else {
switch (info.event) {
case FSEVENT_CREATED:
case FSEVENT_MODIFIED:
return this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts);
case FSEVENT_DELETED:
case FSEVENT_MOVED:
return this.checkExists(path, fullPath, realPath, parent, watchedDir, item, info, opts);
}
}
};
const closer = setFSEventsListener(
watchPath,
realPath,
watchCallback,
this.fsw._emitRaw
);
this.fsw._emitReady();
return closer;
}
/**
* Handle symlinks encountered during directory scan
* @param {String} linkPath path to symlink
* @param {String} fullPath absolute path to the symlink
* @param {Function} transform pre-existing path transformer
* @param {Number} curDepth level of subdirectories traversed to where symlink is
* @returns {Promise<void>}
*/
async _handleFsEventsSymlink(linkPath, fullPath, transform, curDepth) {
// don't follow the same symlink more than once
if (this.fsw.closed || this.fsw._symlinkPaths.has(fullPath)) return;
this.fsw._symlinkPaths.set(fullPath, true);
this.fsw._incrReadyCount();
try {
const linkTarget = await realpath(linkPath);
if (this.fsw.closed) return;
if (this.fsw._isIgnored(linkTarget)) {
return this.fsw._emitReady();
}
this.fsw._incrReadyCount();
// add the linkTarget for watching with a wrapper for transform
// that causes emitted paths to incorporate the link's path
this._addToFsEvents(linkTarget || linkPath, (path) => {
let aliasedPath = linkPath;
if (linkTarget && linkTarget !== DOT_SLASH) {
aliasedPath = path.replace(linkTarget, linkPath);
} else if (path !== DOT_SLASH) {
aliasedPath = sysPath.join(linkPath, path);
}
return transform(aliasedPath);
}, false, curDepth);
} catch(error) {
if (this.fsw._handleError(error)) {
return this.fsw._emitReady();
}
}
}
/**
*
* @param {Path} newPath
* @param {fs.Stats} stats
*/
emitAdd(newPath, stats, processPath, opts, forceAdd) {
const pp = processPath(newPath);
const isDir = stats.isDirectory();
const dirObj = this.fsw._getWatchedDir(sysPath.dirname(pp));
const base = sysPath.basename(pp);
// ensure empty dirs get tracked
if (isDir) this.fsw._getWatchedDir(pp);
if (dirObj.has(base)) return;
dirObj.add(base);
if (!opts.ignoreInitial || forceAdd === true) {
this.fsw._emit(isDir ? EV_ADD_DIR : EV_ADD, pp, stats);
}
}
initWatch(realPath, path, wh, processPath) {
if (this.fsw.closed) return;
const closer = this._watchWithFsEvents(
wh.watchPath,
sysPath.resolve(realPath || wh.watchPath),
processPath,
wh.globFilter
);
this.fsw._addPathCloser(path, closer);
}
/**
* Handle added path with fsevents
* @param {String} path file/dir path or glob pattern
* @param {Function|Boolean=} transform converts working path to what the user expects
* @param {Boolean=} forceAdd ensure add is emitted
* @param {Number=} priorDepth Level of subdirectories already traversed.
* @returns {Promise<void>}
*/
async _addToFsEvents(path, transform, forceAdd, priorDepth) {
if (this.fsw.closed) {
return;
}
const opts = this.fsw.options;
const processPath = typeof transform === FUNCTION_TYPE ? transform : IDENTITY_FN;
const wh = this.fsw._getWatchHelpers(path);
// evaluate what is at the path we're being asked to watch
try {
const stats = await statMethods[wh.statMethod](wh.watchPath);
if (this.fsw.closed) return;
if (this.fsw._isIgnored(wh.watchPath, stats)) {
throw null;
}
if (stats.isDirectory()) {
// emit addDir unless this is a glob parent
if (!wh.globFilter) this.emitAdd(processPath(path), stats, processPath, opts, forceAdd);
// don't recurse further if it would exceed depth setting
if (priorDepth && priorDepth > opts.depth) return;
// scan the contents of the dir
this.fsw._readdirp(wh.watchPath, {
fileFilter: entry => wh.filterPath(entry),
directoryFilter: entry => wh.filterDir(entry),
...Depth(opts.depth - (priorDepth || 0))
}).on(STR_DATA, (entry) => {
// need to check filterPath on dirs b/c filterDir is less restrictive
if (this.fsw.closed) {
return;
}
if (entry.stats.isDirectory() && !wh.filterPath(entry)) return;
const joinedPath = sysPath.join(wh.watchPath, entry.path);
const {fullPath} = entry;
if (wh.followSymlinks && entry.stats.isSymbolicLink()) {
// preserve the current depth here since it can't be derived from
// real paths past the symlink
const curDepth = opts.depth === undefined ?
undefined : calcDepth(joinedPath, sysPath.resolve(wh.watchPath)) + 1;
this._handleFsEventsSymlink(joinedPath, fullPath, processPath, curDepth);
} else {
this.emitAdd(joinedPath, entry.stats, processPath, opts, forceAdd);
}
}).on(EV_ERROR, EMPTY_FN).on(STR_END, () => {
this.fsw._emitReady();
});
} else {
this.emitAdd(wh.watchPath, stats, processPath, opts, forceAdd);
this.fsw._emitReady();
}
} catch (error) {
if (!error || this.fsw._handleError(error)) {
// TODO: Strange thing: "should not choke on an ignored watch path" will be failed without 2 ready calls -__-
this.fsw._emitReady();
this.fsw._emitReady();
}
}
if (opts.persistent && forceAdd !== true) {
if (typeof transform === FUNCTION_TYPE) {
// realpath has already been resolved
this.initWatch(undefined, path, wh, processPath);
} else {
let realPath;
try {
realPath = await realpath(wh.watchPath);
} catch (e) {}
this.initWatch(realPath, path, wh, processPath);
}
}
}
}
module.exports = FsEventsHandler;
module.exports.canUse = canUse;

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["c","_c","React","useState","Context","createContext","UploadHandlersProvider","t0","$","children","uploadHandlers","setUploadHandlers","_temp","t1","t2","collectionSlug","get","getUploadHandler","Symbol","for","t3","collectionSlug_0","handler","uploadHandlers_0","clone","Map","set","setUploadHandler","_jsx","value","useUploadHandlers","context","use","Error"],"sources":["../../../src/providers/UploadHandlers/index.tsx"],"sourcesContent":["'use client'\nimport type { UploadCollectionSlug } from 'payload'\n\nimport React, { useState } from 'react'\n\ntype UploadHandler = (args: {\n file: File\n updateFilename: (filename: string) => void\n}) => Promise<unknown>\n\nexport type UploadHandlersContext = {\n getUploadHandler: (args: { collectionSlug: UploadCollectionSlug }) => null | UploadHandler\n setUploadHandler: (args: {\n collectionSlug: UploadCollectionSlug\n handler: UploadHandler\n }) => unknown\n}\n\nconst Context = React.createContext<null | UploadHandlersContext>(null)\n\nexport const UploadHandlersProvider = ({ children }) => {\n const [uploadHandlers, setUploadHandlers] = useState<Map<UploadCollectionSlug, UploadHandler>>(\n () => new Map(),\n )\n\n const getUploadHandler: UploadHandlersContext['getUploadHandler'] = ({ collectionSlug }) => {\n return uploadHandlers.get(collectionSlug)\n }\n\n const setUploadHandler: UploadHandlersContext['setUploadHandler'] = ({\n collectionSlug,\n handler,\n }) => {\n setUploadHandlers((uploadHandlers) => {\n const clone = new Map(uploadHandlers)\n clone.set(collectionSlug, handler)\n return clone\n })\n }\n\n return <Context value={{ getUploadHandler, setUploadHandler }}>{children}</Context>\n}\n\nexport const useUploadHandlers = (): UploadHandlersContext => {\n const context = React.use(Context)\n\n if (context === null) {\n throw new Error('useUploadHandlers must be used within UploadHandlersProvider')\n }\n\n return context\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAGA,OAAOC,KAAA,IAASC,QAAQ,QAAQ;AAehC,MAAMC,OAAA,gBAAUF,KAAA,CAAMG,aAAa,CAA+B;AAElE,OAAO,MAAMC,sBAAA,GAAyBC,EAAA;EAAA,MAAAC,CAAA,GAAAP,EAAA;EAAC;IAAAQ;EAAA,IAAAF,EAAY;EACjD,OAAAG,cAAA,EAAAC,iBAAA,IAA4CR,QAAA,CAAAS,KAChC;EAAA,IAAAC,EAAA;EAAA,IAAAL,CAAA,QAAAE,cAAA;IAGwDG,EAAA,GAAAC,EAAA;MAAC;QAAAC;MAAA,IAAAD,EAAkB;MAAA,OAC9EJ,cAAA,CAAAM,GAAA,CAAmBD,cAAA;IAAA;IAC5BP,CAAA,MAAAE,cAAA;IAAAF,CAAA,MAAAK,EAAA;EAAA;IAAAA,EAAA,GAAAL,CAAA;EAAA;EAFA,MAAAS,gBAAA,GAAoEJ,EAEpE;EAAA,IAAAC,EAAA;EAAA,IAAAN,CAAA,QAAAU,MAAA,CAAAC,GAAA;IAEoEL,EAAA,GAAAM,EAAA;MAAC;QAAAL,cAAA,EAAAM,gBAAA;QAAAC;MAAA,IAAAF,EAGpE;MACCT,iBAAA,CAAAY,gBAAA;QACE,MAAAC,KAAA,OAAAC,GAAA,CAAsBf,gBAAA;QACtBc,KAAA,CAAAE,GAAA,CAAUX,gBAAA,EAAgBO,OAAA;QAAA,OACnBE,KAAA;MAAA,CACT;IAAA;IACFhB,CAAA,MAAAM,EAAA;EAAA;IAAAA,EAAA,GAAAN,CAAA;EAAA;EATA,MAAAmB,gBAAA,GAAoEb,EASpE;EAAA,IAAAM,EAAA;EAAA,IAAAZ,CAAA,QAAAC,QAAA,IAAAD,CAAA,QAAAS,gBAAA;IAEOG,EAAA,GAAAQ,IAAA,CAAAxB,OAAA;MAAAyB,KAAA;QAAAZ,gBAAA;QAAAU;MAAA;MAAAlB;IAAA,C;;;;;;;SAAAW,E;CACT;AAEA,OAAO,MAAMU,iBAAA,GAAoBA,CAAA;EAC/B,MAAMC,OAAA,GAAU7B,KAAA,CAAM8B,GAAG,CAAC5B,OAAA;EAE1B,IAAI2B,OAAA,KAAY,MAAM;IACpB,MAAM,IAAIE,KAAA,CAAM;EAClB;EAEA,OAAOF,OAAA;AACT;AA/BsC,SAAAnB,MAAA;EAAA,WAAAa,GAAA;AAAA","ignoreList":[]}

View File

@@ -0,0 +1,22 @@
/**
* @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 Award = createLucideIcon("Award", [
[
"path",
{
d: "m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",
key: "1yiouv"
}
],
["circle", { cx: "12", cy: "8", r: "6", key: "1vp47v" }]
]);
export { Award as default };
//# sourceMappingURL=award.js.map

View File

@@ -0,0 +1,89 @@
import { token, remainingTokensNumber, map, flatten, parserPosition as parserPosition$1, tryParse as tryParse$1, match as match$1 } from './core.mjs';
import { clamp, escapeWhitespace } from './util.mjs';
function char(char) {
return token((c) => (c === char) ? c : undefined);
}
function oneOf(chars) {
return token((c) => (chars.includes(c)) ? c : undefined);
}
function noneOf(chars) {
return token((c) => (chars.includes(c)) ? undefined : c);
}
function charTest(regex) {
return token((c) => regex.test(c) ? c : undefined);
}
function str(str) {
const len = str.length;
return (data, i) => {
const tokensNumber = remainingTokensNumber(data, i);
let substr = '';
let j = 0;
while (j < tokensNumber && substr.length < len) {
substr += data.tokens[i + j];
j++;
}
return (substr === str)
? {
matched: true,
position: i + j,
value: str
}
: { matched: false };
};
}
function concat(...ps) {
return map(flatten(...ps), (vs) => vs.join(''));
}
function parserPosition(data, i, contextTokens = 11) {
const len = data.tokens.length;
const lowIndex = clamp(0, i - contextTokens, len - contextTokens);
const highIndex = clamp(contextTokens, i + 1 + contextTokens, len);
const tokensSlice = data.tokens.slice(lowIndex, highIndex);
if (tokensSlice.some((t) => t.length !== 1)) {
return parserPosition$1(data, i, (t) => t);
}
let line = '';
let offset = 0;
let markerLen = 1;
if (i < 0) {
line += ' ';
}
if (0 < lowIndex) {
line += '...';
}
for (let j = 0; j < tokensSlice.length; j++) {
const token = escapeWhitespace(tokensSlice[j]);
if (lowIndex + j === i) {
offset = line.length;
markerLen = token.length;
}
line += token;
}
if (highIndex < len) {
line += '...';
}
if (len <= i) {
offset = line.length;
}
return `${''.padEnd(offset)}${i}\n${line}\n${''.padEnd(offset)}${'^'.repeat(markerLen)}`;
}
function parse(parser, str, options) {
const data = { tokens: [...str], options: options };
const result = parser(data, 0);
if (!result.matched) {
throw new Error('No match');
}
if (result.position < data.tokens.length) {
throw new Error(`Partial match. Parsing stopped at:\n${parserPosition(data, result.position)}`);
}
return result.value;
}
function tryParse(parser, str, options) {
return tryParse$1(parser, [...str], options);
}
function match(matcher, str, options) {
return match$1(matcher, [...str], options);
}
export { oneOf as anyOf, char, charTest, concat, match, noneOf, oneOf, parse, parserPosition, str, tryParse };

View File

@@ -0,0 +1,123 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const core = require('@sentry/core');
const responseEnd = require('./utils/responseEnd.js');
const debugBuild = require('./debug-build.js');
const nextNavigationErrorUtils = require('./nextNavigationErrorUtils.js');
/**
* Wraps a Next.js Server Action implementation with Sentry Error and Performance instrumentation.
*/
function withServerActionInstrumentation(
...args
) {
if (typeof args[1] === 'function') {
const [serverActionName, callback] = args;
return withServerActionInstrumentationImplementation(serverActionName, {}, callback);
} else {
const [serverActionName, options, callback] = args;
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
return withServerActionInstrumentationImplementation(serverActionName, options, callback);
}
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
async function withServerActionInstrumentationImplementation(
serverActionName,
options,
callback,
) {
return core.withIsolationScope(async isolationScope => {
const sendDefaultPii = core.getClient()?.getOptions().sendDefaultPii;
let sentryTraceHeader;
let baggageHeader;
const fullHeadersObject = {};
try {
const awaitedHeaders = await options.headers;
sentryTraceHeader = awaitedHeaders?.get('sentry-trace') ?? undefined;
baggageHeader = awaitedHeaders?.get('baggage');
awaitedHeaders?.forEach((value, key) => {
fullHeadersObject[key] = value;
});
} catch {
debugBuild.DEBUG_BUILD &&
core.debug.warn(
"Sentry wasn't able to extract the tracing headers for a server action. Will not trace this request.",
);
}
isolationScope.setTransactionName(`serverAction/${serverActionName}`);
isolationScope.setSDKProcessingMetadata({
normalizedRequest: {
headers: fullHeadersObject,
} ,
});
// Normally, there is an active span here (from Next.js OTEL) and we just use that as parent
// Else, we manually continueTrace from the incoming headers
const continueTraceIfNoActiveSpan = core.getActiveSpan()
? (_opts, callback) => callback()
: core.continueTrace;
return continueTraceIfNoActiveSpan(
{
sentryTrace: sentryTraceHeader,
baggage: baggageHeader,
},
async () => {
try {
return await core.startSpan(
{
op: 'function.server_action',
name: `serverAction/${serverActionName}`,
forceTransaction: true,
attributes: {
[core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'route',
[core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.function.nextjs.server_action',
},
},
async span => {
const result = await core.handleCallbackErrors(callback, error => {
if (nextNavigationErrorUtils.isNotFoundNavigationError(error)) {
// We don't want to report "not-found"s
span.setStatus({ code: core.SPAN_STATUS_ERROR, message: 'not_found' });
} else if (nextNavigationErrorUtils.isRedirectNavigationError(error)) {
// Don't do anything for redirects
} else {
span.setStatus({ code: core.SPAN_STATUS_ERROR, message: 'internal_error' });
core.captureException(error, {
mechanism: {
handled: false,
type: 'auto.function.nextjs.server_action',
},
});
}
});
if (options.recordResponse !== undefined ? options.recordResponse : sendDefaultPii) {
core.getIsolationScope().setExtra('server_action_result', result);
}
if (options.formData) {
options.formData.forEach((value, key) => {
core.getIsolationScope().setExtra(
`server_action_form_data.${key}`,
typeof value === 'string' ? value : '[non-string value]',
);
});
}
return result;
},
);
} finally {
responseEnd.waitUntil(responseEnd.flushSafelyWithTimeout());
}
},
);
});
}
exports.withServerActionInstrumentation = withServerActionInstrumentation;
//# sourceMappingURL=withServerActionInstrumentation.js.map

View File

@@ -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 './arrow-up-1-0.js';
//# sourceMappingURL=arrow-up-10.js.map

View File

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

View File

@@ -0,0 +1,8 @@
import pino from '../../..'
const transport = pino.transport({
target: 'pino/file',
options: { destination: '1' }
})
const logger = pino(transport)
logger.info('Hello')

View File

@@ -0,0 +1,17 @@
# @webassemblyjs/wast-parser
> WebAssembly text format printer
## Installation
```sh
yarn add @webassemblyjs/wast-printer
```
## Usage
```js
import { print } from "@webassemblyjs/wast-printer"
console.log(print(ast));
```

View File

@@ -0,0 +1,17 @@
/**
* @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 ArrowLeftFromLine = createLucideIcon("ArrowLeftFromLine", [
["path", { d: "m9 6-6 6 6 6", key: "7v63n9" }],
["path", { d: "M3 12h14", key: "13k4hi" }],
["path", { d: "M21 19V5", key: "b4bplr" }]
]);
export { ArrowLeftFromLine as default };
//# sourceMappingURL=arrow-left-from-line.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"book-a.js","sources":["../../../src/icons/book-a.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name BookA\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNCAxOS41di0xNUEyLjUgMi41IDAgMCAxIDYuNSAySDE5YTEgMSAwIDAgMSAxIDF2MThhMSAxIDAgMCAxLTEgMUg2LjVhMSAxIDAgMCAxIDAtNUgyMCIgLz4KICA8cGF0aCBkPSJtOCAxMyA0LTcgNCA3IiAvPgogIDxwYXRoIGQ9Ik05LjEgMTFoNS43IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/book-a\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 BookA = createLucideIcon('BookA', [\n [\n 'path',\n {\n d: 'M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20',\n key: 'k3hazp',\n },\n ],\n ['path', { d: 'm8 13 4-7 4 7', key: '4rari8' }],\n ['path', { d: 'M9.1 11h5.7', key: '1gkovt' }],\n]);\n\nexport default BookA;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,iBAAiB,OAAS,CAAA,CAAA,CAAA;AAAA,CACtC,CAAA,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;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,CAAiB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAe,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC9C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"policies.cjs","names":[],"sources":["../../../../src/rest/commands/create/policies.ts"],"sourcesContent":["import type { DirectusPolicy } from '../../../schema/policy.js';\nimport type { ApplyQueryFields, NestedPartial, Query } from '../../../types/index.js';\nimport type { RestCommand } from '../../types.js';\n\nexport type CreatePolicyOutput<\n\tSchema,\n\tTQuery extends Query<Schema, Item>,\n\tItem extends object = DirectusPolicy<Schema>,\n> = ApplyQueryFields<Schema, Item, TQuery['fields']>;\n\n/**\n * Create multiple new policies\n *\n * @param items The policies to create\n * @param query Optional return data query\n *\n * @returns Returns the policy objects for the created policies.\n */\nexport const createPolicies =\n\t<Schema, const TQuery extends Query<Schema, DirectusPolicy<Schema>>>(\n\t\titems: NestedPartial<DirectusPolicy<Schema>>[],\n\t\tquery?: TQuery,\n\t): RestCommand<CreatePolicyOutput<Schema, TQuery>[], Schema> =>\n\t() => ({\n\t\tpath: `/policies`,\n\t\tparams: query ?? {},\n\t\tbody: JSON.stringify(items),\n\t\tmethod: 'POST',\n\t});\n\n/**\n * Create a new policy\n *\n * @param item The policy to create\n * @param query Optional return data query\n *\n * @returns Returns the policy object for the created policy.\n */\nexport const createPolicy =\n\t<Schema, const TQuery extends Query<Schema, DirectusPolicy<Schema>>>(\n\t\titem: NestedPartial<DirectusPolicy<Schema>>,\n\t\tquery?: TQuery,\n\t): RestCommand<CreatePolicyOutput<Schema, TQuery>, Schema> =>\n\t() => ({\n\t\tpath: `/policies`,\n\t\tparams: query ?? {},\n\t\tbody: JSON.stringify(item),\n\t\tmethod: 'POST',\n\t});\n"],"mappings":"AAkBA,MAAa,GAEX,EACA,SAEM,CACN,KAAM,YACN,OAAQ,GAAS,EAAE,CACnB,KAAM,KAAK,UAAU,EAAM,CAC3B,OAAQ,OACR,EAUW,GAEX,EACA,SAEM,CACN,KAAM,YACN,OAAQ,GAAS,EAAE,CACnB,KAAM,KAAK,UAAU,EAAK,CAC1B,OAAQ,OACR"}

View File

@@ -0,0 +1,32 @@
import { getMainCarrier, getSentryCarrier } from '../carrier.js';
import { getStackAsyncContextStrategy } from './stackStrategy.js';
/**
* @private Private API with no semver guarantees!
*
* Sets the global async context strategy
*/
function setAsyncContextStrategy(strategy) {
// Get main carrier (global for every environment)
const registry = getMainCarrier();
const sentry = getSentryCarrier(registry);
sentry.acs = strategy;
}
/**
* Get the current async context strategy.
* If none has been setup, the default will be used.
*/
function getAsyncContextStrategy(carrier) {
const sentry = getSentryCarrier(carrier);
if (sentry.acs) {
return sentry.acs;
}
// Otherwise, use the default one (stack)
return getStackAsyncContextStrategy();
}
export { getAsyncContextStrategy, setAsyncContextStrategy };
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,17 @@
/**
* @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 MessageSquareCode = createLucideIcon("MessageSquareCode", [
["path", { d: "M10 7.5 8 10l2 2.5", key: "xb17xw" }],
["path", { d: "m14 7.5 2 2.5-2 2.5", key: "5rap1v" }],
["path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z", key: "1lielz" }]
]);
export { MessageSquareCode as default };
//# sourceMappingURL=message-square-code.js.map

View File

@@ -0,0 +1,101 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const RuntimeGlobals = require("../RuntimeGlobals");
const JsonpChunkLoadingRuntimeModule = require("./JsonpChunkLoadingRuntimeModule");
/** @typedef {import("../Chunk")} Chunk */
/** @typedef {import("../Compiler")} Compiler */
/** @typedef {import("../Module").RuntimeRequirements} RuntimeRequirements */
const PLUGIN_NAME = "JsonpChunkLoadingPlugin";
class JsonpChunkLoadingPlugin {
/**
* Apply the plugin
* @param {Compiler} compiler the compiler instance
* @returns {void}
*/
apply(compiler) {
compiler.hooks.thisCompilation.tap(PLUGIN_NAME, (compilation) => {
const globalChunkLoading = compilation.outputOptions.chunkLoading;
/**
* @param {Chunk} chunk chunk
* @returns {boolean} true, if wasm loading is enabled for the chunk
*/
const isEnabledForChunk = (chunk) => {
const options = chunk.getEntryOptions();
const chunkLoading =
options && options.chunkLoading !== undefined
? options.chunkLoading
: globalChunkLoading;
return chunkLoading === "jsonp";
};
/** @type {WeakSet<Chunk>} */
const onceForChunkSet = new WeakSet();
/**
* @param {Chunk} chunk chunk
* @param {RuntimeRequirements} set runtime requirements
*/
const handler = (chunk, set) => {
if (onceForChunkSet.has(chunk)) return;
onceForChunkSet.add(chunk);
if (!isEnabledForChunk(chunk)) return;
set.add(RuntimeGlobals.moduleFactoriesAddOnly);
set.add(RuntimeGlobals.hasOwnProperty);
compilation.addRuntimeModule(
chunk,
new JsonpChunkLoadingRuntimeModule(set)
);
};
compilation.hooks.runtimeRequirementInTree
.for(RuntimeGlobals.ensureChunkHandlers)
.tap(PLUGIN_NAME, handler);
compilation.hooks.runtimeRequirementInTree
.for(RuntimeGlobals.hmrDownloadUpdateHandlers)
.tap(PLUGIN_NAME, handler);
compilation.hooks.runtimeRequirementInTree
.for(RuntimeGlobals.hmrDownloadManifest)
.tap(PLUGIN_NAME, handler);
compilation.hooks.runtimeRequirementInTree
.for(RuntimeGlobals.baseURI)
.tap(PLUGIN_NAME, handler);
compilation.hooks.runtimeRequirementInTree
.for(RuntimeGlobals.onChunksLoaded)
.tap(PLUGIN_NAME, handler);
compilation.hooks.runtimeRequirementInTree
.for(RuntimeGlobals.ensureChunkHandlers)
.tap(PLUGIN_NAME, (chunk, set) => {
if (!isEnabledForChunk(chunk)) return;
set.add(RuntimeGlobals.publicPath);
set.add(RuntimeGlobals.loadScript);
set.add(RuntimeGlobals.getChunkScriptFilename);
});
compilation.hooks.runtimeRequirementInTree
.for(RuntimeGlobals.hmrDownloadUpdateHandlers)
.tap(PLUGIN_NAME, (chunk, set) => {
if (!isEnabledForChunk(chunk)) return;
set.add(RuntimeGlobals.publicPath);
set.add(RuntimeGlobals.loadScript);
set.add(RuntimeGlobals.getChunkUpdateScriptFilename);
set.add(RuntimeGlobals.moduleCache);
set.add(RuntimeGlobals.hmrModuleData);
set.add(RuntimeGlobals.moduleFactoriesAddOnly);
});
compilation.hooks.runtimeRequirementInTree
.for(RuntimeGlobals.hmrDownloadManifest)
.tap(PLUGIN_NAME, (chunk, set) => {
if (!isEnabledForChunk(chunk)) return;
set.add(RuntimeGlobals.publicPath);
set.add(RuntimeGlobals.getUpdateManifestFilename);
});
});
}
}
module.exports = JsonpChunkLoadingPlugin;

View File

@@ -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 './square-arrow-out-up-right.js';
//# sourceMappingURL=arrow-up-right-from-square.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../../src/auth/strategies/local/authenticate.spec.ts"],"sourcesContent":["import crypto from 'crypto'\n\nimport { describe, expect, it } from 'vitest'\n\nimport { authenticateLocalStrategy } from './authenticate.js'\n\n// Helper to generate hash/salt like Payload does\nconst generateHashAndSalt = (password: string): { hash: string; salt: string } => {\n const salt = crypto.randomBytes(32).toString('hex')\n const hash = crypto.pbkdf2Sync(password, salt, 25000, 512, 'sha256').toString('hex')\n return { hash, salt }\n}\n\ndescribe('authenticateLocalStrategy', () => {\n it('should return doc when password is valid', async () => {\n const password = 'test-password'\n const { hash, salt } = generateHashAndSalt(password)\n const doc = { id: 1, hash, salt }\n\n const result = await authenticateLocalStrategy({ doc, password })\n\n expect(result).toEqual(doc)\n })\n\n it('should return null when password is invalid', async () => {\n const { hash, salt } = generateHashAndSalt('correct-password')\n const doc = { id: 1, hash, salt }\n\n const result = await authenticateLocalStrategy({ doc, password: 'wrong-password' })\n\n expect(result).toBeNull()\n })\n\n it('should return null when salt is missing', async () => {\n const { hash } = generateHashAndSalt('test-password')\n const doc = { id: 1, hash }\n\n const result = await authenticateLocalStrategy({ doc, password: 'test-password' })\n\n expect(result).toBeNull()\n })\n\n it('should return null when hash is missing', async () => {\n const { salt } = generateHashAndSalt('test-password')\n const doc = { id: 1, salt }\n\n const result = await authenticateLocalStrategy({ doc, password: 'test-password' })\n\n expect(result).toBeNull()\n })\n\n it('should return null when hash has different length (tampered)', async () => {\n const password = 'test-password'\n const { salt } = generateHashAndSalt(password)\n // Truncated hash - different length than expected 512 bytes\n const shortHash = 'abcd1234'\n const doc = { id: 1, hash: shortHash, salt }\n\n const result = await authenticateLocalStrategy({ doc, password })\n\n expect(result).toBeNull()\n })\n})\n"],"names":["crypto","describe","expect","it","authenticateLocalStrategy","generateHashAndSalt","password","salt","randomBytes","toString","hash","pbkdf2Sync","doc","id","result","toEqual","toBeNull","shortHash"],"mappings":"AAAA,OAAOA,YAAY,SAAQ;AAE3B,SAASC,QAAQ,EAAEC,MAAM,EAAEC,EAAE,QAAQ,SAAQ;AAE7C,SAASC,yBAAyB,QAAQ,oBAAmB;AAE7D,iDAAiD;AACjD,MAAMC,sBAAsB,CAACC;IAC3B,MAAMC,OAAOP,OAAOQ,WAAW,CAAC,IAAIC,QAAQ,CAAC;IAC7C,MAAMC,OAAOV,OAAOW,UAAU,CAACL,UAAUC,MAAM,OAAO,KAAK,UAAUE,QAAQ,CAAC;IAC9E,OAAO;QAAEC;QAAMH;IAAK;AACtB;AAEAN,SAAS,6BAA6B;IACpCE,GAAG,4CAA4C;QAC7C,MAAMG,WAAW;QACjB,MAAM,EAAEI,IAAI,EAAEH,IAAI,EAAE,GAAGF,oBAAoBC;QAC3C,MAAMM,MAAM;YAAEC,IAAI;YAAGH;YAAMH;QAAK;QAEhC,MAAMO,SAAS,MAAMV,0BAA0B;YAAEQ;YAAKN;QAAS;QAE/DJ,OAAOY,QAAQC,OAAO,CAACH;IACzB;IAEAT,GAAG,+CAA+C;QAChD,MAAM,EAAEO,IAAI,EAAEH,IAAI,EAAE,GAAGF,oBAAoB;QAC3C,MAAMO,MAAM;YAAEC,IAAI;YAAGH;YAAMH;QAAK;QAEhC,MAAMO,SAAS,MAAMV,0BAA0B;YAAEQ;YAAKN,UAAU;QAAiB;QAEjFJ,OAAOY,QAAQE,QAAQ;IACzB;IAEAb,GAAG,2CAA2C;QAC5C,MAAM,EAAEO,IAAI,EAAE,GAAGL,oBAAoB;QACrC,MAAMO,MAAM;YAAEC,IAAI;YAAGH;QAAK;QAE1B,MAAMI,SAAS,MAAMV,0BAA0B;YAAEQ;YAAKN,UAAU;QAAgB;QAEhFJ,OAAOY,QAAQE,QAAQ;IACzB;IAEAb,GAAG,2CAA2C;QAC5C,MAAM,EAAEI,IAAI,EAAE,GAAGF,oBAAoB;QACrC,MAAMO,MAAM;YAAEC,IAAI;YAAGN;QAAK;QAE1B,MAAMO,SAAS,MAAMV,0BAA0B;YAAEQ;YAAKN,UAAU;QAAgB;QAEhFJ,OAAOY,QAAQE,QAAQ;IACzB;IAEAb,GAAG,gEAAgE;QACjE,MAAMG,WAAW;QACjB,MAAM,EAAEC,IAAI,EAAE,GAAGF,oBAAoBC;QACrC,4DAA4D;QAC5D,MAAMW,YAAY;QAClB,MAAML,MAAM;YAAEC,IAAI;YAAGH,MAAMO;YAAWV;QAAK;QAE3C,MAAMO,SAAS,MAAMV,0BAA0B;YAAEQ;YAAKN;QAAS;QAE/DJ,OAAOY,QAAQE,QAAQ;IACzB;AACF"}

View File

@@ -0,0 +1,4 @@
{
"main": "../../cjs/_ts_dispose_resources.cjs",
"module": "../../esm/_ts_dispose_resources.js"
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"createThumbnail.d.ts","sourceRoot":"","sources":["../../../src/elements/Thumbnail/createThumbnail.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,eAAe,SAAU,IAAI,KAAG,OAAO,CAAC,MAAM,CAoD1D,CAAA"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"escape.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["escape.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,QAAyB,CAAC;AAWlD,eAAO,MAAM,YAAY,QAGT,MAAM,SAAS,MAAM,KAAG,MAQD,CAAC;AAExC;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CA0B7C;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM,kBAAY,CAAC;AAqChC;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,SA7Bb,MAAM,KAAK,MA6BuC,CAAC;AAE7D;;;;;GAKG;AACH,eAAO,MAAM,eAAe,SArClB,MAAM,KAAK,MA4CpB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,UAAU,SApDb,MAAM,KAAK,MA4DpB,CAAC"}

View File

@@ -0,0 +1,207 @@
import { getBlockSelect, getDefaultValue, stripUnselectedFields } from 'payload';
import { fieldAffectsData, tabHasName } from 'payload/shared';
import { iterateFields } from './iterateFields.js';
// TODO: Make this works for rich text subfields
export const defaultValuePromise = async ({
id,
data,
field,
locale,
req,
select,
selectMode,
siblingData,
user
}) => {
const shouldContinue = stripUnselectedFields({
field,
select,
selectMode,
siblingDoc: siblingData
});
if (!shouldContinue) {
return;
}
if (fieldAffectsData(field)) {
if (typeof siblingData[field.name] === 'undefined' && typeof field.defaultValue !== 'undefined') {
try {
siblingData[field.name] = await getDefaultValue({
defaultValue: field.defaultValue,
locale,
req,
user,
value: siblingData[field.name]
});
} catch (err) {
req.payload.logger.error({
err,
msg: `Error calculating default value for field: ${field.name}`
});
}
}
}
// Traverse subfields
switch (field.type) {
case 'array':
{
const rows = siblingData[field.name];
if (Array.isArray(rows)) {
const promises = [];
const arraySelect = select?.[field.name];
rows.forEach(row => {
promises.push(iterateFields({
id,
data,
fields: field.fields,
locale,
req,
select: typeof arraySelect === 'object' ? arraySelect : undefined,
selectMode,
siblingData: row,
user
}));
});
await Promise.all(promises);
}
break;
}
case 'blocks':
{
const rows = siblingData[field.name];
if (Array.isArray(rows)) {
const promises = [];
rows.forEach(row => {
const blockTypeToMatch = row.blockType;
const block = req.payload.blocks[blockTypeToMatch] ?? (field.blockReferences ?? field.blocks).find(blockType => typeof blockType !== 'string' && blockType.slug === blockTypeToMatch);
const {
blockSelect,
blockSelectMode
} = getBlockSelect({
block,
select: select?.[field.name],
selectMode
});
if (block) {
row.blockType = blockTypeToMatch;
promises.push(iterateFields({
id,
data,
fields: block.fields,
locale,
req,
select: typeof blockSelect === 'object' ? blockSelect : undefined,
selectMode: blockSelectMode,
siblingData: row,
user
}));
}
});
await Promise.all(promises);
}
break;
}
case 'collapsible':
case 'row':
{
await iterateFields({
id,
data,
fields: field.fields,
locale,
req,
select,
selectMode,
siblingData,
user
});
break;
}
case 'group':
{
if (fieldAffectsData(field)) {
if (typeof siblingData[field.name] !== 'object') {
siblingData[field.name] = {};
}
const groupData = siblingData[field.name];
const groupSelect = select?.[field.name];
await iterateFields({
id,
data,
fields: field.fields,
locale,
req,
select: typeof groupSelect === 'object' ? groupSelect : undefined,
selectMode,
siblingData: groupData,
user
});
} else {
await iterateFields({
id,
data,
fields: field.fields,
locale,
req,
select,
selectMode,
siblingData,
user
});
}
break;
}
case 'tab':
{
let tabSiblingData;
const isNamedTab = tabHasName(field);
let tabSelect;
if (isNamedTab) {
if (typeof siblingData[field.name] !== 'object') {
siblingData[field.name] = {};
}
tabSiblingData = siblingData[field.name];
if (typeof select?.[field.name] === 'object') {
tabSelect = select?.[field.name];
}
} else {
tabSiblingData = siblingData;
tabSelect = select;
}
await iterateFields({
id,
data,
fields: field.fields,
locale,
req,
select: tabSelect,
selectMode,
siblingData: tabSiblingData,
user
});
break;
}
case 'tabs':
{
await iterateFields({
id,
data,
fields: field.tabs.map(tab => ({
...tab,
type: 'tab'
})),
locale,
req,
select,
selectMode,
siblingData,
user
});
break;
}
default:
{
break;
}
}
};
//# sourceMappingURL=promise.js.map

View File

@@ -0,0 +1,9 @@
import type { Locale } from "./types.js";
/**
* @category Locales
* @summary Hebrew locale.
* @language Hebrew
* @iso-639-2 heb
* @author Nir Lahad [@nirlah](https://github.com/nirlah)
*/
export declare const he: Locale;

View File

@@ -0,0 +1,195 @@
/**
* These files must remain as plain JavaScript (.js) rather than TypeScript (.ts) because they are
* imported directly in next.config.mjs files. Since next.config files run before the build process,
* TypeScript compilation is not available. This ensures compatibility with all templates and
* user projects regardless of their TypeScript setup.
*/import { getNextjsVersion, supportsTurbopackExternalizeTransitiveDependencies } from './withPayload.utils.js';
import { withPayloadLegacy } from './withPayloadLegacy.js';
const poweredByHeader = {
key: 'X-Powered-By',
value: 'Next.js, Payload'
};
/**
* @param {import('next').NextConfig} nextConfig
* @param {Object} [options] - Optional configuration options
* @param {boolean} [options.devBundleServerPackages] - Whether to bundle server packages in development mode. @default false
* */
export const withPayload = (nextConfig = {}, options = {}) => {
const nextjsVersion = getNextjsVersion();
const supportsTurbopackBuild = supportsTurbopackExternalizeTransitiveDependencies(nextjsVersion);
const env = nextConfig.env || {};
if (nextConfig.experimental?.staleTimes?.dynamic) {
console.warn('Payload detected a non-zero value for the `staleTimes.dynamic` option in your Next.js config. This will slow down page transitions and may cause stale data to load within the Admin panel. To clear this warning, remove the `staleTimes.dynamic` option from your Next.js config or set it to 0. In the future, Next.js may support scoping this option to specific routes.');
env.NEXT_PUBLIC_ENABLE_ROUTER_CACHE_REFRESH = 'true';
}
const consoleWarn = console.warn;
const sassWarningTexts = [
// This warning is a lie - without silencing import deprecation warnings, sass will spam the console with deprecation warnings
'Future import deprecation is not yet active, so silencing it is unnecessary',
// Sometimes happens despite silenceDeprecations
'The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0'];
console.warn = (...args) => {
if (typeof args[1] === 'string' && sassWarningTexts.some(text => args[1].includes(text)) || typeof args[0] === 'string' && sassWarningTexts.some(text => args[0].includes(text))) {
return;
}
consoleWarn(...args);
};
/** @type {import('next').NextConfig} */
const baseConfig = {
...nextConfig,
env,
sassOptions: {
...(nextConfig.sassOptions || {}),
/**
* This prevents scss warning spam during pnpm dev that looks like this:
* ⚠ ./test/admin/components/views/CustomMinimal/index.scss
* Issue while running loader
* SassWarning: Deprecation Warning on line 8, column 8 of file:///Users/alessio/Documents/GitHub/ payload/packages/ui/src/scss/styles.scss:8:8:
* Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.
*
* More info and automated migrator: https://sass-lang.com/d/import
*
* 8 | @import 'queries';
*
*
* packages/ui/src/scss/styles.scss 9:9 @import
* test/admin/components/views/CustomMinimal/index.scss 1:9 root stylesheet
*
* @todo: update all outdated scss imports to use @use instead of @import. Then, we can remove this.
*/
silenceDeprecations: [...(nextConfig.sassOptions?.silenceDeprecations || []), 'import']
},
outputFileTracingExcludes: {
...(nextConfig.outputFileTracingExcludes || {}),
'**/*': [...(nextConfig.outputFileTracingExcludes?.['**/*'] || []), 'drizzle-kit', 'drizzle-kit/api']
},
outputFileTracingIncludes: {
...(nextConfig.outputFileTracingIncludes || {}),
'**/*': [...(nextConfig.outputFileTracingIncludes?.['**/*'] || []), '@libsql/client']
},
turbopack: {
...(nextConfig.turbopack || {})
},
// We disable the poweredByHeader here because we add it manually in the headers function below
...(nextConfig.poweredByHeader !== false ? {
poweredByHeader: false
} : {}),
headers: async () => {
const headersFromConfig = 'headers' in nextConfig ? await nextConfig.headers() : [];
return [...(headersFromConfig || []), {
headers: [{
key: 'Accept-CH',
value: 'Sec-CH-Prefers-Color-Scheme'
}, {
key: 'Vary',
value: 'Sec-CH-Prefers-Color-Scheme'
}, {
key: 'Critical-CH',
value: 'Sec-CH-Prefers-Color-Scheme'
}, ...(nextConfig.poweredByHeader !== false ? [poweredByHeader] : [])],
source: '/:path*'
}];
},
serverExternalPackages: [...(nextConfig.serverExternalPackages || []),
// WHY: without externalizing graphql, a graphql version error will be thrown
// during runtime ("Ensure that there is only one instance of \"graphql\" in the node_modules\ndirectory.")
'graphql', ...(process.env.NODE_ENV === 'development' && options.devBundleServerPackages !== true ?
/**
* Unless explicitly disabled by the user, by passing `devBundleServerPackages: true` to withPayload, we
* do not bundle server-only packages during dev for two reasons:
*
* 1. Performance: Fewer files to compile means faster compilation speeds.
* 2. Turbopack support: Webpack's externals are not supported by Turbopack.
*
* Regarding Turbopack support: Unlike webpack.externals, we cannot use serverExternalPackages to
* externalized packages that are not resolvable from the project root. So including a package like
* "drizzle-kit" in here would do nothing - Next.js will ignore the rule and still bundle the package -
* because it detects that the package is not resolvable from the project root (= not directly installed
* by the user in their own package.json).
*
* Instead, we can use serverExternalPackages for the entry-point packages that *are* installed directly
* by the user (e.g. db-postgres, which then installs drizzle-kit as a dependency).
*
*
*
* We should only do this during development, not build, because externalizing these packages can hurt
* the bundle size. Not only does it disable tree-shaking, it also risks installing duplicate copies of the
* same package.
*
* Example:
* - @payloadcms/richtext-lexical (in bundle) -> installs qs-esm (bundled because of importer)
* - payload (not in bundle, external) -> installs qs-esm (external because of importer)
* Result: we have two copies of qs-esm installed - one in the bundle, and one in node_modules.
*
* During development, these bundle size difference do not matter much, and development speed /
* turbopack support are more important.
*/
['payload', '@payloadcms/db-mongodb', '@payloadcms/db-postgres', '@payloadcms/db-sqlite', '@payloadcms/db-vercel-postgres', '@payloadcms/db-d1-sqlite', '@payloadcms/drizzle', '@payloadcms/email-nodemailer', '@payloadcms/email-resend', '@payloadcms/graphql', '@payloadcms/payload-cloud', '@payloadcms/plugin-redirects'] : [])],
webpack: (webpackConfig, webpackOptions) => {
const incomingWebpackConfig = typeof nextConfig.webpack === 'function' ? nextConfig.webpack(webpackConfig, webpackOptions) : webpackConfig;
return {
...incomingWebpackConfig,
externals: [...(incomingWebpackConfig?.externals || []),
/**
* See the explanation in the serverExternalPackages section above.
* We need to force Webpack to emit require() calls for these packages, even though they are not
* resolvable from the project root. You would expect this to error during runtime, but Next.js seems to be able to require these just fine.
*
* This is the only way to get Webpack Build to work, without the bundle size caveats of externalizing the
* entry point packages, as explained in the serverExternalPackages section above.
*/
'drizzle-kit', 'drizzle-kit/api', 'sharp', 'libsql', 'require-in-the-middle', 'json-schema-to-typescript'],
plugins: [...(incomingWebpackConfig?.plugins || []),
// Fix cloudflare:sockets error: https://github.com/vercel/next.js/discussions/50177
new webpackOptions.webpack.IgnorePlugin({
resourceRegExp: /^pg-native$|^cloudflare:sockets$/
})],
resolve: {
...(incomingWebpackConfig?.resolve || {}),
alias: {
...(incomingWebpackConfig?.resolve?.alias || {})
},
fallback: {
...(incomingWebpackConfig?.resolve?.fallback || {}),
/*
* This fixes the following warning when running next build with webpack (tested on Next.js 16.0.3 with Payload 3.64.0):
*
* ⚠ Compiled with warnings in 8.7s
*
* ./node_modules/.pnpm/mongodb@6.16.0/node_modules/mongodb/lib/deps.js
* Module not found: Can't resolve 'aws4' in '/Users/alessio/Documents/temp/next16p/node_modules/.pnpm/mongodb@6.16.0/node_modules/mongodb/lib'
*
* Import trace for requested module:
* ./node_modules/.pnpm/mongodb@6.16.0/node_modules/mongodb/lib/deps.js
* ./node_modules/.pnpm/mongodb@6.16.0/node_modules/mongodb/lib/client-side-encryption/client_encryption.js
* ./node_modules/.pnpm/mongodb@6.16.0/node_modules/mongodb/lib/index.js
* ./node_modules/.pnpm/mongoose@8.15.1/node_modules/mongoose/lib/index.js
* ./node_modules/.pnpm/mongoose@8.15.1/node_modules/mongoose/index.js
* ./node_modules/.pnpm/@payloadcms+db-mongodb@3.64.0_payload@3.64.0_graphql@16.12.0_typescript@5.7.3_/node_modules/@payloadcms/db-mongodb/dist/index.js
* ./src/payload.config.ts
* ./src/app/my-route/route.ts
*
**/
aws4: false
}
}
};
}
};
if (nextConfig.basePath) {
process.env.NEXT_BASE_PATH = nextConfig.basePath;
baseConfig.env.NEXT_BASE_PATH = nextConfig.basePath;
}
if (!supportsTurbopackBuild) {
return withPayloadLegacy(baseConfig);
} else {
return {
...baseConfig,
serverExternalPackages: [...(baseConfig.serverExternalPackages || []), 'drizzle-kit', 'drizzle-kit/api', 'sharp', 'libsql', 'require-in-the-middle', 'json-schema-to-typescript',
// Prevents turbopack build errors by the thread-stream package which is installed by pino
'pino']
};
}
};
export default withPayload;
//# sourceMappingURL=withPayload.js.map

View File

@@ -0,0 +1,157 @@
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.isPlainObject = void 0;
/* eslint-disable @typescript-eslint/no-explicit-any */
/**
* based on lodash in order to support esm builds without esModuleInterop.
* lodash is using MIT License.
**/
const objectTag = '[object Object]';
const nullTag = '[object Null]';
const undefinedTag = '[object Undefined]';
const funcProto = Function.prototype;
const funcToString = funcProto.toString;
const objectCtorString = funcToString.call(Object);
const getPrototypeOf = Object.getPrototypeOf;
const objectProto = Object.prototype;
const hasOwnProperty = objectProto.hasOwnProperty;
const symToStringTag = Symbol ? Symbol.toStringTag : undefined;
const nativeObjectToString = objectProto.toString;
/**
* Checks if `value` is a plain object, that is, an object created by the
* `Object` constructor or one with a `[[Prototype]]` of `null`.
*
* @static
* @memberOf _
* @since 0.8.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
* @example
*
* function Foo() {
* this.a = 1;
* }
*
* _.isPlainObject(new Foo);
* // => false
*
* _.isPlainObject([1, 2, 3]);
* // => false
*
* _.isPlainObject({ 'x': 0, 'y': 0 });
* // => true
*
* _.isPlainObject(Object.create(null));
* // => true
*/
function isPlainObject(value) {
if (!isObjectLike(value) || baseGetTag(value) !== objectTag) {
return false;
}
const proto = getPrototypeOf(value);
if (proto === null) {
return true;
}
const Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
return (typeof Ctor == 'function' &&
Ctor instanceof Ctor &&
funcToString.call(Ctor) === objectCtorString);
}
exports.isPlainObject = isPlainObject;
/**
* Checks if `value` is object-like. A value is object-like if it's not `null`
* and has a `typeof` result of "object".
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
* @example
*
* _.isObjectLike({});
* // => true
*
* _.isObjectLike([1, 2, 3]);
* // => true
*
* _.isObjectLike(_.noop);
* // => false
*
* _.isObjectLike(null);
* // => false
*/
function isObjectLike(value) {
return value != null && typeof value == 'object';
}
/**
* The base implementation of `getTag` without fallbacks for buggy environments.
*
* @private
* @param {*} value The value to query.
* @returns {string} Returns the `toStringTag`.
*/
function baseGetTag(value) {
if (value == null) {
return value === undefined ? undefinedTag : nullTag;
}
return symToStringTag && symToStringTag in Object(value)
? getRawTag(value)
: objectToString(value);
}
/**
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
*
* @private
* @param {*} value The value to query.
* @returns {string} Returns the raw `toStringTag`.
*/
function getRawTag(value) {
const isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
let unmasked = false;
try {
value[symToStringTag] = undefined;
unmasked = true;
}
catch {
// silence
}
const result = nativeObjectToString.call(value);
if (unmasked) {
if (isOwn) {
value[symToStringTag] = tag;
}
else {
delete value[symToStringTag];
}
}
return result;
}
/**
* Converts `value` to a string using `Object.prototype.toString`.
*
* @private
* @param {*} value The value to convert.
* @returns {string} Returns the converted string.
*/
function objectToString(value) {
return nativeObjectToString.call(value);
}
//# sourceMappingURL=lodash.merge.js.map

View File

@@ -0,0 +1,4 @@
export {
Fragment,
jsxDEV
} from "./emotion-react-jsx-dev-runtime.edge-light.cjs.js";

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/gel-core/columns/real.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyGelTable } from '~/gel-core/table.ts';\nimport { GelColumn, GelColumnBuilder } from './common.ts';\n\nexport type GelRealBuilderInitial<TName extends string> = GelRealBuilder<{\n\tname: TName;\n\tdataType: 'number';\n\tcolumnType: 'GelReal';\n\tdata: number;\n\tdriverParam: number;\n\tenumValues: undefined;\n}>;\n\nexport class GelRealBuilder<T extends ColumnBuilderBaseConfig<'number', 'GelReal'>> extends GelColumnBuilder<\n\tT,\n\t{ length: number | undefined }\n> {\n\tstatic override readonly [entityKind]: string = 'GelRealBuilder';\n\n\tconstructor(name: T['name'], length?: number) {\n\t\tsuper(name, 'number', 'GelReal');\n\t\tthis.config.length = length;\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyGelTable<{ name: TTableName }>,\n\t): GelReal<MakeColumnConfig<T, TTableName>> {\n\t\treturn new GelReal<MakeColumnConfig<T, TTableName>>(table, this.config as ColumnBuilderRuntimeConfig<any, any>);\n\t}\n}\n\nexport class GelReal<T extends ColumnBaseConfig<'number', 'GelReal'>> extends GelColumn<T> {\n\tstatic override readonly [entityKind]: string = 'GelReal';\n\n\tconstructor(table: AnyGelTable<{ name: T['tableName'] }>, config: GelRealBuilder<T>['config']) {\n\t\tsuper(table, config);\n\t}\n\n\tgetSQLType(): string {\n\t\treturn 'real';\n\t}\n}\n\nexport function real(): GelRealBuilderInitial<''>;\nexport function real<TName extends string>(name: TName): GelRealBuilderInitial<TName>;\nexport function real(name?: string) {\n\treturn new GelRealBuilder(name ?? '');\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,oBAA2B;AAE3B,oBAA4C;AAWrC,MAAM,uBAA+E,+BAG1F;AAAA,EACD,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB,QAAiB;AAC7C,UAAM,MAAM,UAAU,SAAS;AAC/B,SAAK,OAAO,SAAS;AAAA,EACtB;AAAA;AAAA,EAGS,MACR,OAC2C;AAC3C,WAAO,IAAI,QAAyC,OAAO,KAAK,MAA8C;AAAA,EAC/G;AACD;AAEO,MAAM,gBAAiE,wBAAa;AAAA,EAC1F,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YAAY,OAA8C,QAAqC;AAC9F,UAAM,OAAO,MAAM;AAAA,EACpB;AAAA,EAEA,aAAqB;AACpB,WAAO;AAAA,EACR;AACD;AAIO,SAAS,KAAK,MAAe;AACnC,SAAO,IAAI,eAAe,QAAQ,EAAE;AACrC;","names":[]}

View File

@@ -0,0 +1,12 @@
var _typeof = require("./typeof.js")["default"];
function setFunctionName(e, t, n) {
"symbol" == _typeof(t) && (t = (t = t.description) ? "[" + t + "]" : "");
try {
Object.defineProperty(e, "name", {
configurable: !0,
value: n ? n + " " + t : t
});
} catch (e) {}
return e;
}
module.exports = setFunctionName, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -0,0 +1,7 @@
declare function setGlobalOrigin (origin: string | URL | undefined): void
declare function getGlobalOrigin (): URL | undefined
export {
setGlobalOrigin,
getGlobalOrigin
}

View File

@@ -0,0 +1,15 @@
"use strict";
exports.formatRelative = void 0;
const formatRelativeLocale = {
lastWeek: "'ôfrûne' eeee 'om' p",
yesterday: "'juster om' p",
today: "'hjoed om' p",
tomorrow: "'moarn om' p",
nextWeek: "eeee 'om' p",
other: "P",
};
const formatRelative = (token, _date, _baseDate, _options) =>
formatRelativeLocale[token];
exports.formatRelative = formatRelative;

View File

@@ -0,0 +1,36 @@
"use strict";
exports.isThisHour = isThisHour;
var _index = require("./constructNow.cjs");
var _index2 = require("./isSameHour.cjs");
var _index3 = require("./toDate.cjs");
/**
* The {@link isThisHour} function options.
*/
/**
* @name isThisHour
* @category Hour Helpers
* @summary Is the given date in the same hour as the current date?
* @pure false
*
* @description
* Is the given date in the same hour as the current date?
*
* @param date - The date to check
* @param options - An object with options
*
* @returns The date is in this hour
*
* @example
* // If now is 25 September 2014 18:30:15.500,
* // is 25 September 2014 18:00:00 in this hour?
* const result = isThisHour(new Date(2014, 8, 25, 18))
* //=> true
*/
function isThisHour(date, options) {
return (0, _index2.isSameHour)(
(0, _index3.toDate)(date, options?.in),
(0, _index.constructNow)(options?.in || date),
);
}

View File

@@ -0,0 +1,36 @@
import { DEBUG_BUILD } from '../debug-build.js';
import { debug } from './debug-logger.js';
import { stringMatchesSomePattern } from './string.js';
const NOT_PROPAGATED_MESSAGE =
'[Tracing] Not injecting trace data for url because it does not match tracePropagationTargets:';
/**
* Check if a given URL should be propagated to or not.
* If no url is defined, or no trace propagation targets are defined, this will always return `true`.
* You can also optionally provide a decision map, to cache decisions and avoid repeated regex lookups.
*/
function shouldPropagateTraceForUrl(
url,
tracePropagationTargets,
decisionMap,
) {
if (typeof url !== 'string' || !tracePropagationTargets) {
return true;
}
const cachedDecision = decisionMap?.get(url);
if (cachedDecision !== undefined) {
DEBUG_BUILD && !cachedDecision && debug.log(NOT_PROPAGATED_MESSAGE, url);
return cachedDecision;
}
const decision = stringMatchesSomePattern(url, tracePropagationTargets);
decisionMap?.set(url, decision);
DEBUG_BUILD && !decision && debug.log(NOT_PROPAGATED_MESSAGE, url);
return decision;
}
export { shouldPropagateTraceForUrl };
//# sourceMappingURL=tracePropagationTargets.js.map

View File

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

View File

@@ -0,0 +1,7 @@
{
"name": "dom-helpers/closest",
"private": true,
"main": "../cjs/closest.js",
"module": "../esm/closest.js",
"types": "../esm/closest.d.ts"
}

View File

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

View File

@@ -0,0 +1,18 @@
import { RestCommand } from "../../types.cjs";
import { SchemaSnapshotOutput } from "./snapshot.cjs";
//#region src/rest/commands/schema/diff.d.ts
type SchemaDiffOutput = {
hash: string;
diff: Record<string, any>;
};
/**
* Compare the current instance's schema against the schema snapshot in JSON request body and retrieve the difference. This endpoint is only available to admin users.
* @param snapshot JSON object containing collections, fields, and relations to apply.
* @param force Bypass version and database vendor restrictions.
* @returns Returns the differences between the current instance's schema and the schema passed in the request body.
*/
declare const schemaDiff: <Schema>(snapshot: SchemaSnapshotOutput, force?: boolean) => RestCommand<SchemaDiffOutput, Schema>;
//#endregion
export { SchemaDiffOutput, schemaDiff };
//# sourceMappingURL=diff.d.cts.map

View File

@@ -0,0 +1,4 @@
import { Builtin } from "../built-in";
export type DeepNonNullable<Type> = Type extends Builtin ? NonNullable<Type> : Type extends Map<infer Keys, infer Values> ? Map<DeepNonNullable<Keys>, DeepNonNullable<Values>> : Type extends ReadonlyMap<infer Keys, infer Values> ? ReadonlyMap<DeepNonNullable<Keys>, DeepNonNullable<Values>> : Type extends WeakMap<infer Keys, infer Values> ? WeakMap<DeepNonNullable<Keys>, DeepNonNullable<Values>> : Type extends Set<infer Values> ? Set<DeepNonNullable<Values>> : Type extends ReadonlySet<infer Values> ? ReadonlySet<DeepNonNullable<Values>> : Type extends WeakSet<infer Values> ? WeakSet<DeepNonNullable<Values>> : Type extends Promise<infer Values> ? Promise<DeepNonNullable<Values>> : Type extends {} ? {
[Key in keyof Type]: DeepNonNullable<Type[Key]>;
} : NonNullable<Type>;

View File

@@ -0,0 +1,65 @@
import { entityKind } from "../entity.cjs";
import type { AnySQLiteColumn, SQLiteColumn } from "./columns/index.cjs";
import type { SQLiteTable } from "./table.cjs";
export type UpdateDeleteAction = 'cascade' | 'restrict' | 'no action' | 'set null' | 'set default';
export type Reference = () => {
readonly name?: string;
readonly columns: SQLiteColumn[];
readonly foreignTable: SQLiteTable;
readonly foreignColumns: SQLiteColumn[];
};
export declare class ForeignKeyBuilder {
static readonly [entityKind]: string;
_: {
brand: 'SQLiteForeignKeyBuilder';
foreignTableName: 'TForeignTableName';
};
constructor(config: () => {
name?: string;
columns: SQLiteColumn[];
foreignColumns: SQLiteColumn[];
}, actions?: {
onUpdate?: UpdateDeleteAction;
onDelete?: UpdateDeleteAction;
} | undefined);
onUpdate(action: UpdateDeleteAction): this;
onDelete(action: UpdateDeleteAction): this;
}
export declare class ForeignKey {
readonly table: SQLiteTable;
static readonly [entityKind]: string;
readonly reference: Reference;
readonly onUpdate: UpdateDeleteAction | undefined;
readonly onDelete: UpdateDeleteAction | undefined;
constructor(table: SQLiteTable, builder: ForeignKeyBuilder);
getName(): string;
}
type ColumnsWithTable<TTableName extends string, TColumns extends SQLiteColumn[]> = {
[Key in keyof TColumns]: AnySQLiteColumn<{
tableName: TTableName;
}>;
};
/**
* @deprecated please use `foreignKey({ columns: [], foreignColumns: [] })` syntax without callback
* @param config
* @returns
*/
export declare function foreignKey<TTableName extends string, TForeignTableName extends string, TColumns extends [AnySQLiteColumn<{
tableName: TTableName;
}>, ...AnySQLiteColumn<{
tableName: TTableName;
}>[]]>(config: () => {
name?: string;
columns: TColumns;
foreignColumns: ColumnsWithTable<TForeignTableName, TColumns>;
}): ForeignKeyBuilder;
export declare function foreignKey<TTableName extends string, TForeignTableName extends string, TColumns extends [AnySQLiteColumn<{
tableName: TTableName;
}>, ...AnySQLiteColumn<{
tableName: TTableName;
}>[]]>(config: {
name?: string;
columns: TColumns;
foreignColumns: ColumnsWithTable<TForeignTableName, TColumns>;
}): ForeignKeyBuilder;
export {};

View File

@@ -0,0 +1,6 @@
/**
* The default argument placeholder value for methods.
*
* @type {Object}
*/
module.exports = {};

View File

@@ -0,0 +1,21 @@
// Vendored from https://github.com/open-telemetry/opentelemetry-js-contrib/blob/407f61591ba69a39a6908264379d4d98a48dbec4/plugins/node/opentelemetry-instrumentation-fastify/src/constants.ts
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const spanRequestSymbol = Symbol('opentelemetry.instrumentation.fastify.request_active_span');
export { spanRequestSymbol };
//# sourceMappingURL=constants.js.map

View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2015 Andres Suarez <zertosh@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@@ -0,0 +1,3 @@
import type { SupportedLanguages } from '../types.js';
export declare const translations: SupportedLanguages;
//# sourceMappingURL=all.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"dice-6.js","sources":["../../../src/icons/dice-6.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Dice6\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHg9IjMiIHk9IjMiIHJ4PSIyIiByeT0iMiIgLz4KICA8cGF0aCBkPSJNMTYgOGguMDEiIC8+CiAgPHBhdGggZD0iTTE2IDEyaC4wMSIgLz4KICA8cGF0aCBkPSJNMTYgMTZoLjAxIiAvPgogIDxwYXRoIGQ9Ik04IDhoLjAxIiAvPgogIDxwYXRoIGQ9Ik04IDEyaC4wMSIgLz4KICA8cGF0aCBkPSJNOCAxNmguMDEiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/dice-6\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 Dice6 = createLucideIcon('Dice6', [\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', ry: '2', key: '1m3agn' }],\n ['path', { d: 'M16 8h.01', key: 'cr5u4v' }],\n ['path', { d: 'M16 12h.01', key: '1l6xoz' }],\n ['path', { d: 'M16 16h.01', key: '1f9h7w' }],\n ['path', { d: 'M8 8h.01', key: '1e4136' }],\n ['path', { d: 'M8 12h.01', key: 'czm47f' }],\n ['path', { d: 'M8 16h.01', key: '18s6g9' }],\n]);\n\nexport default Dice6;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,iBAAiB,OAAS,CAAA,CAAA,CAAA;AAAA,CAAA,CACtC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,KAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAQ,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,EAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,KAAK,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAA,EAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAU,CAAA,CAAA;AAAA,CAAA,CACvF,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,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,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;AAC5C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,26 @@
Prism.languages.vhdl = {
'comment': /--.+/,
// support for all logic vectors
'vhdl-vectors': {
'pattern': /\b[oxb]"[\da-f_]+"|"[01uxzwlh-]+"/i,
'alias': 'number'
},
// support for operator overloading included
'quoted-function': {
pattern: /"\S+?"(?=\()/,
alias: 'function'
},
'string': /"(?:[^\\"\r\n]|\\(?:\r\n|[\s\S]))*"/,
'attribute': {
pattern: /\b'\w+/,
alias: 'attr-name'
},
// support for predefined attributes included
'keyword': /\b(?:access|after|alias|all|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|new|next|null|of|on|open|others|out|package|port|postponed|private|procedure|process|pure|range|record|register|reject|report|return|select|severity|shared|signal|subtype|then|to|transport|type|unaffected|units|until|use|variable|view|wait|when|while|with)\b/i,
'boolean': /\b(?:false|true)\b/i,
'function': /\w+(?=\()/,
// decimal, based, physical, and exponential numbers supported
'number': /'[01uxzwlh-]'|\b(?:\d+#[\da-f_.]+#|\d[\d_.]*)(?:e[-+]?\d+)?/i,
'operator': /[<>]=?|:=|[-+*/&=]|\b(?:abs|and|mod|nand|nor|not|or|rem|rol|ror|sla|sll|sra|srl|xnor|xor)\b/i,
'punctuation': /[{}[\];(),.:]/
};

View File

@@ -0,0 +1 @@
{"version":3,"file":"singleton.js","names":[],"sources":["../../../../src/rest/commands/read/singleton.ts"],"sourcesContent":["import type { ApplyQueryFields, CollectionType, Query, QueryItem, SingletonCollections } from '../../../types/index.js';\nimport type { RestCommand } from '../../types.js';\nimport { throwIfCoreCollection, throwIfEmpty } from '../../utils/index.js';\n\nexport type ReadSingletonOutput<\n\tSchema,\n\tCollection extends SingletonCollections<Schema>,\n\tTQuery extends Query<Schema, Schema[Collection]>,\n> = ApplyQueryFields<Schema, CollectionType<Schema, Collection>, TQuery['fields']>;\n\n/**\n * List the singleton item in Directus.\n *\n * @param collection The collection of the items\n * @param query The query parameters\n *\n * @returns An array of up to limit item objects. If no items are available, data will be an empty array.\n * @throws Will throw if collection is a core collection\n * @throws Will throw if collection is empty\n */\nexport const readSingleton =\n\t<Schema, Collection extends SingletonCollections<Schema>, const TQuery extends QueryItem<Schema, Schema[Collection]>>(\n\t\tcollection: Collection,\n\t\tquery?: TQuery,\n\t): RestCommand<ReadSingletonOutput<Schema, Collection, TQuery>, Schema> =>\n\t() => {\n\t\tthrowIfEmpty(String(collection), 'Collection cannot be empty');\n\t\tthrowIfCoreCollection(collection, 'Cannot use readSingleton for core collections');\n\n\t\treturn {\n\t\t\tpath: `/items/${collection as string}`,\n\t\t\tparams: query ?? {},\n\t\t\tmethod: 'GET',\n\t\t};\n\t};\n"],"mappings":"0IAoBA,MAAa,GAEX,EACA,SAGA,EAAa,OAAO,EAAW,CAAE,6BAA6B,CAC9D,EAAsB,EAAY,gDAAgD,CAE3E,CACN,KAAM,UAAU,IAChB,OAAQ,GAAS,EAAE,CACnB,OAAQ,MACR"}

View File

@@ -0,0 +1,53 @@
# `@lexical/headless`
[![See API Documentation](https://lexical.dev/img/see-api-documentation.svg)](https://lexical.dev/docs/api/modules/lexical_headless)
This package allows you to interact with Lexical in a headless environment (one that does not rely on DOM, e.g. for Node.js environment), and use its
main features like editor.update(), editor.registerNodeTransform(), editor.registerUpdateListener()
to create, update or traverse state.
Install `@lexical/headless`:
```
npm install --save @lexical/headless
```
```js
const { createHeadlessEditor } = require('@lexical/headless');
const editor = createHeadlessEditor({
nodes: [],
onError: () => {},
});
editor.update(() => {
$getRoot().append(
$createParagraphNode().append(
$createTextNode('Hello world')
)
)
});
```
Any plugins that do not rely on DOM could also be used. Here's an example of how
you can convert lexical editor state to markdown on server:
```js
const { createHeadlessEditor } = require('@lexical/headless');
const { $convertToMarkdownString, TRANSFORMERS } = require('@lexical/markdown');
app.get('article/:id/markdown', async (req, res) => {
const editor = createHeadlessEditor({
nodes: [],
onError: () => {},
});
const articleEditorStateJSON = await loadArticleBody(req.query.id);
editor.setEditorState(editor.parseEditorState(articleEditorStateJSON));
editor.update(() => {
const markdown = $convertToMarkdownString(TRANSFORMERS);
res.send(markdown);
});
});
```

View File

@@ -0,0 +1,14 @@
/**
* @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.
*/
const toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
const mergeClasses = (...classes) => classes.filter((className, index, array) => {
return Boolean(className) && array.indexOf(className) === index;
}).join(" ");
export { mergeClasses, toKebabCase };
//# sourceMappingURL=utils.js.map

View File

@@ -0,0 +1,7 @@
/**
* Vendored in from @sentry-internal/rrweb.
*
* This is a copy of the function from rrweb, it is not nicely exported there.
*/
export declare function closestElementOfNode(node: Node | null): HTMLElement | null;
//# sourceMappingURL=rrweb.d.ts.map

View File

@@ -0,0 +1,16 @@
import { TracerProvider, MeterProvider } from '@opentelemetry/api';
import { Instrumentation } from './types';
import { LoggerProvider } from '@opentelemetry/api-logs';
/**
* Enable instrumentations
* @param instrumentations
* @param tracerProvider
* @param meterProvider
*/
export declare function enableInstrumentations(instrumentations: Instrumentation[], tracerProvider?: TracerProvider, meterProvider?: MeterProvider, loggerProvider?: LoggerProvider): void;
/**
* Disable instrumentations
* @param instrumentations
*/
export declare function disableInstrumentations(instrumentations: Instrumentation[]): void;
//# sourceMappingURL=autoLoaderUtils.d.ts.map

View File

@@ -0,0 +1,46 @@
import { status as httpStatus } from 'http-status';
import { getRequestCollection } from '../../utilities/getRequestEntity.js';
import { headersWithCors } from '../../utilities/headersWithCors.js';
import { generatePayloadCookie } from '../cookies.js';
import { registerFirstUserOperation } from '../operations/registerFirstUser.js';
export const registerFirstUserHandler = async (req)=>{
const collection = getRequestCollection(req);
const { data, t } = req;
const authData = collection.config.auth?.loginWithUsername ? {
email: typeof req.data?.email === 'string' ? req.data.email : '',
password: typeof req.data?.password === 'string' ? req.data.password : '',
username: typeof req.data?.username === 'string' ? req.data.username : ''
} : {
email: typeof req.data?.email === 'string' ? req.data.email : '',
password: typeof req.data?.password === 'string' ? req.data.password : ''
};
const result = await registerFirstUserOperation({
collection,
data: {
...data,
...authData
},
req
});
const cookie = generatePayloadCookie({
collectionAuthConfig: collection.config.auth,
cookiePrefix: req.payload.config.cookiePrefix,
token: result.token
});
return Response.json({
exp: result.exp,
message: t('authentication:successfullyRegisteredFirstUser'),
token: result.token,
user: result.user
}, {
headers: headersWithCors({
headers: new Headers({
'Set-Cookie': cookie
}),
req
}),
status: httpStatus.OK
});
};
//# sourceMappingURL=registerFirstUser.js.map

View File

@@ -0,0 +1,7 @@
export { createSnapModifier } from './createSnapModifier';
export { restrictToHorizontalAxis } from './restrictToHorizontalAxis';
export { restrictToParentElement } from './restrictToParentElement';
export { restrictToFirstScrollableAncestor } from './restrictToFirstScrollableAncestor';
export { restrictToVerticalAxis } from './restrictToVerticalAxis';
export { restrictToWindowEdges } from './restrictToWindowEdges';
export { snapCenterToCursor } from './snapCenterToCursor';

View File

@@ -0,0 +1 @@
{"version":3,"file":"maximize-2.js","sources":["../../../src/icons/maximize-2.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Maximize2\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cG9seWxpbmUgcG9pbnRzPSIxNSAzIDIxIDMgMjEgOSIgLz4KICA8cG9seWxpbmUgcG9pbnRzPSI5IDIxIDMgMjEgMyAxNSIgLz4KICA8bGluZSB4MT0iMjEiIHgyPSIxNCIgeTE9IjMiIHkyPSIxMCIgLz4KICA8bGluZSB4MT0iMyIgeDI9IjEwIiB5MT0iMjEiIHkyPSIxNCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/maximize-2\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 Maximize2 = createLucideIcon('Maximize2', [\n ['polyline', { points: '15 3 21 3 21 9', key: 'mznyad' }],\n ['polyline', { points: '9 21 3 21 3 15', key: '1avn1i' }],\n ['line', { x1: '21', x2: '14', y1: '3', y2: '10', key: 'ota7mn' }],\n ['line', { x1: '3', x2: '10', y1: '21', y2: '14', key: '1atl0r' }],\n]);\n\nexport default Maximize2;\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,CAAA,CAAA,CAAA,CAAA,CAAY,CAAA,CAAA,CAAA,CAAE,QAAQ,CAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,CAAA,CAAA,CAAA,CAAE,QAAQ,CAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACxD,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACjE,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACnE,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"clock-8.js","sources":["../../../src/icons/clock-8.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Clock8\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIgLz4KICA8cG9seWxpbmUgcG9pbnRzPSIxMiA2IDEyIDEyIDggMTQiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/clock-8\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 Clock8 = createLucideIcon('Clock8', [\n ['circle', { cx: '12', cy: '12', r: '10', key: '1mglay' }],\n ['polyline', { points: '12 6 12 12 8 14', key: 'tmc9b4' }],\n]);\n\nexport default Clock8;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,iBAAiB,QAAU,CAAA,CAAA,CAAA;AAAA,CACxC,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACzD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,CAAA,CAAA,CAAA,CAAE,QAAQ,CAAmB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3D,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,77 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
/** @typedef {import("./Resolver")} Resolver */
/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */
/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */
module.exports = class ParsePlugin {
/**
* @param {string | ResolveStepHook} source source
* @param {Partial<ResolveRequest>} requestOptions request options
* @param {string | ResolveStepHook} target target
*/
constructor(source, requestOptions, target) {
this.source = source;
this.requestOptions = requestOptions;
this.target = target;
}
/**
* @param {Resolver} resolver the resolver
* @returns {void}
*/
apply(resolver) {
const target = resolver.ensureHook(this.target);
resolver
.getHook(this.source)
.tapAsync("ParsePlugin", (request, resolveContext, callback) => {
const parsed = resolver.parse(/** @type {string} */ (request.request));
/** @type {ResolveRequest} */
const obj = { ...request, ...parsed, ...this.requestOptions };
if (request.query && !parsed.query) {
obj.query = request.query;
}
if (request.fragment && !parsed.fragment) {
obj.fragment = request.fragment;
}
if (parsed && resolveContext.log) {
if (parsed.module) resolveContext.log("Parsed request is a module");
if (parsed.directory) {
resolveContext.log("Parsed request is a directory");
}
}
// There is an edge-case where a request with # can be a path or a fragment -> try both
if (obj.request && !obj.query && obj.fragment) {
const directory = obj.fragment.endsWith("/");
/** @type {ResolveRequest} */
const alternative = {
...obj,
directory,
request:
obj.request +
(obj.directory ? "/" : "") +
(directory ? obj.fragment.slice(0, -1) : obj.fragment),
fragment: "",
};
resolver.doResolve(
target,
alternative,
null,
resolveContext,
(err, result) => {
if (err) return callback(err);
if (result) return callback(null, result);
resolver.doResolve(target, obj, null, resolveContext, callback);
},
);
return;
}
resolver.doResolve(target, obj, null, resolveContext, callback);
});
}
};

View File

@@ -0,0 +1,69 @@
'use client';
import { c as _c } from "react/compiler-runtime";
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import React from 'react';
import { useAuth } from '../../../providers/Auth/index.js';
import { EditDepthProvider } from '../../../providers/EditDepth/index.js';
import { useTranslation } from '../../../providers/Translation/index.js';
import { Drawer, DrawerToggler } from '../../Drawer/index.js';
import { useFormsManager } from '../FormsManager/index.js';
import { EditManyBulkUploadsDrawerContent } from './DrawerContent.js';
import './index.scss';
export const baseClass = 'edit-many-bulk-uploads';
export const EditManyBulkUploads = props => {
const $ = _c(5);
const {
collection: t0,
collection
} = props;
const {
slug
} = t0 === undefined ? {} : t0;
const {
permissions
} = useAuth();
const {
t
} = useTranslation();
const {
forms
} = useFormsManager();
const collectionPermissions = permissions?.collections?.[slug];
const hasUpdatePermission = collectionPermissions?.update;
const drawerSlug = `edit-${slug}-bulk-uploads`;
if (!hasUpdatePermission) {
return null;
}
let t1;
if ($[0] !== collection || $[1] !== drawerSlug || $[2] !== forms || $[3] !== t) {
t1 = _jsxs("div", {
className: baseClass,
children: [_jsx(DrawerToggler, {
"aria-label": t("general:editAll"),
className: `${baseClass}__toggle`,
slug: drawerSlug,
children: t("general:editAll")
}), _jsx(EditDepthProvider, {
children: _jsx(Drawer, {
Header: null,
slug: drawerSlug,
children: _jsx(EditManyBulkUploadsDrawerContent, {
collection,
drawerSlug,
forms
})
})
})]
});
$[0] = collection;
$[1] = drawerSlug;
$[2] = forms;
$[3] = t;
$[4] = t1;
} else {
t1 = $[4];
}
return t1;
};
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/elements/ListHeader/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,cAAc,CAAA;AAErB,eAAO,MAAM,eAAe,gBAAgB,CAAA;AAE5C,KAAK,eAAe,GAAG;IACrB,QAAQ,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,EAAE,CAAA;IACpC,QAAQ,CAAC,sBAAsB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACjD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,EAAE,CAAA;CAC1C,CAAA;AACD,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAqBhD,CAAA"}

View File

@@ -0,0 +1,90 @@
import { isSameWeek } from "../../../isSameWeek.js";
import { toDate } from "../../../toDate.js";
const accusativeWeekdays = [
"неділю",
"понеділок",
"вівторок",
"середу",
"четвер",
"п’ятницю",
"суботу",
];
function lastWeek(day) {
const weekday = accusativeWeekdays[day];
switch (day) {
case 0:
case 3:
case 5:
case 6:
return "'у минулу " + weekday + " о' p";
case 1:
case 2:
case 4:
return "'у минулий " + weekday + " о' p";
}
}
function thisWeek(day) {
const weekday = accusativeWeekdays[day];
return "'у " + weekday + " о' p";
}
function nextWeek(day) {
const weekday = accusativeWeekdays[day];
switch (day) {
case 0:
case 3:
case 5:
case 6:
return "'у наступну " + weekday + " о' p";
case 1:
case 2:
case 4:
return "'у наступний " + weekday + " о' p";
}
}
const lastWeekFormat = (dirtyDate, baseDate, options) => {
const date = toDate(dirtyDate);
const day = date.getDay();
if (isSameWeek(date, baseDate, options)) {
return thisWeek(day);
} else {
return lastWeek(day);
}
};
const nextWeekFormat = (dirtyDate, baseDate, options) => {
const date = toDate(dirtyDate);
const day = date.getDay();
if (isSameWeek(date, baseDate, options)) {
return thisWeek(day);
} else {
return nextWeek(day);
}
};
const formatRelativeLocale = {
lastWeek: lastWeekFormat,
yesterday: "'вчора о' p",
today: "'сьогодні о' p",
tomorrow: "'завтра о' p",
nextWeek: nextWeekFormat,
other: "P",
};
export const formatRelative = (token, date, baseDate, options) => {
const format = formatRelativeLocale[token];
if (typeof format === "function") {
return format(date, baseDate, options);
}
return format;
};

View File

@@ -0,0 +1,8 @@
/**
* Sets the async context strategy to use AsyncLocalStorage.
*
* This is a lightweight alternative to the OpenTelemetry-based strategy.
* It uses Node's native AsyncLocalStorage directly without any OpenTelemetry dependencies.
*/
export declare function setAsyncLocalStorageAsyncContextStrategy(): void;
//# sourceMappingURL=asyncLocalStorageStrategy.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"fieldHasChanges.d.ts","sourceRoot":"","sources":["../../../../../src/views/Version/RenderFieldsToDiff/utilities/fieldHasChanges.ts"],"names":[],"mappings":"AAAA,wBAAgB,eAAe,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,WAErD"}

View File

@@ -0,0 +1,63 @@
import isDevelopment from '#is-development'
import pkg from '../package.json'
export type { EmotionCache } from '@emotion/cache'
export type {
ArrayInterpolation,
ComponentSelector,
CSSObject,
FunctionInterpolation,
Interpolation,
Keyframes,
SerializedStyles
} from '@emotion/serialize'
export {
withEmotionCache,
CacheProvider,
__unsafe_useEmotionCache
} from './context'
export { jsx } from './jsx'
export { jsx as createElement } from './jsx'
export { Global } from './global'
export type { GlobalProps } from './global'
export { keyframes } from './keyframes'
export { ClassNames } from './class-names'
export type {
ClassNamesArg,
ClassNamesContent,
ClassNamesProps,
ArrayClassNamesArg
} from './class-names'
export { ThemeContext, useTheme, ThemeProvider, withTheme } from './theming'
export type { Theme, ThemeProviderProps, WithTheme } from './theming'
export { default as css } from './css'
export type { DistributiveOmit, PropsOf } from './types'
declare const global: Record<string, unknown>
declare const jest: unknown
declare const vi: unknown
if (isDevelopment) {
const isBrowser = typeof document !== 'undefined'
// #1727, #2905 for some reason Jest and Vitest evaluate modules twice if some consuming module gets mocked
const isTestEnv = typeof jest !== 'undefined' || typeof vi !== 'undefined'
if (isBrowser && !isTestEnv) {
// globalThis has wide browser support - https://caniuse.com/?search=globalThis, Node.js 12 and later
const globalContext: Record<string, unknown> =
typeof globalThis !== 'undefined'
? globalThis // eslint-disable-line no-undef
: isBrowser
? window
: global
const globalKey = `__EMOTION_REACT_${pkg.version.split('.')[0]}__`
if (globalContext[globalKey]) {
console.warn(
'You are loading @emotion/react when it is already loaded. Running ' +
'multiple instances may cause problems. This can happen if multiple ' +
'versions are used, or if multiple builds of the same version are ' +
'used.'
)
}
globalContext[globalKey] = true
}
}

View File

@@ -0,0 +1,15 @@
import { entityKind } from "../entity.js";
import { SQL, type SQLWrapper } from "../sql/sql.js";
import type { gelSequence } from "./sequence.js";
import { type GelTableFn } from "./table.js";
export declare class GelSchema<TName extends string = string> implements SQLWrapper {
readonly schemaName: TName;
static readonly [entityKind]: string;
constructor(schemaName: TName);
table: GelTableFn<TName>;
sequence: typeof gelSequence;
getSQL(): SQL;
shouldOmitSQLParens(): boolean;
}
export declare function isGelSchema(obj: unknown): obj is GelSchema;
export declare function gelSchema<T extends string>(name: T): GelSchema<T>;

View File

@@ -0,0 +1 @@
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/metrics/web-vitals/types.ts"],"names":[],"mappings":"AAgBA,cAAc,cAAc,CAAC;AAE7B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAM7B,UAAU,mBAAmB;IAC3B,UAAU,EAAE,2BAA2B,CAAC;IACxC,QAAQ,EAAE,yBAAyB,CAAC;IACpC,KAAK,EAAE,sBAAsB,CAAC;CAC/B;AAGD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,QAAQ;QAEhB,YAAY,CAAC,EAAE,OAAO,CAAC;QAEvB,YAAY,CAAC,EAAE,OAAO,CAAC;KACxB;IAED,UAAU,WAAW;QACnB,gBAAgB,CAAC,CAAC,SAAS,MAAM,mBAAmB,EAAE,IAAI,EAAE,CAAC,GAAG,mBAAmB,CAAC,CAAC,CAAC,EAAE,CAAC;KAC1F;IAGD,UAAU,uBAAuB;QAC/B,iBAAiB,CAAC,EAAE,MAAM,CAAC;KAC5B;IAGD,UAAU,2BAA2B;QACnC,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B;IAGD,UAAU,sBAAuB,SAAQ,gBAAgB;QACvD,QAAQ,EAAE,mBAAmB,CAAC;QAC9B,aAAa,EAAE,MAAM,CAAC;KACvB;IAGD,UAAU,sBAAsB;QAC9B,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;QAClB,YAAY,EAAE,eAAe,CAAC;QAC9B,WAAW,EAAE,eAAe,CAAC;KAC9B;IAGD,UAAU,WAAY,SAAQ,gBAAgB;QAC5C,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,sBAAsB,EAAE,CAAC;QAClC,cAAc,EAAE,OAAO,CAAC;KACzB;IAGD,UAAU,sBAAuB,SAAQ,gBAAgB;QACvD,QAAQ,CAAC,UAAU,EAAE,mBAAmB,CAAC;QACzC,QAAQ,CAAC,QAAQ,EAAE,mBAAmB,CAAC;QACvC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;QACpB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;QACrB,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;KAClC;IAGD,MAAM,MAAM,iBAAiB,GACzB,gBAAgB,GAChB,eAAe,GACf,gBAAgB,GAChB,eAAe,GACf,iBAAiB,GACjB,gBAAgB,CAAC;IAGrB,MAAM,MAAM,uBAAuB,GAAG,MAAM,GAAG,YAAY,GAAG,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC;IAGjG,UAAU,uBAAwB,SAAQ,gBAAgB;QAExD,QAAQ,CAAC,SAAS,EAAE,mBAAmB,CAAC;QACxC,QAAQ,CAAC,QAAQ,EAAE,mBAAmB,CAAC;QACvC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;QAE3B,QAAQ,CAAC,WAAW,EAAE,iBAAiB,CAAC;QACxC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,cAAc,EAAE,mBAAmB,CAAC;QAC7C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;QAC3B,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;QACpC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;QACpC,QAAQ,CAAC,aAAa,EAAE,mBAAmB,CAAC;QAC5C,QAAQ,CAAC,4BAA4B,EAAE,mBAAmB,CAAC;QAC3D,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,iBAAiB,EAAE,uBAAuB,CAAC;KACrD;IAGD,UAAU,mCAAoC,SAAQ,gBAAgB;QACpE,QAAQ,CAAC,SAAS,EAAE,mBAAmB,CAAC;QACxC,QAAQ,CAAC,QAAQ,EAAE,mBAAmB,CAAC;QACvC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;QAC3B,QAAQ,CAAC,WAAW,EAAE,mBAAmB,CAAC;QAC1C,QAAQ,CAAC,mBAAmB,EAAE,mBAAmB,CAAC;QAClD,QAAQ,CAAC,gBAAgB,EAAE,mBAAmB,CAAC;QAC/C,QAAQ,CAAC,qBAAqB,EAAE,mBAAmB,CAAC;QACpD,QAAQ,CAAC,OAAO,EAAE,uBAAuB,EAAE,CAAC;KAC7C;CACF"}

View File

@@ -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 Search = createLucideIcon("Search", [
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }]
]);
export { Search as default };
//# sourceMappingURL=search.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"badge-minus.js","sources":["../../../src/icons/badge-minus.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name BadgeMinus\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMy44NSA4LjYyYTQgNCAwIDAgMSA0Ljc4LTQuNzcgNCA0IDAgMCAxIDYuNzQgMCA0IDQgMCAwIDEgNC43OCA0Ljc4IDQgNCAwIDAgMSAwIDYuNzQgNCA0IDAgMCAxLTQuNzcgNC43OCA0IDQgMCAwIDEtNi43NSAwIDQgNCAwIDAgMS00Ljc4LTQuNzcgNCA0IDAgMCAxIDAtNi43NloiIC8+CiAgPGxpbmUgeDE9IjgiIHgyPSIxNiIgeTE9IjEyIiB5Mj0iMTIiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/badge-minus\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst BadgeMinus = createLucideIcon('BadgeMinus', [\n [\n 'path',\n {\n d: 'M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z',\n key: '3c2336',\n },\n ],\n ['line', { x1: '8', x2: '16', y1: '12', y2: '12', key: '1jonct' }],\n]);\n\nexport default BadgeMinus;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,iBAAiB,YAAc,CAAA,CAAA,CAAA;AAAA,CAChD,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,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACnE,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,143 @@
# fast-uri
<div align="center">
[![NPM version](https://img.shields.io/npm/v/fast-uri.svg?style=flat)](https://www.npmjs.com/package/fast-uri)
[![CI](https://github.com/fastify/fast-uri/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/fastify/fast-uri/actions/workflows/ci.yml)
[![neostandard javascript style](https://img.shields.io/badge/code_style-neostandard-brightgreen?style=flat)](https://github.com/neostandard/neostandard)
</div>
Dependency-free RFC 3986 URI toolbox.
## Usage
## Options
All of the above functions can accept an additional options argument that is an object that can contain one or more of the following properties:
* `scheme` (string)
Indicates the scheme that the URI should be treated as, overriding the URI's normal scheme parsing behavior.
* `reference` (string)
If set to `"suffix"`, it indicates that the URI is in the suffix format and the parser will use the option's `scheme` property to determine the URI's scheme.
* `tolerant` (boolean, false)
If set to `true`, the parser will relax URI resolving rules.
* `absolutePath` (boolean, false)
If set to `true`, the serializer will not resolve a relative `path` component.
* `unicodeSupport` (boolean, false)
If set to `true`, the parser will unescape non-ASCII characters in the parsed output as per [RFC 3987](http://www.ietf.org/rfc/rfc3987.txt).
* `domainHost` (boolean, false)
If set to `true`, the library will treat the `host` component as a domain name, and convert IDNs (International Domain Names) as per [RFC 5891](http://www.ietf.org/rfc/rfc5891.txt).
### Parse
```js
const uri = require('fast-uri')
uri.parse('uri://user:pass@example.com:123/one/two.three?q1=a1&q2=a2#body')
// Output
{
scheme: "uri",
userinfo: "user:pass",
host: "example.com",
port: 123,
path: "/one/two.three",
query: "q1=a1&q2=a2",
fragment: "body"
}
```
### Serialize
```js
const uri = require('fast-uri')
uri.serialize({scheme: "http", host: "example.com", fragment: "footer"})
// Output
"http://example.com/#footer"
```
### Resolve
```js
const uri = require('fast-uri')
uri.resolve("uri://a/b/c/d?q", "../../g")
// Output
"uri://a/g"
```
### Equal
```js
const uri = require('fast-uri')
uri.equal("example://a/b/c/%7Bfoo%7D", "eXAMPLE://a/./b/../b/%63/%7bfoo%7d")
// Output
true
```
## Scheme supports
fast-uri supports inserting custom [scheme](http://en.wikipedia.org/wiki/URI_scheme)-dependent processing rules. Currently, fast-uri has built-in support for the following schemes:
* http \[[RFC 2616](http://www.ietf.org/rfc/rfc2616.txt)\]
* https \[[RFC 2818](http://www.ietf.org/rfc/rfc2818.txt)\]
* ws \[[RFC 6455](http://www.ietf.org/rfc/rfc6455.txt)\]
* wss \[[RFC 6455](http://www.ietf.org/rfc/rfc6455.txt)\]
* urn \[[RFC 2141](http://www.ietf.org/rfc/rfc2141.txt)\]
* urn:uuid \[[RFC 4122](http://www.ietf.org/rfc/rfc4122.txt)\]
## Benchmarks
```
fast-uri benchmark
┌─────────┬──────────────────────────────────────────┬──────────────────┬──────────────────┬────────────────────────┬────────────────────────┬─────────┐
│ (index) │ Task name │ Latency avg (ns) │ Latency med (ns) │ Throughput avg (ops/s) │ Throughput med (ops/s) │ Samples │
├─────────┼──────────────────────────────────────────┼──────────────────┼──────────────────┼────────────────────────┼────────────────────────┼─────────┤
│ 0 │ 'fast-uri: parse domain' │ '951.31 ± 0.75%' │ '875.00 ± 11.00' │ '1122538 ± 0.01%' │ '1142857 ± 14550' │ 1051187 │
│ 1 │ 'fast-uri: parse IPv4' │ '443.44 ± 0.22%' │ '406.00 ± 3.00' │ '2422762 ± 0.01%' │ '2463054 ± 18335' │ 2255105 │
│ 2 │ 'fast-uri: parse IPv6' │ '1241.6 ± 1.74%' │ '1131.0 ± 30.00' │ '875177 ± 0.02%' │ '884173 ± 24092' │ 805399 │
│ 3 │ 'fast-uri: parse URN' │ '689.19 ± 4.29%' │ '618.00 ± 9.00' │ '1598373 ± 0.01%' │ '1618123 ± 23913' │ 1450972 │
│ 4 │ 'fast-uri: parse URN uuid' │ '1025.4 ± 2.02%' │ '921.00 ± 19.00' │ '1072419 ± 0.02%' │ '1085776 ± 22871' │ 975236 │
│ 5 │ 'fast-uri: serialize uri' │ '1028.5 ± 0.53%' │ '933.00 ± 43.00' │ '1063310 ± 0.02%' │ '1071811 ± 50523' │ 972249 │
│ 6 │ 'fast-uri: serialize long uri with dots' │ '1805.1 ± 0.52%' │ '1627.0 ± 17.00' │ '602620 ± 0.02%' │ '614628 ± 6490' │ 553997 │
│ 7 │ 'fast-uri: serialize IPv6' │ '2569.4 ± 2.69%' │ '2302.0 ± 21.00' │ '426080 ± 0.03%' │ '434405 ± 3999' │ 389194 │
│ 8 │ 'fast-uri: serialize ws' │ '979.39 ± 0.43%' │ '882.00 ± 8.00' │ '1111665 ± 0.02%' │ '1133787 ± 10378' │ 1021045 │
│ 9 │ 'fast-uri: resolve' │ '2208.2 ± 1.08%' │ '1980.0 ± 24.00' │ '495001 ± 0.03%' │ '505051 ± 6049' │ 452848 │
└─────────┴──────────────────────────────────────────┴──────────────────┴──────────────────┴────────────────────────┴────────────────────────┴─────────┘
uri-js benchmark
┌─────────┬───────────────────────────────────────┬──────────────────┬──────────────────┬────────────────────────┬────────────────────────┬─────────┐
│ (index) │ Task name │ Latency avg (ns) │ Latency med (ns) │ Throughput avg (ops/s) │ Throughput med (ops/s) │ Samples │
├─────────┼───────────────────────────────────────┼──────────────────┼──────────────────┼────────────────────────┼────────────────────────┼─────────┤
│ 0 │ 'urijs: parse domain' │ '3618.3 ± 0.43%' │ '3314.0 ± 33.00' │ '294875 ± 0.04%' │ '301750 ± 2975' │ 276375 │
│ 1 │ 'urijs: parse IPv4' │ '4024.1 ± 0.41%' │ '3751.0 ± 25.00' │ '261981 ± 0.04%' │ '266596 ± 1789' │ 248506 │
│ 2 │ 'urijs: parse IPv6' │ '5417.2 ± 0.46%' │ '4968.0 ± 43.00' │ '196023 ± 0.05%' │ '201288 ± 1727' │ 184598 │
│ 3 │ 'urijs: parse URN' │ '1324.2 ± 0.23%' │ '1229.0 ± 17.00' │ '801535 ± 0.02%' │ '813670 ± 11413' │ 755185 │
│ 4 │ 'urijs: parse URN uuid' │ '1822.0 ± 3.08%' │ '1655.0 ± 15.00' │ '594433 ± 0.02%' │ '604230 ± 5427' │ 548843 │
│ 5 │ 'urijs: serialize uri' │ '4196.8 ± 0.36%' │ '3908.0 ± 27.00' │ '251146 ± 0.04%' │ '255885 ± 1756' │ 238276 │
│ 6 │ 'urijs: serialize long uri with dots' │ '8331.0 ± 1.30%' │ '7658.0 ± 72.00' │ '126440 ± 0.07%' │ '130582 ± 1239' │ 120034 │
│ 7 │ 'urijs: serialize IPv6' │ '5685.5 ± 0.30%' │ '5366.0 ± 33.00' │ '182632 ± 0.05%' │ '186359 ± 1153' │ 175886 │
│ 8 │ 'urijs: serialize ws' │ '4159.3 ± 0.20%' │ '3899.0 ± 28.00' │ '250459 ± 0.04%' │ '256476 ± 1855' │ 240423 │
│ 9 │ 'urijs: resolve' │ '6729.9 ± 0.39%' │ '6261.0 ± 37.00' │ '156361 ± 0.06%' │ '159719 ± 949' │ 148591 │
└─────────┴───────────────────────────────────────┴──────────────────┴──────────────────┴────────────────────────┴────────────────────────┴─────────┘
WHATWG URL benchmark
┌─────────┬────────────────────────────┬──────────────────┬──────────────────┬────────────────────────┬────────────────────────┬─────────┐
│ (index) │ Task name │ Latency avg (ns) │ Latency med (ns) │ Throughput avg (ops/s) │ Throughput med (ops/s) │ Samples │
├─────────┼────────────────────────────┼──────────────────┼──────────────────┼────────────────────────┼────────────────────────┼─────────┤
│ 0 │ 'WHATWG URL: parse domain' │ '475.22 ± 0.20%' │ '444.00 ± 5.00' │ '2217599 ± 0.01%' │ '2252252 ± 25652' │ 2104289 │
│ 1 │ 'WHATWG URL: parse URN' │ '384.78 ± 0.85%' │ '350.00 ± 5.00' │ '2809071 ± 0.01%' │ '2857143 ± 41408' │ 2598885 │
└─────────┴────────────────────────────┴──────────────────┴──────────────────┴────────────────────────┴────────────────────────┴─────────┘
```
## TODO
- [ ] Support MailTo
- [ ] Be 100% iso compatible with uri-js
## License
Licensed under [BSD-3-Clause](./LICENSE).

View File

@@ -0,0 +1,83 @@
import type { FormatDistanceStrictOptions } from "./formatDistanceStrict.js";
import type { ContextOptions, DateArg } from "./types.js";
/**
* The {@link formatDistanceToNowStrict} function options.
*/
export interface FormatDistanceToNowStrictOptions
extends FormatDistanceStrictOptions,
ContextOptions<Date> {}
/**
* @name formatDistanceToNowStrict
* @category Common Helpers
* @summary Return the distance between the given date and now in words.
* @pure false
*
* @description
* Return the distance between the given dates in words, using strict units.
* This is like `formatDistance`, but does not use helpers like 'almost', 'over',
* 'less than' and the like.
*
* | Distance between dates | Result |
* |------------------------|---------------------|
* | 0 ... 59 secs | [0..59] seconds |
* | 1 ... 59 mins | [1..59] minutes |
* | 1 ... 23 hrs | [1..23] hours |
* | 1 ... 29 days | [1..29] days |
* | 1 ... 11 months | [1..11] months |
* | 1 ... N years | [1..N] years |
*
* @param date - The given date
* @param options - An object with options.
*
* @returns The distance in words
*
* @throws `date` must not be Invalid Date
* @throws `options.locale` must contain `formatDistance` property
*
* @example
* // If today is 1 January 2015, what is the distance to 2 July 2014?
* const result = formatDistanceToNowStrict(
* new Date(2014, 6, 2)
* )
* //=> '6 months'
*
* @example
* // If now is 1 January 2015 00:00:00,
* // what is the distance to 1 January 2015 00:00:15, including seconds?
* const result = formatDistanceToNowStrict(
* new Date(2015, 0, 1, 0, 0, 15)
* )
* //=> '15 seconds'
*
* @example
* // If today is 1 January 2015,
* // what is the distance to 1 January 2016, with a suffix?
* const result = formatDistanceToNowStrict(
* new Date(2016, 0, 1),
* {addSuffix: true}
* )
* //=> 'in 1 year'
*
* @example
* // If today is 28 January 2015,
* // what is the distance to 1 January 2015, in months, rounded up??
* const result = formatDistanceToNowStrict(new Date(2015, 0, 1), {
* unit: 'month',
* roundingMethod: 'ceil'
* })
* //=> '1 month'
*
* @example
* // If today is 1 January 2015,
* // what is the distance to 1 January 2016 in Esperanto?
* const eoLocale = require('date-fns/locale/eo')
* const result = formatDistanceToNowStrict(
* new Date(2016, 0, 1),
* {locale: eoLocale}
* )
* //=> '1 jaro'
*/
export declare function formatDistanceToNowStrict(
date: DateArg<Date> & {},
options?: FormatDistanceToNowStrictOptions,
): string;

View File

@@ -0,0 +1,9 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isCryptoKey = void 0;
const crypto = require("node:crypto");
const util = require("node:util");
const webcrypto = crypto.webcrypto;
exports.default = webcrypto;
const isCryptoKey = (key) => util.types.isCryptoKey(key);
exports.isCryptoKey = isCryptoKey;

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"https://raw.githubusercontent.com/fb55/htmlparser2/c123610e003a1eaebc61febed01cabb6e41eb658/src/","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAAoD;AACpD,yCAAyD;AAAhD,mGAAA,MAAM,OAAA;AAEf,yCAMoB;AAEpB,yCAKoB;AAJhB,wGAAA,UAAU,OAAA;AACV,0BAA0B;AAC1B,4GAAA,UAAU,OAAkB;AAMhC,iBAAiB;AAEjB;;;;;GAKG;AACH,SAAgB,aAAa,CAAC,IAAY,EAAE,OAAiB;IACzD,IAAM,OAAO,GAAG,IAAI,uBAAU,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACnD,IAAI,kBAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACvC,OAAO,OAAO,CAAC,IAAI,CAAC;AACxB,CAAC;AAJD,sCAIC;AACD;;;;;;;;;GASG;AACH,SAAgB,QAAQ,CAAC,IAAY,EAAE,OAAiB;IACpD,OAAO,aAAa,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC;AACjD,CAAC;AAFD,4BAEC;AACD;;;;;;GAMG;AACH,SAAgB,eAAe,CAC3B,QAAyD,EACzD,OAAiB,EACjB,eAA4C;IAE5C,IAAM,OAAO,GAAG,IAAI,uBAAU,CAAC,QAAQ,EAAE,OAAO,EAAE,eAAe,CAAC,CAAC;IACnE,OAAO,IAAI,kBAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AACxC,CAAC;AAPD,0CAOC;AAED,+CAGwB;AAFpB,0HAAA,OAAO,OAAa;AAIxB;;;GAGG;AACH,8DAA8C;AAE9C,qCAAyC;AAEzC,qCAAmC;AAA1B,mGAAA,OAAO,OAAA;AAEhB,IAAM,uBAAuB,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAElD;;;;;GAKG;AACH,SAAgB,SAAS,CACrB,IAAY,EACZ,OAA0C;IAA1C,wBAAA,EAAA,iCAA0C;IAE1C,OAAO,IAAA,kBAAO,EAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;AAC5C,CAAC;AALD,8BAKC;AAED,qDAAqC"}

View File

@@ -0,0 +1,59 @@
type SpanStatusType =
/** The operation completed successfully. */
'ok'
/** Deadline expired before operation could complete. */
| 'deadline_exceeded'
/** 401 Unauthorized (actually does mean unauthenticated according to RFC 7235) */
| 'unauthenticated'
/** 403 Forbidden */
| 'permission_denied'
/** 404 Not Found. Some requested entity (file or directory) was not found. */
| 'not_found'
/** 429 Too Many Requests */
| 'resource_exhausted'
/** Client specified an invalid argument. 4xx. */
| 'invalid_argument'
/** 501 Not Implemented */
| 'unimplemented'
/** 503 Service Unavailable */
| 'unavailable'
/** Other/generic 5xx. */
| 'internal_error'
/** Unknown. Any non-standard HTTP status code. */
| 'unknown_error'
/** The operation was cancelled (typically by the user). */
| 'cancelled'
/** Already exists (409) */
| 'already_exists'
/** Operation was rejected because the system is not in a state required for the operation's */
| 'failed_precondition'
/** The operation was aborted, typically due to a concurrency issue. */
| 'aborted'
/** Operation was attempted past the valid range. */
| 'out_of_range'
/** Unrecoverable data loss or corruption */
| 'data_loss';
declare const SPAN_STATUS_UNSET = 0;
declare const SPAN_STATUS_OK = 1;
declare const SPAN_STATUS_ERROR = 2;
/** The status code of a span. */
export type SpanStatusCode = typeof SPAN_STATUS_UNSET | typeof SPAN_STATUS_OK | typeof SPAN_STATUS_ERROR;
/**
* The status of a span.
* This can optionally contain a human-readable message.
*/
export interface SpanStatus {
/**
* The status code of this message.
* 0 = UNSET
* 1 = OK
* 2 = ERROR
*/
code: SpanStatusCode;
/**
* A developer-facing error message.
*/
message?: SpanStatusType | string;
}
export {};
//# sourceMappingURL=spanStatus.d.ts.map

View File

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

View File

@@ -0,0 +1,161 @@
import { createDataloaderCacheKey } from '../../../collections/dataloader.js';
export const virtualFieldPopulationPromise = async ({ name, draft, fallbackLocale, fields, hasMany, locale, overrideAccess, ref, req, segments, showHiddenFields, siblingDoc })=>{
const currentSegment = segments.shift();
if (!currentSegment) {
return;
}
const currentValue = ref[currentSegment];
if (typeof currentValue === 'undefined') {
return;
}
// Final step
if (segments.length === 0) {
if (hasMany) {
if (!Array.isArray(siblingDoc[name])) {
siblingDoc[name] = [];
}
;
siblingDoc[name].push(currentValue);
} else {
siblingDoc[name] = currentValue;
}
return;
}
const currentField = fields.find((each)=>each.name === currentSegment);
if (!currentField) {
return;
}
if (currentField.type === 'group' || currentField.type === 'tab') {
if (!currentValue || typeof currentValue !== 'object') {
return;
}
return virtualFieldPopulationPromise({
name,
draft,
fallbackLocale,
fields: currentField.flattenedFields,
locale,
overrideAccess,
ref: currentValue,
req,
segments,
showHiddenFields,
siblingDoc
});
}
if ((currentField.type === 'relationship' || currentField.type === 'upload') && typeof currentField.relationTo === 'string') {
const select = {};
let currentSelectRef = select;
const currentFields = req.payload.collections[currentField.relationTo]?.config.flattenedFields;
for(let i = 0; i < segments.length; i++){
const field = currentFields?.find((each)=>each.name === segments[i]);
const shouldBreak = i === segments.length - 1 || field?.type === 'relationship' || field?.type === 'upload';
currentSelectRef[segments[i]] = shouldBreak ? true : {};
currentSelectRef = currentSelectRef[segments[i]];
if (shouldBreak) {
break;
}
}
if (currentField.hasMany) {
if (!Array.isArray(currentValue)) {
return;
}
const docIDs = currentValue.map((e)=>{
if (!e) {
return null;
}
if (typeof e === 'object') {
return e.id;
}
return e;
}).filter((e)=>typeof e === 'string' || typeof e === 'number');
if (segments[0] === 'id' && segments.length === 0) {
siblingDoc[name] = docIDs;
return;
}
const collectionSlug = currentField.relationTo;
const populatedDocs = await Promise.all(docIDs.map((docID)=>{
return req.payloadDataLoader.load(createDataloaderCacheKey({
collectionSlug,
currentDepth: 0,
depth: 0,
docID,
draft,
fallbackLocale,
locale,
overrideAccess,
select,
showHiddenFields,
transactionID: req.transactionID
}));
}));
for (const doc of populatedDocs){
if (!doc) {
continue;
}
await virtualFieldPopulationPromise({
name,
draft,
fallbackLocale,
fields: req.payload.collections[currentField.relationTo].config.flattenedFields,
hasMany: true,
locale,
overrideAccess,
ref: doc,
req,
segments: [
...segments
],
showHiddenFields,
siblingDoc
});
}
return;
}
let docID;
if (typeof currentValue === 'object' && currentValue) {
docID = currentValue.id;
} else {
docID = currentValue;
}
if (segments[0] === 'id' && segments.length === 0) {
siblingDoc[name] = docID;
return;
}
if (typeof docID !== 'string' && typeof docID !== 'number') {
return;
}
const populatedDoc = await req.payloadDataLoader.load(createDataloaderCacheKey({
collectionSlug: currentField.relationTo,
currentDepth: 0,
depth: 0,
docID,
draft,
fallbackLocale,
locale,
overrideAccess,
select,
showHiddenFields,
transactionID: req.transactionID
}));
if (!populatedDoc) {
return;
}
return virtualFieldPopulationPromise({
name,
draft,
fallbackLocale,
fields: req.payload.collections[currentField.relationTo].config.flattenedFields,
hasMany,
locale,
overrideAccess,
ref: populatedDoc,
req,
segments,
showHiddenFields,
siblingDoc
});
}
};
//# sourceMappingURL=virtualFieldPopulationPromise.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"local-variables-async.d.ts","sourceRoot":"","sources":["../../../../src/integrations/local-variables/local-variables-async.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAkB,gCAAgC,EAA4B,MAAM,UAAU,CAAC;AAI3G,eAAO,MAAM,kBAAkB,qCAAqC,CAAC;AAMrE;;GAEG;AACH,eAAO,MAAM,8BAA8B,2GAyHhB,CAAC"}

View File

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

View File

@@ -0,0 +1,545 @@
function _typeof(o) {"@babel/helpers - typeof";return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {return typeof o;} : function (o) {return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;}, _typeof(o);}function ownKeys(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 _objectSpread(e) {for (var r = 1; r < arguments.length; r++) {var t = null != arguments[r] ? arguments[r] : {};r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {_defineProperty(e, r, t[r]);}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));});}return e;}function _defineProperty(obj, key, value) {key = _toPropertyKey(key);if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _toPropertyKey(t) {var i = _toPrimitive(t, "string");return "symbol" == _typeof(i) ? i : String(i);}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 || "default");if ("object" != _typeof(i)) return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return ("string" === r ? String : Number)(t);}(function (_window$dateFns) {var __defProp = Object.defineProperty;
var __export = function __export(target, all) {
for (var name in all)
__defProp(target, name, {
get: all[name],
enumerable: true,
configurable: true,
set: function set(newValue) {return all[name] = function () {return newValue;};}
});
};
// lib/locale/gd/_lib/formatDistance.mjs
var formatDistanceLocale = {
lessThanXSeconds: {
one: "nas lugha na diog",
other: "nas lugha na {{count}} diogan"
},
xSeconds: {
one: "1 diog",
two: "2 dhiog",
twenty: "20 diog",
other: "{{count}} diogan"
},
halfAMinute: "leth mhionaid",
lessThanXMinutes: {
one: "nas lugha na mionaid",
other: "nas lugha na {{count}} mionaidean"
},
xMinutes: {
one: "1 mionaid",
two: "2 mhionaid",
twenty: "20 mionaid",
other: "{{count}} mionaidean"
},
aboutXHours: {
one: "mu uair de th\xECde",
other: "mu {{count}} uairean de th\xECde"
},
xHours: {
one: "1 uair de th\xECde",
two: "2 uair de th\xECde",
twenty: "20 uair de th\xECde",
other: "{{count}} uairean de th\xECde"
},
xDays: {
one: "1 l\xE0",
other: "{{count}} l\xE0"
},
aboutXWeeks: {
one: "mu 1 seachdain",
other: "mu {{count}} seachdainean"
},
xWeeks: {
one: "1 seachdain",
other: "{{count}} seachdainean"
},
aboutXMonths: {
one: "mu mh\xECos",
other: "mu {{count}} m\xECosan"
},
xMonths: {
one: "1 m\xECos",
other: "{{count}} m\xECosan"
},
aboutXYears: {
one: "mu bhliadhna",
other: "mu {{count}} bliadhnaichean"
},
xYears: {
one: "1 bhliadhna",
other: "{{count}} bliadhna"
},
overXYears: {
one: "c\xF2rr is bliadhna",
other: "c\xF2rr is {{count}} bliadhnaichean"
},
almostXYears: {
one: "cha mh\xF2r bliadhna",
other: "cha mh\xF2r {{count}} bliadhnaichean"
}
};
var formatDistance = function formatDistance(token, count, options) {
var result;
var tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
result = tokenValue.one;
} else if (count === 2 && !!tokenValue.two) {
result = tokenValue.two;
} else if (count === 20 && !!tokenValue.twenty) {
result = tokenValue.twenty;
} else {
result = tokenValue.other.replace("{{count}}", String(count));
}
if (options !== null && options !== void 0 && options.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "ann an " + result;
} else {
return "o chionn " + result;
}
}
return result;
};
// lib/locale/_lib/buildFormatLongFn.mjs
function buildFormatLongFn(args) {
return function () {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var width = options.width ? String(options.width) : args.defaultWidth;
var format = args.formats[width] || args.formats[args.defaultWidth];
return format;
};
}
// lib/locale/gd/_lib/formatLong.mjs
var dateFormats = {
full: "EEEE, MMMM do, y",
long: "MMMM do, y",
medium: "MMM d, y",
short: "MM/dd/yyyy"
};
var timeFormats = {
full: "h:mm:ss a zzzz",
long: "h:mm:ss a z",
medium: "h:mm:ss a",
short: "h:mm a"
};
var dateTimeFormats = {
full: "{{date}} 'aig' {{time}}",
long: "{{date}} 'aig' {{time}}",
medium: "{{date}}, {{time}}",
short: "{{date}}, {{time}}"
};
var formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full"
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full"
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "full"
})
};
// lib/locale/gd/_lib/formatRelative.mjs
var formatRelativeLocale = {
lastWeek: "'mu dheireadh' eeee 'aig' p",
yesterday: "'an-d\xE8 aig' p",
today: "'an-diugh aig' p",
tomorrow: "'a-m\xE0ireach aig' p",
nextWeek: "eeee 'aig' p",
other: "P"
};
var formatRelative = function formatRelative(token, _date, _baseDate, _options) {return formatRelativeLocale[token];};
// lib/locale/_lib/buildLocalizeFn.mjs
function buildLocalizeFn(args) {
return function (value, options) {
var context = options !== null && options !== void 0 && options.context ? String(options.context) : "standalone";
var valuesArray;
if (context === "formatting" && args.formattingValues) {
var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
} else {
var _defaultWidth = args.defaultWidth;
var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
valuesArray = args.values[_width] || args.values[_defaultWidth];
}
var index = args.argumentCallback ? args.argumentCallback(value) : value;
return valuesArray[index];
};
}
// lib/locale/gd/_lib/localize.mjs
var eraValues = {
narrow: ["R", "A"],
abbreviated: ["RC", "AD"],
wide: ["ro Chr\xECosta", "anno domini"]
};
var quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["C1", "C2", "C3", "C4"],
wide: [
"a' chiad chairteal",
"an d\xE0rna cairteal",
"an treas cairteal",
"an ceathramh cairteal"]
};
var monthValues = {
narrow: ["F", "G", "M", "G", "C", "\xD2", "I", "L", "S", "D", "S", "D"],
abbreviated: [
"Faoi",
"Gear",
"M\xE0rt",
"Gibl",
"C\xE8it",
"\xD2gmh",
"Iuch",
"L\xF9n",
"Sult",
"D\xE0mh",
"Samh",
"D\xF9bh"],
wide: [
"Am Faoilleach",
"An Gearran",
"Am M\xE0rt",
"An Giblean",
"An C\xE8itean",
"An t-\xD2gmhios",
"An t-Iuchar",
"An L\xF9nastal",
"An t-Sultain",
"An D\xE0mhair",
"An t-Samhain",
"An D\xF9bhlachd"]
};
var dayValues = {
narrow: ["D", "L", "M", "C", "A", "H", "S"],
short: ["D\xF2", "Lu", "M\xE0", "Ci", "Ar", "Ha", "Sa"],
abbreviated: ["Did", "Dil", "Dim", "Dic", "Dia", "Dih", "Dis"],
wide: [
"Did\xF2mhnaich",
"Diluain",
"Dim\xE0irt",
"Diciadain",
"Diardaoin",
"Dihaoine",
"Disathairne"]
};
var dayPeriodValues = {
narrow: {
am: "m",
pm: "f",
midnight: "m.o.",
noon: "m.l.",
morning: "madainn",
afternoon: "feasgar",
evening: "feasgar",
night: "oidhche"
},
abbreviated: {
am: "M.",
pm: "F.",
midnight: "meadhan oidhche",
noon: "meadhan l\xE0",
morning: "madainn",
afternoon: "feasgar",
evening: "feasgar",
night: "oidhche"
},
wide: {
am: "m.",
pm: "f.",
midnight: "meadhan oidhche",
noon: "meadhan l\xE0",
morning: "madainn",
afternoon: "feasgar",
evening: "feasgar",
night: "oidhche"
}
};
var formattingDayPeriodValues = {
narrow: {
am: "m",
pm: "f",
midnight: "m.o.",
noon: "m.l.",
morning: "sa mhadainn",
afternoon: "feasgar",
evening: "feasgar",
night: "air an oidhche"
},
abbreviated: {
am: "M.",
pm: "F.",
midnight: "meadhan oidhche",
noon: "meadhan l\xE0",
morning: "sa mhadainn",
afternoon: "feasgar",
evening: "feasgar",
night: "air an oidhche"
},
wide: {
am: "m.",
pm: "f.",
midnight: "meadhan oidhche",
noon: "meadhan l\xE0",
morning: "sa mhadainn",
afternoon: "feasgar",
evening: "feasgar",
night: "air an oidhche"
}
};
var ordinalNumber = function ordinalNumber(dirtyNumber) {
var number = Number(dirtyNumber);
var rem100 = number % 100;
if (rem100 > 20 || rem100 < 10) {
switch (rem100 % 10) {
case 1:
return number + "d";
case 2:
return number + "na";
}
}
if (rem100 === 12) {
return number + "na";
}
return number + "mh";
};
var localize = {
ordinalNumber: ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide"
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: function argumentCallback(quarter) {return quarter - 1;}
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide"
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide"
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide"
})
};
// lib/locale/_lib/buildMatchFn.mjs
function buildMatchFn(args) {
return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var width = options.width;
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
var matchResult = string.match(matchPattern);
if (!matchResult) {
return null;
}
var matchedString = matchResult[0];
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {return pattern.test(matchedString);}) : findKey(parsePatterns, function (pattern) {return pattern.test(matchedString);});
var value;
value = args.valueCallback ? args.valueCallback(key) : key;
value = options.valueCallback ? options.valueCallback(value) : value;
var rest = string.slice(matchedString.length);
return { value: value, rest: rest };
};
}
var findKey = function findKey(object, predicate) {
for (var key in object) {
if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
return key;
}
}
return;
};
var findIndex = function findIndex(array, predicate) {
for (var key = 0; key < array.length; key++) {
if (predicate(array[key])) {
return key;
}
}
return;
};
// lib/locale/_lib/buildMatchPatternFn.mjs
function buildMatchPatternFn(args) {
return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var matchResult = string.match(args.matchPattern);
if (!matchResult)
return null;
var matchedString = matchResult[0];
var parseResult = string.match(args.parsePattern);
if (!parseResult)
return null;
var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
value = options.valueCallback ? options.valueCallback(value) : value;
var rest = string.slice(matchedString.length);
return { value: value, rest: rest };
};
}
// lib/locale/gd/_lib/match.mjs
var matchOrdinalNumberPattern = /^(\d+)(d|na|tr|mh)?/i;
var parseOrdinalNumberPattern = /\d+/i;
var matchEraPatterns = {
narrow: /^(r|a)/i,
abbreviated: /^(r\.?\s?c\.?|r\.?\s?a\.?\s?c\.?|a\.?\s?d\.?|a\.?\s?c\.?)/i,
wide: /^(ro Chrìosta|ron aois choitchinn|anno domini|aois choitcheann)/i
};
var parseEraPatterns = {
any: [/^b/i, /^(a|c)/i]
};
var matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^c[1234]/i,
wide: /^[1234](cd|na|tr|mh)? cairteal/i
};
var parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i]
};
var matchMonthPatterns = {
narrow: /^[fgmcòilsd]/i,
abbreviated: /^(faoi|gear|màrt|gibl|cèit|ògmh|iuch|lùn|sult|dàmh|samh|dùbh)/i,
wide: /^(am faoilleach|an gearran|am màrt|an giblean|an cèitean|an t-Ògmhios|an t-Iuchar|an lùnastal|an t-Sultain|an dàmhair|an t-Samhain|an dùbhlachd)/i
};
var parseMonthPatterns = {
narrow: [
/^f/i,
/^g/i,
/^m/i,
/^g/i,
/^c/i,
/^ò/i,
/^i/i,
/^l/i,
/^s/i,
/^d/i,
/^s/i,
/^d/i],
any: [
/^fa/i,
/^ge/i,
/^mà/i,
/^gi/i,
/^c/i,
/^ò/i,
/^i/i,
/^l/i,
/^su/i,
/^d/i,
/^sa/i,
/^d/i]
};
var matchDayPatterns = {
narrow: /^[dlmcahs]/i,
short: /^(dò|lu|mà|ci|ar|ha|sa)/i,
abbreviated: /^(did|dil|dim|dic|dia|dih|dis)/i,
wide: /^(didòmhnaich|diluain|dimàirt|diciadain|diardaoin|dihaoine|disathairne)/i
};
var parseDayPatterns = {
narrow: [/^d/i, /^l/i, /^m/i, /^c/i, /^a/i, /^h/i, /^s/i],
any: [/^d/i, /^l/i, /^m/i, /^c/i, /^a/i, /^h/i, /^s/i]
};
var matchDayPeriodPatterns = {
narrow: /^(a|p|mi|n|(san|aig) (madainn|feasgar|feasgar|oidhche))/i,
any: /^([ap]\.?\s?m\.?|meadhan oidhche|meadhan là|(san|aig) (madainn|feasgar|feasgar|oidhche))/i
};
var parseDayPeriodPatterns = {
any: {
am: /^m/i,
pm: /^f/i,
midnight: /^meadhan oidhche/i,
noon: /^meadhan là/i,
morning: /sa mhadainn/i,
afternoon: /feasgar/i,
evening: /feasgar/i,
night: /air an oidhche/i
}
};
var match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: function valueCallback(value) {return parseInt(value, 10);}
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any"
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: function valueCallback(index) {return 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"
})
};
// lib/locale/gd.mjs
var gd = {
code: "gd",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 0,
firstWeekContainsDate: 1
}
};
// lib/locale/gd/cdn.js
window.dateFns = _objectSpread(_objectSpread({},
window.dateFns), {}, {
locale: _objectSpread(_objectSpread({}, (_window$dateFns =
window.dateFns) === null || _window$dateFns === void 0 ? void 0 : _window$dateFns.locale), {}, {
gd: gd }) });
//# debugId=511FE1278F38227964756e2164756e21
})();
//# sourceMappingURL=cdn.js.map

View File

@@ -0,0 +1,225 @@
import { buildLocalizeFn } from "../../_lib/buildLocalizeFn.mjs";
const eraValues = {
narrow: ["да н.э.", "н.э."],
abbreviated: ["да н. э.", "н. э."],
wide: ["да нашай эры", "нашай эры"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["1-ы кв.", "2-і кв.", "3-і кв.", "4-ы кв."],
wide: ["1-ы квартал", "2-і квартал", "3-і квартал", "4-ы квартал"],
};
const monthValues = {
narrow: ["С", "Л", "С", "К", "М", "Ч", "Л", "Ж", "В", "К", "Л", "С"],
abbreviated: [
"студз.",
"лют.",
"сак.",
"крас.",
"май",
"чэрв.",
"ліп.",
"жн.",
"вер.",
"кастр.",
"ліст.",
"снеж.",
],
wide: [
"студзень",
"люты",
"сакавік",
"красавік",
"май",
"чэрвень",
"ліпень",
"жнівень",
"верасень",
"кастрычнік",
"лістапад",
"снежань",
],
};
const formattingMonthValues = {
narrow: ["С", "Л", "С", "К", "М", "Ч", "Л", "Ж", "В", "К", "Л", "С"],
abbreviated: [
"студз.",
"лют.",
"сак.",
"крас.",
"мая",
"чэрв.",
"ліп.",
"жн.",
"вер.",
"кастр.",
"ліст.",
"снеж.",
],
wide: [
"студзеня",
"лютага",
"сакавіка",
"красавіка",
"мая",
"чэрвеня",
"ліпеня",
"жніўня",
"верасня",
"кастрычніка",
"лістапада",
"снежня",
],
};
const dayValues = {
narrow: ["Н", "П", "А", "С", "Ч", "П", "С"],
short: ["нд", "пн", "аў", "ср", "чц", "пт", "сб"],
abbreviated: ["нядз", "пан", "аўт", "сер", "чац", "пят", "суб"],
wide: [
"нядзеля",
"панядзелак",
"аўторак",
"серада",
"чацвер",
"пятніца",
"субота",
],
};
const dayPeriodValues = {
narrow: {
am: "ДП",
pm: "ПП",
midnight: "поўн.",
noon: "поўд.",
morning: "ран.",
afternoon: "дзень",
evening: "веч.",
night: "ноч",
},
abbreviated: {
am: "ДП",
pm: "ПП",
midnight: "поўн.",
noon: "поўд.",
morning: "ран.",
afternoon: "дзень",
evening: "веч.",
night: "ноч",
},
wide: {
am: "ДП",
pm: "ПП",
midnight: "поўнач",
noon: "поўдзень",
morning: "раніца",
afternoon: "дзень",
evening: "вечар",
night: "ноч",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "ДП",
pm: "ПП",
midnight: "поўн.",
noon: "поўд.",
morning: "ран.",
afternoon: "дня",
evening: "веч.",
night: "ночы",
},
abbreviated: {
am: "ДП",
pm: "ПП",
midnight: "поўн.",
noon: "поўд.",
morning: "ран.",
afternoon: "дня",
evening: "веч.",
night: "ночы",
},
wide: {
am: "ДП",
pm: "ПП",
midnight: "поўнач",
noon: "поўдзень",
morning: "раніцы",
afternoon: "дня",
evening: "вечара",
night: "ночы",
},
};
const ordinalNumber = (dirtyNumber, options) => {
const unit = String(options?.unit);
const number = Number(dirtyNumber);
let suffix;
/** Though it's an incorrect ordinal form of a date we use it here for consistency with other similar locales (ru, uk)
* For date-month combinations should be used `d` formatter.
* Correct: `d MMMM` (4 верасня)
* Incorrect: `do MMMM` (4-га верасня)
*
* But following the consistency leads to mistakes for literal uses of `do` formatter (ordinal day of month).
* So for phrase "5th day of month" (`do дзень месяца`)
* library will produce: `5-га дзень месяца`
* but correct spelling should be: `5-ы дзень месяца`
*
* So I guess there should be a stand-alone and a formatting version of "day of month" formatters
*/
if (unit === "date") {
suffix = "-га";
} else if (unit === "hour" || unit === "minute" || unit === "second") {
suffix = "-я";
} else {
suffix =
(number % 10 === 2 || number % 10 === 3) &&
number % 100 !== 12 &&
number % 100 !== 13
? "-і"
: "-ы";
}
return number + suffix;
};
export const localize = {
ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide",
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide",
formattingValues: formattingMonthValues,
defaultFormattingWidth: "wide",
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "any",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
};

View File

@@ -0,0 +1,20 @@
{
"name": "@webassemblyjs/helper-wasm-bytecode",
"version": "1.13.2",
"description": "WASM's Bytecode constants",
"main": "lib/index.js",
"module": "esm/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Sven Sauleau",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/xtuc/webassemblyjs.git"
},
"publishConfig": {
"access": "public"
},
"gitHead": "897aeb784f042a46a00626f1d1cca96159aa5db3"
}

View File

@@ -0,0 +1,17 @@
/**
* @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 PanelTopClose = createLucideIcon("PanelTopClose", [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
["path", { d: "M3 9h18", key: "1pudct" }],
["path", { d: "m9 16 3-3 3 3", key: "1idcnm" }]
]);
export { PanelTopClose as default };
//# sourceMappingURL=panel-top-close.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"usePopupWindow.d.ts","sourceRoot":"","sources":["../../src/hooks/usePopupWindow.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,MAAM,WAAW,YAAY;IAC3B,YAAY,EAAE;QACZ,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;QACjC,IAAI,EAAE,MAAM,CAAA;QACZ,eAAe,EAAE,MAAM,CAAA;QACvB,KAAK,EAAE,MAAM,CAAA;KACd,CAAA;IACD,IAAI,EAAE,MAAM,CAAA;CACb;AAED,eAAO,MAAM,cAAc,UAAW;IACpC,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB,SAAS,CAAC,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC,cAAc,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACzE,GAAG,EAAE,MAAM,CAAA;CACZ,KAAG;IACF,WAAW,EAAE,OAAO,CAAA;IACpB,eAAe,EAAE,MAAM,IAAI,CAAA;IAC3B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,IAAI,GAAG,MAAM,CAAC,CAAA;CAqH1C,CAAA"}

View File

@@ -0,0 +1,53 @@
import { TraceState } from './trace_state';
/**
* A SpanContext represents the portion of a {@link Span} which must be
* serialized and propagated along side of a {@link Baggage}.
*/
export interface SpanContext {
/**
* The ID of the trace that this span belongs to. It is worldwide unique
* with practically sufficient probability by being made as 16 randomly
* generated bytes, encoded as a 32 lowercase hex characters corresponding to
* 128 bits.
*/
traceId: string;
/**
* The ID of the Span. It is globally unique with practically sufficient
* probability by being made as 8 randomly generated bytes, encoded as a 16
* lowercase hex characters corresponding to 64 bits.
*/
spanId: string;
/**
* Only true if the SpanContext was propagated from a remote parent.
*/
isRemote?: boolean;
/**
* Trace flags to propagate.
*
* It is represented as 1 byte (bitmap). Bit to represent whether trace is
* sampled or not. When set, the least significant bit documents that the
* caller may have recorded trace data. A caller who does not record trace
* data out-of-band leaves this flag unset.
*
* see {@link TraceFlags} for valid flag values.
*/
traceFlags: number;
/**
* Tracing-system-specific info to propagate.
*
* The tracestate field value is a `list` as defined below. The `list` is a
* series of `list-members` separated by commas `,`, and a list-member is a
* key/value pair separated by an equals sign `=`. Spaces and horizontal tabs
* surrounding `list-members` are ignored. There can be a maximum of 32
* `list-members` in a `list`.
* More Info: https://www.w3.org/TR/trace-context/#tracestate-field
*
* Examples:
* Single tracing system (generic format):
* tracestate: rojo=00f067aa0ba902b7
* Multiple tracing systems (with different formatting):
* tracestate: rojo=00f067aa0ba902b7,congo=t61rcWkgMzE
*/
traceState?: TraceState;
}
//# sourceMappingURL=span_context.d.ts.map

View File

@@ -0,0 +1,28 @@
/** @jsx jsx */
import { JSX, ReactNode, RefCallback } from 'react';
import { jsx } from '@emotion/react';
import { CommonPropsAndClassName, CSSObjectWithLabel, GroupBase } from '../types';
export interface OptionProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> extends CommonPropsAndClassName<Option, IsMulti, Group> {
/** The children to be rendered. */
children: ReactNode;
/** Inner ref to DOM Node */
innerRef: RefCallback<HTMLDivElement>;
/** props passed to the wrapping element for the group. */
innerProps: JSX.IntrinsicElements['div'];
/** Text to be displayed representing the option. */
label: string;
/** Type is used by the menu to determine whether this is an option or a group.
In the case of option this is always `option`. **/
type: 'option';
/** The data of the selected option. */
data: Option;
/** Whether the option is disabled. */
isDisabled: boolean;
/** Whether the option is focused. */
isFocused: boolean;
/** Whether the option is selected. */
isSelected: boolean;
}
export declare const optionCSS: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ isDisabled, isFocused, isSelected, theme: { spacing, colors }, }: OptionProps<Option, IsMulti, Group>, unstyled: boolean) => CSSObjectWithLabel;
declare const Option: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: OptionProps<Option, IsMulti, Group>) => jsx.JSX.Element;
export default Option;

View File

@@ -0,0 +1,3 @@
import type { DropDatabase } from './types.js';
export declare const dropDatabase: DropDatabase;
//# sourceMappingURL=dropDatabase.d.ts.map

View File

@@ -0,0 +1,28 @@
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { SamplingDecision } from '../Sampler';
/** Sampler that samples no traces. */
export class AlwaysOffSampler {
shouldSample() {
return {
decision: SamplingDecision.NOT_RECORD,
};
}
toString() {
return 'AlwaysOffSampler';
}
}
//# sourceMappingURL=AlwaysOffSampler.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"by-source.d.ts","sourceRoot":"","sources":["../src/by-source.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5E,MAAM,MAAM,MAAM,GAAG,cAAc,EAAE,EAAE,CAAC;AAIxC,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,OAAO,EAAE,SAAS,gBAAgB,EAAE,EAAE,EACtC,KAAK,EAAE,OAAO,EAAE,GACf,MAAM,EAAE,CA4BV"}

View File

@@ -0,0 +1,14 @@
import type { SanitizedCollectionConfig } from '../collections/config/types.js';
import type { SanitizedGlobalConfig } from '../globals/config/types.js';
import type { Payload, PayloadRequest } from '../types/index.js';
type Args = {
collection?: SanitizedCollectionConfig;
global?: SanitizedGlobalConfig;
id?: number | string;
max: number;
payload: Payload;
req?: PayloadRequest;
};
export declare const enforceMaxVersions: ({ id, collection, global: globalConfig, max, payload, req, }: Args) => Promise<void>;
export {};
//# sourceMappingURL=enforceMaxVersions.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/upsertRow/handleUpsertError.ts"],"sourcesContent":["import type { PayloadRequest } from 'payload'\n\nimport { ValidationError } from 'payload'\n\nimport type { DrizzleAdapter } from '../types.js'\n\ntype HandleUpsertErrorArgs = {\n adapter: DrizzleAdapter\n collectionSlug?: string\n error: unknown\n globalSlug?: string\n id?: number | string\n req?: Partial<PayloadRequest>\n tableName: string\n}\n\n/**\n * Handles unique constraint violation errors from PostgreSQL and SQLite,\n * converting them to Payload ValidationErrors.\n * Re-throws non-constraint errors unchanged.\n */\nexport const handleUpsertError = ({\n id,\n adapter,\n collectionSlug,\n error: caughtError,\n globalSlug,\n req,\n tableName,\n}: HandleUpsertErrorArgs): never => {\n let error: any = caughtError\n if (typeof caughtError === 'object' && caughtError !== null && 'cause' in caughtError) {\n error = caughtError.cause\n }\n\n // PostgreSQL: 23505, SQLite: SQLITE_CONSTRAINT_UNIQUE\n if (error?.code === '23505' || error?.code === 'SQLITE_CONSTRAINT_UNIQUE') {\n let fieldName: null | string = null\n\n if (error.code === '23505') {\n // PostgreSQL - extract field name from constraint\n if (adapter.fieldConstraints?.[tableName]?.[error.constraint]) {\n fieldName = adapter.fieldConstraints[tableName][error.constraint]\n } else {\n const replacement = `${tableName}_`\n if (error.constraint?.includes(replacement)) {\n const replacedConstraint = error.constraint.replace(replacement, '')\n if (replacedConstraint && adapter.fieldConstraints[tableName]?.[replacedConstraint]) {\n fieldName = adapter.fieldConstraints[tableName][replacedConstraint]\n }\n }\n }\n\n if (!fieldName && error.detail) {\n // Extract from detail: \"Key (field)=(value) already exists.\"\n const regex = /Key \\(([^)]+)\\)=\\(([^)]+)\\)/\n const match: string[] = error.detail.match(regex)\n if (match && match[1]) {\n fieldName = match[1]\n }\n }\n } else if (error.code === 'SQLITE_CONSTRAINT_UNIQUE') {\n // SQLite - extract from message: \"UNIQUE constraint failed: table.field\"\n const regex = /UNIQUE constraint failed: ([^.]+)\\.([^.]+)/\n const match: string[] = error.message?.match(regex)\n if (match && match[2]) {\n if (adapter.fieldConstraints[tableName]) {\n fieldName = adapter.fieldConstraints[tableName][`${match[2]}_idx`]\n }\n if (!fieldName) {\n fieldName = match[2]\n }\n }\n }\n\n throw new ValidationError(\n {\n id,\n collection: collectionSlug,\n errors: [\n {\n message: req?.t ? req.t('error:valueMustBeUnique') : 'Value must be unique',\n path: fieldName,\n },\n ],\n global: globalSlug,\n req,\n },\n req?.t,\n )\n }\n\n // Re-throw non-constraint errors\n throw caughtError\n}\n"],"names":["ValidationError","handleUpsertError","id","adapter","collectionSlug","error","caughtError","globalSlug","req","tableName","cause","code","fieldName","fieldConstraints","constraint","replacement","includes","replacedConstraint","replace","detail","regex","match","message","collection","errors","t","path","global"],"mappings":"AAEA,SAASA,eAAe,QAAQ,UAAS;AAczC;;;;CAIC,GACD,OAAO,MAAMC,oBAAoB,CAAC,EAChCC,EAAE,EACFC,OAAO,EACPC,cAAc,EACdC,OAAOC,WAAW,EAClBC,UAAU,EACVC,GAAG,EACHC,SAAS,EACa;IACtB,IAAIJ,QAAaC;IACjB,IAAI,OAAOA,gBAAgB,YAAYA,gBAAgB,QAAQ,WAAWA,aAAa;QACrFD,QAAQC,YAAYI,KAAK;IAC3B;IAEA,sDAAsD;IACtD,IAAIL,OAAOM,SAAS,WAAWN,OAAOM,SAAS,4BAA4B;QACzE,IAAIC,YAA2B;QAE/B,IAAIP,MAAMM,IAAI,KAAK,SAAS;YAC1B,kDAAkD;YAClD,IAAIR,QAAQU,gBAAgB,EAAE,CAACJ,UAAU,EAAE,CAACJ,MAAMS,UAAU,CAAC,EAAE;gBAC7DF,YAAYT,QAAQU,gBAAgB,CAACJ,UAAU,CAACJ,MAAMS,UAAU,CAAC;YACnE,OAAO;gBACL,MAAMC,cAAc,GAAGN,UAAU,CAAC,CAAC;gBACnC,IAAIJ,MAAMS,UAAU,EAAEE,SAASD,cAAc;oBAC3C,MAAME,qBAAqBZ,MAAMS,UAAU,CAACI,OAAO,CAACH,aAAa;oBACjE,IAAIE,sBAAsBd,QAAQU,gBAAgB,CAACJ,UAAU,EAAE,CAACQ,mBAAmB,EAAE;wBACnFL,YAAYT,QAAQU,gBAAgB,CAACJ,UAAU,CAACQ,mBAAmB;oBACrE;gBACF;YACF;YAEA,IAAI,CAACL,aAAaP,MAAMc,MAAM,EAAE;gBAC9B,6DAA6D;gBAC7D,MAAMC,QAAQ;gBACd,MAAMC,QAAkBhB,MAAMc,MAAM,CAACE,KAAK,CAACD;gBAC3C,IAAIC,SAASA,KAAK,CAAC,EAAE,EAAE;oBACrBT,YAAYS,KAAK,CAAC,EAAE;gBACtB;YACF;QACF,OAAO,IAAIhB,MAAMM,IAAI,KAAK,4BAA4B;YACpD,yEAAyE;YACzE,MAAMS,QAAQ;YACd,MAAMC,QAAkBhB,MAAMiB,OAAO,EAAED,MAAMD;YAC7C,IAAIC,SAASA,KAAK,CAAC,EAAE,EAAE;gBACrB,IAAIlB,QAAQU,gBAAgB,CAACJ,UAAU,EAAE;oBACvCG,YAAYT,QAAQU,gBAAgB,CAACJ,UAAU,CAAC,GAAGY,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;gBACpE;gBACA,IAAI,CAACT,WAAW;oBACdA,YAAYS,KAAK,CAAC,EAAE;gBACtB;YACF;QACF;QAEA,MAAM,IAAIrB,gBACR;YACEE;YACAqB,YAAYnB;YACZoB,QAAQ;gBACN;oBACEF,SAASd,KAAKiB,IAAIjB,IAAIiB,CAAC,CAAC,6BAA6B;oBACrDC,MAAMd;gBACR;aACD;YACDe,QAAQpB;YACRC;QACF,GACAA,KAAKiB;IAET;IAEA,iCAAiC;IACjC,MAAMnB;AACR,EAAC"}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../../src/auth/strategies/local/resetLoginAttempts.ts"],"sourcesContent":["import type { SanitizedCollectionConfig, TypeWithID } from '../../../collections/config/types.js'\nimport type { Payload } from '../../../index.js'\nimport type { PayloadRequest } from '../../../types/index.js'\n\ntype Args = {\n collection: SanitizedCollectionConfig\n doc: Record<string, unknown> & TypeWithID\n payload: Payload\n req: PayloadRequest\n}\n\nexport const resetLoginAttempts = async ({\n collection,\n doc,\n payload,\n req,\n}: Args): Promise<void> => {\n if (\n !('lockUntil' in doc && typeof doc.lockUntil === 'string') &&\n (!('loginAttempts' in doc) || doc.loginAttempts === 0)\n ) {\n return\n }\n await payload.db.updateOne({\n id: doc.id,\n collection: collection.slug,\n data: {\n lockUntil: null,\n loginAttempts: 0,\n },\n req,\n returning: false,\n })\n}\n"],"names":["resetLoginAttempts","collection","doc","payload","req","lockUntil","loginAttempts","db","updateOne","id","slug","data","returning"],"mappings":"AAWA,OAAO,MAAMA,qBAAqB,OAAO,EACvCC,UAAU,EACVC,GAAG,EACHC,OAAO,EACPC,GAAG,EACE;IACL,IACE,CAAE,CAAA,eAAeF,OAAO,OAAOA,IAAIG,SAAS,KAAK,QAAO,KACvD,CAAA,CAAE,CAAA,mBAAmBH,GAAE,KAAMA,IAAII,aAAa,KAAK,CAAA,GACpD;QACA;IACF;IACA,MAAMH,QAAQI,EAAE,CAACC,SAAS,CAAC;QACzBC,IAAIP,IAAIO,EAAE;QACVR,YAAYA,WAAWS,IAAI;QAC3BC,MAAM;YACJN,WAAW;YACXC,eAAe;QACjB;QACAF;QACAQ,WAAW;IACb;AACF,EAAC"}

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