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,37 @@
{
"name": "@dnd-kit/utilities",
"version": "3.2.2",
"description": "Internal utilities to bee shared between `@dnd-kit` packages",
"author": "Claudéric Demers",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/clauderic/dnd-kit.git",
"directory": "packages/utilities"
},
"scripts": {
"start": "tsdx watch --tsconfig tsconfig.build.json --verbose --noClean",
"build": "tsdx build --tsconfig tsconfig.build.json",
"test": "tsdx test",
"lint": "tsdx lint",
"prepublish": "npm run build"
},
"main": "dist/index.js",
"module": "dist/utilities.esm.js",
"typings": "dist/index.d.ts",
"files": [
"README.md",
"CHANGELOG.md",
"LICENSE",
"dist"
],
"dependencies": {
"tslib": "^2.0.0"
},
"peerDependencies": {
"react": ">=16.8.0"
},
"publishConfig": {
"access": "public"
}
}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/mysql-proxy/index.ts"],"sourcesContent":["export * from './driver.ts';\nexport * from './session.ts';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;","names":[]}

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"1":"F A B","2":"zC","8":"K D E"},B:{"1":"0 1 2 3 4 5 6 7 8 C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n 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"},C:{"1":"0 1 2 3 4 5 6 7 8 9 J bB K D E F A B C L M G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R 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 5C","132":"0C VC 4C"},D:{"1":"0 1 2 3 4 5 6 7 8 9 J bB K D E F A B C L M G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R S T U V W X Y Z a b 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"},E:{"1":"J bB K D E F A B C L M G 7C 8C 9C AD cC 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","132":"6C bC"},F:{"1":"0 1 2 3 4 5 6 7 8 9 F B C G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC 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 JD KD LD MD PC xC ND QC"},G:{"1":"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 sC lD tC uC vC wC"},H:{"260":"mD"},I:{"1":"VC J I qD yC rD sD","132":"nD oD pD"},J:{"1":"D A"},K:{"1":"A B C H PC xC QC"},L:{"1":"I"},M:{"1":"OC"},N:{"1":"A B"},O:{"1":"RC"},P:{"1":"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:{"1":"5D"},S:{"1":"6D 7D"}},B:1,C:"Canvas (basic support)",D:true};

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/pg-core/subquery.ts"],"sourcesContent":["import type { TypedQueryBuilder } from '~/query-builders/query-builder.ts';\nimport type { AddAliasToSelection } from '~/query-builders/select.types.ts';\nimport type { ColumnsSelection, SQL } from '~/sql/sql.ts';\nimport type { Subquery, WithSubquery, WithSubqueryWithoutSelection } from '~/subquery.ts';\nimport type { QueryBuilder } from './query-builders/query-builder.ts';\n\nexport type SubqueryWithSelection<TSelection extends ColumnsSelection, TAlias extends string> =\n\t& Subquery<TAlias, AddAliasToSelection<TSelection, TAlias, 'pg'>>\n\t& AddAliasToSelection<TSelection, TAlias, 'pg'>;\n\nexport type WithSubqueryWithSelection<TSelection extends ColumnsSelection, TAlias extends string> =\n\t& WithSubquery<TAlias, AddAliasToSelection<TSelection, TAlias, 'pg'>>\n\t& AddAliasToSelection<TSelection, TAlias, 'pg'>;\n\nexport interface WithBuilder {\n\t<TAlias extends string>(alias: TAlias): {\n\t\tas: {\n\t\t\t<TSelection extends ColumnsSelection>(\n\t\t\t\tqb: TypedQueryBuilder<TSelection> | ((qb: QueryBuilder) => TypedQueryBuilder<TSelection>),\n\t\t\t): WithSubqueryWithSelection<TSelection, TAlias>;\n\t\t\t(\n\t\t\t\tqb: TypedQueryBuilder<undefined> | ((qb: QueryBuilder) => TypedQueryBuilder<undefined>),\n\t\t\t): WithSubqueryWithoutSelection<TAlias>;\n\t\t};\n\t};\n\t<TAlias extends string, TSelection extends ColumnsSelection>(alias: TAlias, selection: TSelection): {\n\t\tas: (qb: SQL | ((qb: QueryBuilder) => SQL)) => WithSubqueryWithSelection<TSelection, TAlias>;\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}

View File

@@ -0,0 +1,70 @@
"use strict";
exports.eachMonthOfInterval = eachMonthOfInterval;
var _index = require("./_lib/normalizeInterval.cjs");
var _index2 = require("./constructFrom.cjs");
/**
* The {@link eachMonthOfInterval} function options.
*/
/**
* The {@link eachMonthOfInterval} function result type. It resolves the proper data type.
*/
/**
* @name eachMonthOfInterval
* @category Interval Helpers
* @summary Return the array of months within the specified time interval.
*
* @description
* Return the array of months within the specified time interval.
*
* @typeParam IntervalType - Interval type.
* @typeParam Options - Options type.
*
* @param interval - The interval.
* @param options - An object with options.
*
* @returns The array with starts of months from the month of the interval start to the month of the interval end
*
* @example
* // Each month between 6 February 2014 and 10 August 2014:
* const result = eachMonthOfInterval({
* start: new Date(2014, 1, 6),
* end: new Date(2014, 7, 10)
* })
* //=> [
* // Sat Feb 01 2014 00:00:00,
* // Sat Mar 01 2014 00:00:00,
* // Tue Apr 01 2014 00:00:00,
* // Thu May 01 2014 00:00:00,
* // Sun Jun 01 2014 00:00:00,
* // Tue Jul 01 2014 00:00:00,
* // Fri Aug 01 2014 00:00:00
* // ]
*/
function eachMonthOfInterval(interval, options) {
const { start, end } = (0, _index.normalizeInterval)(options?.in, interval);
let reversed = +start > +end;
const endTime = reversed ? +start : +end;
const date = reversed ? end : start;
date.setHours(0, 0, 0, 0);
date.setDate(1);
let step = options?.step ?? 1;
if (!step) return [];
if (step < 0) {
step = -step;
reversed = !reversed;
}
const dates = [];
while (+date <= endTime) {
dates.push((0, _index2.constructFrom)(start, date));
date.setMonth(date.getMonth() + step);
}
return reversed ? dates.reverse() : dates;
}

View File

@@ -0,0 +1,282 @@
# Class: Client
Extends: `undici.Dispatcher`
A basic HTTP/1.1 client, mapped on top a single TCP/TLS connection. Pipelining is disabled by default.
Requests are not guaranteed to be dispatched in order of invocation.
## `new Client(url[, options])`
Arguments:
* **url** `URL | string` - Should only include the **protocol, hostname, and port**.
* **options** `ClientOptions` (optional)
Returns: `Client`
### Parameter: `ClientOptions`
* **bodyTimeout** `number | null` (optional) - Default: `300e3` - The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use `0` to disable it entirely. Defaults to 300 seconds. Please note the `timeout` will be reset if you keep writing data to the socket everytime.
* **headersTimeout** `number | null` (optional) - Default: `300e3` - The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers while not sending the request. Defaults to 300 seconds.
* **keepAliveMaxTimeout** `number | null` (optional) - Default: `600e3` - The maximum allowed `keepAliveTimeout`, in milliseconds, when overridden by *keep-alive* hints from the server. Defaults to 10 minutes.
* **keepAliveTimeout** `number | null` (optional) - Default: `4e3` - The timeout, in milliseconds, after which a socket without active requests will time out. Monitors time between activity on a connected socket. This value may be overridden by *keep-alive* hints from the server. See [MDN: HTTP - Headers - Keep-Alive directives](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Keep-Alive#directives) for more details. Defaults to 4 seconds.
* **keepAliveTimeoutThreshold** `number | null` (optional) - Default: `2e3` - A number of milliseconds subtracted from server *keep-alive* hints when overriding `keepAliveTimeout` to account for timing inaccuracies caused by e.g. transport latency. Defaults to 2 seconds.
* **maxHeaderSize** `number | null` (optional) - Default: `--max-http-header-size` or `16384` - The maximum length of request headers in bytes. Defaults to Node.js' --max-http-header-size or 16KiB.
* **maxResponseSize** `number | null` (optional) - Default: `-1` - The maximum length of response body in bytes. Set to `-1` to disable.
* **pipelining** `number | null` (optional) - Default: `1` - The amount of concurrent requests to be sent over the single TCP/TLS connection according to [RFC7230](https://tools.ietf.org/html/rfc7230#section-6.3.2). Carefully consider your workload and environment before enabling concurrent requests as pipelining may reduce performance if used incorrectly. Pipelining is sensitive to network stack settings as well as head of line blocking caused by e.g. long running requests. Set to `0` to disable keep-alive connections.
* **connect** `ConnectOptions | Function | null` (optional) - Default: `null`.
* **strictContentLength** `Boolean` (optional) - Default: `true` - Whether to treat request content length mismatches as errors. If true, an error is thrown when the request content-length header doesn't match the length of the request body. **Security Warning:** Disabling this option can expose your application to HTTP Request Smuggling attacks, where mismatched content-length headers cause servers and proxies to interpret request boundaries differently. This can lead to cache poisoning, credential hijacking, and bypassing security controls. Only disable this in controlled environments where you fully trust the request source.
* **autoSelectFamily**: `boolean` (optional) - Default: depends on local Node version, on Node 18.13.0 and above is `false`. Enables a family autodetection algorithm that loosely implements section 5 of [RFC 8305](https://tools.ietf.org/html/rfc8305#section-5). See [here](https://nodejs.org/api/net.html#socketconnectoptions-connectlistener) for more details. This option is ignored if not supported by the current Node version.
* **autoSelectFamilyAttemptTimeout**: `number` - Default: depends on local Node version, on Node 18.13.0 and above is `250`. The amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the `autoSelectFamily` option. See [here](https://nodejs.org/api/net.html#socketconnectoptions-connectlistener) for more details.
* **allowH2**: `boolean` - Default: `false`. Enables support for H2 if the server has assigned bigger priority to it through ALPN negotiation.
* **useH2c**: `boolean` - Default: `false`. Enforces h2c for non-https connections.
* **maxConcurrentStreams**: `number` - Default: `100`. Dictates the maximum number of concurrent streams for a single H2 session. It can be overridden by a SETTINGS remote frame.
> **Notes about HTTP/2**
> - It only works under TLS connections. h2c is not supported.
> - The server must support HTTP/2 and choose it as the protocol during the ALPN negotiation.
> - The server must not have a bigger priority for HTTP/1.1 than HTTP/2.
> - Pseudo headers are automatically attached to the request. If you try to set them, they will be overwritten.
> - The `:path` header is automatically set to the request path.
> - The `:method` header is automatically set to the request method.
> - The `:scheme` header is automatically set to the request scheme.
> - The `:authority` header is automatically set to the request `host[:port]`.
> - `PUSH` frames are yet not supported.
#### Parameter: `ConnectOptions`
Every Tls option, see [here](https://nodejs.org/api/tls.html#tls_tls_connect_options_callback).
Furthermore, the following options can be passed:
* **socketPath** `string | null` (optional) - Default: `null` - An IPC endpoint, either Unix domain socket or Windows named pipe.
* **maxCachedSessions** `number | null` (optional) - Default: `100` - Maximum number of TLS cached sessions. Use 0 to disable TLS session caching. Default: 100.
* **timeout** `number | null` (optional) - In milliseconds, Default `10e3`.
* **servername** `string | null` (optional)
* **keepAlive** `boolean | null` (optional) - Default: `true` - TCP keep-alive enabled
* **keepAliveInitialDelay** `number | null` (optional) - Default: `60000` - TCP keep-alive interval for the socket in milliseconds
### Example - Basic Client instantiation
This will instantiate the undici Client, but it will not connect to the origin until something is queued. Consider using `client.connect` to prematurely connect to the origin, or just call `client.request`.
```js
'use strict'
import { Client } from 'undici'
const client = new Client('http://localhost:3000')
```
### Example - Custom connector
This will allow you to perform some additional check on the socket that will be used for the next request.
```js
'use strict'
import { Client, buildConnector } from 'undici'
const connector = buildConnector({ rejectUnauthorized: false })
const client = new Client('https://localhost:3000', {
connect (opts, cb) {
connector(opts, (err, socket) => {
if (err) {
cb(err)
} else if (/* assertion */) {
socket.destroy()
cb(new Error('kaboom'))
} else {
cb(null, socket)
}
})
}
})
```
## Instance Methods
### `Client.close([callback])`
Implements [`Dispatcher.close([callback])`](/docs/docs/api/Dispatcher.md#dispatcherclosecallback-promise).
### `Client.destroy([error, callback])`
Implements [`Dispatcher.destroy([error, callback])`](/docs/docs/api/Dispatcher.md#dispatcherdestroyerror-callback-promise).
Waits until socket is closed before invoking the callback (or returning a promise if no callback is provided).
### `Client.connect(options[, callback])`
See [`Dispatcher.connect(options[, callback])`](/docs/docs/api/Dispatcher.md#dispatcherconnectoptions-callback).
### `Client.dispatch(options, handlers)`
Implements [`Dispatcher.dispatch(options, handlers)`](/docs/docs/api/Dispatcher.md#dispatcherdispatchoptions-handler).
### `Client.pipeline(options, handler)`
See [`Dispatcher.pipeline(options, handler)`](/docs/docs/api/Dispatcher.md#dispatcherpipelineoptions-handler).
### `Client.request(options[, callback])`
See [`Dispatcher.request(options [, callback])`](/docs/docs/api/Dispatcher.md#dispatcherrequestoptions-callback).
### `Client.stream(options, factory[, callback])`
See [`Dispatcher.stream(options, factory[, callback])`](/docs/docs/api/Dispatcher.md#dispatcherstreamoptions-factory-callback).
### `Client.upgrade(options[, callback])`
See [`Dispatcher.upgrade(options[, callback])`](/docs/docs/api/Dispatcher.md#dispatcherupgradeoptions-callback).
## Instance Properties
### `Client.closed`
* `boolean`
`true` after `client.close()` has been called.
### `Client.destroyed`
* `boolean`
`true` after `client.destroyed()` has been called or `client.close()` has been called and the client shutdown has completed.
### `Client.pipelining`
* `number`
Property to get and set the pipelining factor.
## Instance Events
### Event: `'connect'`
See [Dispatcher Event: `'connect'`](/docs/docs/api/Dispatcher.md#event-connect).
Parameters:
* **origin** `URL`
* **targets** `Array<Dispatcher>`
Emitted when a socket has been created and connected. The client will connect once `client.size > 0`.
#### Example - Client connect event
```js
import { createServer } from 'http'
import { Client } from 'undici'
import { once } from 'events'
const server = createServer((request, response) => {
response.end('Hello, World!')
}).listen()
await once(server, 'listening')
const client = new Client(`http://localhost:${server.address().port}`)
client.on('connect', (origin) => {
console.log(`Connected to ${origin}`) // should print before the request body statement
})
try {
const { body } = await client.request({
path: '/',
method: 'GET'
})
body.setEncoding('utf-8')
body.on('data', console.log)
client.close()
server.close()
} catch (error) {
console.error(error)
client.close()
server.close()
}
```
### Event: `'disconnect'`
See [Dispatcher Event: `'disconnect'`](/docs/docs/api/Dispatcher.md#event-disconnect).
Parameters:
* **origin** `URL`
* **targets** `Array<Dispatcher>`
* **error** `Error`
Emitted when socket has disconnected. The error argument of the event is the error which caused the socket to disconnect. The client will reconnect if or once `client.size > 0`.
#### Example - Client disconnect event
```js
import { createServer } from 'http'
import { Client } from 'undici'
import { once } from 'events'
const server = createServer((request, response) => {
response.destroy()
}).listen()
await once(server, 'listening')
const client = new Client(`http://localhost:${server.address().port}`)
client.on('disconnect', (origin) => {
console.log(`Disconnected from ${origin}`)
})
try {
await client.request({
path: '/',
method: 'GET'
})
} catch (error) {
console.error(error.message)
client.close()
server.close()
}
```
### Event: `'drain'`
Emitted when pipeline is no longer busy.
See [Dispatcher Event: `'drain'`](/docs/docs/api/Dispatcher.md#event-drain).
#### Example - Client drain event
```js
import { createServer } from 'http'
import { Client } from 'undici'
import { once } from 'events'
const server = createServer((request, response) => {
response.end('Hello, World!')
}).listen()
await once(server, 'listening')
const client = new Client(`http://localhost:${server.address().port}`)
client.on('drain', () => {
console.log('drain event')
client.close()
server.close()
})
const requests = [
client.request({ path: '/', method: 'GET' }),
client.request({ path: '/', method: 'GET' }),
client.request({ path: '/', method: 'GET' })
]
await Promise.all(requests)
console.log('requests completed')
```
### Event: `'error'`
Invoked for users errors such as throwing in the `onError` handler.

View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2013-present, Facebook, Inc.
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,13 @@
const { Writable } = require('node:stream')
module.exports = () =>
new Writable({
autoDestroy: true,
write (chunk, enc, cb) {
setImmediate(() => {
/* eslint-disable no-empty */
for (let i = 0; i < 1e3; i++) {}
process.exit(0)
})
}
})

View File

@@ -0,0 +1,44 @@
/**
* Inline definitions of LaunchDarkly types so we don't have to include their
* SDK in devDependencies. These are only for type-checking and can be extended
* as needed - for exact definitions, reference `launchdarkly-js-client-sdk`.
*/
/**
* Currently, the Sentry integration does not read from values of this type.
*/
export type LDContext = object;
/**
* An object that combines the result of a feature flag evaluation with information about
* how it was calculated.
*/
export interface LDEvaluationDetail {
value: unknown;
}
/**
* Callback interface for collecting information about the SDK at runtime.
*
* This interface is used to collect information about flag usage.
*
* This interface should not be used by the application to access flags for the purpose of controlling application
* flow. It is intended for monitoring, analytics, or debugging purposes.
*/
export interface LDInspectionFlagUsedHandler {
type: 'flag-used';
/**
* Name of the inspector. Will be used for logging issues with the inspector.
*/
name: string;
/**
* If `true`, then the inspector will be ran synchronously with evaluation.
* Synchronous inspectors execute inline with evaluation and care should be taken to ensure
* they have minimal performance overhead.
*/
synchronous?: boolean;
/**
* This method is called when a flag is accessed via a variation method, or it can be called based on actions in
* wrapper SDKs which have different methods of tracking when a flag was accessed. It is not called when a call is made
* to allFlags.
*/
method: (flagKey: string, flagDetail: LDEvaluationDetail, context: LDContext) => void;
}
//# sourceMappingURL=types.d.ts.map

View File

@@ -0,0 +1,159 @@
import {
AnyMap,
originalPositionFor,
generatedPositionFor,
allGeneratedPositionsFor,
eachMapping,
encodedMappings,
sourceContentFor,
} from '@jridgewell/trace-mapping';
import {
GenMapping,
maybeAddMapping,
toDecodedMap,
toEncodedMap,
setSourceContent,
fromMap,
} from '@jridgewell/gen-mapping';
import type {
TraceMap,
SourceMapInput,
SectionedSourceMapInput,
DecodedSourceMap,
} from '@jridgewell/trace-mapping';
export type { TraceMap, SourceMapInput, SectionedSourceMapInput, DecodedSourceMap };
import type { Mapping, EncodedSourceMap } from '@jridgewell/gen-mapping';
export type { Mapping, EncodedSourceMap };
export class SourceMapConsumer {
declare private _map: TraceMap;
declare file: TraceMap['file'];
declare names: TraceMap['names'];
declare sourceRoot: TraceMap['sourceRoot'];
declare sources: TraceMap['sources'];
declare sourcesContent: TraceMap['sourcesContent'];
declare version: TraceMap['version'];
constructor(
map: ConstructorParameters<typeof AnyMap>[0],
mapUrl?: ConstructorParameters<typeof AnyMap>[1],
) {
const trace = (this._map = new AnyMap(map, mapUrl));
this.file = trace.file;
this.names = trace.names;
this.sourceRoot = trace.sourceRoot;
this.sources = trace.resolvedSources;
this.sourcesContent = trace.sourcesContent;
this.version = trace.version;
}
static fromSourceMap(map: SourceMapGenerator, mapUrl?: Parameters<typeof AnyMap>[1]) {
// This is more performant if we receive
// a @jridgewell/source-map SourceMapGenerator
if (map.toDecodedMap) {
return new SourceMapConsumer(map.toDecodedMap() as SectionedSourceMapInput, mapUrl);
}
// This is a fallback for `source-map` and `source-map-js`
return new SourceMapConsumer(map.toJSON() as SectionedSourceMapInput, mapUrl);
}
get mappings(): string {
return encodedMappings(this._map);
}
originalPositionFor(
needle: Parameters<typeof originalPositionFor>[1],
): ReturnType<typeof originalPositionFor> {
return originalPositionFor(this._map, needle);
}
generatedPositionFor(
originalPosition: Parameters<typeof generatedPositionFor>[1],
): ReturnType<typeof generatedPositionFor> {
return generatedPositionFor(this._map, originalPosition);
}
allGeneratedPositionsFor(
originalPosition: Parameters<typeof generatedPositionFor>[1],
): ReturnType<typeof generatedPositionFor>[] {
return allGeneratedPositionsFor(this._map, originalPosition);
}
hasContentsOfAllSources(): boolean {
if (!this.sourcesContent || this.sourcesContent.length !== this.sources.length) {
return false;
}
for (const content of this.sourcesContent) {
if (content == null) {
return false;
}
}
return true;
}
sourceContentFor(source: string, nullOnMissing?: boolean): string | null {
const sourceContent = sourceContentFor(this._map, source);
if (sourceContent != null) {
return sourceContent;
}
if (nullOnMissing) {
return null;
}
throw new Error(`"${source}" is not in the SourceMap.`);
}
eachMapping(
callback: Parameters<typeof eachMapping>[1],
context?: any /*, order?: number*/,
): void {
// order is ignored as @jridgewell/trace-map doesn't implement it
eachMapping(this._map, context ? callback.bind(context) : callback);
}
destroy() {
// noop.
}
}
export class SourceMapGenerator {
declare private _map: GenMapping;
constructor(opts: ConstructorParameters<typeof GenMapping>[0] | GenMapping) {
// TODO :: should this be duck-typed ?
this._map = opts instanceof GenMapping ? opts : new GenMapping(opts);
}
static fromSourceMap(consumer: SourceMapConsumer) {
return new SourceMapGenerator(fromMap(consumer));
}
addMapping(mapping: Parameters<typeof maybeAddMapping>[1]): ReturnType<typeof maybeAddMapping> {
maybeAddMapping(this._map, mapping);
}
setSourceContent(
source: Parameters<typeof setSourceContent>[1],
content: Parameters<typeof setSourceContent>[2],
): ReturnType<typeof setSourceContent> {
setSourceContent(this._map, source, content);
}
toJSON(): ReturnType<typeof toEncodedMap> {
return toEncodedMap(this._map);
}
toString(): string {
return JSON.stringify(this.toJSON());
}
toDecodedMap(): ReturnType<typeof toDecodedMap> {
return toDecodedMap(this._map);
}
}

View File

@@ -0,0 +1,39 @@
import { buildFormatLongFn } from "../../_lib/buildFormatLongFn.js";
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 a",
long: "h:mm:ss a",
medium: "h:mm:ss a",
short: "h:mm a",
};
const dateTimeFormats = {
full: "{{date}} 'ម៉ោង' {{time}}",
long: "{{date}} 'ម៉ោង' {{time}}",
medium: "{{date}}, {{time}}",
short: "{{date}}, {{time}}",
};
export const formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full",
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "full",
}),
};

View File

@@ -0,0 +1,27 @@
import { Mechanism, WrappedFunction } from '@sentry/core';
import { GLOBAL_OBJ } from '@sentry/core';
export declare const WINDOW: typeof GLOBAL_OBJ & Window;
/**
* @hidden
*/
export declare function shouldIgnoreOnError(): boolean;
/**
* @hidden
*/
export declare function ignoreNextOnError(): void;
type WrappableFunction = Function;
export declare function wrap<T extends WrappableFunction>(fn: T, options?: {
mechanism?: Mechanism;
}): WrappedFunction<T>;
export declare function wrap<NonFunction>(fn: NonFunction, options?: {
mechanism?: Mechanism;
}): NonFunction;
/**
* Get HTTP request data from the current page.
*/
export declare function getHttpRequestData(): {
url: string;
headers: Record<string, string>;
};
export {};
//# sourceMappingURL=helpers.d.ts.map

View File

@@ -0,0 +1,47 @@
{
"name": "module-details-from-path",
"version": "1.0.4",
"description": "Resolve npm package details, like name and base path, given an absolute path to a file inside a package",
"main": "index.js",
"files": [],
"dependencies": {},
"devDependencies": {
"bench-node": "^0.5.4",
"standard": "^15.0.1",
"tape": "^4.6.0"
},
"scripts": {
"bench": "node --allow-natives-syntax bench.js",
"lint": "standard",
"test": "standard && node test.js",
"test:ci": "node test.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/watson/module-details-from-path.git"
},
"keywords": [
"node",
"nodejs",
"npm",
"module",
"package",
"extract",
"parse",
"name",
"basedir",
"directory",
"path",
"relative"
],
"author": "Thomas Watson <w@tson.dk> (https://wa.tson.dk/)",
"license": "MIT",
"bugs": {
"url": "https://github.com/watson/module-details-from-path/issues"
},
"homepage": "https://github.com/watson/module-details-from-path#readme",
"coordinates": [
55.666507,
12.5798711
]
}

View File

@@ -0,0 +1 @@
export declare function assert(condition: any, message?: string): asserts condition;

View File

@@ -0,0 +1 @@
{"version":3,"file":"scan-text.js","sources":["../../../src/icons/scan-text.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ScanText\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMyA3VjVhMiAyIDAgMCAxIDItMmgyIiAvPgogIDxwYXRoIGQ9Ik0xNyAzaDJhMiAyIDAgMCAxIDIgMnYyIiAvPgogIDxwYXRoIGQ9Ik0yMSAxN3YyYTIgMiAwIDAgMS0yIDJoLTIiIC8+CiAgPHBhdGggZD0iTTcgMjFINWEyIDIgMCAwIDEtMi0ydi0yIiAvPgogIDxwYXRoIGQ9Ik03IDhoOCIgLz4KICA8cGF0aCBkPSJNNyAxMmgxMCIgLz4KICA8cGF0aCBkPSJNNyAxNmg2IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/scan-text\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 ScanText = createLucideIcon('ScanText', [\n ['path', { d: 'M3 7V5a2 2 0 0 1 2-2h2', key: 'aa7l1z' }],\n ['path', { d: 'M17 3h2a2 2 0 0 1 2 2v2', key: '4qcy5o' }],\n ['path', { d: 'M21 17v2a2 2 0 0 1-2 2h-2', key: '6vwrx8' }],\n ['path', { d: 'M7 21H5a2 2 0 0 1-2-2v-2', key: 'ioqczr' }],\n ['path', { d: 'M7 8h8', key: '1jbsf9' }],\n ['path', { d: 'M7 12h10', key: 'b7w52i' }],\n ['path', { d: 'M7 16h6', key: '1vyc9m' }],\n]);\n\nexport default ScanText;\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,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,CAA2B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC1D,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,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;AAC1C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/mysql-core/checks.ts"],"sourcesContent":["import { entityKind } from '~/entity.ts';\nimport type { SQL } from '~/sql/sql.ts';\nimport type { MySqlTable } from './table.ts';\n\nexport class CheckBuilder {\n\tstatic readonly [entityKind]: string = 'MySqlCheckBuilder';\n\n\tprotected brand!: 'MySqlConstraintBuilder';\n\n\tconstructor(public name: string, public value: SQL) {}\n\n\t/** @internal */\n\tbuild(table: MySqlTable): Check {\n\t\treturn new Check(table, this);\n\t}\n}\n\nexport class Check {\n\tstatic readonly [entityKind]: string = 'MySqlCheck';\n\n\treadonly name: string;\n\treadonly value: SQL;\n\n\tconstructor(public table: MySqlTable, builder: CheckBuilder) {\n\t\tthis.name = builder.name;\n\t\tthis.value = builder.value;\n\t}\n}\n\nexport function check(name: string, value: SQL): CheckBuilder {\n\treturn new CheckBuilder(name, value);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA2B;AAIpB,MAAM,aAAa;AAAA,EAKzB,YAAmB,MAAqB,OAAY;AAAjC;AAAqB;AAAA,EAAa;AAAA,EAJrD,QAAiB,wBAAU,IAAY;AAAA,EAE7B;AAAA;AAAA,EAKV,MAAM,OAA0B;AAC/B,WAAO,IAAI,MAAM,OAAO,IAAI;AAAA,EAC7B;AACD;AAEO,MAAM,MAAM;AAAA,EAMlB,YAAmB,OAAmB,SAAuB;AAA1C;AAClB,SAAK,OAAO,QAAQ;AACpB,SAAK,QAAQ,QAAQ;AAAA,EACtB;AAAA,EARA,QAAiB,wBAAU,IAAY;AAAA,EAE9B;AAAA,EACA;AAMV;AAEO,SAAS,MAAM,MAAc,OAA0B;AAC7D,SAAO,IAAI,aAAa,MAAM,KAAK;AACpC;","names":[]}

View File

@@ -0,0 +1,8 @@
global.process = { __proto__: process, pid: 123456 }
Date.now = function () { return 1459875739796 }
require('node:os').hostname = function () { return 'abcdefghijklmnopqr' }
const pino = require(require.resolve('./../../'))
const logger = pino()
logger.info('hello')
logger.info('world')
process.exit(0)

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 Slack = createLucideIcon("Slack", [
["rect", { width: "3", height: "8", x: "13", y: "2", rx: "1.5", key: "diqz80" }],
["path", { d: "M19 8.5V10h1.5A1.5 1.5 0 1 0 19 8.5", key: "183iwg" }],
["rect", { width: "3", height: "8", x: "8", y: "14", rx: "1.5", key: "hqg7r1" }],
["path", { d: "M5 15.5V14H3.5A1.5 1.5 0 1 0 5 15.5", key: "76g71w" }],
["rect", { width: "8", height: "3", x: "14", y: "13", rx: "1.5", key: "1kmz0a" }],
["path", { d: "M15.5 19H14v1.5a1.5 1.5 0 1 0 1.5-1.5", key: "jc4sz0" }],
["rect", { width: "8", height: "3", x: "2", y: "8", rx: "1.5", key: "1omvl4" }],
["path", { d: "M8.5 5H10V3.5A1.5 1.5 0 1 0 8.5 5", key: "16f3cl" }]
]);
export { Slack as default };
//# sourceMappingURL=slack.js.map

View File

@@ -0,0 +1,134 @@
'use client';
import { jsx as _jsx } from "react/jsx-runtime";
import { dequal } from 'dequal/lite'; // lite: no need for Map and Set support
import { formatAdminURL } from 'payload/shared';
import React, { createContext, use, useCallback, useEffect, useRef } from 'react';
import { useTranslation } from '../../providers/Translation/index.js';
import { requests } from '../../utilities/api.js';
import { deepMergeSimple } from '../../utilities/deepMerge.js';
import { useAuth } from '../Auth/index.js';
import { useConfig } from '../Config/index.js';
const Context = /*#__PURE__*/createContext({});
const requestOptions = (value, language) => ({
body: JSON.stringify({
value
}),
headers: {
'Accept-Language': language,
'Content-Type': 'application/json'
}
});
export const PreferencesProvider = ({
children
}) => {
const contextRef = useRef({});
const preferencesRef = useRef({});
const pendingUpdate = useRef({});
const {
config
} = useConfig();
const {
user
} = useAuth();
const {
i18n
} = useTranslation();
const {
routes: {
api
}
} = config;
useEffect(() => {
if (!user) {
// clear preferences between users
preferencesRef.current = {};
}
}, [user]);
const getPreference = useCallback(async key => {
const prefs = preferencesRef.current;
if (typeof prefs[key] !== 'undefined') {
return prefs[key];
}
const promise = new Promise(resolve => {
void (async () => {
const request = await requests.get(formatAdminURL({
apiRoute: api,
path: `/payload-preferences/${key}`
}), {
credentials: 'include',
headers: {
'Accept-Language': i18n.language
}
});
let value = null;
if (request.status === 200) {
const preference = await request.json();
value = preference.value;
}
preferencesRef.current[key] = value;
resolve(value);
})();
});
prefs[key] = promise;
return promise;
}, [i18n.language, api, preferencesRef]);
const setPreference = useCallback(async (key_0, value_0, merge = false) => {
if (merge === false) {
preferencesRef.current[key_0] = value_0;
await requests.post(formatAdminURL({
apiRoute: api,
path: `/payload-preferences/${key_0}`
}), requestOptions(value_0, i18n.language));
return;
}
let newValue = value_0;
const currentPreference = await getPreference(key_0);
// handle value objects where multiple values can be set under one key
if (typeof value_0 === 'object' && typeof currentPreference === 'object' && typeof newValue === 'object') {
// merge the value with any existing preference for the key
if (currentPreference) {
newValue = deepMergeSimple(currentPreference, newValue);
}
if (dequal(newValue, currentPreference)) {
return;
}
// add the requested changes to a pendingUpdate batch for the key
pendingUpdate.current[key_0] = {
...pendingUpdate.current[key_0],
...newValue
};
} else {
if (newValue === currentPreference) {
return;
}
pendingUpdate.current[key_0] = newValue;
}
const updatePreference = async () => {
// compare the value stored in context before sending to eliminate duplicate requests
if (dequal(pendingUpdate.current[key_0], preferencesRef.current[key_0])) {
return;
}
// preference set in context here to prevent other updatePreference at the same time
preferencesRef.current[key_0] = pendingUpdate.current[key_0];
await requests.post(formatAdminURL({
apiRoute: api,
path: `/payload-preferences/${key_0}`
}), requestOptions(preferencesRef.current[key_0], i18n.language));
// reset any changes for this key after sending the request
delete pendingUpdate.current[key_0];
};
// use timeout to allow multiple changes of different values using the same key in one request
setTimeout(() => {
void updatePreference();
});
}, [api, getPreference, i18n.language, pendingUpdate]);
contextRef.current.getPreference = getPreference;
contextRef.current.setPreference = setPreference;
return /*#__PURE__*/_jsx(Context, {
value: contextRef.current,
children: children
});
};
export const usePreferences = () => use(Context);
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _nullishReceiverError;
function _nullishReceiverError(r) {
throw new TypeError("Cannot set property of null or undefined.");
}
//# sourceMappingURL=nullishReceiverError.js.map

View File

@@ -0,0 +1,85 @@
# Split2(matcher, mapper, options)
![ci](https://github.com/mcollina/split2/workflows/ci/badge.svg)
Break up a stream and reassemble it so that each line is a chunk.
`split2` is inspired by [@dominictarr](https://github.com/dominictarr) [`split`](https://github.com/dominictarr/split) module,
and it is totally API compatible with it.
However, it is based on Node.js core [`Transform`](https://nodejs.org/api/stream.html#stream_new_stream_transform_options).
`matcher` may be a `String`, or a `RegExp`. Example, read every line in a file ...
``` js
fs.createReadStream(file)
.pipe(split2())
.on('data', function (line) {
//each chunk now is a separate line!
})
```
`split` takes the same arguments as `string.split` except it defaults to '/\r?\n/', and the optional `limit` paremeter is ignored.
[String#split](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String/split)
`split` takes an optional options object on it's third argument, which
is directly passed as a
[Transform](https://nodejs.org/api/stream.html#stream_new_stream_transform_options)
option.
Additionally, the `.maxLength` and `.skipOverflow` options are implemented, which set limits on the internal
buffer size and the stream's behavior when the limit is exceeded. There is no limit unless `maxLength` is set. When
the internal buffer size exceeds `maxLength`, the stream emits an error by default. You may also set `skipOverflow` to
true to suppress the error and instead skip past any lines that cause the internal buffer to exceed `maxLength`.
Calling `.destroy` will make the stream emit `close`. Use this to perform cleanup logic
``` js
var splitFile = function(filename) {
var file = fs.createReadStream(filename)
return file
.pipe(split2())
.on('close', function() {
// destroy the file stream in case the split stream was destroyed
file.destroy()
})
}
var stream = splitFile('my-file.txt')
stream.destroy() // will destroy the input file stream
```
# NDJ - Newline Delimited Json
`split2` accepts a function which transforms each line.
``` js
fs.createReadStream(file)
.pipe(split2(JSON.parse))
.on('data', function (obj) {
//each chunk now is a js object
})
.on("error", function(error) {
//handling parsing errors
})
```
However, in [@dominictarr](https://github.com/dominictarr) [`split`](https://github.com/dominictarr/split) the mapper
is wrapped in a try-catch, while here it is not: if your parsing logic can throw, wrap it yourself. Otherwise, you can also use the stream error handling when mapper function throw.
# License
Copyright (c) 2014-2021, Matteo Collina <hello@matteocollina.com>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

View File

@@ -0,0 +1 @@
{"version":3,"file":"findOne.d.ts","sourceRoot":"","sources":["../../../src/preferences/requestHandlers/findOne.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAK3D,eAAO,MAAM,eAAe,EAAE,cAsC7B,CAAA"}

View File

@@ -0,0 +1,2 @@
export { pl } from '@payloadcms/translations/languages/pl';
//# sourceMappingURL=pl.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"VersionPillLabel.d.ts","sourceRoot":"","sources":["../../../../src/views/Version/VersionPillLabel/VersionPillLabel.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAI9C,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,cAAc,CAAA;AAarB,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC;IACtC,yBAAyB,CAAC,EAAE,eAAe,CAAC,GAAG,CAAC,CAAA;IAChD,WAAW,CAAC,EAAE,OAAO,CAAA;IAErB,GAAG,EAAE;QACH,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;QACtB,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;QACnB,eAAe,CAAC,EAAE,MAAM,CAAA;QACxB,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,OAAO,EAAE;YACP,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;YACtB,OAAO,EAAE,OAAO,GAAG,WAAW,CAAA;YAC9B,SAAS,EAAE,MAAM,CAAA;SAClB,CAAA;KACF,CAAA;IACD;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC/B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC5B,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC7B,kBAAkB,CAAC,EAAE,eAAe,CAAC,GAAG,CAAC,CAAA;CAC1C,CAwEA,CAAA"}

View File

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

View File

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

View File

@@ -0,0 +1,6 @@
export { importDateFNSLocale } from '../importDateFNSLocale.js';
export { getTranslation } from '../utilities/getTranslation.js';
export { initI18n, t } from '../utilities/init.js';
export { acceptedLanguages, extractHeaderLanguage, rtlLanguages } from '../utilities/languages.js';
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,59 @@
import { normalizeDates } from "./_lib/normalizeDates.js";
import { max } from "./max.js";
import { min } from "./min.js";
/**
* The {@link clamp} function options.
*/
/**
* The {@link clamp} function result type. It resolves the proper data type.
* It uses the first argument date object type, starting from the date argument,
* then the start interval date, and finally the end interval date. If
* a context function is passed, it uses the context function return type.
*/
/**
* @name clamp
* @category Interval Helpers
* @summary Return a date bounded by the start and the end of the given interval.
*
* @description
* Clamps a date to the lower bound with the start of the interval and the upper
* bound with the end of the interval.
*
* - When the date is less than the start of the interval, the start is returned.
* - When the date is greater than the end of the interval, the end is returned.
* - Otherwise the date is returned.
*
* @typeParam DateType - Date argument type.
* @typeParam IntervalType - Interval argument type.
* @typeParam Options - Options type.
*
* @param date - The date to be bounded
* @param interval - The interval to bound to
* @param options - An object with options
*
* @returns The date bounded by the start and the end of the interval
*
* @example
* // What is Mar 21, 2021 bounded to an interval starting at Mar 22, 2021 and ending at Apr 01, 2021
* const result = clamp(new Date(2021, 2, 21), {
* start: new Date(2021, 2, 22),
* end: new Date(2021, 3, 1),
* })
* //=> Mon Mar 22 2021 00:00:00
*/
export function clamp(date, interval, options) {
const [date_, start, end] = normalizeDates(
options?.in,
date,
interval.start,
interval.end,
);
return min([max([date_, start], options), end], options);
}
// Fallback for modularized imports:
export default clamp;

View File

@@ -0,0 +1,51 @@
import * as encoder from "./encoder";
export function encodeNode(n) {
switch (n.type) {
case "ModuleImport":
// $FlowIgnore: ModuleImport ensure that the node is well formated
return encoder.encodeModuleImport(n);
case "SectionMetadata":
// $FlowIgnore: SectionMetadata ensure that the node is well formated
return encoder.encodeSectionMetadata(n);
case "CallInstruction":
// $FlowIgnore: SectionMetadata ensure that the node is well formated
return encoder.encodeCallInstruction(n);
case "CallIndirectInstruction":
// $FlowIgnore: SectionMetadata ensure that the node is well formated
return encoder.encodeCallIndirectInstruction(n);
case "TypeInstruction":
return encoder.encodeTypeInstruction(n);
case "Instr":
// $FlowIgnore
return encoder.encodeInstr(n);
case "ModuleExport":
// $FlowIgnore: SectionMetadata ensure that the node is well formated
return encoder.encodeModuleExport(n);
case "Global":
// $FlowIgnore
return encoder.encodeGlobal(n);
case "Func":
return encoder.encodeFuncBody(n);
case "IndexInFuncSection":
return encoder.encodeIndexInFuncSection(n);
case "StringLiteral":
return encoder.encodeStringLiteral(n);
case "Elem":
return encoder.encodeElem(n);
default:
throw new Error("Unsupported encoding for node of type: " + JSON.stringify(n.type));
}
}
export var encodeU32 = encoder.encodeU32;

View File

@@ -0,0 +1 @@
{"version":3,"file":"scope.js","sources":["../../../src/sdk/scope.ts"],"sourcesContent":["import { context } from '@opentelemetry/api';\nimport type { Scope } from '@sentry/core';\nimport { getScopesFromContext } from '@sentry/opentelemetry';\n\n/**\n * Update the active isolation scope.\n * Should be used with caution!\n */\nexport function setIsolationScope(isolationScope: Scope): void {\n const scopes = getScopesFromContext(context.active());\n if (scopes) {\n scopes.isolationScope = isolationScope;\n }\n}\n"],"names":[],"mappings":";;;AAIA;AACA;AACA;AACA;AACO,SAAS,iBAAiB,CAAC,cAAc,EAAe;AAC/D,EAAE,MAAM,MAAA,GAAS,oBAAoB,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;AACvD,EAAE,IAAI,MAAM,EAAE;AACd,IAAI,MAAM,CAAC,cAAA,GAAiB,cAAc;AAC1C,EAAE;AACF;;;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"badge-plus.js","sources":["../../../src/icons/badge-plus.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name BadgePlus\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMy44NSA4LjYyYTQgNCAwIDAgMSA0Ljc4LTQuNzcgNCA0IDAgMCAxIDYuNzQgMCA0IDQgMCAwIDEgNC43OCA0Ljc4IDQgNCAwIDAgMSAwIDYuNzQgNCA0IDAgMCAxLTQuNzcgNC43OCA0IDQgMCAwIDEtNi43NSAwIDQgNCAwIDAgMS00Ljc4LTQuNzcgNCA0IDAgMCAxIDAtNi43NloiIC8+CiAgPGxpbmUgeDE9IjEyIiB4Mj0iMTIiIHkxPSI4IiB5Mj0iMTYiIC8+CiAgPGxpbmUgeDE9IjgiIHgyPSIxNiIgeTE9IjEyIiB5Mj0iMTIiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/badge-plus\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 BadgePlus = createLucideIcon('BadgePlus', [\n [\n 'path',\n {\n d: 'M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z',\n key: '3c2336',\n },\n ],\n ['line', { x1: '12', x2: '12', y1: '8', y2: '16', key: '10p56q' }],\n ['line', { x1: '8', x2: '16', y1: '12', y2: '12', key: '1jonct' }],\n]);\n\nexport default BadgePlus;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,iBAAiB,WAAa,CAAA,CAAA,CAAA;AAAA,CAC9C,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACjE,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACnE,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,26 @@
var baseIteratee = require('./_baseIteratee'),
baseSortedUniq = require('./_baseSortedUniq');
/**
* This method is like `_.uniqBy` except that it's designed and optimized
* for sorted arrays.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The array to inspect.
* @param {Function} [iteratee] The iteratee invoked per element.
* @returns {Array} Returns the new duplicate free array.
* @example
*
* _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
* // => [1.1, 2.3]
*/
function sortedUniqBy(array, iteratee) {
return (array && array.length)
? baseSortedUniq(array, baseIteratee(iteratee, 2))
: [];
}
module.exports = sortedUniqBy;

View File

@@ -0,0 +1,317 @@
'use strict'
import * as utils from './utils.js'
const has = Object.prototype.hasOwnProperty
const isArray = Array.isArray
const defaults = {
allowDots: false,
allowEmptyArrays: false,
allowPrototypes: false,
allowSparse: false,
arrayLimit: 20,
charset: 'utf-8',
charsetSentinel: false,
comma: false,
decodeDotInKeys: false,
decoder: utils.decode,
delimiter: '&',
depth: 5,
duplicates: 'combine',
ignoreQueryPrefix: false,
interpretNumericEntities: false,
parameterLimit: 1000,
parseArrays: true,
plainObjects: false,
strictNullHandling: false,
}
const interpretNumericEntities = function (str) {
return str.replace(/&#(\d+);/g, function ($0, numberStr) {
return String.fromCharCode(parseInt(numberStr, 10))
})
}
const parseArrayValue = function (val, options) {
if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {
return val.split(',')
}
return val
}
// This is what browsers will submit when the ✓ character occurs in an
// application/x-www-form-urlencoded body and the encoding of the page containing
// the form is iso-8859-1, or when the submitted form has an accept-charset
// attribute of iso-8859-1. Presumably also with other charsets that do not contain
// the ✓ character, such as us-ascii.
const isoSentinel = 'utf8=%26%2310003%3B' // encodeURIComponent('&#10003;')
// These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.
const charsetSentinel = 'utf8=%E2%9C%93' // encodeURIComponent('✓')
const parseValues = function parseQueryStringValues(str, options) {
const obj = { __proto__: null }
const cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str
const limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit
const parts = cleanStr.split(options.delimiter, limit)
let skipIndex = -1 // Keep track of where the utf8 sentinel was found
let i
let charset = options.charset
if (options.charsetSentinel) {
for (i = 0; i < parts.length; ++i) {
if (parts[i].indexOf('utf8=') === 0) {
if (parts[i] === charsetSentinel) {
charset = 'utf-8'
} else if (parts[i] === isoSentinel) {
charset = 'iso-8859-1'
}
skipIndex = i
i = parts.length // The eslint settings do not allow break;
}
}
}
for (i = 0; i < parts.length; ++i) {
if (i === skipIndex) {
continue
}
const part = parts[i]
const bracketEqualsPos = part.indexOf(']=')
const pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1
let key, val
if (pos === -1) {
key = options.decoder(part, defaults.decoder, charset, 'key')
val = options.strictNullHandling ? null : ''
} else {
key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key')
val = utils.maybeMap(parseArrayValue(part.slice(pos + 1), options), function (encodedVal) {
return options.decoder(encodedVal, defaults.decoder, charset, 'value')
})
}
if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
val = interpretNumericEntities(val)
}
if (part.indexOf('[]=') > -1) {
val = isArray(val) ? [val] : val
}
const existing = has.call(obj, key)
if (existing && options.duplicates === 'combine') {
obj[key] = utils.combine(obj[key], val)
} else if (!existing || options.duplicates === 'last') {
obj[key] = val
}
}
return obj
}
const parseObject = function (chain, val, options, valuesParsed) {
let leaf = valuesParsed ? val : parseArrayValue(val, options)
for (let i = chain.length - 1; i >= 0; --i) {
let obj
const root = chain[i]
if (root === '[]' && options.parseArrays) {
obj = options.allowEmptyArrays && leaf === '' ? [] : [].concat(leaf)
} else {
obj = options.plainObjects ? Object.create(null) : {}
const cleanRoot =
root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root
const decodedRoot = options.decodeDotInKeys ? cleanRoot.replace(/%2E/g, '.') : cleanRoot
const index = parseInt(decodedRoot, 10)
if (!options.parseArrays && decodedRoot === '') {
obj = { 0: leaf }
} else if (
!isNaN(index) &&
root !== decodedRoot &&
String(index) === decodedRoot &&
index >= 0 &&
options.parseArrays &&
index <= options.arrayLimit
) {
obj = []
obj[index] = leaf
} else if (decodedRoot !== '__proto__') {
obj[decodedRoot] = leaf
}
}
leaf = obj
}
return leaf
}
const parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
if (!givenKey) {
return
}
// Transform dot notation to bracket notation
const key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey
// The regex chunks
const brackets = /(\[[^[\]]*])/
const child = /(\[[^[\]]*])/g
// Get the parent
let segment = options.depth > 0 && brackets.exec(key)
const parent = segment ? key.slice(0, segment.index) : key
// Stash the parent if it exists
const keys = []
if (parent) {
// If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties
if (!options.plainObjects && has.call(Object.prototype, parent)) {
if (!options.allowPrototypes) {
return
}
}
keys.push(parent)
}
// Loop through children appending to the array until we hit depth
let i = 0
while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
i += 1
if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
if (!options.allowPrototypes) {
return
}
}
keys.push(segment[1])
}
// If there's a remainder, just add whatever is left
if (segment) {
keys.push('[' + key.slice(segment.index) + ']')
}
return parseObject(keys, val, options, valuesParsed)
}
const normalizeParseOptions = function normalizeParseOptions(opts) {
if (!opts) {
return defaults
}
if (typeof opts.allowEmptyArrays !== 'undefined' && typeof opts.allowEmptyArrays !== 'boolean') {
throw new TypeError('`allowEmptyArrays` option can only be `true` or `false`, when provided')
}
if (typeof opts.decodeDotInKeys !== 'undefined' && typeof opts.decodeDotInKeys !== 'boolean') {
throw new TypeError('`decodeDotInKeys` option can only be `true` or `false`, when provided')
}
if (
opts.decoder !== null &&
typeof opts.decoder !== 'undefined' &&
typeof opts.decoder !== 'function'
) {
throw new TypeError('Decoder has to be a function.')
}
if (
typeof opts.charset !== 'undefined' &&
opts.charset !== 'utf-8' &&
opts.charset !== 'iso-8859-1'
) {
throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined')
}
const charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset
const duplicates = typeof opts.duplicates === 'undefined' ? defaults.duplicates : opts.duplicates
if (duplicates !== 'combine' && duplicates !== 'first' && duplicates !== 'last') {
throw new TypeError('The duplicates option must be either combine, first, or last')
}
const allowDots =
typeof opts.allowDots === 'undefined'
? opts.decodeDotInKeys === true
? true
: defaults.allowDots
: !!opts.allowDots
return {
allowDots: allowDots,
allowEmptyArrays:
typeof opts.allowEmptyArrays === 'boolean'
? !!opts.allowEmptyArrays
: defaults.allowEmptyArrays,
allowPrototypes:
typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,
allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse,
arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,
charset: charset,
charsetSentinel:
typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,
decodeDotInKeys:
typeof opts.decodeDotInKeys === 'boolean' ? opts.decodeDotInKeys : defaults.decodeDotInKeys,
decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,
delimiter:
typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter)
? opts.delimiter
: defaults.delimiter,
// eslint-disable-next-line no-implicit-coercion, no-extra-parens
depth: typeof opts.depth === 'number' || opts.depth === false ? +opts.depth : defaults.depth,
duplicates: duplicates,
ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
interpretNumericEntities:
typeof opts.interpretNumericEntities === 'boolean'
? opts.interpretNumericEntities
: defaults.interpretNumericEntities,
parameterLimit:
typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,
parseArrays: opts.parseArrays !== false,
plainObjects:
typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,
strictNullHandling:
typeof opts.strictNullHandling === 'boolean'
? opts.strictNullHandling
: defaults.strictNullHandling,
}
}
export function parse(str, opts) {
const options = normalizeParseOptions(opts)
if (str === '' || str === null || typeof str === 'undefined') {
return options.plainObjects ? Object.create(null) : {}
}
const tempObj = typeof str === 'string' ? parseValues(str, options) : str
let obj = options.plainObjects ? Object.create(null) : {}
// Iterate over the keys and setup the new object
const keys = Object.keys(tempObj)
for (let i = 0; i < keys.length; ++i) {
const key = keys[i]
const newObj = parseKeys(key, tempObj[key], options, typeof str === 'string')
obj = utils.merge(obj, newObj, options)
}
if (options.allowSparse === true) {
return obj
}
return utils.compact(obj)
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"scan-line.js","sources":["../../../src/icons/scan-line.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ScanLine\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMyA3VjVhMiAyIDAgMCAxIDItMmgyIiAvPgogIDxwYXRoIGQ9Ik0xNyAzaDJhMiAyIDAgMCAxIDIgMnYyIiAvPgogIDxwYXRoIGQ9Ik0yMSAxN3YyYTIgMiAwIDAgMS0yIDJoLTIiIC8+CiAgPHBhdGggZD0iTTcgMjFINWEyIDIgMCAwIDEtMi0ydi0yIiAvPgogIDxwYXRoIGQ9Ik03IDEyaDEwIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/scan-line\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 ScanLine = createLucideIcon('ScanLine', [\n ['path', { d: 'M3 7V5a2 2 0 0 1 2-2h2', key: 'aa7l1z' }],\n ['path', { d: 'M17 3h2a2 2 0 0 1 2 2v2', key: '4qcy5o' }],\n ['path', { d: 'M21 17v2a2 2 0 0 1-2 2h-2', key: '6vwrx8' }],\n ['path', { d: 'M7 21H5a2 2 0 0 1-2-2v-2', key: 'ioqczr' }],\n ['path', { d: 'M7 12h10', key: 'b7w52i' }],\n]);\n\nexport default ScanLine;\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,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,CAA2B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC1D,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,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/elements/CheckboxPopup/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAInD,OAAO,cAAc,CAAA;AAIrB,KAAK,kBAAkB,GAAG;IACxB,MAAM,EAAE,KAAK,CAAC,SAAS,CAAA;IACvB,QAAQ,EAAE,CAAC,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,IAAI,CAAC;QAAC,cAAc,EAAE,MAAM,EAAE,CAAA;KAAE,KAAK,IAAI,CAAA;IACzE,OAAO,EAAE;QACP,KAAK,EAAE,MAAM,CAAA;QACb,KAAK,EAAE,MAAM,CAAA;KACd,EAAE,CAAA;IACH,cAAc,EAAE,MAAM,EAAE,CAAA;CACzB,GAAG,IAAI,CAAC,UAAU,EAAE,QAAQ,GAAG,QAAQ,CAAC,CAAA;AACzC,wBAAgB,aAAa,CAAC,EAC5B,MAAM,EACN,SAAS,EACT,QAAQ,EACR,OAAO,EACP,cAAc,EACd,GAAG,UAAU,EACd,EAAE,kBAAkB,+BA4BpB"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"userAgent.d.ts","sourceRoot":"","sources":["../../../src/transports/userAgent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE5D;;;;;;GAMG;AACH,wBAAgB,8BAA8B,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI,CAY3E"}

View File

@@ -0,0 +1,61 @@
import type { ContextOptions, Interval, StepOptions } from "./types.js";
/**
* The {@link eachYearOfInterval} function options.
*/
export interface EachYearOfIntervalOptions<DateType extends Date = Date>
extends StepOptions,
ContextOptions<DateType> {}
/**
* The {@link eachYearOfInterval} function result type. It resolves the proper data type.
* It uses the first argument date object type, starting from the date argument,
* then the start interval date, and finally the end interval date. If
* a context function is passed, it uses the context function return type.
*/
export type EachYearOfIntervalResult<
IntervalType extends Interval,
Options extends EachYearOfIntervalOptions | undefined,
> = Array<
Options extends EachYearOfIntervalOptions<infer DateType>
? DateType
: IntervalType["start"] extends Date
? IntervalType["start"]
: IntervalType["end"] extends Date
? IntervalType["end"]
: Date
>;
/**
* @name eachYearOfInterval
* @category Interval Helpers
* @summary Return the array of yearly timestamps within the specified time interval.
*
* @description
* Return the array of yearly timestamps within the specified time interval.
*
* @typeParam IntervalType - Interval type.
* @typeParam Options - Options type.
*
* @param interval - The interval.
* @param options - An object with options.
*
* @returns The array with starts of yearly timestamps from the month of the interval start to the month of the interval end
*
* @example
* // Each year between 6 February 2014 and 10 August 2017:
* const result = eachYearOfInterval({
* start: new Date(2014, 1, 6),
* end: new Date(2017, 7, 10)
* })
* //=> [
* // Wed Jan 01 2014 00:00:00,
* // Thu Jan 01 2015 00:00:00,
* // Fri Jan 01 2016 00:00:00,
* // Sun Jan 01 2017 00:00:00
* // ]
*/
export declare function eachYearOfInterval<
IntervalType extends Interval,
Options extends EachYearOfIntervalOptions | undefined = undefined,
>(
interval: IntervalType,
options?: Options,
): EachYearOfIntervalResult<IntervalType, Options>;

View File

@@ -0,0 +1,145 @@
import pino from '../../pino'
import { expectType } from "tsd";
// Single
const transport = pino.transport({
target: '#pino/pretty',
options: { some: 'options for', the: 'transport' }
})
pino(transport)
expectType<pino.Logger>(pino({
transport: {
target: 'pino-pretty'
},
}))
// Multiple
const transports = pino.transport({targets: [
{
level: 'info',
target: '#pino/pretty',
options: { some: 'options for', the: 'transport' }
},
{
level: 'trace',
target: '#pino/file',
options: { destination: './test.log' }
}
]})
pino(transports)
expectType<pino.Logger>(pino({
transport: {targets: [
{
level: 'info',
target: '#pino/pretty',
options: { some: 'options for', the: 'transport' }
},
{
level: 'trace',
target: '#pino/file',
options: { destination: './test.log' }
}
]},
}))
const transportsWithCustomLevels = pino.transport({targets: [
{
level: 'info',
target: '#pino/pretty',
options: { some: 'options for', the: 'transport' }
},
{
level: 'foo',
target: '#pino/file',
options: { destination: './test.log' }
}
], levels: { foo: 35 }})
pino(transports)
expectType<pino.Logger>(pino({
transport: {targets: [
{
level: 'info',
target: '#pino/pretty',
options: { some: 'options for', the: 'transport' }
},
{
level: 'trace',
target: '#pino/file',
options: { destination: './test.log' }
}
], levels: { foo: 35 }
},
}))
const transportsWithoutOptions = pino.transport({
targets: [
{ target: '#pino/pretty' },
{ target: '#pino/file' }
], levels: { foo: 35 }
})
pino(transports)
expectType<pino.Logger>(pino({
transport: {
targets: [
{ target: '#pino/pretty' },
{ target: '#pino/file' }
], levels: { foo: 35 }
},
}))
const pipelineTransport = pino.transport({
pipeline: [{
target: './my-transform.js'
}, {
// Use target: 'pino/file' to write to stdout
// without any change.
target: 'pino-pretty'
}]
})
pino(pipelineTransport)
expectType<pino.Logger>(pino({
transport: {
pipeline: [{
target: './my-transform.js'
}, {
// Use target: 'pino/file' to write to stdout
// without any change.
target: 'pino-pretty'
}]
}
}))
type TransportConfig = {
id: string
}
// Custom transport params
const customTransport = pino.transport<TransportConfig>({
target: 'custom',
options: { id: 'abc' }
})
pino(customTransport)
// Worker
pino.transport({
target: 'custom',
worker: {
argv: ['a', 'b'],
stdin: false,
stderr: true,
stdout: false,
autoEnd: true,
},
options: { id: 'abc' }
})
// Dedupe
pino.transport({
targets: [],
dedupe: true,
})

View File

@@ -0,0 +1,2 @@
import{throwIfEmpty as e}from"../../utils/throw-if-empty.js";const t=(t,n,r)=>()=>(e(t,`Keys cannot be empty`),{path:`/operations`,params:r??{},body:JSON.stringify({keys:t,data:n}),method:`PATCH`}),n=(e,t)=>()=>({path:`/operations`,params:t??{},body:JSON.stringify(e),method:`PATCH`}),r=(t,n,r)=>()=>(e(t,`Key cannot be empty`),{path:`/operations/${t}`,params:r??{},body:JSON.stringify(n),method:`PATCH`});export{r as updateOperation,t as updateOperations,n as updateOperationsBatch};
//# sourceMappingURL=operations.js.map

View File

@@ -0,0 +1,5 @@
function hasTarget(target, targets) {
return targets.has(target) && Object.keys(targets.get(target)).length > 0;
}
export { hasTarget };

View File

@@ -0,0 +1,46 @@
import { toDate } from "./toDate.js";
/**
* @name compareDesc
* @category Common Helpers
* @summary Compare the two dates reverse chronologically and return -1, 0 or 1.
*
* @description
* Compare the two dates and return -1 if the first date is after the second,
* 1 if the first date is before the second or 0 if dates are equal.
*
* @param dateLeft - The first date to compare
* @param dateRight - The second date to compare
*
* @returns The result of the comparison
*
* @example
* // Compare 11 February 1987 and 10 July 1989 reverse chronologically:
* const result = compareDesc(new Date(1987, 1, 11), new Date(1989, 6, 10))
* //=> 1
*
* @example
* // Sort the array of dates in reverse chronological order:
* const result = [
* new Date(1995, 6, 2),
* new Date(1987, 1, 11),
* new Date(1989, 6, 10)
* ].sort(compareDesc)
* //=> [
* // Sun Jul 02 1995 00:00:00,
* // Mon Jul 10 1989 00:00:00,
* // Wed Feb 11 1987 00:00:00
* // ]
*/
export function compareDesc(dateLeft, dateRight) {
const diff = +toDate(dateLeft) - +toDate(dateRight);
if (diff > 0) return -1;
else if (diff < 0) return 1;
// Return 0 if diff is 0; return NaN if diff is NaN
return diff;
}
// Fallback for modularized imports:
export default compareDesc;

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sources":["../../../../../src/profiling/index.ts"],"sourcesContent":["import type { Profiler } from '@sentry/core';\nimport { debug, getClient } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build';\n\n/**\n * Starts the Sentry UI profiler.\n * This mode is exclusive with the transaction profiler and will only work if the profilesSampleRate is set to a falsy value.\n * In UI profiling mode, the profiler will keep reporting profile chunks to Sentry until it is stopped, which allows for continuous profiling of the application.\n */\nfunction startProfiler(): void {\n const client = getClient();\n if (!client) {\n DEBUG_BUILD && debug.warn('No Sentry client available, profiling is not started');\n return;\n }\n\n const integration = client.getIntegrationByName('BrowserProfiling');\n\n if (!integration) {\n DEBUG_BUILD && debug.warn('BrowserProfiling integration is not available');\n return;\n }\n\n client.emit('startUIProfiler');\n}\n\n/**\n * Stops the Sentry UI profiler.\n * Calls to stop will stop the profiler and flush the currently collected profile data to Sentry.\n */\nfunction stopProfiler(): void {\n const client = getClient();\n if (!client) {\n DEBUG_BUILD && debug.warn('No Sentry client available, profiling is not started');\n return;\n }\n\n const integration = client.getIntegrationByName('BrowserProfiling');\n if (!integration) {\n DEBUG_BUILD && debug.warn('ProfilingIntegration is not available');\n return;\n }\n\n client.emit('stopUIProfiler');\n}\n\n/**\n * Profiler namespace for controlling the JS profiler in 'manual' mode.\n *\n * Requires the `browserProfilingIntegration` from the `@sentry/browser` package.\n */\nexport const uiProfiler: Profiler = {\n startProfiler,\n stopProfiler,\n};\n"],"names":["getClient","DEBUG_BUILD","debug"],"mappings":";;;;;AAIA;AACA;AACA;AACA;AACA;AACA,SAAS,aAAa,GAAS;AAC/B,EAAE,MAAM,MAAA,GAASA,cAAS,EAAE;AAC5B,EAAE,IAAI,CAAC,MAAM,EAAE;AACf,IAAIC,0BAAeC,UAAK,CAAC,IAAI,CAAC,sDAAsD,CAAC;AACrF,IAAI;AACJ,EAAE;;AAEF,EAAE,MAAM,cAAc,MAAM,CAAC,oBAAoB,CAAC,kBAAkB,CAAC;;AAErE,EAAE,IAAI,CAAC,WAAW,EAAE;AACpB,IAAID,0BAAeC,UAAK,CAAC,IAAI,CAAC,+CAA+C,CAAC;AAC9E,IAAI;AACJ,EAAE;;AAEF,EAAE,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC;AAChC;;AAEA;AACA;AACA;AACA;AACA,SAAS,YAAY,GAAS;AAC9B,EAAE,MAAM,MAAA,GAASF,cAAS,EAAE;AAC5B,EAAE,IAAI,CAAC,MAAM,EAAE;AACf,IAAIC,0BAAeC,UAAK,CAAC,IAAI,CAAC,sDAAsD,CAAC;AACrF,IAAI;AACJ,EAAE;;AAEF,EAAE,MAAM,cAAc,MAAM,CAAC,oBAAoB,CAAC,kBAAkB,CAAC;AACrE,EAAE,IAAI,CAAC,WAAW,EAAE;AACpB,IAAID,0BAAeC,UAAK,CAAC,IAAI,CAAC,uCAAuC,CAAC;AACtE,IAAI;AACJ,EAAE;;AAEF,EAAE,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC;AAC/B;;AAEA;AACA;AACA;AACA;AACA;AACO,MAAM,UAAU,GAAa;AACpC,EAAE,aAAa;AACf,EAAE,YAAY;AACd;;;;"}

View File

@@ -0,0 +1,51 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.dynamicRef = void 0;
const codegen_1 = require("../../compile/codegen");
const names_1 = require("../../compile/names");
const ref_1 = require("../core/ref");
const def = {
keyword: "$dynamicRef",
schemaType: "string",
code: (cxt) => dynamicRef(cxt, cxt.schema),
};
function dynamicRef(cxt, ref) {
const { gen, keyword, it } = cxt;
if (ref[0] !== "#")
throw new Error(`"${keyword}" only supports hash fragment reference`);
const anchor = ref.slice(1);
if (it.allErrors) {
_dynamicRef();
}
else {
const valid = gen.let("valid", false);
_dynamicRef(valid);
cxt.ok(valid);
}
function _dynamicRef(valid) {
// TODO the assumption here is that `recursiveRef: #` always points to the root
// of the schema object, which is not correct, because there may be $id that
// makes # point to it, and the target schema may not contain dynamic/recursiveAnchor.
// Because of that 2 tests in recursiveRef.json fail.
// This is a similar problem to #815 (`$id` doesn't alter resolution scope for `{ "$ref": "#" }`).
// (This problem is not tested in JSON-Schema-Test-Suite)
if (it.schemaEnv.root.dynamicAnchors[anchor]) {
const v = gen.let("_v", (0, codegen_1._) `${names_1.default.dynamicAnchors}${(0, codegen_1.getProperty)(anchor)}`);
gen.if(v, _callRef(v, valid), _callRef(it.validateName, valid));
}
else {
_callRef(it.validateName, valid)();
}
}
function _callRef(validate, valid) {
return valid
? () => gen.block(() => {
(0, ref_1.callRef)(cxt, validate);
gen.let(valid, true);
})
: () => (0, ref_1.callRef)(cxt, validate);
}
}
exports.dynamicRef = dynamicRef;
exports.default = def;
//# sourceMappingURL=dynamicRef.js.map

View File

@@ -0,0 +1,39 @@
import { buildFormatLongFn } from "../../_lib/buildFormatLongFn.js";
const dateFormats = {
full: "y. MMMM d., EEEE",
long: "y. MMMM d.",
medium: "y. MMM d.",
short: "y. MM. dd.",
};
const timeFormats = {
full: "H:mm:ss zzzz",
long: "H:mm:ss z",
medium: "H:mm:ss",
short: "H:mm",
};
const dateTimeFormats = {
full: "{{date}} {{time}}",
long: "{{date}} {{time}}",
medium: "{{date}} {{time}}",
short: "{{date}} {{time}}",
};
export const formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full",
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "full",
}),
};

View File

@@ -0,0 +1 @@
Prism.languages.bison=Prism.languages.extend("c",{}),Prism.languages.insertBefore("bison","comment",{bison:{pattern:/^(?:[^%]|%(?!%))*%%[\s\S]*?%%/,inside:{c:{pattern:/%\{[\s\S]*?%\}|\{(?:\{[^}]*\}|[^{}])*\}/,inside:{delimiter:{pattern:/^%?\{|%?\}$/,alias:"punctuation"},"bison-variable":{pattern:/[$@](?:<[^\s>]+>)?[\w$]+/,alias:"variable",inside:{punctuation:/<|>/}},rest:Prism.languages.c}},comment:Prism.languages.c.comment,string:Prism.languages.c.string,property:/\S+(?=:)/,keyword:/%\w+/,number:{pattern:/(^|[^@])\b(?:0x[\da-f]+|\d+)/i,lookbehind:!0},punctuation:/%[%?]|[|:;\[\]<>]/}}});

View File

@@ -0,0 +1,16 @@
range-set ::= range ( logical-or range ) *
logical-or ::= ( ' ' ) * '||' ( ' ' ) *
range ::= hyphen | simple ( ' ' simple ) * | ''
hyphen ::= partial ' - ' partial
simple ::= primitive | partial | tilde | caret
primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial
partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
xr ::= 'x' | 'X' | '*' | nr
nr ::= '0' | [1-9] ( [0-9] ) *
tilde ::= '~' partial
caret ::= '^' partial
qualifier ::= ( '-' pre )? ( '+' build )?
pre ::= parts
build ::= parts
parts ::= part ( '.' part ) *
part ::= nr | [-0-9A-Za-z]+

View File

@@ -0,0 +1 @@
{"version":3,"file":"useThrottledEffect.d.ts","sourceRoot":"","sources":["../../src/hooks/useThrottledEffect.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,KAAK,kBAAkB,GAAG,CACxB,QAAQ,EAAE,KAAK,CAAC,cAAc,EAC9B,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,KAAK,CAAC,cAAc,KACvB,IAAI,CAAA;AAET;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,EAAE,kBAkBhC,CAAA"}

View File

@@ -0,0 +1,3 @@
module.exports = {
loader: require.resolve('./dist/webpack')
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"cone.js","sources":["../../../src/icons/cone.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Cone\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMjAuOSAxOC41NS04LTE1Ljk4YTEgMSAwIDAgMC0xLjggMGwtOCAxNS45OCIgLz4KICA8ZWxsaXBzZSBjeD0iMTIiIGN5PSIxOSIgcng9IjkiIHJ5PSIzIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/cone\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 Cone = createLucideIcon('Cone', [\n ['path', { d: 'm20.9 18.55-8-15.98a1 1 0 0 0-1.8 0l-8 15.98', key: '53pte7' }],\n ['ellipse', { cx: '12', cy: '19', rx: '9', ry: '3', key: '1ji25f' }],\n]);\n\nexport default Cone;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,iBAAiB,MAAQ,CAAA,CAAA,CAAA;AAAA,CAAA,CACpC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAgD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAC7E,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,CAAE,CAAA,CAAA,CAAA,EAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACrE,CAAC,CAAA,CAAA;;"}

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fields/Array/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,yBAAyB,EAG1B,MAAM,SAAS,CAAA;AAGhB,OAAO,KAAgD,MAAM,OAAO,CAAA;AAiCpE,OAAO,cAAc,CAAA;AAIrB,eAAO,MAAM,mBAAmB,EAAE,yBA6bjC,CAAA;AAED,eAAO,MAAM,UAAU;;;;+EAAqC,CAAA"}

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 CalendarArrowDown = createLucideIcon("CalendarArrowDown", [
["path", { d: "m14 18 4 4 4-4", key: "1waygx" }],
["path", { d: "M16 2v4", key: "4m81vk" }],
["path", { d: "M18 14v8", key: "irew45" }],
[
"path",
{ d: "M21 11.354V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7.343", key: "bse4f3" }
],
["path", { d: "M3 10h18", key: "8toen8" }],
["path", { d: "M8 2v4", key: "1cmpym" }]
]);
export { CalendarArrowDown as default };
//# sourceMappingURL=calendar-arrow-down.js.map

View File

@@ -0,0 +1,23 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const MapPinCheck = createLucideIcon("MapPinCheck", [
[
"path",
{
d: "M19.43 12.935c.357-.967.57-1.955.57-2.935a8 8 0 0 0-16 0c0 4.993 5.539 10.193 7.399 11.799a1 1 0 0 0 1.202 0 32.197 32.197 0 0 0 .813-.728",
key: "1dq61d"
}
],
["circle", { cx: "12", cy: "10", r: "3", key: "ilqhr7" }],
["path", { d: "m16 18 2 2 4-4", key: "1mkfmb" }]
]);
export { MapPinCheck as default };
//# sourceMappingURL=map-pin-check.js.map

View File

@@ -0,0 +1,44 @@
type ModeWriter = (doc: Doc, modes: { execution: "sync" | "async" }) => void;
export class Doc {
args!: string[];
content: string[] = [];
indent = 0;
constructor(args: string[] = []) {
if (this) this.args = args;
}
indented(fn: (doc: Doc) => void) {
this.indent += 1;
fn(this);
this.indent -= 1;
}
write(fn: ModeWriter): void;
write(line: string): void;
write(arg: any) {
if (typeof arg === "function") {
(arg as ModeWriter)(this, { execution: "sync" });
(arg as ModeWriter)(this, { execution: "async" });
return;
}
const content = arg as string;
const lines = content.split("\n").filter((x) => x);
const minIndent = Math.min(...lines.map((x) => x.length - x.trimStart().length));
const dedented = lines.map((x) => x.slice(minIndent)).map((x) => " ".repeat(this.indent * 2) + x);
for (const line of dedented) {
this.content.push(line);
}
}
compile() {
const F = Function;
const args = this?.args;
const content = this?.content ?? [``];
const lines = [...content.map((x) => ` ${x}`)];
// console.log(lines.join("\n"));
return new F(...args, lines.join("\n"));
}
}

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 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 M"},C:{"1":"0 1 2 3 4 5 6 7 8 vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s 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 4C 5C"},D:{"1":"0 1 2 3 4 5 6 7 8 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 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"},E:{"1":"A B C L M G cC 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 6C bC 7C 8C 9C AD"},F:{"1":"0 1 2 3 4 5 6 7 8 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":"9 F B C G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB JD KD LD MD PC xC ND QC"},G:{"1":"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 sC lD tC uC vC wC","2":"E bC OD yC PD QD RD SD TD UD"},H:{"2":"mD"},I:{"1":"I","2":"VC J nD oD pD qD yC rD sD"},J:{"2":"D A"},K:{"1":"H","2":"A B C PC xC QC"},L:{"1":"I"},M:{"1":"OC"},N:{"2":"A B"},O:{"1":"RC"},P:{"1":"9 AB BB CB DB EB FB GB HB IB vD wD xD cC yD zD 0D 1D 2D SC TC UC 3D","2":"J tD uD"},Q:{"1":"4D"},R:{"1":"5D"},S:{"1":"6D 7D"}},B:6,C:"String.prototype.padStart(), String.prototype.padEnd()",D:true};

View File

@@ -0,0 +1,837 @@
/**
* 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 clipboard = require('@lexical/clipboard');
var selection = require('@lexical/selection');
var utils = require('@lexical/utils');
var lexical = require('lexical');
/**
* 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 caretFromPoint(x, y) {
if (typeof document.caretRangeFromPoint !== 'undefined') {
const range = document.caretRangeFromPoint(x, y);
if (range === null) {
return null;
}
return {
node: range.startContainer,
offset: range.startOffset
};
// @ts-ignore
} else if (document.caretPositionFromPoint !== 'undefined') {
// @ts-ignore FF - no types
const range = document.caretPositionFromPoint(x, y);
if (range === null) {
return null;
}
return {
node: range.offsetNode,
offset: range.offset
};
} else {
// Gracefully handle IE
return null;
}
}
/**
* 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.
*
*/
const documentMode = CAN_USE_DOM && 'documentMode' in document ? document.documentMode : null;
const CAN_USE_BEFORE_INPUT = CAN_USE_DOM && 'InputEvent' in window && !documentMode ? 'getTargetRanges' in new window.InputEvent('input') : false;
const IS_SAFARI = CAN_USE_DOM && /Version\/[\d.]+.*Safari/.test(navigator.userAgent);
const IS_IOS = CAN_USE_DOM && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
// Keep these in case we need to use them in the future.
// export const IS_WINDOWS: boolean = CAN_USE_DOM && /Win/.test(navigator.platform);
const IS_CHROME = CAN_USE_DOM && /^(?=.*Chrome).*/i.test(navigator.userAgent);
const IS_APPLE_WEBKIT = CAN_USE_DOM && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !IS_CHROME;
/**
* 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 DRAG_DROP_PASTE = lexical.createCommand('DRAG_DROP_PASTE_FILE');
/** @noInheritDoc */
class QuoteNode extends lexical.ElementNode {
static getType() {
return 'quote';
}
static clone(node) {
return new QuoteNode(node.__key);
}
// View
createDOM(config) {
const element = document.createElement('blockquote');
utils.addClassNamesToElement(element, config.theme.quote);
return element;
}
updateDOM(prevNode, dom) {
return false;
}
static importDOM() {
return {
blockquote: node => ({
conversion: $convertBlockquoteElement,
priority: 0
})
};
}
exportDOM(editor) {
const {
element
} = super.exportDOM(editor);
if (utils.isHTMLElement(element)) {
if (this.isEmpty()) {
element.append(document.createElement('br'));
}
const formatType = this.getFormatType();
if (formatType) {
element.style.textAlign = formatType;
}
const direction = this.getDirection();
if (direction) {
element.dir = direction;
}
}
return {
element
};
}
static importJSON(serializedNode) {
return $createQuoteNode().updateFromJSON(serializedNode);
}
// Mutation
insertNewAfter(_, restoreSelection) {
const newBlock = lexical.$createParagraphNode();
const direction = this.getDirection();
newBlock.setDirection(direction);
this.insertAfter(newBlock, restoreSelection);
return newBlock;
}
collapseAtStart() {
const paragraph = lexical.$createParagraphNode();
const children = this.getChildren();
children.forEach(child => paragraph.append(child));
this.replace(paragraph);
return true;
}
canMergeWhenEmpty() {
return true;
}
}
function $createQuoteNode() {
return lexical.$applyNodeReplacement(new QuoteNode());
}
function $isQuoteNode(node) {
return node instanceof QuoteNode;
}
/** @noInheritDoc */
class HeadingNode extends lexical.ElementNode {
/** @internal */
static getType() {
return 'heading';
}
static clone(node) {
return new HeadingNode(node.__tag, node.__key);
}
constructor(tag, key) {
super(key);
this.__tag = tag;
}
getTag() {
return this.__tag;
}
setTag(tag) {
const self = this.getWritable();
this.__tag = tag;
return self;
}
// View
createDOM(config) {
const tag = this.__tag;
const element = document.createElement(tag);
const theme = config.theme;
const classNames = theme.heading;
if (classNames !== undefined) {
const className = classNames[tag];
utils.addClassNamesToElement(element, className);
}
return element;
}
updateDOM(prevNode, dom, config) {
return prevNode.__tag !== this.__tag;
}
static importDOM() {
return {
h1: node => ({
conversion: $convertHeadingElement,
priority: 0
}),
h2: node => ({
conversion: $convertHeadingElement,
priority: 0
}),
h3: node => ({
conversion: $convertHeadingElement,
priority: 0
}),
h4: node => ({
conversion: $convertHeadingElement,
priority: 0
}),
h5: node => ({
conversion: $convertHeadingElement,
priority: 0
}),
h6: node => ({
conversion: $convertHeadingElement,
priority: 0
}),
p: node => {
// domNode is a <p> since we matched it by nodeName
const paragraph = node;
const firstChild = paragraph.firstChild;
if (firstChild !== null && isGoogleDocsTitle(firstChild)) {
return {
conversion: () => ({
node: null
}),
priority: 3
};
}
return null;
},
span: node => {
if (isGoogleDocsTitle(node)) {
return {
conversion: domNode => {
return {
node: $createHeadingNode('h1')
};
},
priority: 3
};
}
return null;
}
};
}
exportDOM(editor) {
const {
element
} = super.exportDOM(editor);
if (utils.isHTMLElement(element)) {
if (this.isEmpty()) {
element.append(document.createElement('br'));
}
const formatType = this.getFormatType();
if (formatType) {
element.style.textAlign = formatType;
}
const direction = this.getDirection();
if (direction) {
element.dir = direction;
}
}
return {
element
};
}
static importJSON(serializedNode) {
return $createHeadingNode(serializedNode.tag).updateFromJSON(serializedNode);
}
updateFromJSON(serializedNode) {
return super.updateFromJSON(serializedNode).setTag(serializedNode.tag);
}
exportJSON() {
return {
...super.exportJSON(),
tag: this.getTag()
};
}
// Mutation
insertNewAfter(selection, restoreSelection = true) {
const anchorOffet = selection ? selection.anchor.offset : 0;
const lastDesc = this.getLastDescendant();
const isAtEnd = !lastDesc || selection && selection.anchor.key === lastDesc.getKey() && anchorOffet === lastDesc.getTextContentSize();
const newElement = isAtEnd || !selection ? lexical.$createParagraphNode() : $createHeadingNode(this.getTag());
const direction = this.getDirection();
newElement.setDirection(direction);
this.insertAfter(newElement, restoreSelection);
if (anchorOffet === 0 && !this.isEmpty() && selection) {
const paragraph = lexical.$createParagraphNode();
paragraph.select();
this.replace(paragraph, true);
}
return newElement;
}
collapseAtStart() {
const newElement = !this.isEmpty() ? $createHeadingNode(this.getTag()) : lexical.$createParagraphNode();
const children = this.getChildren();
children.forEach(child => newElement.append(child));
this.replace(newElement);
return true;
}
extractWithChild() {
return true;
}
}
function isGoogleDocsTitle(domNode) {
if (domNode.nodeName.toLowerCase() === 'span') {
return domNode.style.fontSize === '26pt';
}
return false;
}
function $convertHeadingElement(element) {
const nodeName = element.nodeName.toLowerCase();
let node = null;
if (nodeName === 'h1' || nodeName === 'h2' || nodeName === 'h3' || nodeName === 'h4' || nodeName === 'h5' || nodeName === 'h6') {
node = $createHeadingNode(nodeName);
if (element.style !== null) {
lexical.setNodeIndentFromDOM(element, node);
node.setFormat(element.style.textAlign);
}
}
return {
node
};
}
function $convertBlockquoteElement(element) {
const node = $createQuoteNode();
if (element.style !== null) {
node.setFormat(element.style.textAlign);
lexical.setNodeIndentFromDOM(element, node);
}
return {
node
};
}
function $createHeadingNode(headingTag = 'h1') {
return lexical.$applyNodeReplacement(new HeadingNode(headingTag));
}
function $isHeadingNode(node) {
return node instanceof HeadingNode;
}
function onPasteForRichText(event, editor) {
event.preventDefault();
editor.update(() => {
const selection = lexical.$getSelection();
const clipboardData = utils.objectKlassEquals(event, InputEvent) || utils.objectKlassEquals(event, KeyboardEvent) ? null : event.clipboardData;
if (clipboardData != null && selection !== null) {
clipboard.$insertDataTransferForRichText(clipboardData, selection, editor);
}
}, {
tag: lexical.PASTE_TAG
});
}
async function onCutForRichText(event, editor) {
await clipboard.copyToClipboard(editor, utils.objectKlassEquals(event, ClipboardEvent) ? event : null);
editor.update(() => {
const selection = lexical.$getSelection();
if (lexical.$isRangeSelection(selection)) {
selection.removeText();
} else if (lexical.$isNodeSelection(selection)) {
selection.getNodes().forEach(node => node.remove());
}
});
}
// Clipboard may contain files that we aren't allowed to read. While the event is arguably useless,
// in certain occasions, we want to know whether it was a file transfer, as opposed to text. We
// control this with the first boolean flag.
function eventFiles(event) {
let dataTransfer = null;
if (utils.objectKlassEquals(event, DragEvent)) {
dataTransfer = event.dataTransfer;
} else if (utils.objectKlassEquals(event, ClipboardEvent)) {
dataTransfer = event.clipboardData;
}
if (dataTransfer === null) {
return [false, [], false];
}
const types = dataTransfer.types;
const hasFiles = types.includes('Files');
const hasContent = types.includes('text/html') || types.includes('text/plain');
return [hasFiles, Array.from(dataTransfer.files), hasContent];
}
function $handleIndentAndOutdent(indentOrOutdent) {
const selection = lexical.$getSelection();
if (!lexical.$isRangeSelection(selection)) {
return false;
}
const alreadyHandled = new Set();
const nodes = selection.getNodes();
for (let i = 0; i < nodes.length; i++) {
const node = nodes[i];
const key = node.getKey();
if (alreadyHandled.has(key)) {
continue;
}
const parentBlock = utils.$findMatchingParent(node, parentNode => lexical.$isElementNode(parentNode) && !parentNode.isInline());
if (parentBlock === null) {
continue;
}
const parentKey = parentBlock.getKey();
if (parentBlock.canIndent() && !alreadyHandled.has(parentKey)) {
alreadyHandled.add(parentKey);
indentOrOutdent(parentBlock);
}
}
return alreadyHandled.size > 0;
}
function $isTargetWithinDecorator(target) {
const node = lexical.$getNearestNodeFromDOMNode(target);
return lexical.$isDecoratorNode(node);
}
function $isSelectionAtEndOfRoot(selection) {
const focus = selection.focus;
return focus.key === 'root' && focus.offset === lexical.$getRoot().getChildrenSize();
}
function $isSelectionCollapsedAtFrontOfIndentedBlock(selection) {
if (!selection.isCollapsed()) {
return false;
}
const {
anchor
} = selection;
if (anchor.offset !== 0) {
return false;
}
const anchorNode = anchor.getNode();
if (lexical.$isRootNode(anchorNode)) {
return false;
}
const element = utils.$getNearestBlockElementAncestorOrThrow(anchorNode);
return element.getIndent() > 0 && (element.is(anchorNode) || anchorNode.is(element.getFirstDescendant()));
}
/**
* Resets the capitalization of the selection to default.
* Called when the user presses space, tab, or enter key.
* @param selection The selection to reset the capitalization of.
*/
function $resetCapitalization(selection) {
for (const format of ['lowercase', 'uppercase', 'capitalize']) {
if (selection.hasFormat(format)) {
selection.toggleFormat(format);
}
}
}
function registerRichText(editor) {
const removeListener = utils.mergeRegister(editor.registerCommand(lexical.CLICK_COMMAND, payload => {
const selection = lexical.$getSelection();
if (lexical.$isNodeSelection(selection)) {
selection.clear();
return true;
}
return false;
}, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.DELETE_CHARACTER_COMMAND, isBackward => {
const selection = lexical.$getSelection();
if (lexical.$isRangeSelection(selection)) {
selection.deleteCharacter(isBackward);
return true;
} else if (lexical.$isNodeSelection(selection)) {
selection.deleteNodes();
return true;
}
return false;
}, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.DELETE_WORD_COMMAND, isBackward => {
const selection = lexical.$getSelection();
if (!lexical.$isRangeSelection(selection)) {
return false;
}
selection.deleteWord(isBackward);
return true;
}, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.DELETE_LINE_COMMAND, isBackward => {
const selection = lexical.$getSelection();
if (!lexical.$isRangeSelection(selection)) {
return false;
}
selection.deleteLine(isBackward);
return true;
}, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.CONTROLLED_TEXT_INSERTION_COMMAND, eventOrText => {
const selection = lexical.$getSelection();
if (typeof eventOrText === 'string') {
if (selection !== null) {
selection.insertText(eventOrText);
}
} else {
if (selection === null) {
return false;
}
const dataTransfer = eventOrText.dataTransfer;
if (dataTransfer != null) {
clipboard.$insertDataTransferForRichText(dataTransfer, selection, editor);
} else if (lexical.$isRangeSelection(selection)) {
const data = eventOrText.data;
if (data) {
selection.insertText(data);
}
return true;
}
}
return true;
}, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.REMOVE_TEXT_COMMAND, () => {
const selection = lexical.$getSelection();
if (!lexical.$isRangeSelection(selection)) {
return false;
}
selection.removeText();
return true;
}, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.FORMAT_TEXT_COMMAND, format => {
const selection = lexical.$getSelection();
if (!lexical.$isRangeSelection(selection)) {
return false;
}
selection.formatText(format);
return true;
}, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.FORMAT_ELEMENT_COMMAND, format => {
const selection = lexical.$getSelection();
if (!lexical.$isRangeSelection(selection) && !lexical.$isNodeSelection(selection)) {
return false;
}
const nodes = selection.getNodes();
for (const node of nodes) {
const element = utils.$findMatchingParent(node, parentNode => lexical.$isElementNode(parentNode) && !parentNode.isInline());
if (element !== null) {
element.setFormat(format);
}
}
return true;
}, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.INSERT_LINE_BREAK_COMMAND, selectStart => {
const selection = lexical.$getSelection();
if (!lexical.$isRangeSelection(selection)) {
return false;
}
selection.insertLineBreak(selectStart);
return true;
}, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.INSERT_PARAGRAPH_COMMAND, () => {
const selection = lexical.$getSelection();
if (!lexical.$isRangeSelection(selection)) {
return false;
}
selection.insertParagraph();
return true;
}, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.INSERT_TAB_COMMAND, () => {
lexical.$insertNodes([lexical.$createTabNode()]);
return true;
}, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.INDENT_CONTENT_COMMAND, () => {
return $handleIndentAndOutdent(block => {
const indent = block.getIndent();
block.setIndent(indent + 1);
});
}, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.OUTDENT_CONTENT_COMMAND, () => {
return $handleIndentAndOutdent(block => {
const indent = block.getIndent();
if (indent > 0) {
block.setIndent(Math.max(0, indent - 1));
}
});
}, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.KEY_ARROW_UP_COMMAND, event => {
const selection = lexical.$getSelection();
if (lexical.$isNodeSelection(selection)) {
// If selection is on a node, let's try and move selection
// back to being a range selection.
const nodes = selection.getNodes();
if (nodes.length > 0) {
nodes[0].selectPrevious();
return true;
}
} else if (lexical.$isRangeSelection(selection)) {
const possibleNode = lexical.$getAdjacentNode(selection.focus, true);
if (!event.shiftKey && lexical.$isDecoratorNode(possibleNode) && !possibleNode.isIsolated() && !possibleNode.isInline()) {
possibleNode.selectPrevious();
event.preventDefault();
return true;
}
}
return false;
}, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.KEY_ARROW_DOWN_COMMAND, event => {
const selection = lexical.$getSelection();
if (lexical.$isNodeSelection(selection)) {
// If selection is on a node, let's try and move selection
// back to being a range selection.
const nodes = selection.getNodes();
if (nodes.length > 0) {
nodes[0].selectNext(0, 0);
return true;
}
} else if (lexical.$isRangeSelection(selection)) {
if ($isSelectionAtEndOfRoot(selection)) {
event.preventDefault();
return true;
}
const possibleNode = lexical.$getAdjacentNode(selection.focus, false);
if (!event.shiftKey && lexical.$isDecoratorNode(possibleNode) && !possibleNode.isIsolated() && !possibleNode.isInline()) {
possibleNode.selectNext();
event.preventDefault();
return true;
}
}
return false;
}, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.KEY_ARROW_LEFT_COMMAND, event => {
const selection$1 = lexical.$getSelection();
if (lexical.$isNodeSelection(selection$1)) {
// If selection is on a node, let's try and move selection
// back to being a range selection.
const nodes = selection$1.getNodes();
if (nodes.length > 0) {
event.preventDefault();
if (selection.$isParentRTL(nodes[0])) {
nodes[0].selectNext(0, 0);
} else {
nodes[0].selectPrevious();
}
return true;
}
}
if (!lexical.$isRangeSelection(selection$1)) {
return false;
}
if (selection.$shouldOverrideDefaultCharacterSelection(selection$1, true)) {
const isHoldingShift = event.shiftKey;
event.preventDefault();
selection.$moveCharacter(selection$1, isHoldingShift, true);
return true;
}
return false;
}, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.KEY_ARROW_RIGHT_COMMAND, event => {
const selection$1 = lexical.$getSelection();
if (lexical.$isNodeSelection(selection$1)) {
// If selection is on a node, let's try and move selection
// back to being a range selection.
const nodes = selection$1.getNodes();
if (nodes.length > 0) {
event.preventDefault();
if (selection.$isParentRTL(nodes[0])) {
nodes[0].selectPrevious();
} else {
nodes[0].selectNext(0, 0);
}
return true;
}
}
if (!lexical.$isRangeSelection(selection$1)) {
return false;
}
const isHoldingShift = event.shiftKey;
if (selection.$shouldOverrideDefaultCharacterSelection(selection$1, false)) {
event.preventDefault();
selection.$moveCharacter(selection$1, isHoldingShift, false);
return true;
}
return false;
}, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.KEY_BACKSPACE_COMMAND, event => {
if ($isTargetWithinDecorator(event.target)) {
return false;
}
const selection = lexical.$getSelection();
if (lexical.$isRangeSelection(selection)) {
if ($isSelectionCollapsedAtFrontOfIndentedBlock(selection)) {
event.preventDefault();
return editor.dispatchCommand(lexical.OUTDENT_CONTENT_COMMAND, undefined);
}
// Exception handling for iOS native behavior instead of Lexical's behavior when using Korean on iOS devices.
// more details - https://github.com/facebook/lexical/issues/5841
if (IS_IOS && navigator.language === 'ko-KR') {
return false;
}
} else if (!lexical.$isNodeSelection(selection)) {
return false;
}
event.preventDefault();
return editor.dispatchCommand(lexical.DELETE_CHARACTER_COMMAND, true);
}, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.KEY_DELETE_COMMAND, event => {
if ($isTargetWithinDecorator(event.target)) {
return false;
}
const selection = lexical.$getSelection();
if (!(lexical.$isRangeSelection(selection) || lexical.$isNodeSelection(selection))) {
return false;
}
event.preventDefault();
return editor.dispatchCommand(lexical.DELETE_CHARACTER_COMMAND, false);
}, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.KEY_ENTER_COMMAND, event => {
const selection = lexical.$getSelection();
if (!lexical.$isRangeSelection(selection)) {
return false;
}
$resetCapitalization(selection);
if (event !== null) {
// If we have beforeinput, then we can avoid blocking
// the default behavior. This ensures that the iOS can
// intercept that we're actually inserting a paragraph,
// and autocomplete, autocapitalize etc work as intended.
// This can also cause a strange performance issue in
// Safari, where there is a noticeable pause due to
// preventing the key down of enter.
if ((IS_IOS || IS_SAFARI || IS_APPLE_WEBKIT) && CAN_USE_BEFORE_INPUT) {
return false;
}
event.preventDefault();
if (event.shiftKey) {
return editor.dispatchCommand(lexical.INSERT_LINE_BREAK_COMMAND, false);
}
}
return editor.dispatchCommand(lexical.INSERT_PARAGRAPH_COMMAND, undefined);
}, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.KEY_ESCAPE_COMMAND, () => {
const selection = lexical.$getSelection();
if (!lexical.$isRangeSelection(selection)) {
return false;
}
editor.blur();
return true;
}, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.DROP_COMMAND, event => {
const [, files] = eventFiles(event);
if (files.length > 0) {
const x = event.clientX;
const y = event.clientY;
const eventRange = caretFromPoint(x, y);
if (eventRange !== null) {
const {
offset: domOffset,
node: domNode
} = eventRange;
const node = lexical.$getNearestNodeFromDOMNode(domNode);
if (node !== null) {
const selection = lexical.$createRangeSelection();
if (lexical.$isTextNode(node)) {
selection.anchor.set(node.getKey(), domOffset, 'text');
selection.focus.set(node.getKey(), domOffset, 'text');
} else {
const parentKey = node.getParentOrThrow().getKey();
const offset = node.getIndexWithinParent() + 1;
selection.anchor.set(parentKey, offset, 'element');
selection.focus.set(parentKey, offset, 'element');
}
const normalizedSelection = lexical.$normalizeSelection__EXPERIMENTAL(selection);
lexical.$setSelection(normalizedSelection);
}
editor.dispatchCommand(DRAG_DROP_PASTE, files);
}
event.preventDefault();
return true;
}
const selection = lexical.$getSelection();
if (lexical.$isRangeSelection(selection)) {
return true;
}
return false;
}, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.DRAGSTART_COMMAND, event => {
const [isFileTransfer] = eventFiles(event);
const selection = lexical.$getSelection();
if (isFileTransfer && !lexical.$isRangeSelection(selection)) {
return false;
}
return true;
}, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.DRAGOVER_COMMAND, event => {
const [isFileTransfer] = eventFiles(event);
const selection = lexical.$getSelection();
if (isFileTransfer && !lexical.$isRangeSelection(selection)) {
return false;
}
const x = event.clientX;
const y = event.clientY;
const eventRange = caretFromPoint(x, y);
if (eventRange !== null) {
const node = lexical.$getNearestNodeFromDOMNode(eventRange.node);
if (lexical.$isDecoratorNode(node)) {
// Show browser caret as the user is dragging the media across the screen. Won't work
// for DecoratorNode nor it's relevant.
event.preventDefault();
}
}
return true;
}, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.SELECT_ALL_COMMAND, () => {
lexical.$selectAll();
return true;
}, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.COPY_COMMAND, event => {
clipboard.copyToClipboard(editor, utils.objectKlassEquals(event, ClipboardEvent) ? event : null);
return true;
}, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.CUT_COMMAND, event => {
onCutForRichText(event, editor);
return true;
}, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.PASTE_COMMAND, event => {
const [, files, hasTextContent] = eventFiles(event);
if (files.length > 0 && !hasTextContent) {
editor.dispatchCommand(DRAG_DROP_PASTE, files);
return true;
}
// if inputs then paste within the input ignore creating a new node on paste event
if (lexical.isDOMNode(event.target) && lexical.isSelectionCapturedInDecoratorInput(event.target)) {
return false;
}
const selection = lexical.$getSelection();
if (selection !== null) {
onPasteForRichText(event, editor);
return true;
}
return false;
}, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.KEY_SPACE_COMMAND, _ => {
const selection = lexical.$getSelection();
if (lexical.$isRangeSelection(selection)) {
$resetCapitalization(selection);
}
return false;
}, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.KEY_TAB_COMMAND, _ => {
const selection = lexical.$getSelection();
if (lexical.$isRangeSelection(selection)) {
$resetCapitalization(selection);
}
return false;
}, lexical.COMMAND_PRIORITY_EDITOR));
return removeListener;
}
exports.$createHeadingNode = $createHeadingNode;
exports.$createQuoteNode = $createQuoteNode;
exports.$isHeadingNode = $isHeadingNode;
exports.$isQuoteNode = $isQuoteNode;
exports.DRAG_DROP_PASTE = DRAG_DROP_PASTE;
exports.HeadingNode = HeadingNode;
exports.QuoteNode = QuoteNode;
exports.eventFiles = eventFiles;
exports.registerRichText = registerRichText;

View File

@@ -0,0 +1 @@
{"version":3,"file":"users.js","names":[],"sources":["../../../../src/rest/commands/read/users.ts"],"sourcesContent":["import type { DirectusUser } from '../../../schema/user.js';\nimport type { ApplyQueryFields, Query } from '../../../types/index.js';\nimport type { RestCommand } from '../../types.js';\nimport { throwIfEmpty } from '../../utils/index.js';\n\nexport type ReadUserOutput<\n\tSchema,\n\tTQuery extends Query<Schema, Item>,\n\tItem extends object = DirectusUser<Schema>,\n> = ApplyQueryFields<Schema, Item, TQuery['fields']>;\n\n/**\n * List all users that exist in Directus.\n *\n * @param query The query parameters\n *\n * @returns An array of up to limit user objects. If no items are available, data will be an empty array.\n */\nexport const readUsers =\n\t<Schema, const TQuery extends Query<Schema, DirectusUser<Schema>>>(\n\t\tquery?: TQuery,\n\t): RestCommand<ReadUserOutput<Schema, TQuery>[], Schema> =>\n\t() => ({\n\t\tpath: `/users`,\n\t\tparams: query ?? {},\n\t\tmethod: 'GET',\n\t});\n\n/**\n * List an existing user by primary key.\n *\n * @param key The primary key of the user\n * @param query The query parameters\n *\n * @returns Returns the requested user object.\n * @throws Will throw if key is empty\n */\nexport const readUser =\n\t<Schema, const TQuery extends Query<Schema, DirectusUser<Schema>>>(\n\t\tkey: DirectusUser<Schema>['id'],\n\t\tquery?: TQuery,\n\t): RestCommand<ReadUserOutput<Schema, TQuery>, Schema> =>\n\t() => {\n\t\tthrowIfEmpty(String(key), 'Key cannot be empty');\n\n\t\treturn {\n\t\t\tpath: `/users/${key}`,\n\t\t\tparams: query ?? {},\n\t\t\tmethod: 'GET',\n\t\t};\n\t};\n\n/**\n * Retrieve the currently authenticated user.\n *\n * @param query The query parameters\n *\n * @returns Returns the user object for the currently authenticated user.\n */\nexport const readMe =\n\t<Schema, const TQuery extends Query<Schema, DirectusUser<Schema>>>(\n\t\tquery?: TQuery,\n\t): RestCommand<ReadUserOutput<Schema, TQuery>, Schema> =>\n\t() => ({\n\t\tpath: `/users/me`,\n\t\tparams: query ?? {},\n\t\tmethod: 'GET',\n\t});\n"],"mappings":"6DAkBA,MAAa,EAEX,QAEM,CACN,KAAM,SACN,OAAQ,GAAS,EAAE,CACnB,OAAQ,MACR,EAWW,GAEX,EACA,SAGA,EAAa,OAAO,EAAI,CAAE,sBAAsB,CAEzC,CACN,KAAM,UAAU,IAChB,OAAQ,GAAS,EAAE,CACnB,OAAQ,MACR,EAUU,EAEX,QAEM,CACN,KAAM,YACN,OAAQ,GAAS,EAAE,CACnB,OAAQ,MACR"}

View File

@@ -0,0 +1,135 @@
import { max, sql } from 'drizzle-orm';
import { getFieldByPath } from 'payload';
import toSnakeCase from 'to-snake-case';
import { buildQuery } from './queries/buildQuery.js';
import { selectDistinct } from './queries/selectDistinct.js';
import { getTransaction } from './utilities/getTransaction.js';
import { DistinctSymbol } from './utilities/rawConstraint.js';
const getOrderColumn = (orderBy, selectFields, joins)=>{
if (orderBy.length === 0) {
return null;
}
if (orderBy[0].column === selectFields['_selected']) {
return null;
}
if (joins.length > 0) {
return orderBy[0].column;
}
return max(orderBy[0]?.column).as('_order');
};
export const findDistinct = async function(args) {
const collectionConfig = this.payload.collections[args.collection].config;
const page = args.page || 1;
const offset = args.limit ? (page - 1) * args.limit : undefined;
const tableName = this.tableNameMap.get(toSnakeCase(collectionConfig.slug));
const { joins, orderBy, selectFields, where } = buildQuery({
adapter: this,
fields: collectionConfig.flattenedFields,
locale: args.locale,
sort: args.sort ?? args.field,
tableName,
where: {
and: [
args.where ?? {},
{
[args.field]: {
equals: DistinctSymbol
}
}
]
}
});
orderBy.pop();
const db = await getTransaction(this, args.req);
const _order = getOrderColumn(orderBy, selectFields, joins);
const selectDistinctResult = await selectDistinct({
adapter: this,
db,
forceRun: true,
hasAggregates: Boolean(_order) && !joins.length,
joins,
query: ({ query })=>{
if (_order && orderBy.length > 0 && !joins.length) {
query = query.orderBy(orderBy[0].order(sql`_order`));
} else {
query = query.orderBy(()=>orderBy.map(({ column, order })=>order(column)));
}
if (args.limit) {
if (offset) {
query = query.offset(offset);
}
query = query.limit(args.limit);
}
return query;
},
selectFields: {
_selected: selectFields['_selected'],
..._order ? {
_order
} : {}
},
tableName,
where
});
const field = getFieldByPath({
config: this.payload.config,
fields: collectionConfig.flattenedFields,
includeRelationships: true,
path: args.field
})?.field;
if (field && 'relationTo' in field && Array.isArray(field.relationTo)) {
for (const row of selectDistinctResult){
const json = JSON.parse(row._selected);
const relationTo = Object.keys(json).find((each)=>Boolean(json[each]));
const value = json[relationTo];
if (!value) {
row._selected = null;
} else {
row._selected = {
relationTo,
value
};
}
}
}
const values = selectDistinctResult.map((each)=>({
[args.field]: each._selected
}));
if (args.limit) {
const totalDocs = await this.countDistinct({
column: selectFields['_selected'],
db,
joins,
tableName,
where
});
const totalPages = Math.ceil(totalDocs / args.limit);
const hasPrevPage = page > 1;
const hasNextPage = totalPages > page;
const pagingCounter = (page - 1) * args.limit + 1;
return {
hasNextPage,
hasPrevPage,
limit: args.limit,
nextPage: hasNextPage ? page + 1 : null,
page,
pagingCounter,
prevPage: hasPrevPage ? page - 1 : null,
totalDocs,
totalPages,
values
};
}
return {
hasNextPage: false,
hasPrevPage: false,
limit: 0,
page: 1,
pagingCounter: 1,
totalDocs: values.length,
totalPages: 1,
values
};
};
//# sourceMappingURL=findDistinct.js.map

View File

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

View File

@@ -0,0 +1,9 @@
// Declaration files in this directory contain types relating to TypeScript library features
// that are not included in all TypeScript versions supported by DefinitelyTyped, but
// which can be made backwards-compatible without needing `typesVersions`.
// If adding declarations to this directory, please specify which versions of TypeScript require them,
// so that they can be removed when no longer needed.
/// <reference path="disposable.d.ts" />
/// <reference path="indexable.d.ts" />
/// <reference path="iterators.d.ts" />

View File

@@ -0,0 +1,46 @@
// @ts-ignore TS6133
import { expect, test } from "vitest";
import * as z from "zod/v3";
test("parse async test", async () => {
const schema1 = z.string().refine(async (_val) => false);
expect(() => schema1.parse("asdf")).toThrow();
const schema2 = z.string().refine((_val) => Promise.resolve(true));
return await expect(() => schema2.parse("asdf")).toThrow();
});
test("parseAsync async test", async () => {
const schema1 = z.string().refine(async (_val) => true);
await schema1.parseAsync("asdf");
const schema2 = z.string().refine(async (_val) => false);
return await expect(schema2.parseAsync("asdf")).rejects.toBeDefined();
// expect(async () => await schema2.parseAsync('asdf')).toThrow();
});
test("parseAsync async test", async () => {
// expect.assertions(2);
const schema1 = z.string().refine((_val) => Promise.resolve(true));
const v1 = await schema1.parseAsync("asdf");
expect(v1).toEqual("asdf");
const schema2 = z.string().refine((_val) => Promise.resolve(false));
await expect(schema2.parseAsync("asdf")).rejects.toBeDefined();
const schema3 = z.string().refine((_val) => Promise.resolve(true));
await expect(schema3.parseAsync("asdf")).resolves.toEqual("asdf");
return await expect(schema3.parseAsync("qwer")).resolves.toEqual("qwer");
});
test("parseAsync async with value", async () => {
const schema1 = z.string().refine(async (val) => {
return val.length > 5;
});
await expect(schema1.parseAsync("asdf")).rejects.toBeDefined();
const v = await schema1.parseAsync("asdf123");
return await expect(v).toEqual("asdf123");
});

View File

@@ -0,0 +1,15 @@
/**
* @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 Cloud = createLucideIcon("Cloud", [
["path", { d: "M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z", key: "p7xjir" }]
]);
export { Cloud as default };
//# sourceMappingURL=cloud.js.map

View File

@@ -0,0 +1,324 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Parser = void 0;
const messages_1 = require("./messages");
const buffer_reader_1 = require("./buffer-reader");
// every message is prefixed with a single bye
const CODE_LENGTH = 1;
// every message has an int32 length which includes itself but does
// NOT include the code in the length
const LEN_LENGTH = 4;
const HEADER_LENGTH = CODE_LENGTH + LEN_LENGTH;
// A placeholder for a `BackendMessage`s length value that will be set after construction.
const LATEINIT_LENGTH = -1;
const emptyBuffer = Buffer.allocUnsafe(0);
class Parser {
constructor(opts) {
this.buffer = emptyBuffer;
this.bufferLength = 0;
this.bufferOffset = 0;
this.reader = new buffer_reader_1.BufferReader();
if ((opts === null || opts === void 0 ? void 0 : opts.mode) === 'binary') {
throw new Error('Binary mode not supported yet');
}
this.mode = (opts === null || opts === void 0 ? void 0 : opts.mode) || 'text';
}
parse(buffer, callback) {
this.mergeBuffer(buffer);
const bufferFullLength = this.bufferOffset + this.bufferLength;
let offset = this.bufferOffset;
while (offset + HEADER_LENGTH <= bufferFullLength) {
// code is 1 byte long - it identifies the message type
const code = this.buffer[offset];
// length is 1 Uint32BE - it is the length of the message EXCLUDING the code
const length = this.buffer.readUInt32BE(offset + CODE_LENGTH);
const fullMessageLength = CODE_LENGTH + length;
if (fullMessageLength + offset <= bufferFullLength) {
const message = this.handlePacket(offset + HEADER_LENGTH, code, length, this.buffer);
callback(message);
offset += fullMessageLength;
}
else {
break;
}
}
if (offset === bufferFullLength) {
// No more use for the buffer
this.buffer = emptyBuffer;
this.bufferLength = 0;
this.bufferOffset = 0;
}
else {
// Adjust the cursors of remainingBuffer
this.bufferLength = bufferFullLength - offset;
this.bufferOffset = offset;
}
}
mergeBuffer(buffer) {
if (this.bufferLength > 0) {
const newLength = this.bufferLength + buffer.byteLength;
const newFullLength = newLength + this.bufferOffset;
if (newFullLength > this.buffer.byteLength) {
// We can't concat the new buffer with the remaining one
let newBuffer;
if (newLength <= this.buffer.byteLength && this.bufferOffset >= this.bufferLength) {
// We can move the relevant part to the beginning of the buffer instead of allocating a new buffer
newBuffer = this.buffer;
}
else {
// Allocate a new larger buffer
let newBufferLength = this.buffer.byteLength * 2;
while (newLength >= newBufferLength) {
newBufferLength *= 2;
}
newBuffer = Buffer.allocUnsafe(newBufferLength);
}
// Move the remaining buffer to the new one
this.buffer.copy(newBuffer, 0, this.bufferOffset, this.bufferOffset + this.bufferLength);
this.buffer = newBuffer;
this.bufferOffset = 0;
}
// Concat the new buffer with the remaining one
buffer.copy(this.buffer, this.bufferOffset + this.bufferLength);
this.bufferLength = newLength;
}
else {
this.buffer = buffer;
this.bufferOffset = 0;
this.bufferLength = buffer.byteLength;
}
}
handlePacket(offset, code, length, bytes) {
const { reader } = this;
// NOTE: This undesirably retains the buffer in `this.reader` if the `parse*Message` calls below throw. However, those should only throw in the case of a protocol error, which normally results in the reader being discarded.
reader.setBuffer(offset, bytes);
let message;
switch (code) {
case 50 /* MessageCodes.BindComplete */:
message = messages_1.bindComplete;
break;
case 49 /* MessageCodes.ParseComplete */:
message = messages_1.parseComplete;
break;
case 51 /* MessageCodes.CloseComplete */:
message = messages_1.closeComplete;
break;
case 110 /* MessageCodes.NoData */:
message = messages_1.noData;
break;
case 115 /* MessageCodes.PortalSuspended */:
message = messages_1.portalSuspended;
break;
case 99 /* MessageCodes.CopyDone */:
message = messages_1.copyDone;
break;
case 87 /* MessageCodes.ReplicationStart */:
message = messages_1.replicationStart;
break;
case 73 /* MessageCodes.EmptyQuery */:
message = messages_1.emptyQuery;
break;
case 68 /* MessageCodes.DataRow */:
message = parseDataRowMessage(reader);
break;
case 67 /* MessageCodes.CommandComplete */:
message = parseCommandCompleteMessage(reader);
break;
case 90 /* MessageCodes.ReadyForQuery */:
message = parseReadyForQueryMessage(reader);
break;
case 65 /* MessageCodes.NotificationResponse */:
message = parseNotificationMessage(reader);
break;
case 82 /* MessageCodes.AuthenticationResponse */:
message = parseAuthenticationResponse(reader, length);
break;
case 83 /* MessageCodes.ParameterStatus */:
message = parseParameterStatusMessage(reader);
break;
case 75 /* MessageCodes.BackendKeyData */:
message = parseBackendKeyData(reader);
break;
case 69 /* MessageCodes.ErrorMessage */:
message = parseErrorMessage(reader, 'error');
break;
case 78 /* MessageCodes.NoticeMessage */:
message = parseErrorMessage(reader, 'notice');
break;
case 84 /* MessageCodes.RowDescriptionMessage */:
message = parseRowDescriptionMessage(reader);
break;
case 116 /* MessageCodes.ParameterDescriptionMessage */:
message = parseParameterDescriptionMessage(reader);
break;
case 71 /* MessageCodes.CopyIn */:
message = parseCopyInMessage(reader);
break;
case 72 /* MessageCodes.CopyOut */:
message = parseCopyOutMessage(reader);
break;
case 100 /* MessageCodes.CopyData */:
message = parseCopyData(reader, length);
break;
default:
return new messages_1.DatabaseError('received invalid response: ' + code.toString(16), length, 'error');
}
reader.setBuffer(0, emptyBuffer);
message.length = length;
return message;
}
}
exports.Parser = Parser;
const parseReadyForQueryMessage = (reader) => {
const status = reader.string(1);
return new messages_1.ReadyForQueryMessage(LATEINIT_LENGTH, status);
};
const parseCommandCompleteMessage = (reader) => {
const text = reader.cstring();
return new messages_1.CommandCompleteMessage(LATEINIT_LENGTH, text);
};
const parseCopyData = (reader, length) => {
const chunk = reader.bytes(length - 4);
return new messages_1.CopyDataMessage(LATEINIT_LENGTH, chunk);
};
const parseCopyInMessage = (reader) => parseCopyMessage(reader, 'copyInResponse');
const parseCopyOutMessage = (reader) => parseCopyMessage(reader, 'copyOutResponse');
const parseCopyMessage = (reader, messageName) => {
const isBinary = reader.byte() !== 0;
const columnCount = reader.int16();
const message = new messages_1.CopyResponse(LATEINIT_LENGTH, messageName, isBinary, columnCount);
for (let i = 0; i < columnCount; i++) {
message.columnTypes[i] = reader.int16();
}
return message;
};
const parseNotificationMessage = (reader) => {
const processId = reader.int32();
const channel = reader.cstring();
const payload = reader.cstring();
return new messages_1.NotificationResponseMessage(LATEINIT_LENGTH, processId, channel, payload);
};
const parseRowDescriptionMessage = (reader) => {
const fieldCount = reader.int16();
const message = new messages_1.RowDescriptionMessage(LATEINIT_LENGTH, fieldCount);
for (let i = 0; i < fieldCount; i++) {
message.fields[i] = parseField(reader);
}
return message;
};
const parseField = (reader) => {
const name = reader.cstring();
const tableID = reader.uint32();
const columnID = reader.int16();
const dataTypeID = reader.uint32();
const dataTypeSize = reader.int16();
const dataTypeModifier = reader.int32();
const mode = reader.int16() === 0 ? 'text' : 'binary';
return new messages_1.Field(name, tableID, columnID, dataTypeID, dataTypeSize, dataTypeModifier, mode);
};
const parseParameterDescriptionMessage = (reader) => {
const parameterCount = reader.int16();
const message = new messages_1.ParameterDescriptionMessage(LATEINIT_LENGTH, parameterCount);
for (let i = 0; i < parameterCount; i++) {
message.dataTypeIDs[i] = reader.int32();
}
return message;
};
const parseDataRowMessage = (reader) => {
const fieldCount = reader.int16();
const fields = new Array(fieldCount);
for (let i = 0; i < fieldCount; i++) {
const len = reader.int32();
// a -1 for length means the value of the field is null
fields[i] = len === -1 ? null : reader.string(len);
}
return new messages_1.DataRowMessage(LATEINIT_LENGTH, fields);
};
const parseParameterStatusMessage = (reader) => {
const name = reader.cstring();
const value = reader.cstring();
return new messages_1.ParameterStatusMessage(LATEINIT_LENGTH, name, value);
};
const parseBackendKeyData = (reader) => {
const processID = reader.int32();
const secretKey = reader.int32();
return new messages_1.BackendKeyDataMessage(LATEINIT_LENGTH, processID, secretKey);
};
const parseAuthenticationResponse = (reader, length) => {
const code = reader.int32();
// TODO(bmc): maybe better types here
const message = {
name: 'authenticationOk',
length,
};
switch (code) {
case 0: // AuthenticationOk
break;
case 3: // AuthenticationCleartextPassword
if (message.length === 8) {
message.name = 'authenticationCleartextPassword';
}
break;
case 5: // AuthenticationMD5Password
if (message.length === 12) {
message.name = 'authenticationMD5Password';
const salt = reader.bytes(4);
return new messages_1.AuthenticationMD5Password(LATEINIT_LENGTH, salt);
}
break;
case 10: // AuthenticationSASL
{
message.name = 'authenticationSASL';
message.mechanisms = [];
let mechanism;
do {
mechanism = reader.cstring();
if (mechanism) {
message.mechanisms.push(mechanism);
}
} while (mechanism);
}
break;
case 11: // AuthenticationSASLContinue
message.name = 'authenticationSASLContinue';
message.data = reader.string(length - 8);
break;
case 12: // AuthenticationSASLFinal
message.name = 'authenticationSASLFinal';
message.data = reader.string(length - 8);
break;
default:
throw new Error('Unknown authenticationOk message type ' + code);
}
return message;
};
const parseErrorMessage = (reader, name) => {
const fields = {};
let fieldType = reader.string(1);
while (fieldType !== '\0') {
fields[fieldType] = reader.cstring();
fieldType = reader.string(1);
}
const messageValue = fields.M;
const message = name === 'notice'
? new messages_1.NoticeMessage(LATEINIT_LENGTH, messageValue)
: new messages_1.DatabaseError(messageValue, LATEINIT_LENGTH, name);
message.severity = fields.S;
message.code = fields.C;
message.detail = fields.D;
message.hint = fields.H;
message.position = fields.P;
message.internalPosition = fields.p;
message.internalQuery = fields.q;
message.where = fields.W;
message.schema = fields.s;
message.table = fields.t;
message.column = fields.c;
message.dataType = fields.d;
message.constraint = fields.n;
message.file = fields.F;
message.line = fields.L;
message.routine = fields.R;
return message;
};
//# sourceMappingURL=parser.js.map

View File

@@ -0,0 +1,33 @@
'use client';
import { fieldAffectsData } from 'payload/shared';
export const buildPathSegments = fields => {
return fields.reduce((acc, field) => {
const fields = 'fields' in field ? field.fields : undefined;
if (fields) {
if (fieldAffectsData(field)) {
// group, block, array
acc.push(`${field.name}.`);
} else {
// rows, collapsibles, unnamed-tab
acc.push(...buildPathSegments(fields));
}
} else if (field.type === 'tabs') {
// tabs
if ('tabs' in field) {
field.tabs?.forEach(tab => {
if ('name' in tab) {
acc.push(`${tab.name}.`);
} else {
acc.push(...buildPathSegments(tab.fields));
}
});
}
} else if (fieldAffectsData(field)) {
// text, number, date, etc.
acc.push(field.name);
}
return acc;
}, []);
};
//# sourceMappingURL=buildPathSegments.js.map

View File

@@ -0,0 +1,10 @@
import type { Job } from '../../../../index.js';
import type { PayloadRequest } from '../../../../types/index.js';
export type UpdateJobFunction = (jobData: Partial<Job>) => Promise<Job>;
/**
* Helper for updating a job that does the following, additionally to updating the job:
* - Merges incoming data from the updated job into the original job object
* - Handles job cancellation by throwing a `JobCancelledError` if the job was cancelled.
*/
export declare function getUpdateJobFunction(job: Job, req: PayloadRequest): UpdateJobFunction;
//# sourceMappingURL=getUpdateJobFunction.d.ts.map

View File

@@ -0,0 +1,309 @@
# Web Frameworks
Since HTTP logging is a primary use case, Pino has first-class support for the Node.js
web framework ecosystem.
- [Web Frameworks](#web-frameworks)
- [Pino with Fastify](#pino-with-fastify)
- [Pino with Express](#pino-with-express)
- [Pino with Hapi](#pino-with-hapi)
- [Pino with Restify](#pino-with-restify)
- [Pino with Koa](#pino-with-koa)
- [Pino with Node core `http`](#pino-with-node-core-http)
- [Pino with Nest](#pino-with-nest)
- [Pino with H3](#pino-with-h3)
- [Pino with Hono](#pino-with-hono)
<a id="fastify"></a>
## Pino with Fastify
The Fastify web framework comes bundled with Pino by default, simply set Fastify's
`logger` option to `true` and use `request.log` or `reply.log` for log messages that correspond
to each request:
```js
const fastify = require('fastify')({
logger: true
})
fastify.get('/', async (request, reply) => {
request.log.info('something')
return { hello: 'world' }
})
fastify.listen({ port: 3000 }, (err) => {
if (err) {
fastify.log.error(err)
process.exit(1)
}
})
```
The `logger` option can also be set to an object, which will be passed through directly
as the [`pino` options object](/docs/api.md#options-object).
See the [fastify documentation](https://www.fastify.io/docs/latest/Reference/Logging/) for more information.
<a id="express"></a>
## Pino with Express
```sh
npm install pino-http
```
```js
const app = require('express')()
const pino = require('pino-http')()
app.use(pino)
app.get('/', function (req, res) {
req.log.info('something')
res.send('hello world')
})
app.listen(3000)
```
See the [pino-http README](https://npm.im/pino-http) for more info.
<a id="hapi"></a>
## Pino with Hapi
```sh
npm install hapi-pino
```
```js
'use strict'
const Hapi = require('@hapi/hapi')
const Pino = require('hapi-pino');
async function start () {
// Create a server with a host and port
const server = Hapi.server({
host: 'localhost',
port: 3000
})
// Add the route
server.route({
method: 'GET',
path: '/',
handler: async function (request, h) {
// request.log is HAPI's standard way of logging
request.log(['a', 'b'], 'Request into hello world')
// a pino instance can also be used, which will be faster
request.logger.info('In handler %s', request.path)
return 'hello world'
}
})
await server.register(Pino)
// also as a decorated API
server.logger.info('another way for accessing it')
// and through Hapi standard logging system
server.log(['subsystem'], 'third way for accessing it')
await server.start()
return server
}
start().catch((err) => {
console.log(err)
process.exit(1)
})
```
See the [hapi-pino README](https://npm.im/hapi-pino) for more info.
<a id="restify"></a>
## Pino with Restify
```sh
npm install restify-pino-logger
```
```js
const server = require('restify').createServer({name: 'server'})
const pino = require('restify-pino-logger')()
server.use(pino)
server.get('/', function (req, res) {
req.log.info('something')
res.send('hello world')
})
server.listen(3000)
```
See the [restify-pino-logger README](https://npm.im/restify-pino-logger) for more info.
<a id="koa"></a>
## Pino with Koa
```sh
npm install koa-pino-logger
```
```js
const Koa = require('koa')
const app = new Koa()
const pino = require('koa-pino-logger')()
app.use(pino)
app.use((ctx) => {
ctx.log.info('something else')
ctx.body = 'hello world'
})
app.listen(3000)
```
See the [koa-pino-logger README](https://github.com/pinojs/koa-pino-logger) for more info.
<a id="http"></a>
## Pino with Node core `http`
```sh
npm install pino-http
```
```js
const http = require('http')
const server = http.createServer(handle)
const logger = require('pino-http')()
function handle (req, res) {
logger(req, res)
req.log.info('something else')
res.end('hello world')
}
server.listen(3000)
```
See the [pino-http README](https://npm.im/pino-http) for more info.
<a id="nest"></a>
## Pino with Nest
```sh
npm install nestjs-pino
```
```ts
import { NestFactory } from '@nestjs/core'
import { Controller, Get, Module } from '@nestjs/common'
import { LoggerModule, Logger } from 'nestjs-pino'
@Controller()
export class AppController {
constructor(private readonly logger: Logger) {}
@Get()
getHello() {
this.logger.log('something')
return `Hello world`
}
}
@Module({
controllers: [AppController],
imports: [LoggerModule.forRoot()]
})
class MyModule {}
async function bootstrap() {
const app = await NestFactory.create(MyModule)
await app.listen(3000)
}
bootstrap()
```
See the [nestjs-pino README](https://npm.im/nestjs-pino) for more info.
<a id="h3"></a>
## Pino with H3
```sh
npm install pino-http h3
```
Save as `server.mjs`:
```js
import { createApp, createRouter, eventHandler, fromNodeMiddleware } from "h3";
import pino from 'pino-http'
export const app = createApp();
const router = createRouter();
app.use(router);
app.use(fromNodeMiddleware(pino()))
app.use(eventHandler((event) => {
event.node.req.log.info('something')
return 'hello world'
}))
router.get(
"/",
eventHandler((event) => {
return { path: event.path, message: "Hello World!" };
}),
);
```
Execute `npx --yes listhen -w --open ./server.mjs`.
See the [pino-http README](https://npm.im/pino-http) for more info.
<a id="hono"></a>
## Pino with Hono
```sh
npm install pino pino-http hono
```
```js
import { serve } from '@hono/node-server';
import { Hono } from 'hono';
import { requestId } from 'hono/request-id';
import { pinoHttp } from 'pino-http';
const app = new Hono();
app.use(requestId());
app.use(async (c, next) => {
// pass hono's request-id to pino-http
c.env.incoming.id = c.var.requestId;
// map express style middleware to hono
await new Promise((resolve) => pinoHttp()(c.env.incoming, c.env.outgoing, () => resolve()));
c.set('logger', c.env.incoming.log);
await next();
});
app.get('/', (c) => {
c.var.logger.info('something');
return c.text('Hello Node.js!');
});
serve(app);
```
See the [pino-http README](https://npm.im/pino-http) for more info.

View File

@@ -0,0 +1 @@
{"version":3,"file":"tr.d.ts","sourceRoot":"","sources":["../../../src/exports/i18n/tr.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,uCAAuC,CAAA"}

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 9 G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s 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":"0C VC J bB K D E F A B C L M 4C 5C"},D:{"1":"0 1 2 3 4 5 6 7 8 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 dB eB fB"},E:{"2":"J bB K D E F A 6C bC 7C 8C 9C AD cC","132":"B C L M G PC QC BD CD DD dC eC RC ED SC fC gC hC iC jC FD TC kC lC mC","260":"nC","516":"oC GD UC pC qC rC","1028":"sC HD tC uC vC wC ID"},F:{"1":"0 1 2 3 4 5 6 7 8 9 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 O P cB 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","132":"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","260":"nC","516":"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:{"1":"H","2":"A B C PC xC QC"},L:{"1":"I"},M:{"1":"OC"},N:{"2":"A B"},O:{"1":"RC"},P:{"1":"9 AB BB CB DB EB FB GB HB IB tD uD vD wD xD cC yD zD 0D 1D 2D SC TC UC 3D","2":"J"},Q:{"1":"4D"},R:{"1":"5D"},S:{"1":"6D 7D"}},B:6,C:"Opus audio format",D:true};

View File

@@ -0,0 +1,503 @@
/**
* The `dns.promises` API provides an alternative set of asynchronous DNS methods
* that return `Promise` objects rather than using callbacks. The API is accessible
* via `import { promises as dnsPromises } from 'node:dns'` or `import dnsPromises from 'node:dns/promises'`.
* @since v10.6.0
*/
declare module "dns/promises" {
import {
AnyRecord,
CaaRecord,
LookupAddress,
LookupAllOptions,
LookupOneOptions,
LookupOptions,
MxRecord,
NaptrRecord,
RecordWithTtl,
ResolveOptions,
ResolverOptions,
ResolveWithTtlOptions,
SoaRecord,
SrvRecord,
TlsaRecord,
} from "node:dns";
/**
* Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6),
* that are currently configured for DNS resolution. A string will include a port
* section if a custom port is used.
*
* ```js
* [
* '4.4.4.4',
* '2001:4860:4860::8888',
* '4.4.4.4:1053',
* '[2001:4860:4860::8888]:1053',
* ]
* ```
* @since v10.6.0
*/
function getServers(): string[];
/**
* Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or
* AAAA (IPv6) record. All `option` properties are optional. If `options` is an
* integer, then it must be `4` or `6` if `options` is not provided, then IPv4
* and IPv6 addresses are both returned if found.
*
* With the `all` option set to `true`, the `Promise` is resolved with `addresses` being an array of objects with the properties `address` and `family`.
*
* On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` is the error code.
* Keep in mind that `err.code` will be set to `'ENOTFOUND'` not only when
* the host name does not exist but also when the lookup fails in other ways
* such as no available file descriptors.
*
* [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromiseslookuphostname-options) does not necessarily have anything to do with the DNS
* protocol. The implementation uses an operating system facility that can
* associate names with addresses and vice versa. This implementation can have
* subtle but important consequences on the behavior of any Node.js program. Please
* take some time to consult the [Implementation considerations section](https://nodejs.org/docs/latest-v20.x/api/dns.html#implementation-considerations) before
* using `dnsPromises.lookup()`.
*
* Example usage:
*
* ```js
* import dns from 'node:dns';
* const dnsPromises = dns.promises;
* const options = {
* family: 6,
* hints: dns.ADDRCONFIG | dns.V4MAPPED,
* };
*
* dnsPromises.lookup('example.com', options).then((result) => {
* console.log('address: %j family: IPv%s', result.address, result.family);
* // address: "2606:2800:220:1:248:1893:25c8:1946" family: IPv6
* });
*
* // When options.all is true, the result will be an Array.
* options.all = true;
* dnsPromises.lookup('example.com', options).then((result) => {
* console.log('addresses: %j', result);
* // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}]
* });
* ```
* @since v10.6.0
*/
function lookup(hostname: string, family: number): Promise<LookupAddress>;
function lookup(hostname: string, options: LookupOneOptions): Promise<LookupAddress>;
function lookup(hostname: string, options: LookupAllOptions): Promise<LookupAddress[]>;
function lookup(hostname: string, options: LookupOptions): Promise<LookupAddress | LookupAddress[]>;
function lookup(hostname: string): Promise<LookupAddress>;
/**
* Resolves the given `address` and `port` into a host name and service using
* the operating system's underlying `getnameinfo` implementation.
*
* If `address` is not a valid IP address, a `TypeError` will be thrown.
* The `port` will be coerced to a number. If it is not a legal port, a `TypeError` will be thrown.
*
* On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` is the error code.
*
* ```js
* import dnsPromises from 'node:dns';
* dnsPromises.lookupService('127.0.0.1', 22).then((result) => {
* console.log(result.hostname, result.service);
* // Prints: localhost ssh
* });
* ```
* @since v10.6.0
*/
function lookupService(
address: string,
port: number,
): Promise<{
hostname: string;
service: string;
}>;
/**
* Uses the DNS protocol to resolve a host name (e.g. `'nodejs.org'`) into an array
* of the resource records. When successful, the `Promise` is resolved with an
* array of resource records. The type and structure of individual results vary
* based on `rrtype`:
*
* <omitted>
*
* On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code`
* is one of the [DNS error codes](https://nodejs.org/docs/latest-v20.x/api/dns.html#error-codes).
* @since v10.6.0
* @param hostname Host name to resolve.
* @param [rrtype='A'] Resource record type.
*/
function resolve(hostname: string): Promise<string[]>;
function resolve(hostname: string, rrtype: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise<string[]>;
function resolve(hostname: string, rrtype: "ANY"): Promise<AnyRecord[]>;
function resolve(hostname: string, rrtype: "CAA"): Promise<CaaRecord[]>;
function resolve(hostname: string, rrtype: "MX"): Promise<MxRecord[]>;
function resolve(hostname: string, rrtype: "NAPTR"): Promise<NaptrRecord[]>;
function resolve(hostname: string, rrtype: "SOA"): Promise<SoaRecord>;
function resolve(hostname: string, rrtype: "SRV"): Promise<SrvRecord[]>;
function resolve(hostname: string, rrtype: "TLSA"): Promise<TlsaRecord[]>;
function resolve(hostname: string, rrtype: "TXT"): Promise<string[][]>;
function resolve(hostname: string, rrtype: string): Promise<
| string[]
| CaaRecord[]
| MxRecord[]
| NaptrRecord[]
| SoaRecord
| SrvRecord[]
| TlsaRecord[]
| string[][]
| AnyRecord[]
>;
/**
* Uses the DNS protocol to resolve IPv4 addresses (`A` records) for the `hostname`. On success, the `Promise` is resolved with an array of IPv4
* addresses (e.g. `['74.125.79.104', '74.125.79.105', '74.125.79.106']`).
* @since v10.6.0
* @param hostname Host name to resolve.
*/
function resolve4(hostname: string): Promise<string[]>;
function resolve4(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
function resolve4(hostname: string, options: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
/**
* Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the `hostname`. On success, the `Promise` is resolved with an array of IPv6
* addresses.
* @since v10.6.0
* @param hostname Host name to resolve.
*/
function resolve6(hostname: string): Promise<string[]>;
function resolve6(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
function resolve6(hostname: string, options: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
/**
* Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query).
* On success, the `Promise` is resolved with an array containing various types of
* records. Each object has a property `type` that indicates the type of the
* current record. And depending on the `type`, additional properties will be
* present on the object:
*
* <omitted>
*
* Here is an example of the result object:
*
* ```js
* [ { type: 'A', address: '127.0.0.1', ttl: 299 },
* { type: 'CNAME', value: 'example.com' },
* { type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 },
* { type: 'NS', value: 'ns1.example.com' },
* { type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] },
* { type: 'SOA',
* nsname: 'ns1.example.com',
* hostmaster: 'admin.example.com',
* serial: 156696742,
* refresh: 900,
* retry: 900,
* expire: 1800,
* minttl: 60 } ]
* ```
* @since v10.6.0
*/
function resolveAny(hostname: string): Promise<AnyRecord[]>;
/**
* Uses the DNS protocol to resolve `CAA` records for the `hostname`. On success,
* the `Promise` is resolved with an array of objects containing available
* certification authority authorization records available for the `hostname` (e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'},{critical: 128, issue: 'pki.example.com'}]`).
* @since v15.0.0, v14.17.0
*/
function resolveCaa(hostname: string): Promise<CaaRecord[]>;
/**
* Uses the DNS protocol to resolve `CNAME` records for the `hostname`. On success,
* the `Promise` is resolved with an array of canonical name records available for
* the `hostname` (e.g. `['bar.example.com']`).
* @since v10.6.0
*/
function resolveCname(hostname: string): Promise<string[]>;
/**
* Uses the DNS protocol to resolve mail exchange records (`MX` records) for the `hostname`. On success, the `Promise` is resolved with an array of objects
* containing both a `priority` and `exchange` property (e.g.`[{priority: 10, exchange: 'mx.example.com'}, ...]`).
* @since v10.6.0
*/
function resolveMx(hostname: string): Promise<MxRecord[]>;
/**
* Uses the DNS protocol to resolve regular expression-based records (`NAPTR` records) for the `hostname`. On success, the `Promise` is resolved with an array
* of objects with the following properties:
*
* * `flags`
* * `service`
* * `regexp`
* * `replacement`
* * `order`
* * `preference`
*
* ```js
* {
* flags: 's',
* service: 'SIP+D2U',
* regexp: '',
* replacement: '_sip._udp.example.com',
* order: 30,
* preference: 100
* }
* ```
* @since v10.6.0
*/
function resolveNaptr(hostname: string): Promise<NaptrRecord[]>;
/**
* Uses the DNS protocol to resolve name server records (`NS` records) for the `hostname`. On success, the `Promise` is resolved with an array of name server
* records available for `hostname` (e.g.`['ns1.example.com', 'ns2.example.com']`).
* @since v10.6.0
*/
function resolveNs(hostname: string): Promise<string[]>;
/**
* Uses the DNS protocol to resolve pointer records (`PTR` records) for the `hostname`. On success, the `Promise` is resolved with an array of strings
* containing the reply records.
* @since v10.6.0
*/
function resolvePtr(hostname: string): Promise<string[]>;
/**
* Uses the DNS protocol to resolve a start of authority record (`SOA` record) for
* the `hostname`. On success, the `Promise` is resolved with an object with the
* following properties:
*
* * `nsname`
* * `hostmaster`
* * `serial`
* * `refresh`
* * `retry`
* * `expire`
* * `minttl`
*
* ```js
* {
* nsname: 'ns.example.com',
* hostmaster: 'root.example.com',
* serial: 2013101809,
* refresh: 10000,
* retry: 2400,
* expire: 604800,
* minttl: 3600
* }
* ```
* @since v10.6.0
*/
function resolveSoa(hostname: string): Promise<SoaRecord>;
/**
* Uses the DNS protocol to resolve service records (`SRV` records) for the `hostname`. On success, the `Promise` is resolved with an array of objects with
* the following properties:
*
* * `priority`
* * `weight`
* * `port`
* * `name`
*
* ```js
* {
* priority: 10,
* weight: 5,
* port: 21223,
* name: 'service.example.com'
* }
* ```
* @since v10.6.0
*/
function resolveSrv(hostname: string): Promise<SrvRecord[]>;
/**
* Uses the DNS protocol to resolve certificate associations (`TLSA` records) for
* the `hostname`. On success, the `Promise` is resolved with an array of objectsAdd commentMore actions
* with these properties:
*
* * `certUsage`
* * `selector`
* * `match`
* * `data`
*
* ```js
* {
* certUsage: 3,
* selector: 1,
* match: 1,
* data: [ArrayBuffer]
* }
* ```
* @since v22.15.0
*/
function resolveTlsa(hostname: string): Promise<TlsaRecord[]>;
/**
* Uses the DNS protocol to resolve text queries (`TXT` records) for the `hostname`. On success, the `Promise` is resolved with a two-dimensional array
* of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of
* one record. Depending on the use case, these could be either joined together or
* treated separately.
* @since v10.6.0
*/
function resolveTxt(hostname: string): Promise<string[][]>;
/**
* Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an
* array of host names.
*
* On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code`
* is one of the [DNS error codes](https://nodejs.org/docs/latest-v20.x/api/dns.html#error-codes).
* @since v10.6.0
*/
function reverse(ip: string): Promise<string[]>;
/**
* Get the default value for `verbatim` in {@link lookup} and [dnsPromises.lookup()](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromiseslookuphostname-options).
* The value could be:
*
* * `ipv4first`: for `verbatim` defaulting to `false`.
* * `verbatim`: for `verbatim` defaulting to `true`.
* @since v20.1.0
*/
function getDefaultResultOrder(): "ipv4first" | "verbatim";
/**
* Sets the IP address and port of servers to be used when performing DNS
* resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted
* addresses. If the port is the IANA default DNS port (53) it can be omitted.
*
* ```js
* dnsPromises.setServers([
* '4.4.4.4',
* '[2001:4860:4860::8888]',
* '4.4.4.4:1053',
* '[2001:4860:4860::8888]:1053',
* ]);
* ```
*
* An error will be thrown if an invalid address is provided.
*
* The `dnsPromises.setServers()` method must not be called while a DNS query is in
* progress.
*
* This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html).
* That is, if attempting to resolve with the first server provided results in a `NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with
* subsequent servers provided. Fallback DNS servers will only be used if the
* earlier ones time out or result in some other error.
* @since v10.6.0
* @param servers array of `RFC 5952` formatted addresses
*/
function setServers(servers: readonly string[]): void;
/**
* Set the default value of `order` in `dns.lookup()` and `{@link lookup}`. The value could be:
*
* * `ipv4first`: sets default `order` to `ipv4first`.
* * `ipv6first`: sets default `order` to `ipv6first`.
* * `verbatim`: sets default `order` to `verbatim`.
*
* The default is `verbatim` and [dnsPromises.setDefaultResultOrder()](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetdefaultresultorderorder)
* have higher priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v20.x/api/cli.html#--dns-result-orderorder).
* When using [worker threads](https://nodejs.org/docs/latest-v20.x/api/worker_threads.html), [`dnsPromises.setDefaultResultOrder()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetdefaultresultorderorder)
* from the main thread won't affect the default dns orders in workers.
* @since v16.4.0, v14.18.0
* @param order must be `'ipv4first'`, `'ipv6first'` or `'verbatim'`.
*/
function setDefaultResultOrder(order: "ipv4first" | "ipv6first" | "verbatim"): void;
// Error codes
const NODATA: "ENODATA";
const FORMERR: "EFORMERR";
const SERVFAIL: "ESERVFAIL";
const NOTFOUND: "ENOTFOUND";
const NOTIMP: "ENOTIMP";
const REFUSED: "EREFUSED";
const BADQUERY: "EBADQUERY";
const BADNAME: "EBADNAME";
const BADFAMILY: "EBADFAMILY";
const BADRESP: "EBADRESP";
const CONNREFUSED: "ECONNREFUSED";
const TIMEOUT: "ETIMEOUT";
const EOF: "EOF";
const FILE: "EFILE";
const NOMEM: "ENOMEM";
const DESTRUCTION: "EDESTRUCTION";
const BADSTR: "EBADSTR";
const BADFLAGS: "EBADFLAGS";
const NONAME: "ENONAME";
const BADHINTS: "EBADHINTS";
const NOTINITIALIZED: "ENOTINITIALIZED";
const LOADIPHLPAPI: "ELOADIPHLPAPI";
const ADDRGETNETWORKPARAMS: "EADDRGETNETWORKPARAMS";
const CANCELLED: "ECANCELLED";
/**
* An independent resolver for DNS requests.
*
* Creating a new resolver uses the default server settings. Setting
* the servers used for a resolver using [`resolver.setServers()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetserversservers) does not affect
* other resolvers:
*
* ```js
* import { promises } from 'node:dns';
* const resolver = new promises.Resolver();
* resolver.setServers(['4.4.4.4']);
*
* // This request will use the server at 4.4.4.4, independent of global settings.
* resolver.resolve4('example.org').then((addresses) => {
* // ...
* });
*
* // Alternatively, the same code can be written using async-await style.
* (async function() {
* const addresses = await resolver.resolve4('example.org');
* })();
* ```
*
* The following methods from the `dnsPromises` API are available:
*
* * `resolver.getServers()`
* * `resolver.resolve()`
* * `resolver.resolve4()`
* * `resolver.resolve6()`
* * `resolver.resolveAny()`
* * `resolver.resolveCaa()`
* * `resolver.resolveCname()`
* * `resolver.resolveMx()`
* * `resolver.resolveNaptr()`
* * `resolver.resolveNs()`
* * `resolver.resolvePtr()`
* * `resolver.resolveSoa()`
* * `resolver.resolveSrv()`
* * `resolver.resolveTxt()`
* * `resolver.reverse()`
* * `resolver.setServers()`
* @since v10.6.0
*/
class Resolver {
constructor(options?: ResolverOptions);
/**
* Cancel all outstanding DNS queries made by this resolver. The corresponding
* callbacks will be called with an error with code `ECANCELLED`.
* @since v8.3.0
*/
cancel(): void;
getServers: typeof getServers;
resolve: typeof resolve;
resolve4: typeof resolve4;
resolve6: typeof resolve6;
resolveAny: typeof resolveAny;
resolveCaa: typeof resolveCaa;
resolveCname: typeof resolveCname;
resolveMx: typeof resolveMx;
resolveNaptr: typeof resolveNaptr;
resolveNs: typeof resolveNs;
resolvePtr: typeof resolvePtr;
resolveSoa: typeof resolveSoa;
resolveSrv: typeof resolveSrv;
resolveTlsa: typeof resolveTlsa;
resolveTxt: typeof resolveTxt;
reverse: typeof reverse;
/**
* The resolver instance will send its requests from the specified IP address.
* This allows programs to specify outbound interfaces when used on multi-homed
* systems.
*
* If a v4 or v6 address is not specified, it is set to the default and the
* operating system will choose a local address automatically.
*
* The resolver will use the v4 local address when making requests to IPv4 DNS
* servers, and the v6 local address when making requests to IPv6 DNS servers.
* The `rrtype` of resolution requests has no impact on the local address used.
* @since v15.1.0, v14.17.0
* @param [ipv4='0.0.0.0'] A string representation of an IPv4 address.
* @param [ipv6='::0'] A string representation of an IPv6 address.
*/
setLocalAddress(ipv4?: string, ipv6?: string): void;
setServers: typeof setServers;
}
}
declare module "node:dns/promises" {
export * from "dns/promises";
}

View File

@@ -0,0 +1,40 @@
/// <reference types="node" />
/// <reference types="node" />
import { Span } from '@opentelemetry/api';
import { InstrumentationConfig, SemconvStability } from '@opentelemetry/instrumentation';
/**
* Function that can be used to serialize db.statement tag
* @param cmdName - The name of the command (eg. set, get, mset)
* @param cmdArgs - Array of arguments passed to the command
*
* @returns serialized string that will be used as the db.statement attribute.
*/
export type DbStatementSerializer = (cmdName: string, cmdArgs: Array<string | Buffer>) => string;
/**
* Function that can be used to add custom attributes to span on response from redis server
* @param span - The span created for the redis command, on which attributes can be set
* @param cmdName - The name of the command (eg. set, get, mset)
* @param cmdArgs - Array of arguments passed to the command
* @param response - The response object which is returned to the user who called this command.
* Can be used to set custom attributes on the span.
* The type of the response varies depending on the specific command.
*/
export interface RedisResponseCustomAttributeFunction {
(span: Span, cmdName: string, cmdArgs: Array<string | Buffer>, response: unknown): void;
}
export interface RedisInstrumentationConfig extends InstrumentationConfig {
/** Custom serializer function for the db.statement tag */
dbStatementSerializer?: DbStatementSerializer;
/** Function for adding custom attributes on db response */
responseHook?: RedisResponseCustomAttributeFunction;
/** Require parent to create redis span, default when unset is false */
requireParentSpan?: boolean;
/**
* Controls which semantic-convention attributes are emitted on spans.
* Default: 'OLD'.
* When this option is set, it takes precedence over any value provided via
* the OTEL_SEMCONV_STABILITY_OPT_IN environment variable.
*/
semconvStability?: SemconvStability;
}
//# sourceMappingURL=types.d.ts.map

View File

@@ -0,0 +1,8 @@
import type { Field, PayloadRequest, ResolvedFilterOptions } from 'payload';
export declare const resolveAllFilterOptions: ({ fields, pathPrefix, req, result, }: {
fields: Field[];
pathPrefix?: string;
req: PayloadRequest;
result?: Map<string, ResolvedFilterOptions>;
}) => Promise<Map<string, ResolvedFilterOptions>>;
//# sourceMappingURL=resolveAllFilterOptions.d.ts.map

View File

@@ -0,0 +1,15 @@
# Installation
> `npm install --save @types/mysql`
# Summary
This package contains type definitions for mysql (https://github.com/mysqljs/mysql).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mysql.
### Additional Details
* Last updated: Wed, 26 Mar 2025 09:02:17 GMT
* Dependencies: [@types/node](https://npmjs.com/package/@types/node)
# Credits
These definitions were written by [ William Johnston](https://github.com/wjohnsto), [Krittanan Pingclasai](https://github.com/kpping), [James Munro](https://github.com/jdmunro), and [Sanders DeNardi](https://github.com/sedenardi).

View File

@@ -0,0 +1,6 @@
/**
* Removes all child nodes from a given node.
*
* @param node the node to clear
*/
export default function clear(node: Node | null): Node | null;

View File

@@ -0,0 +1,101 @@
// Copyright Joyent, Inc. and other Node contributors.
//
// 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.
var common = require('./common');
var assert = require('assert');
var events = require('../');
// Redirect warning output to tape.
var consoleWarn = console.warn;
console.warn = common.test.comment;
common.test.on('end', function () {
console.warn = consoleWarn;
});
// default
{
var e = new events.EventEmitter();
for (var i = 0; i < 10; i++) {
e.on('default', common.mustNotCall());
}
assert.ok(!e._events['default'].hasOwnProperty('warned'));
e.on('default', common.mustNotCall());
assert.ok(e._events['default'].warned);
// specific
e.setMaxListeners(5);
for (var i = 0; i < 5; i++) {
e.on('specific', common.mustNotCall());
}
assert.ok(!e._events['specific'].hasOwnProperty('warned'));
e.on('specific', common.mustNotCall());
assert.ok(e._events['specific'].warned);
// only one
e.setMaxListeners(1);
e.on('only one', common.mustNotCall());
assert.ok(!e._events['only one'].hasOwnProperty('warned'));
e.on('only one', common.mustNotCall());
assert.ok(e._events['only one'].hasOwnProperty('warned'));
// unlimited
e.setMaxListeners(0);
for (var i = 0; i < 1000; i++) {
e.on('unlimited', common.mustNotCall());
}
assert.ok(!e._events['unlimited'].hasOwnProperty('warned'));
}
// process-wide
{
events.EventEmitter.defaultMaxListeners = 42;
var e = new events.EventEmitter();
for (var i = 0; i < 42; ++i) {
e.on('fortytwo', common.mustNotCall());
}
assert.ok(!e._events['fortytwo'].hasOwnProperty('warned'));
e.on('fortytwo', common.mustNotCall());
assert.ok(e._events['fortytwo'].hasOwnProperty('warned'));
delete e._events['fortytwo'].warned;
events.EventEmitter.defaultMaxListeners = 44;
e.on('fortytwo', common.mustNotCall());
assert.ok(!e._events['fortytwo'].hasOwnProperty('warned'));
e.on('fortytwo', common.mustNotCall());
assert.ok(e._events['fortytwo'].hasOwnProperty('warned'));
}
// but _maxListeners still has precedence over defaultMaxListeners
{
events.EventEmitter.defaultMaxListeners = 42;
var e = new events.EventEmitter();
e.setMaxListeners(1);
e.on('uno', common.mustNotCall());
assert.ok(!e._events['uno'].hasOwnProperty('warned'));
e.on('uno', common.mustNotCall());
assert.ok(e._events['uno'].hasOwnProperty('warned'));
// chainable
assert.strictEqual(e, e.setMaxListeners(1));
}

View File

@@ -0,0 +1,7 @@
import { Sampler, SamplingResult } from '../Sampler';
/** Sampler that samples all traces. */
export declare class AlwaysOnSampler implements Sampler {
shouldSample(): SamplingResult;
toString(): string;
}
//# sourceMappingURL=AlwaysOnSampler.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"v6-tracing-helper.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/tracing/prisma/vendor/v6-tracing-helper.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAErE,KAAK,cAAc,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE,OAAO,KAAK,CAAC,CAAC;AAE/D,KAAK,qBAAqB,GAAG,WAAW,GAAG;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,KAAK,cAAc,GAAG,MAAM,CAAC;AAE7B,KAAK,QAAQ,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEjC,KAAK,cAAc,GAAG,QAAQ,GAAG,UAAU,CAAC;AAE5C,KAAK,kBAAkB,GAAG;IACxB,EAAE,EAAE,cAAc,CAAC;IACnB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,QAAQ,CAAC;IACpB,OAAO,EAAE,QAAQ,CAAC;IAClB,IAAI,EAAE,cAAc,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,KAAK,CAAC,EAAE,cAAc,EAAE,CAAC;CAC1B,CAAC;AAEF,MAAM,WAAW,qBAAqB;IACpC,SAAS,IAAI,OAAO,CAAC;IACrB,cAAc,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC1C,mBAAmB,CAAC,KAAK,EAAE,kBAAkB,EAAE,GAAG,IAAI,CAAC;IACvD,gBAAgB,IAAI,OAAO,GAAG,SAAS,CAAC;IACxC,cAAc,CAAC,CAAC,EAAE,aAAa,EAAE,MAAM,GAAG,qBAAqB,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CAClG"}

View File

@@ -0,0 +1,72 @@
'use strict';
/**
* Check if a character is a delimiter as defined in section 3.2.6 of RFC 7230.
*
*
* @param {number} code The code of the character to check.
* @returns {boolean} `true` if the character is a delimiter, else `false`.
* @public
*/
function isDelimiter(code) {
return code === 0x22 // '"'
|| code === 0x28 // '('
|| code === 0x29 // ')'
|| code === 0x2C // ','
|| code === 0x2F // '/'
|| code >= 0x3A && code <= 0x40 // ':', ';', '<', '=', '>', '?' '@'
|| code >= 0x5B && code <= 0x5D // '[', '\', ']'
|| code === 0x7B // '{'
|| code === 0x7D; // '}'
}
/**
* Check if a character is allowed in a token as defined in section 3.2.6
* of RFC 7230.
*
* @param {number} code The code of the character to check.
* @returns {boolean} `true` if the character is allowed, else `false`.
* @public
*/
function isTokenChar(code) {
return code === 0x21 // '!'
|| code >= 0x23 && code <= 0x27 // '#', '$', '%', '&', '''
|| code === 0x2A // '*'
|| code === 0x2B // '+'
|| code === 0x2D // '-'
|| code === 0x2E // '.'
|| code >= 0x30 && code <= 0x39 // 0-9
|| code >= 0x41 && code <= 0x5A // A-Z
|| code >= 0x5E && code <= 0x7A // '^', '_', '`', a-z
|| code === 0x7C // '|'
|| code === 0x7E; // '~'
}
/**
* Check if a character is a printable ASCII character.
*
* @param {number} code The code of the character to check.
* @returns {boolean} `true` if `code` is in the %x20-7E range, else `false`.
* @public
*/
function isPrint(code) {
return code >= 0x20 && code <= 0x7E;
}
/**
* Check if a character is an extended ASCII character.
*
* @param {number} code The code of the character to check.
* @returns {boolean} `true` if `code` is in the %x80-FF range, else `false`.
* @public
*/
function isExtended(code) {
return code >= 0x80 && code <= 0xFF;
}
module.exports = {
isDelimiter: isDelimiter,
isTokenChar: isTokenChar,
isExtended: isExtended,
isPrint: isPrint
};

View File

@@ -0,0 +1,193 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FEATURES = exports.loadSerializedSVG = exports.createForeignObjectSVG = void 0;
var css_line_break_1 = require("css-line-break");
var testRangeBounds = function (document) {
var TEST_HEIGHT = 123;
if (document.createRange) {
var range = document.createRange();
if (range.getBoundingClientRect) {
var testElement = document.createElement('boundtest');
testElement.style.height = TEST_HEIGHT + "px";
testElement.style.display = 'block';
document.body.appendChild(testElement);
range.selectNode(testElement);
var rangeBounds = range.getBoundingClientRect();
var rangeHeight = Math.round(rangeBounds.height);
document.body.removeChild(testElement);
if (rangeHeight === TEST_HEIGHT) {
return true;
}
}
}
return false;
};
var testIOSLineBreak = function (document) {
var testElement = document.createElement('boundtest');
testElement.style.width = '50px';
testElement.style.display = 'block';
testElement.style.fontSize = '12px';
testElement.style.letterSpacing = '0px';
testElement.style.wordSpacing = '0px';
document.body.appendChild(testElement);
var range = document.createRange();
testElement.innerHTML = typeof ''.repeat === 'function' ? '&#128104;'.repeat(10) : '';
var node = testElement.firstChild;
var textList = css_line_break_1.toCodePoints(node.data).map(function (i) { return css_line_break_1.fromCodePoint(i); });
var offset = 0;
var prev = {};
// ios 13 does not handle range getBoundingClientRect line changes correctly #2177
var supports = textList.every(function (text, i) {
range.setStart(node, offset);
range.setEnd(node, offset + text.length);
var rect = range.getBoundingClientRect();
offset += text.length;
var boundAhead = rect.x > prev.x || rect.y > prev.y;
prev = rect;
if (i === 0) {
return true;
}
return boundAhead;
});
document.body.removeChild(testElement);
return supports;
};
var testCORS = function () { return typeof new Image().crossOrigin !== 'undefined'; };
var testResponseType = function () { return typeof new XMLHttpRequest().responseType === 'string'; };
var testSVG = function (document) {
var img = new Image();
var canvas = document.createElement('canvas');
var ctx = canvas.getContext('2d');
if (!ctx) {
return false;
}
img.src = "data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";
try {
ctx.drawImage(img, 0, 0);
canvas.toDataURL();
}
catch (e) {
return false;
}
return true;
};
var isGreenPixel = function (data) {
return data[0] === 0 && data[1] === 255 && data[2] === 0 && data[3] === 255;
};
var testForeignObject = function (document) {
var canvas = document.createElement('canvas');
var size = 100;
canvas.width = size;
canvas.height = size;
var ctx = canvas.getContext('2d');
if (!ctx) {
return Promise.reject(false);
}
ctx.fillStyle = 'rgb(0, 255, 0)';
ctx.fillRect(0, 0, size, size);
var img = new Image();
var greenImageSrc = canvas.toDataURL();
img.src = greenImageSrc;
var svg = exports.createForeignObjectSVG(size, size, 0, 0, img);
ctx.fillStyle = 'red';
ctx.fillRect(0, 0, size, size);
return exports.loadSerializedSVG(svg)
.then(function (img) {
ctx.drawImage(img, 0, 0);
var data = ctx.getImageData(0, 0, size, size).data;
ctx.fillStyle = 'red';
ctx.fillRect(0, 0, size, size);
var node = document.createElement('div');
node.style.backgroundImage = "url(" + greenImageSrc + ")";
node.style.height = size + "px";
// Firefox 55 does not render inline <img /> tags
return isGreenPixel(data)
? exports.loadSerializedSVG(exports.createForeignObjectSVG(size, size, 0, 0, node))
: Promise.reject(false);
})
.then(function (img) {
ctx.drawImage(img, 0, 0);
// Edge does not render background-images
return isGreenPixel(ctx.getImageData(0, 0, size, size).data);
})
.catch(function () { return false; });
};
var createForeignObjectSVG = function (width, height, x, y, node) {
var xmlns = 'http://www.w3.org/2000/svg';
var svg = document.createElementNS(xmlns, 'svg');
var foreignObject = document.createElementNS(xmlns, 'foreignObject');
svg.setAttributeNS(null, 'width', width.toString());
svg.setAttributeNS(null, 'height', height.toString());
foreignObject.setAttributeNS(null, 'width', '100%');
foreignObject.setAttributeNS(null, 'height', '100%');
foreignObject.setAttributeNS(null, 'x', x.toString());
foreignObject.setAttributeNS(null, 'y', y.toString());
foreignObject.setAttributeNS(null, 'externalResourcesRequired', 'true');
svg.appendChild(foreignObject);
foreignObject.appendChild(node);
return svg;
};
exports.createForeignObjectSVG = createForeignObjectSVG;
var loadSerializedSVG = function (svg) {
return new Promise(function (resolve, reject) {
var img = new Image();
img.onload = function () { return resolve(img); };
img.onerror = reject;
img.src = "data:image/svg+xml;charset=utf-8," + encodeURIComponent(new XMLSerializer().serializeToString(svg));
});
};
exports.loadSerializedSVG = loadSerializedSVG;
exports.FEATURES = {
get SUPPORT_RANGE_BOUNDS() {
'use strict';
var value = testRangeBounds(document);
Object.defineProperty(exports.FEATURES, 'SUPPORT_RANGE_BOUNDS', { value: value });
return value;
},
get SUPPORT_WORD_BREAKING() {
'use strict';
var value = exports.FEATURES.SUPPORT_RANGE_BOUNDS && testIOSLineBreak(document);
Object.defineProperty(exports.FEATURES, 'SUPPORT_WORD_BREAKING', { value: value });
return value;
},
get SUPPORT_SVG_DRAWING() {
'use strict';
var value = testSVG(document);
Object.defineProperty(exports.FEATURES, 'SUPPORT_SVG_DRAWING', { value: value });
return value;
},
get SUPPORT_FOREIGNOBJECT_DRAWING() {
'use strict';
var value = typeof Array.from === 'function' && typeof window.fetch === 'function'
? testForeignObject(document)
: Promise.resolve(false);
Object.defineProperty(exports.FEATURES, 'SUPPORT_FOREIGNOBJECT_DRAWING', { value: value });
return value;
},
get SUPPORT_CORS_IMAGES() {
'use strict';
var value = testCORS();
Object.defineProperty(exports.FEATURES, 'SUPPORT_CORS_IMAGES', { value: value });
return value;
},
get SUPPORT_RESPONSE_TYPE() {
'use strict';
var value = testResponseType();
Object.defineProperty(exports.FEATURES, 'SUPPORT_RESPONSE_TYPE', { value: value });
return value;
},
get SUPPORT_CORS_XHR() {
'use strict';
var value = 'withCredentials' in new XMLHttpRequest();
Object.defineProperty(exports.FEATURES, 'SUPPORT_CORS_XHR', { value: value });
return value;
},
get SUPPORT_NATIVE_TEXT_SEGMENTATION() {
'use strict';
// eslint-disable-next-line @typescript-eslint/no-explicit-any
var value = !!(typeof Intl !== 'undefined' && Intl.Segmenter);
Object.defineProperty(exports.FEATURES, 'SUPPORT_NATIVE_TEXT_SEGMENTATION', { value: value });
return value;
}
};
//# sourceMappingURL=features.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"swatch-book.js","sources":["../../../src/icons/swatch-book.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name SwatchBook\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTEgMTdhNCA0IDAgMCAxLTggMFY1YTIgMiAwIDAgMSAyLTJoNGEyIDIgMCAwIDEgMiAyWiIgLz4KICA8cGF0aCBkPSJNMTYuNyAxM0gxOWEyIDIgMCAwIDEgMiAydjRhMiAyIDAgMCAxLTIgMkg3IiAvPgogIDxwYXRoIGQ9Ik0gNyAxN2guMDEiIC8+CiAgPHBhdGggZD0ibTExIDggMi4zLTIuM2EyLjQgMi40IDAgMCAxIDMuNDA0LjAwNEwxOC42IDcuNmEyLjQgMi40IDAgMCAxIC4wMjYgMy40MzRMOS45IDE5LjgiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/swatch-book\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 SwatchBook = createLucideIcon('SwatchBook', [\n ['path', { d: 'M11 17a4 4 0 0 1-8 0V5a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2Z', key: '1ldrpk' }],\n ['path', { d: 'M16.7 13H19a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2H7', key: '11i5po' }],\n ['path', { d: 'M 7 17h.01', key: '1euzgo' }],\n [\n 'path',\n {\n d: 'm11 8 2.3-2.3a2.4 2.4 0 0 1 3.404.004L18.6 7.6a2.4 2.4 0 0 1 .026 3.434L9.9 19.8',\n key: 'o2gii7',\n },\n ],\n]);\n\nexport default SwatchBook;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,iBAAiB,YAAc,CAAA,CAAA,CAAA;AAAA,CAAA,CAChD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAyD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACtF,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA+C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC5E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAC3C,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA;AACF,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/gel-core/query-builders/refresh-materialized-view.ts"],"sourcesContent":["import { entityKind } from '~/entity.ts';\nimport type { GelDialect } from '~/gel-core/dialect.ts';\nimport type {\n\tGelPreparedQuery,\n\tGelQueryResultHKT,\n\tGelQueryResultKind,\n\tGelSession,\n\tPreparedQueryConfig,\n} from '~/gel-core/session.ts';\nimport type { GelMaterializedView } from '~/gel-core/view.ts';\nimport { QueryPromise } from '~/query-promise.ts';\nimport type { RunnableQuery } from '~/runnable-query.ts';\nimport type { Query, SQL, SQLWrapper } from '~/sql/sql.ts';\nimport { tracer } from '~/tracing.ts';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface GelRefreshMaterializedView<TQueryResult extends GelQueryResultHKT>\n\textends\n\t\tQueryPromise<GelQueryResultKind<TQueryResult, never>>,\n\t\tRunnableQuery<GelQueryResultKind<TQueryResult, never>, 'gel'>,\n\t\tSQLWrapper\n{\n\treadonly _: {\n\t\treadonly dialect: 'gel';\n\t\treadonly result: GelQueryResultKind<TQueryResult, never>;\n\t};\n}\n\nexport class GelRefreshMaterializedView<TQueryResult extends GelQueryResultHKT>\n\textends QueryPromise<GelQueryResultKind<TQueryResult, never>>\n\timplements RunnableQuery<GelQueryResultKind<TQueryResult, never>, 'gel'>, SQLWrapper\n{\n\tstatic override readonly [entityKind]: string = 'GelRefreshMaterializedView';\n\n\tprivate config: {\n\t\tview: GelMaterializedView;\n\t\tconcurrently?: boolean;\n\t\twithNoData?: boolean;\n\t};\n\n\tconstructor(\n\t\tview: GelMaterializedView,\n\t\tprivate session: GelSession,\n\t\tprivate dialect: GelDialect,\n\t) {\n\t\tsuper();\n\t\tthis.config = { view };\n\t}\n\n\tconcurrently(): this {\n\t\tif (this.config.withNoData !== undefined) {\n\t\t\tthrow new Error('Cannot use concurrently and withNoData together');\n\t\t}\n\t\tthis.config.concurrently = true;\n\t\treturn this;\n\t}\n\n\twithNoData(): this {\n\t\tif (this.config.concurrently !== undefined) {\n\t\t\tthrow new Error('Cannot use concurrently and withNoData together');\n\t\t}\n\t\tthis.config.withNoData = true;\n\t\treturn this;\n\t}\n\n\t/** @internal */\n\tgetSQL(): SQL {\n\t\treturn this.dialect.buildRefreshMaterializedViewQuery(this.config);\n\t}\n\n\ttoSQL(): Query {\n\t\tconst { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL());\n\t\treturn rest;\n\t}\n\n\t/** @internal */\n\t_prepare(name?: string): GelPreparedQuery<\n\t\tPreparedQueryConfig & {\n\t\t\texecute: GelQueryResultKind<TQueryResult, never>;\n\t\t}\n\t> {\n\t\treturn tracer.startActiveSpan('drizzle.prepareQuery', () => {\n\t\t\treturn this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()), undefined, name, true);\n\t\t});\n\t}\n\n\tprepare(name: string): GelPreparedQuery<\n\t\tPreparedQueryConfig & {\n\t\t\texecute: GelQueryResultKind<TQueryResult, never>;\n\t\t}\n\t> {\n\t\treturn this._prepare(name);\n\t}\n\n\texecute: ReturnType<this['prepare']>['execute'] = (placeholderValues) => {\n\t\treturn tracer.startActiveSpan('drizzle.operation', () => {\n\t\t\treturn this._prepare().execute(placeholderValues);\n\t\t});\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA2B;AAU3B,2BAA6B;AAG7B,qBAAuB;AAehB,MAAM,mCACJ,kCAET;AAAA,EASC,YACC,MACQ,SACA,SACP;AACD,UAAM;AAHE;AACA;AAGR,SAAK,SAAS,EAAE,KAAK;AAAA,EACtB;AAAA,EAfA,QAA0B,wBAAU,IAAY;AAAA,EAExC;AAAA,EAeR,eAAqB;AACpB,QAAI,KAAK,OAAO,eAAe,QAAW;AACzC,YAAM,IAAI,MAAM,iDAAiD;AAAA,IAClE;AACA,SAAK,OAAO,eAAe;AAC3B,WAAO;AAAA,EACR;AAAA,EAEA,aAAmB;AAClB,QAAI,KAAK,OAAO,iBAAiB,QAAW;AAC3C,YAAM,IAAI,MAAM,iDAAiD;AAAA,IAClE;AACA,SAAK,OAAO,aAAa;AACzB,WAAO;AAAA,EACR;AAAA;AAAA,EAGA,SAAc;AACb,WAAO,KAAK,QAAQ,kCAAkC,KAAK,MAAM;AAAA,EAClE;AAAA,EAEA,QAAe;AACd,UAAM,EAAE,SAAS,UAAU,GAAG,KAAK,IAAI,KAAK,QAAQ,WAAW,KAAK,OAAO,CAAC;AAC5E,WAAO;AAAA,EACR;AAAA;AAAA,EAGA,SAAS,MAIP;AACD,WAAO,sBAAO,gBAAgB,wBAAwB,MAAM;AAC3D,aAAO,KAAK,QAAQ,aAAa,KAAK,QAAQ,WAAW,KAAK,OAAO,CAAC,GAAG,QAAW,MAAM,IAAI;AAAA,IAC/F,CAAC;AAAA,EACF;AAAA,EAEA,QAAQ,MAIN;AACD,WAAO,KAAK,SAAS,IAAI;AAAA,EAC1B;AAAA,EAEA,UAAkD,CAAC,sBAAsB;AACxE,WAAO,sBAAO,gBAAgB,qBAAqB,MAAM;AACxD,aAAO,KAAK,SAAS,EAAE,QAAQ,iBAAiB;AAAA,IACjD,CAAC;AAAA,EACF;AACD;","names":[]}

View File

@@ -0,0 +1 @@
module.exports={C:{"5":0.01779,"101":0.01186,"115":0.01186,"123":0.02965,"127":0.00593,"133":0.03558,"134":0.01186,"135":0.03558,"136":0.00593,"137":0.00593,"140":0.02372,"143":0.07709,"144":0.00593,"145":0.69381,"146":2.29491,"147":0.03558,_:"2 3 4 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 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 120 121 122 124 125 126 128 129 130 131 132 138 139 141 142 148 149 3.5 3.6"},D:{"69":0.01779,"79":0.08302,"92":0.36173,"103":0.01186,"109":0.07116,"111":0.01779,"116":0.12453,"122":0.00593,"124":0.16604,"125":0.18383,"126":0.00593,"128":0.00593,"131":0.20162,"132":0.0593,"133":0.02965,"134":0.33208,"135":0.05337,"136":0.08302,"137":0.02965,"138":0.2965,"139":0.14825,"140":0.4151,"141":0.48626,"142":13.43145,"143":16.09995,_:"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 70 71 72 73 74 75 76 77 78 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 104 105 106 107 108 110 112 113 114 115 117 118 119 120 121 123 127 129 130 144 145 146"},F:{"87":0.00593,"114":0.04151,"122":0.00593,"124":1.31646,"125":0.42696,_:"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 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 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:{"14":0.02372,"18":0.03558,"109":0.01186,"131":0.01186,"132":0.02965,"133":0.11267,"134":0.01186,"136":0.02965,"138":0.02965,"139":0.00593,"141":0.04151,"142":2.03399,"143":7.08042,_:"12 13 15 16 17 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 122 123 124 125 126 127 128 129 130 135 137 140"},E:{"14":0.02372,"15":0.00593,_:"0 4 5 6 7 8 9 10 11 12 13 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 15.2-15.3 15.4 15.5 16.1 16.2 16.5 17.0 17.3 26.3","13.1":0.00593,"14.1":0.04744,"15.1":0.00593,"15.6":0.27871,"16.0":0.08895,"16.3":0.01186,"16.4":0.02372,"16.6":0.27278,"17.1":0.17197,"17.2":0.02965,"17.4":0.02372,"17.5":0.1186,"17.6":0.16011,"18.0":0.00593,"18.1":0.02965,"18.2":0.04744,"18.3":0.06523,"18.4":0.33208,"18.5-18.6":0.26685,"26.0":0.07709,"26.1":1.35797,"26.2":0.14232},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00387,"5.0-5.1":0,"6.0-6.1":0.00775,"7.0-7.1":0.00581,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.0155,"10.0-10.2":0.00194,"10.3":0.02712,"11.0-11.2":0.33316,"11.3-11.4":0.00968,"12.0-12.1":0.00775,"12.2-12.5":0.08716,"13.0-13.1":0.00194,"13.2":0.01356,"13.3":0.00387,"13.4-13.7":0.01356,"14.0-14.4":0.02712,"14.5-14.8":0.02905,"15.0-15.1":0.03099,"15.2-15.3":0.02324,"15.4":0.02518,"15.5":0.02712,"15.6-15.8":0.42033,"16.0":0.04842,"16.1":0.09298,"16.2":0.04842,"16.3":0.08716,"16.4":0.02131,"16.5":0.0368,"16.6-16.7":0.54623,"17.0":0.03099,"17.1":0.05036,"17.2":0.0368,"17.3":0.05617,"17.4":0.09491,"17.5":0.18595,"17.6-17.7":0.43001,"18.0":0.09685,"18.1":0.20145,"18.2":0.10653,"18.3":0.34672,"18.4":0.1782,"18.5-18.7":12.7957,"26.0":0.24987,"26.1":2.07838,"26.2":0.39514,"26.3":0.01743},P:{"21":0.02087,"27":0.01044,"28":0.09393,"29":2.56746,_:"4 20 22 23 24 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.01044},I:{"0":0.01626,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0.00001},A:{"8":0.04744,"10":0.01186,"11":0.02372,_:"6 7 9 5.5"},K:{"0":0.02036,_:"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.04071},H:{"0":0},L:{"0":18.85677},R:{_:"0"},M:{"0":0.51295}};

View File

@@ -0,0 +1,53 @@
"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 uuid_exports = {};
__export(uuid_exports, {
GelUUID: () => GelUUID,
GelUUIDBuilder: () => GelUUIDBuilder,
uuid: () => uuid
});
module.exports = __toCommonJS(uuid_exports);
var import_entity = require("../../entity.cjs");
var import_common = require("./common.cjs");
class GelUUIDBuilder extends import_common.GelColumnBuilder {
static [import_entity.entityKind] = "GelUUIDBuilder";
constructor(name) {
super(name, "string", "GelUUID");
}
/** @internal */
build(table) {
return new GelUUID(table, this.config);
}
}
class GelUUID extends import_common.GelColumn {
static [import_entity.entityKind] = "GelUUID";
getSQLType() {
return "uuid";
}
}
function uuid(name) {
return new GelUUIDBuilder(name ?? "");
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
GelUUID,
GelUUIDBuilder,
uuid
});
//# sourceMappingURL=uuid.cjs.map

View File

@@ -0,0 +1,28 @@
/**
* @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 Droplets = createLucideIcon("Droplets", [
[
"path",
{
d: "M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05z",
key: "1ptgy4"
}
],
[
"path",
{
d: "M12.56 6.6A10.97 10.97 0 0 0 14 3.02c.5 2.5 2 4.9 4 6.5s3 3.5 3 5.5a6.98 6.98 0 0 1-11.91 4.97",
key: "1sl1rz"
}
]
]);
export { Droplets as default };
//# sourceMappingURL=droplets.js.map

View File

@@ -0,0 +1,64 @@
/**
* ```
* WhiteSpace ::
* - "Horizontal Tab (U+0009)"
* - "Space (U+0020)"
* ```
* @internal
*/
export function isWhiteSpace(code) {
return code === 0x0009 || code === 0x0020;
}
/**
* ```
* Digit :: one of
* - `0` `1` `2` `3` `4` `5` `6` `7` `8` `9`
* ```
* @internal
*/
export function isDigit(code) {
return code >= 0x0030 && code <= 0x0039;
}
/**
* ```
* Letter :: one of
* - `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`
* - `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`
* ```
* @internal
*/
export function isLetter(code) {
return (
(code >= 0x0061 && code <= 0x007a) || // A-Z
(code >= 0x0041 && code <= 0x005a) // a-z
);
}
/**
* ```
* NameStart ::
* - Letter
* - `_`
* ```
* @internal
*/
export function isNameStart(code) {
return isLetter(code) || code === 0x005f;
}
/**
* ```
* NameContinue ::
* - Letter
* - Digit
* - `_`
* ```
* @internal
*/
export function isNameContinue(code) {
return isLetter(code) || isDigit(code) || code === 0x005f;
}

View File

@@ -0,0 +1,11 @@
/**
* A function to diagnose why the SDK might not be successfully sending data.
*
* Possible return values wrapped in a Promise:
* - `"no-client-active"` - There was no active client when the function was called. This possibly means that the SDK was not initialized yet.
* - `"sentry-unreachable"` - The Sentry SaaS servers were not reachable. This likely means that there is an ad blocker active on the page or that there are other connection issues.
*
* If the function doesn't detect an issue it resolves to `undefined`.
*/
export declare function diagnoseSdkConnectivity(): Promise<'no-client-active' | 'sentry-unreachable' | 'no-dsn-configured' | void>;
//# sourceMappingURL=diagnose-sdk.d.ts.map

View File

@@ -0,0 +1 @@
module.exports={C:{"3":0.00553,"4":0.02764,"5":0.06081,"52":0.00553,"78":0.00553,"115":0.02764,"125":0.00553,"128":0.00553,"134":0.00553,"135":0.00553,"140":0.05528,"141":0.00553,"142":0.00553,"143":0.06634,"144":0.01658,"145":0.86237,"146":0.42566,"147":0.00553,"148":0.01106,_:"2 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 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 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 123 124 126 127 129 130 131 132 133 136 137 138 139 149 3.5 3.6"},D:{"47":0.00553,"48":0.02764,"49":0.00553,"69":0.05528,"75":0.00553,"77":0.00553,"79":0.00553,"81":0.00553,"85":0.00553,"86":0.00553,"87":0.00553,"88":0.00553,"91":0.00553,"93":0.0387,"96":0.00553,"97":0.01658,"98":0.00553,"103":0.22112,"104":0.21559,"105":0.18795,"106":0.19348,"107":0.19348,"108":0.20454,"109":0.53622,"110":0.19348,"111":0.26534,"112":13.33354,"114":0.01106,"116":0.4533,"117":0.19901,"118":0.00553,"119":0.06081,"120":0.24876,"121":0.01106,"122":0.07739,"123":0.01106,"124":0.23218,"125":1.11666,"126":3.51581,"127":0.01658,"128":0.04975,"129":0.01106,"130":0.01106,"131":0.43671,"132":0.09398,"133":0.40354,"134":0.02764,"135":0.05528,"136":0.04975,"137":0.04422,"138":0.26534,"139":0.15478,"140":0.08845,"141":0.43118,"142":5.55564,"143":9.96698,"144":0.01106,_:"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 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 70 71 72 73 74 76 78 80 83 84 89 90 92 94 95 99 100 101 102 113 115 145 146"},F:{"93":0.02211,"95":0.00553,"122":0.01658,"123":0.01658,"124":1.05585,"125":0.37038,_:"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 114 115 116 117 118 119 120 121 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"17":0.00553,"18":0.01106,"85":0.00553,"92":0.02764,"100":0.00553,"109":0.00553,"114":0.00553,"120":0.00553,"122":0.00553,"131":0.01106,"132":0.00553,"133":0.01106,"134":0.00553,"135":0.00553,"136":0.01658,"137":0.00553,"138":0.01106,"139":0.00553,"140":0.02211,"141":0.05528,"142":0.94529,"143":2.78611,_:"12 13 14 15 16 79 80 81 83 84 86 87 88 89 90 91 93 94 95 96 97 98 99 101 102 103 104 105 106 107 108 110 111 112 113 115 116 117 118 119 121 123 124 125 126 127 128 129 130"},E:{"4":0.00553,_:"0 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 6.1 7.1 9.1 10.1 11.1 12.1 15.1 15.2-15.3 15.5 16.0 16.1 17.2","5.1":0.00553,"13.1":0.01106,"14.1":0.03317,"15.4":0.00553,"15.6":0.0387,"16.2":0.01658,"16.3":0.00553,"16.4":0.00553,"16.5":0.00553,"16.6":0.06081,"17.0":0.00553,"17.1":0.02211,"17.3":0.00553,"17.4":0.02764,"17.5":0.01658,"17.6":0.08845,"18.0":0.02211,"18.1":0.01658,"18.2":0.00553,"18.3":0.05528,"18.4":0.01658,"18.5-18.6":0.07186,"26.0":0.06634,"26.1":0.3151,"26.2":0.10503,"26.3":0.01106},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00394,"5.0-5.1":0,"6.0-6.1":0.00788,"7.0-7.1":0.00591,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.01577,"10.0-10.2":0.00197,"10.3":0.02759,"11.0-11.2":0.33898,"11.3-11.4":0.00985,"12.0-12.1":0.00788,"12.2-12.5":0.08869,"13.0-13.1":0.00197,"13.2":0.0138,"13.3":0.00394,"13.4-13.7":0.0138,"14.0-14.4":0.02759,"14.5-14.8":0.02956,"15.0-15.1":0.03153,"15.2-15.3":0.02365,"15.4":0.02562,"15.5":0.02759,"15.6-15.8":0.42767,"16.0":0.04927,"16.1":0.0946,"16.2":0.04927,"16.3":0.08869,"16.4":0.02168,"16.5":0.03745,"16.6-16.7":0.55577,"17.0":0.03153,"17.1":0.05124,"17.2":0.03745,"17.3":0.05715,"17.4":0.09657,"17.5":0.1892,"17.6-17.7":0.43752,"18.0":0.09854,"18.1":0.20496,"18.2":0.10839,"18.3":0.35278,"18.4":0.18131,"18.5-18.7":13.01917,"26.0":0.25423,"26.1":2.11468,"26.2":0.40205,"26.3":0.01774},P:{"21":0.01045,"22":0.01045,"24":0.01045,"25":0.0209,"26":0.06269,"27":0.03134,"28":0.05224,"29":0.98207,_:"4 20 23 5.0-5.4 6.2-6.4 8.2 9.2 10.1 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0","7.2-7.4":0.0209,"11.1-11.2":0.01045},I:{"0":0.04018,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0.00001,"4.4":0,"4.4.3-4.4.4":0.00003},A:{"6":0.02022,"7":0.02022,"8":0.11123,"9":0.02022,"10":0.06067,"11":0.18202,_:"5.5"},K:{"0":0.12522,_:"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.00447},H:{"0":0},L:{"0":28.28458},R:{_:"0"},M:{"0":0.12074}};

View File

@@ -0,0 +1,34 @@
import { Ono as OnoConstructor } from "./constructor";
const singleton = ono;
export { singleton as ono };
ono.error = new OnoConstructor(Error);
ono.eval = new OnoConstructor(EvalError);
ono.range = new OnoConstructor(RangeError);
ono.reference = new OnoConstructor(ReferenceError);
ono.syntax = new OnoConstructor(SyntaxError);
ono.type = new OnoConstructor(TypeError);
ono.uri = new OnoConstructor(URIError);
const onoMap = ono;
/**
* Creates a new error with the specified message, properties, and/or inner error.
* If an inner error is provided, then the new error will match its type, if possible.
*/
function ono(...args) {
let originalError = args[0];
// Is the first argument an Error-like object?
if (typeof originalError === "object" && typeof originalError.name === "string") {
// Try to find an Ono singleton method that matches this error type
for (let typedOno of Object.values(onoMap)) {
if (typeof typedOno === "function" && typedOno.name === "ono") {
let species = typedOno[Symbol.species];
if (species && species !== Error && (originalError instanceof species || originalError.name === species.name)) {
// Create an error of the same type
return typedOno.apply(undefined, args);
}
}
}
}
// By default, create a base Error object
return ono.error.apply(undefined, args);
}
//# sourceMappingURL=singleton.js.map

View File

@@ -0,0 +1,972 @@
## 8.16.0 (2026-02-19)
### New features
The `sourceType` option can now be set to `"commonjs"` to have the parser treat the top level scope as a function scope.
Add support for Unicode 17.
### Bug fixes
Don't recognize `await using` as contextual keywords when followed directly by a backslash.
Fix an issue where the parser would allow `return` statements in `static` blocks when `allowReturnOutsideFunction` was enabled.
Properly reject `using` declarations that appear directly in `switch` or `for` head scopes.
Fix some corner case issues in the recognition of `using` syntax.
## 8.15.0 (2025-06-08)
### New features
Support `using` and `await using` syntax.
The `AnyNode` type is now defined in such a way that plugins can extend it.
### Bug fixes
Fix an issue where the `bigint` property of literal nodes for non-decimal bigints had the wrong format.
The `acorn` CLI tool no longer crashes when emitting a tree that contains a bigint.
## 8.14.1 (2025-03-05)
### Bug fixes
Fix an issue where `await` expressions in class field initializers were inappropriately allowed.
Properly allow await inside an async arrow function inside a class field initializer.
Mention the source file name in syntax error messages when given.
Properly add an empty `attributes` property to every form of `ExportNamedDeclaration`.
## 8.14.0 (2024-10-27)
### New features
Support ES2025 import attributes.
Support ES2025 RegExp modifiers.
### Bug fixes
Support some missing Unicode properties.
## 8.13.0 (2024-10-16)
### New features
Upgrade to Unicode 16.0.
## 8.12.1 (2024-07-03)
### Bug fixes
Fix a regression that caused Acorn to no longer run on Node versions <8.10.
## 8.12.0 (2024-06-14)
### New features
Support ES2025 duplicate capture group names in regular expressions.
### Bug fixes
Include `VariableDeclarator` in the `AnyNode` type so that walker objects can refer to it without getting a type error.
Properly raise a parse error for invalid `for`/`of` statements using `async` as binding name.
Properly recognize \"use strict\" when preceded by a string with an escaped newline.
Mark the `Parser` constructor as protected, not private, so plugins can extend it without type errors.
Fix a bug where some invalid `delete` expressions were let through when the operand was parenthesized and `preserveParens` was enabled.
Properly normalize line endings in raw strings of invalid template tokens.
Properly track line numbers for escaped newlines in strings.
Fix a bug that broke line number accounting after a template literal with invalid escape sequences.
## 8.11.3 (2023-12-29)
### Bug fixes
Add `Function` and `Class` to the `AggregateType` type, so that they can be used in walkers without raising a type error.
Make sure `onToken` get an `import` keyword token when parsing `import.meta`.
Fix a bug where `.loc.start` could be undefined for `new.target` `meta` nodes.
## 8.11.2 (2023-10-27)
### Bug fixes
Fix a bug that caused regular expressions after colon tokens to not be properly tokenized in some circumstances.
## 8.11.1 (2023-10-26)
### Bug fixes
Fix a regression where `onToken` would receive 'name' tokens for 'new' keyword tokens.
## 8.11.0 (2023-10-26)
### Bug fixes
Fix an issue where tokenizing (without parsing) an object literal with a property named `class` or `function` could, in some circumstance, put the tokenizer into an invalid state.
Fix an issue where a slash after a call to a propery named the same as some keywords would be tokenized as a regular expression.
### New features
Upgrade to Unicode 15.1.
Use a set of new, much more precise, TypeScript types.
## 8.10.0 (2023-07-05)
### New features
Add a `checkPrivateFields` option that disables strict checking of private property use.
## 8.9.0 (2023-06-16)
### Bug fixes
Forbid dynamic import after `new`, even when part of a member expression.
### New features
Add Unicode properties for ES2023.
Add support for the `v` flag to regular expressions.
## 8.8.2 (2023-01-23)
### Bug fixes
Fix a bug that caused `allowHashBang` to be set to false when not provided, even with `ecmaVersion >= 14`.
Fix an exception when passing no option object to `parse` or `new Parser`.
Fix incorrect parse error on `if (0) let\n[astral identifier char]`.
## 8.8.1 (2022-10-24)
### Bug fixes
Make type for `Comment` compatible with estree types.
## 8.8.0 (2022-07-21)
### Bug fixes
Allow parentheses around spread args in destructuring object assignment.
Fix an issue where the tree contained `directive` properties in when parsing with a language version that doesn't support them.
### New features
Support hashbang comments by default in ECMAScript 2023 and later.
## 8.7.1 (2021-04-26)
### Bug fixes
Stop handling `"use strict"` directives in ECMAScript versions before 5.
Fix an issue where duplicate quoted export names in `export *` syntax were incorrectly checked.
Add missing type for `tokTypes`.
## 8.7.0 (2021-12-27)
### New features
Support quoted export names.
Upgrade to Unicode 14.
Add support for Unicode 13 properties in regular expressions.
### Bug fixes
Use a loop to find line breaks, because the existing regexp search would overrun the end of the searched range and waste a lot of time in minified code.
## 8.6.0 (2021-11-18)
### Bug fixes
Fix a bug where an object literal with multiple `__proto__` properties would incorrectly be accepted if a later property value held an assigment.
### New features
Support class private fields with the `in` operator.
## 8.5.0 (2021-09-06)
### Bug fixes
Improve context-dependent tokenization in a number of corner cases.
Fix location tracking after a 0x2028 or 0x2029 character in a string literal (which before did not increase the line number).
Fix an issue where arrow function bodies in for loop context would inappropriately consume `in` operators.
Fix wrong end locations stored on SequenceExpression nodes.
Implement restriction that `for`/`of` loop LHS can't start with `let`.
### New features
Add support for ES2022 class static blocks.
Allow multiple input files to be passed to the CLI tool.
## 8.4.1 (2021-06-24)
### Bug fixes
Fix a bug where `allowAwaitOutsideFunction` would allow `await` in class field initializers, and setting `ecmaVersion` to 13 or higher would allow top-level await in non-module sources.
## 8.4.0 (2021-06-11)
### New features
A new option, `allowSuperOutsideMethod`, can be used to suppress the error when `super` is used in the wrong context.
## 8.3.0 (2021-05-31)
### New features
Default `allowAwaitOutsideFunction` to true for ECMAScript 2022 an higher.
Add support for the `d` ([indices](https://github.com/tc39/proposal-regexp-match-indices)) regexp flag.
## 8.2.4 (2021-05-04)
### Bug fixes
Fix spec conformity in corner case 'for await (async of ...)'.
## 8.2.3 (2021-05-04)
### Bug fixes
Fix an issue where the library couldn't parse 'for (async of ...)'.
Fix a bug in UTF-16 decoding that would read characters incorrectly in some circumstances.
## 8.2.2 (2021-04-29)
### Bug fixes
Fix a bug where a class field initialized to an async arrow function wouldn't allow await inside it. Same issue existed for generator arrow functions with yield.
## 8.2.1 (2021-04-24)
### Bug fixes
Fix a regression introduced in 8.2.0 where static or async class methods with keyword names fail to parse.
## 8.2.0 (2021-04-24)
### New features
Add support for ES2022 class fields and private methods.
## 8.1.1 (2021-04-12)
### Various
Stop shipping source maps in the NPM package.
## 8.1.0 (2021-03-09)
### Bug fixes
Fix a spurious error in nested destructuring arrays.
### New features
Expose `allowAwaitOutsideFunction` in CLI interface.
Make `allowImportExportAnywhere` also apply to `import.meta`.
## 8.0.5 (2021-01-25)
### Bug fixes
Adjust package.json to work with Node 12.16.0 and 13.0-13.6.
## 8.0.4 (2020-10-05)
### Bug fixes
Make `await x ** y` an error, following the spec.
Fix potentially exponential regular expression.
## 8.0.3 (2020-10-02)
### Bug fixes
Fix a wasteful loop during `Parser` creation when setting `ecmaVersion` to `"latest"`.
## 8.0.2 (2020-09-30)
### Bug fixes
Make the TypeScript types reflect the current allowed values for `ecmaVersion`.
Fix another regexp/division tokenizer issue.
## 8.0.1 (2020-08-12)
### Bug fixes
Provide the correct value in the `version` export.
## 8.0.0 (2020-08-12)
### Bug fixes
Disallow expressions like `(a = b) = c`.
Make non-octal escape sequences a syntax error in strict mode.
### New features
The package can now be loaded directly as an ECMAScript module in node 13+.
Update to the set of Unicode properties from ES2021.
### Breaking changes
The `ecmaVersion` option is now required. For the moment, omitting it will still work with a warning, but that will change in a future release.
Some changes to method signatures that may be used by plugins.
## 7.4.0 (2020-08-03)
### New features
Add support for logical assignment operators.
Add support for numeric separators.
## 7.3.1 (2020-06-11)
### Bug fixes
Make the string in the `version` export match the actual library version.
## 7.3.0 (2020-06-11)
### Bug fixes
Fix a bug that caused parsing of object patterns with a property named `set` that had a default value to fail.
### New features
Add support for optional chaining (`?.`).
## 7.2.0 (2020-05-09)
### Bug fixes
Fix precedence issue in parsing of async arrow functions.
### New features
Add support for nullish coalescing.
Add support for `import.meta`.
Support `export * as ...` syntax.
Upgrade to Unicode 13.
## 6.4.1 (2020-03-09)
### Bug fixes
More carefully check for valid UTF16 surrogate pairs in regexp validator.
## 7.1.1 (2020-03-01)
### Bug fixes
Treat `\8` and `\9` as invalid escapes in template strings.
Allow unicode escapes in property names that are keywords.
Don't error on an exponential operator expression as argument to `await`.
More carefully check for valid UTF16 surrogate pairs in regexp validator.
## 7.1.0 (2019-09-24)
### Bug fixes
Disallow trailing object literal commas when ecmaVersion is less than 5.
### New features
Add a static `acorn` property to the `Parser` class that contains the entire module interface, to allow plugins to access the instance of the library that they are acting on.
## 7.0.0 (2019-08-13)
### Breaking changes
Changes the node format for dynamic imports to use the `ImportExpression` node type, as defined in [ESTree](https://github.com/estree/estree/blob/master/es2020.md#importexpression).
Makes 10 (ES2019) the default value for the `ecmaVersion` option.
## 6.3.0 (2019-08-12)
### New features
`sourceType: "module"` can now be used even when `ecmaVersion` is less than 6, to parse module-style code that otherwise conforms to an older standard.
## 6.2.1 (2019-07-21)
### Bug fixes
Fix bug causing Acorn to treat some characters as identifier characters that shouldn't be treated as such.
Fix issue where setting the `allowReserved` option to `"never"` allowed reserved words in some circumstances.
## 6.2.0 (2019-07-04)
### Bug fixes
Improve valid assignment checking in `for`/`in` and `for`/`of` loops.
Disallow binding `let` in patterns.
### New features
Support bigint syntax with `ecmaVersion` >= 11.
Support dynamic `import` syntax with `ecmaVersion` >= 11.
Upgrade to Unicode version 12.
## 6.1.1 (2019-02-27)
### Bug fixes
Fix bug that caused parsing default exports of with names to fail.
## 6.1.0 (2019-02-08)
### Bug fixes
Fix scope checking when redefining a `var` as a lexical binding.
### New features
Split up `parseSubscripts` to use an internal `parseSubscript` method to make it easier to extend with plugins.
## 6.0.7 (2019-02-04)
### Bug fixes
Check that exported bindings are defined.
Don't treat `\u180e` as a whitespace character.
Check for duplicate parameter names in methods.
Don't allow shorthand properties when they are generators or async methods.
Forbid binding `await` in async arrow function's parameter list.
## 6.0.6 (2019-01-30)
### Bug fixes
The content of class declarations and expressions is now always parsed in strict mode.
Don't allow `let` or `const` to bind the variable name `let`.
Treat class declarations as lexical.
Don't allow a generator function declaration as the sole body of an `if` or `else`.
Ignore `"use strict"` when after an empty statement.
Allow string line continuations with special line terminator characters.
Treat `for` bodies as part of the `for` scope when checking for conflicting bindings.
Fix bug with parsing `yield` in a `for` loop initializer.
Implement special cases around scope checking for functions.
## 6.0.5 (2019-01-02)
### Bug fixes
Fix TypeScript type for `Parser.extend` and add `allowAwaitOutsideFunction` to options type.
Don't treat `let` as a keyword when the next token is `{` on the next line.
Fix bug that broke checking for parentheses around an object pattern in a destructuring assignment when `preserveParens` was on.
## 6.0.4 (2018-11-05)
### Bug fixes
Further improvements to tokenizing regular expressions in corner cases.
## 6.0.3 (2018-11-04)
### Bug fixes
Fix bug in tokenizing an expression-less return followed by a function followed by a regular expression.
Remove stray symlink in the package tarball.
## 6.0.2 (2018-09-26)
### Bug fixes
Fix bug where default expressions could fail to parse inside an object destructuring assignment expression.
## 6.0.1 (2018-09-14)
### Bug fixes
Fix wrong value in `version` export.
## 6.0.0 (2018-09-14)
### Bug fixes
Better handle variable-redefinition checks for catch bindings and functions directly under if statements.
Forbid `new.target` in top-level arrow functions.
Fix issue with parsing a regexp after `yield` in some contexts.
### New features
The package now comes with TypeScript definitions.
### Breaking changes
The default value of the `ecmaVersion` option is now 9 (2018).
Plugins work differently, and will have to be rewritten to work with this version.
The loose parser and walker have been moved into separate packages (`acorn-loose` and `acorn-walk`).
## 5.7.3 (2018-09-10)
### Bug fixes
Fix failure to tokenize regexps after expressions like `x.of`.
Better error message for unterminated template literals.
## 5.7.2 (2018-08-24)
### Bug fixes
Properly handle `allowAwaitOutsideFunction` in for statements.
Treat function declarations at the top level of modules like let bindings.
Don't allow async function declarations as the only statement under a label.
## 5.7.0 (2018-06-15)
### New features
Upgraded to Unicode 11.
## 5.6.0 (2018-05-31)
### New features
Allow U+2028 and U+2029 in string when ECMAVersion >= 10.
Allow binding-less catch statements when ECMAVersion >= 10.
Add `allowAwaitOutsideFunction` option for parsing top-level `await`.
## 5.5.3 (2018-03-08)
### Bug fixes
A _second_ republish of the code in 5.5.1, this time with yarn, to hopefully get valid timestamps.
## 5.5.2 (2018-03-08)
### Bug fixes
A republish of the code in 5.5.1 in an attempt to solve an issue with the file timestamps in the npm package being 0.
## 5.5.1 (2018-03-06)
### Bug fixes
Fix misleading error message for octal escapes in template strings.
## 5.5.0 (2018-02-27)
### New features
The identifier character categorization is now based on Unicode version 10.
Acorn will now validate the content of regular expressions, including new ES9 features.
## 5.4.0 (2018-02-01)
### Bug fixes
Disallow duplicate or escaped flags on regular expressions.
Disallow octal escapes in strings in strict mode.
### New features
Add support for async iteration.
Add support for object spread and rest.
## 5.3.0 (2017-12-28)
### Bug fixes
Fix parsing of floating point literals with leading zeroes in loose mode.
Allow duplicate property names in object patterns.
Don't allow static class methods named `prototype`.
Disallow async functions directly under `if` or `else`.
Parse right-hand-side of `for`/`of` as an assignment expression.
Stricter parsing of `for`/`in`.
Don't allow unicode escapes in contextual keywords.
### New features
Parsing class members was factored into smaller methods to allow plugins to hook into it.
## 5.2.1 (2017-10-30)
### Bug fixes
Fix a token context corruption bug.
## 5.2.0 (2017-10-30)
### Bug fixes
Fix token context tracking for `class` and `function` in property-name position.
Make sure `%*` isn't parsed as a valid operator.
Allow shorthand properties `get` and `set` to be followed by default values.
Disallow `super` when not in callee or object position.
### New features
Support [`directive` property](https://github.com/estree/estree/compare/b3de58c9997504d6fba04b72f76e6dd1619ee4eb...1da8e603237144f44710360f8feb7a9977e905e0) on directive expression statements.
## 5.1.2 (2017-09-04)
### Bug fixes
Disable parsing of legacy HTML-style comments in modules.
Fix parsing of async methods whose names are keywords.
## 5.1.1 (2017-07-06)
### Bug fixes
Fix problem with disambiguating regexp and division after a class.
## 5.1.0 (2017-07-05)
### Bug fixes
Fix tokenizing of regexps in an object-desctructuring `for`/`of` loop and after `yield`.
Parse zero-prefixed numbers with non-octal digits as decimal.
Allow object/array patterns in rest parameters.
Don't error when `yield` is used as a property name.
Allow `async` as a shorthand object property.
### New features
Implement the [template literal revision proposal](https://github.com/tc39/proposal-template-literal-revision) for ES9.
## 5.0.3 (2017-04-01)
### Bug fixes
Fix spurious duplicate variable definition errors for named functions.
## 5.0.2 (2017-03-30)
### Bug fixes
A binary operator after a parenthesized arrow expression is no longer incorrectly treated as an error.
## 5.0.0 (2017-03-28)
### Bug fixes
Raise an error for duplicated lexical bindings.
Fix spurious error when an assignement expression occurred after a spread expression.
Accept regular expressions after `of` (in `for`/`of`), `yield` (in a generator), and braced arrow functions.
Allow labels in front or `var` declarations, even in strict mode.
### Breaking changes
Parse declarations following `export default` as declaration nodes, not expressions. This means that class and function declarations nodes can now have `null` as their `id`.
## 4.0.11 (2017-02-07)
### Bug fixes
Allow all forms of member expressions to be parenthesized as lvalue.
## 4.0.10 (2017-02-07)
### Bug fixes
Don't expect semicolons after default-exported functions or classes, even when they are expressions.
Check for use of `'use strict'` directives in non-simple parameter functions, even when already in strict mode.
## 4.0.9 (2017-02-06)
### Bug fixes
Fix incorrect error raised for parenthesized simple assignment targets, so that `(x) = 1` parses again.
## 4.0.8 (2017-02-03)
### Bug fixes
Solve spurious parenthesized pattern errors by temporarily erring on the side of accepting programs that our delayed errors don't handle correctly yet.
## 4.0.7 (2017-02-02)
### Bug fixes
Accept invalidly rejected code like `(x).y = 2` again.
Don't raise an error when a function _inside_ strict code has a non-simple parameter list.
## 4.0.6 (2017-02-02)
### Bug fixes
Fix exponential behavior (manifesting itself as a complete hang for even relatively small source files) introduced by the new 'use strict' check.
## 4.0.5 (2017-02-02)
### Bug fixes
Disallow parenthesized pattern expressions.
Allow keywords as export names.
Don't allow the `async` keyword to be parenthesized.
Properly raise an error when a keyword contains a character escape.
Allow `"use strict"` to appear after other string literal expressions.
Disallow labeled declarations.
## 4.0.4 (2016-12-19)
### Bug fixes
Fix crash when `export` was followed by a keyword that can't be
exported.
## 4.0.3 (2016-08-16)
### Bug fixes
Allow regular function declarations inside single-statement `if` branches in loose mode. Forbid them entirely in strict mode.
Properly parse properties named `async` in ES2017 mode.
Fix bug where reserved words were broken in ES2017 mode.
## 4.0.2 (2016-08-11)
### Bug fixes
Don't ignore period or 'e' characters after octal numbers.
Fix broken parsing for call expressions in default parameter values of arrow functions.
## 4.0.1 (2016-08-08)
### Bug fixes
Fix false positives in duplicated export name errors.
## 4.0.0 (2016-08-07)
### Breaking changes
The default `ecmaVersion` option value is now 7.
A number of internal method signatures changed, so plugins might need to be updated.
### Bug fixes
The parser now raises errors on duplicated export names.
`arguments` and `eval` can now be used in shorthand properties.
Duplicate parameter names in non-simple argument lists now always produce an error.
### New features
The `ecmaVersion` option now also accepts year-style version numbers
(2015, etc).
Support for `async`/`await` syntax when `ecmaVersion` is >= 8.
Support for trailing commas in call expressions when `ecmaVersion` is >= 8.
## 3.3.0 (2016-07-25)
### Bug fixes
Fix bug in tokenizing of regexp operator after a function declaration.
Fix parser crash when parsing an array pattern with a hole.
### New features
Implement check against complex argument lists in functions that enable strict mode in ES7.
## 3.2.0 (2016-06-07)
### Bug fixes
Improve handling of lack of unicode regexp support in host
environment.
Properly reject shorthand properties whose name is a keyword.
### New features
Visitors created with `visit.make` now have their base as _prototype_, rather than copying properties into a fresh object.
## 3.1.0 (2016-04-18)
### Bug fixes
Properly tokenize the division operator directly after a function expression.
Allow trailing comma in destructuring arrays.
## 3.0.4 (2016-02-25)
### Fixes
Allow update expressions as left-hand-side of the ES7 exponential operator.
## 3.0.2 (2016-02-10)
### Fixes
Fix bug that accidentally made `undefined` a reserved word when parsing ES7.
## 3.0.0 (2016-02-10)
### Breaking changes
The default value of the `ecmaVersion` option is now 6 (used to be 5).
Support for comprehension syntax (which was dropped from the draft spec) has been removed.
### Fixes
`let` and `yield` are now “contextual keywords”, meaning you can mostly use them as identifiers in ES5 non-strict code.
A parenthesized class or function expression after `export default` is now parsed correctly.
### New features
When `ecmaVersion` is set to 7, Acorn will parse the exponentiation operator (`**`).
The identifier character ranges are now based on Unicode 8.0.0.
Plugins can now override the `raiseRecoverable` method to override the way non-critical errors are handled.
## 2.7.0 (2016-01-04)
### Fixes
Stop allowing rest parameters in setters.
Disallow `y` rexexp flag in ES5.
Disallow `\00` and `\000` escapes in strict mode.
Raise an error when an import name is a reserved word.
## 2.6.2 (2015-11-10)
### Fixes
Don't crash when no options object is passed.
## 2.6.0 (2015-11-09)
### Fixes
Add `await` as a reserved word in module sources.
Disallow `yield` in a parameter default value for a generator.
Forbid using a comma after a rest pattern in an array destructuring.
### New features
Support parsing stdin in command-line tool.
## 2.5.0 (2015-10-27)
### Fixes
Fix tokenizer support in the command-line tool.
Stop allowing `new.target` outside of functions.
Remove legacy `guard` and `guardedHandler` properties from try nodes.
Stop allowing multiple `__proto__` properties on an object literal in strict mode.
Don't allow rest parameters to be non-identifier patterns.
Check for duplicate paramter names in arrow functions.

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 FolderSearch2 = createLucideIcon("FolderSearch2", [
["circle", { cx: "11.5", cy: "12.5", r: "2.5", key: "1ea5ju" }],
[
"path",
{
d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",
key: "1kt360"
}
],
["path", { d: "M13.3 14.3 15 16", key: "1y4v1n" }]
]);
export { FolderSearch2 as default };
//# sourceMappingURL=folder-search-2.js.map

View File

@@ -0,0 +1,64 @@
/* eslint-disable no-unused-vars */
/**
* The localize function argument callback which allows to convert raw value to
* the actual type.
*
* @param value - The value to convert
*
* @returns The converted value
*/
/**
* The map of localized values for each width.
*/
/**
* The index type of the locale unit value. It types conversion of units of
* values that don't start at 0 (i.e. quarters).
*/
/**
* Converts the unit value to the tuple of values.
*/
/**
* The tuple of localized era values. The first element represents BC,
* the second element represents AD.
*/
/**
* The tuple of localized quarter values. The first element represents Q1.
*/
/**
* The tuple of localized day values. The first element represents Sunday.
*/
/**
* The tuple of localized month values. The first element represents January.
*/
export function buildLocalizeFn(args) {
return (value, options) => {
const context = options?.context ? String(options.context) : "standalone";
let valuesArray;
if (context === "formatting" && args.formattingValues) {
const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
const width = options?.width ? String(options.width) : defaultWidth;
valuesArray =
args.formattingValues[width] || args.formattingValues[defaultWidth];
} else {
const defaultWidth = args.defaultWidth;
const width = options?.width ? String(options.width) : args.defaultWidth;
valuesArray = args.values[width] || args.values[defaultWidth];
}
const index = args.argumentCallback ? args.argumentCallback(value) : value;
// @ts-expect-error - For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!
return valuesArray[index];
};
}

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