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,14 @@
import React from 'react';
export type Theme = 'dark' | 'light';
export type ThemeContext = {
autoMode: boolean;
setTheme: (theme: Theme) => void;
theme: Theme;
};
export declare const defaultTheme = "light";
export declare const ThemeProvider: React.FC<{
children?: React.ReactNode;
theme?: Theme;
}>;
export declare const useTheme: () => ThemeContext;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = isType;
var _index = require("../definitions/index.js");
function isType(nodeType, targetType) {
if (nodeType === targetType) return true;
if (nodeType == null) return false;
if (_index.ALIAS_KEYS[targetType]) return false;
const aliases = _index.FLIPPED_ALIAS_KEYS[targetType];
if (aliases != null && aliases.includes(nodeType)) return true;
return false;
}
//# sourceMappingURL=isType.js.map

View File

@@ -0,0 +1,4 @@
import { SonicBoom } from '../../'
const sonic = new SonicBoom({ fd: process.stdout.fd })
sonic.write('hello sonic\n')

View File

@@ -0,0 +1 @@
{"version":3,"file":"formatAbsoluteURL.d.ts","sourceRoot":"","sources":["../../src/utilities/formatAbsoluteURL.ts"],"names":[],"mappings":"AAQA;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,gBAAiB,MAAM,QAGpB,CAAA"}

View File

@@ -0,0 +1,143 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = default_1;
const util = __importStar(require("../core/util.cjs"));
const error = () => {
const Sizable = {
string: { unit: "harf", verb: "olmalıdır" },
file: { unit: "bayt", verb: "olmalıdır" },
array: { unit: "unsur", verb: "olmalıdır" },
set: { unit: "unsur", verb: "olmalıdır" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const parsedType = (data) => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "NaN" : "numara";
}
case "object": {
if (Array.isArray(data)) {
return "saf";
}
if (data === null) {
return "gayb";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns = {
regex: "giren",
email: "epostagâh",
url: "URL",
emoji: "emoji",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "ISO hengâmı",
date: "ISO tarihi",
time: "ISO zamanı",
duration: "ISO müddeti",
ipv4: "IPv4 nişânı",
ipv6: "IPv6 nişânı",
cidrv4: "IPv4 menzili",
cidrv6: "IPv6 menzili",
base64: "base64-şifreli metin",
base64url: "base64url-şifreli metin",
json_string: "JSON metin",
e164: "E.164 sayısı",
jwt: "JWT",
template_literal: "giren",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `Fâsit giren: umulan ${issue.expected}, alınan ${parsedType(issue.input)}`;
// return `Fâsit giren: umulan ${issue.expected}, alınan ${util.getParsedType(issue.input)}`;
case "invalid_value":
if (issue.values.length === 1)
return `Fâsit giren: umulan ${util.stringifyPrimitive(issue.values[0])}`;
return `Fâsit tercih: mûteberler ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Fazla büyük: ${issue.origin ?? "value"}, ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elements"} sahip olmalıydı.`;
return `Fazla büyük: ${issue.origin ?? "value"}, ${adj}${issue.maximum.toString()} olmalıydı.`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `Fazla küçük: ${issue.origin}, ${adj}${issue.minimum.toString()} ${sizing.unit} sahip olmalıydı.`;
}
return `Fazla küçük: ${issue.origin}, ${adj}${issue.minimum.toString()} olmalıydı.`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with")
return `Fâsit metin: "${_issue.prefix}" ile başlamalı.`;
if (_issue.format === "ends_with")
return `Fâsit metin: "${_issue.suffix}" ile bitmeli.`;
if (_issue.format === "includes")
return `Fâsit metin: "${_issue.includes}" ihtivâ etmeli.`;
if (_issue.format === "regex")
return `Fâsit metin: ${_issue.pattern} nakşına uymalı.`;
return `Fâsit ${Nouns[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Fâsit sayı: ${issue.divisor} katı olmalıydı.`;
case "unrecognized_keys":
return `Tanınmayan anahtar ${issue.keys.length > 1 ? "s" : ""}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `${issue.origin} için tanınmayan anahtar var.`;
case "invalid_union":
return "Giren tanınamadı.";
case "invalid_element":
return `${issue.origin} için tanınmayan kıymet var.`;
default:
return `Kıymet tanınamadı.`;
}
};
};
function default_1() {
return {
localeError: error(),
};
}

View File

@@ -0,0 +1,2 @@
const e=require(`../../utils/throw-if-empty.cjs`),t=e=>()=>({path:`/policies`,params:e??{},method:`GET`}),n=(t,n)=>()=>(e.throwIfEmpty(String(t),`Key cannot be empty`),{path:`/policies/${t}`,params:n??{},method:`GET`}),r=()=>()=>({path:`/policies/me/globals`,method:`GET`});exports.readPolicies=t,exports.readPolicy=n,exports.readPolicyGlobals=r;
//# sourceMappingURL=policies.cjs.map

View File

@@ -0,0 +1,312 @@
# State &middot; [![monthly downloads](https://img.shields.io/npm/dm/state-local)](https://www.npmjs.com/package/state-local) [![gitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/suren-atoyan/state-local/blob/master/LICENSE) [![Rate on Openbase](https://badges.openbase.io/js/rating/state-local.svg)](https://openbase.io/js/state-local?utm_source=embedded&utm_medium=badge&utm_campaign=rate-badge) [![build size](https://img.shields.io/bundlephobia/minzip/state-local)](https://bundlephobia.com/result?p=state-local) [![npm version](https://img.shields.io/npm/v/state-local.svg?style=flat)](https://www.npmjs.com/package/state-local) [![PRs welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/suren-atoyan/state-local/pulls)
:zap: Tiny, simple, and robust technique for defining and acting with local states (for all js environments - node, browser, etc.)
## Synopsis
A local state for modules, functions, and other ECs
## Motivation
We all love functional programming and the concepts of it. It gives us many clean patterns, which we use in our code regardless of exactly which paradigm is in the base of our codebase. But sometimes, for some reason, we can't keep our code "clean" and have to interact with items that are outside of the current lexical environment
For example:
:x:
```javascript
let x = 0;
let y = 1;
// ...
function someFn() {
// ...
x++;
}
// ...
function anotherFn() {
// ...
y = 6;
console.log(x);
}
// ...
function yetAnotherFn() {
// ...
y = x + 4;
x = null; // 🚶
}
```
The example above lacks control over the mutations and consumption, which can lead to unpredictable and unwanted results. It is just an example of real-life usage and there are many similar cases that belong to the same class of the problem
**The purpose of this library is to give an opportunity to work with local states in a clear, predictable, trackable, and strict way**
:white_check_mark:
```javascript
import state from 'state-local';
const [getState, setState] = state.create({ x: 0, y: 1 });
// ...
function someFn() {
// ...
setState(state => ({ x: state.x + 1 }));
}
// ...
function anotherFn() {
// ...
setState({ y: 6 });
const state = getState();
console.log(state);
}
// ...
function yetAnotherFn() {
// ...
setState(state => ({ y: state.x + 4, x: null }));
}
```
[codesandbox](https://codesandbox.io/s/motivation-1-xv5el?file=/src/index.js)
We also can track the changes in items:
```javascript
import state from 'state-local';
const [getState, setState] = state.create({ x: 0, y: 1 }, {
x: latestX => console.log('(⌐▀ ̯ʖ▀) Houston we have a problem; "x" has been changed. "x" now is:', latestX),
y: latestY => console.log('(⌐▀ ̯ʖ▀) Houston we have a problem; "y" has been changed. "y" now is:', latestY),
});
// ...
```
[codesandbox](https://codesandbox.io/s/motivation-2-ivf7d)
We can use the subset of the state in some execution contexts:
```javascript
import state from 'state-local';
const [getState, setState] = state.create({ x: 5, y: 7 });
// ...
function someFn() {
const state = getState(({ x }) => ({ x }));
console.log(state.x); // 5
console.log(state.y); // ❌ undefined - there is no y
}
```
[codesandbox](https://codesandbox.io/s/motivation-3-femne)
And much more...
## Documentation
#### Contents
* [Installation](#installation)
* Usage
* [create](#create)
* [initial state](#initial-state)
* [handler](#handler)
* [getState](#getstate)
* [selector](#selector)
* [setState](#setstate)
#### Installation
You can install this library as an npm package or download it from the CDN and use it in node or browser:
```bash
npm install state-local
```
or
```bash
yarn add state-local
```
or
```html
<script src="https://unpkg.com/state-local/dist/state-local.js"></script>
<script>
// now it is available in `window` (window.state)
const [getState, setState] = state.create({ x: 11, y: 13 });
// ...
</script>
```
#### create
The default export has a method called `create`, which is supposed to be a function to create a state:
```javascript
import state from 'state-local';
// state.create
// ...
```
[codesandbox](https://codesandbox.io/s/docs-create-t1cxe)
`create` is a function with two parameters:
1) [`initial state`](#initial-state) (**required**)
2) [`handler`](#handler) (**optional**)
#### initial state
`initial state` is a base structure and a value for the state. It should be a non-empty object
```javascript
import state from 'state-local';
/*
const [getState, setState] = state.create(); // ❌ error - initial state is required
const [getState, setState] = state.create(5); // ❌ error - initial state should be an object
const [getState, setState] = state.create({}); // ❌ error - initial state shouldn\'t be an empty object
*/
const [getState, setState] = state.create({ isLoading: false, payload: null }); // ✅
// ...
```
[codesandbox](https://codesandbox.io/s/docs-initial-state-22i3s)
#### handler
`handler` is a second parameter for `create` function and it is optional. It is going to be a handler for state updates. Hence it can be either a function or an object.
- If the handler is a function than it should be called immediately after every state update (with the latest state)
- If the handler is an object than the keys of that object should be a subset of the state and the values should be called immediately after every update of the corresponding field in the state (with the latest value of the field)
see example below:
if `handler` is a function
```javascript
import state from 'state-local';
const [getState, setState] = state.create({ x: 2, y: 3, z: 5 }, handleStateUpdate /* will be called immediately after every state update */);
function handleStateUpdate(latestState) {
console.log('hey state has been updated; the new state is:', latestState); // { x: 7, y: 11, z: 13 }
}
setState({ x: 7, y: 11, z: 13 });
// ...
```
[codesandbox](https://codesandbox.io/s/handler-function-uevxj)
if `handler` is an object
```javascript
import state from 'state-local';
const [getState, setState] = state.create({ x: 2, y: 3, z: 5 }, {
x: handleXUpdate, // will be called immediately after every "x" update
y: handleYUpdate, // will be called immediately after every "y" update
// and we don't want to listen "z" updates 😔
});
function handleXUpdate(latestX) {
console.log('(⌐▀ ̯ʖ▀) Houston we have a problem; "x" has been changed. "x" now is:', latestX); // ... "x" now is 7
}
function handleYUpdate(latestY) {
console.log('(⌐▀ ̯ʖ▀) Houston we have a problem; "y" has been changed. "y" now is:', latestY); // ... "y" now is 11
}
setState({ x: 7, y: 11, z: 13 });
// ...
```
[codesandbox](https://codesandbox.io/s/handler-object-8k0pt)
#### getState
`getState` is the first element of the pair returned by `create` function. It will return the current state or the subset of the current state depending on how it was called. It has an optional parameter `selector`
```javascript
import state from "state-local";
const [getState, setState] = state.create({ p1: 509, p2: 521 });
const state = getState();
console.log(state.p1); // 509
console.log(state.p2); // 521
// or
const { p1, p2 } = getState();
console.log(p1); // 509
console.log(p2); // 521
```
[codesandbox](https://codesandbox.io/s/getstate-zn3hj)
#### selector
`selector` is a function that is supposed to be passed (optional) as an argument to `getState`. It receives the current state and returns a subset of the state
```javascript
import state from 'state-local';
const [getState, setState] = state.create({ p1: 389, p2: 397, p3: 401 });
function someFn() {
const state = getState(({ p1, p2 }) => ({ p1, p2 }));
console.log(state.p1); // 389
console.log(state.p2); // 397
console.log(state.p3); // ❌ undefined - there is no p3
}
```
[codesandbox](https://codesandbox.io/s/selector-vjmdu)
#### setState
`setState` is the second element of the pair returned by `create` function. It is going to receive an object as a change for the state. The change object will be shallow merged with the current state and the result will be the next state
**NOTE: the change object can't contain a field that is not specified in the "initial" state**
```javascript
import state from 'state-local';
const [getState, setState] = state.create({ x:0, y: 0 });
setState({ z: 'some value' }); // ❌ error - it seams you want to change a field in the state which is not specified in the "initial" state
setState({ x: 11 }); // ✅ ok
setState({ y: 1 }); // ✅ ok
setState({ x: -11, y: 11 }); // ✅ ok
```
[codesandbox](https://codesandbox.io/s/setstate-1-u4fq0)
`setState` also can receive a function which will be called with the current state and it is supposed to return the change object
```javascript
import state from 'state-local';
const [getState, setState] = state.create({ x:0, y: 0 });
setState(state => ({ x: state.x + 2 })); // ✅ ok
setState(state => ({ x: state.x - 11, y: state.y + 11 })); // ✅ ok
setState(state => ({ z: 'some value' })); // ❌ error - it seams you want to change a field in the state which is not specified in the "initial" state
```
[codesandbox](https://codesandbox.io/s/smoosh-wildflower-nv9dg)
## License
[MIT](./LICENSE)

View File

@@ -0,0 +1 @@
{"version":3,"file":"layout-dashboard.js","sources":["../../../src/icons/layout-dashboard.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name LayoutDashboard\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSI5IiB4PSIzIiB5PSIzIiByeD0iMSIgLz4KICA8cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSI1IiB4PSIxNCIgeT0iMyIgcng9IjEiIC8+CiAgPHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iOSIgeD0iMTQiIHk9IjEyIiByeD0iMSIgLz4KICA8cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSI1IiB4PSIzIiB5PSIxNiIgcng9IjEiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/layout-dashboard\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 LayoutDashboard = createLucideIcon('LayoutDashboard', [\n ['rect', { width: '7', height: '9', x: '3', y: '3', rx: '1', key: '10lvy0' }],\n ['rect', { width: '7', height: '5', x: '14', y: '3', rx: '1', key: '16une8' }],\n ['rect', { width: '7', height: '9', x: '14', y: '12', rx: '1', key: '1hutg5' }],\n ['rect', { width: '7', height: '5', x: '3', y: '16', rx: '1', key: 'ldoo1y' }],\n]);\n\nexport default LayoutDashboard;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAkB,iBAAiB,iBAAmB,CAAA,CAAA,CAAA;AAAA,CAAA,CAC1D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,KAAK,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC5E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,KAAK,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC7E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,KAAK,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,GAAG,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,KAAK,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC/E,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,95 @@
'use client';
import { jsx as _jsx } from "react/jsx-runtime";
import { formatAdminURL } from 'payload/shared';
import React, { useEffect } from 'react';
// eslint-disable-next-line payload/no-imports-from-exports-dir
import { MoveDocToFolderButton, useConfig, useTranslation } from '../../../exports/client/index.js';
export const FolderTableCellClient = ({
collectionSlug,
data,
docTitle,
folderCollectionSlug,
folderFieldName,
viewType
}) => {
const docID = data.id;
const intialFolderID = data?.[folderFieldName];
const {
config
} = useConfig();
const {
t
} = useTranslation();
const [fromFolderName, setFromFolderName] = React.useState(() => intialFolderID ? `${t('general:loading')}...` : t('folder:noFolder'));
const [fromFolderID, setFromFolderID] = React.useState(intialFolderID);
const hasLoadedFolderName = React.useRef(false);
const onConfirm = React.useCallback(async ({
id,
name
}) => {
try {
await fetch(formatAdminURL({
apiRoute: config.routes.api,
path: `/${collectionSlug}/${docID}`
}), {
body: JSON.stringify({
[folderFieldName]: id
}),
credentials: 'include',
headers: {
'Content-Type': 'application/json'
},
method: 'PATCH'
});
setFromFolderID(id);
setFromFolderName(name || t('folder:noFolder'));
} catch (error) {
// eslint-disable-next-line no-console
console.error('Error moving document to folder', error);
}
}, [config.routes.api, collectionSlug, docID, folderFieldName, t]);
useEffect(() => {
const loadFolderName = async () => {
try {
const req = await fetch(formatAdminURL({
apiRoute: config.routes.api,
path: `/${folderCollectionSlug}${intialFolderID ? `/${intialFolderID}` : ''}`
}), {
credentials: 'include',
headers: {
'Content-Type': 'application/json'
},
method: 'GET'
});
const res = await req.json();
setFromFolderName(res?.name || t('folder:noFolder'));
} catch (error_0) {
// eslint-disable-next-line no-console
console.error('Error moving document to folder', error_0);
}
};
if (!hasLoadedFolderName.current) {
void loadFolderName();
hasLoadedFolderName.current = true;
}
}, [config.routes.api, folderCollectionSlug, intialFolderID, t]);
return /*#__PURE__*/_jsx(MoveDocToFolderButton, {
buttonProps: {
disabled: viewType === 'trash',
size: 'small'
},
collectionSlug: collectionSlug,
docData: data,
docID: docID,
docTitle: docTitle,
folderCollectionSlug: folderCollectionSlug,
folderFieldName: folderFieldName,
fromFolderID: fromFolderID,
fromFolderName: fromFolderName,
modalSlug: `move-doc-to-folder-cell--${docID}`,
onConfirm: onConfirm,
skipConfirmModal: false
});
};
//# sourceMappingURL=index.client.js.map

View File

@@ -0,0 +1,170 @@
import { GOOGLE_GENAI_INSTRUMENTED_METHODS } from './constants';
export interface GoogleGenAIOptions {
/**
* Enable or disable input recording.
*/
recordInputs?: boolean;
/**
* Enable or disable output recording.
*/
recordOutputs?: boolean;
}
/**
* Google GenAI Content Part
* @see https://ai.google.dev/api/rest/v1/Content#Part
* @see https://github.com/googleapis/js-genai/blob/v1.19.0/src/types.ts#L1061
*
*/
export type ContentPart = {
/** Metadata for a given video. */
videoMetadata?: unknown;
/** Indicates if the part is thought from the model. */
thought?: boolean;
/** Optional. Inlined bytes data. */
inlineData?: Blob;
/** Optional. URI based data. */
fileData?: unknown;
/** An opaque signature for the thought so it can be reused in subsequent requests.
* @remarks Encoded as base64 string. */
thoughtSignature?: string;
/** A predicted [FunctionCall] returned from the model that contains a string
representing the [FunctionDeclaration.name] and a structured JSON object
containing the parameters and their values. */
functionCall?: {
/** The unique id of the function call. If populated, the client to execute the
`function_call` and return the response with the matching `id`. */
id?: string;
/** Optional. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details. */
args?: Record<string, unknown>;
/** Required. The name of the function to call. Matches [FunctionDeclaration.name]. */
name?: string;
};
/** Optional. Result of executing the [ExecutableCode]. */
codeExecutionResult?: unknown;
/** Optional. Code generated by the model that is meant to be executed. */
executableCode?: unknown;
/** Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model. */
functionResponse?: unknown;
/** Optional. Text part (can be code). */
text?: string;
};
/**
* Google GenAI Content
* @see https://ai.google.dev/api/rest/v1/Content
*/
type Content = {
/** List of parts that constitute a single message.
* Each part may have a different IANA MIME type. */
parts?: ContentPart[];
/** Optional. The producer of the content. Must be either 'user' or
* 'model'. Useful to set for multi-turn conversations, otherwise can be
* empty. If role is not specified, SDK will determine the role.
*/
role?: string;
};
type MediaModality = 'MODALITY_UNSPECIFIED' | 'TEXT' | 'IMAGE' | 'VIDEO' | 'AUDIO' | 'DOCUMENT';
/**
* Google GenAI Modality Token Count
* @see https://ai.google.dev/api/rest/v1/ModalityTokenCount
*/
type ModalityTokenCount = {
/** The modality associated with this token count. */
modality?: MediaModality;
/** Number of tokens. */
tokenCount?: number;
};
/**
* Google GenAI Usage Metadata
* @see https://ai.google.dev/api/rest/v1/GenerateContentResponse#UsageMetadata
*/
type GenerateContentResponseUsageMetadata = {
[key: string]: unknown;
/** Output only. List of modalities of the cached content in the request input. */
cacheTokensDetails?: ModalityTokenCount[];
/** Output only. Number of tokens in the cached part in the input (the cached content). */
cachedContentTokenCount?: number;
/** Number of tokens in the response(s). */
candidatesTokenCount?: number;
/** Output only. List of modalities that were returned in the response. */
candidatesTokensDetails?: ModalityTokenCount[];
/** Number of tokens in the request. When `cached_content` is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content. */
promptTokenCount?: number;
/** Output only. List of modalities that were processed in the request input. */
promptTokensDetails?: ModalityTokenCount[];
/** Output only. Number of tokens present in thoughts output. */
thoughtsTokenCount?: number;
/** Output only. Number of tokens present in tool-use prompt(s). */
toolUsePromptTokenCount?: number;
/** Output only. List of modalities that were processed for tool-use request inputs. */
toolUsePromptTokensDetails?: ModalityTokenCount[];
/** Total token count for prompt, response candidates, and tool-use prompts (if present). */
totalTokenCount?: number;
};
/**
* Google GenAI Candidate
* @see https://ai.google.dev/api/rest/v1/Candidate
* https://github.com/googleapis/js-genai/blob/v1.19.0/src/types.ts#L2237
*/
export type Candidate = {
[key: string]: unknown;
/**
* Contains the multi-part content of the response.
*/
content?: Content;
/**
* The reason why the model stopped generating tokens.
* If empty, the model has not stopped generating the tokens.
*/
finishReason?: string;
/**
* Number of tokens for this candidate.
*/
tokenCount?: number;
/**
* The index of the candidate.
*/
index?: number;
};
/**
* Google GenAI Generate Content Response
* @see https://ai.google.dev/api/rest/v1/GenerateContentResponse
*/
type GenerateContentResponse = {
[key: string]: unknown;
/** Response variations returned by the model. */
candidates?: Candidate[];
/** Timestamp when the request is made to the server. */
automaticFunctionCallingHistory?: Content[];
/** Output only. The model version used to generate the response. */
modelVersion?: string;
/** Output only. Content filter results for a prompt sent in the request. Note: Sent only in the first stream chunk. Only happens when no candidates were generated due to content violations. */
promptFeedback?: Record<string, unknown>;
/** Output only. response_id is used to identify each response. It is the encoding of the event_id. */
responseId?: string;
/** Usage metadata about the response(s). */
usageMetadata?: GenerateContentResponseUsageMetadata;
};
/**
* Basic interface for Google GenAI client with only the instrumented methods
* This provides type safety while being generic enough to work with different client implementations
*/
export interface GoogleGenAIClient {
models: {
generateContent: (...args: unknown[]) => Promise<GenerateContentResponse>;
generateContentStream: (...args: unknown[]) => Promise<AsyncGenerator<GenerateContentResponse, any, unknown>>;
};
chats: {
create: (...args: unknown[]) => GoogleGenAIChat;
};
}
/**
* Google GenAI Chat interface for chat instances created via chats.create()
*/
export interface GoogleGenAIChat {
sendMessage: (...args: unknown[]) => Promise<GenerateContentResponse>;
sendMessageStream: (...args: unknown[]) => Promise<AsyncGenerator<GenerateContentResponse, any, unknown>>;
}
export type GoogleGenAIIstrumentedMethod = (typeof GOOGLE_GENAI_INSTRUMENTED_METHODS)[number];
export type GoogleGenAIResponse = GenerateContentResponse;
export {};
//# sourceMappingURL=types.d.ts.map

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 WalletMinimal = createLucideIcon("WalletMinimal", [
["path", { d: "M17 14h.01", key: "7oqj8z" }],
[
"path",
{
d: "M7 7h12a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14",
key: "u1rqew"
}
]
]);
export { WalletMinimal as default };
//# sourceMappingURL=wallet-minimal.js.map

View File

@@ -0,0 +1,64 @@
import { entityKind } from "../../entity.js";
import { getColumnNameAndConfig } from "../../utils.js";
import { PgColumn } from "./common.js";
import { PgIntColumnBaseBuilder } from "./int.common.js";
class PgBigInt53Builder extends PgIntColumnBaseBuilder {
static [entityKind] = "PgBigInt53Builder";
constructor(name) {
super(name, "number", "PgBigInt53");
}
/** @internal */
build(table) {
return new PgBigInt53(table, this.config);
}
}
class PgBigInt53 extends PgColumn {
static [entityKind] = "PgBigInt53";
getSQLType() {
return "bigint";
}
mapFromDriverValue(value) {
if (typeof value === "number") {
return value;
}
return Number(value);
}
}
class PgBigInt64Builder extends PgIntColumnBaseBuilder {
static [entityKind] = "PgBigInt64Builder";
constructor(name) {
super(name, "bigint", "PgBigInt64");
}
/** @internal */
build(table) {
return new PgBigInt64(
table,
this.config
);
}
}
class PgBigInt64 extends PgColumn {
static [entityKind] = "PgBigInt64";
getSQLType() {
return "bigint";
}
// eslint-disable-next-line unicorn/prefer-native-coercion-functions
mapFromDriverValue(value) {
return BigInt(value);
}
}
function bigint(a, b) {
const { name, config } = getColumnNameAndConfig(a, b);
if (config.mode === "number") {
return new PgBigInt53Builder(name);
}
return new PgBigInt64Builder(name);
}
export {
PgBigInt53,
PgBigInt53Builder,
PgBigInt64,
PgBigInt64Builder,
bigint
};
//# sourceMappingURL=bigint.js.map

View File

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

View File

@@ -0,0 +1,60 @@
{
"name": "clsx",
"version": "2.1.1",
"repository": "lukeed/clsx",
"description": "A tiny (239B) utility for constructing className strings conditionally.",
"module": "dist/clsx.mjs",
"unpkg": "dist/clsx.min.js",
"main": "dist/clsx.js",
"types": "clsx.d.ts",
"license": "MIT",
"exports": {
".": {
"import": {
"types": "./clsx.d.mts",
"default": "./dist/clsx.mjs"
},
"default": {
"types": "./clsx.d.ts",
"default": "./dist/clsx.js"
}
},
"./lite": {
"import": {
"types": "./clsx.d.mts",
"default": "./dist/lite.mjs"
},
"default": {
"types": "./clsx.d.ts",
"default": "./dist/lite.js"
}
}
},
"author": {
"name": "Luke Edwards",
"email": "luke.edwards05@gmail.com",
"url": "https://lukeed.com"
},
"engines": {
"node": ">=6"
},
"scripts": {
"build": "node bin",
"test": "uvu -r esm test"
},
"files": [
"*.d.mts",
"*.d.ts",
"dist"
],
"keywords": [
"classes",
"classname",
"classnames"
],
"devDependencies": {
"esm": "3.2.25",
"terser": "4.8.0",
"uvu": "0.5.4"
}
}

View File

@@ -0,0 +1,44 @@
{
"name": "@webassemblyjs/wasm-parser",
"version": "1.14.1",
"keywords": [
"webassembly",
"javascript",
"ast",
"parser",
"wasm"
],
"description": "WebAssembly binary format parser",
"main": "lib/index.js",
"module": "esm/index.js",
"scripts": {
"test": "mocha"
},
"author": "Sven Sauleau",
"license": "MIT",
"dependencies": {
"@webassemblyjs/ast": "1.14.1",
"@webassemblyjs/helper-api-error": "1.13.2",
"@webassemblyjs/helper-wasm-bytecode": "1.13.2",
"@webassemblyjs/ieee754": "1.13.2",
"@webassemblyjs/leb128": "1.13.2",
"@webassemblyjs/utf8": "1.13.2"
},
"repository": {
"type": "git",
"url": "https://github.com/xtuc/webassemblyjs.git"
},
"publishConfig": {
"access": "public"
},
"devDependencies": {
"@webassemblyjs/helper-buffer": "1.14.1",
"@webassemblyjs/helper-test-framework": "1.14.1",
"@webassemblyjs/helper-wasm-bytecode": "1.13.2",
"@webassemblyjs/wasm-gen": "1.14.1",
"@webassemblyjs/wast-parser": "1.14.1",
"mamacro": "^0.0.7",
"wabt": "1.0.12"
},
"gitHead": "25d52b1296e151ac56244a7c3886661e6b4a69ea"
}

View File

@@ -0,0 +1,6 @@
import { Client } from '../../client';
/**
* Add event processors to the given client to process Vercel AI spans.
*/
export declare function addVercelAiProcessors(client: Client): void;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,34 @@
import { LruMemoizerInstrumentation } from '@opentelemetry/instrumentation-lru-memoizer';
import { defineIntegration } from '@sentry/core';
import { generateInstrumentOnce } from '@sentry/node-core';
const INTEGRATION_NAME = 'LruMemoizer';
const instrumentLruMemoizer = generateInstrumentOnce(INTEGRATION_NAME, () => new LruMemoizerInstrumentation());
const _lruMemoizerIntegration = (() => {
return {
name: INTEGRATION_NAME,
setupOnce() {
instrumentLruMemoizer();
},
};
}) ;
/**
* Adds Sentry tracing instrumentation for the [lru-memoizer](https://www.npmjs.com/package/lru-memoizer) library.
*
* For more information, see the [`lruMemoizerIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/lrumemoizer/).
*
* @example
* ```javascript
* const Sentry = require('@sentry/node');
*
* Sentry.init({
* integrations: [Sentry.lruMemoizerIntegration()],
* });
*/
const lruMemoizerIntegration = defineIntegration(_lruMemoizerIntegration);
export { instrumentLruMemoizer, lruMemoizerIntegration };
//# sourceMappingURL=lrumemoizer.js.map

View File

@@ -0,0 +1,33 @@
/**
* Formats the given values into a string.
*
* @param values - The values to format.
* @param normalizeDepth - The depth to normalize the values.
* @param normalizeMaxBreadth - The max breadth to normalize the values.
* @returns The formatted string.
*/
export declare function formatConsoleArgs(values: unknown[], normalizeDepth: number, normalizeMaxBreadth: number): string;
/**
* Joins the given values into a string.
*
* @param values - The values to join.
* @param normalizeDepth - The depth to normalize the values.
* @param normalizeMaxBreadth - The max breadth to normalize the values.
* @returns The joined string.
*/
export declare function safeJoinConsoleArgs(values: unknown[], normalizeDepth: number, normalizeMaxBreadth: number): string;
/**
* Checks if a string contains console substitution patterns like %s, %d, %i, %f, %o, %O, %c.
*
* @param str - The string to check
* @returns true if the string contains console substitution patterns
*/
export declare function hasConsoleSubstitutions(str: string): boolean;
/**
* Creates template attributes for multiple console arguments.
*
* @param args - The console arguments
* @returns An object with template and parameter attributes
*/
export declare function createConsoleTemplateAttributes(firstArg: unknown, followingArgs: unknown[]): Record<string, unknown>;
//# sourceMappingURL=utils.d.ts.map

View File

@@ -0,0 +1,17 @@
//#region src/types/error.d.ts
interface DirectusApiError {
message: string;
extensions: {
code: string;
[key: string]: any;
};
}
interface DirectusError<R = Response> {
message: string;
errors: DirectusApiError[];
response: R;
data?: any;
}
//#endregion
export { DirectusApiError, DirectusError };
//# sourceMappingURL=error.d.cts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"applyLocaleFiltering.d.ts","sourceRoot":"","sources":["../../src/utilities/applyLocaleFiltering.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAEvD,wBAAsB,oBAAoB,CAAC,EACzC,YAAY,EACZ,MAAM,EACN,GAAG,GACJ,EAAE;IACD,YAAY,EAAE,YAAY,CAAA;IAC1B,MAAM,EAAE,eAAe,CAAA;IACvB,GAAG,EAAE,cAAc,CAAA;CACpB,GAAG,OAAO,CAAC,IAAI,CAAC,CAkBhB"}

View File

@@ -0,0 +1,43 @@
{
"name": "@lexical/table",
"description": "This package provides the Table feature for Lexical.",
"keywords": [
"lexical",
"editor",
"rich-text",
"table"
],
"license": "MIT",
"version": "0.35.0",
"main": "LexicalTable.js",
"types": "index.d.ts",
"dependencies": {
"@lexical/clipboard": "0.35.0",
"@lexical/utils": "0.35.0",
"lexical": "0.35.0"
},
"repository": {
"type": "git",
"url": "https://github.com/facebook/lexical",
"directory": "packages/lexical-table"
},
"module": "LexicalTable.mjs",
"sideEffects": false,
"exports": {
".": {
"import": {
"types": "./index.d.ts",
"development": "./LexicalTable.dev.mjs",
"production": "./LexicalTable.prod.mjs",
"node": "./LexicalTable.node.mjs",
"default": "./LexicalTable.mjs"
},
"require": {
"types": "./index.d.ts",
"development": "./LexicalTable.dev.js",
"production": "./LexicalTable.prod.js",
"default": "./LexicalTable.js"
}
}
}
}

View File

@@ -0,0 +1,68 @@
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var migrator_exports = {};
__export(migrator_exports, {
readMigrationFiles: () => readMigrationFiles
});
module.exports = __toCommonJS(migrator_exports);
var import_node_crypto = __toESM(require("node:crypto"), 1);
var import_node_fs = __toESM(require("node:fs"), 1);
function readMigrationFiles(config) {
const migrationFolderTo = config.migrationsFolder;
const migrationQueries = [];
const journalPath = `${migrationFolderTo}/meta/_journal.json`;
if (!import_node_fs.default.existsSync(journalPath)) {
throw new Error(`Can't find meta/_journal.json file`);
}
const journalAsString = import_node_fs.default.readFileSync(`${migrationFolderTo}/meta/_journal.json`).toString();
const journal = JSON.parse(journalAsString);
for (const journalEntry of journal.entries) {
const migrationPath = `${migrationFolderTo}/${journalEntry.tag}.sql`;
try {
const query = import_node_fs.default.readFileSync(`${migrationFolderTo}/${journalEntry.tag}.sql`).toString();
const result = query.split("--> statement-breakpoint").map((it) => {
return it;
});
migrationQueries.push({
sql: result,
bps: journalEntry.breakpoints,
folderMillis: journalEntry.when,
hash: import_node_crypto.default.createHash("sha256").update(query).digest("hex")
});
} catch {
throw new Error(`No file ${migrationPath} found in ${migrationFolderTo} folder`);
}
}
return migrationQueries;
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
readMigrationFiles
});
//# sourceMappingURL=migrator.cjs.map

View File

@@ -0,0 +1,27 @@
"use strict";
exports.fy = void 0;
var _index = require("./fy/_lib/formatDistance.js");
var _index2 = require("./fy/_lib/formatLong.js");
var _index3 = require("./fy/_lib/formatRelative.js");
var _index4 = require("./fy/_lib/localize.js");
var _index5 = require("./fy/_lib/match.js");
/**
* @category Locales
* @summary Western Frisian locale (Netherlands).
* @language West Frisian
* @iso-639-2 fry
* @author Damon Asberg [@damon02](https://github.com/damon02)
*/
const fy = (exports.fy = {
code: "fy",
formatDistance: _index.formatDistance,
formatLong: _index2.formatLong,
formatRelative: _index3.formatRelative,
localize: _index4.localize,
match: _index5.match,
options: {
weekStartsOn: 1 /* Monday */,
firstWeekContainsDate: 4,
},
});

View File

@@ -0,0 +1,38 @@
import type { SanitizedCollectionConfig } from '../../../collections/config/types.js';
import type { SanitizedGlobalConfig } from '../../../globals/config/types.js';
import type { RequestContext } from '../../../index.js';
import type { JsonObject, PayloadRequest } from '../../../types/index.js';
import type { Field, TabAsField } from '../../config/types.js';
type Args<T> = {
/**
* Data of the nearest parent block. If no parent block exists, this will be the `undefined`
*/
blockData?: JsonObject;
collection: null | SanitizedCollectionConfig;
context: RequestContext;
data: T;
/**
* The original data (not modified by any hooks)
*/
doc: T;
field: Field | TabAsField;
fieldIndex: number;
global: null | SanitizedGlobalConfig;
id?: number | string;
operation: 'create' | 'update';
overrideAccess: boolean;
parentIndexPath: string;
parentIsLocalized: boolean;
parentPath: string;
parentSchemaPath: string;
req: PayloadRequest;
siblingData: JsonObject;
/**
* The original siblingData (not modified by any hooks)
*/
siblingDoc: JsonObject;
siblingFields?: (Field | TabAsField)[];
};
export declare const promise: <T>({ id, blockData, collection, context, data, doc, field, fieldIndex, global, operation, overrideAccess, parentIndexPath, parentIsLocalized, parentPath, parentSchemaPath, req, siblingData, siblingDoc, siblingFields, }: Args<T>) => Promise<void>;
export {};
//# sourceMappingURL=promise.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"comments.cjs","names":["payload: Record<string, any>"],"sources":["../../../../src/rest/commands/update/comments.ts"],"sourcesContent":["import type { DirectusComment } from '../../../schema/comment.js';\nimport type { ApplyQueryFields, NestedPartial, Query } from '../../../types/index.js';\nimport type { RestCommand } from '../../types.js';\nimport { throwIfEmpty } from '../../utils/index.js';\n\nexport type UpdateCommentOutput<\n\tSchema,\n\tTQuery extends Query<Schema, Item>,\n\tItem extends object = DirectusComment<Schema>,\n> = ApplyQueryFields<Schema, Item, TQuery['fields']>;\n\n/**\n * Update multiple existing comments.\n * @param keysOrQuery The primary keys or a query\n * @param item\n * @param query\n * @returns Returns the comment objects for the updated comments.\n * @throws Will throw if keys is empty\n */\nexport const updateComments =\n\t<Schema, const TQuery extends Query<Schema, DirectusComment<Schema>>>(\n\t\tkeysOrQuery: DirectusComment<Schema>['id'][] | Query<Schema, DirectusComment<Schema>>,\n\t\titem: NestedPartial<DirectusComment<Schema>>,\n\t\tquery?: TQuery,\n\t): RestCommand<UpdateCommentOutput<Schema, TQuery>[], Schema> =>\n\t() => {\n\t\tlet payload: Record<string, any> = {};\n\n\t\tif (Array.isArray(keysOrQuery)) {\n\t\t\tthrowIfEmpty(keysOrQuery, 'keysOrQuery cannot be empty');\n\t\t\tpayload = { keys: keysOrQuery };\n\t\t} else {\n\t\t\tthrowIfEmpty(Object.keys(keysOrQuery), 'keysOrQuery cannot be empty');\n\t\t\tpayload = { query: keysOrQuery };\n\t\t}\n\n\t\tpayload['data'] = item;\n\n\t\treturn {\n\t\t\tpath: `/comments`,\n\t\t\tparams: query ?? {},\n\t\t\tbody: JSON.stringify(payload),\n\t\t\tmethod: 'PATCH',\n\t\t};\n\t};\n\n/**\n * Update multiple comments as batch.\n * @param items\n * @param query\n * @returns Returns the comment objects for the updated comments.\n */\nexport const updateCommentsBatch =\n\t<Schema, const TQuery extends Query<Schema, DirectusComment<Schema>>>(\n\t\titems: NestedPartial<DirectusComment<Schema>>[],\n\t\tquery?: TQuery,\n\t): RestCommand<UpdateCommentOutput<Schema, TQuery>[], Schema> =>\n\t() => ({\n\t\tpath: `/comments`,\n\t\tparams: query ?? {},\n\t\tbody: JSON.stringify(items),\n\t\tmethod: 'PATCH',\n\t});\n\n/**\n * Update an existing comment.\n * @param key\n * @param item\n * @param query\n * @returns Returns the comment object for the updated comment.\n * @throws Will throw if key is empty\n */\nexport const updateComment =\n\t<Schema, const TQuery extends Query<Schema, DirectusComment<Schema>>>(\n\t\tkey: DirectusComment<Schema>['id'],\n\t\titem: NestedPartial<DirectusComment<Schema>>,\n\t\tquery?: TQuery,\n\t): RestCommand<UpdateCommentOutput<Schema, TQuery>, Schema> =>\n\t() => {\n\t\tthrowIfEmpty(String(key), 'Key cannot be empty');\n\n\t\treturn {\n\t\t\tpath: `/comments/${key}`,\n\t\t\tparams: query ?? {},\n\t\t\tbody: JSON.stringify(item),\n\t\t\tmethod: 'PATCH',\n\t\t};\n\t};\n"],"mappings":"kDAmBa,GAEX,EACA,EACA,QAEK,CACL,IAAIA,EAA+B,EAAE,CAYrC,OAVI,MAAM,QAAQ,EAAY,EAC7B,EAAA,aAAa,EAAa,8BAA8B,CACxD,EAAU,CAAE,KAAM,EAAa,GAE/B,EAAA,aAAa,OAAO,KAAK,EAAY,CAAE,8BAA8B,CACrE,EAAU,CAAE,MAAO,EAAa,EAGjC,EAAQ,KAAU,EAEX,CACN,KAAM,YACN,OAAQ,GAAS,EAAE,CACnB,KAAM,KAAK,UAAU,EAAQ,CAC7B,OAAQ,QACR,EASU,GAEX,EACA,SAEM,CACN,KAAM,YACN,OAAQ,GAAS,EAAE,CACnB,KAAM,KAAK,UAAU,EAAM,CAC3B,OAAQ,QACR,EAUW,GAEX,EACA,EACA,SAGA,EAAA,aAAa,OAAO,EAAI,CAAE,sBAAsB,CAEzC,CACN,KAAM,aAAa,IACnB,OAAQ,GAAS,EAAE,CACnB,KAAM,KAAK,UAAU,EAAK,CAC1B,OAAQ,QACR"}

View File

@@ -0,0 +1,25 @@
export default interface AppConfig {
}
export type Locale = AppConfig extends {
Locale: infer AppLocale;
} ? AppLocale : string;
export type FormatNames = AppConfig extends {
Formats: infer AppFormats;
} ? {
dateTime: AppFormats extends {
dateTime: infer AppDateTimeFormats;
} ? keyof AppDateTimeFormats : string;
number: AppFormats extends {
number: infer AppNumberFormats;
} ? keyof AppNumberFormats : string;
list: AppFormats extends {
list: infer AppListFormats;
} ? keyof AppListFormats : string;
} : {
dateTime: string;
number: string;
list: string;
};
export type Messages = AppConfig extends {
Messages: infer AppMessages;
} ? AppMessages : Record<string, any>;

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/fields/Upload/RelationshipContent/index.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAM5C,OAAO,cAAc,CAAA;AAMrB,KAAK,KAAK,GAAG;IACX,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAA;IAC5B,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAA;IAC9B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;IAC/B,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAA;IACjC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC7B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,IAAI,CAAA;IAC7B,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAA;IAC7B,QAAQ,CAAC,kBAAkB,CAAC,EAAE,OAAO,CAAA;IACrC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,CAAC,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,CAAC,CAAC,EAAE,MAAM,CAAA;CACpB,CAAA;AACD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,KAAK,qBAmH/C"}

View File

@@ -0,0 +1,2 @@
const e=()=>()=>({method:`GET`,path:`/server/ping`});exports.serverPing=e;
//# sourceMappingURL=ping.cjs.map

View File

@@ -0,0 +1,108 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createHandler = exports.parseRequestParams = void 0;
const handler_1 = require("../handler");
/**
* The GraphQL over HTTP spec compliant request parser for an incoming GraphQL request.
*
* If the HTTP request _is not_ a [well-formatted GraphQL over HTTP request](https://graphql.github.io/graphql-over-http/draft/#sec-Request), the function will respond
* on the `FastifyReply` argument and return `null`.
*
* If the HTTP request _is_ a [well-formatted GraphQL over HTTP request](https://graphql.github.io/graphql-over-http/draft/#sec-Request), but is invalid or malformed,
* the function will throw an error and it is up to the user to handle and respond as they see fit.
*
* ```js
* import Fastify from 'fastify'; // yarn add fastify
* import { parseRequestParams } from 'graphql-http/lib/use/fastify';
*
* const fastify = Fastify();
* fastify.all('/graphql', async (req, reply) => {
* try {
* const maybeParams = await parseRequestParams(req, reply);
* if (!maybeParams) {
* // not a well-formatted GraphQL over HTTP request,
* // parser responded and there's nothing else to do
* return;
* }
*
* // well-formatted GraphQL over HTTP request,
* // with valid parameters
* reply.status(200).send(JSON.stringify(maybeParams, null, ' '));
* } catch (err) {
* // well-formatted GraphQL over HTTP request,
* // but with invalid parameters
* reply.status(400).send(err.message);
* }
* });
*
* fastify.listen({ port: 4000 });
* console.log('Listening to port 4000');
* ```
*
* @category Server/fastify
*/
async function parseRequestParams(req, reply) {
const rawReq = toRequest(req, reply);
const paramsOrRes = await (0, handler_1.parseRequestParams)(rawReq);
if (!('query' in paramsOrRes)) {
const [body, init] = paramsOrRes;
reply
.status(init.status)
.headers(init.headers || {})
// "or undefined" because `null` will be JSON stringified
.send(body || undefined);
return null;
}
return paramsOrRes;
}
exports.parseRequestParams = parseRequestParams;
/**
* Create a GraphQL over HTTP spec compliant request handler for
* the fastify framework.
*
* ```js
* import Fastify from 'fastify'; // yarn add fastify
* import { createHandler } from 'graphql-http/lib/use/fastify';
* import { schema } from './my-graphql-schema';
*
* const fastify = Fastify();
* fastify.all('/graphql', createHandler({ schema }));
*
* fastify.listen({ port: 4000 });
* console.log('Listening to port 4000');
* ```
*
* @category Server/fastify
*/
function createHandler(options) {
const handle = (0, handler_1.createHandler)(options);
return async function requestListener(req, reply) {
try {
const [body, init] = await handle(toRequest(req, reply));
reply
.status(init.status)
.headers(init.headers || {})
// "or undefined" because `null` will be JSON stringified
.send(body || undefined);
}
catch (err) {
// The handler shouldnt throw errors.
// If you wish to handle them differently, consider implementing your own request handler.
console.error('Internal error occurred during request handling. ' +
'Please check your implementation.', err);
reply.status(500).send();
}
};
}
exports.createHandler = createHandler;
function toRequest(req, reply) {
return {
url: req.url,
method: req.method,
headers: req.headers,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
body: req.body,
raw: req,
context: { reply },
};
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"file-up.js","sources":["../../../src/icons/file-up.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name FileUp\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTUgMkg2YTIgMiAwIDAgMC0yIDJ2MTZhMiAyIDAgMCAwIDIgMmgxMmEyIDIgMCAwIDAgMi0yVjdaIiAvPgogIDxwYXRoIGQ9Ik0xNCAydjRhMiAyIDAgMCAwIDIgMmg0IiAvPgogIDxwYXRoIGQ9Ik0xMiAxMnY2IiAvPgogIDxwYXRoIGQ9Im0xNSAxNS0zLTMtMyAzIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/file-up\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 FileUp = createLucideIcon('FileUp', [\n ['path', { d: 'M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z', key: '1rqfz7' }],\n ['path', { d: 'M14 2v4a2 2 0 0 0 2 2h4', key: 'tnqrlb' }],\n ['path', { d: 'M12 12v6', key: '3ahymv' }],\n ['path', { d: 'm15 15-3-3-3 3', key: '15xj92' }],\n]);\n\nexport default FileUp;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,iBAAiB,QAAU,CAAA,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA8D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC3F,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,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,CAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACjD,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,3 @@
'use strict';
module.exports = require('./async').mapLimit;

View File

@@ -0,0 +1,36 @@
export type HonoRequest = {
path: string;
method: string;
};
export type Context = {
req: HonoRequest;
res: Response;
error: Error | undefined;
};
export type Next = () => Promise<void>;
export type Handler = (c: Context, next: Next) => Promise<Response> | Response;
export type MiddlewareHandler = (c: Context, next: Next) => Promise<Response | void>;
export type HandlerInterface = {
(...handlers: (Handler | MiddlewareHandler)[]): HonoInstance;
(path: string, ...handlers: (Handler | MiddlewareHandler)[]): HonoInstance;
};
export type OnHandlerInterface = {
(method: string | string[], path: string | string[], ...handlers: (Handler | MiddlewareHandler)[]): HonoInstance;
};
export type MiddlewareHandlerInterface = {
(...handlers: MiddlewareHandler[]): HonoInstance;
(path: string, ...handlers: MiddlewareHandler[]): HonoInstance;
};
export interface HonoInstance {
get: HandlerInterface;
post: HandlerInterface;
put: HandlerInterface;
delete: HandlerInterface;
options: HandlerInterface;
patch: HandlerInterface;
all: HandlerInterface;
on: OnHandlerInterface;
use: MiddlewareHandlerInterface;
}
export type Hono = new (...args: unknown[]) => HonoInstance;
//# sourceMappingURL=types.d.ts.map

View File

@@ -0,0 +1,85 @@
import { addDays } from "./addDays.mjs";
import { differenceInCalendarDays } from "./differenceInCalendarDays.mjs";
import { isSameDay } from "./isSameDay.mjs";
import { isValid } from "./isValid.mjs";
import { isWeekend } from "./isWeekend.mjs";
import { toDate } from "./toDate.mjs";
/**
* @name differenceInBusinessDays
* @category Day Helpers
* @summary Get the number of business days between the given dates.
*
* @description
* Get the number of business day periods between the given dates.
* Business days being days that arent in the weekend.
* Like `differenceInCalendarDays`, the function removes the times from
* the dates before calculating the difference.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param dateLeft - The later date
* @param dateRight - The earlier date
*
* @returns The number of business days
*
* @example
* // How many business days are between
* // 10 January 2014 and 20 July 2014?
* const result = differenceInBusinessDays(
* new Date(2014, 6, 20),
* new Date(2014, 0, 10)
* )
* //=> 136
*
* // How many business days are between
* // 30 November 2021 and 1 November 2021?
* const result = differenceInBusinessDays(
* new Date(2021, 10, 30),
* new Date(2021, 10, 1)
* )
* //=> 21
*
* // How many business days are between
* // 1 November 2021 and 1 December 2021?
* const result = differenceInBusinessDays(
* new Date(2021, 10, 1),
* new Date(2021, 11, 1)
* )
* //=> -22
*
* // How many business days are between
* // 1 November 2021 and 1 November 2021 ?
* const result = differenceInBusinessDays(
* new Date(2021, 10, 1),
* new Date(2021, 10, 1)
* )
* //=> 0
*/
export function differenceInBusinessDays(dateLeft, dateRight) {
const _dateLeft = toDate(dateLeft);
let _dateRight = toDate(dateRight);
if (!isValid(_dateLeft) || !isValid(_dateRight)) return NaN;
const calendarDifference = differenceInCalendarDays(_dateLeft, _dateRight);
const sign = calendarDifference < 0 ? -1 : 1;
const weeks = Math.trunc(calendarDifference / 7);
let result = weeks * 5;
_dateRight = addDays(_dateRight, weeks * 7);
// the loop below will run at most 6 times to account for the remaining days that don't makeup a full week
while (!isSameDay(_dateLeft, _dateRight)) {
// sign is used to account for both negative and positive differences
result += isWeekend(_dateRight) ? 0 : sign;
_dateRight = addDays(_dateRight, sign);
}
// Prevent negative zero
return result === 0 ? 0 : result;
}
// Fallback for modularized imports:
export default differenceInBusinessDays;

View File

@@ -0,0 +1,440 @@
"use strict";
exports.format = exports.formatDate = format;
Object.defineProperty(exports, "formatters", {
enumerable: true,
get: function () {
return _index3.formatters;
},
});
Object.defineProperty(exports, "longFormatters", {
enumerable: true,
get: function () {
return _index4.longFormatters;
},
});
var _index = require("./_lib/defaultLocale.cjs");
var _index2 = require("./_lib/defaultOptions.cjs");
var _index3 = require("./_lib/format/formatters.cjs");
var _index4 = require("./_lib/format/longFormatters.cjs");
var _index5 = require("./_lib/protectedTokens.cjs");
var _index6 = require("./isValid.cjs");
var _index7 = require("./toDate.cjs");
// Rexports of internal for libraries to use.
// See: https://github.com/date-fns/date-fns/issues/3638#issuecomment-1877082874
// This RegExp consists of three parts separated by `|`:
// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token
// (one of the certain letters followed by `o`)
// - (\w)\1* matches any sequences of the same letter
// - '' matches two quote characters in a row
// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),
// except a single quote symbol, which ends the sequence.
// Two quote characters do not end the sequence.
// If there is no matching single quote
// then the sequence will continue until the end of the string.
// - . matches any single character unmatched by previous parts of the RegExps
const formattingTokensRegExp =
/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
// This RegExp catches symbols escaped by quotes, and also
// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`
const longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
const escapedStringRegExp = /^'([^]*?)'?$/;
const doubleQuoteRegExp = /''/g;
const unescapedLatinCharacterRegExp = /[a-zA-Z]/;
/**
* The {@link format} function options.
*/
/**
* @name format
* @alias formatDate
* @category Common Helpers
* @summary Format the date.
*
* @description
* Return the formatted date string in the given format. The result may vary by locale.
*
* > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.
* > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
*
* The characters wrapped between two single quotes characters (') are escaped.
* Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.
* (see the last example)
*
* Format of the string is based on Unicode Technical Standard #35:
* https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
* with a few additions (see note 7 below the table).
*
* Accepted patterns:
* | Unit | Pattern | Result examples | Notes |
* |---------------------------------|---------|-----------------------------------|-------|
* | Era | G..GGG | AD, BC | |
* | | GGGG | Anno Domini, Before Christ | 2 |
* | | GGGGG | A, B | |
* | Calendar year | y | 44, 1, 1900, 2017 | 5 |
* | | yo | 44th, 1st, 0th, 17th | 5,7 |
* | | yy | 44, 01, 00, 17 | 5 |
* | | yyy | 044, 001, 1900, 2017 | 5 |
* | | yyyy | 0044, 0001, 1900, 2017 | 5 |
* | | yyyyy | ... | 3,5 |
* | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 |
* | | Yo | 44th, 1st, 1900th, 2017th | 5,7 |
* | | YY | 44, 01, 00, 17 | 5,8 |
* | | YYY | 044, 001, 1900, 2017 | 5 |
* | | YYYY | 0044, 0001, 1900, 2017 | 5,8 |
* | | YYYYY | ... | 3,5 |
* | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 |
* | | RR | -43, 00, 01, 1900, 2017 | 5,7 |
* | | RRR | -043, 000, 001, 1900, 2017 | 5,7 |
* | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 |
* | | RRRRR | ... | 3,5,7 |
* | Extended year | u | -43, 0, 1, 1900, 2017 | 5 |
* | | uu | -43, 01, 1900, 2017 | 5 |
* | | uuu | -043, 001, 1900, 2017 | 5 |
* | | uuuu | -0043, 0001, 1900, 2017 | 5 |
* | | uuuuu | ... | 3,5 |
* | Quarter (formatting) | Q | 1, 2, 3, 4 | |
* | | Qo | 1st, 2nd, 3rd, 4th | 7 |
* | | QQ | 01, 02, 03, 04 | |
* | | QQQ | Q1, Q2, Q3, Q4 | |
* | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |
* | | QQQQQ | 1, 2, 3, 4 | 4 |
* | Quarter (stand-alone) | q | 1, 2, 3, 4 | |
* | | qo | 1st, 2nd, 3rd, 4th | 7 |
* | | qq | 01, 02, 03, 04 | |
* | | qqq | Q1, Q2, Q3, Q4 | |
* | | qqqq | 1st quarter, 2nd quarter, ... | 2 |
* | | qqqqq | 1, 2, 3, 4 | 4 |
* | Month (formatting) | M | 1, 2, ..., 12 | |
* | | Mo | 1st, 2nd, ..., 12th | 7 |
* | | MM | 01, 02, ..., 12 | |
* | | MMM | Jan, Feb, ..., Dec | |
* | | MMMM | January, February, ..., December | 2 |
* | | MMMMM | J, F, ..., D | |
* | Month (stand-alone) | L | 1, 2, ..., 12 | |
* | | Lo | 1st, 2nd, ..., 12th | 7 |
* | | LL | 01, 02, ..., 12 | |
* | | LLL | Jan, Feb, ..., Dec | |
* | | LLLL | January, February, ..., December | 2 |
* | | LLLLL | J, F, ..., D | |
* | Local week of year | w | 1, 2, ..., 53 | |
* | | wo | 1st, 2nd, ..., 53th | 7 |
* | | ww | 01, 02, ..., 53 | |
* | ISO week of year | I | 1, 2, ..., 53 | 7 |
* | | Io | 1st, 2nd, ..., 53th | 7 |
* | | II | 01, 02, ..., 53 | 7 |
* | Day of month | d | 1, 2, ..., 31 | |
* | | do | 1st, 2nd, ..., 31st | 7 |
* | | dd | 01, 02, ..., 31 | |
* | Day of year | D | 1, 2, ..., 365, 366 | 9 |
* | | Do | 1st, 2nd, ..., 365th, 366th | 7 |
* | | DD | 01, 02, ..., 365, 366 | 9 |
* | | DDD | 001, 002, ..., 365, 366 | |
* | | DDDD | ... | 3 |
* | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Sun | |
* | | EEEE | Monday, Tuesday, ..., Sunday | 2 |
* | | EEEEE | M, T, W, T, F, S, S | |
* | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |
* | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |
* | | io | 1st, 2nd, ..., 7th | 7 |
* | | ii | 01, 02, ..., 07 | 7 |
* | | iii | Mon, Tue, Wed, ..., Sun | 7 |
* | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |
* | | iiiii | M, T, W, T, F, S, S | 7 |
* | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 7 |
* | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |
* | | eo | 2nd, 3rd, ..., 1st | 7 |
* | | ee | 02, 03, ..., 01 | |
* | | eee | Mon, Tue, Wed, ..., Sun | |
* | | eeee | Monday, Tuesday, ..., Sunday | 2 |
* | | eeeee | M, T, W, T, F, S, S | |
* | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |
* | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |
* | | co | 2nd, 3rd, ..., 1st | 7 |
* | | cc | 02, 03, ..., 01 | |
* | | ccc | Mon, Tue, Wed, ..., Sun | |
* | | cccc | Monday, Tuesday, ..., Sunday | 2 |
* | | ccccc | M, T, W, T, F, S, S | |
* | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |
* | AM, PM | a..aa | AM, PM | |
* | | aaa | am, pm | |
* | | aaaa | a.m., p.m. | 2 |
* | | aaaaa | a, p | |
* | AM, PM, noon, midnight | b..bb | AM, PM, noon, midnight | |
* | | bbb | am, pm, noon, midnight | |
* | | bbbb | a.m., p.m., noon, midnight | 2 |
* | | bbbbb | a, p, n, mi | |
* | Flexible day period | B..BBB | at night, in the morning, ... | |
* | | BBBB | at night, in the morning, ... | 2 |
* | | BBBBB | at night, in the morning, ... | |
* | Hour [1-12] | h | 1, 2, ..., 11, 12 | |
* | | ho | 1st, 2nd, ..., 11th, 12th | 7 |
* | | hh | 01, 02, ..., 11, 12 | |
* | Hour [0-23] | H | 0, 1, 2, ..., 23 | |
* | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 |
* | | HH | 00, 01, 02, ..., 23 | |
* | Hour [0-11] | K | 1, 2, ..., 11, 0 | |
* | | Ko | 1st, 2nd, ..., 11th, 0th | 7 |
* | | KK | 01, 02, ..., 11, 00 | |
* | Hour [1-24] | k | 24, 1, 2, ..., 23 | |
* | | ko | 24th, 1st, 2nd, ..., 23rd | 7 |
* | | kk | 24, 01, 02, ..., 23 | |
* | Minute | m | 0, 1, ..., 59 | |
* | | mo | 0th, 1st, ..., 59th | 7 |
* | | mm | 00, 01, ..., 59 | |
* | Second | s | 0, 1, ..., 59 | |
* | | so | 0th, 1st, ..., 59th | 7 |
* | | ss | 00, 01, ..., 59 | |
* | Fraction of second | S | 0, 1, ..., 9 | |
* | | SS | 00, 01, ..., 99 | |
* | | SSS | 000, 001, ..., 999 | |
* | | SSSS | ... | 3 |
* | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |
* | | XX | -0800, +0530, Z | |
* | | XXX | -08:00, +05:30, Z | |
* | | XXXX | -0800, +0530, Z, +123456 | 2 |
* | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |
* | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | |
* | | xx | -0800, +0530, +0000 | |
* | | xxx | -08:00, +05:30, +00:00 | 2 |
* | | xxxx | -0800, +0530, +0000, +123456 | |
* | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |
* | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | |
* | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 |
* | Timezone (specific non-locat.) | z...zzz | GMT-8, GMT+5:30, GMT+0 | 6 |
* | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | 2,6 |
* | Seconds timestamp | t | 512969520 | 7 |
* | | tt | ... | 3,7 |
* | Milliseconds timestamp | T | 512969520900 | 7 |
* | | TT | ... | 3,7 |
* | Long localized date | P | 04/29/1453 | 7 |
* | | PP | Apr 29, 1453 | 7 |
* | | PPP | April 29th, 1453 | 7 |
* | | PPPP | Friday, April 29th, 1453 | 2,7 |
* | Long localized time | p | 12:00 AM | 7 |
* | | pp | 12:00:00 AM | 7 |
* | | ppp | 12:00:00 AM GMT+2 | 7 |
* | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |
* | Combination of date and time | Pp | 04/29/1453, 12:00 AM | 7 |
* | | PPpp | Apr 29, 1453, 12:00:00 AM | 7 |
* | | PPPppp | April 29th, 1453 at ... | 7 |
* | | PPPPpppp| Friday, April 29th, 1453 at ... | 2,7 |
* Notes:
* 1. "Formatting" units (e.g. formatting quarter) in the default en-US locale
* are the same as "stand-alone" units, but are different in some languages.
* "Formatting" units are declined according to the rules of the language
* in the context of a date. "Stand-alone" units are always nominative singular:
*
* `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`
*
* `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`
*
* 2. Any sequence of the identical letters is a pattern, unless it is escaped by
* the single quote characters (see below).
* If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)
* the output will be the same as default pattern for this unit, usually
* the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units
* are marked with "2" in the last column of the table.
*
* `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`
*
* `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`
*
* `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`
*
* `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`
*
* `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`
*
* 3. Some patterns could be unlimited length (such as `yyyyyyyy`).
* The output will be padded with zeros to match the length of the pattern.
*
* `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`
*
* 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.
* These tokens represent the shortest form of the quarter.
*
* 5. The main difference between `y` and `u` patterns are B.C. years:
*
* | Year | `y` | `u` |
* |------|-----|-----|
* | AC 1 | 1 | 1 |
* | BC 1 | 1 | 0 |
* | BC 2 | 2 | -1 |
*
* Also `yy` always returns the last two digits of a year,
* while `uu` pads single digit years to 2 characters and returns other years unchanged:
*
* | Year | `yy` | `uu` |
* |------|------|------|
* | 1 | 01 | 01 |
* | 14 | 14 | 14 |
* | 376 | 76 | 376 |
* | 1453 | 53 | 1453 |
*
* The same difference is true for local and ISO week-numbering years (`Y` and `R`),
* except local week-numbering years are dependent on `options.weekStartsOn`
* and `options.firstWeekContainsDate` (compare [getISOWeekYear](https://date-fns.org/docs/getISOWeekYear)
* and [getWeekYear](https://date-fns.org/docs/getWeekYear)).
*
* 6. Specific non-location timezones are currently unavailable in `date-fns`,
* so right now these tokens fall back to GMT timezones.
*
* 7. These patterns are not in the Unicode Technical Standard #35:
* - `i`: ISO day of week
* - `I`: ISO week of year
* - `R`: ISO week-numbering year
* - `t`: seconds timestamp
* - `T`: milliseconds timestamp
* - `o`: ordinal number modifier
* - `P`: long localized date
* - `p`: long localized time
*
* 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.
* You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
*
* 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.
* You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
*
* @param date - The original date
* @param format - The string of tokens
* @param options - An object with options
*
* @returns The formatted date string
*
* @throws `date` must not be Invalid Date
* @throws `options.locale` must contain `localize` property
* @throws `options.locale` must contain `formatLong` property
* @throws use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
* @throws use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
* @throws use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
* @throws use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
* @throws format string contains an unescaped latin alphabet character
*
* @example
* // Represent 11 February 2014 in middle-endian format:
* const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')
* //=> '02/11/2014'
*
* @example
* // Represent 2 July 2014 in Esperanto:
* import { eoLocale } from 'date-fns/locale/eo'
* const result = format(new Date(2014, 6, 2), "do 'de' MMMM yyyy", {
* locale: eoLocale
* })
* //=> '2-a de julio 2014'
*
* @example
* // Escape string by single quote characters:
* const result = format(new Date(2014, 6, 2, 15), "h 'o''clock'")
* //=> "3 o'clock"
*/
function format(date, formatStr, options) {
const defaultOptions = (0, _index2.getDefaultOptions)();
const locale =
options?.locale ?? defaultOptions.locale ?? _index.defaultLocale;
const firstWeekContainsDate =
options?.firstWeekContainsDate ??
options?.locale?.options?.firstWeekContainsDate ??
defaultOptions.firstWeekContainsDate ??
defaultOptions.locale?.options?.firstWeekContainsDate ??
1;
const weekStartsOn =
options?.weekStartsOn ??
options?.locale?.options?.weekStartsOn ??
defaultOptions.weekStartsOn ??
defaultOptions.locale?.options?.weekStartsOn ??
0;
const originalDate = (0, _index7.toDate)(date, options?.in);
if (!(0, _index6.isValid)(originalDate)) {
throw new RangeError("Invalid time value");
}
let parts = formatStr
.match(longFormattingTokensRegExp)
.map((substring) => {
const firstCharacter = substring[0];
if (firstCharacter === "p" || firstCharacter === "P") {
const longFormatter = _index4.longFormatters[firstCharacter];
return longFormatter(substring, locale.formatLong);
}
return substring;
})
.join("")
.match(formattingTokensRegExp)
.map((substring) => {
// Replace two single quote characters with one single quote character
if (substring === "''") {
return { isToken: false, value: "'" };
}
const firstCharacter = substring[0];
if (firstCharacter === "'") {
return { isToken: false, value: cleanEscapedString(substring) };
}
if (_index3.formatters[firstCharacter]) {
return { isToken: true, value: substring };
}
if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
throw new RangeError(
"Format string contains an unescaped latin alphabet character `" +
firstCharacter +
"`",
);
}
return { isToken: false, value: substring };
});
// invoke localize preprocessor (only for french locales at the moment)
if (locale.localize.preprocessor) {
parts = locale.localize.preprocessor(originalDate, parts);
}
const formatterOptions = {
firstWeekContainsDate,
weekStartsOn,
locale,
};
return parts
.map((part) => {
if (!part.isToken) return part.value;
const token = part.value;
if (
(!options?.useAdditionalWeekYearTokens &&
(0, _index5.isProtectedWeekYearToken)(token)) ||
(!options?.useAdditionalDayOfYearTokens &&
(0, _index5.isProtectedDayOfYearToken)(token))
) {
(0, _index5.warnOrThrowProtectedError)(token, formatStr, String(date));
}
const formatter = _index3.formatters[token[0]];
return formatter(originalDate, token, locale.localize, formatterOptions);
})
.join("");
}
function cleanEscapedString(input) {
const matched = input.match(escapedStringRegExp);
if (!matched) {
return input;
}
return matched[1].replace(doubleQuoteRegExp, "'");
}

View File

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

View File

@@ -0,0 +1,38 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var React = require('react');
function _interopNamespace(e) {
if (e && e.__esModule) return e;
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n["default"] = e;
return Object.freeze(n);
}
var React__namespace = /*#__PURE__*/_interopNamespace(React);
var isBrowser = typeof document !== 'undefined';
var syncFallback = function syncFallback(create) {
return create();
};
var useInsertionEffect = React__namespace['useInsertion' + 'Effect'] ? React__namespace['useInsertion' + 'Effect'] : false;
var useInsertionEffectAlwaysWithSyncFallback = !isBrowser ? syncFallback : useInsertionEffect || syncFallback;
var useInsertionEffectWithLayoutFallback = useInsertionEffect || React__namespace.useLayoutEffect;
exports.useInsertionEffectAlwaysWithSyncFallback = useInsertionEffectAlwaysWithSyncFallback;
exports.useInsertionEffectWithLayoutFallback = useInsertionEffectWithLayoutFallback;

View File

@@ -0,0 +1 @@
function n(n){return`\n[next-intl] ${n}\n`}function o(o){throw new Error(n(o))}function r(o){console.warn(n(o))}function t(n){return function(o){"1"!==process.env[n]&&(process.env[n]="1",o())}}export{t as once,o as throwError,r as warn};

View File

@@ -0,0 +1,121 @@
'use client';
import { c as _c } from "react/compiler-runtime";
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { useCallback } from 'react';
import { Gutter } from '../../../elements/Gutter/index.js';
import { useModal } from '../../../elements/Modal/index.js';
import { RenderTitle } from '../../../elements/RenderTitle/index.js';
import { useFormModified } from '../../../forms/Form/index.js';
import { XIcon } from '../../../icons/X/index.js';
import { useDocumentInfo } from '../../../providers/DocumentInfo/index.js';
import { useDocumentTitle } from '../../../providers/DocumentTitle/index.js';
import { useTranslation } from '../../../providers/Translation/index.js';
import { IDLabel } from '../../IDLabel/index.js';
import { LeaveWithoutSavingModal } from '../../LeaveWithoutSaving/index.js';
import { documentDrawerBaseClass } from '../index.js';
import './index.scss';
const leaveWithoutSavingModalSlug = 'leave-without-saving-doc-drawer';
export const DocumentDrawerHeader = t0 => {
const $ = _c(15);
const {
AfterHeader,
drawerSlug,
showDocumentID: t1
} = t0;
const showDocumentID = t1 === undefined ? true : t1;
const {
closeModal,
openModal
} = useModal();
const {
t
} = useTranslation();
const isModified = useFormModified();
let t2;
if ($[0] !== closeModal || $[1] !== drawerSlug || $[2] !== isModified || $[3] !== openModal) {
t2 = () => {
if (isModified) {
openModal(leaveWithoutSavingModalSlug);
} else {
closeModal(drawerSlug);
}
};
$[0] = closeModal;
$[1] = drawerSlug;
$[2] = isModified;
$[3] = openModal;
$[4] = t2;
} else {
t2 = $[4];
}
const handleOnClose = t2;
let t3;
if ($[5] !== AfterHeader || $[6] !== closeModal || $[7] !== drawerSlug || $[8] !== handleOnClose || $[9] !== showDocumentID || $[10] !== t) {
let t4;
if ($[12] !== closeModal || $[13] !== drawerSlug) {
t4 = () => closeModal(drawerSlug);
$[12] = closeModal;
$[13] = drawerSlug;
$[14] = t4;
} else {
t4 = $[14];
}
t3 = _jsxs(Gutter, {
className: `${documentDrawerBaseClass}__header`,
children: [_jsxs("div", {
className: `${documentDrawerBaseClass}__header-content`,
children: [_jsx("h2", {
className: `${documentDrawerBaseClass}__header-text`,
children: _jsx(RenderTitle, {
element: "span"
})
}), _jsx("button", {
"aria-label": t("general:close"),
className: `${documentDrawerBaseClass}__header-close`,
onClick: handleOnClose,
type: "button",
children: _jsx(XIcon, {})
})]
}), showDocumentID && _jsx(DocumentID, {}), AfterHeader ? _jsx("div", {
className: `${documentDrawerBaseClass}__after-header`,
children: AfterHeader
}) : null, _jsx(LeaveWithoutSavingModal, {
modalSlug: leaveWithoutSavingModalSlug,
onConfirm: t4
})]
});
$[5] = AfterHeader;
$[6] = closeModal;
$[7] = drawerSlug;
$[8] = handleOnClose;
$[9] = showDocumentID;
$[10] = t;
$[11] = t3;
} else {
t3 = $[11];
}
return t3;
};
const DocumentID = () => {
const $ = _c(3);
const {
id
} = useDocumentInfo();
const {
title
} = useDocumentTitle();
let t0;
if ($[0] !== id || $[1] !== title) {
t0 = id && id !== title ? _jsx(IDLabel, {
id: id.toString()
}) : null;
$[0] = id;
$[1] = title;
$[2] = t0;
} else {
t0 = $[2];
}
return t0;
};
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,47 @@
'use strict';
function isHighSurrogate(codePoint) {
return codePoint >= 0xd800 && codePoint <= 0xdbff;
}
function isLowSurrogate(codePoint) {
return codePoint >= 0xdc00 && codePoint <= 0xdfff;
}
// Truncate string by size in bytes
module.exports = function getByteLength(string) {
if (typeof string !== "string") {
throw new Error("Input must be string");
}
var charLength = string.length;
var byteLength = 0;
var codePoint = null;
var prevCodePoint = null;
for (var i = 0; i < charLength; i++) {
codePoint = string.charCodeAt(i);
// handle 4-byte non-BMP chars
// low surrogate
if (isLowSurrogate(codePoint)) {
// when parsing previous hi-surrogate, 3 is added to byteLength
if (prevCodePoint != null && isHighSurrogate(prevCodePoint)) {
byteLength += 1;
}
else {
byteLength += 3;
}
}
else if (codePoint <= 0x7f ) {
byteLength += 1;
}
else if (codePoint >= 0x80 && codePoint <= 0x7ff) {
byteLength += 2;
}
else if (codePoint >= 0x800 && codePoint <= 0xffff) {
byteLength += 3;
}
prevCodePoint = codePoint;
}
return byteLength;
};

View File

@@ -0,0 +1,9 @@
function renderHTML(element, { style, vars }, styleProp, projection) {
Object.assign(element.style, style, projection && projection.getProjectionStyles(styleProp));
// Loop over any CSS variables and assign those.
for (const key in vars) {
element.style.setProperty(key, vars[key]);
}
}
export { renderHTML };

View File

@@ -0,0 +1,9 @@
import type { HandlerDataError } from '../types-hoist/instrument';
/**
* Add an instrumentation handler for when an error is captured by the global error handler.
*
* Use at your own risk, this might break without changelog notice, only used internally.
* @hidden
*/
export declare function addGlobalErrorInstrumentationHandler(handler: (data: HandlerDataError) => void): void;
//# sourceMappingURL=globalError.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/neon/rls.ts"],"sourcesContent":["import { is } from '~/entity.ts';\nimport { type AnyPgColumn, pgPolicy, type PgPolicyToOption } from '~/pg-core/index.ts';\nimport { PgRole, pgRole } from '~/pg-core/roles.ts';\nimport { type SQL, sql } from '~/sql/sql.ts';\n\n/**\n * Generates a set of PostgreSQL row-level security (RLS) policies for CRUD operations based on the provided options.\n *\n * @param options - An object containing the policy configuration.\n * @param options.role - The PostgreSQL role(s) to apply the policy to. Can be a single `PgRole` instance or an array of `PgRole` instances or role names.\n * @param options.read - The SQL expression or boolean value that defines the read policy. Set to `true` to allow all reads, `false` to deny all reads, or provide a custom SQL expression. Set to `null` to prevent the policy from being generated.\n * @param options.modify - The SQL expression or boolean value that defines the modify (insert, update, delete) policies. Set to `true` to allow all modifications, `false` to deny all modifications, or provide a custom SQL expression. Set to `null` to prevent policies from being generated.\n * @returns An array of PostgreSQL policy definitions, one for each CRUD operation.\n */\nexport const crudPolicy = (options: {\n\trole: PgPolicyToOption;\n\tread: SQL | boolean | null;\n\tmodify: SQL | boolean | null;\n}) => {\n\tif (options.read === undefined) {\n\t\tthrow new Error('crudPolicy requires a read policy');\n\t}\n\n\tif (options.modify === undefined) {\n\t\tthrow new Error('crudPolicy requires a modify policy');\n\t}\n\n\tlet read: SQL | undefined;\n\tif (options.read === true) {\n\t\tread = sql`true`;\n\t} else if (options.read === false) {\n\t\tread = sql`false`;\n\t} else if (options.read !== null) {\n\t\tread = options.read;\n\t}\n\n\tlet modify: SQL | undefined;\n\tif (options.modify === true) {\n\t\tmodify = sql`true`;\n\t} else if (options.modify === false) {\n\t\tmodify = sql`false`;\n\t} else if (options.modify !== null) {\n\t\tmodify = options.modify;\n\t}\n\n\tlet rolesName = '';\n\tif (Array.isArray(options.role)) {\n\t\trolesName = options.role\n\t\t\t.map((it) => {\n\t\t\t\treturn is(it, PgRole) ? it.name : (it as string);\n\t\t\t})\n\t\t\t.join('-');\n\t} else {\n\t\trolesName = is(options.role, PgRole)\n\t\t\t? options.role.name\n\t\t\t: (options.role as string);\n\t}\n\n\treturn [\n\t\tread\n\t\t&& pgPolicy(`crud-${rolesName}-policy-select`, {\n\t\t\tfor: 'select',\n\t\t\tto: options.role,\n\t\t\tusing: read,\n\t\t}),\n\n\t\tmodify\n\t\t&& pgPolicy(`crud-${rolesName}-policy-insert`, {\n\t\t\tfor: 'insert',\n\t\t\tto: options.role,\n\t\t\twithCheck: modify,\n\t\t}),\n\t\tmodify\n\t\t&& pgPolicy(`crud-${rolesName}-policy-update`, {\n\t\t\tfor: 'update',\n\t\t\tto: options.role,\n\t\t\tusing: modify,\n\t\t\twithCheck: modify,\n\t\t}),\n\t\tmodify\n\t\t&& pgPolicy(`crud-${rolesName}-policy-delete`, {\n\t\t\tfor: 'delete',\n\t\t\tto: options.role,\n\t\t\tusing: modify,\n\t\t}),\n\t].filter(Boolean);\n};\n\n// These are default roles that Neon will set up.\nexport const authenticatedRole = pgRole('authenticated').existing();\nexport const anonymousRole = pgRole('anonymous').existing();\n\nexport const authUid = (userIdColumn: AnyPgColumn) => sql`(select auth.user_id() = ${userIdColumn})`;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAmB;AACnB,qBAAkE;AAClE,mBAA+B;AAC/B,iBAA8B;AAWvB,MAAM,aAAa,CAAC,YAIrB;AACL,MAAI,QAAQ,SAAS,QAAW;AAC/B,UAAM,IAAI,MAAM,mCAAmC;AAAA,EACpD;AAEA,MAAI,QAAQ,WAAW,QAAW;AACjC,UAAM,IAAI,MAAM,qCAAqC;AAAA,EACtD;AAEA,MAAI;AACJ,MAAI,QAAQ,SAAS,MAAM;AAC1B,WAAO;AAAA,EACR,WAAW,QAAQ,SAAS,OAAO;AAClC,WAAO;AAAA,EACR,WAAW,QAAQ,SAAS,MAAM;AACjC,WAAO,QAAQ;AAAA,EAChB;AAEA,MAAI;AACJ,MAAI,QAAQ,WAAW,MAAM;AAC5B,aAAS;AAAA,EACV,WAAW,QAAQ,WAAW,OAAO;AACpC,aAAS;AAAA,EACV,WAAW,QAAQ,WAAW,MAAM;AACnC,aAAS,QAAQ;AAAA,EAClB;AAEA,MAAI,YAAY;AAChB,MAAI,MAAM,QAAQ,QAAQ,IAAI,GAAG;AAChC,gBAAY,QAAQ,KAClB,IAAI,CAAC,OAAO;AACZ,iBAAO,kBAAG,IAAI,mBAAM,IAAI,GAAG,OAAQ;AAAA,IACpC,CAAC,EACA,KAAK,GAAG;AAAA,EACX,OAAO;AACN,oBAAY,kBAAG,QAAQ,MAAM,mBAAM,IAChC,QAAQ,KAAK,OACZ,QAAQ;AAAA,EACb;AAEA,SAAO;AAAA,IACN,YACG,yBAAS,QAAQ,SAAS,kBAAkB;AAAA,MAC9C,KAAK;AAAA,MACL,IAAI,QAAQ;AAAA,MACZ,OAAO;AAAA,IACR,CAAC;AAAA,IAED,cACG,yBAAS,QAAQ,SAAS,kBAAkB;AAAA,MAC9C,KAAK;AAAA,MACL,IAAI,QAAQ;AAAA,MACZ,WAAW;AAAA,IACZ,CAAC;AAAA,IACD,cACG,yBAAS,QAAQ,SAAS,kBAAkB;AAAA,MAC9C,KAAK;AAAA,MACL,IAAI,QAAQ;AAAA,MACZ,OAAO;AAAA,MACP,WAAW;AAAA,IACZ,CAAC;AAAA,IACD,cACG,yBAAS,QAAQ,SAAS,kBAAkB;AAAA,MAC9C,KAAK;AAAA,MACL,IAAI,QAAQ;AAAA,MACZ,OAAO;AAAA,IACR,CAAC;AAAA,EACF,EAAE,OAAO,OAAO;AACjB;AAGO,MAAM,wBAAoB,qBAAO,eAAe,EAAE,SAAS;AAC3D,MAAM,oBAAgB,qBAAO,WAAW,EAAE,SAAS;AAEnD,MAAM,UAAU,CAAC,iBAA8B,0CAA+B,YAAY;","names":[]}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/resolvers/globals/restoreVersion.ts"],"sourcesContent":["import type { Document, PayloadRequest, SanitizedGlobalConfig } from 'payload'\n\nimport { isolateObjectProperty, restoreVersionOperationGlobal } from 'payload'\n\nimport type { Context } from '../types.js'\n\ntype Resolver = (\n _: unknown,\n args: {\n draft?: boolean\n id: number | string\n },\n context: {\n req: PayloadRequest\n },\n) => Promise<Document>\nexport function restoreVersion(globalConfig: SanitizedGlobalConfig): Resolver {\n return async function resolver(_, args, context: Context) {\n const options = {\n id: args.id,\n depth: 0,\n draft: args.draft,\n globalConfig,\n req: isolateObjectProperty(context.req, 'transactionID'),\n }\n\n const result = await restoreVersionOperationGlobal(options)\n return result\n }\n}\n"],"names":["isolateObjectProperty","restoreVersionOperationGlobal","restoreVersion","globalConfig","resolver","_","args","context","options","id","depth","draft","req","result"],"mappings":"AAEA,SAASA,qBAAqB,EAAEC,6BAA6B,QAAQ,UAAS;AAc9E,OAAO,SAASC,eAAeC,YAAmC;IAChE,OAAO,eAAeC,SAASC,CAAC,EAAEC,IAAI,EAAEC,OAAgB;QACtD,MAAMC,UAAU;YACdC,IAAIH,KAAKG,EAAE;YACXC,OAAO;YACPC,OAAOL,KAAKK,KAAK;YACjBR;YACAS,KAAKZ,sBAAsBO,QAAQK,GAAG,EAAE;QAC1C;QAEA,MAAMC,SAAS,MAAMZ,8BAA8BO;QACnD,OAAOK;IACT;AACF"}

View File

@@ -0,0 +1,65 @@
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true,
});
exports.Source = void 0;
exports.isSource = isSource;
var _devAssert = require('../jsutils/devAssert.js');
var _inspect = require('../jsutils/inspect.js');
var _instanceOf = require('../jsutils/instanceOf.js');
/**
* A representation of source input to GraphQL. The `name` and `locationOffset` parameters are
* optional, but they are useful for clients who store GraphQL documents in source files.
* For example, if the GraphQL input starts at line 40 in a file named `Foo.graphql`, it might
* be useful for `name` to be `"Foo.graphql"` and location to be `{ line: 40, column: 1 }`.
* The `line` and `column` properties in `locationOffset` are 1-indexed.
*/
class Source {
constructor(
body,
name = 'GraphQL request',
locationOffset = {
line: 1,
column: 1,
},
) {
typeof body === 'string' ||
(0, _devAssert.devAssert)(
false,
`Body must be a string. Received: ${(0, _inspect.inspect)(body)}.`,
);
this.body = body;
this.name = name;
this.locationOffset = locationOffset;
this.locationOffset.line > 0 ||
(0, _devAssert.devAssert)(
false,
'line in locationOffset is 1-indexed and must be positive.',
);
this.locationOffset.column > 0 ||
(0, _devAssert.devAssert)(
false,
'column in locationOffset is 1-indexed and must be positive.',
);
}
get [Symbol.toStringTag]() {
return 'Source';
}
}
/**
* Test if the given value is a Source object.
*
* @internal
*/
exports.Source = Source;
function isSource(source) {
return (0, _instanceOf.instanceOf)(source, Source);
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"Info.d.ts","sourceRoot":"","sources":["../../../../src/providers/ToastContainer/icons/Info.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAexB,CAAA"}

View File

@@ -0,0 +1,42 @@
export { httpIntegration } from './integrations/http';
export { nativeNodeFetchIntegration } from './integrations/node-fetch';
export { fsIntegration } from './integrations/fs';
export { expressIntegration, expressErrorHandler, setupExpressErrorHandler } from './integrations/tracing/express';
export { fastifyIntegration, setupFastifyErrorHandler } from './integrations/tracing/fastify';
export { graphqlIntegration } from './integrations/tracing/graphql';
export { kafkaIntegration } from './integrations/tracing/kafka';
export { lruMemoizerIntegration } from './integrations/tracing/lrumemoizer';
export { mongoIntegration } from './integrations/tracing/mongo';
export { mongooseIntegration } from './integrations/tracing/mongoose';
export { mysqlIntegration } from './integrations/tracing/mysql';
export { mysql2Integration } from './integrations/tracing/mysql2';
export { redisIntegration } from './integrations/tracing/redis';
export { postgresIntegration } from './integrations/tracing/postgres';
export { postgresJsIntegration } from './integrations/tracing/postgresjs';
export { prismaIntegration } from './integrations/tracing/prisma';
export { hapiIntegration, setupHapiErrorHandler } from './integrations/tracing/hapi';
export { honoIntegration, setupHonoErrorHandler } from './integrations/tracing/hono';
export { koaIntegration, setupKoaErrorHandler } from './integrations/tracing/koa';
export { connectIntegration, setupConnectErrorHandler } from './integrations/tracing/connect';
export { knexIntegration } from './integrations/tracing/knex';
export { tediousIntegration } from './integrations/tracing/tedious';
export { genericPoolIntegration } from './integrations/tracing/genericPool';
export { dataloaderIntegration } from './integrations/tracing/dataloader';
export { amqplibIntegration } from './integrations/tracing/amqplib';
export { vercelAIIntegration } from './integrations/tracing/vercelai';
export { openAIIntegration } from './integrations/tracing/openai';
export { anthropicAIIntegration } from './integrations/tracing/anthropic-ai';
export { googleGenAIIntegration } from './integrations/tracing/google-genai';
export { langChainIntegration } from './integrations/tracing/langchain';
export { langGraphIntegration } from './integrations/tracing/langgraph';
export { launchDarklyIntegration, buildLaunchDarklyFlagUsedHandler, openFeatureIntegration, OpenFeatureIntegrationHook, statsigIntegration, unleashIntegration, growthbookIntegration, } from './integrations/featureFlagShims';
export { firebaseIntegration } from './integrations/tracing/firebase';
export { init, getDefaultIntegrations, getDefaultIntegrationsWithoutPerformance, initWithoutDefaultIntegrations, } from './sdk';
export { initOpenTelemetry, preloadOpenTelemetry } from './sdk/initOtel';
export { getAutoPerformanceIntegrations } from './integrations/tracing';
export type { NodeOptions } from './types';
export { setOpenTelemetryContextAsyncContextStrategy as setNodeAsyncContextStrategy, } from '@sentry/opentelemetry';
export { addBreadcrumb, isInitialized, isEnabled, getGlobalScope, lastEventId, close, createTransport, flush, SDK_VERSION, getSpanStatusFromHttpCode, setHttpStatus, captureCheckIn, withMonitor, requestDataIntegration, functionToStringIntegration, inboundFiltersIntegration, eventFiltersIntegration, linkedErrorsIntegration, addEventProcessor, setContext, setExtra, setExtras, setTag, setTags, setUser, setConversationId, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, setCurrentClient, Scope, setMeasurement, getSpanDescendants, parameterize, getClient, getCurrentScope, getIsolationScope, getTraceData, getTraceMetaTags, httpHeadersToSpanAttributes, winterCGHeadersToDict, continueTrace, withScope, withIsolationScope, captureException, captureEvent, captureMessage, captureFeedback, captureConsoleIntegration, dedupeIntegration, extraErrorDataIntegration, rewriteFramesIntegration, startSession, captureSession, endSession, addIntegration, startSpan, startSpanManual, startInactiveSpan, startNewTrace, suppressTracing, getActiveSpan, withActiveSpan, getRootSpan, spanToJSON, spanToTraceHeader, spanToBaggageHeader, trpcMiddleware, updateSpanName, supabaseIntegration, instrumentSupabaseClient, instrumentOpenAiClient, instrumentAnthropicAiClient, instrumentGoogleGenAIClient, zodErrorsIntegration, profiler, consoleLoggingIntegration, createConsolaReporter, consoleIntegration, wrapMcpServerWithSentry, featureFlagsIntegration, createLangChainCallbackHandler, instrumentLangGraph, instrumentStateGraphCompile, } from '@sentry/core';
export type { Breadcrumb, BreadcrumbHint, PolymorphicRequest, RequestEventData, SdkInfo, Event, EventHint, ErrorEvent, Exception, Session, SeverityLevel, StackFrame, Stacktrace, Thread, User, Span, Metric, Log, LogSeverityLevel, FeatureFlagsIntegration, ExclusiveEventHintOrCaptureContext, CaptureContext, } from '@sentry/core';
export { logger, metrics, httpServerIntegration, httpServerSpansIntegration, nodeContextIntegration, contextLinesIntegration, localVariablesIntegration, modulesIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, anrIntegration, disableAnrDetectionForCallback, spotlightIntegration, childProcessIntegration, processSessionIntegration, pinoIntegration, createSentryWinstonTransport, SentryContextManager, systemErrorIntegration, generateInstrumentOnce, getSentryRelease, defaultStackParser, createGetModuleFromFilename, makeNodeTransport, NodeClient, cron, NODE_VERSION, validateOpenTelemetrySetup, } from '@sentry/node-core';
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["GRAPHQL_PLAYGROUND_GET","GRAPHQL_POST","DELETE","REST_DELETE","GET","REST_GET","OPTIONS","REST_OPTIONS","PATCH","REST_PATCH","POST","REST_POST"],"sources":["../../src/routes/index.ts"],"sourcesContent":["export { GRAPHQL_PLAYGROUND_GET, GRAPHQL_POST } from './graphql/index.js'\n\nexport {\n DELETE as REST_DELETE,\n GET as REST_GET,\n OPTIONS as REST_OPTIONS,\n PATCH as REST_PATCH,\n POST as REST_POST,\n} from './rest/index.js'\n"],"mappings":"AAAA,SAASA,sBAAsB,EAAEC,YAAY,QAAQ;AAErD,SACEC,MAAA,IAAUC,WAAW,EACrBC,GAAA,IAAOC,QAAQ,EACfC,OAAA,IAAWC,YAAY,EACvBC,KAAA,IAASC,UAAU,EACnBC,IAAA,IAAQC,SAAS,QACZ","ignoreList":[]}

View File

@@ -0,0 +1 @@
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/hono/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;CAGjB,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAElF,eAAO,MAAM,SAAS;;;CAGZ,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC"}

View File

@@ -0,0 +1,4 @@
import type { DefaultTranslationsObject, Language } from '../types.js';
export declare const ukTranslations: DefaultTranslationsObject;
export declare const uk: Language;
//# sourceMappingURL=uk.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["Button","Gutter","formatAdminURL","React","FormHeader","baseClass","UnauthorizedView","initPageResult","permissions","req","i18n","payload","config","admin","routes","logout","logoutRoute","adminRoute","user","_jsxs","className","_jsx","description","t","heading","canAccessAdmin","el","size","to","path","UnauthorizedViewWithGutter","props","join"],"sources":["../../../src/views/Unauthorized/index.tsx"],"sourcesContent":["import type { AdminViewServerProps } from 'payload'\n\nimport { Button, Gutter } from '@payloadcms/ui'\nimport { formatAdminURL } from 'payload/shared'\nimport React from 'react'\n\nimport { FormHeader } from '../../elements/FormHeader/index.js'\nimport './index.scss'\n\nconst baseClass = 'unauthorized'\n\nexport function UnauthorizedView({ initPageResult }: AdminViewServerProps) {\n const {\n permissions,\n req: {\n i18n,\n payload: {\n config: {\n admin: {\n routes: { logout: logoutRoute },\n },\n routes: { admin: adminRoute },\n },\n },\n user,\n },\n } = initPageResult\n\n return (\n <div className={baseClass}>\n <FormHeader\n description={i18n.t('error:notAllowedToAccessPage')}\n heading={i18n.t(\n user && !permissions.canAccessAdmin ? 'error:unauthorizedAdmin' : 'error:unauthorized',\n )}\n />\n <Button\n className={`${baseClass}__button`}\n el=\"link\"\n size=\"large\"\n to={formatAdminURL({\n adminRoute,\n path: logoutRoute,\n })}\n >\n {i18n.t('authentication:logOut')}\n </Button>\n </div>\n )\n}\n\nexport const UnauthorizedViewWithGutter = (props: AdminViewServerProps) => {\n return (\n <Gutter className={[baseClass, `${baseClass}--with-gutter`].join(' ')}>\n <UnauthorizedView {...props} />\n </Gutter>\n )\n}\n"],"mappings":";AAEA,SAASA,MAAM,EAAEC,MAAM,QAAQ;AAC/B,SAASC,cAAc,QAAQ;AAC/B,OAAOC,KAAA,MAAW;AAElB,SAASC,UAAU,QAAQ;AAG3B,MAAMC,SAAA,GAAY;AAElB,OAAO,SAASC,iBAAiB;EAAEC;AAAc,CAAwB;EACvE,MAAM;IACJC,WAAW;IACXC,GAAA,EAAK;MACHC,IAAI;MACJC,OAAA,EAAS;QACPC,MAAA,EAAQ;UACNC,KAAA,EAAO;YACLC,MAAA,EAAQ;cAAEC,MAAA,EAAQC;YAAW;UAAE,CAChC;UACDF,MAAA,EAAQ;YAAED,KAAA,EAAOI;UAAU;QAAE;MAC9B,CACF;MACDC;IAAI;EACL,CACF,GAAGX,cAAA;EAEJ,oBACEY,KAAA,CAAC;IAAIC,SAAA,EAAWf,SAAA;4BACdgB,IAAA,CAACjB,UAAA;MACCkB,WAAA,EAAaZ,IAAA,CAAKa,CAAC,CAAC;MACpBC,OAAA,EAASd,IAAA,CAAKa,CAAC,CACbL,IAAA,IAAQ,CAACV,WAAA,CAAYiB,cAAc,GAAG,4BAA4B;qBAGtEJ,IAAA,CAACrB,MAAA;MACCoB,SAAA,EAAW,GAAGf,SAAA,UAAmB;MACjCqB,EAAA,EAAG;MACHC,IAAA,EAAK;MACLC,EAAA,EAAI1B,cAAA,CAAe;QACjBe,UAAA;QACAY,IAAA,EAAMb;MACR;gBAECN,IAAA,CAAKa,CAAC,CAAC;;;AAIhB;AAEA,OAAO,MAAMO,0BAAA,GAA8BC,KAAA;EACzC,oBACEV,IAAA,CAACpB,MAAA;IAAOmB,SAAA,EAAW,CAACf,SAAA,EAAW,GAAGA,SAAA,eAAwB,CAAC,CAAC2B,IAAI,CAAC;cAC/D,aAAAX,IAAA,CAACf,gBAAA;MAAkB,GAAGyB;;;AAG5B","ignoreList":[]}

View File

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

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkLTNXLTPScjs = require('./chunk-LTNXLTPS.cjs');var r={...Object.fromEntries(Object.entries(_chunkLTNXLTPScjs.a).filter(([e])=>e!=="extra")),..._chunkLTNXLTPScjs.a.extra.cloudflare},o= exports.default =r;exports.default = o; exports.status = r;

View File

@@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _classPrivateMethodSet;
function _classPrivateMethodSet() {
throw new TypeError("attempted to reassign private method");
}
//# sourceMappingURL=classPrivateMethodSet.js.map

View File

@@ -0,0 +1,238 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
*/
"use strict";
const RuntimeGlobals = require("../RuntimeGlobals");
const RuntimeModule = require("../RuntimeModule");
const Template = require("../Template");
const {
generateJavascriptHMR
} = require("../hmr/JavascriptHotModuleReplacementHelper");
const {
chunkHasJs,
getChunkFilenameTemplate
} = require("../javascript/JavascriptModulesPlugin");
const { getInitialChunkIds } = require("../javascript/StartupHelpers");
const compileBooleanMatcher = require("../util/compileBooleanMatcher");
const { getUndoPath } = require("../util/identifier");
/** @typedef {import("../Chunk")} Chunk */
/** @typedef {import("../ChunkGraph")} ChunkGraph */
/** @typedef {import("../Compilation")} Compilation */
/** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */
/** @typedef {import("../Module").ReadOnlyRuntimeRequirements} ReadOnlyRuntimeRequirements */
class RequireChunkLoadingRuntimeModule extends RuntimeModule {
/**
* @param {ReadOnlyRuntimeRequirements} runtimeRequirements runtime requirements
*/
constructor(runtimeRequirements) {
super("require chunk loading", RuntimeModule.STAGE_ATTACH);
this.runtimeRequirements = runtimeRequirements;
}
/**
* @private
* @param {Chunk} chunk chunk
* @param {string} rootOutputDir root output directory
* @param {RuntimeTemplate} runtimeTemplate the runtime template
* @returns {string} generated code
*/
_generateBaseUri(chunk, rootOutputDir, runtimeTemplate) {
const options = chunk.getEntryOptions();
if (options && options.baseUri) {
return `${RuntimeGlobals.baseURI} = ${JSON.stringify(options.baseUri)};`;
}
return `${RuntimeGlobals.baseURI} = require(${runtimeTemplate.renderNodePrefixForCoreModule("url")}).pathToFileURL(${
rootOutputDir !== "./"
? `__dirname + ${JSON.stringify(`/${rootOutputDir}`)}`
: "__filename"
});`;
}
/**
* @returns {string | null} runtime code
*/
generate() {
const compilation = /** @type {Compilation} */ (this.compilation);
const chunkGraph = /** @type {ChunkGraph} */ (this.chunkGraph);
const chunk = /** @type {Chunk} */ (this.chunk);
const { runtimeTemplate } = compilation;
const fn = RuntimeGlobals.ensureChunkHandlers;
const withBaseURI = this.runtimeRequirements.has(RuntimeGlobals.baseURI);
const withExternalInstallChunk = this.runtimeRequirements.has(
RuntimeGlobals.externalInstallChunk
);
const withOnChunkLoad = this.runtimeRequirements.has(
RuntimeGlobals.onChunksLoaded
);
const withLoading = this.runtimeRequirements.has(
RuntimeGlobals.ensureChunkHandlers
);
const withHmr = this.runtimeRequirements.has(
RuntimeGlobals.hmrDownloadUpdateHandlers
);
const withHmrManifest = this.runtimeRequirements.has(
RuntimeGlobals.hmrDownloadManifest
);
const conditionMap = chunkGraph.getChunkConditionMap(chunk, chunkHasJs);
const hasJsMatcher = compileBooleanMatcher(conditionMap);
const initialChunkIds = getInitialChunkIds(chunk, chunkGraph, chunkHasJs);
const outputName = compilation.getPath(
getChunkFilenameTemplate(chunk, compilation.outputOptions),
{
chunk,
contentHashType: "javascript"
}
);
const rootOutputDir = getUndoPath(
outputName,
compilation.outputOptions.path,
true
);
const stateExpression = withHmr
? `${RuntimeGlobals.hmrRuntimeStatePrefix}_require`
: undefined;
return Template.asString([
withBaseURI
? this._generateBaseUri(chunk, rootOutputDir, runtimeTemplate)
: "// no baseURI",
"",
"// object to store loaded chunks",
'// "1" means "loaded", otherwise not loaded yet',
`var installedChunks = ${
stateExpression ? `${stateExpression} = ${stateExpression} || ` : ""
}{`,
Template.indent(
Array.from(initialChunkIds, (id) => `${JSON.stringify(id)}: 1`).join(
",\n"
)
),
"};",
"",
withOnChunkLoad
? `${
RuntimeGlobals.onChunksLoaded
}.require = ${runtimeTemplate.returningFunction(
"installedChunks[chunkId]",
"chunkId"
)};`
: "// no on chunks loaded",
"",
withLoading || withExternalInstallChunk
? `var installChunk = ${runtimeTemplate.basicFunction("chunk", [
"var moreModules = chunk.modules, chunkIds = chunk.ids, runtime = chunk.runtime;",
"for(var moduleId in moreModules) {",
Template.indent([
`if(${RuntimeGlobals.hasOwnProperty}(moreModules, moduleId)) {`,
Template.indent([
`${RuntimeGlobals.moduleFactories}[moduleId] = moreModules[moduleId];`
]),
"}"
]),
"}",
`if(runtime) runtime(${RuntimeGlobals.require});`,
"for(var i = 0; i < chunkIds.length; i++)",
Template.indent("installedChunks[chunkIds[i]] = 1;"),
withOnChunkLoad ? `${RuntimeGlobals.onChunksLoaded}();` : ""
])};`
: "// no chunk install function needed",
"",
withLoading
? Template.asString([
"// require() chunk loading for javascript",
`${fn}.require = ${runtimeTemplate.basicFunction(
"chunkId, promises",
hasJsMatcher !== false
? [
'// "1" is the signal for "already loaded"',
"if(!installedChunks[chunkId]) {",
Template.indent([
hasJsMatcher === true
? "if(true) { // all chunks have JS"
: `if(${hasJsMatcher("chunkId")}) {`,
Template.indent([
// The require function loads and runs a chunk. When the chunk is being run,
// it can call __webpack_require__.C to directly complete installed.
`var installedChunk = require(${JSON.stringify(
rootOutputDir
)} + ${
RuntimeGlobals.getChunkScriptFilename
}(chunkId));`,
"if (!installedChunks[chunkId]) {",
Template.indent(["installChunk(installedChunk);"]),
"}"
]),
"} else installedChunks[chunkId] = 1;",
""
]),
"}"
]
: "installedChunks[chunkId] = 1;"
)};`
])
: "// no chunk loading",
"",
withExternalInstallChunk
? Template.asString([
`module.exports = ${RuntimeGlobals.require};`,
`${RuntimeGlobals.externalInstallChunk} = installChunk;`
])
: "// no external install chunk",
"",
withHmr
? Template.asString([
"function loadUpdateChunk(chunkId, updatedModulesList) {",
Template.indent([
`var update = require(${JSON.stringify(rootOutputDir)} + ${
RuntimeGlobals.getChunkUpdateScriptFilename
}(chunkId));`,
"var updatedModules = update.modules;",
"var runtime = update.runtime;",
"for(var moduleId in updatedModules) {",
Template.indent([
`if(${RuntimeGlobals.hasOwnProperty}(updatedModules, moduleId)) {`,
Template.indent([
"currentUpdate[moduleId] = updatedModules[moduleId];",
"if(updatedModulesList) updatedModulesList.push(moduleId);"
]),
"}"
]),
"}",
"if(runtime) currentUpdateRuntime.push(runtime);"
]),
"}",
"",
generateJavascriptHMR("require")
])
: "// no HMR",
"",
withHmrManifest
? Template.asString([
`${RuntimeGlobals.hmrDownloadManifest} = function() {`,
Template.indent([
"return Promise.resolve().then(function() {",
Template.indent([
`return require(${JSON.stringify(rootOutputDir)} + ${
RuntimeGlobals.getUpdateManifestFilename
}());`
]),
`}).catch(${runtimeTemplate.basicFunction("err", [
"if(['MODULE_NOT_FOUND', 'ENOENT'].includes(err.code)) return;",
"throw err;"
])});`
]),
"}"
])
: "// no HMR manifest"
]);
}
}
module.exports = RequireChunkLoadingRuntimeModule;

View File

@@ -0,0 +1,29 @@
{
"name": "wrappy",
"version": "1.0.2",
"description": "Callback wrapping utility",
"main": "wrappy.js",
"files": [
"wrappy.js"
],
"directories": {
"test": "test"
},
"dependencies": {},
"devDependencies": {
"tap": "^2.3.1"
},
"scripts": {
"test": "tap --coverage test/*.js"
},
"repository": {
"type": "git",
"url": "https://github.com/npm/wrappy"
},
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
"license": "ISC",
"bugs": {
"url": "https://github.com/npm/wrappy/issues"
},
"homepage": "https://github.com/npm/wrappy"
}

View File

@@ -0,0 +1,36 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Sean Larkin @thelarkinn
*/
"use strict";
const { formatSize } = require("../SizeFormatHelpers");
const WebpackError = require("../WebpackError");
/** @typedef {import("./SizeLimitsPlugin").AssetDetails} AssetDetails */
class AssetsOverSizeLimitWarning extends WebpackError {
/**
* @param {AssetDetails[]} assetsOverSizeLimit the assets
* @param {number} assetLimit the size limit
*/
constructor(assetsOverSizeLimit, assetLimit) {
const assetLists = assetsOverSizeLimit
.map((asset) => `\n ${asset.name} (${formatSize(asset.size)})`)
.join("");
super(`asset size limit: The following asset(s) exceed the recommended size limit (${formatSize(
assetLimit
)}).
This can impact web performance.
Assets: ${assetLists}`);
/** @type {string} */
this.name = "AssetsOverSizeLimitWarning";
this.assets = assetsOverSizeLimit;
}
}
/** @type {typeof AssetsOverSizeLimitWarning} */
module.exports = AssetsOverSizeLimitWarning;

View File

@@ -0,0 +1,76 @@
export function parseVersion(version) {
const [mainVersion, ...preReleases] = version.split('-');
const parts = mainVersion.split('.').map(Number);
return {
parts,
preReleases
};
}
function extractNumbers(str) {
const matches = str.match(/\d+/g) || [];
return matches.map(Number);
}
function comparePreRelease(v1, v2) {
const num1 = extractNumbers(v1);
const num2 = extractNumbers(v2);
for(let i = 0; i < Math.max(num1.length, num2.length); i++){
if ((num1[i] || 0) < (num2[i] || 0)) {
return -1;
}
if ((num1[i] || 0) > (num2[i] || 0)) {
return 1;
}
}
// If numeric parts are equal, compare the whole string
if (v1 < v2) {
return -1;
}
if (v1 > v2) {
return 1;
}
return 0;
}
/**
* Compares two semantic version strings, including handling pre-release identifiers.
*
* This function first compares the major, minor, and patch components as integers.
* If these components are equal, it then moves on to compare pre-release versions.
* Pre-release versions are compared first by extracting and comparing any numerical values.
* If numerical values are equal, it compares the whole pre-release string lexicographically.
*
* @param {string} compare - The first version string to compare.
* @param {string} to - The second version string to compare.
* @param {function} [customVersionParser] - An optional function to parse version strings into parts and pre-releases.
* @returns {string} - Returns greater if compare is greater than to, lower if compare is less than to, and equal if they are equal.
*/ export function compareVersions(compare, to, customVersionParser) {
const { parts: parts1, preReleases: preReleases1 } = customVersionParser ? customVersionParser(compare) : parseVersion(compare);
const { parts: parts2, preReleases: preReleases2 } = customVersionParser ? customVersionParser(to) : parseVersion(to);
// Compare main version parts
for(let i = 0; i < Math.max(parts1.length, parts2.length); i++){
if ((parts1[i] || 0) > (parts2[i] || 0)) {
return 'greater';
}
if ((parts1[i] || 0) < (parts2[i] || 0)) {
return 'lower';
}
}
// Compare pre-release parts if main versions are equal
if (preReleases1?.length || preReleases2?.length) {
for(let i = 0; i < Math.max(preReleases1.length, preReleases2.length); i++){
if (!preReleases1[i]) {
return 'greater';
}
if (!preReleases2[i]) {
return 'lower';
}
const result = comparePreRelease(preReleases1[i], preReleases2[i]);
if (result !== 0) {
return result === 1 ? 'greater' : 'lower';
}
// Equal => continue for loop to check for next pre-release part
}
}
return 'equal';
}
//# sourceMappingURL=versionUtils.js.map

View File

@@ -0,0 +1 @@
module.exports={C:{"5":0.10108,"115":0.05776,"137":0.00722,"138":0.00722,"144":0.01083,"145":0.05054,"146":0.40793,_:"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 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 139 140 141 142 143 147 148 149 3.5 3.6"},D:{"69":0.07581,"76":0.00722,"79":0.17689,"103":0.13718,"104":0.00722,"109":0.33212,"111":0.08664,"112":0.00361,"113":0.00361,"114":0.00361,"116":0.06137,"117":0.00361,"121":0.01444,"122":0.00722,"124":0.00361,"125":0.53067,"126":0.08303,"128":0.00361,"131":0.02166,"132":0.08303,"133":0.01805,"134":0.09747,"135":0.00361,"137":0.03971,"138":0.05776,"139":0.21299,"140":0.11552,"141":0.60648,"142":4.92404,"143":7.02867,"144":0.04332,"145":0.00361,_:"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 77 78 80 81 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 105 106 107 108 110 115 118 119 120 123 127 129 130 136 146"},F:{"93":0.00722,"117":0.02527,"124":0.2888,"125":0.01805,_:"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 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 118 119 120 121 122 123 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"83":0.09025,"109":0.00361,"122":0.00361,"137":0.01083,"139":0.00361,"140":0.01083,"141":0.02527,"142":3.48365,"143":5.19479,_:"12 13 14 15 16 17 18 79 80 81 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 114 115 116 117 118 119 120 121 123 124 125 126 127 128 129 130 131 132 133 134 135 136 138"},E:{"14":0.00361,_:"0 4 5 6 7 8 9 10 11 12 13 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 13.1 15.1 15.2-15.3 15.4 15.5 16.4 17.2 26.3","12.1":0.01083,"14.1":0.00722,"15.6":0.13718,"16.0":0.03971,"16.1":0.03249,"16.2":0.00361,"16.3":0.01444,"16.5":0.06137,"16.6":0.12996,"17.0":0.00722,"17.1":0.09025,"17.3":0.01444,"17.4":0.00722,"17.5":0.16967,"17.6":0.16245,"18.0":0.02888,"18.1":0.01805,"18.2":0.00361,"18.3":0.07581,"18.4":0.01444,"18.5-18.6":0.48374,"26.0":0.37183,"26.1":1.05412,"26.2":0.22382},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00718,"5.0-5.1":0,"6.0-6.1":0.01436,"7.0-7.1":0.01077,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.02873,"10.0-10.2":0.00359,"10.3":0.05028,"11.0-11.2":0.61768,"11.3-11.4":0.01796,"12.0-12.1":0.01436,"12.2-12.5":0.1616,"13.0-13.1":0.00359,"13.2":0.02514,"13.3":0.00718,"13.4-13.7":0.02514,"14.0-14.4":0.05028,"14.5-14.8":0.05387,"15.0-15.1":0.05746,"15.2-15.3":0.04309,"15.4":0.04669,"15.5":0.05028,"15.6-15.8":0.77929,"16.0":0.08978,"16.1":0.17238,"16.2":0.08978,"16.3":0.1616,"16.4":0.0395,"16.5":0.06823,"16.6-16.7":1.01271,"17.0":0.05746,"17.1":0.09337,"17.2":0.06823,"17.3":0.10414,"17.4":0.17597,"17.5":0.34475,"17.6-17.7":0.79724,"18.0":0.17956,"18.1":0.37348,"18.2":0.19751,"18.3":0.64282,"18.4":0.33039,"18.5-18.7":23.72334,"26.0":0.46326,"26.1":3.85334,"26.2":0.7326,"26.3":0.03232},P:{"4":0.07535,"24":0.02153,"25":0.03229,"27":0.10765,"28":0.01076,"29":2.2391,_:"20 21 22 23 26 5.0-5.4 6.2-6.4 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 17.0 18.0 19.0","7.2-7.4":0.08612,"8.2":0.01076,"16.0":0.01076},I:{"0":0.24243,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0.00005,"4.4":0,"4.4.3-4.4.4":0.00019},A:{"10":0.22743,_:"6 7 8 9 11 5.5"},K:{"0":0.40896,_:"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"},H:{"0":0},L:{"0":27.42832},R:{_:"0"},M:{"0":1.25244}};

View File

@@ -0,0 +1,164 @@
"use strict";
exports.localize = void 0;
var _index = require("../../_lib/buildLocalizeFn.cjs");
const eraValues = {
narrow: ["ق", "ب"],
abbreviated: ["ق.م.", "ب.م."],
wide: ["قبل الميلاد", "بعد الميلاد"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["ر1", "ر2", "ر3", "ر4"],
wide: ["الربع الأول", "الربع الثاني", "الربع الثالث", "الربع الرابع"],
};
const monthValues = {
narrow: ["ي", "ف", "م", "أ", "م", "ي", "ي", "أ", "س", "أ", "ن", "د"],
abbreviated: [
"ينا",
"فبر",
"مارس",
"أبريل",
"مايو",
"يونـ",
"يولـ",
"أغسـ",
"سبتـ",
"أكتـ",
"نوفـ",
"ديسـ",
],
wide: [
"يناير",
"فبراير",
"مارس",
"أبريل",
"مايو",
"يونيو",
"يوليو",
"أغسطس",
"سبتمبر",
"أكتوبر",
"نوفمبر",
"ديسمبر",
],
};
const dayValues = {
narrow: ["ح", "ن", "ث", "ر", "خ", "ج", "س"],
short: ["أحد", "اثنين", "ثلاثاء", "أربعاء", "خميس", "جمعة", "سبت"],
abbreviated: ["أحد", "اثنـ", "ثلا", "أربـ", "خميـ", "جمعة", "سبت"],
wide: [
"الأحد",
"الاثنين",
"الثلاثاء",
"الأربعاء",
"الخميس",
"الجمعة",
"السبت",
],
};
const dayPeriodValues = {
narrow: {
am: "ص",
pm: "م",
midnight: "ن",
noon: "ظ",
morning: "صباحاً",
afternoon: "بعد الظهر",
evening: "مساءاً",
night: "ليلاً",
},
abbreviated: {
am: "ص",
pm: "م",
midnight: "نصف الليل",
noon: "ظهر",
morning: "صباحاً",
afternoon: "بعد الظهر",
evening: "مساءاً",
night: "ليلاً",
},
wide: {
am: "ص",
pm: "م",
midnight: "نصف الليل",
noon: "ظهر",
morning: "صباحاً",
afternoon: "بعد الظهر",
evening: "مساءاً",
night: "ليلاً",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "ص",
pm: "م",
midnight: "ن",
noon: "ظ",
morning: "في الصباح",
afternoon: "بعد الظـهر",
evening: "في المساء",
night: "في الليل",
},
abbreviated: {
am: "ص",
pm: "م",
midnight: "نصف الليل",
noon: "ظهر",
morning: "في الصباح",
afternoon: "بعد الظهر",
evening: "في المساء",
night: "في الليل",
},
wide: {
am: "ص",
pm: "م",
midnight: "نصف الليل",
noon: "ظهر",
morning: "صباحاً",
afternoon: "بعد الظـهر",
evening: "في المساء",
night: "في الليل",
},
};
const ordinalNumber = (dirtyNumber) => {
return String(dirtyNumber);
};
const localize = (exports.localize = {
ordinalNumber,
era: (0, _index.buildLocalizeFn)({
values: eraValues,
defaultWidth: "wide",
}),
quarter: (0, _index.buildLocalizeFn)({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: (0, _index.buildLocalizeFn)({
values: monthValues,
defaultWidth: "wide",
}),
day: (0, _index.buildLocalizeFn)({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: (0, _index.buildLocalizeFn)({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
});

View File

@@ -0,0 +1,5 @@
# `@lexical/yjs`
[![See API Documentation](https://lexical.dev/img/see-api-documentation.svg)](https://lexical.dev/docs/api/modules/lexical_yjs)
This package provides a set of bindings for Y.js that allow for collaborative editing with Lexical.

View File

@@ -0,0 +1,19 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const ListCollapse = createLucideIcon("ListCollapse", [
["path", { d: "m3 10 2.5-2.5L3 5", key: "i6eama" }],
["path", { d: "m3 19 2.5-2.5L3 14", key: "w2gmor" }],
["path", { d: "M10 6h11", key: "c7qv1k" }],
["path", { d: "M10 12h11", key: "6m4ad9" }],
["path", { d: "M10 18h11", key: "11hvi2" }]
]);
export { ListCollapse as default };
//# sourceMappingURL=list-collapse.js.map

View File

@@ -0,0 +1,21 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Sean Larkin @thelarkinn
*/
"use strict";
const WebpackError = require("../WebpackError");
module.exports = class NoAsyncChunksWarning extends WebpackError {
constructor() {
super(
"webpack performance recommendations: \n" +
"You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.\n" +
"For more info visit https://webpack.js.org/guides/code-splitting/"
);
/** @type {string} */
this.name = "NoAsyncChunksWarning";
}
};

View File

@@ -0,0 +1,11 @@
import type { PayloadRequest } from '../types/index.js';
import { type Payload } from '../index.js';
type Args = {
id?: number | string;
payload: Payload;
req?: PayloadRequest;
slug: string;
};
export declare const deleteScheduledPublishJobs: ({ id, slug, payload, req, }: Args) => Promise<void>;
export {};
//# sourceMappingURL=deleteScheduledPublishJobs.d.ts.map

View File

@@ -0,0 +1,16 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const ChartLine = createLucideIcon("ChartLine", [
["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
["path", { d: "m19 9-5 5-4-4-3 3", key: "2osh9i" }]
]);
export { ChartLine as default };
//# sourceMappingURL=chart-line.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"fieldHasChanges.js","names":["fieldHasChanges","a","b","JSON","stringify"],"sources":["../../../../../src/views/Version/RenderFieldsToDiff/utilities/fieldHasChanges.ts"],"sourcesContent":["export function fieldHasChanges(a: unknown, b: unknown) {\n return JSON.stringify(a) !== JSON.stringify(b)\n}\n"],"mappings":"AAAA,OAAO,SAASA,gBAAgBC,CAAU,EAAEC,CAAU;EACpD,OAAOC,IAAA,CAAKC,SAAS,CAACH,CAAA,MAAOE,IAAA,CAAKC,SAAS,CAACF,CAAA;AAC9C","ignoreList":[]}

View File

@@ -0,0 +1 @@
{"version":3,"file":"ExportResult.js","sourceRoot":"","sources":["../../src/ExportResult.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAOH,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,6DAAO,CAAA;IACP,2DAAM,CAAA;AACR,CAAC,EAHW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAG3B","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport interface ExportResult {\n code: ExportResultCode;\n error?: Error;\n}\n\nexport enum ExportResultCode {\n SUCCESS,\n FAILED,\n}\n"]}

View File

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

View File

@@ -0,0 +1,23 @@
import defineProperty from "./defineProperty.js";
function ownKeys(e, r) {
var t = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var o = Object.getOwnPropertySymbols(e);
r && (o = o.filter(function (r) {
return Object.getOwnPropertyDescriptor(e, r).enumerable;
})), t.push.apply(t, o);
}
return t;
}
function _objectSpread2(e) {
for (var r = 1; r < arguments.length; r++) {
var t = null != arguments[r] ? arguments[r] : {};
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
defineProperty(e, r, t[r]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
});
}
return e;
}
export { _objectSpread2 as default };

View File

@@ -0,0 +1,34 @@
'use strict'
const { test } = require('tap')
const { sink, once } = require('./helper')
const { PassThrough } = require('node:stream')
const pino = require('../')
test('Proxy and stream objects', async ({ equal }) => {
const s = new PassThrough()
s.resume()
s.write('', () => {})
const obj = { s, p: new Proxy({}, { get () { throw new Error('kaboom') } }) }
const stream = sink()
const instance = pino(stream)
instance.info({ obj })
const result = await once(stream, 'data')
equal(result.obj, '[unable to serialize, circular reference is too complex to analyze]')
})
test('Proxy and stream objects', async ({ equal }) => {
const s = new PassThrough()
s.resume()
s.write('', () => {})
const obj = { s, p: new Proxy({}, { get () { throw new Error('kaboom') } }) }
const stream = sink()
const instance = pino(stream)
instance.info(obj)
const result = await once(stream, 'data')
equal(result.p, '[unable to serialize, circular reference is too complex to analyze]')
})

View File

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

View File

@@ -0,0 +1,9 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
export { default } from './sparkles.js';
//# sourceMappingURL=stars.js.map

View File

@@ -0,0 +1,9 @@
import type { Locale } from "./types.js";
/**
* @category Locales
* @summary Arabic locale (Moroccan Arabic).
* @language Moroccan Arabic
* @iso-639-2 ara
* @author Achraf Rrami [@rramiachraf](https://github.com/rramiachraf)
*/
export declare const arMA: Locale;

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/folders/addFolderFieldToCollection.ts"],"sourcesContent":["import type { SanitizedCollectionConfig } from '../index.js'\n\nimport { buildFolderField } from './buildFolderField.js'\n\nexport const addFolderFieldToCollection = ({\n collection,\n collectionSpecific,\n folderFieldName,\n folderSlug,\n}: {\n collection: SanitizedCollectionConfig\n collectionSpecific: boolean\n folderFieldName: string\n folderSlug: string\n}): void => {\n collection.fields.push(\n buildFolderField({\n collectionSpecific,\n folderFieldName,\n folderSlug,\n overrides: {\n admin: {\n allowCreate: false,\n allowEdit: false,\n components: {\n Cell: '@payloadcms/next/rsc#FolderTableCell',\n Field: '@payloadcms/next/rsc#FolderField',\n },\n },\n },\n }),\n )\n}\n"],"names":["buildFolderField","addFolderFieldToCollection","collection","collectionSpecific","folderFieldName","folderSlug","fields","push","overrides","admin","allowCreate","allowEdit","components","Cell","Field"],"mappings":"AAEA,SAASA,gBAAgB,QAAQ,wBAAuB;AAExD,OAAO,MAAMC,6BAA6B,CAAC,EACzCC,UAAU,EACVC,kBAAkB,EAClBC,eAAe,EACfC,UAAU,EAMX;IACCH,WAAWI,MAAM,CAACC,IAAI,CACpBP,iBAAiB;QACfG;QACAC;QACAC;QACAG,WAAW;YACTC,OAAO;gBACLC,aAAa;gBACbC,WAAW;gBACXC,YAAY;oBACVC,MAAM;oBACNC,OAAO;gBACT;YACF;QACF;IACF;AAEJ,EAAC"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../../src/exports.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAG9C,OAAO,KAAK,EAAE,OAAO,EAAmB,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACrF,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAI/C,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,sBAAsB,CAAC;AAK/E;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,kCAAkC,GAAG,MAAM,CAEtG;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,cAAc,GAAG,aAAa,GAAG,MAAM,CAMvG;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,MAAM,CAEnE;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,GAAG,IAAI,GAAG,IAAI,CAEzF;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAE9C;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CAExD;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAAG,IAAI,CAEhE;AAED;;;;;;;GAOG;AACH,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,GAAG,IAAI,CAE1D;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAE/C;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAEjF;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,IAAI,MAAM,GAAG,SAAS,CAEhD;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,mBAAmB,CAAC,EAAE,aAAa,GAAG,MAAM,CAY5F;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAC3B,WAAW,EAAE,OAAO,CAAC,aAAa,CAAC,EACnC,QAAQ,EAAE,MAAM,CAAC,EACjB,mBAAmB,CAAC,EAAE,aAAa,GAClC,CAAC,CAmCH;AAED;;;;;;;GAOG;AACH,wBAAsB,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAO9D;AAED;;;;;;;GAOG;AACH,wBAAsB,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAO9D;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,OAAO,CAEvC;AAED,2CAA2C;AAC3C,wBAAgB,SAAS,IAAI,OAAO,CAGnC;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAEhE;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAyB9D;AAED;;GAEG;AACH,wBAAgB,UAAU,IAAI,IAAI,CAYjC;AAcD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,GAAG,GAAE,OAAe,GAAG,IAAI,CASzD"}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/pg-core/index.ts"],"sourcesContent":["export * from './alias.ts';\nexport * from './checks.ts';\nexport * from './columns/index.ts';\nexport * from './db.ts';\nexport * from './dialect.ts';\nexport * from './foreign-keys.ts';\nexport * from './indexes.ts';\nexport * from './policies.ts';\nexport * from './primary-keys.ts';\nexport * from './query-builders/index.ts';\nexport * from './roles.ts';\nexport * from './schema.ts';\nexport * from './sequence.ts';\nexport * from './session.ts';\nexport * from './subquery.ts';\nexport * from './table.ts';\nexport * from './unique-constraint.ts';\nexport * from './utils.ts';\nexport * from './utils/index.ts';\nexport * from './view-common.ts';\nexport * from './view.ts';\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,4BAAc,uBAAd;AACA,4BAAc,wBADd;AAEA,4BAAc,+BAFd;AAGA,4BAAc,oBAHd;AAIA,4BAAc,yBAJd;AAKA,4BAAc,8BALd;AAMA,4BAAc,yBANd;AAOA,4BAAc,0BAPd;AAQA,4BAAc,8BARd;AASA,4BAAc,sCATd;AAUA,4BAAc,uBAVd;AAWA,4BAAc,wBAXd;AAYA,4BAAc,0BAZd;AAaA,4BAAc,yBAbd;AAcA,4BAAc,0BAdd;AAeA,4BAAc,uBAfd;AAgBA,4BAAc,mCAhBd;AAiBA,4BAAc,uBAjBd;AAkBA,4BAAc,6BAlBd;AAmBA,4BAAc,6BAnBd;AAoBA,4BAAc,sBApBd;","names":[]}

View File

@@ -0,0 +1,16 @@
import { DirectusClient } from "../types/client.js";
import { StaticTokenClient } from "./types.js";
//#region src/auth/static.d.ts
/**
* Creates a client to authenticate with Directus using a static token.
*
* @param token static token.
*
* @returns A Directus static token client.
*/
declare const staticToken: (access_token: string) => <Schema>(_client: DirectusClient<Schema>) => StaticTokenClient<Schema>;
//#endregion
export { staticToken };
//# sourceMappingURL=static.d.ts.map

View File

@@ -0,0 +1,112 @@
'use client';
import { c as _c } from "react/compiler-runtime";
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Button, ConfirmationModal, toast, useConfig, useModal, useTranslation } from '@payloadcms/ui';
import { formatAdminURL } from 'payload/shared';
import * as qs from 'qs-esm';
import { Fragment, useCallback } from 'react';
const confirmResetModalSlug = 'confirm-reset-modal';
export const ResetPreferences = t0 => {
const $ = _c(9);
const {
user
} = t0;
const {
openModal
} = useModal();
const {
t
} = useTranslation();
const {
config: t1
} = useConfig();
const {
routes: t2
} = t1;
const {
api: apiRoute
} = t2;
let t3;
if ($[0] !== apiRoute || $[1] !== user) {
t3 = async () => {
if (!user) {
return;
}
const stringifiedQuery = qs.stringify({
depth: 0,
where: {
user: {
id: {
equals: user.id
}
}
}
}, {
addQueryPrefix: true
});
;
try {
const res = await fetch(formatAdminURL({
apiRoute,
path: `/payload-preferences${stringifiedQuery}`
}), {
credentials: "include",
headers: {
"Content-Type": "application/json"
},
method: "DELETE"
});
const json = await res.json();
const message = json.message;
if (res.ok) {
toast.success(message);
} else {
toast.error(message);
}
} catch (t4) {
const _err = t4;
}
};
$[0] = apiRoute;
$[1] = user;
$[2] = t3;
} else {
t3 = $[2];
}
const handleResetPreferences = t3;
let t4;
if ($[3] !== openModal) {
t4 = () => openModal(confirmResetModalSlug);
$[3] = openModal;
$[4] = t4;
} else {
t4 = $[4];
}
let t5;
if ($[5] !== handleResetPreferences || $[6] !== t || $[7] !== t4) {
t5 = _jsxs(Fragment, {
children: [_jsx("div", {
children: _jsx(Button, {
buttonStyle: "secondary",
onClick: t4,
children: t("general:resetPreferences")
})
}), _jsx(ConfirmationModal, {
body: t("general:resetPreferencesDescription"),
confirmingLabel: t("general:resettingPreferences"),
heading: t("general:resetPreferences"),
modalSlug: confirmResetModalSlug,
onConfirm: handleResetPreferences
})]
});
$[5] = handleResetPreferences;
$[6] = t;
$[7] = t4;
$[8] = t5;
} else {
t5 = $[8];
}
return t5;
};
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"paint-roller.js","sources":["../../../src/icons/paint-roller.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name PaintRoller\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTYiIGhlaWdodD0iNiIgeD0iMiIgeT0iMiIgcng9IjIiIC8+CiAgPHBhdGggZD0iTTEwIDE2di0yYTIgMiAwIDAgMSAyLTJoOGEyIDIgMCAwIDAgMi0yVjdhMiAyIDAgMCAwLTItMmgtMiIgLz4KICA8cmVjdCB3aWR0aD0iNCIgaGVpZ2h0PSI2IiB4PSI4IiB5PSIxNiIgcng9IjEiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/paint-roller\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 PaintRoller = createLucideIcon('PaintRoller', [\n ['rect', { width: '16', height: '6', x: '2', y: '2', rx: '2', key: 'jcyz7m' }],\n ['path', { d: 'M10 16v-2a2 2 0 0 1 2-2h8a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2', key: '1b9h7c' }],\n ['rect', { width: '4', height: '6', x: '8', y: '16', rx: '1', key: 'd6e7yl' }],\n]);\n\nexport default PaintRoller;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,iBAAiB,aAAe,CAAA,CAAA,CAAA;AAAA,CAAA,CAClD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC7E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA8D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC3F,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,KAAK,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC/E,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"growthbook.js","sources":["../../../../src/integrations/featureFlags/growthbook.ts"],"sourcesContent":["import type { Client } from '../../client';\nimport { defineIntegration } from '../../integration';\nimport type { Event, EventHint } from '../../types-hoist/event';\nimport type { IntegrationFn } from '../../types-hoist/integration';\nimport {\n _INTERNAL_addFeatureFlagToActiveSpan,\n _INTERNAL_copyFlagsFromScopeToEvent,\n _INTERNAL_insertFlagToScope,\n} from '../../utils/featureFlags';\nimport { fill } from '../../utils/object';\n\ninterface GrowthBookLike {\n isOn(this: GrowthBookLike, featureKey: string, ...rest: unknown[]): boolean;\n getFeatureValue(this: GrowthBookLike, featureKey: string, defaultValue: unknown, ...rest: unknown[]): unknown;\n}\n\nexport type GrowthBookClassLike = new (...args: unknown[]) => GrowthBookLike;\n\n/**\n * Sentry integration for capturing feature flag evaluations from GrowthBook.\n *\n * Only boolean results are captured at this time.\n *\n * @example\n * ```typescript\n * import { GrowthBook } from '@growthbook/growthbook';\n * import * as Sentry from '@sentry/browser'; // or '@sentry/node'\n *\n * Sentry.init({\n * dsn: 'your-dsn',\n * integrations: [\n * Sentry.growthbookIntegration({ growthbookClass: GrowthBook })\n * ]\n * });\n * ```\n */\nexport const growthbookIntegration: IntegrationFn = defineIntegration(\n ({ growthbookClass }: { growthbookClass: GrowthBookClassLike }) => {\n return {\n name: 'GrowthBook',\n\n setupOnce() {\n const proto = growthbookClass.prototype as GrowthBookLike;\n\n // Type guard and wrap isOn\n if (typeof proto.isOn === 'function') {\n fill(proto, 'isOn', _wrapAndCaptureBooleanResult);\n }\n\n // Type guard and wrap getFeatureValue\n if (typeof proto.getFeatureValue === 'function') {\n fill(proto, 'getFeatureValue', _wrapAndCaptureBooleanResult);\n }\n },\n\n processEvent(event: Event, _hint: EventHint, _client: Client): Event {\n return _INTERNAL_copyFlagsFromScopeToEvent(event);\n },\n };\n },\n);\n\nfunction _wrapAndCaptureBooleanResult(\n original: (this: GrowthBookLike, ...args: unknown[]) => unknown,\n): (this: GrowthBookLike, ...args: unknown[]) => unknown {\n return function (this: GrowthBookLike, ...args: unknown[]): unknown {\n const flagName = args[0];\n const result = original.apply(this, args);\n\n if (typeof flagName === 'string' && typeof result === 'boolean') {\n _INTERNAL_insertFlagToScope(flagName, result);\n _INTERNAL_addFeatureFlagToActiveSpan(flagName, result);\n }\n\n return result;\n };\n}\n"],"names":[],"mappings":";;;;AAkBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,qBAAqB,GAAkB,iBAAiB;AACrE,EAAE,CAAC,EAAE,eAAA,EAAiB,KAA+C;AACrE,IAAI,OAAO;AACX,MAAM,IAAI,EAAE,YAAY;;AAExB,MAAM,SAAS,GAAG;AAClB,QAAQ,MAAM,KAAA,GAAQ,eAAe,CAAC,SAAA;;AAEtC;AACA,QAAQ,IAAI,OAAO,KAAK,CAAC,IAAA,KAAS,UAAU,EAAE;AAC9C,UAAU,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,4BAA4B,CAAC;AAC3D,QAAQ;;AAER;AACA,QAAQ,IAAI,OAAO,KAAK,CAAC,eAAA,KAAoB,UAAU,EAAE;AACzD,UAAU,IAAI,CAAC,KAAK,EAAE,iBAAiB,EAAE,4BAA4B,CAAC;AACtE,QAAQ;AACR,MAAM,CAAC;;AAEP,MAAM,YAAY,CAAC,KAAK,EAAS,KAAK,EAAa,OAAO,EAAiB;AAC3E,QAAQ,OAAO,mCAAmC,CAAC,KAAK,CAAC;AACzD,MAAM,CAAC;AACP,KAAK;AACL,EAAE,CAAC;AACH;;AAEA,SAAS,4BAA4B;AACrC,EAAE,QAAQ;AACV,EAAyD;AACzD,EAAE,OAAO,WAAgC,GAAG,IAAI,EAAsB;AACtE,IAAI,MAAM,QAAA,GAAW,IAAI,CAAC,CAAC,CAAC;AAC5B,IAAI,MAAM,MAAA,GAAS,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC;;AAE7C,IAAI,IAAI,OAAO,QAAA,KAAa,QAAA,IAAY,OAAO,MAAA,KAAW,SAAS,EAAE;AACrE,MAAM,2BAA2B,CAAC,QAAQ,EAAE,MAAM,CAAC;AACnD,MAAM,oCAAoC,CAAC,QAAQ,EAAE,MAAM,CAAC;AAC5D,IAAI;;AAEJ,IAAI,OAAO,MAAM;AACjB,EAAE,CAAC;AACH;;;;"}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../../src/pg-core/columns/vector_extension/halfvec.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyPgTable } from '~/pg-core/table.ts';\nimport { getColumnNameAndConfig } from '~/utils.ts';\nimport { PgColumn, PgColumnBuilder } from '../common.ts';\n\nexport type PgHalfVectorBuilderInitial<TName extends string, TDimensions extends number> = PgHalfVectorBuilder<{\n\tname: TName;\n\tdataType: 'array';\n\tcolumnType: 'PgHalfVector';\n\tdata: number[];\n\tdriverParam: string;\n\tenumValues: undefined;\n\tdimensions: TDimensions;\n}>;\n\nexport class PgHalfVectorBuilder<T extends ColumnBuilderBaseConfig<'array', 'PgHalfVector'> & { dimensions: number }>\n\textends PgColumnBuilder<\n\t\tT,\n\t\t{ dimensions: T['dimensions'] },\n\t\t{ dimensions: T['dimensions'] }\n\t>\n{\n\tstatic override readonly [entityKind]: string = 'PgHalfVectorBuilder';\n\n\tconstructor(name: string, config: PgHalfVectorConfig<T['dimensions']>) {\n\t\tsuper(name, 'array', 'PgHalfVector');\n\t\tthis.config.dimensions = config.dimensions;\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgHalfVector<MakeColumnConfig<T, TTableName> & { dimensions: T['dimensions'] }> {\n\t\treturn new PgHalfVector<MakeColumnConfig<T, TTableName> & { dimensions: T['dimensions'] }>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig<any, any>,\n\t\t);\n\t}\n}\n\nexport class PgHalfVector<T extends ColumnBaseConfig<'array', 'PgHalfVector'> & { dimensions: number }>\n\textends PgColumn<T, { dimensions: T['dimensions'] }, { dimensions: T['dimensions'] }>\n{\n\tstatic override readonly [entityKind]: string = 'PgHalfVector';\n\n\treadonly dimensions: T['dimensions'] = this.config.dimensions;\n\n\tgetSQLType(): string {\n\t\treturn `halfvec(${this.dimensions})`;\n\t}\n\n\toverride mapToDriverValue(value: unknown): unknown {\n\t\treturn JSON.stringify(value);\n\t}\n\n\toverride mapFromDriverValue(value: string): unknown {\n\t\treturn value\n\t\t\t.slice(1, -1)\n\t\t\t.split(',')\n\t\t\t.map((v) => Number.parseFloat(v));\n\t}\n}\n\nexport interface PgHalfVectorConfig<TDimensions extends number = number> {\n\tdimensions: TDimensions;\n}\n\nexport function halfvec<D extends number>(\n\tconfig: PgHalfVectorConfig<D>,\n): PgHalfVectorBuilderInitial<'', D>;\nexport function halfvec<TName extends string, D extends number>(\n\tname: TName,\n\tconfig: PgHalfVectorConfig,\n): PgHalfVectorBuilderInitial<TName, D>;\nexport function halfvec(a: string | PgHalfVectorConfig, b?: PgHalfVectorConfig) {\n\tconst { name, config } = getColumnNameAndConfig<PgHalfVectorConfig>(a, b);\n\treturn new PgHalfVectorBuilder(name, config);\n}\n"],"mappings":"AAEA,SAAS,kBAAkB;AAE3B,SAAS,8BAA8B;AACvC,SAAS,UAAU,uBAAuB;AAYnC,MAAM,4BACJ,gBAKT;AAAA,EACC,QAA0B,UAAU,IAAY;AAAA,EAEhD,YAAY,MAAc,QAA6C;AACtE,UAAM,MAAM,SAAS,cAAc;AACnC,SAAK,OAAO,aAAa,OAAO;AAAA,EACjC;AAAA;AAAA,EAGS,MACR,OACkF;AAClF,WAAO,IAAI;AAAA,MACV;AAAA,MACA,KAAK;AAAA,IACN;AAAA,EACD;AACD;AAEO,MAAM,qBACJ,SACT;AAAA,EACC,QAA0B,UAAU,IAAY;AAAA,EAEvC,aAA8B,KAAK,OAAO;AAAA,EAEnD,aAAqB;AACpB,WAAO,WAAW,KAAK,UAAU;AAAA,EAClC;AAAA,EAES,iBAAiB,OAAyB;AAClD,WAAO,KAAK,UAAU,KAAK;AAAA,EAC5B;AAAA,EAES,mBAAmB,OAAwB;AACnD,WAAO,MACL,MAAM,GAAG,EAAE,EACX,MAAM,GAAG,EACT,IAAI,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AAAA,EAClC;AACD;AAaO,SAAS,QAAQ,GAAgC,GAAwB;AAC/E,QAAM,EAAE,MAAM,OAAO,IAAI,uBAA2C,GAAG,CAAC;AACxE,SAAO,IAAI,oBAAoB,MAAM,MAAM;AAC5C;","names":[]}

View File

@@ -0,0 +1,116 @@
import { entityKind } from "../../entity.js";
import { QueryPromise } from "../../query-promise.js";
import {
mapRelationalRow
} from "../../relations.js";
class RelationalQueryBuilder {
constructor(fullSchema, schema, tableNamesMap, table, tableConfig, dialect, session, mode) {
this.fullSchema = fullSchema;
this.schema = schema;
this.tableNamesMap = tableNamesMap;
this.table = table;
this.tableConfig = tableConfig;
this.dialect = dialect;
this.session = session;
this.mode = mode;
}
static [entityKind] = "MySqlRelationalQueryBuilder";
findMany(config) {
return new MySqlRelationalQuery(
this.fullSchema,
this.schema,
this.tableNamesMap,
this.table,
this.tableConfig,
this.dialect,
this.session,
config ? config : {},
"many",
this.mode
);
}
findFirst(config) {
return new MySqlRelationalQuery(
this.fullSchema,
this.schema,
this.tableNamesMap,
this.table,
this.tableConfig,
this.dialect,
this.session,
config ? { ...config, limit: 1 } : { limit: 1 },
"first",
this.mode
);
}
}
class MySqlRelationalQuery extends QueryPromise {
constructor(fullSchema, schema, tableNamesMap, table, tableConfig, dialect, session, config, queryMode, mode) {
super();
this.fullSchema = fullSchema;
this.schema = schema;
this.tableNamesMap = tableNamesMap;
this.table = table;
this.tableConfig = tableConfig;
this.dialect = dialect;
this.session = session;
this.config = config;
this.queryMode = queryMode;
this.mode = mode;
}
static [entityKind] = "MySqlRelationalQuery";
prepare() {
const { query, builtQuery } = this._toSQL();
return this.session.prepareQuery(
builtQuery,
void 0,
(rawRows) => {
const rows = rawRows.map((row) => mapRelationalRow(this.schema, this.tableConfig, row, query.selection));
if (this.queryMode === "first") {
return rows[0];
}
return rows;
}
);
}
_getQuery() {
const query = this.mode === "planetscale" ? this.dialect.buildRelationalQueryWithoutLateralSubqueries({
fullSchema: this.fullSchema,
schema: this.schema,
tableNamesMap: this.tableNamesMap,
table: this.table,
tableConfig: this.tableConfig,
queryConfig: this.config,
tableAlias: this.tableConfig.tsName
}) : this.dialect.buildRelationalQuery({
fullSchema: this.fullSchema,
schema: this.schema,
tableNamesMap: this.tableNamesMap,
table: this.table,
tableConfig: this.tableConfig,
queryConfig: this.config,
tableAlias: this.tableConfig.tsName
});
return query;
}
_toSQL() {
const query = this._getQuery();
const builtQuery = this.dialect.sqlToQuery(query.sql);
return { builtQuery, query };
}
/** @internal */
getSQL() {
return this._getQuery().sql;
}
toSQL() {
return this._toSQL().builtQuery;
}
execute() {
return this.prepare().execute();
}
}
export {
MySqlRelationalQuery,
RelationalQueryBuilder
};
//# sourceMappingURL=query.js.map

View File

@@ -0,0 +1,170 @@
'use strict';
const stringify = require('./lib/stringify');
const compile = require('./lib/compile');
const expand = require('./lib/expand');
const parse = require('./lib/parse');
/**
* Expand the given pattern or create a regex-compatible string.
*
* ```js
* const braces = require('braces');
* console.log(braces('{a,b,c}', { compile: true })); //=> ['(a|b|c)']
* console.log(braces('{a,b,c}')); //=> ['a', 'b', 'c']
* ```
* @param {String} `str`
* @param {Object} `options`
* @return {String}
* @api public
*/
const braces = (input, options = {}) => {
let output = [];
if (Array.isArray(input)) {
for (const pattern of input) {
const result = braces.create(pattern, options);
if (Array.isArray(result)) {
output.push(...result);
} else {
output.push(result);
}
}
} else {
output = [].concat(braces.create(input, options));
}
if (options && options.expand === true && options.nodupes === true) {
output = [...new Set(output)];
}
return output;
};
/**
* Parse the given `str` with the given `options`.
*
* ```js
* // braces.parse(pattern, [, options]);
* const ast = braces.parse('a/{b,c}/d');
* console.log(ast);
* ```
* @param {String} pattern Brace pattern to parse
* @param {Object} options
* @return {Object} Returns an AST
* @api public
*/
braces.parse = (input, options = {}) => parse(input, options);
/**
* Creates a braces string from an AST, or an AST node.
*
* ```js
* const braces = require('braces');
* let ast = braces.parse('foo/{a,b}/bar');
* console.log(stringify(ast.nodes[2])); //=> '{a,b}'
* ```
* @param {String} `input` Brace pattern or AST.
* @param {Object} `options`
* @return {Array} Returns an array of expanded values.
* @api public
*/
braces.stringify = (input, options = {}) => {
if (typeof input === 'string') {
return stringify(braces.parse(input, options), options);
}
return stringify(input, options);
};
/**
* Compiles a brace pattern into a regex-compatible, optimized string.
* This method is called by the main [braces](#braces) function by default.
*
* ```js
* const braces = require('braces');
* console.log(braces.compile('a/{b,c}/d'));
* //=> ['a/(b|c)/d']
* ```
* @param {String} `input` Brace pattern or AST.
* @param {Object} `options`
* @return {Array} Returns an array of expanded values.
* @api public
*/
braces.compile = (input, options = {}) => {
if (typeof input === 'string') {
input = braces.parse(input, options);
}
return compile(input, options);
};
/**
* Expands a brace pattern into an array. This method is called by the
* main [braces](#braces) function when `options.expand` is true. Before
* using this method it's recommended that you read the [performance notes](#performance))
* and advantages of using [.compile](#compile) instead.
*
* ```js
* const braces = require('braces');
* console.log(braces.expand('a/{b,c}/d'));
* //=> ['a/b/d', 'a/c/d'];
* ```
* @param {String} `pattern` Brace pattern
* @param {Object} `options`
* @return {Array} Returns an array of expanded values.
* @api public
*/
braces.expand = (input, options = {}) => {
if (typeof input === 'string') {
input = braces.parse(input, options);
}
let result = expand(input, options);
// filter out empty strings if specified
if (options.noempty === true) {
result = result.filter(Boolean);
}
// filter out duplicates if specified
if (options.nodupes === true) {
result = [...new Set(result)];
}
return result;
};
/**
* Processes a brace pattern and returns either an expanded array
* (if `options.expand` is true), a highly optimized regex-compatible string.
* This method is called by the main [braces](#braces) function.
*
* ```js
* const braces = require('braces');
* console.log(braces.create('user-{200..300}/project-{a,b,c}-{1..10}'))
* //=> 'user-(20[0-9]|2[1-9][0-9]|300)/project-(a|b|c)-([1-9]|10)'
* ```
* @param {String} `pattern` Brace pattern
* @param {Object} `options`
* @return {Array} Returns an array of expanded values.
* @api public
*/
braces.create = (input, options = {}) => {
if (input === '' || input.length < 3) {
return [input];
}
return options.expand !== true
? braces.compile(input, options)
: braces.expand(input, options);
};
/**
* Expose "braces"
*/
module.exports = braces;

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/views/NotFound/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAA;AACpC,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAK/E,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,eAAO,MAAM,4BAA4B,+BAEtC;IACD,MAAM,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,eAAe,CAAA;IAClD,MAAM,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,CAAA;KAAE,CAAA;CAC9C,KAAG,OAAO,CAAC,QAAQ,CAUnB,CAAA;AAED,eAAO,MAAM,YAAY,oGAKtB;IACD,MAAM,EAAE,OAAO,CAAC,eAAe,CAAC,CAAA;IAChC,SAAS,EAAE,SAAS,CAAA;IACpB,MAAM,EAAE,OAAO,CAAC;QACd,QAAQ,EAAE,MAAM,EAAE,CAAA;KACnB,CAAC,CAAA;IACF,YAAY,EAAE,OAAO,CAAC;QACpB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,CAAA;KACjC,CAAC,CAAA;CACH,+BAkDA,CAAA;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,oBAAoB,qBAEvD"}

View File

@@ -0,0 +1,12 @@
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: npm/events
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

View File

@@ -0,0 +1,121 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const { STAGE_ADVANCED } = require("../OptimizationStages");
const createSchemaValidation = require("../util/create-schema-validation");
/** @typedef {import("../../declarations/plugins/optimize/MinChunkSizePlugin").MinChunkSizePluginOptions} MinChunkSizePluginOptions */
/** @typedef {import("../Chunk")} Chunk */
/** @typedef {import("../Compiler")} Compiler */
const validate = createSchemaValidation(
require("../../schemas/plugins/optimize/MinChunkSizePlugin.check"),
() => require("../../schemas/plugins/optimize/MinChunkSizePlugin.json"),
{
name: "Min Chunk Size Plugin",
baseDataPath: "options"
}
);
const PLUGIN_NAME = "MinChunkSizePlugin";
class MinChunkSizePlugin {
/**
* @param {MinChunkSizePluginOptions} options options object
*/
constructor(options) {
validate(options);
/** @type {MinChunkSizePluginOptions} */
this.options = options;
}
/**
* Apply the plugin
* @param {Compiler} compiler the compiler instance
* @returns {void}
*/
apply(compiler) {
const options = this.options;
const minChunkSize = options.minChunkSize;
compiler.hooks.compilation.tap(PLUGIN_NAME, (compilation) => {
compilation.hooks.optimizeChunks.tap(
{
name: PLUGIN_NAME,
stage: STAGE_ADVANCED
},
(chunks) => {
const chunkGraph = compilation.chunkGraph;
const equalOptions = {
chunkOverhead: 1,
entryChunkMultiplicator: 1
};
/** @type {Map<Chunk, number>} */
const chunkSizesMap = new Map();
/** @type {[Chunk, Chunk][]} */
const combinations = [];
/** @type {Chunk[]} */
const smallChunks = [];
/** @type {Chunk[]} */
const visitedChunks = [];
for (const a of chunks) {
// check if one of the chunks sizes is smaller than the minChunkSize
// and filter pairs that can NOT be integrated!
if (chunkGraph.getChunkSize(a, equalOptions) < minChunkSize) {
smallChunks.push(a);
for (const b of visitedChunks) {
if (chunkGraph.canChunksBeIntegrated(b, a)) {
combinations.push([b, a]);
}
}
} else {
for (const b of smallChunks) {
if (chunkGraph.canChunksBeIntegrated(b, a)) {
combinations.push([b, a]);
}
}
}
chunkSizesMap.set(a, chunkGraph.getChunkSize(a, options));
visitedChunks.push(a);
}
const sortedSizeFilteredExtendedPairCombinations = combinations
.map((pair) => {
// extend combination pairs with size and integrated size
const a = /** @type {number} */ (chunkSizesMap.get(pair[0]));
const b = /** @type {number} */ (chunkSizesMap.get(pair[1]));
const ab = chunkGraph.getIntegratedChunksSize(
pair[0],
pair[1],
options
);
/** @type {[number, number, Chunk, Chunk]} */
const extendedPair = [a + b - ab, ab, pair[0], pair[1]];
return extendedPair;
})
.sort((a, b) => {
// sadly javascript does an in place sort here
// sort by size
const diff = b[0] - a[0];
if (diff !== 0) return diff;
return a[1] - b[1];
});
if (sortedSizeFilteredExtendedPairCombinations.length === 0) return;
const pair = sortedSizeFilteredExtendedPairCombinations[0];
chunkGraph.integrateChunks(pair[2], pair[3]);
compilation.chunks.delete(pair[3]);
return true;
}
);
});
}
}
module.exports = MinChunkSizePlugin;

View File

@@ -0,0 +1,42 @@
export { httpIntegration } from './integrations/http';
export { nativeNodeFetchIntegration } from './integrations/node-fetch';
export { fsIntegration } from './integrations/fs';
export { expressIntegration, expressErrorHandler, setupExpressErrorHandler } from './integrations/tracing/express';
export { fastifyIntegration, setupFastifyErrorHandler } from './integrations/tracing/fastify';
export { graphqlIntegration } from './integrations/tracing/graphql';
export { kafkaIntegration } from './integrations/tracing/kafka';
export { lruMemoizerIntegration } from './integrations/tracing/lrumemoizer';
export { mongoIntegration } from './integrations/tracing/mongo';
export { mongooseIntegration } from './integrations/tracing/mongoose';
export { mysqlIntegration } from './integrations/tracing/mysql';
export { mysql2Integration } from './integrations/tracing/mysql2';
export { redisIntegration } from './integrations/tracing/redis';
export { postgresIntegration } from './integrations/tracing/postgres';
export { postgresJsIntegration } from './integrations/tracing/postgresjs';
export { prismaIntegration } from './integrations/tracing/prisma';
export { hapiIntegration, setupHapiErrorHandler } from './integrations/tracing/hapi';
export { honoIntegration, setupHonoErrorHandler } from './integrations/tracing/hono';
export { koaIntegration, setupKoaErrorHandler } from './integrations/tracing/koa';
export { connectIntegration, setupConnectErrorHandler } from './integrations/tracing/connect';
export { knexIntegration } from './integrations/tracing/knex';
export { tediousIntegration } from './integrations/tracing/tedious';
export { genericPoolIntegration } from './integrations/tracing/genericPool';
export { dataloaderIntegration } from './integrations/tracing/dataloader';
export { amqplibIntegration } from './integrations/tracing/amqplib';
export { vercelAIIntegration } from './integrations/tracing/vercelai';
export { openAIIntegration } from './integrations/tracing/openai';
export { anthropicAIIntegration } from './integrations/tracing/anthropic-ai';
export { googleGenAIIntegration } from './integrations/tracing/google-genai';
export { langChainIntegration } from './integrations/tracing/langchain';
export { langGraphIntegration } from './integrations/tracing/langgraph';
export { launchDarklyIntegration, buildLaunchDarklyFlagUsedHandler, openFeatureIntegration, OpenFeatureIntegrationHook, statsigIntegration, unleashIntegration, growthbookIntegration, } from './integrations/featureFlagShims';
export { firebaseIntegration } from './integrations/tracing/firebase';
export { init, getDefaultIntegrations, getDefaultIntegrationsWithoutPerformance, initWithoutDefaultIntegrations, } from './sdk';
export { initOpenTelemetry, preloadOpenTelemetry } from './sdk/initOtel';
export { getAutoPerformanceIntegrations } from './integrations/tracing';
export { NodeOptions } from './types';
export { setOpenTelemetryContextAsyncContextStrategy as setNodeAsyncContextStrategy, } from '@sentry/opentelemetry';
export { addBreadcrumb, isInitialized, isEnabled, getGlobalScope, lastEventId, close, createTransport, flush, SDK_VERSION, getSpanStatusFromHttpCode, setHttpStatus, captureCheckIn, withMonitor, requestDataIntegration, functionToStringIntegration, inboundFiltersIntegration, eventFiltersIntegration, linkedErrorsIntegration, addEventProcessor, setContext, setExtra, setExtras, setTag, setTags, setUser, setConversationId, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, setCurrentClient, Scope, setMeasurement, getSpanDescendants, parameterize, getClient, getCurrentScope, getIsolationScope, getTraceData, getTraceMetaTags, httpHeadersToSpanAttributes, winterCGHeadersToDict, continueTrace, withScope, withIsolationScope, captureException, captureEvent, captureMessage, captureFeedback, captureConsoleIntegration, dedupeIntegration, extraErrorDataIntegration, rewriteFramesIntegration, startSession, captureSession, endSession, addIntegration, startSpan, startSpanManual, startInactiveSpan, startNewTrace, suppressTracing, getActiveSpan, withActiveSpan, getRootSpan, spanToJSON, spanToTraceHeader, spanToBaggageHeader, trpcMiddleware, updateSpanName, supabaseIntegration, instrumentSupabaseClient, instrumentOpenAiClient, instrumentAnthropicAiClient, instrumentGoogleGenAIClient, zodErrorsIntegration, profiler, consoleLoggingIntegration, createConsolaReporter, consoleIntegration, wrapMcpServerWithSentry, featureFlagsIntegration, createLangChainCallbackHandler, instrumentLangGraph, instrumentStateGraphCompile, } from '@sentry/core';
export { Breadcrumb, BreadcrumbHint, PolymorphicRequest, RequestEventData, SdkInfo, Event, EventHint, ErrorEvent, Exception, Session, SeverityLevel, StackFrame, Stacktrace, Thread, User, Span, Metric, Log, LogSeverityLevel, FeatureFlagsIntegration, ExclusiveEventHintOrCaptureContext, CaptureContext, } from '@sentry/core';
export { logger, metrics, httpServerIntegration, httpServerSpansIntegration, nodeContextIntegration, contextLinesIntegration, localVariablesIntegration, modulesIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, anrIntegration, disableAnrDetectionForCallback, spotlightIntegration, childProcessIntegration, processSessionIntegration, pinoIntegration, createSentryWinstonTransport, SentryContextManager, systemErrorIntegration, generateInstrumentOnce, getSentryRelease, defaultStackParser, createGetModuleFromFilename, makeNodeTransport, NodeClient, cron, NODE_VERSION, validateOpenTelemetrySetup, } from '@sentry/node-core';
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,24 @@
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.BatchSpanProcessor = void 0;
const BatchSpanProcessorBase_1 = require("../../../export/BatchSpanProcessorBase");
class BatchSpanProcessor extends BatchSpanProcessorBase_1.BatchSpanProcessorBase {
onShutdown() { }
}
exports.BatchSpanProcessor = BatchSpanProcessor;
//# sourceMappingURL=BatchSpanProcessor.js.map

View File

@@ -0,0 +1,12 @@
/**
* Returns an environment setting value determined by Vercel's `VERCEL_ENV` environment variable.
*
* @param isClient Flag to indicate whether to use the `NEXT_PUBLIC_` prefixed version of the environment variable.
*/
function getVercelEnv(isClient) {
const vercelEnvVar = isClient ? process.env.NEXT_PUBLIC_VERCEL_ENV : process.env.VERCEL_ENV;
return vercelEnvVar ? `vercel-${vercelEnvVar}` : undefined;
}
export { getVercelEnv };
//# sourceMappingURL=getVercelEnv.js.map

View File

@@ -0,0 +1,26 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = v1ToV6;
var _parse = _interopRequireDefault(require("./parse.js"));
var _stringify = require("./stringify.js");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
/**
* Convert a v1 UUID to a v6 UUID
*
* @param {string|Uint8Array} uuid - The v1 UUID to convert to v6
* @returns {string|Uint8Array} The v6 UUID as the same type as the `uuid` arg
* (string or Uint8Array)
*/
function v1ToV6(uuid) {
const v1Bytes = typeof uuid === 'string' ? (0, _parse.default)(uuid) : uuid;
const v6Bytes = _v1ToV6(v1Bytes);
return typeof uuid === 'string' ? (0, _stringify.unsafeStringify)(v6Bytes) : v6Bytes;
}
// Do the field transformation needed for v1 -> v6
function _v1ToV6(v1Bytes, randomize = false) {
return Uint8Array.of((v1Bytes[6] & 0x0f) << 4 | v1Bytes[7] >> 4 & 0x0f, (v1Bytes[7] & 0x0f) << 4 | (v1Bytes[4] & 0xf0) >> 4, (v1Bytes[4] & 0x0f) << 4 | (v1Bytes[5] & 0xf0) >> 4, (v1Bytes[5] & 0x0f) << 4 | (v1Bytes[0] & 0xf0) >> 4, (v1Bytes[0] & 0x0f) << 4 | (v1Bytes[1] & 0xf0) >> 4, (v1Bytes[1] & 0x0f) << 4 | (v1Bytes[2] & 0xf0) >> 4, 0x60 | v1Bytes[2] & 0x0f, v1Bytes[3], v1Bytes[8], v1Bytes[9], v1Bytes[10], v1Bytes[11], v1Bytes[12], v1Bytes[13], v1Bytes[14], v1Bytes[15]);
}

View File

@@ -0,0 +1,3 @@
{
"$ref": "../../WebpackOptions.json#/definitions/CssModuleGeneratorOptions"
}

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