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,15 @@
import React, { Component } from "react";
interface MonthDropdownOptionsProps {
onCancel: VoidFunction;
onChange: (month: number) => void;
month: number;
monthNames: string[];
}
export default class MonthDropdownOptions extends Component<MonthDropdownOptionsProps> {
isSelectedMonth: (i: number) => boolean;
renderOptions: () => React.ReactElement[];
onChange: (month: number) => void;
handleClickOutside: () => void;
render(): React.ReactElement;
}
export {};

View File

@@ -0,0 +1 @@
module.exports={C:{"115":0.03334,"123":0.0125,"133":0.03751,"134":0.00834,"135":0.00417,"136":0.05002,"137":0.14171,"138":0.02501,"139":0.02501,"140":0.57518,"143":0.0125,"145":0.90029,"146":0.64604,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 120 121 122 124 125 126 127 128 129 130 131 132 141 142 144 147 148 149 3.6","3.5":0.00417},D:{"34":0.00417,"79":0.07502,"86":0.02501,"87":0.00417,"101":0.00417,"103":0.00834,"109":0.85444,"116":0.02084,"122":0.06252,"123":0.00417,"125":0.11254,"126":0.04585,"127":0.00417,"128":0.02918,"129":0.00834,"131":0.25842,"132":0.08336,"133":0.14171,"134":0.2209,"135":1.20455,"136":0.23341,"137":0.2084,"138":0.58352,"139":0.13338,"140":0.23341,"141":0.39179,"142":5.18082,"143":7.66912,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 80 81 83 84 85 88 89 90 91 92 93 94 95 96 97 98 99 100 102 104 105 106 107 108 110 111 112 113 114 115 117 118 119 120 121 124 130 144 145 146"},F:{"93":0.00417,"95":0.00417,"114":0.00834,"122":0.00417,"124":1.00032,"125":0.19173,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 94 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 115 116 117 118 119 120 121 123 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"16":0.00417,"109":0.07919,"122":0.00417,"125":0.04168,"131":0.08336,"133":0.01667,"134":0.12504,"135":0.28342,"136":0.03334,"137":0.03751,"139":0.00417,"140":0.00417,"141":0.0917,"142":1.31709,"143":2.94678,_:"12 13 14 15 17 18 79 80 81 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 114 115 116 117 118 119 120 121 123 124 126 127 128 129 130 132 138"},E:{"14":0.0125,_:"0 4 5 6 7 8 9 10 11 12 13 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 13.1 15.1 16.0","14.1":0.00834,"15.2-15.3":0.0125,"15.4":0.00417,"15.5":0.03751,"15.6":0.42097,"16.1":0.04585,"16.2":0.06669,"16.3":0.20423,"16.4":0.02501,"16.5":0.01667,"16.6":1.37127,"17.0":0.1167,"17.1":1.04617,"17.2":0.07086,"17.3":0.04585,"17.4":0.08336,"17.5":0.27509,"17.6":0.4043,"18.0":0.0917,"18.1":0.02918,"18.2":0.02084,"18.3":0.13338,"18.4":0.05835,"18.5-18.6":0.30426,"26.0":0.22507,"26.1":2.24655,"26.2":0.41263,"26.3":0.04168},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00923,"5.0-5.1":0,"6.0-6.1":0.01846,"7.0-7.1":0.01385,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.03692,"10.0-10.2":0.00462,"10.3":0.06462,"11.0-11.2":0.79386,"11.3-11.4":0.02308,"12.0-12.1":0.01846,"12.2-12.5":0.2077,"13.0-13.1":0.00462,"13.2":0.03231,"13.3":0.00923,"13.4-13.7":0.03231,"14.0-14.4":0.06462,"14.5-14.8":0.06923,"15.0-15.1":0.07385,"15.2-15.3":0.05539,"15.4":0.06,"15.5":0.06462,"15.6-15.8":1.00155,"16.0":0.11539,"16.1":0.22154,"16.2":0.11539,"16.3":0.2077,"16.4":0.05077,"16.5":0.08769,"16.6-16.7":1.30156,"17.0":0.07385,"17.1":0.12,"17.2":0.08769,"17.3":0.13385,"17.4":0.22616,"17.5":0.44308,"17.6-17.7":1.02463,"18.0":0.23077,"18.1":0.48001,"18.2":0.25385,"18.3":0.82616,"18.4":0.42462,"18.5-18.7":30.48963,"26.0":0.59539,"26.1":4.95237,"26.2":0.94155,"26.3":0.04154},P:{"4":0.11288,"24":0.05131,"27":0.02052,"28":0.01026,"29":1.41607,_:"20 21 22 23 25 26 5.0-5.4 6.2-6.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0","7.2-7.4":0.01026},I:{"0":0.33771,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0.00007,"4.4":0,"4.4.3-4.4.4":0.00027},A:{"8":0.00834,"9":0.00834,"10":0.00417,"11":0.00417,_:"6 7 5.5"},K:{"0":0.05832,_:"10 11 12 11.1 11.5 12.1"},N:{_:"10 11"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},Q:{_:"14.9"},O:{"0":0.00583},H:{"0":0},L:{"0":10.48638},R:{_:"0"},M:{"0":0.2741}};

View File

@@ -0,0 +1,422 @@
import {deburr, isPlainObject, trim, upperFirst} from 'lodash'
import {basename, dirname, extname, normalize, sep, posix} from 'path'
import {Intersection, JSONSchema, LinkedJSONSchema, NormalizedJSONSchema, Parent} from './types/JSONSchema'
import {JSONSchema4} from 'json-schema'
import yaml from 'js-yaml'
import type {Format} from 'cli-color'
// TODO: pull out into a separate package
export function Try<T>(fn: () => T, err: (e: Error) => any): T {
try {
return fn()
} catch (e) {
return err(e as Error)
}
}
// keys that shouldn't be traversed by the catchall step
const BLACKLISTED_KEYS = new Set([
'id',
'$defs',
'$id',
'$schema',
'title',
'description',
'default',
'multipleOf',
'maximum',
'exclusiveMaximum',
'minimum',
'exclusiveMinimum',
'maxLength',
'minLength',
'pattern',
'additionalItems',
'items',
'maxItems',
'minItems',
'uniqueItems',
'maxProperties',
'minProperties',
'required',
'additionalProperties',
'definitions',
'properties',
'patternProperties',
'dependencies',
'enum',
'type',
'allOf',
'anyOf',
'oneOf',
'not',
])
function traverseObjectKeys(
obj: Record<string, LinkedJSONSchema>,
callback: (schema: LinkedJSONSchema, key: string | null) => void,
processed: Set<LinkedJSONSchema>,
) {
Object.keys(obj).forEach(k => {
if (obj[k] && typeof obj[k] === 'object' && !Array.isArray(obj[k])) {
traverse(obj[k], callback, processed, k)
}
})
}
function traverseArray(
arr: LinkedJSONSchema[],
callback: (schema: LinkedJSONSchema, key: string | null) => void,
processed: Set<LinkedJSONSchema>,
) {
arr.forEach((s, k) => traverse(s, callback, processed, k.toString()))
}
function traverseIntersection(
schema: LinkedJSONSchema,
callback: (schema: LinkedJSONSchema, key: string | null) => void,
processed: Set<LinkedJSONSchema>,
) {
if (typeof schema !== 'object' || !schema) {
return
}
const r = schema as unknown as Record<string | symbol, unknown>
const intersection = r[Intersection] as NormalizedJSONSchema | undefined
if (!intersection) {
return
}
if (Array.isArray(intersection.allOf)) {
traverseArray(intersection.allOf, callback, processed)
}
}
export function traverse(
schema: LinkedJSONSchema,
callback: (schema: LinkedJSONSchema, key: string | null) => void,
processed = new Set<LinkedJSONSchema>(),
key?: string,
): void {
// Handle recursive schemas
if (processed.has(schema)) {
return
}
processed.add(schema)
callback(schema, key ?? null)
if (schema.anyOf) {
traverseArray(schema.anyOf, callback, processed)
}
if (schema.allOf) {
traverseArray(schema.allOf, callback, processed)
}
if (schema.oneOf) {
traverseArray(schema.oneOf, callback, processed)
}
if (schema.properties) {
traverseObjectKeys(schema.properties, callback, processed)
}
if (schema.patternProperties) {
traverseObjectKeys(schema.patternProperties, callback, processed)
}
if (schema.additionalProperties && typeof schema.additionalProperties === 'object') {
traverse(schema.additionalProperties, callback, processed)
}
if (schema.items) {
const {items} = schema
if (Array.isArray(items)) {
traverseArray(items, callback, processed)
} else {
traverse(items, callback, processed)
}
}
if (schema.additionalItems && typeof schema.additionalItems === 'object') {
traverse(schema.additionalItems, callback, processed)
}
if (schema.dependencies) {
if (Array.isArray(schema.dependencies)) {
traverseArray(schema.dependencies, callback, processed)
} else {
traverseObjectKeys(schema.dependencies as LinkedJSONSchema, callback, processed)
}
}
if (schema.definitions) {
traverseObjectKeys(schema.definitions, callback, processed)
}
if (schema.$defs) {
traverseObjectKeys(schema.$defs, callback, processed)
}
if (schema.not) {
traverse(schema.not, callback, processed)
}
traverseIntersection(schema, callback, processed)
// technically you can put definitions on any key
Object.keys(schema)
.filter(key => !BLACKLISTED_KEYS.has(key))
.forEach(key => {
const child = schema[key]
if (child && typeof child === 'object') {
traverseObjectKeys(child, callback, processed)
}
})
}
/**
* Eg. `foo/bar/baz.json` => `baz`
*/
export function justName(filename = ''): string {
return stripExtension(basename(filename))
}
/**
* Avoid appending "js" to top-level unnamed schemas
*/
export function stripExtension(filename: string): string {
return filename.replace(extname(filename), '')
}
/**
* Convert a string that might contain spaces or special characters to one that
* can safely be used as a TypeScript interface or enum name.
*/
export function toSafeString(string: string) {
// identifiers in javaScript/ts:
// First character: a-zA-Z | _ | $
// Rest: a-zA-Z | _ | $ | 0-9
return upperFirst(
// remove accents, umlauts, ... by their basic latin letters
deburr(string)
// replace chars which are not valid for typescript identifiers with whitespace
.replace(/(^\s*[^a-zA-Z_$])|([^a-zA-Z_$\d])/g, ' ')
// uppercase leading underscores followed by lowercase
.replace(/^_[a-z]/g, match => match.toUpperCase())
// remove non-leading underscores followed by lowercase (convert snake_case)
.replace(/_[a-z]/g, match => match.substr(1, match.length).toUpperCase())
// uppercase letters after digits, dollars
.replace(/([\d$]+[a-zA-Z])/g, match => match.toUpperCase())
// uppercase first letter after whitespace
.replace(/\s+([a-zA-Z])/g, match => trim(match.toUpperCase()))
// remove remaining whitespace
.replace(/\s/g, ''),
)
}
export function generateName(from: string, usedNames: Set<string>) {
let name = toSafeString(from)
if (!name) {
name = 'NoName'
}
// increment counter until we find a free name
if (usedNames.has(name)) {
let counter = 1
let nameWithCounter = `${name}${counter}`
while (usedNames.has(nameWithCounter)) {
nameWithCounter = `${name}${counter}`
counter++
}
name = nameWithCounter
}
usedNames.add(name)
return name
}
export function error(...messages: any[]): void {
if (!process.env.VERBOSE) {
return console.error(messages)
}
console.error(getStyledTextForLogging('red')?.('error'), ...messages)
}
type LogStyle = 'blue' | 'cyan' | 'green' | 'magenta' | 'red' | 'white' | 'yellow'
export function log(style: LogStyle, title: string, ...messages: unknown[]): void {
if (!process.env.VERBOSE) {
return
}
let lastMessage = null
if (messages.length > 1 && typeof messages[messages.length - 1] !== 'string') {
lastMessage = messages.splice(messages.length - 1, 1)
}
console.info(color()?.whiteBright.bgCyan('debug'), getStyledTextForLogging(style)?.(title), ...messages)
if (lastMessage) {
console.dir(lastMessage, {depth: 6, maxArrayLength: 6})
}
}
function getStyledTextForLogging(style: LogStyle): ((text: string) => string) | undefined {
if (!process.env.VERBOSE) {
return
}
switch (style) {
case 'blue':
return color()?.whiteBright.bgBlue
case 'cyan':
return color()?.whiteBright.bgCyan
case 'green':
return color()?.whiteBright.bgGreen
case 'magenta':
return color()?.whiteBright.bgMagenta
case 'red':
return color()?.whiteBright.bgRedBright
case 'white':
return color()?.black.bgWhite
case 'yellow':
return color()?.whiteBright.bgYellow
}
}
/**
* escape block comments in schema descriptions so that they don't unexpectedly close JSDoc comments in generated typescript interfaces
*/
export function escapeBlockComment(schema: JSONSchema) {
const replacer = '* /'
if (schema === null || typeof schema !== 'object') {
return
}
for (const key of Object.keys(schema)) {
if (key === 'description' && typeof schema[key] === 'string') {
schema[key] = schema[key]!.replace(/\*\//g, replacer)
}
}
}
/*
the following logic determines the out path by comparing the in path to the users specified out path.
For example, if input directory MultiSchema looks like:
MultiSchema/foo/a.json
MultiSchema/bar/fuzz/c.json
MultiSchema/bar/d.json
And the user wants the outputs to be in MultiSchema/Out, then this code will be able to map the inner directories foo, bar, and fuzz into the intended Out directory like so:
MultiSchema/Out/foo/a.json
MultiSchema/Out/bar/fuzz/c.json
MultiSchema/Out/bar/d.json
*/
export function pathTransform(outputPath: string, inputPath: string, filePath: string): string {
const inPathList = normalize(inputPath).split(sep)
const filePathList = dirname(normalize(filePath)).split(sep)
const filePathRel = filePathList.filter((f, i) => f !== inPathList[i])
return posix.join(posix.normalize(outputPath), ...filePathRel)
}
/**
* Removes the schema's `default` property if it doesn't match the schema's `type` property.
* Useful when parsing unions.
*
* Mutates `schema`.
*/
export function maybeStripDefault(schema: LinkedJSONSchema): LinkedJSONSchema {
if (!('default' in schema)) {
return schema
}
switch (schema.type) {
case 'array':
if (Array.isArray(schema.default)) {
return schema
}
break
case 'boolean':
if (typeof schema.default === 'boolean') {
return schema
}
break
case 'integer':
case 'number':
if (typeof schema.default === 'number') {
return schema
}
break
case 'string':
if (typeof schema.default === 'string') {
return schema
}
break
case 'null':
if (schema.default === null) {
return schema
}
break
case 'object':
if (isPlainObject(schema.default)) {
return schema
}
break
}
delete schema.default
return schema
}
export function appendToDescription(existingDescription: string | undefined, ...values: string[]): string {
if (existingDescription) {
return `${existingDescription}\n\n${values.join('\n')}`
}
return values.join('\n')
}
export function isSchemaLike(schema: any): schema is LinkedJSONSchema {
if (!isPlainObject(schema)) {
return false
}
// top-level schema
const parent = schema[Parent]
if (parent === null) {
return true
}
const JSON_SCHEMA_KEYWORDS = [
'$defs',
'allOf',
'anyOf',
'definitions',
'dependencies',
'enum',
'not',
'oneOf',
'patternProperties',
'properties',
'required',
]
if (JSON_SCHEMA_KEYWORDS.some(_ => parent[_] === schema)) {
return false
}
return true
}
export function parseFileAsJSONSchema(filename: string | null, contents: string): JSONSchema4 {
if (filename != null && isYaml(filename)) {
return Try(
() => yaml.load(contents.toString()) as JSONSchema4,
() => {
throw new TypeError(`Error parsing YML in file "${filename}"`)
},
)
}
return Try(
() => JSON.parse(contents.toString()),
() => {
throw new TypeError(`Error parsing JSON in file "${filename}"`)
},
)
}
function isYaml(filename: string) {
return filename.endsWith('.yaml') || filename.endsWith('.yml')
}
function color(): Format {
let cliColor
try {
cliColor = require('cli-color')
} catch {}
return cliColor
}

View File

@@ -0,0 +1,13 @@
import type { Scope } from '../scope';
import type { Span } from '../types-hoist/span';
/** Store the scope & isolation scope for a span, which can the be used when it is finished. */
export declare function setCapturedScopesOnSpan(span: Span | undefined, scope: Scope, isolationScope: Scope): void;
/**
* Grabs the scope and isolation scope off a span that were active when the span was started.
* If WeakRef was used and scopes have been garbage collected, returns undefined for those scopes.
*/
export declare function getCapturedScopesOnSpan(span: Span): {
scope?: Scope;
isolationScope?: Scope;
};
//# sourceMappingURL=utils.d.ts.map

View File

@@ -0,0 +1,23 @@
var nativeCreate = require('./_nativeCreate');
/** Used to stand-in for `undefined` hash values. */
var HASH_UNDEFINED = '__lodash_hash_undefined__';
/**
* Sets the hash `key` to `value`.
*
* @private
* @name set
* @memberOf Hash
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the hash instance.
*/
function hashSet(key, value) {
var data = this.__data__;
this.size += this.has(key) ? 0 : 1;
data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
return this;
}
module.exports = hashSet;

View File

@@ -0,0 +1,7 @@
/** Detect CommonJS. */
export declare function isCjs(): boolean;
/**
* Check if the current Node.js version supports module.register
*/
export declare function supportsEsmLoaderHooks(): boolean;
//# sourceMappingURL=detection.d.ts.map

View File

@@ -0,0 +1,3 @@
import type { Vocabulary } from "../../types";
declare const dynamic: Vocabulary;
export default dynamic;

View File

@@ -0,0 +1,2 @@
import { indexOfFrom } from "../fp";
export = indexOfFrom;

View File

@@ -0,0 +1 @@
{"version":3,"file":"noop-normalize.js","sourceRoot":"","sources":["../../../../src/platform/browser/noop-normalize.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4CAA0C;AAE1C;;;;;;;;;;GAUG;AACH,SAAgB,SAAS,CAAC,IAAY;IACpC,UAAI,CAAC,IAAI,CACP,yOAAyO,CAC1O,CAAC;IACF,OAAO,IAAI,CAAC;AACd,CAAC;AALD,8BAKC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { diag } from '@opentelemetry/api';\n\n/**\n * Placeholder normalize function to replace the node variant in browser runtimes,\n * this should never be called and will perform a no-op and warn if it is called regardless.\n *\n * This is a workaround to fix https://github.com/open-telemetry/opentelemetry-js/issues/4373 until the instrumentation\n * package can be made node-only.\n *\n * @param path input path\n * @return unmodified path\n * @internal\n */\nexport function normalize(path: string): string {\n diag.warn(\n 'Path normalization is not implemented for this platform. To silence this warning, ensure no node-specific instrumentations are loaded, and node-specific types (e.g. InstrumentationNodeModuleFile), are not used in a browser context)'\n );\n return path;\n}\n"]}

View File

@@ -0,0 +1,43 @@
import type { I18n } from '@payloadcms/translations';
import type { JSONSchema4, JSONSchema4TypeName } from 'json-schema';
import type { SanitizedCollectionConfig } from '../collections/config/types.js';
import type { SanitizedConfig } from '../config/types.js';
import type { FlattenedField } from '../fields/config/types.js';
import type { SanitizedGlobalConfig } from '../globals/config/types.js';
/**
* Returns a JSON Schema Type with 'null' added if the field is not required.
*/
export declare function withNullableJSONSchemaType(fieldType: JSONSchema4TypeName, isRequired: boolean): JSONSchema4TypeName | JSONSchema4TypeName[];
export declare function fieldsToJSONSchema(
/**
* Used for relationship fields, to determine whether to use a string or number type for the ID.
* While there is a default ID field type set by the db adapter, they can differ on a collection-level
* if they have custom ID fields.
*/
collectionIDFieldTypes: {
[key: string]: 'number' | 'string';
}, fields: FlattenedField[],
/**
* Allows you to define new top-level interfaces that can be re-used in the output schema.
*/
interfaceNameDefinitions: Map<string, JSONSchema4>, config?: SanitizedConfig, i18n?: I18n): {
properties: {
[k: string]: JSONSchema4;
};
required: string[];
};
export declare function entityToJSONSchema(config: SanitizedConfig, entity: SanitizedCollectionConfig | SanitizedGlobalConfig, interfaceNameDefinitions: Map<string, JSONSchema4>, defaultIDType: 'number' | 'text', collectionIDFieldTypes?: {
[key: string]: 'number' | 'string';
}, i18n?: I18n): JSONSchema4;
export declare function fieldsToSelectJSONSchema({ config, fields, interfaceNameDefinitions, }: {
config: SanitizedConfig;
fields: FlattenedField[];
interfaceNameDefinitions: Map<string, JSONSchema4>;
}): JSONSchema4;
export declare function authCollectionToOperationsJSONSchema(config: SanitizedCollectionConfig): JSONSchema4;
export declare function timezonesToJSONSchema(supportedTimezones: SanitizedConfig['admin']['timezones']['supportedTimezones']): JSONSchema4;
/**
* This is used for generating the TypeScript types (payload-types.ts) with the payload generate:types command.
*/
export declare function configToJSONSchema(config: SanitizedConfig, defaultIDType?: 'number' | 'text', i18n?: I18n): JSONSchema4;
//# sourceMappingURL=configToJSONSchema.d.ts.map

View File

@@ -0,0 +1,9 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
"use strict";var e=require("@lexical/react/LexicalComposerContext"),t=require("@lexical/react/useLexicalEditable"),r=require("@lexical/text"),n=require("@lexical/utils"),o=require("react"),i=require("react-dom"),c=require("react/jsx-runtime"),u=require("@lexical/dragon"),s=require("@lexical/plain-text");const l="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?o.useLayoutEffect:o.useEffect;function a(e){return e.getEditorState().read(r.$canShowPlaceholderCurry(e.isComposing()))}function d({content:r}){const[i]=e.useLexicalComposerContext(),c=function(e){const[t,r]=o.useState((()=>a(e)));return l((()=>{function t(){const t=a(e);r(t)}return t(),n.mergeRegister(e.registerUpdateListener((()=>{t()})),e.registerEditableListener((()=>{t()})))}),[e]),t}(i),u=t.useLexicalEditable();return c?"function"==typeof r?r(u):r:null}exports.PlainTextPlugin=function({contentEditable:t,placeholder:r=null,ErrorBoundary:a}){const[x]=e.useLexicalComposerContext(),f=function(e,t){const[r,n]=o.useState((()=>e.getDecorators()));return l((()=>e.registerDecoratorListener((e=>{i.flushSync((()=>{n(e)}))}))),[e]),o.useEffect((()=>{n(e.getDecorators())}),[e]),o.useMemo((()=>{const n=[],u=Object.keys(r);for(let s=0;s<u.length;s++){const l=u[s],a=c.jsx(t,{onError:t=>e._onError(t),children:c.jsx(o.Suspense,{fallback:null,children:r[l]})}),d=e.getElementByKey(l);null!==d&&n.push(i.createPortal(a,d,l))}return n}),[t,r,e])}(x,a);return function(e){l((()=>n.mergeRegister(s.registerPlainText(e),u.registerDragonSupport(e))),[e])}(x),c.jsxs(c.Fragment,{children:[t,c.jsx(d,{content:r}),f]})};

View File

@@ -0,0 +1,132 @@
import { buildMatchFn } from "../../_lib/buildMatchFn.js";
import { buildMatchPatternFn } from "../../_lib/buildMatchPatternFn.js";
const matchOrdinalNumberPattern = /^(\d+)(\.)?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(fKr|fvt|eKr|vt)/i,
abbreviated: /^(f\.Kr\.?|f\.v\.t\.?|e\.Kr\.?|v\.t\.)/i,
wide: /^(f.Kr.|før vesterlandsk tidsregning|e.Kr.|vesterlandsk tidsregning)/i,
};
const parseEraPatterns = {
any: [/^f/i, /^(v|e)/i],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^[1234]. kvt\./i,
wide: /^[1234]\.? kvartal/i,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
narrow: /^[jfmasond]/i,
abbreviated: /^(jan.|feb.|mar.|apr.|maj|jun.|jul.|aug.|sep.|okt.|nov.|dec.)/i,
wide: /^(januar|februar|marts|april|maj|juni|juli|august|september|oktober|november|december)/i,
};
const parseMonthPatterns = {
narrow: [
/^j/i,
/^f/i,
/^m/i,
/^a/i,
/^m/i,
/^j/i,
/^j/i,
/^a/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i,
],
any: [
/^ja/i,
/^f/i,
/^mar/i,
/^ap/i,
/^maj/i,
/^jun/i,
/^jul/i,
/^au/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i,
],
};
const matchDayPatterns = {
narrow: /^[smtofl]/i,
short: /^(søn.|man.|tir.|ons.|tor.|fre.|lør.)/i,
abbreviated: /^(søn|man|tir|ons|tor|fre|lør)/i,
wide: /^(søndag|mandag|tirsdag|onsdag|torsdag|fredag|lørdag)/i,
};
const parseDayPatterns = {
narrow: [/^s/i, /^m/i, /^t/i, /^o/i, /^t/i, /^f/i, /^l/i],
any: [/^s/i, /^m/i, /^ti/i, /^o/i, /^to/i, /^f/i, /^l/i],
};
const matchDayPeriodPatterns = {
narrow: /^(a|p|midnat|middag|(om) (morgenen|eftermiddagen|aftenen|natten))/i,
any: /^([ap]\.?\s?m\.?|midnat|middag|(om) (morgenen|eftermiddagen|aftenen|natten))/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^a/i,
pm: /^p/i,
midnight: /midnat/i,
noon: /middag/i,
morning: /morgen/i,
afternoon: /eftermiddag/i,
evening: /aften/i,
night: /nat/i,
},
};
export const match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value, 10),
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => index + 1,
}),
month: buildMatchFn({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any",
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any",
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
};

View File

@@ -0,0 +1,79 @@
import { memoize, strategies } from '@formatjs/fast-memoize';
class IntlError extends Error {
constructor(code, originalMessage) {
let message = code;
if (originalMessage) {
message += ': ' + originalMessage;
}
super(message);
this.code = code;
if (originalMessage) {
this.originalMessage = originalMessage;
}
}
}
var IntlErrorCode = /*#__PURE__*/function (IntlErrorCode) {
IntlErrorCode["MISSING_MESSAGE"] = "MISSING_MESSAGE";
IntlErrorCode["MISSING_FORMAT"] = "MISSING_FORMAT";
IntlErrorCode["ENVIRONMENT_FALLBACK"] = "ENVIRONMENT_FALLBACK";
IntlErrorCode["INSUFFICIENT_PATH"] = "INSUFFICIENT_PATH";
IntlErrorCode["INVALID_MESSAGE"] = "INVALID_MESSAGE";
IntlErrorCode["INVALID_KEY"] = "INVALID_KEY";
IntlErrorCode["FORMATTING_ERROR"] = "FORMATTING_ERROR";
return IntlErrorCode;
}(IntlErrorCode || {});
function createCache() {
return {
dateTime: {},
number: {},
message: {},
relativeTime: {},
pluralRules: {},
list: {},
displayNames: {}
};
}
function createMemoCache(store) {
return {
create() {
return {
get(key) {
return store[key];
},
set(key, value) {
store[key] = value;
}
};
}
};
}
function memoFn(fn, cache) {
return memoize(fn, {
cache: createMemoCache(cache),
strategy: strategies.variadic
});
}
function memoConstructor(ConstructorFn, cache) {
return memoFn((...args) => new ConstructorFn(...args), cache);
}
function createIntlFormatters(cache) {
const getDateTimeFormat = memoConstructor(Intl.DateTimeFormat, cache.dateTime);
const getNumberFormat = memoConstructor(Intl.NumberFormat, cache.number);
const getPluralRules = memoConstructor(Intl.PluralRules, cache.pluralRules);
const getRelativeTimeFormat = memoConstructor(Intl.RelativeTimeFormat, cache.relativeTime);
const getListFormat = memoConstructor(Intl.ListFormat, cache.list);
const getDisplayNames = memoConstructor(Intl.DisplayNames, cache.displayNames);
return {
getDateTimeFormat,
getNumberFormat,
getPluralRules,
getRelativeTimeFormat,
getListFormat,
getDisplayNames
};
}
export { IntlError as I, IntlErrorCode as a, createCache as b, createIntlFormatters as c, memoFn as m };

View File

@@ -0,0 +1,8 @@
import type { ReadableSpan } from '@opentelemetry/sdk-trace-base';
/**
* Get the parent span id from a span.
* In OTel v1, the parent span id is accessed as `parentSpanId`
* In OTel v2, the parent span id is accessed as `spanId` on the `parentSpanContext`
*/
export declare function getParentSpanId(span: ReadableSpan): string | undefined;
//# sourceMappingURL=getParentSpanId.d.ts.map

View File

@@ -0,0 +1,11 @@
import { Parser, Printer } from "../index.js";
export declare const parsers: {
css: Parser;
less: Parser;
scss: Parser;
};
export declare const printers: {
postcss: Printer;
};

View File

@@ -0,0 +1,24 @@
import type { BatchItem, BatchResponse } from "../batch.js";
import { entityKind } from "../entity.js";
import { BaseSQLiteDatabase } from "../sqlite-core/db.js";
import type { DrizzleConfig } from "../utils.js";
export interface SqliteRemoteResult<T = unknown> {
rows?: T[];
}
export declare class SqliteRemoteDatabase<TSchema extends Record<string, unknown> = Record<string, never>> extends BaseSQLiteDatabase<'async', SqliteRemoteResult, TSchema> {
static readonly [entityKind]: string;
batch<U extends BatchItem<'sqlite'>, T extends Readonly<[U, ...U[]]>>(batch: T): Promise<BatchResponse<T>>;
}
export type AsyncRemoteCallback = (sql: string, params: any[], method: 'run' | 'all' | 'values' | 'get') => Promise<{
rows: any[];
}>;
export type AsyncBatchRemoteCallback = (batch: {
sql: string;
params: any[];
method: 'run' | 'all' | 'values' | 'get';
}[]) => Promise<{
rows: any[];
}[]>;
export type RemoteCallback = AsyncRemoteCallback;
export declare function drizzle<TSchema extends Record<string, unknown> = Record<string, never>>(callback: RemoteCallback, config?: DrizzleConfig<TSchema>): SqliteRemoteDatabase<TSchema>;
export declare function drizzle<TSchema extends Record<string, unknown> = Record<string, never>>(callback: RemoteCallback, batchCallback?: AsyncBatchRemoteCallback, config?: DrizzleConfig<TSchema>): SqliteRemoteDatabase<TSchema>;

View File

@@ -0,0 +1,12 @@
'use strict'
const { test } = require('node:test')
const noop = require('./noop')
test('is a function', t => {
t.assert.strictEqual(typeof noop, 'function')
})
test('does nothing', t => {
t.assert.strictEqual(noop('stuff'), undefined)
})

View File

@@ -0,0 +1 @@
{"version":3,"file":"findVersionByID.d.ts","sourceRoot":"","sources":["../../../src/collections/endpoints/findVersionByID.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAO3D,eAAO,MAAM,sBAAsB,EAAE,cAsBpC,CAAA"}

View File

@@ -0,0 +1,38 @@
"use strict";
exports.formatLong = void 0;
var _index = require("../../_lib/buildFormatLongFn.cjs");
const dateFormats = {
full: "EEEE, dd MMMM yyyy",
long: "dd MMMM yyyy",
medium: "dd MMM yyyy",
short: "dd/MM/yyyy",
};
const timeFormats = {
full: "HH:mm:ss zzzz",
long: "HH:mm:ss z",
medium: "HH:mm:ss",
short: "H:mm",
};
const dateTimeFormats = {
any: "{{date}} {{time}}",
};
const formatLong = (exports.formatLong = {
date: (0, _index.buildFormatLongFn)({
formats: dateFormats,
defaultWidth: "full",
}),
time: (0, _index.buildFormatLongFn)({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: (0, _index.buildFormatLongFn)({
formats: dateTimeFormats,
defaultWidth: "any",
}),
});

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["c","_c","useModal","getTranslation","React","useEffect","Drawer","useTranslation","BlockSelector","BlocksDrawer","props","$","addRow","addRowIndex","blocks","drawerSlug","labels","closeModal","isModalOpen","i18n","t","searchTermOverride","setSearchTermOverride","useState","t0","t1","t2","singular","t3","slug","_jsx","title","label","children","onSelect","searchTerm"],"sources":["../../../../src/fields/Blocks/BlocksDrawer/index.tsx"],"sourcesContent":["'use client'\nimport type { ClientBlock, Labels } from 'payload'\n\nimport { useModal } from '@faceless-ui/modal'\nimport { getTranslation } from '@payloadcms/translations'\nimport React, { useEffect } from 'react'\n\nimport { Drawer } from '../../../elements/Drawer/index.js'\nimport { useTranslation } from '../../../providers/Translation/index.js'\nimport { BlockSelector } from '../BlockSelector/index.js'\n\nexport type Props = {\n readonly addRow: (index: number, blockType?: string) => Promise<void> | void\n readonly addRowIndex: number\n readonly blocks: (ClientBlock | string)[]\n readonly drawerSlug: string\n readonly labels: Labels\n}\n\nexport const BlocksDrawer: React.FC<Props> = (props) => {\n const { addRow, addRowIndex, blocks, drawerSlug, labels } = props\n\n const { closeModal, isModalOpen } = useModal()\n const { i18n, t } = useTranslation()\n const [searchTermOverride, setSearchTermOverride] = React.useState('')\n\n useEffect(() => {\n if (!isModalOpen(drawerSlug)) {\n setSearchTermOverride('')\n }\n }, [isModalOpen, drawerSlug])\n\n return (\n <Drawer\n slug={drawerSlug}\n title={t('fields:addLabel', { label: getTranslation(labels.singular, i18n) })}\n >\n <BlockSelector\n blocks={blocks}\n onSelect={(slug) => {\n void addRow(addRowIndex, slug)\n closeModal(drawerSlug)\n }}\n searchTerm={searchTermOverride}\n />\n </Drawer>\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAGA,SAASC,QAAQ,QAAQ;AACzB,SAASC,cAAc,QAAQ;AAC/B,OAAOC,KAAA,IAASC,SAAS,QAAQ;AAEjC,SAASC,MAAM,QAAQ;AACvB,SAASC,cAAc,QAAQ;AAC/B,SAASC,aAAa,QAAQ;AAU9B,OAAO,MAAMC,YAAA,GAAgCC,KAAA;EAAA,MAAAC,CAAA,GAAAV,EAAA;EAC3C;IAAAW,MAAA;IAAAC,WAAA;IAAAC,MAAA;IAAAC,UAAA;IAAAC;EAAA,IAA4DN,KAAA;EAE5D;IAAAO,UAAA;IAAAC;EAAA,IAAoChB,QAAA;EACpC;IAAAiB,IAAA;IAAAC;EAAA,IAAoBb,cAAA;EACpB,OAAAc,kBAAA,EAAAC,qBAAA,IAAoDlB,KAAA,CAAAmB,QAAA,CAAe;EAAA,IAAAC,EAAA;EAAA,IAAAC,EAAA;EAAA,IAAAd,CAAA,QAAAI,UAAA,IAAAJ,CAAA,QAAAO,WAAA;IAEzDM,EAAA,GAAAA,CAAA;MAAA,KACHN,WAAA,CAAYH,UAAA;QACfO,qBAAA,CAAsB;MAAA;IAAA;IAEvBG,EAAA,IAACP,WAAA,EAAaH,UAAA;IAAWJ,CAAA,MAAAI,UAAA;IAAAJ,CAAA,MAAAO,WAAA;IAAAP,CAAA,MAAAa,EAAA;IAAAb,CAAA,MAAAc,EAAA;EAAA;IAAAD,EAAA,GAAAb,CAAA;IAAAc,EAAA,GAAAd,CAAA;EAAA;EAJ5BN,SAAA,CAAUmB,EAIV,EAAGC,EAAyB;EAAA,IAAAC,EAAA;EAAA,IAAAf,CAAA,QAAAC,MAAA,IAAAD,CAAA,QAAAE,WAAA,IAAAF,CAAA,QAAAG,MAAA,IAAAH,CAAA,QAAAM,UAAA,IAAAN,CAAA,QAAAI,UAAA,IAAAJ,CAAA,QAAAQ,IAAA,IAAAR,CAAA,SAAAK,MAAA,CAAAW,QAAA,IAAAhB,CAAA,SAAAU,kBAAA,IAAAV,CAAA,SAAAS,CAAA;IAAA,IAAAQ,EAAA;IAAA,IAAAjB,CAAA,SAAAC,MAAA,IAAAD,CAAA,SAAAE,WAAA,IAAAF,CAAA,SAAAM,UAAA,IAAAN,CAAA,SAAAI,UAAA;MASZa,EAAA,GAAAC,IAAA;QACHjB,MAAA,CAAOC,WAAA,EAAagB,IAAA;QACzBZ,UAAA,CAAWF,UAAA;MAAA;MACbJ,CAAA,OAAAC,MAAA;MAAAD,CAAA,OAAAE,WAAA;MAAAF,CAAA,OAAAM,UAAA;MAAAN,CAAA,OAAAI,UAAA;MAAAJ,CAAA,OAAAiB,EAAA;IAAA;MAAAA,EAAA,GAAAjB,CAAA;IAAA;IATJe,EAAA,GAAAI,IAAA,CAAAxB,MAAA;MAAAuB,IAAA,EACQd,UAAA;MAAAgB,KAAA,EACCX,CAAA,CAAE;QAAAY,KAAA,EAA4B7B,cAAA,CAAea,MAAA,CAAAW,QAAA,EAAiBR,IAAA;MAAA,CAAM;MAAAc,QAAA,EAE3EH,IAAA,CAAAtB,aAAA;QAAAM,MAAA;QAAAoB,QAAA,EAEYN,EAGV;QAAAO,UAAA,EACYd;MAAA,C;;;;;;;;;;;;;;;SAVhBK,E;CAcJ","ignoreList":[]}

View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) Feross Aboukhadijeh
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,14 @@
import type { Locale } from "./types.js";
/**
* @category Locales
* @summary Dutch locale.
* @language Dutch
* @iso-639-2 nld
* @author Jorik Tangelder [@jtangelder](https://github.com/jtangelder)
* @author Ruben Stolk [@rubenstolk](https://github.com/rubenstolk)
* @author Lode Vanhove [@bitcrumb](https://github.com/bitcrumb)
* @author Edo Rivai [@edorivai](https://github.com/edorivai)
* @author Niels Keurentjes [@curry684](https://github.com/curry684)
* @author Stefan Vermaas [@stefanvermaas](https://github.com/stefanvermaas)
*/
export declare const nl: Locale;

View File

@@ -0,0 +1,54 @@
/* FIXME :
:extend() is not handled specifically : its highlighting is buggy.
Mixin usage must be inside a ruleset to be highlighted.
At-rules (e.g. import) containing interpolations are buggy.
Detached rulesets are highlighted as at-rules.
A comment before a mixin usage prevents the latter to be properly highlighted.
*/
Prism.languages.less = Prism.languages.extend('css', {
'comment': [
/\/\*[\s\S]*?\*\//,
{
pattern: /(^|[^\\])\/\/.*/,
lookbehind: true
}
],
'atrule': {
pattern: /@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,
inside: {
'punctuation': /[:()]/
}
},
// selectors and mixins are considered the same
'selector': {
pattern: /(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,
inside: {
// mixin parameters
'variable': /@+[\w-]+/
}
},
'property': /(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,
'operator': /[+\-*\/]/
});
Prism.languages.insertBefore('less', 'property', {
'variable': [
// Variable declaration (the colon must be consumed!)
{
pattern: /@[\w-]+\s*:/,
inside: {
'punctuation': /:/
}
},
// Variable usage
/@@?[\w-]+/
],
'mixin-usage': {
pattern: /([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,
lookbehind: true,
alias: 'function'
}
});

View File

@@ -0,0 +1,4 @@
export declare const endOfHour: import("./types.js").FPFn1<
Date,
string | number | Date
>;

View File

@@ -0,0 +1,148 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
/**
* A postinstall script runs after `@swc/core` is installed.
*
* It checks if corresponding optional dependencies for native binary is installed and can be loaded properly.
* If it fails, it'll internally try to install `@swc/wasm` as fallback.
*/
const fs_1 = require("fs");
const assert = __importStar(require("assert"));
const path = __importStar(require("path"));
const child_process = __importStar(require("child_process"));
const fs = __importStar(require("fs"));
function removeRecursive(dir) {
for (const entry of fs.readdirSync(dir)) {
const entryPath = path.join(dir, entry);
let stats;
try {
stats = fs.lstatSync(entryPath);
}
catch (_a) {
continue; // Guard against https://github.com/nodejs/node/issues/4760
}
if (stats.isDirectory())
removeRecursive(entryPath);
else
fs.unlinkSync(entryPath);
}
fs.rmdirSync(dir);
}
/**
* Trying to validate @swc/core's native binary installation, then installs if it is not supported.
*/
const validateBinary = () => __awaiter(void 0, void 0, void 0, function* () {
var _a;
try {
const { name } = require(path.resolve(process.env.INIT_CWD, "package.json"));
if (name === "@swc/core" || name === "@swc/workspace") {
return;
}
}
catch (_) {
return;
}
// TODO: We do not take care of the case if user try to install with `--no-optional`.
// For now, it is considered as deliberate decision.
let binding;
try {
binding = require("./binding.js");
// Check if binding binary actually works.
// For the latest version, checks target triple. If it's old version doesn't have target triple, use parseSync instead.
const triple = binding.getTargetTriple
? binding.getTargetTriple()
: binding.parseSync("console.log()", Buffer.from(JSON.stringify({ syntax: "ecmascript" })));
assert.ok(triple, "Failed to read target triple from native binary.");
}
catch (error) {
// if error is unsupported architecture, ignore to display.
if (!((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes("Unsupported architecture"))) {
console.warn(error);
}
console.warn(`@swc/core was not able to resolve native bindings installation. It'll try to use @swc/wasm as fallback instead.`);
}
if (!!binding) {
return;
}
// User choose to override the binary installation. Skip remanining validation.
if (!!process.env["SWC_BINARY_PATH"]) {
console.warn(`@swc/core could not resolve native bindings installation, but found manual override config SWC_BINARY_PATH specified. Skipping remaning validation.`);
return;
}
// Check if top-level package.json installs @swc/wasm separately already
let wasmBinding;
try {
wasmBinding = require.resolve(`@swc/wasm`);
}
catch (_) { }
if (!!wasmBinding && (0, fs_1.existsSync)(wasmBinding)) {
return;
}
const env = Object.assign(Object.assign({}, process.env), { npm_config_global: undefined });
const { version } = require(path.join(path.dirname(require.resolve("@swc/core")), "package.json"));
// We want to place @swc/wasm next to the @swc/core as if normal installation was done,
// but can't directly set cwd to INIT_CWD as npm seems to acquire lock to the working dir.
// Instead, create a temporary inner and move it out.
const coreDir = path.dirname(require.resolve("@swc/core"));
const installDir = path.join(coreDir, "npm-install");
try {
fs.mkdirSync(installDir);
fs.writeFileSync(path.join(installDir, "package.json"), "{}");
// Instead of carrying over own dependencies to download & resolve package which increases installation sizes of `@swc/core`,
// assume & relies on system's npm installation.
child_process.execSync(`npm install --no-save --loglevel=error --prefer-offline --no-audit --progress=false @swc/wasm@${version}`, { cwd: installDir, stdio: "pipe", env });
const installedBinPath = path.join(installDir, "node_modules", `@swc/wasm`);
// INIT_CWD is injected via npm. If it doesn't exists, can't proceed.
fs.renameSync(installedBinPath, path.resolve(process.env.INIT_CWD, "node_modules", `@swc/wasm`));
}
catch (error) {
console.error(error);
console.error(`Failed to install fallback @swc/wasm@${version}. @swc/core will not properly.
Please install @swc/wasm manually, or retry whole installation.
If there are unexpected errors, please report at https://github.com/swc-project/swc/issues`);
}
finally {
try {
removeRecursive(installDir);
}
catch (_) {
// Gracefully ignore any failures. This'll make few leftover files but it shouldn't block installation.
}
}
});
validateBinary().catch((error) => {
// for now just throw the error as-is.
throw error;
});

View File

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

View File

@@ -0,0 +1,353 @@
'use strict'
const DEFAULT_RAW = {
after: '\n',
beforeClose: '\n',
beforeComment: '\n',
beforeDecl: '\n',
beforeOpen: ' ',
beforeRule: '\n',
colon: ': ',
commentLeft: ' ',
commentRight: ' ',
emptyBody: '',
indent: ' ',
semicolon: false
}
function capitalize(str) {
return str[0].toUpperCase() + str.slice(1)
}
class Stringifier {
constructor(builder) {
this.builder = builder
}
atrule(node, semicolon) {
let name = '@' + node.name
let params = node.params ? this.rawValue(node, 'params') : ''
if (typeof node.raws.afterName !== 'undefined') {
name += node.raws.afterName
} else if (params) {
name += ' '
}
if (node.nodes) {
this.block(node, name + params)
} else {
let end = (node.raws.between || '') + (semicolon ? ';' : '')
this.builder(name + params + end, node)
}
}
beforeAfter(node, detect) {
let value
if (node.type === 'decl') {
value = this.raw(node, null, 'beforeDecl')
} else if (node.type === 'comment') {
value = this.raw(node, null, 'beforeComment')
} else if (detect === 'before') {
value = this.raw(node, null, 'beforeRule')
} else {
value = this.raw(node, null, 'beforeClose')
}
let buf = node.parent
let depth = 0
while (buf && buf.type !== 'root') {
depth += 1
buf = buf.parent
}
if (value.includes('\n')) {
let indent = this.raw(node, null, 'indent')
if (indent.length) {
for (let step = 0; step < depth; step++) value += indent
}
}
return value
}
block(node, start) {
let between = this.raw(node, 'between', 'beforeOpen')
this.builder(start + between + '{', node, 'start')
let after
if (node.nodes && node.nodes.length) {
this.body(node)
after = this.raw(node, 'after')
} else {
after = this.raw(node, 'after', 'emptyBody')
}
if (after) this.builder(after)
this.builder('}', node, 'end')
}
body(node) {
let last = node.nodes.length - 1
while (last > 0) {
if (node.nodes[last].type !== 'comment') break
last -= 1
}
let semicolon = this.raw(node, 'semicolon')
for (let i = 0; i < node.nodes.length; i++) {
let child = node.nodes[i]
let before = this.raw(child, 'before')
if (before) this.builder(before)
this.stringify(child, last !== i || semicolon)
}
}
comment(node) {
let left = this.raw(node, 'left', 'commentLeft')
let right = this.raw(node, 'right', 'commentRight')
this.builder('/*' + left + node.text + right + '*/', node)
}
decl(node, semicolon) {
let between = this.raw(node, 'between', 'colon')
let string = node.prop + between + this.rawValue(node, 'value')
if (node.important) {
string += node.raws.important || ' !important'
}
if (semicolon) string += ';'
this.builder(string, node)
}
document(node) {
this.body(node)
}
raw(node, own, detect) {
let value
if (!detect) detect = own
// Already had
if (own) {
value = node.raws[own]
if (typeof value !== 'undefined') return value
}
let parent = node.parent
if (detect === 'before') {
// Hack for first rule in CSS
if (!parent || (parent.type === 'root' && parent.first === node)) {
return ''
}
// `root` nodes in `document` should use only their own raws
if (parent && parent.type === 'document') {
return ''
}
}
// Floating child without parent
if (!parent) return DEFAULT_RAW[detect]
// Detect style by other nodes
let root = node.root()
if (!root.rawCache) root.rawCache = {}
if (typeof root.rawCache[detect] !== 'undefined') {
return root.rawCache[detect]
}
if (detect === 'before' || detect === 'after') {
return this.beforeAfter(node, detect)
} else {
let method = 'raw' + capitalize(detect)
if (this[method]) {
value = this[method](root, node)
} else {
root.walk(i => {
value = i.raws[own]
if (typeof value !== 'undefined') return false
})
}
}
if (typeof value === 'undefined') value = DEFAULT_RAW[detect]
root.rawCache[detect] = value
return value
}
rawBeforeClose(root) {
let value
root.walk(i => {
if (i.nodes && i.nodes.length > 0) {
if (typeof i.raws.after !== 'undefined') {
value = i.raws.after
if (value.includes('\n')) {
value = value.replace(/[^\n]+$/, '')
}
return false
}
}
})
if (value) value = value.replace(/\S/g, '')
return value
}
rawBeforeComment(root, node) {
let value
root.walkComments(i => {
if (typeof i.raws.before !== 'undefined') {
value = i.raws.before
if (value.includes('\n')) {
value = value.replace(/[^\n]+$/, '')
}
return false
}
})
if (typeof value === 'undefined') {
value = this.raw(node, null, 'beforeDecl')
} else if (value) {
value = value.replace(/\S/g, '')
}
return value
}
rawBeforeDecl(root, node) {
let value
root.walkDecls(i => {
if (typeof i.raws.before !== 'undefined') {
value = i.raws.before
if (value.includes('\n')) {
value = value.replace(/[^\n]+$/, '')
}
return false
}
})
if (typeof value === 'undefined') {
value = this.raw(node, null, 'beforeRule')
} else if (value) {
value = value.replace(/\S/g, '')
}
return value
}
rawBeforeOpen(root) {
let value
root.walk(i => {
if (i.type !== 'decl') {
value = i.raws.between
if (typeof value !== 'undefined') return false
}
})
return value
}
rawBeforeRule(root) {
let value
root.walk(i => {
if (i.nodes && (i.parent !== root || root.first !== i)) {
if (typeof i.raws.before !== 'undefined') {
value = i.raws.before
if (value.includes('\n')) {
value = value.replace(/[^\n]+$/, '')
}
return false
}
}
})
if (value) value = value.replace(/\S/g, '')
return value
}
rawColon(root) {
let value
root.walkDecls(i => {
if (typeof i.raws.between !== 'undefined') {
value = i.raws.between.replace(/[^\s:]/g, '')
return false
}
})
return value
}
rawEmptyBody(root) {
let value
root.walk(i => {
if (i.nodes && i.nodes.length === 0) {
value = i.raws.after
if (typeof value !== 'undefined') return false
}
})
return value
}
rawIndent(root) {
if (root.raws.indent) return root.raws.indent
let value
root.walk(i => {
let p = i.parent
if (p && p !== root && p.parent && p.parent === root) {
if (typeof i.raws.before !== 'undefined') {
let parts = i.raws.before.split('\n')
value = parts[parts.length - 1]
value = value.replace(/\S/g, '')
return false
}
}
})
return value
}
rawSemicolon(root) {
let value
root.walk(i => {
if (i.nodes && i.nodes.length && i.last.type === 'decl') {
value = i.raws.semicolon
if (typeof value !== 'undefined') return false
}
})
return value
}
rawValue(node, prop) {
let value = node[prop]
let raw = node.raws[prop]
if (raw && raw.value === value) {
return raw.raw
}
return value
}
root(node) {
this.body(node)
if (node.raws.after) this.builder(node.raws.after)
}
rule(node) {
this.block(node, this.rawValue(node, 'selector'))
if (node.raws.ownSemicolon) {
this.builder(node.raws.ownSemicolon, node, 'end')
}
}
stringify(node, semicolon) {
/* c8 ignore start */
if (!this[node.type]) {
throw new Error(
'Unknown AST node type ' +
node.type +
'. ' +
'Maybe you need to change PostCSS stringifier.'
)
}
/* c8 ignore stop */
this[node.type](node, semicolon)
}
}
module.exports = Stringifier
Stringifier.default = Stringifier

View File

@@ -0,0 +1,5 @@
/**
* Setup the OTEL logger to use our own debug logger.
*/
export declare function setupOpenTelemetryLogger(): void;
//# sourceMappingURL=logger.d.ts.map

View File

@@ -0,0 +1,23 @@
import { TransformOptions } from 'esbuild';
declare type LOADERS = 'js' | 'jsx' | 'ts' | 'tsx';
declare const FILE_LOADERS: Record<string, LOADERS>;
declare type EXTENSIONS = keyof typeof FILE_LOADERS;
interface RegisterOptions extends TransformOptions {
extensions?: EXTENSIONS[];
/**
* Auto-ignore node_modules. Independent of any matcher.
* @default true
*/
hookIgnoreNodeModules?: boolean;
/**
* A matcher function, will be called with path to a file. Should return truthy if the file should be hooked, falsy otherwise.
*/
hookMatcher?(fileName: string): boolean;
}
declare function register(esbuildOptions?: RegisterOptions): {
unregister(): void;
};
declare type Register = ReturnType<typeof register>;
export { Register, register };

View File

@@ -0,0 +1,5 @@
const ViewBaseConfig = Symbol.for("drizzle:ViewBaseConfig");
export {
ViewBaseConfig
};
//# sourceMappingURL=view-common.js.map

View File

@@ -0,0 +1,9 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
"use strict";var e=require("@lexical/react/LexicalComposerContext"),r=require("@lexical/table"),l=require("react");exports.TablePlugin=function({hasCellMerge:t=!0,hasCellBackgroundColor:a=!0,hasTabHandler:o=!0,hasHorizontalScroll:s=!1}){const[c]=e.useLexicalComposerContext();return l.useEffect((()=>{r.$isScrollableTablesActive(c)!==s&&(r.setScrollableTablesActive(c,s),c.registerNodeTransform(r.TableNode,(()=>{}))())}),[c,s]),l.useEffect((()=>r.registerTablePlugin(c)),[c]),l.useEffect((()=>r.registerTableSelectionObserver(c,o)),[c,o]),l.useEffect((()=>{if(!t)return r.registerTableCellUnmergeTransform(c)}),[c,t]),l.useEffect((()=>{if(!a)return c.registerNodeTransform(r.TableCellNode,(e=>{null!==e.getBackgroundColor()&&e.setBackgroundColor(null)}))}),[c,a,t]),null};

View File

@@ -0,0 +1,33 @@
import { Span, StartSpanOptions } from '@sentry/core';
/**
* Next.js-specific implementation of `startSpan` that skips span creation
* in Cache Components contexts (which render at build time).
*
* When in a Cache Components context, we execute the callback with a non-recording span
* and return early without creating an actual span, since spans don't make sense at build/cache time.
*
* @param options - Options for starting the span
* @param callback - Callback function that receives the span
* @returns The return value of the callback
*/
export declare function startSpan<T>(options: StartSpanOptions, callback: (span: Span) => T): T;
/**
*
* When in a Cache Components context, we execute the callback with a non-recording span
* and return early without creating an actual span, since spans don't make sense at build/cache time.
*
* @param options - Options for starting the span
* @param callback - Callback function that receives the span and finish function
* @returns The return value of the callback
*/
export declare function startSpanManual<T>(options: StartSpanOptions, callback: (span: Span, finish: () => void) => T): T;
/**
*
* When in a Cache Components context, we return a non-recording span and return early
* without creating an actual span, since spans don't make sense at build/cache time.
*
* @param options - Options for starting the span
* @returns A non-recording span (in Cache Components context) or the created span
*/
export declare function startInactiveSpan(options: StartSpanOptions): Span;
//# sourceMappingURL=nextSpan.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"umbrella.js","sources":["../../../src/icons/umbrella.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Umbrella\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjIgMTJhMTAuMDYgMTAuMDYgMSAwIDAtMjAgMFoiIC8+CiAgPHBhdGggZD0iTTEyIDEydjhhMiAyIDAgMCAwIDQgMCIgLz4KICA8cGF0aCBkPSJNMTIgMnYxIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/umbrella\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 Umbrella = createLucideIcon('Umbrella', [\n ['path', { d: 'M22 12a10.06 10.06 1 0 0-20 0Z', key: '1teyop' }],\n ['path', { d: 'M12 12v8a2 2 0 0 0 4 0', key: 'ulpmoc' }],\n ['path', { d: 'M12 2v1', key: '11qlp1' }],\n]);\n\nexport default Umbrella;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAAA,CAC5C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC/D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA0B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACvD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC1C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,26 @@
# node-trace-event changelog
## 1.3.1 (not yet released)
(nothing yet)
## 1.3.0
- Add `.child(<fields>)` option to `trace_event.createBunyanTracer()` object.
## 1.2.0
- Add `trace_event.createBunyanLogger()` usage for some sugar. See the
README.md for details.
## 1.1.0
- Rename to 'trace-event', which is a much more accurate name.
## 1.0.0
First release.

View File

@@ -0,0 +1,23 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const BadgePlus = createLucideIcon("BadgePlus", [
[
"path",
{
d: "M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",
key: "3c2336"
}
],
["line", { x1: "12", x2: "12", y1: "8", y2: "16", key: "10p56q" }],
["line", { x1: "8", x2: "16", y1: "12", y2: "12", key: "1jonct" }]
]);
export { BadgePlus as default };
//# sourceMappingURL=badge-plus.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"getRequestTheme.d.ts","sourceRoot":"","sources":["../../src/utilities/getRequestTheme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iEAAiE,CAAA;AAC7G,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9C,OAAO,EAAgB,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAEzD,KAAK,sBAAsB,GAAG;IAC5B,MAAM,EAAE,eAAe,CAAA;IACvB,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,sBAAsB,CAAA;IACrD,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,CAAA;CAC5B,CAAA;AAID,eAAO,MAAM,eAAe,iCAAkC,sBAAsB,KAAG,KAsBtF,CAAA"}

View File

@@ -0,0 +1,16 @@
import { context } from '@opentelemetry/api';
import { getScopesFromContext } from '@sentry/opentelemetry';
/**
* Update the active isolation scope.
* Should be used with caution!
*/
function setIsolationScope(isolationScope) {
const scopes = getScopesFromContext(context.active());
if (scopes) {
scopes.isolationScope = isolationScope;
}
}
export { setIsolationScope };
//# sourceMappingURL=scope.js.map

View File

@@ -0,0 +1,4 @@
import { ASTNode, GraphQLScalarType } from 'graphql';
export declare const LOCAL_TIME_FORMAT: RegExp;
export declare function validateLocalTime(value: any, ast?: ASTNode): string;
export declare const GraphQLLocalTime: GraphQLScalarType<string, string>;

View File

@@ -0,0 +1,2 @@
const e=e=>()=>({method:`POST`,path:`/schema/apply`,body:JSON.stringify(e)});exports.schemaApply=e;
//# sourceMappingURL=apply.cjs.map

View File

@@ -0,0 +1,52 @@
import type { ContextOptions, DateArg, RoundingOptions } from "./types.js";
/**
* The {@link differenceInWeeks} function options.
*/
export interface DifferenceInWeeksOptions
extends RoundingOptions,
ContextOptions<Date> {}
/**
* @name differenceInWeeks
* @category Week Helpers
* @summary Get the number of full weeks between the given dates.
*
* @description
* Get the number of full weeks between two dates. Fractional weeks are
* truncated towards zero by default.
*
* One "full week" is the distance between a local time in one day to the same
* local time 7 days earlier or later. A full week can sometimes be less than
* or more than 7*24 hours if a daylight savings change happens between two dates.
*
* To ignore DST and only measure exact 7*24-hour periods, use this instead:
* `Math.trunc(differenceInHours(dateLeft, dateRight)/(7*24))|0`.
*
* @param laterDate - The later date
* @param earlierDate - The earlier date
* @param options - An object with options
*
* @returns The number of full weeks
*
* @example
* // How many full weeks are between 5 July 2014 and 20 July 2014?
* const result = differenceInWeeks(new Date(2014, 6, 20), new Date(2014, 6, 5))
* //=> 2
*
* @example
* // How many full weeks are between
* // 1 March 2020 0:00 and 6 June 2020 0:00 ?
* // Note: because local time is used, the
* // result will always be 8 weeks (54 days),
* // even if DST starts and the period has
* // only 54*24-1 hours.
* const result = differenceInWeeks(
* new Date(2020, 5, 1),
* new Date(2020, 2, 6)
* )
* //=> 8
*/
export declare function differenceInWeeks(
laterDate: DateArg<Date> & {},
earlierDate: DateArg<Date> & {},
options?: DifferenceInWeeksOptions | undefined,
): number;

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B zC"},B:{"1":"0 1 2 3 4 5 6 7 8 M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I","2":"C L"},C:{"1":"0 1 2 3 4 5 6 7 8 xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC 1C 2C 3C","2":"9 0C VC J bB K D E F A B C L M G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB 4C 5C"},D:{"1":"0 1 2 3 4 5 6 7 8 dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC","2":"9 J bB K D E F A B C L M G N O P cB AB BB CB DB EB FB GB HB IB"},E:{"1":"C L M G PC QC BD CD DD dC eC RC ED SC fC gC hC iC jC FD TC kC lC mC nC oC GD UC pC qC rC sC HD tC uC vC wC ID","2":"J bB K D E F A B 6C bC 7C 8C 9C AD cC"},F:{"1":"0 1 2 3 4 5 6 7 8 9 O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"F B C G N JD KD LD MD PC xC ND QC"},G:{"1":"sC lD tC uC vC wC","2":"E bC OD yC PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD eD fD gD hD dC eC RC iD SC fC gC hC iC jC jD TC kC lC mC nC oC kD UC pC qC rC"},H:{"2":"mD"},I:{"1":"I","2":"VC J nD oD pD qD yC rD sD"},J:{"2":"D A"},K:{"2":"A B C H PC xC QC"},L:{"1":"I"},M:{"1":"OC"},N:{"2":"A B"},O:{"2":"RC"},P:{"2":"9 J AB BB CB DB EB FB GB HB IB tD uD vD wD xD cC yD zD 0D 1D 2D SC TC UC 3D"},Q:{"1":"4D"},R:{"2":"5D"},S:{"2":"6D 7D"}},B:7,C:"Directory selection from file input",D:true};

View File

@@ -0,0 +1,13 @@
import type { Locale } from "./types.js";
/**
* @category Locales
* @summary Japanese locale.
* @language Japanese
* @iso-639-2 jpn
* @author Thomas Eilmsteiner [@DeMuu](https://github.com/DeMuu)
* @author Yamagishi Kazutoshi [@ykzts](https://github.com/ykzts)
* @author Luca Ban [@mesqueeb](https://github.com/mesqueeb)
* @author Terrence Lam [@skyuplam](https://github.com/skyuplam)
* @author Taiki IKeda [@so99ynoodles](https://github.com/so99ynoodles)
*/
export declare const ja: Locale;

View File

@@ -0,0 +1,30 @@
import { DataCategory } from '../types-hoist/datacategory';
import { TransportMakeRequestResponse } from '../types-hoist/transport';
export type RateLimits = Record<string, number>;
export declare const DEFAULT_RETRY_AFTER: number;
/**
* Extracts Retry-After value from the request header or returns default value
* @param header string representation of 'Retry-After' header
* @param now current unix timestamp
*
*/
export declare function parseRetryAfterHeader(header: string, now?: number): number;
/**
* Gets the time that the given category is disabled until for rate limiting.
* In case no category-specific limit is set but a general rate limit across all categories is active,
* that time is returned.
*
* @return the time in ms that the category is disabled until or 0 if there's no active rate limit.
*/
export declare function disabledUntil(limits: RateLimits, dataCategory: DataCategory): number;
/**
* Checks if a category is rate limited
*/
export declare function isRateLimited(limits: RateLimits, dataCategory: DataCategory, now?: number): boolean;
/**
* Update ratelimits from incoming headers.
*
* @return the updated RateLimits object.
*/
export declare function updateRateLimits(limits: RateLimits, { statusCode, headers }: TransportMakeRequestResponse, now?: number): RateLimits;
//# sourceMappingURL=ratelimit.d.ts.map

View File

@@ -0,0 +1,8 @@
import type { RouteHandlerContext } from './types';
/**
* Wraps a Next.js App Router Route handler with Sentry error and performance instrumentation.
*
* NOTICE: This wrapper is for App Router API routes. If you are looking to wrap Pages Router API routes use `wrapApiHandlerWithSentry` instead.
*/
export declare function wrapRouteHandlerWithSentry<F extends (...args: any[]) => any>(routeHandler: F, context: RouteHandlerContext): (...args: Parameters<F>) => ReturnType<F> extends Promise<unknown> ? ReturnType<F> : Promise<ReturnType<F>>;
//# sourceMappingURL=wrapRouteHandlerWithSentry.d.ts.map

View File

@@ -0,0 +1 @@
!function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(Prism);

View File

@@ -0,0 +1 @@
module.exports = require('@emotion/babel-plugin').macros.core

View File

@@ -0,0 +1,68 @@
import Container, { ContainerProps } from './container.js'
import { ProcessOptions } from './postcss.js'
import Result from './result.js'
import Root from './root.js'
declare namespace Document {
export interface DocumentProps extends ContainerProps {
nodes?: Root[]
/**
* Information to generate byte-to-byte equal node string as it was
* in the origin input.
*
* Every parser saves its own properties.
*/
raws?: Record<string, any>
}
// eslint-disable-next-line @typescript-eslint/no-use-before-define
export { Document_ as default }
}
/**
* Represents a file and contains all its parsed nodes.
*
* **Experimental:** some aspects of this node could change within minor
* or patch version releases.
*
* ```js
* const document = htmlParser(
* '<html><style>a{color:black}</style><style>b{z-index:2}</style>'
* )
* document.type //=> 'document'
* document.nodes.length //=> 2
* ```
*/
declare class Document_ extends Container<Root> {
parent: undefined
type: 'document'
constructor(defaults?: Document.DocumentProps)
assign(overrides: Document.DocumentProps | object): this
clone(overrides?: Partial<Document.DocumentProps>): Document
cloneAfter(overrides?: Partial<Document.DocumentProps>): Document
cloneBefore(overrides?: Partial<Document.DocumentProps>): Document
/**
* Returns a `Result` instance representing the documents CSS roots.
*
* ```js
* const root1 = postcss.parse(css1, { from: 'a.css' })
* const root2 = postcss.parse(css2, { from: 'b.css' })
* const document = postcss.document()
* document.append(root1)
* document.append(root2)
* const result = document.toResult({ to: 'all.css', map: true })
* ```
*
* @param opts Options.
* @return Result with current documents CSS.
*/
toResult(options?: ProcessOptions): Result
}
declare class Document extends Document_ {}
export = Document

View File

@@ -0,0 +1,8 @@
import useConfig from './useConfig.js';
function useLocale() {
const config = useConfig('useLocale');
return config.locale;
}
export { useLocale as default };

View File

@@ -0,0 +1,58 @@
import { posix, sep } from 'node:path';
import { dirname } from '@sentry/core';
/** normalizes Windows paths */
function normalizeWindowsPath(path) {
return path
.replace(/^[A-Z]:/, '') // remove Windows-style prefix
.replace(/\\/g, '/'); // replace all `\` instances with `/`
}
/** Creates a function that gets the module name from a filename */
function createGetModuleFromFilename(
basePath = process.argv[1] ? dirname(process.argv[1]) : process.cwd(),
isWindows = sep === '\\',
) {
const normalizedBase = isWindows ? normalizeWindowsPath(basePath) : basePath;
return (filename) => {
if (!filename) {
return;
}
const normalizedFilename = isWindows ? normalizeWindowsPath(filename) : filename;
// eslint-disable-next-line prefer-const
let { dir, base: file, ext } = posix.parse(normalizedFilename);
if (ext === '.js' || ext === '.mjs' || ext === '.cjs') {
file = file.slice(0, ext.length * -1);
}
// The file name might be URI-encoded which we want to decode to
// the original file name.
const decodedFile = decodeURIComponent(file);
if (!dir) {
// No dirname whatsoever
dir = '.';
}
const n = dir.lastIndexOf('/node_modules');
if (n > -1) {
return `${dir.slice(n + 14).replace(/\//g, '.')}:${decodedFile}`;
}
// Let's see if it's a part of the main module
// To be a part of main module, it has to share the same base
if (dir.startsWith(normalizedBase)) {
const moduleName = dir.slice(normalizedBase.length + 1).replace(/\//g, '.');
return moduleName ? `${moduleName}:${decodedFile}` : decodedFile;
}
return decodedFile;
};
}
export { createGetModuleFromFilename };
//# sourceMappingURL=module.js.map

View File

@@ -0,0 +1,138 @@
"use strict";
exports.match = void 0;
var _index = require("../../_lib/buildMatchFn.js");
var _index2 = require("../../_lib/buildMatchPatternFn.js");
const matchOrdinalNumberPattern = /^(\d+)((-|֊)?(ին|րդ))?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(Ք|Մ)/i,
abbreviated: /^(Ք\.?\s?Ա\.?|Մ\.?\s?Թ\.?\s?Ա\.?|Մ\.?\s?Թ\.?|Ք\.?\s?Հ\.?)/i,
wide: /^(քրիստոսից առաջ|մեր թվարկությունից առաջ|մեր թվարկության|քրիստոսից հետո)/i,
};
const parseEraPatterns = {
any: [/^ք/i, /^մ/i],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^ք[1234]/i,
wide: /^[1234]((-|֊)?(ին|րդ)) քառորդ/i,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
narrow: /^[հփմաօսնդ]/i,
abbreviated: /^(հուն|փետ|մար|ապր|մայ|հուն|հուլ|օգս|սեպ|հոկ|նոյ|դեկ)/i,
wide: /^(հունվար|փետրվար|մարտ|ապրիլ|մայիս|հունիս|հուլիս|օգոստոս|սեպտեմբեր|հոկտեմբեր|նոյեմբեր|դեկտեմբեր)/i,
};
const parseMonthPatterns = {
narrow: [
/^հ/i,
/^փ/i,
/^մ/i,
/^ա/i,
/^մ/i,
/^հ/i,
/^հ/i,
/^օ/i,
/^ս/i,
/^հ/i,
/^ն/i,
/^դ/i,
],
any: [
/^հու/i,
/^փ/i,
/^մար/i,
/^ա/i,
/^մայ/i,
/^հուն/i,
/^հուլ/i,
/^օ/i,
/^ս/i,
/^հոկ/i,
/^ն/i,
/^դ/i,
],
};
const matchDayPatterns = {
narrow: /^[եչհոշկ]/i,
short: /^(կր|եր|եք|չք|հգ|ուր|շբ)/i,
abbreviated: /^(կիր|երկ|երք|չոր|հնգ|ուրբ|շաբ)/i,
wide: /^(կիրակի|երկուշաբթի|երեքշաբթի|չորեքշաբթի|հինգշաբթի|ուրբաթ|շաբաթ)/i,
};
const parseDayPatterns = {
narrow: [/^կ/i, /^ե/i, /^ե/i, /^չ/i, /^հ/i, /^(ո|Ո)/, /^շ/i],
short: [/^կ/i, /^եր/i, /^եք/i, /^չ/i, /^հ/i, /^(ո|Ո)/, /^շ/i],
abbreviated: [/^կ/i, /^երկ/i, /^երք/i, /^չ/i, /^հ/i, /^(ո|Ո)/, /^շ/i],
wide: [/^կ/i, /^երկ/i, /^երե/i, /^չ/i, /^հ/i, /^(ո|Ո)/, /^շ/i],
};
const matchDayPeriodPatterns = {
narrow: /^([ap]|կեսգշ|կեսօր|(առավոտը?|ցերեկը?|երեկո(յան)?|գիշերը?))/i,
any: /^([ap]\.?\s?m\.?|կեսգիշեր(ին)?|կեսօր(ին)?|(առավոտը?|ցերեկը?|երեկո(յան)?|գիշերը?))/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^a/i,
pm: /^p/i,
midnight: /կեսգիշեր/i,
noon: /կեսօր/i,
morning: /առավոտ/i,
afternoon: /ցերեկ/i,
evening: /երեկո/i,
night: /գիշեր/i,
},
};
const match = (exports.match = {
ordinalNumber: (0, _index2.buildMatchPatternFn)({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value, 10),
}),
era: (0, _index.buildMatchFn)({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: (0, _index.buildMatchFn)({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => index + 1,
}),
month: (0, _index.buildMatchFn)({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any",
}),
day: (0, _index.buildMatchFn)({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "wide",
}),
dayPeriod: (0, _index.buildMatchFn)({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
});

View File

@@ -0,0 +1,72 @@
"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 vector_exports = {};
__export(vector_exports, {
SingleStoreVector: () => SingleStoreVector,
SingleStoreVectorBuilder: () => SingleStoreVectorBuilder,
vector: () => vector
});
module.exports = __toCommonJS(vector_exports);
var import_entity = require("../../entity.cjs");
var import_utils = require("../../utils.cjs");
var import_common = require("./common.cjs");
class SingleStoreVectorBuilder extends import_common.SingleStoreColumnBuilder {
static [import_entity.entityKind] = "SingleStoreVectorBuilder";
constructor(name, config) {
super(name, "array", "SingleStoreVector");
this.config.dimensions = config.dimensions;
this.config.elementType = config.elementType;
}
/** @internal */
build(table) {
return new SingleStoreVector(
table,
this.config
);
}
/** @internal */
generatedAlwaysAs(as, config) {
throw new Error("not implemented");
}
}
class SingleStoreVector extends import_common.SingleStoreColumn {
static [import_entity.entityKind] = "SingleStoreVector";
dimensions = this.config.dimensions;
elementType = this.config.elementType;
getSQLType() {
return `vector(${this.dimensions}, ${this.elementType || "F32"})`;
}
mapToDriverValue(value) {
return JSON.stringify(value);
}
mapFromDriverValue(value) {
return JSON.parse(value);
}
}
function vector(a, b) {
const { name, config } = (0, import_utils.getColumnNameAndConfig)(a, b);
return new SingleStoreVectorBuilder(name, config);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
SingleStoreVector,
SingleStoreVectorBuilder,
vector
});
//# sourceMappingURL=vector.cjs.map

View File

@@ -0,0 +1,18 @@
import { constructFrom } from "../../../constructFrom.js";
import { Parser } from "../Parser.js";
import { parseAnyDigitsSigned } from "../utils.js";
export class TimestampSecondsParser extends Parser {
priority = 40;
parse(dateString) {
return parseAnyDigitsSigned(dateString);
}
set(date, _flags, value) {
return [constructFrom(date, value * 1000), { timestampIsSet: true }];
}
incompatibleTokens = "*";
}

View File

@@ -0,0 +1,30 @@
import * as core from "../core/index.cjs";
import { $ZodError } from "../core/index.cjs";
/** @deprecated Use `z.core.$ZodIssue` from `@zod/core` instead, especially if you are building a library on top of Zod. */
export type ZodIssue = core.$ZodIssue;
/** An Error-like class used to store Zod validation issues. */
export interface ZodError<T = unknown> extends $ZodError<T> {
/** @deprecated Use the `z.treeifyError(err)` function instead. */
format(): core.$ZodFormattedError<T>;
format<U>(mapper: (issue: core.$ZodIssue) => U): core.$ZodFormattedError<T, U>;
/** @deprecated Use the `z.treeifyError(err)` function instead. */
flatten(): core.$ZodFlattenedError<T>;
flatten<U>(mapper: (issue: core.$ZodIssue) => U): core.$ZodFlattenedError<T, U>;
/** @deprecated Push directly to `.issues` instead. */
addIssue(issue: core.$ZodIssue): void;
/** @deprecated Push directly to `.issues` instead. */
addIssues(issues: core.$ZodIssue[]): void;
/** @deprecated Check `err.issues.length === 0` instead. */
isEmpty: boolean;
}
export declare const ZodError: core.$constructor<ZodError>;
export declare const ZodRealError: core.$constructor<ZodError>;
export type {
/** @deprecated Use `z.core.$ZodFlattenedError` instead. */
$ZodFlattenedError as ZodFlattenedError,
/** @deprecated Use `z.core.$ZodFormattedError` instead. */
$ZodFormattedError as ZodFormattedError,
/** @deprecated Use `z.core.$ZodErrorMap` instead. */
$ZodErrorMap as ZodErrorMap, } from "../core/index.cjs";
/** @deprecated Use `z.core.$ZodRawIssue` instead. */
export type IssueData = core.$ZodRawIssue;

View File

@@ -0,0 +1,50 @@
import { startOfSecond } from "./startOfSecond.mjs";
/**
* @name isSameSecond
* @category Second Helpers
* @summary Are the given dates in the same second (and hour and day)?
*
* @description
* Are the given dates in the same second (and hour and day)?
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param dateLeft - The first date to check
* @param dateRight - The second date to check
*
* @returns The dates are in the same second (and hour and day)
*
* @example
* // Are 4 September 2014 06:30:15.000 and 4 September 2014 06:30.15.500 in the same second?
* const result = isSameSecond(
* new Date(2014, 8, 4, 6, 30, 15),
* new Date(2014, 8, 4, 6, 30, 15, 500)
* )
* //=> true
*
* @example
* // Are 4 September 2014 06:00:15.000 and 4 September 2014 06:01.15.000 in the same second?
* const result = isSameSecond(
* new Date(2014, 8, 4, 6, 0, 15),
* new Date(2014, 8, 4, 6, 1, 15)
* )
* //=> false
*
* @example
* // Are 4 September 2014 06:00:15.000 and 5 September 2014 06:00.15.000 in the same second?
* const result = isSameSecond(
* new Date(2014, 8, 4, 6, 0, 15),
* new Date(2014, 8, 5, 6, 0, 15)
* )
* //=> false
*/
export function isSameSecond(dateLeft, dateRight) {
const dateLeftStartOfSecond = startOfSecond(dateLeft);
const dateRightStartOfSecond = startOfSecond(dateRight);
return +dateLeftStartOfSecond === +dateRightStartOfSecond;
}
// Fallback for modularized imports:
export default isSameSecond;

View File

@@ -0,0 +1,25 @@
import { daysInWeek } from "./constants.js";
/**
* @name weeksToDays
* @category Conversion Helpers
* @summary Convert weeks to days.
*
* @description
* Convert a number of weeks to a full number of days.
*
* @param weeks - The number of weeks to be converted
*
* @returns The number of weeks converted in days
*
* @example
* // Convert 2 weeks into days
* const result = weeksToDays(2)
* //=> 14
*/
export function weeksToDays(weeks) {
return Math.trunc(weeks * daysInWeek);
}
// Fallback for modularized imports:
export default weeksToDays;

View File

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

View File

@@ -0,0 +1,137 @@
"use strict";
exports.match = void 0;
var _index = require("../../_lib/buildMatchFn.js");
var _index2 = require("../../_lib/buildMatchPatternFn.js");
const matchOrdinalNumberPattern = /^(\d+)\.?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(p[řr](\.|ed) Kr\.|p[řr](\.|ed) n\. l\.|po Kr\.|n\. l\.)/i,
abbreviated: /^(p[řr](\.|ed) Kr\.|p[řr](\.|ed) n\. l\.|po Kr\.|n\. l\.)/i,
wide: /^(p[řr](\.|ed) Kristem|p[řr](\.|ed) na[šs][íi]m letopo[čc]tem|po Kristu|na[šs]eho letopo[čc]tu)/i,
};
const parseEraPatterns = {
any: [/^p[řr]/i, /^(po|n)/i],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^[1234]\. [čc]tvrtlet[íi]/i,
wide: /^[1234]\. [čc]tvrtlet[íi]/i,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
narrow: /^[lúubdkčcszřrlp]/i,
abbreviated:
/^(led|[úu]no|b[řr]e|dub|kv[ěe]|[čc]vn|[čc]vc|srp|z[áa][řr]|[řr][íi]j|lis|pro)/i,
wide: /^(leden|ledna|[úu]nora?|b[řr]ezen|b[řr]ezna|duben|dubna|kv[ěe]ten|kv[ěe]tna|[čc]erven(ec|ce)?|[čc]ervna|srpen|srpna|z[áa][řr][íi]|[řr][íi]jen|[řr][íi]jna|listopad(a|u)?|prosinec|prosince)/i,
};
const parseMonthPatterns = {
narrow: [
/^l/i,
/^[úu]/i,
/^b/i,
/^d/i,
/^k/i,
/^[čc]/i,
/^[čc]/i,
/^s/i,
/^z/i,
/^[řr]/i,
/^l/i,
/^p/i,
],
any: [
/^led/i,
/^[úu]n/i,
/^b[řr]e/i,
/^dub/i,
/^kv[ěe]/i,
/^[čc]vn|[čc]erven(?!\w)|[čc]ervna/i,
/^[čc]vc|[čc]erven(ec|ce)/i,
/^srp/i,
/^z[áa][řr]/i,
/^[řr][íi]j/i,
/^lis/i,
/^pro/i,
],
};
const matchDayPatterns = {
narrow: /^[npuúsčps]/i,
short: /^(ne|po|[úu]t|st|[čc]t|p[áa]|so)/i,
abbreviated: /^(ned|pon|[úu]te|st[rř]|[čc]tv|p[áa]t|sob)/i,
wide: /^(ned[ěe]le|pond[ěe]l[íi]|[úu]ter[ýy]|st[řr]eda|[čc]tvrtek|p[áa]tek|sobota)/i,
};
const parseDayPatterns = {
narrow: [/^n/i, /^p/i, /^[úu]/i, /^s/i, /^[čc]/i, /^p/i, /^s/i],
any: [/^ne/i, /^po/i, /^[úu]t/i, /^st/i, /^[čc]t/i, /^p[áa]/i, /^so/i],
};
const matchDayPeriodPatterns = {
any: /^dopoledne|dop\.?|odpoledne|odp\.?|p[ůu]lnoc|poledne|r[áa]no|odpoledne|ve[čc]er|(v )?noci?/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^dop/i,
pm: /^odp/i,
midnight: /^p[ůu]lnoc/i,
noon: /^poledne/i,
morning: /r[áa]no/i,
afternoon: /odpoledne/i,
evening: /ve[čc]er/i,
night: /noc/i,
},
};
const match = (exports.match = {
ordinalNumber: (0, _index2.buildMatchPatternFn)({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value, 10),
}),
era: (0, _index.buildMatchFn)({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: (0, _index.buildMatchFn)({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => index + 1,
}),
month: (0, _index.buildMatchFn)({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any",
}),
day: (0, _index.buildMatchFn)({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any",
}),
dayPeriod: (0, _index.buildMatchFn)({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
});

View File

@@ -0,0 +1 @@
{"version":3,"file":"images.js","sources":["../../../src/icons/images.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Images\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTggMjJINGEyIDIgMCAwIDEtMi0yVjYiIC8+CiAgPHBhdGggZD0ibTIyIDEzLTEuMjk2LTEuMjk2YTIuNDEgMi40MSAwIDAgMC0zLjQwOCAwTDExIDE4IiAvPgogIDxjaXJjbGUgY3g9IjEyIiBjeT0iOCIgcj0iMiIgLz4KICA8cmVjdCB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHg9IjYiIHk9IjIiIHJ4PSIyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/images\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 Images = createLucideIcon('Images', [\n ['path', { d: 'M18 22H4a2 2 0 0 1-2-2V6', key: 'pblm9e' }],\n ['path', { d: 'm22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18', key: 'nf6bnh' }],\n ['circle', { cx: '12', cy: '8', r: '2', key: '1822b1' }],\n ['rect', { width: '16', height: '16', x: '6', y: '2', rx: '2', key: '12espp' }],\n]);\n\nexport default Images;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,iBAAiB,QAAU,CAAA,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAoD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACjF,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACvD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAChF,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,10 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
*/
declare export function HashtagPlugin(): React.Node;

View File

@@ -0,0 +1,107 @@
'use strict'
const test = require('node:test')
const os = require('node:os')
const diagChan = require('node:diagnostics_channel')
const { AsyncLocalStorage } = require('node:async_hooks')
const { Writable } = require('node:stream')
const tspl = require('@matteo.collina/tspl')
const pino = require('../pino')
const hostname = os.hostname()
const { pid } = process
const AS_JSON_START = 'tracing:pino_asJson:start'
const AS_JSON_END = 'tracing:pino_asJson:end'
// Skip tests if diagnostics_channel.tracingChannel is not available (Node < 18.19)
const skip = typeof diagChan.tracingChannel !== 'function'
test.beforeEach(ctx => {
ctx.pino = {
ts: 1757512800000, // 2025-09-10T10:00:00.000-05:00
now: Date.now
}
Date.now = () => ctx.pino.ts
ctx.pino.dest = new Writable({
objectMode: true,
write (data, enc, cb) {
cb()
}
})
})
test.afterEach(ctx => {
Date.now = ctx.pino.now
})
test('asJson emits events', { skip }, async (t) => {
const plan = tspl(t, { plan: 8 })
const { dest } = t.pino
const logger = pino({}, dest)
const expectedArguments = [
{},
'testing',
30,
`,"time":${t.pino.ts}`
]
let startEvent
diagChan.subscribe(AS_JSON_START, startHandler)
diagChan.subscribe(AS_JSON_END, endHandler)
logger.info('testing')
await plan
diagChan.unsubscribe(AS_JSON_START, startHandler)
diagChan.unsubscribe(AS_JSON_END, endHandler)
function startHandler (event) {
startEvent = event
plan.equal(Object.prototype.toString.call(event.instance), '[object Pino]')
plan.equal(event.instance === logger, true)
plan.deepStrictEqual(Array.from(event.arguments ?? []), expectedArguments)
}
function endHandler (event) {
plan.equal(Object.prototype.toString.call(event.instance), '[object Pino]')
plan.equal(event.instance === logger, true)
plan.deepStrictEqual(Array.from(event.arguments ?? []), expectedArguments)
plan.equal(
event.result,
`{"level":30,"time":${t.pino.ts},"pid":${pid},"hostname":"${hostname}","msg":"testing"}\n`
)
plan.equal(event.arguments === startEvent.arguments, true, 'same event object is supplied to both events')
}
})
test('asJson context is not lost', { skip }, async (t) => {
const plan = tspl(t, { plan: 2 })
const { dest } = t.pino
const logger = pino({}, dest)
const asyncLocalStorage = new AsyncLocalStorage()
const localStore = { foo: 'bar' }
diagChan.subscribe(AS_JSON_START, startHandler)
diagChan.subscribe(AS_JSON_END, endHandler)
asyncLocalStorage.run(localStore, () => {
logger.info('testing')
})
await plan
diagChan.unsubscribe(AS_JSON_START, startHandler)
diagChan.unsubscribe(AS_JSON_END, endHandler)
function startHandler () {
const store = asyncLocalStorage.getStore()
plan.equal(store === localStore, true)
}
function endHandler () {
const store = asyncLocalStorage.getStore()
plan.equal(store === localStore, true)
}
})

View File

@@ -0,0 +1,26 @@
/**
* NOTE: In order to avoid circular dependencies, if you add a function to this module and it needs to print something,
* you must either a) use `console.log` rather than the `debug` singleton, or b) put your function elsewhere.
*/
/**
* Checks whether we're in the Node.js or Browser environment
*
* @returns Answer to given question
*/
export declare function isNodeEnv(): boolean;
/**
* Helper for dynamically loading module that should work with linked dependencies.
* The problem is that we _should_ be using `require(require.resolve(moduleName, { paths: [cwd()] }))`
* However it's _not possible_ to do that with Webpack, as it has to know all the dependencies during
* build time. `require.resolve` is also not available in any other way, so we cannot create,
* a fake helper like we do with `dynamicRequire`.
*
* We always prefer to use local package, thus the value is not returned early from each `try/catch` block.
* That is to mimic the behavior of `require.resolve` exactly.
*
* @param moduleName module name to require
* @param existingModule module to use for requiring
* @returns possibly required module
*/
export declare function loadModule<T>(moduleName: string, existingModule?: any): T | undefined;
//# sourceMappingURL=node.d.ts.map

View File

@@ -0,0 +1,207 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
import { HeadingNode, $isHeadingNode } from '@lexical/rich-text';
import { $getNextRightPreorderNode } from '@lexical/utils';
import { $getRoot, $isElementNode, $getNodeByKey, TextNode } from 'lexical';
import { useState, useEffect } from 'react';
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
function toEntry(heading) {
return [heading.getKey(), heading.getTextContent(), heading.getTag()];
}
function $insertHeadingIntoTableOfContents(prevHeading, newHeading, currentTableOfContents) {
if (newHeading === null) {
return currentTableOfContents;
}
const newEntry = toEntry(newHeading);
let newTableOfContents = [];
if (prevHeading === null) {
// check if key already exists
if (currentTableOfContents.length > 0 && currentTableOfContents[0][0] === newHeading.__key) {
return currentTableOfContents;
}
newTableOfContents = [newEntry, ...currentTableOfContents];
} else {
for (let i = 0; i < currentTableOfContents.length; i++) {
const key = currentTableOfContents[i][0];
newTableOfContents.push(currentTableOfContents[i]);
if (key === prevHeading.getKey() && key !== newHeading.getKey()) {
// check if key already exists
if (i + 1 < currentTableOfContents.length && currentTableOfContents[i + 1][0] === newHeading.__key) {
return currentTableOfContents;
}
newTableOfContents.push(newEntry);
}
}
}
return newTableOfContents;
}
function $deleteHeadingFromTableOfContents(key, currentTableOfContents) {
const newTableOfContents = [];
for (const heading of currentTableOfContents) {
if (heading[0] !== key) {
newTableOfContents.push(heading);
}
}
return newTableOfContents;
}
function $updateHeadingInTableOfContents(heading, currentTableOfContents) {
const newTableOfContents = [];
for (const oldHeading of currentTableOfContents) {
if (oldHeading[0] === heading.getKey()) {
newTableOfContents.push(toEntry(heading));
} else {
newTableOfContents.push(oldHeading);
}
}
return newTableOfContents;
}
/**
* Returns the updated table of contents, placing the given `heading` before the given `prevHeading`. If `prevHeading`
* is undefined, `heading` is placed at the start of table of contents
*/
function $updateHeadingPosition(prevHeading, heading, currentTableOfContents) {
const newTableOfContents = [];
const newEntry = toEntry(heading);
if (!prevHeading) {
newTableOfContents.push(newEntry);
}
for (const oldHeading of currentTableOfContents) {
if (oldHeading[0] === heading.getKey()) {
continue;
}
newTableOfContents.push(oldHeading);
if (prevHeading && oldHeading[0] === prevHeading.getKey()) {
newTableOfContents.push(newEntry);
}
}
return newTableOfContents;
}
function $getPreviousHeading(node) {
let prevHeading = $getNextRightPreorderNode(node);
while (prevHeading !== null && !$isHeadingNode(prevHeading)) {
prevHeading = $getNextRightPreorderNode(prevHeading);
}
return prevHeading;
}
function TableOfContentsPlugin({
children
}) {
const [tableOfContents, setTableOfContents] = useState([]);
const [editor] = useLexicalComposerContext();
useEffect(() => {
// Set table of contents initial state
let currentTableOfContents = [];
editor.getEditorState().read(() => {
const updateCurrentTableOfContents = node => {
for (const child of node.getChildren()) {
if ($isHeadingNode(child)) {
currentTableOfContents.push([child.getKey(), child.getTextContent(), child.getTag()]);
} else if ($isElementNode(child)) {
updateCurrentTableOfContents(child);
}
}
};
updateCurrentTableOfContents($getRoot());
setTableOfContents(currentTableOfContents);
});
const removeRootUpdateListener = editor.registerUpdateListener(({
editorState,
dirtyElements
}) => {
editorState.read(() => {
const updateChildHeadings = node => {
for (const child of node.getChildren()) {
if ($isHeadingNode(child)) {
const prevHeading = $getPreviousHeading(child);
currentTableOfContents = $updateHeadingPosition(prevHeading, child, currentTableOfContents);
setTableOfContents(currentTableOfContents);
} else if ($isElementNode(child)) {
updateChildHeadings(child);
}
}
};
// If a node is changes, all child heading positions need to be updated
$getRoot().getChildren().forEach(node => {
if ($isElementNode(node) && dirtyElements.get(node.__key)) {
updateChildHeadings(node);
}
});
});
});
// Listen to updates to heading mutations and update state
const removeHeaderMutationListener = editor.registerMutationListener(HeadingNode, mutatedNodes => {
editor.getEditorState().read(() => {
for (const [nodeKey, mutation] of mutatedNodes) {
if (mutation === 'created') {
const newHeading = $getNodeByKey(nodeKey);
if (newHeading !== null) {
const prevHeading = $getPreviousHeading(newHeading);
currentTableOfContents = $insertHeadingIntoTableOfContents(prevHeading, newHeading, currentTableOfContents);
}
} else if (mutation === 'destroyed') {
currentTableOfContents = $deleteHeadingFromTableOfContents(nodeKey, currentTableOfContents);
} else if (mutation === 'updated') {
const newHeading = $getNodeByKey(nodeKey);
if (newHeading !== null) {
const prevHeading = $getPreviousHeading(newHeading);
currentTableOfContents = $updateHeadingPosition(prevHeading, newHeading, currentTableOfContents);
}
}
}
setTableOfContents(currentTableOfContents);
});
},
// Initialization is handled separately
{
skipInitialization: true
});
// Listen to text node mutation updates
const removeTextNodeMutationListener = editor.registerMutationListener(TextNode, mutatedNodes => {
editor.getEditorState().read(() => {
for (const [nodeKey, mutation] of mutatedNodes) {
if (mutation === 'updated') {
const currNode = $getNodeByKey(nodeKey);
if (currNode !== null) {
const parentNode = currNode.getParentOrThrow();
if ($isHeadingNode(parentNode)) {
currentTableOfContents = $updateHeadingInTableOfContents(parentNode, currentTableOfContents);
setTableOfContents(currentTableOfContents);
}
}
}
}
});
},
// Initialization is handled separately
{
skipInitialization: true
});
return () => {
removeHeaderMutationListener();
removeTextNodeMutationListener();
removeRootUpdateListener();
};
}, [editor]);
return children(tableOfContents, editor);
}
export { TableOfContentsPlugin };

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 MessageCircleHeart = createLucideIcon("MessageCircleHeart", [
["path", { d: "M7.9 20A9 9 0 1 0 4 16.1L2 22Z", key: "vv11sd" }],
[
"path",
{
d: "M15.8 9.2a2.5 2.5 0 0 0-3.5 0l-.3.4-.35-.3a2.42 2.42 0 1 0-3.2 3.6l3.6 3.5 3.6-3.5c1.2-1.2 1.1-2.7.2-3.7",
key: "43lnbm"
}
]
]);
export { MessageCircleHeart as default };
//# sourceMappingURL=message-circle-heart.js.map

View File

@@ -0,0 +1,47 @@
{
"name": "tslib",
"author": "Microsoft Corp.",
"homepage": "https://www.typescriptlang.org/",
"version": "2.8.1",
"license": "0BSD",
"description": "Runtime library for TypeScript helper functions",
"keywords": [
"TypeScript",
"Microsoft",
"compiler",
"language",
"javascript",
"tslib",
"runtime"
],
"bugs": {
"url": "https://github.com/Microsoft/TypeScript/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/Microsoft/tslib.git"
},
"main": "tslib.js",
"module": "tslib.es6.js",
"jsnext:main": "tslib.es6.js",
"typings": "tslib.d.ts",
"sideEffects": false,
"exports": {
".": {
"module": {
"types": "./modules/index.d.ts",
"default": "./tslib.es6.mjs"
},
"import": {
"node": "./modules/index.js",
"default": {
"types": "./modules/index.d.ts",
"default": "./tslib.es6.mjs"
}
},
"default": "./tslib.js"
},
"./*": "./*",
"./": "./"
}
}

View File

@@ -0,0 +1 @@
export { _ as default } from "../esm/_check_private_redeclaration.js";

View File

@@ -0,0 +1,22 @@
var getMapData = require('./_getMapData');
/**
* Sets the map `key` to `value`.
*
* @private
* @name set
* @memberOf MapCache
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the map cache instance.
*/
function mapCacheSet(key, value) {
var data = getMapData(this, key),
size = data.size;
data.set(key, value);
this.size += data.size == size ? 0 : 1;
return this;
}
module.exports = mapCacheSet;

View File

@@ -0,0 +1,47 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const instrumentationAmqplib = require('@opentelemetry/instrumentation-amqplib');
const core = require('@sentry/core');
const nodeCore = require('@sentry/node-core');
const INTEGRATION_NAME = 'Amqplib';
const config = {
consumeEndHook: (span) => {
nodeCore.addOriginToSpan(span, 'auto.amqplib.otel.consumer');
},
publishHook: (span) => {
nodeCore.addOriginToSpan(span, 'auto.amqplib.otel.publisher');
},
};
const instrumentAmqplib = nodeCore.generateInstrumentOnce(INTEGRATION_NAME, () => new instrumentationAmqplib.AmqplibInstrumentation(config));
const _amqplibIntegration = (() => {
return {
name: INTEGRATION_NAME,
setupOnce() {
instrumentAmqplib();
},
};
}) ;
/**
* Adds Sentry tracing instrumentation for the [amqplib](https://www.npmjs.com/package/amqplib) library.
*
* For more information, see the [`amqplibIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/amqplib/).
*
* @example
* ```javascript
* const Sentry = require('@sentry/node');
*
* Sentry.init({
* integrations: [Sentry.amqplibIntegration()],
* });
* ```
*/
const amqplibIntegration = core.defineIntegration(_amqplibIntegration);
exports.amqplibIntegration = amqplibIntegration;
exports.instrumentAmqplib = instrumentAmqplib;
//# sourceMappingURL=amqplib.js.map

View File

@@ -0,0 +1,80 @@
import type {
CodeKeywordDefinition,
ErrorObject,
KeywordErrorDefinition,
AnySchema,
} from "../../types"
import type {SchemaObjCxt} from "../../compile"
import type {KeywordCxt} from "../../compile/validate"
import {_, str, not, Name} from "../../compile/codegen"
import {alwaysValidSchema, checkStrictMode} from "../../compile/util"
export type IfKeywordError = ErrorObject<"if", {failingKeyword: string}, AnySchema>
const error: KeywordErrorDefinition = {
message: ({params}) => str`must match "${params.ifClause}" schema`,
params: ({params}) => _`{failingKeyword: ${params.ifClause}}`,
}
const def: CodeKeywordDefinition = {
keyword: "if",
schemaType: ["object", "boolean"],
trackErrors: true,
error,
code(cxt: KeywordCxt) {
const {gen, parentSchema, it} = cxt
if (parentSchema.then === undefined && parentSchema.else === undefined) {
checkStrictMode(it, '"if" without "then" and "else" is ignored')
}
const hasThen = hasSchema(it, "then")
const hasElse = hasSchema(it, "else")
if (!hasThen && !hasElse) return
const valid = gen.let("valid", true)
const schValid = gen.name("_valid")
validateIf()
cxt.reset()
if (hasThen && hasElse) {
const ifClause = gen.let("ifClause")
cxt.setParams({ifClause})
gen.if(schValid, validateClause("then", ifClause), validateClause("else", ifClause))
} else if (hasThen) {
gen.if(schValid, validateClause("then"))
} else {
gen.if(not(schValid), validateClause("else"))
}
cxt.pass(valid, () => cxt.error(true))
function validateIf(): void {
const schCxt = cxt.subschema(
{
keyword: "if",
compositeRule: true,
createErrors: false,
allErrors: false,
},
schValid
)
cxt.mergeEvaluated(schCxt)
}
function validateClause(keyword: string, ifClause?: Name): () => void {
return () => {
const schCxt = cxt.subschema({keyword}, schValid)
gen.assign(valid, schValid)
cxt.mergeValidEvaluated(schCxt, valid)
if (ifClause) gen.assign(ifClause, _`${keyword}`)
else cxt.setParams({ifClause: keyword})
}
}
},
}
function hasSchema(it: SchemaObjCxt, keyword: string): boolean {
const schema = it.schema[keyword]
return schema !== undefined && !alwaysValidSchema(it, schema)
}
export default def

View File

@@ -0,0 +1,76 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
'use strict';
var LexicalComposerContext = require('@lexical/react/LexicalComposerContext');
var lexical = require('lexical');
var react = require('react');
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
const CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
// This workaround is no longer necessary in React 19,
// but we currently support React >=17.x
// https://github.com/facebook/react/pull/26395
const useLayoutEffectImpl = CAN_USE_DOM ? react.useLayoutEffect : react.useEffect;
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
function ClearEditorPlugin({
onClear
}) {
const [editor] = LexicalComposerContext.useLexicalComposerContext();
useLayoutEffectImpl(() => {
return editor.registerCommand(lexical.CLEAR_EDITOR_COMMAND, payload => {
editor.update(() => {
if (onClear == null) {
const root = lexical.$getRoot();
const selection = lexical.$getSelection();
const paragraph = lexical.$createParagraphNode();
root.clear();
root.append(paragraph);
if (selection !== null) {
paragraph.select();
}
if (lexical.$isRangeSelection(selection)) {
selection.format = 0;
}
} else {
onClear();
}
});
return true;
}, lexical.COMMAND_PRIORITY_EDITOR);
}, [editor, onClear]);
return null;
}
exports.ClearEditorPlugin = ClearEditorPlugin;

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"createMissingInstrumentationContext.js","sources":["../../../src/utils/createMissingInstrumentationContext.ts"],"sourcesContent":["import type { MissingInstrumentationContext } from '@sentry/core';\nimport { isCjs } from './detection';\n\nexport const createMissingInstrumentationContext = (pkg: string): MissingInstrumentationContext => ({\n package: pkg,\n 'javascript.is_cjs': isCjs(),\n});\n"],"names":["isCjs"],"mappings":";;;;MAGa,mCAAA,GAAsC,CAAC,GAAG,MAA6C;AACpG,EAAE,OAAO,EAAE,GAAG;AACd,EAAE,mBAAmB,EAAEA,eAAK,EAAE;AAC9B,CAAC;;;;"}

View File

@@ -0,0 +1,2 @@
import { lastIndexOf } from "../fp";
export = lastIndexOf;

View File

@@ -0,0 +1,36 @@
{
"name": "serialize-javascript",
"version": "6.0.2",
"description": "Serialize JavaScript to a superset of JSON that includes regular expressions and functions.",
"main": "index.js",
"scripts": {
"benchmark": "node -v && node test/benchmark/serialize.js",
"test": "nyc --reporter=lcov mocha test/unit"
},
"repository": {
"type": "git",
"url": "git+https://github.com/yahoo/serialize-javascript.git"
},
"keywords": [
"serialize",
"serialization",
"javascript",
"js",
"json"
],
"author": "Eric Ferraiuolo <edf@ericf.me>",
"license": "BSD-3-Clause",
"bugs": {
"url": "https://github.com/yahoo/serialize-javascript/issues"
},
"homepage": "https://github.com/yahoo/serialize-javascript",
"devDependencies": {
"benchmark": "^2.1.4",
"chai": "^4.1.0",
"mocha": "^10.0.0",
"nyc": "^15.0.0"
},
"dependencies": {
"randombytes": "^2.1.0"
}
}

View File

@@ -0,0 +1,7 @@
import { _ as _check_private_redeclaration } from "./_check_private_redeclaration.js";
function _class_private_field_init(obj, privateMap, value) {
_check_private_redeclaration(obj, privateMap);
privateMap.set(obj, value);
}
export { _class_private_field_init as _ };

View File

@@ -0,0 +1,158 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const core = require('@sentry/core');
const debugBuild = require('../debug-build.js');
const capture = require('../logs/capture.js');
const DEFAULT_CAPTURED_LEVELS = ['trace', 'debug', 'info', 'warn', 'error', 'fatal'];
// See: https://github.com/winstonjs/triple-beam
const LEVEL_SYMBOL = Symbol.for('level');
const MESSAGE_SYMBOL = Symbol.for('message');
const SPLAT_SYMBOL = Symbol.for('splat');
/**
* Options for the Sentry Winston transport.
*/
/**
* Creates a new Sentry Winston transport that fowards logs to Sentry. Requires the `enableLogs` option to be enabled.
*
* Supports Winston 3.x.x.
*
* @param TransportClass - The Winston transport class to extend.
* @returns The extended transport class.
*
* @example
* ```ts
* const winston = require('winston');
* const Transport = require('winston-transport');
*
* const SentryWinstonTransport = Sentry.createSentryWinstonTransport(Transport);
*
* const logger = winston.createLogger({
* transports: [new SentryWinstonTransport()],
* });
* ```
*/
function createSentryWinstonTransport(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
TransportClass,
sentryWinstonOptions,
) {
// @ts-ignore - We know this is safe because SentryWinstonTransport extends TransportClass
class SentryWinstonTransport extends TransportClass {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
constructor(options) {
super(options);
this._levels = new Set(sentryWinstonOptions?.levels ?? DEFAULT_CAPTURED_LEVELS);
}
/**
* Forwards a winston log to the Sentry SDK.
*/
log(info, callback) {
try {
setImmediate(() => {
// @ts-ignore - We know this is safe because SentryWinstonTransport extends TransportClass
this.emit('logged', info);
});
if (!isObject(info)) {
return;
}
const levelFromSymbol = info[LEVEL_SYMBOL];
// See: https://github.com/winstonjs/winston?tab=readme-ov-file#streams-objectmode-and-info-objects
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { level, message, timestamp, ...attributes } = info;
// Remove all symbols from the remaining attributes
attributes[LEVEL_SYMBOL] = undefined;
attributes[MESSAGE_SYMBOL] = undefined;
attributes[SPLAT_SYMBOL] = undefined;
const customLevel = sentryWinstonOptions?.customLevelMap?.[levelFromSymbol ];
const winstonLogLevel = WINSTON_LEVEL_TO_LOG_SEVERITY_LEVEL_MAP[levelFromSymbol ];
const logSeverityLevel = customLevel ?? winstonLogLevel ?? 'info';
if (this._levels.has(logSeverityLevel)) {
capture.captureLog(logSeverityLevel, message , {
...attributes,
'sentry.origin': 'auto.log.winston',
});
} else if (!customLevel && !winstonLogLevel) {
debugBuild.DEBUG_BUILD &&
core.debug.log(
`Winston log level ${levelFromSymbol} is not captured by Sentry. Please add ${levelFromSymbol} to the "customLevelMap" option of the Sentry Winston transport.`,
);
}
} catch {
// do nothing
}
if (callback) {
callback();
}
}
}
return SentryWinstonTransport ;
}
function isObject(anything) {
return typeof anything === 'object' && anything != null;
}
// npm
// {
// error: 0,
// warn: 1,
// info: 2,
// http: 3,
// verbose: 4,
// debug: 5,
// silly: 6
// }
//
// syslog
// {
// emerg: 0,
// alert: 1,
// crit: 2,
// error: 3,
// warning: 4,
// notice: 5,
// info: 6,
// debug: 7,
// }
const WINSTON_LEVEL_TO_LOG_SEVERITY_LEVEL_MAP = {
// npm
silly: 'trace',
// npm and syslog
debug: 'debug',
// npm
verbose: 'debug',
// npm
http: 'debug',
// npm and syslog
info: 'info',
// syslog
notice: 'info',
// npm
warn: 'warn',
// syslog
warning: 'warn',
// npm and syslog
error: 'error',
// syslog
emerg: 'fatal',
// syslog
alert: 'fatal',
// syslog
crit: 'fatal',
};
exports.createSentryWinstonTransport = createSentryWinstonTransport;
//# sourceMappingURL=winston.js.map

View File

@@ -0,0 +1,11 @@
"use strict";
exports.__esModule = true;
exports.default = hyphenate;
var rUpper = /([A-Z])/g;
function hyphenate(string) {
return string.replace(rUpper, '-$1').toLowerCase();
}
module.exports = exports["default"];

View File

@@ -0,0 +1,53 @@
"use strict";
var _overload_yield = require("./_overload_yield.cjs");
function _async_generator_delegate(inner) {
var iter = {}, waiting = false;
function pump(key, value) {
waiting = true;
value = new Promise(function(resolve) {
resolve(inner[key](value));
});
return { done: false, value: new _overload_yield._(value, /* kind: delegate */ 1) };
}
iter[(typeof Symbol !== "undefined" && Symbol.iterator) || "@@iterator"] = function() {
return this;
};
iter.next = function(value) {
if (waiting) {
waiting = false;
return value;
}
return pump("next", value);
};
if (typeof inner.throw === "function") {
iter.throw = function(value) {
if (waiting) {
waiting = false;
throw value;
}
return pump("throw", value);
};
}
if (typeof inner.return === "function") {
iter.return = function(value) {
if (waiting) {
waiting = false;
return value;
}
return pump("return", value);
};
}
return iter;
}
exports._ = _async_generator_delegate;

View File

@@ -0,0 +1,150 @@
import { AttributionReportOpts, LoadState, Metric, ReportOpts } from './base';
export interface INPReportOpts extends ReportOpts {
durationThreshold?: number;
}
export interface INPAttributionReportOpts extends AttributionReportOpts {
durationThreshold?: number;
}
/**
* An INP-specific version of the Metric object.
*/
export interface INPMetric extends Metric {
name: 'INP';
entries: PerformanceEventTiming[];
}
export interface INPLongestScriptSummary {
/**
* The longest Long Animation Frame script entry that intersects the INP
* interaction.
*/
entry: PerformanceScriptTiming;
/**
* The INP subpart where the longest script ran.
*/
subpart: 'input-delay' | 'processing-duration' | 'presentation-delay';
/**
* The amount of time the longest script intersected the INP duration.
*/
intersectingDuration: number;
}
/**
* An object containing potentially-helpful debugging information that
* can be sent along with the INP value for the current page visit in order
* to help identify issues happening to real-users in the field.
*/
export interface INPAttribution {
/**
* By default, a selector identifying the element that the user first
* interacted with as part of the frame where the INP candidate interaction
* occurred. If this value is an empty string, that generally means the
* element was removed from the DOM after the interaction. If the
* `generateTarget` configuration option was passed, then this will instead
* be the return value of that function, falling back to the default if that
* returns null or undefined.
*/
interactionTarget: string;
/**
* The time when the user first interacted during the frame where the INP
* candidate interaction occurred (if more than one interaction occurred
* within the frame, only the first time is reported).
*/
interactionTime: DOMHighResTimeStamp;
/**
* The type of interaction, based on the event type of the `event` entry
* that corresponds to the interaction (i.e. the first `event` entry
* containing an `interactionId` dispatched in a given animation frame).
* For "pointerdown", "pointerup", or "click" events this will be "pointer",
* and for "keydown" or "keyup" events this will be "keyboard".
*/
interactionType: 'pointer' | 'keyboard';
/**
* The best-guess timestamp of the next paint after the interaction.
* In general, this timestamp is the same as the `startTime + duration` of
* the event timing entry. However, since duration values are rounded to the
* nearest 8ms (and can be rounded down), this value is clamped to always be
* reported after the processing times.
*/
nextPaintTime: DOMHighResTimeStamp;
/**
* An array of Event Timing entries that were processed within the same
* animation frame as the INP candidate interaction.
*/
processedEventEntries: PerformanceEventTiming[];
/**
* The time from when the user interacted with the page until when the
* browser was first able to start processing event listeners for that
* interaction. This time captures the delay before event processing can
* begin due to the main thread being busy with other work.
*/
inputDelay: number;
/**
* The time from when the first event listener started running in response to
* the user interaction until when all event listener processing has finished.
*/
processingDuration: number;
/**
* The time from when the browser finished processing all event listeners for
* the user interaction until the next frame is presented on the screen and
* visible to the user. This time includes work on the main thread (such as
* `requestAnimationFrame()` callbacks, `ResizeObserver` and
* `IntersectionObserver` callbacks, and style/layout calculation) as well
* as off-main-thread work (such as compositor, GPU, and raster work).
*/
presentationDelay: number;
/**
* The loading state of the document at the time when the interaction
* corresponding to INP occurred (see `LoadState` for details). If the
* interaction occurred while the document was loading and executing script
* (e.g. usually in the `dom-interactive` phase) it can result in long delays.
*/
loadState: LoadState;
/**
* If the browser supports the Long Animation Frame API, this array will
* include any `long-animation-frame` entries that intersect with the INP
* candidate interaction's `startTime` and the `processingEnd` time of the
* last event processed within that animation frame. If the browser does not
* support the Long Animation Frame API or no `long-animation-frame` entries
* are detected, this array will be empty.
*/
longAnimationFrameEntries: PerformanceLongAnimationFrameTiming[];
/**
* Summary information about the longest script entry intersecting the INP
* duration. Note, only script entries above 5 milliseconds are reported by
* the Long Animation Frame API.
*/
longestScript?: INPLongestScriptSummary;
/**
* The total duration of Long Animation Frame scripts that intersect the INP
* duration excluding any forced style and layout (that is included in
* totalStyleAndLayout). Note, this is limited to scripts > 5 milliseconds.
*/
totalScriptDuration?: number;
/**
* The total style and layout duration from any Long Animation Frames
* intersecting the INP interaction. This includes any end-of-frame style and
* layout duration + any forced style and layout duration.
*/
totalStyleAndLayoutDuration?: number;
/**
* The off main-thread presentation delay from the end of the last Long
* Animation Frame (where available) until the INP end point.
*/
totalPaintDuration?: number;
/**
* The total unattributed time not included in any of the previous totals.
* This includes scripts < 5 milliseconds and other timings not attributed
* by Long Animation Frame (including when a frame is < 50ms and so has no
* Long Animation Frame).
* When no Long Animation Frames are present this will be undefined, rather
* than everything being unattributed to make it clearer when it's expected
* to be small.
*/
totalUnattributedDuration?: number;
}
/**
* An INP-specific version of the Metric object with attribution.
*/
export interface INPMetricWithAttribution extends INPMetric {
attribution: INPAttribution;
}
//# sourceMappingURL=inp.d.ts.map

View File

@@ -0,0 +1,22 @@
import * as core from "../core/index.js";
import * as schemas from "./schemas.js";
export interface ZodMiniISODateTime extends schemas.ZodMiniStringFormat<"datetime"> {
_zod: core.$ZodISODateTimeInternals;
}
export declare const ZodMiniISODateTime: core.$constructor<ZodMiniISODateTime>;
export declare function datetime(params?: string | core.$ZodISODateTimeParams): ZodMiniISODateTime;
export interface ZodMiniISODate extends schemas.ZodMiniStringFormat<"date"> {
_zod: core.$ZodISODateInternals;
}
export declare const ZodMiniISODate: core.$constructor<ZodMiniISODate>;
export declare function date(params?: string | core.$ZodISODateParams): ZodMiniISODate;
export interface ZodMiniISOTime extends schemas.ZodMiniStringFormat<"time"> {
_zod: core.$ZodISOTimeInternals;
}
export declare const ZodMiniISOTime: core.$constructor<ZodMiniISOTime>;
export declare function time(params?: string | core.$ZodISOTimeParams): ZodMiniISOTime;
export interface ZodMiniISODuration extends schemas.ZodMiniStringFormat<"duration"> {
_zod: core.$ZodISODurationInternals;
}
export declare const ZodMiniISODuration: core.$constructor<ZodMiniISODuration>;
export declare function duration(params?: string | core.$ZodISODurationParams): ZodMiniISODuration;

View File

@@ -0,0 +1,63 @@
import { getTimezoneOffsetInMilliseconds } from "./_lib/getTimezoneOffsetInMilliseconds.js";
import { normalizeDates } from "./_lib/normalizeDates.js";
import { millisecondsInDay } from "./constants.js";
import { startOfDay } from "./startOfDay.js";
/**
* The {@link differenceInCalendarDays} function options.
*/
/**
* @name differenceInCalendarDays
* @category Day Helpers
* @summary Get the number of calendar days between the given dates.
*
* @description
* Get the number of calendar days between the given dates. This means that the times are removed
* from the dates and then the difference in days is calculated.
*
* @param laterDate - The later date
* @param earlierDate - The earlier date
* @param options - The options object
*
* @returns The number of calendar days
*
* @example
* // How many calendar days are between
* // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?
* const result = differenceInCalendarDays(
* new Date(2012, 6, 2, 0, 0),
* new Date(2011, 6, 2, 23, 0)
* )
* //=> 366
* // How many calendar days are between
* // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?
* const result = differenceInCalendarDays(
* new Date(2011, 6, 3, 0, 1),
* new Date(2011, 6, 2, 23, 59)
* )
* //=> 1
*/
export function differenceInCalendarDays(laterDate, earlierDate, options) {
const [laterDate_, earlierDate_] = normalizeDates(
options?.in,
laterDate,
earlierDate,
);
const laterStartOfDay = startOfDay(laterDate_);
const earlierStartOfDay = startOfDay(earlierDate_);
const laterTimestamp =
+laterStartOfDay - getTimezoneOffsetInMilliseconds(laterStartOfDay);
const earlierTimestamp =
+earlierStartOfDay - getTimezoneOffsetInMilliseconds(earlierStartOfDay);
// Round the number of days to the nearest integer because the number of
// milliseconds in a day is not constant (e.g. it's different in the week of
// the daylight saving time clock shift).
return Math.round((laterTimestamp - earlierTimestamp) / millisecondsInDay);
}
// Fallback for modularized imports:
export default differenceInCalendarDays;

View File

@@ -0,0 +1,32 @@
import { createRequire } from 'module';
function getCurrentVersion() {
try {
const require = createRequire(import.meta.url);
const pkg = require('next/package.json');
return pkg.version;
} catch (error) {
throw new Error('Failed to get current Next.js version. This can happen if next-intl/plugin is imported into your app code outside of your next.config.js.', {
cause: error
});
}
}
function compareVersions(version1, version2) {
const v1Parts = version1.split('.').map(Number);
const v2Parts = version2.split('.').map(Number);
for (let i = 0; i < 3; i++) {
const v1 = v1Parts[i] || 0;
const v2 = v2Parts[i] || 0;
if (v1 > v2) return 1;
if (v1 < v2) return -1;
}
return 0;
}
function hasStableTurboConfig() {
return compareVersions(getCurrentVersion(), '15.3.0') >= 0;
}
function isNextJs16OrHigher() {
return compareVersions(getCurrentVersion(), '16.0.0') >= 0;
}
export { hasStableTurboConfig, isNextJs16OrHigher };

View File

@@ -0,0 +1,37 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.clear = clear;
exports.clearPath = clearPath;
exports.clearScope = clearScope;
exports.getCachedPaths = getCachedPaths;
exports.getOrCreateCachedPaths = getOrCreateCachedPaths;
exports.scope = exports.path = void 0;
let pathsCache = exports.path = new WeakMap();
let scope = exports.scope = new WeakMap();
function clear() {
clearPath();
clearScope();
}
function clearPath() {
exports.path = pathsCache = new WeakMap();
}
function clearScope() {
exports.scope = scope = new WeakMap();
}
function getCachedPaths(path) {
const {
parent,
parentPath
} = path;
return pathsCache.get(parent);
}
function getOrCreateCachedPaths(node, parentPath) {
let paths = pathsCache.get(node);
if (!paths) pathsCache.set(node, paths = new Map());
return paths;
}
//# sourceMappingURL=cache.js.map

View File

@@ -0,0 +1,18 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = toPrimitive;
function toPrimitive(input, hint) {
if (typeof input !== "object" || !input) return input;
var prim = input[Symbol.toPrimitive];
if (prim !== undefined) {
var res = prim.call(input, hint || "default");
if (typeof res !== "object") return res;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return (hint === "string" ? String : Number)(input);
}
//# sourceMappingURL=toPrimitive.js.map

View File

@@ -0,0 +1,11 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var config = {
paths: {
vs: 'https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs'
}
};
exports.default = config;

View File

@@ -0,0 +1,5 @@
import React from 'react';
export declare const PayloadIcon: React.FC<{
fill?: string;
}>;
//# sourceMappingURL=index.d.ts.map

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"cpu.js","sources":["../../../src/icons/cpu.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Cpu\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHg9IjQiIHk9IjQiIHJ4PSIyIiAvPgogIDxyZWN0IHdpZHRoPSI2IiBoZWlnaHQ9IjYiIHg9IjkiIHk9IjkiIHJ4PSIxIiAvPgogIDxwYXRoIGQ9Ik0xNSAydjIiIC8+CiAgPHBhdGggZD0iTTE1IDIwdjIiIC8+CiAgPHBhdGggZD0iTTIgMTVoMiIgLz4KICA8cGF0aCBkPSJNMiA5aDIiIC8+CiAgPHBhdGggZD0iTTIwIDE1aDIiIC8+CiAgPHBhdGggZD0iTTIwIDloMiIgLz4KICA8cGF0aCBkPSJNOSAydjIiIC8+CiAgPHBhdGggZD0iTTkgMjB2MiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/cpu\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 Cpu = createLucideIcon('Cpu', [\n ['rect', { width: '16', height: '16', x: '4', y: '4', rx: '2', key: '14l7u7' }],\n ['rect', { width: '6', height: '6', x: '9', y: '9', rx: '1', key: '5aljv4' }],\n ['path', { d: 'M15 2v2', key: '13l42r' }],\n ['path', { d: 'M15 20v2', key: '15mkzm' }],\n ['path', { d: 'M2 15h2', key: '1gxd5l' }],\n ['path', { d: 'M2 9h2', key: '1bbxkp' }],\n ['path', { d: 'M20 15h2', key: '19e6y8' }],\n ['path', { d: 'M20 9h2', key: '19tzq7' }],\n ['path', { d: 'M9 2v2', key: '165o2o' }],\n ['path', { d: 'M9 20v2', key: 'i2bqo8' }],\n]);\n\nexport default Cpu;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,iBAAiB,KAAO,CAAA,CAAA,CAAA;AAAA,CAAA,CAClC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,KAAK,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC5E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACvC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACvC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC1C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,43 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const debugBuild = require('../debug-build.js');
const globalError = require('../instrument/globalError.js');
const globalUnhandledRejection = require('../instrument/globalUnhandledRejection.js');
const debugLogger = require('../utils/debug-logger.js');
const spanUtils = require('../utils/spanUtils.js');
const spanstatus = require('./spanstatus.js');
let errorsInstrumented = false;
/**
* Ensure that global errors automatically set the active span status.
*/
function registerSpanErrorInstrumentation() {
if (errorsInstrumented) {
return;
}
/**
* If an error or unhandled promise occurs, we mark the active root span as failed
*/
function errorCallback() {
const activeSpan = spanUtils.getActiveSpan();
const rootSpan = activeSpan && spanUtils.getRootSpan(activeSpan);
if (rootSpan) {
const message = 'internal_error';
debugBuild.DEBUG_BUILD && debugLogger.debug.log(`[Tracing] Root span: ${message} -> Global error occurred`);
rootSpan.setStatus({ code: spanstatus.SPAN_STATUS_ERROR, message });
}
}
// The function name will be lost when bundling but we need to be able to identify this listener later to maintain the
// node.js default exit behaviour
errorCallback.tag = 'sentry_tracingErrorCallback';
errorsInstrumented = true;
globalError.addGlobalErrorInstrumentationHandler(errorCallback);
globalUnhandledRejection.addGlobalUnhandledRejectionInstrumentationHandler(errorCallback);
}
exports.registerSpanErrorInstrumentation = registerSpanErrorInstrumentation;
//# sourceMappingURL=errors.js.map

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