From 9fba299b30d0e5c2be774974543a15cb2a6167b7 Mon Sep 17 00:00:00 2001 From: Carlos Perez Date: Mon, 23 Sep 2024 13:24:02 -0700 Subject: [PATCH 001/120] Adding `portfolio` (Microsoft Project item type) to the list of non-fileextension based filetype icons. --- packages/react-file-type-icons/src/FileIconType.ts | 3 ++- packages/react-file-type-icons/src/FileTypeIconMap.ts | 1 + packages/react-file-type-icons/src/getFileTypeIconProps.ts | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/react-file-type-icons/src/FileIconType.ts b/packages/react-file-type-icons/src/FileIconType.ts index 8e8b92b2651239..afed4fef159a17 100644 --- a/packages/react-file-type-icons/src/FileIconType.ts +++ b/packages/react-file-type-icons/src/FileIconType.ts @@ -25,6 +25,7 @@ export enum FileIconType { loopworkspace = 17, planner = 18, todoItem = 19, + portfolio = 20, } -export type FileIconTypeInput = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19; +export type FileIconTypeInput = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20; diff --git a/packages/react-file-type-icons/src/FileTypeIconMap.ts b/packages/react-file-type-icons/src/FileTypeIconMap.ts index 131ccaf90cbcfc..1a6956ec6f5b87 100644 --- a/packages/react-file-type-icons/src/FileTypeIconMap.ts +++ b/packages/react-file-type-icons/src/FileTypeIconMap.ts @@ -407,6 +407,7 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[] } } = { photo360: {}, picturesfolder: {}, planner: {}, + portfolio: {}, potx: { extensions: ['pot', 'potm', 'potx'], }, diff --git a/packages/react-file-type-icons/src/getFileTypeIconProps.ts b/packages/react-file-type-icons/src/getFileTypeIconProps.ts index 2bf8d49d07809e..30fbb13a0eded0 100644 --- a/packages/react-file-type-icons/src/getFileTypeIconProps.ts +++ b/packages/react-file-type-icons/src/getFileTypeIconProps.ts @@ -23,6 +23,7 @@ const PLAYLIST = 'playlist'; const LOOP_WORKSPACE = 'loopworkspace'; const TODOITEM = 'todoitem'; const PLANNER = 'planner'; +const PORTFOLIO = 'portfolio' export const DEFAULT_ICON_SIZE: FileTypeIconSize = 16; export type FileTypeIconSize = 16 | 20 | 24 | 32 | 40 | 48 | 64 | 96; @@ -155,6 +156,9 @@ export function getFileTypeIconNameFromExtensionOrType( case FileIconType.todoItem: iconBaseName = TODOITEM; break; + case FileIconType.portfolio: + iconBaseName = PORTFOLIO; + break; } } return iconBaseName || GENERIC_FILE; From 63f928c8f0ad9e9912c4f1f3eae8851a62c6c11c Mon Sep 17 00:00:00 2001 From: Carlos Perez Date: Mon, 23 Sep 2024 14:43:43 -0700 Subject: [PATCH 002/120] More filetype support. --- packages/react-file-type-icons/src/FileTypeIconMap.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/react-file-type-icons/src/FileTypeIconMap.ts b/packages/react-file-type-icons/src/FileTypeIconMap.ts index 1a6956ec6f5b87..e8fb28a7e224eb 100644 --- a/packages/react-file-type-icons/src/FileTypeIconMap.ts +++ b/packages/react-file-type-icons/src/FileTypeIconMap.ts @@ -258,6 +258,9 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[] } } = { contact: { extensions: ['vcf'], }, + copilot: { + extensions: ['copilot'], + } /* css: {}, not broken out yet, snapping to 'code' for now */ csv: { extensions: ['csv'], From 3ccf0e36267326844db861ef1b2417c8c2ee15b7 Mon Sep 17 00:00:00 2001 From: Carlos Perez Date: Wed, 25 Sep 2024 13:50:40 -0700 Subject: [PATCH 003/120] update CDN url and typo --- packages/react-file-type-icons/src/FileTypeIconMap.ts | 2 +- packages/style-utilities/src/cdn.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-file-type-icons/src/FileTypeIconMap.ts b/packages/react-file-type-icons/src/FileTypeIconMap.ts index e8fb28a7e224eb..26e75ff92d0595 100644 --- a/packages/react-file-type-icons/src/FileTypeIconMap.ts +++ b/packages/react-file-type-icons/src/FileTypeIconMap.ts @@ -260,7 +260,7 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[] } } = { }, copilot: { extensions: ['copilot'], - } + }, /* css: {}, not broken out yet, snapping to 'code' for now */ csv: { extensions: ['csv'], diff --git a/packages/style-utilities/src/cdn.ts b/packages/style-utilities/src/cdn.ts index bd32b80c3814d5..673c6e235641f9 100644 --- a/packages/style-utilities/src/cdn.ts +++ b/packages/style-utilities/src/cdn.ts @@ -1 +1 @@ -export const FLUENT_CDN_BASE_URL = 'https://res.cdn.office.net/files/fabric-cdn-prod_20240805.001'; +export const FLUENT_CDN_BASE_URL = 'https://res.cdn.office.net/files/fabric-cdn-prod_20240925.001'; From fab6a3af3069f06b4e3218555e85ce867b1b5ec1 Mon Sep 17 00:00:00 2001 From: Carlos Perez Date: Wed, 25 Sep 2024 14:43:58 -0700 Subject: [PATCH 004/120] yarn change --- ...le-type-icons-4b02a3cb-433c-4e04-a104-ccd0c48b49b4.json | 7 +++++++ ...yle-utilities-c0995633-6083-4fb4-a35e-135530e2158a.json | 7 +++++++ 2 files changed, 14 insertions(+) create mode 100644 change/@fluentui-react-file-type-icons-4b02a3cb-433c-4e04-a104-ccd0c48b49b4.json create mode 100644 change/@fluentui-style-utilities-c0995633-6083-4fb4-a35e-135530e2158a.json diff --git a/change/@fluentui-react-file-type-icons-4b02a3cb-433c-4e04-a104-ccd0c48b49b4.json b/change/@fluentui-react-file-type-icons-4b02a3cb-433c-4e04-a104-ccd0c48b49b4.json new file mode 100644 index 00000000000000..8855bce398d8d0 --- /dev/null +++ b/change/@fluentui-react-file-type-icons-4b02a3cb-433c-4e04-a104-ccd0c48b49b4.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "\u0016Update to filetype icons - Sep 2024", + "packageName": "@fluentui/react-file-type-icons", + "email": "caperez@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-style-utilities-c0995633-6083-4fb4-a35e-135530e2158a.json b/change/@fluentui-style-utilities-c0995633-6083-4fb4-a35e-135530e2158a.json new file mode 100644 index 00000000000000..a4a450f6729f69 --- /dev/null +++ b/change/@fluentui-style-utilities-c0995633-6083-4fb4-a35e-135530e2158a.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "Update to filetype icons - Sep 2024", + "packageName": "@fluentui/style-utilities", + "email": "caperez@microsoft.com", + "dependentChangeType": "patch" +} From 55294b5bdf5c5f067342d5579b875e9998fe4b06 Mon Sep 17 00:00:00 2001 From: Carlos Perez Date: Wed, 25 Sep 2024 22:10:48 -0700 Subject: [PATCH 005/120] API update (from yarn nx run-many -t build) --- packages/style-utilities/etc/style-utilities.api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/style-utilities/etc/style-utilities.api.md b/packages/style-utilities/etc/style-utilities.api.md index 44b865d252b05e..ac18c4a79b52b7 100644 --- a/packages/style-utilities/etc/style-utilities.api.md +++ b/packages/style-utilities/etc/style-utilities.api.md @@ -84,7 +84,7 @@ export { DefaultPalette } export const EdgeChromiumHighContrastSelector = "@media screen and (-ms-high-contrast: active), screen and (forced-colors: active)"; // @public (undocumented) -export const FLUENT_CDN_BASE_URL = "https://res.cdn.office.net/files/fabric-cdn-prod_20240805.001"; +export const FLUENT_CDN_BASE_URL = "https://res.cdn.office.net/files/fabric-cdn-prod_20240925.001"; // @public export function focusClear(): IRawStyle; From bbeb40a341ebe047ef1cb2f79f83d62bea99c24c Mon Sep 17 00:00:00 2001 From: Carlos Perez Date: Thu, 26 Sep 2024 08:40:00 -0700 Subject: [PATCH 006/120] Ran `yarn nx format` --- .../react-file-type-icons/src/FileIconType.ts | 22 ++++++++++++++++++- .../src/getFileTypeIconProps.ts | 6 ++--- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/packages/react-file-type-icons/src/FileIconType.ts b/packages/react-file-type-icons/src/FileIconType.ts index afed4fef159a17..edc2668d81b45d 100644 --- a/packages/react-file-type-icons/src/FileIconType.ts +++ b/packages/react-file-type-icons/src/FileIconType.ts @@ -28,4 +28,24 @@ export enum FileIconType { portfolio = 20, } -export type FileIconTypeInput = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20; +export type FileIconTypeInput = + | 1 + | 2 + | 3 + | 4 + | 5 + | 6 + | 7 + | 8 + | 9 + | 10 + | 11 + | 12 + | 13 + | 14 + | 15 + | 16 + | 17 + | 18 + | 19 + | 20; diff --git a/packages/react-file-type-icons/src/getFileTypeIconProps.ts b/packages/react-file-type-icons/src/getFileTypeIconProps.ts index 30fbb13a0eded0..a7da544dca1d42 100644 --- a/packages/react-file-type-icons/src/getFileTypeIconProps.ts +++ b/packages/react-file-type-icons/src/getFileTypeIconProps.ts @@ -23,7 +23,7 @@ const PLAYLIST = 'playlist'; const LOOP_WORKSPACE = 'loopworkspace'; const TODOITEM = 'todoitem'; const PLANNER = 'planner'; -const PORTFOLIO = 'portfolio' +const PORTFOLIO = 'portfolio'; export const DEFAULT_ICON_SIZE: FileTypeIconSize = 16; export type FileTypeIconSize = 16 | 20 | 24 | 32 | 40 | 48 | 64 | 96; @@ -157,8 +157,8 @@ export function getFileTypeIconNameFromExtensionOrType( iconBaseName = TODOITEM; break; case FileIconType.portfolio: - iconBaseName = PORTFOLIO; - break; + iconBaseName = PORTFOLIO; + break; } } return iconBaseName || GENERIC_FILE; From 280fe2c926cc53ad7f9e1f52c4ab99e476671bca Mon Sep 17 00:00:00 2001 From: Carlos Perez Date: Sat, 28 Sep 2024 22:35:12 -0700 Subject: [PATCH 007/120] Changing FileIconType-based icon searching to use the same scalable method used for file extensions --- .../react-file-type-icons/src/FileIconType.ts | 59 +++------- .../src/FileTypeIconMap.ts | 82 +++++++++---- .../src/getFileTypeIconProps.ts | 110 ++++-------------- 3 files changed, 104 insertions(+), 147 deletions(-) diff --git a/packages/react-file-type-icons/src/FileIconType.ts b/packages/react-file-type-icons/src/FileIconType.ts index edc2668d81b45d..5dc6d530d117aa 100644 --- a/packages/react-file-type-icons/src/FileIconType.ts +++ b/packages/react-file-type-icons/src/FileIconType.ts @@ -7,45 +7,24 @@ export enum FileIconType { docset = 1, // Start at 1 so it will evaluate as "truthy" - folder = 2, - genericFile = 3, - listItem = 4, - sharedFolder = 5, - multiple = 6, - stream = 7, - news = 8, - desktopFolder = 9, - documentsFolder = 10, - picturesFolder = 11, - linkedFolder = 12, - list = 13, - form = 14, - sway = 15, - playlist = 16, - loopworkspace = 17, - planner = 18, - todoItem = 19, - portfolio = 20, + folder, + genericFile, + listItem, + sharedFolder, + multiple, + stream, + news, + desktopFolder, + documentsFolder, + picturesFolder, + linkedFolder, + list, + form, + sway, + playlist, + loopworkspace, + planner, + todoItem, + portfolio, } -export type FileIconTypeInput = - | 1 - | 2 - | 3 - | 4 - | 5 - | 6 - | 7 - | 8 - | 9 - | 10 - | 11 - | 12 - | 13 - | 14 - | 15 - | 16 - | 17 - | 18 - | 19 - | 20; diff --git a/packages/react-file-type-icons/src/FileTypeIconMap.ts b/packages/react-file-type-icons/src/FileTypeIconMap.ts index 26e75ff92d0595..bc6987c06b3940 100644 --- a/packages/react-file-type-icons/src/FileTypeIconMap.ts +++ b/packages/react-file-type-icons/src/FileTypeIconMap.ts @@ -1,9 +1,11 @@ +import { FileIconType } from './FileIconType'; + /** * Enumeration of icon file names, and what extensions they map to. * Please keep items alphabetical. Items without extensions may require specific logic in the code to map. * Always use getFileTypeIconProps to get the most up-to-date icon at the right pixel density. */ -export const FileTypeIconMap: { [key: string]: { extensions?: string[] } } = { +export const FileTypeIconMap: { [key: string]: { extensions?: string[], types?: FileIconType[] } } = { accdb: { extensions: ['accdb', 'mdb'], }, @@ -268,9 +270,15 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[] } } = { designer: { extensions: ['design'], }, - desktopfolder: {}, - docset: {}, - documentsfolder: {}, + desktopfolder: { + types: [FileIconType.desktopFolder] + }, + docset: { + types: [FileIconType.docset] + }, + documentsfolder: { + types: [FileIconType.documentsFolder] + }, docx: { extensions: ['doc', 'docm', 'docx', 'docb'], }, @@ -283,13 +291,18 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[] } } = { exe: { extensions: ['application', 'appref-ms', 'apk', 'app', 'appx', 'exe', 'ipa', 'msi', 'xap'], }, - favoritesfolder: {}, - folder: {}, + folder: { + types: [FileIconType.folder] + }, font: { extensions: ['ttf', 'otf', 'woff'], }, - form: {}, - genericfile: {}, + form: { + types: [FileIconType.form] + }, + genericfile: { + types: [FileIconType.genericFile] + }, html: { extensions: ['htm', 'html', 'mht', 'mhtml'], }, @@ -299,16 +312,24 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[] } } = { link: { extensions: ['lnk', 'link', 'url', 'website', 'webloc'], }, - linkedfolder: {}, - listitem: {}, + linkedfolder: { + types: [FileIconType.linkedFolder] + }, + listitem: { + types: [FileIconType.listItem] + }, loop: { extensions: ['fluid', 'loop', 'note'], }, - loopworkspace: {}, + loopworkspace: { + types: [FileIconType.loopworkspace] + }, officescript: { extensions: ['osts'], }, - splist: {}, + splist: { + types: [FileIconType.list] + }, mcworld: { extensions: ['mcworld'], }, @@ -351,7 +372,9 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[] } } = { mpt: { extensions: ['mpt'], }, - multiple: {}, + multiple: { + types: [FileIconType.multiple] + }, one: { // This is a partial OneNote page or section export. Not whole notebooks, see "onetoc" extensions: ['one'], @@ -408,9 +431,15 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[] } } = { ], }, photo360: {}, - picturesfolder: {}, - planner: {}, - portfolio: {}, + picturesfolder: { + types: [FileIconType.picturesFolder] + }, + planner: { + types: [FileIconType.planner] + }, + portfolio: { + types: [FileIconType.portfolio] + }, potx: { extensions: ['pot', 'potm', 'potx'], }, @@ -432,16 +461,24 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[] } } = { spo: { extensions: ['aspx'], }, - sponews: {}, + sponews: { + types: [FileIconType.news] + }, spreadsheet: { extensions: ['odc', 'ods', 'gsheet', 'numbers', 'tsv'], }, rtf: { extensions: ['epub', 'gdoc', 'odt', 'rtf', 'wri', 'pages'], }, - sharedfolder: {}, - playlist: {}, - sway: {}, + sharedfolder: { + types: [FileIconType.sharedFolder] + }, + playlist: { + types: [FileIconType.playlist] + }, + sway: { + types: [FileIconType.sway] + }, sysfile: { extensions: [ 'bak', @@ -475,7 +512,9 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[] } } = { 'xll', ], }, - todoitem: {}, + todoitem: { + types: [FileIconType.todoItem] + }, txt: { extensions: ['dif', 'diff', 'readme', 'out', 'plist', 'properties', 'text', 'txt'], }, @@ -508,6 +547,7 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[] } } = { ], }, video: { + types: [FileIconType.stream], extensions: [ '3g2', '3gp', diff --git a/packages/react-file-type-icons/src/getFileTypeIconProps.ts b/packages/react-file-type-icons/src/getFileTypeIconProps.ts index a7da544dca1d42..e4011e1fd33bb5 100644 --- a/packages/react-file-type-icons/src/getFileTypeIconProps.ts +++ b/packages/react-file-type-icons/src/getFileTypeIconProps.ts @@ -1,29 +1,10 @@ import { FileTypeIconMap } from './FileTypeIconMap'; import { FileIconType } from './FileIconType'; -import type { FileIconTypeInput } from './FileIconType'; let _extensionToIconName: { [key: string]: string }; +let _typeToIconName: { [key:number]: string}; const GENERIC_FILE = 'genericfile'; -const FOLDER = 'folder'; -const SHARED_FOLDER = 'sharedfolder'; -const DOCSET_FOLDER = 'docset'; -const LIST_ITEM = 'listitem'; -const LIST = 'splist'; -const MULTIPLE_ITEMS = 'multiple'; -const NEWS = 'sponews'; -const STREAM = 'video'; -const DESKTOP_FOLDER = 'desktopfolder'; -const DOCUMENTS_FOLDER = 'documentsfolder'; -const PICTURES_FOLDER = 'picturesfolder'; -const LINKED_FOLDER = 'linkedfolder'; -const FORM = 'form'; -const SWAY = 'sway'; -const PLAYLIST = 'playlist'; -const LOOP_WORKSPACE = 'loopworkspace'; -const TODOITEM = 'todoitem'; -const PLANNER = 'planner'; -const PORTFOLIO = 'portfolio'; export const DEFAULT_ICON_SIZE: FileTypeIconSize = 16; export type FileTypeIconSize = 16 | 20 | 24 | 32 | 40 | 48 | 64 | 96; @@ -41,7 +22,7 @@ export interface IFileTypeIconOptions { * file type icons that are not associated with a file extension, * such as folder. */ - type?: FileIconTypeInput; + type?: FileIconType; /** * The size of the icon in pixels. * @default 16 @@ -85,13 +66,11 @@ export function getFileTypeIconNameFromExtensionOrType( _extensionToIconName = {}; for (const iconName in FileTypeIconMap) { - if (FileTypeIconMap.hasOwnProperty(iconName)) { - const extensions = FileTypeIconMap[iconName].extensions; + const extensions = FileTypeIconMap[iconName].extensions; - if (extensions) { - for (let i = 0; i < extensions.length; i++) { - _extensionToIconName[extensions[i]] = iconName; - } + if (extensions) { + for (let i = 0; i < extensions.length; i++) { + _extensionToIconName[extensions[i]] = iconName; } } } @@ -100,68 +79,27 @@ export function getFileTypeIconNameFromExtensionOrType( // Strip periods, force lowercase. extension = extension.replace('.', '').toLowerCase(); return _extensionToIconName[extension] || GENERIC_FILE; + } else if (type) { - switch (type) { - case FileIconType.docset: - iconBaseName = DOCSET_FOLDER; - break; - case FileIconType.folder: - iconBaseName = FOLDER; - break; - case FileIconType.listItem: - iconBaseName = LIST_ITEM; - break; - case FileIconType.sharedFolder: - iconBaseName = SHARED_FOLDER; - break; - case FileIconType.stream: - iconBaseName = STREAM; - break; - case FileIconType.multiple: - iconBaseName = MULTIPLE_ITEMS; - break; - case FileIconType.news: - iconBaseName = NEWS; - break; - case FileIconType.desktopFolder: - iconBaseName = DESKTOP_FOLDER; - break; - case FileIconType.documentsFolder: - iconBaseName = DOCUMENTS_FOLDER; - break; - case FileIconType.picturesFolder: - iconBaseName = PICTURES_FOLDER; - break; - case FileIconType.linkedFolder: - iconBaseName = LINKED_FOLDER; - break; - case FileIconType.list: - iconBaseName = LIST; - break; - case FileIconType.form: - iconBaseName = FORM; - break; - case FileIconType.sway: - iconBaseName = SWAY; - break; - case FileIconType.playlist: - iconBaseName = PLAYLIST; - break; - case FileIconType.loopworkspace: - iconBaseName = LOOP_WORKSPACE; - break; - case FileIconType.planner: - iconBaseName = PLANNER; - break; - case FileIconType.todoItem: - iconBaseName = TODOITEM; - break; - case FileIconType.portfolio: - iconBaseName = PORTFOLIO; - break; + + if (!_typeToIconName) { + _typeToIconName = {}; + + for (const iconName in FileTypeIconMap) { + const types = FileTypeIconMap[iconName].types; + + if (types) { + for (let i = 0; i < types.length; i++) { + _typeToIconName[types[i]] = iconName + } + } + } } + + return _typeToIconName[type] || GENERIC_FILE; } - return iconBaseName || GENERIC_FILE; + + return GENERIC_FILE; } export function getFileTypeIconSuffix( From d9cc6569b0931fba8cf12d71007bf8c32a1e7b51 Mon Sep 17 00:00:00 2001 From: Carlos Perez Date: Mon, 30 Sep 2024 10:24:55 -0700 Subject: [PATCH 008/120] removing stray outdated yarn change files --- ...le-type-icons-4b02a3cb-433c-4e04-a104-ccd0c48b49b4.json | 7 ------- ...yle-utilities-c0995633-6083-4fb4-a35e-135530e2158a.json | 7 ------- 2 files changed, 14 deletions(-) delete mode 100644 change/@fluentui-react-file-type-icons-4b02a3cb-433c-4e04-a104-ccd0c48b49b4.json delete mode 100644 change/@fluentui-style-utilities-c0995633-6083-4fb4-a35e-135530e2158a.json diff --git a/change/@fluentui-react-file-type-icons-4b02a3cb-433c-4e04-a104-ccd0c48b49b4.json b/change/@fluentui-react-file-type-icons-4b02a3cb-433c-4e04-a104-ccd0c48b49b4.json deleted file mode 100644 index 8855bce398d8d0..00000000000000 --- a/change/@fluentui-react-file-type-icons-4b02a3cb-433c-4e04-a104-ccd0c48b49b4.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "minor", - "comment": "\u0016Update to filetype icons - Sep 2024", - "packageName": "@fluentui/react-file-type-icons", - "email": "caperez@microsoft.com", - "dependentChangeType": "patch" -} diff --git a/change/@fluentui-style-utilities-c0995633-6083-4fb4-a35e-135530e2158a.json b/change/@fluentui-style-utilities-c0995633-6083-4fb4-a35e-135530e2158a.json deleted file mode 100644 index a4a450f6729f69..00000000000000 --- a/change/@fluentui-style-utilities-c0995633-6083-4fb4-a35e-135530e2158a.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "minor", - "comment": "Update to filetype icons - Sep 2024", - "packageName": "@fluentui/style-utilities", - "email": "caperez@microsoft.com", - "dependentChangeType": "patch" -} From a7884fbb9b1729f58ccb9757ffe2fe0c1dde9578 Mon Sep 17 00:00:00 2001 From: Carlos Perez Date: Mon, 30 Sep 2024 10:27:04 -0700 Subject: [PATCH 009/120] yarn change --- ...le-type-icons-0a69cb3d-cf81-4967-8961-6a2ab277c675.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 change/@fluentui-react-file-type-icons-0a69cb3d-cf81-4967-8961-6a2ab277c675.json diff --git a/change/@fluentui-react-file-type-icons-0a69cb3d-cf81-4967-8961-6a2ab277c675.json b/change/@fluentui-react-file-type-icons-0a69cb3d-cf81-4967-8961-6a2ab277c675.json new file mode 100644 index 00000000000000..09a06ece5d58af --- /dev/null +++ b/change/@fluentui-react-file-type-icons-0a69cb3d-cf81-4967-8961-6a2ab277c675.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "\u0016\u0016\u0016Chagnging FileIconType-based icon searchign to use the same scalable method used for file extensions", + "packageName": "@fluentui/react-file-type-icons", + "email": "caperez@microsoft.com", + "dependentChangeType": "patch" +} From b12c050be04f1a1dcad1bb1a4883e6f75daa67b2 Mon Sep 17 00:00:00 2001 From: Carlos Perez Date: Mon, 30 Sep 2024 11:16:12 -0700 Subject: [PATCH 010/120] Ran `yarn nx format` --- .../react-file-type-icons/src/FileIconType.ts | 1 - .../src/FileTypeIconMap.ts | 48 +++++++++---------- .../src/getFileTypeIconProps.ts | 6 +-- 3 files changed, 26 insertions(+), 29 deletions(-) diff --git a/packages/react-file-type-icons/src/FileIconType.ts b/packages/react-file-type-icons/src/FileIconType.ts index 5dc6d530d117aa..b567c6d8c3c6db 100644 --- a/packages/react-file-type-icons/src/FileIconType.ts +++ b/packages/react-file-type-icons/src/FileIconType.ts @@ -27,4 +27,3 @@ export enum FileIconType { todoItem, portfolio, } - diff --git a/packages/react-file-type-icons/src/FileTypeIconMap.ts b/packages/react-file-type-icons/src/FileTypeIconMap.ts index bc6987c06b3940..ccaf39a8582ad4 100644 --- a/packages/react-file-type-icons/src/FileTypeIconMap.ts +++ b/packages/react-file-type-icons/src/FileTypeIconMap.ts @@ -5,7 +5,7 @@ import { FileIconType } from './FileIconType'; * Please keep items alphabetical. Items without extensions may require specific logic in the code to map. * Always use getFileTypeIconProps to get the most up-to-date icon at the right pixel density. */ -export const FileTypeIconMap: { [key: string]: { extensions?: string[], types?: FileIconType[] } } = { +export const FileTypeIconMap: { [key: string]: { extensions?: string[]; types?: FileIconType[] } } = { accdb: { extensions: ['accdb', 'mdb'], }, @@ -271,13 +271,13 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[], types?: extensions: ['design'], }, desktopfolder: { - types: [FileIconType.desktopFolder] + types: [FileIconType.desktopFolder], }, - docset: { - types: [FileIconType.docset] + docset: { + types: [FileIconType.docset], }, - documentsfolder: { - types: [FileIconType.documentsFolder] + documentsfolder: { + types: [FileIconType.documentsFolder], }, docx: { extensions: ['doc', 'docm', 'docx', 'docb'], @@ -292,16 +292,16 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[], types?: extensions: ['application', 'appref-ms', 'apk', 'app', 'appx', 'exe', 'ipa', 'msi', 'xap'], }, folder: { - types: [FileIconType.folder] + types: [FileIconType.folder], }, font: { extensions: ['ttf', 'otf', 'woff'], }, form: { - types: [FileIconType.form] + types: [FileIconType.form], }, genericfile: { - types: [FileIconType.genericFile] + types: [FileIconType.genericFile], }, html: { extensions: ['htm', 'html', 'mht', 'mhtml'], @@ -313,22 +313,22 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[], types?: extensions: ['lnk', 'link', 'url', 'website', 'webloc'], }, linkedfolder: { - types: [FileIconType.linkedFolder] + types: [FileIconType.linkedFolder], }, - listitem: { - types: [FileIconType.listItem] + listitem: { + types: [FileIconType.listItem], }, loop: { extensions: ['fluid', 'loop', 'note'], }, loopworkspace: { - types: [FileIconType.loopworkspace] + types: [FileIconType.loopworkspace], }, officescript: { extensions: ['osts'], }, splist: { - types: [FileIconType.list] + types: [FileIconType.list], }, mcworld: { extensions: ['mcworld'], @@ -373,7 +373,7 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[], types?: extensions: ['mpt'], }, multiple: { - types: [FileIconType.multiple] + types: [FileIconType.multiple], }, one: { // This is a partial OneNote page or section export. Not whole notebooks, see "onetoc" @@ -432,13 +432,13 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[], types?: }, photo360: {}, picturesfolder: { - types: [FileIconType.picturesFolder] + types: [FileIconType.picturesFolder], }, planner: { - types: [FileIconType.planner] + types: [FileIconType.planner], }, portfolio: { - types: [FileIconType.portfolio] + types: [FileIconType.portfolio], }, potx: { extensions: ['pot', 'potm', 'potx'], @@ -462,7 +462,7 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[], types?: extensions: ['aspx'], }, sponews: { - types: [FileIconType.news] + types: [FileIconType.news], }, spreadsheet: { extensions: ['odc', 'ods', 'gsheet', 'numbers', 'tsv'], @@ -470,14 +470,14 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[], types?: rtf: { extensions: ['epub', 'gdoc', 'odt', 'rtf', 'wri', 'pages'], }, - sharedfolder: { - types: [FileIconType.sharedFolder] + sharedfolder: { + types: [FileIconType.sharedFolder], }, playlist: { - types: [FileIconType.playlist] + types: [FileIconType.playlist], }, sway: { - types: [FileIconType.sway] + types: [FileIconType.sway], }, sysfile: { extensions: [ @@ -513,7 +513,7 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[], types?: ], }, todoitem: { - types: [FileIconType.todoItem] + types: [FileIconType.todoItem], }, txt: { extensions: ['dif', 'diff', 'readme', 'out', 'plist', 'properties', 'text', 'txt'], diff --git a/packages/react-file-type-icons/src/getFileTypeIconProps.ts b/packages/react-file-type-icons/src/getFileTypeIconProps.ts index e4011e1fd33bb5..edb2a5e5287941 100644 --- a/packages/react-file-type-icons/src/getFileTypeIconProps.ts +++ b/packages/react-file-type-icons/src/getFileTypeIconProps.ts @@ -2,7 +2,7 @@ import { FileTypeIconMap } from './FileTypeIconMap'; import { FileIconType } from './FileIconType'; let _extensionToIconName: { [key: string]: string }; -let _typeToIconName: { [key:number]: string}; +let _typeToIconName: { [key: number]: string }; const GENERIC_FILE = 'genericfile'; @@ -79,9 +79,7 @@ export function getFileTypeIconNameFromExtensionOrType( // Strip periods, force lowercase. extension = extension.replace('.', '').toLowerCase(); return _extensionToIconName[extension] || GENERIC_FILE; - } else if (type) { - if (!_typeToIconName) { _typeToIconName = {}; @@ -90,7 +88,7 @@ export function getFileTypeIconNameFromExtensionOrType( if (types) { for (let i = 0; i < types.length; i++) { - _typeToIconName[types[i]] = iconName + _typeToIconName[types[i]] = iconName; } } } From 71faacdef6a857e749d4b39027d0df5f7d4387dc Mon Sep 17 00:00:00 2001 From: Carlos Perez Date: Mon, 30 Sep 2024 12:29:04 -0700 Subject: [PATCH 011/120] post-refactoring cleanup of an unused type --- packages/react-file-type-icons/src/FileIconType.test.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/react-file-type-icons/src/FileIconType.test.ts b/packages/react-file-type-icons/src/FileIconType.test.ts index 47511569bde706..3ca2190759a3dc 100644 --- a/packages/react-file-type-icons/src/FileIconType.test.ts +++ b/packages/react-file-type-icons/src/FileIconType.test.ts @@ -1,9 +1,8 @@ import { FileIconType } from './FileIconType'; -import type { FileIconTypeInput } from './FileIconType'; let allFileTypeIconValues: FileIconType | undefined; -function validateFileIconTypeValues(allowedFileTypeIconValues: FileIconTypeInput | undefined): void { +function validateFileIconTypeValues(allowedFileTypeIconValues: FileIconType | undefined): void { // The purpose of this function is to verify that the below call compiles, // which may only occur if every enum value matches its key. } From d6b0c08a619e1902a84b765bcad4da5160b696d0 Mon Sep 17 00:00:00 2001 From: Carlos Perez Date: Mon, 30 Sep 2024 12:44:41 -0700 Subject: [PATCH 012/120] fixing error reported by `lint`: error The body of a for-in should be wrapped in an if statement to filter unwanted properties from the prototype guard-for-in --- .../src/getFileTypeIconProps.ts | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/packages/react-file-type-icons/src/getFileTypeIconProps.ts b/packages/react-file-type-icons/src/getFileTypeIconProps.ts index edb2a5e5287941..e473167d7c9fbb 100644 --- a/packages/react-file-type-icons/src/getFileTypeIconProps.ts +++ b/packages/react-file-type-icons/src/getFileTypeIconProps.ts @@ -66,11 +66,13 @@ export function getFileTypeIconNameFromExtensionOrType( _extensionToIconName = {}; for (const iconName in FileTypeIconMap) { - const extensions = FileTypeIconMap[iconName].extensions; + if (FileTypeIconMap.hasOwnProperty(iconName)) { + const extensions = FileTypeIconMap[iconName].extensions; - if (extensions) { - for (let i = 0; i < extensions.length; i++) { - _extensionToIconName[extensions[i]] = iconName; + if (extensions) { + for (let i = 0; i < extensions.length; i++) { + _extensionToIconName[extensions[i]] = iconName; + } } } } @@ -84,11 +86,13 @@ export function getFileTypeIconNameFromExtensionOrType( _typeToIconName = {}; for (const iconName in FileTypeIconMap) { - const types = FileTypeIconMap[iconName].types; + if (FileTypeIconMap.hasOwnProperty(iconName)) { + const types = FileTypeIconMap[iconName].types; - if (types) { - for (let i = 0; i < types.length; i++) { - _typeToIconName[types[i]] = iconName; + if (types) { + for (let i = 0; i < types.length; i++) { + _typeToIconName[types[i]] = iconName; + } } } } From b86c403ab9f5bea5ab9d1b8a1363a09b0da2b8fd Mon Sep 17 00:00:00 2001 From: Carlos Perez Date: Fri, 1 Nov 2024 13:15:44 -0700 Subject: [PATCH 013/120] adding album entry to filetypeicon mapping --- packages/react-file-type-icons/src/FileTypeIconMap.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/react-file-type-icons/src/FileTypeIconMap.ts b/packages/react-file-type-icons/src/FileTypeIconMap.ts index 723caa6aa30ec2..0c197f5217e749 100644 --- a/packages/react-file-type-icons/src/FileTypeIconMap.ts +++ b/packages/react-file-type-icons/src/FileTypeIconMap.ts @@ -12,7 +12,9 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[]; types?: archive: { extensions: ['7z', 'ace', 'arc', 'arj', 'dmg', 'gz', 'iso', 'lzh', 'pkg', 'rar', 'sit', 'tgz', 'tar', 'z'], }, - album: {}, + album: { + types: [FileIconType.album], + }, audio: { extensions: [ 'aif', From a19592f9ddffee118a18dfb1683229b1b41575a7 Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Sun, 23 Nov 2025 14:04:29 -0800 Subject: [PATCH 014/120] first drop of creating a Fluent v9 version of the react-file-type-icons package. VSGHCP(CS4.5) following guidance from https://github.com/microsoft/fluentui/tree/master/docs/react-v9/contributing --- .github/CODEOWNERS | 2 + README.md | 6 +- .../library/.babelrc.json | 4 + .../file-type-icons-preview/library/.swcrc | 30 + .../file-type-icons-preview/library/LICENSE | 15 + .../library/MIGRATION.md | 248 ++++++++ .../file-type-icons-preview/library/README.md | 153 +++++ .../bundle-size/FileTypeIcon.fixture.js | 10 + .../library/config/api-extractor.json | 5 + .../library/config/tests.js | 1 + .../library/docs/Spec.md | 63 ++ .../library/eslint.config.js | 5 + .../etc/file-type-icons-preview.api.md | 138 ++++ .../library/jest.config.js | 34 + .../library/package.json | 56 ++ .../library/project.json | 8 + .../library/src/FileTypeIcon.ts | 12 + .../FileTypeIcon/FileTypeIcon.test.tsx | 74 +++ .../components/FileTypeIcon/FileTypeIcon.tsx | 25 + .../FileTypeIcon/FileTypeIcon.types.ts | 52 ++ .../src/components/FileTypeIcon/index.ts | 5 + .../FileTypeIcon/renderFileTypeIcon.tsx | 15 + .../FileTypeIcon/useFileTypeIcon.ts | 57 ++ .../useFileTypeIconStyles.styles.ts | 69 ++ .../library/src/index.ts | 25 + .../library/src/testing/isConformant.ts | 15 + .../library/src/utils/FileIconType.ts | 55 ++ .../library/src/utils/FileTypeIconMap.ts | 588 ++++++++++++++++++ .../library/src/utils/getFileTypeIconProps.ts | 220 +++++++ .../library/tsconfig.json | 22 + .../library/tsconfig.lib.json | 22 + .../library/tsconfig.spec.json | 17 + .../stories/.storybook/main.js | 14 + .../stories/.storybook/preview.js | 9 + .../stories/.storybook/tsconfig.json | 10 + .../file-type-icons-preview/stories/README.md | 17 + .../stories/eslint.config.js | 12 + .../stories/package.json | 11 + .../stories/project.json | 8 + .../stories/src/.gitkeep | 0 .../FileTypeIconCommon.stories.tsx | 64 ++ .../FileTypeIconDefault.stories.tsx | 6 + .../FileTypeIcon/FileTypeIconDescription.md | 13 + .../FileTypeIconSizes.stories.tsx | 69 ++ .../FileTypeIconSpecialTypes.stories.tsx | 54 ++ .../src/FileTypeIcon/index.stories.tsx | 22 + .../stories/src/index.ts | 1 + .../stories/tsconfig.json | 22 + .../stories/tsconfig.lib.json | 10 + .../library/etc/react-shared-contexts.api.md | 3 + .../CustomStyleHooksContext.ts | 1 + tsconfig.base.all.json | 6 +- tsconfig.base.json | 4 + 53 files changed, 2403 insertions(+), 4 deletions(-) create mode 100644 packages/react-components/file-type-icons-preview/library/.babelrc.json create mode 100644 packages/react-components/file-type-icons-preview/library/.swcrc create mode 100644 packages/react-components/file-type-icons-preview/library/LICENSE create mode 100644 packages/react-components/file-type-icons-preview/library/MIGRATION.md create mode 100644 packages/react-components/file-type-icons-preview/library/README.md create mode 100644 packages/react-components/file-type-icons-preview/library/bundle-size/FileTypeIcon.fixture.js create mode 100644 packages/react-components/file-type-icons-preview/library/config/api-extractor.json create mode 100644 packages/react-components/file-type-icons-preview/library/config/tests.js create mode 100644 packages/react-components/file-type-icons-preview/library/docs/Spec.md create mode 100644 packages/react-components/file-type-icons-preview/library/eslint.config.js create mode 100644 packages/react-components/file-type-icons-preview/library/etc/file-type-icons-preview.api.md create mode 100644 packages/react-components/file-type-icons-preview/library/jest.config.js create mode 100644 packages/react-components/file-type-icons-preview/library/package.json create mode 100644 packages/react-components/file-type-icons-preview/library/project.json create mode 100644 packages/react-components/file-type-icons-preview/library/src/FileTypeIcon.ts create mode 100644 packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/FileTypeIcon.test.tsx create mode 100644 packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/FileTypeIcon.tsx create mode 100644 packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/FileTypeIcon.types.ts create mode 100644 packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/index.ts create mode 100644 packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/renderFileTypeIcon.tsx create mode 100644 packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/useFileTypeIcon.ts create mode 100644 packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/useFileTypeIconStyles.styles.ts create mode 100644 packages/react-components/file-type-icons-preview/library/src/index.ts create mode 100644 packages/react-components/file-type-icons-preview/library/src/testing/isConformant.ts create mode 100644 packages/react-components/file-type-icons-preview/library/src/utils/FileIconType.ts create mode 100644 packages/react-components/file-type-icons-preview/library/src/utils/FileTypeIconMap.ts create mode 100644 packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconProps.ts create mode 100644 packages/react-components/file-type-icons-preview/library/tsconfig.json create mode 100644 packages/react-components/file-type-icons-preview/library/tsconfig.lib.json create mode 100644 packages/react-components/file-type-icons-preview/library/tsconfig.spec.json create mode 100644 packages/react-components/file-type-icons-preview/stories/.storybook/main.js create mode 100644 packages/react-components/file-type-icons-preview/stories/.storybook/preview.js create mode 100644 packages/react-components/file-type-icons-preview/stories/.storybook/tsconfig.json create mode 100644 packages/react-components/file-type-icons-preview/stories/README.md create mode 100644 packages/react-components/file-type-icons-preview/stories/eslint.config.js create mode 100644 packages/react-components/file-type-icons-preview/stories/package.json create mode 100644 packages/react-components/file-type-icons-preview/stories/project.json create mode 100644 packages/react-components/file-type-icons-preview/stories/src/.gitkeep create mode 100644 packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconCommon.stories.tsx create mode 100644 packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx create mode 100644 packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconDescription.md create mode 100644 packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconSizes.stories.tsx create mode 100644 packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconSpecialTypes.stories.tsx create mode 100644 packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/index.stories.tsx create mode 100644 packages/react-components/file-type-icons-preview/stories/src/index.ts create mode 100644 packages/react-components/file-type-icons-preview/stories/tsconfig.json create mode 100644 packages/react-components/file-type-icons-preview/stories/tsconfig.lib.json diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index d430c6d33bbbf2..4368f1d6ac6561 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -331,6 +331,8 @@ packages/react-components/component-selector-preview/library @microsoft/teams-pr packages/react-components/component-selector-preview/stories @microsoft/teams-prg packages/react-components/react-menu-grid-preview/library @microsoft/teams-prg packages/react-components/react-menu-grid-preview/stories @microsoft/teams-prg +packages/react-components/file-type-icons-preview/library @microsoft/cxe-red +packages/react-components/file-type-icons-preview/stories @microsoft/cxe-red # <%= NX-CODEOWNER-PLACEHOLDER %> # Deprecated v9 packages - exposed as part of `/unstable` api diff --git a/README.md b/README.md index f57e18143be43e..b59baadfe6d708 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,7 @@ [![Build Status](https://img.shields.io/azure-devops/build/uifabric/fabricpublic/164/master?style=flat-square)](https://dev.azure.com/uifabric/fabricpublic/_build?definitionId=164) ![GitHub contributors](https://img.shields.io/github/contributors/microsoft/fluentui?style=flat-square) ![GitHub top language](https://img.shields.io/github/languages/top/microsoft/fluentui?style=flat-square) [![Twitter Follow](https://img.shields.io/twitter/follow/fluentui?logo=x&style=flat-square)](https://twitter.com/FluentUI?ref_src=twsrc%5Etfw) -> Fluent UI React is shipping its v9 final stable release. Visit the [Fluent UI React v9 Release page on the wiki](https://github.com/microsoft/fluentui/wiki/Fluent-UI-React-v9-Release) to learn more about the upcoming release schedule. - -Fluent UI web represents a collection of utilities, React components, and Web Components for building web applications. +Fluent UI is a collection of utilities and React components for building web applications. This repo is home to 3 separate projects today. Combining Fluent UI React v9 components with Fluent UI React v8 or v0 components is possible and allows gradual migration to Fluent UI v9. @@ -27,6 +25,8 @@ The following table will help you navigate the 3 projects and understand their d > Why are there two React versions? Fluent UI v8 is still widely used. We encourage you to migrate to Fluent UI v9. See the [Migration overview](https://react.fluentui.dev/?path=/docs/concepts-migration-from-v8-component-mapping--docs). +For docs on how to contribute to our repo, check out the [contributing docs](https://github.com/microsoft/fluentui/tree/master/docs/react-v9/contributing) folder. + ## FluentUI Insights [Fluent UI Insights](https://docs.microsoft.com/en-us/shows/fluent-ui-insights?utm_source=github) is a series that describes the design and decisions behind the Fluent UI design system. diff --git a/packages/react-components/file-type-icons-preview/library/.babelrc.json b/packages/react-components/file-type-icons-preview/library/.babelrc.json new file mode 100644 index 00000000000000..630deaf765c49f --- /dev/null +++ b/packages/react-components/file-type-icons-preview/library/.babelrc.json @@ -0,0 +1,4 @@ +{ + "extends": "../../../../.babelrc-v9.json", + "plugins": ["annotate-pure-calls", "@babel/transform-react-pure-annotations"] +} diff --git a/packages/react-components/file-type-icons-preview/library/.swcrc b/packages/react-components/file-type-icons-preview/library/.swcrc new file mode 100644 index 00000000000000..b4ffa86dee3067 --- /dev/null +++ b/packages/react-components/file-type-icons-preview/library/.swcrc @@ -0,0 +1,30 @@ +{ + "$schema": "https://json.schemastore.org/swcrc", + "exclude": [ + "/testing", + "/**/*.cy.ts", + "/**/*.cy.tsx", + "/**/*.spec.ts", + "/**/*.spec.tsx", + "/**/*.test.ts", + "/**/*.test.tsx" + ], + "jsc": { + "parser": { + "syntax": "typescript", + "tsx": true, + "decorators": false, + "dynamicImport": false + }, + "externalHelpers": true, + "transform": { + "react": { + "runtime": "classic", + "useSpread": true + } + }, + "target": "es2019" + }, + "minify": false, + "sourceMaps": true +} diff --git a/packages/react-components/file-type-icons-preview/library/LICENSE b/packages/react-components/file-type-icons-preview/library/LICENSE new file mode 100644 index 00000000000000..ebc6d4c8e5118f --- /dev/null +++ b/packages/react-components/file-type-icons-preview/library/LICENSE @@ -0,0 +1,15 @@ +@fluentui/file-type-icons-preview + +Copyright (c) Microsoft Corporation + +All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Note: Usage of the fonts and icons referenced in Fluent UI React is subject to the terms listed at https://aka.ms/fluentui-assets-license diff --git a/packages/react-components/file-type-icons-preview/library/MIGRATION.md b/packages/react-components/file-type-icons-preview/library/MIGRATION.md new file mode 100644 index 00000000000000..c99d72f0caa5ce --- /dev/null +++ b/packages/react-components/file-type-icons-preview/library/MIGRATION.md @@ -0,0 +1,248 @@ +# Migration Guide: react-file-type-icons to react-file-type-icons-preview + +This guide helps you migrate from `@fluentui/react-file-type-icons` (v8) to `@fluentui/react-file-type-icons-preview` (v9). + +## Overview + +The v9 version provides a React component-based API instead of utility functions, following Fluent UI v9 patterns and conventions. + +## Package Installation + +```bash +# Remove the v8 package +npm uninstall @fluentui/react-file-type-icons + +# Install the v9 preview package +npm install @fluentui/react-file-type-icons-preview +``` + +## Breaking Changes + +### 1. Component-based API instead of utility functions + +**v8 (utility-based):** + +```tsx +import { getFileTypeIconProps, FileIconType } from '@fluentui/react-file-type-icons'; + +const iconProps = getFileTypeIconProps({ extension: 'docx', size: 48 }); +Document; +``` + +**v9 (component-based):** + +```tsx +import { FileTypeIcon } from '@fluentui/react-file-type-icons-preview'; + +; +``` + +### 2. Simplified Props + +The v9 component automatically handles icon name resolution and URL construction internally. + +**v8:** + +```tsx +const iconProps = getFileTypeIconProps({ + extension: 'docx', + size: 48, + imageFileType: 'png', +}); +// Manually construct URL and set on img element +``` + +**v9:** + +```tsx + +``` + +### 3. Type Usage + +**v8:** + +```tsx +import { FileIconType, getFileTypeIconProps } from '@fluentui/react-file-type-icons'; + +const iconProps = getFileTypeIconProps({ type: FileIconType.folder }); +``` + +**v9:** + +```tsx +import { FileTypeIcon, FileIconType } from '@fluentui/react-file-type-icons-preview'; + +; +``` + +### 4. Custom Base URL + +**v8:** + +```tsx +const iconProps = getFileTypeIconProps({ + extension: 'docx', + size: 48, +}); +const customUrl = `https://my-cdn.com/${iconProps.iconName}`; +``` + +**v9:** + +```tsx + +``` + +## Migration Examples + +### Example 1: Document Icon + +**Before (v8):** + +```tsx +import { getFileTypeIconProps } from '@fluentui/react-file-type-icons'; + +function DocumentItem({ filename }) { + const extension = filename.split('.').pop(); + const iconProps = getFileTypeIconProps({ extension, size: 32 }); + + return ( +
+ {filename} + {filename} +
+ ); +} +``` + +**After (v9):** + +```tsx +import { FileTypeIcon } from '@fluentui/react-file-type-icons-preview'; + +function DocumentItem({ filename }) { + const extension = filename.split('.').pop(); + + return ( +
+ + {filename} +
+ ); +} +``` + +### Example 2: Folder Icon + +**Before (v8):** + +```tsx +import { getFileTypeIconProps, FileIconType } from '@fluentui/react-file-type-icons'; + +const folderIconProps = getFileTypeIconProps({ + type: FileIconType.folder, + size: 48, +}); + +Folder; +``` + +**After (v9):** + +```tsx +import { FileTypeIcon, FileIconType } from '@fluentui/react-file-type-icons-preview'; + +; +``` + +### Example 3: Dynamic File List + +**Before (v8):** + +```tsx +import { getFileTypeIconProps } from '@fluentui/react-file-type-icons'; + +function FileList({ files }) { + return ( +
    + {files.map(file => { + const extension = file.name.split('.').pop(); + const iconProps = getFileTypeIconProps({ extension, size: 24 }); + + return ( +
  • + {file.name} + {file.name} +
  • + ); + })} +
+ ); +} +``` + +**After (v9):** + +```tsx +import { FileTypeIcon } from '@fluentui/react-file-type-icons-preview'; + +function FileList({ files }) { + return ( +
    + {files.map(file => { + const extension = file.name.split('.').pop(); + + return ( +
  • + + {file.name} +
  • + ); + })} +
+ ); +} +``` + +## Utilities Still Available + +If you need to access the underlying utilities for custom use cases, they are still exported: + +```tsx +import { + getFileTypeIconProps, + FileIconType, + getFileTypeIconNameFromExtensionOrType, +} from '@fluentui/react-file-type-icons-preview'; + +// Use utilities if you need custom logic +const iconName = getFileTypeIconNameFromExtensionOrType({ extension: 'docx' }); +``` + +## Benefits of Migration + +1. **Simpler API**: Use a React component instead of manually handling URLs and img elements +2. **Better TypeScript**: Full type safety with v9's improved type definitions +3. **Consistent with Fluent UI v9**: Follows the same patterns as other v9 components +4. **Automatic optimization**: The component handles pixel ratio and image format internally +5. **Better accessibility**: Built-in alt text and ARIA support + +## Feature Parity + +The v9 package maintains full feature parity with v8: + +- ✅ All file type icons (100+ extensions) +- ✅ Special types (folder, genericFile, listItem, etc.) +- ✅ All sizes (16, 20, 24, 32, 40, 48, 64, 96) +- ✅ SVG and PNG support +- ✅ Custom base URL +- ✅ Device pixel ratio handling + +## Need Help? + +If you encounter issues during migration: + +1. Check the [Storybook examples](https://aka.ms/fluentui-storybook) +2. Review the [API documentation](https://aka.ms/fluentui-api) +3. Open an issue on [GitHub](https://github.com/microsoft/fluentui) diff --git a/packages/react-components/file-type-icons-preview/library/README.md b/packages/react-components/file-type-icons-preview/library/README.md new file mode 100644 index 00000000000000..81c371e34e730b --- /dev/null +++ b/packages/react-components/file-type-icons-preview/library/README.md @@ -0,0 +1,153 @@ +# @fluentui/file-type-icons-preview + +**File Type Icons components for [Fluent UI React](https://react.fluentui.dev/)** + +These are not production-ready components and **should never be used in product**. This space is useful for testing new components whose APIs might change before final release. + +## Components + +### FileTypeIcon + +The `FileTypeIcon` component displays an icon representing a file type based on its extension or a special type (like folder). It automatically selects the appropriate icon from the Fluent Design file type icon set. + +#### Features + +- 🎨 **100+ file type icons** - Supports all common file extensions +- 📏 **Multiple sizes** - 16, 20, 24, 32, 40, 48, 64, and 96 pixels +- 🖼️ **Format support** - Renders icons as SVG or PNG +- 📁 **Special types** - Folder, list items, and other non-file icons +- ♿ **Accessible** - Includes proper alt text for screen readers +- 🎯 **Automatic optimization** - Handles device pixel ratio for crisp display + +## Usage + +### Basic Usage + +```tsx +import { FileTypeIcon } from '@fluentui/react-file-type-icons-preview'; + +// Display a Word document icon + + +// Display a folder icon + +``` + +### File Extensions + +The component recognizes 100+ file extensions: + +```tsx +import { FileTypeIcon } from '@fluentui/react-file-type-icons-preview'; + + // Word document + // Excel spreadsheet + // PowerPoint presentation + // PDF document + // Archive file + // Video file + // Image file +``` + +### Sizes + +All standard Fluent UI icon sizes are supported: + +```tsx + + + + + + + + +``` + +### Special Types + +Use the `type` prop for non-extension-based icons: + +```tsx +import { FileTypeIcon, FileIconType } from '@fluentui/react-file-type-icons-preview'; + + + + + + +``` + +### Image Format + +Choose between SVG (default) or PNG: + +```tsx +// SVG (default, recommended for most cases) + + +// PNG (better for certain legacy scenarios) + +``` + +### Custom CDN + +Override the default Fluent CDN with your own: + +```tsx + +``` + +### With Custom Styling + +Apply custom className or style: + +```tsx + +``` + +## Migration from v8 + +If you're migrating from `@fluentui/react-file-type-icons` (v8), see the [Migration Guide](./MIGRATION.md). + +### Quick Comparison + +**v8 (utility-based):** + +```tsx +import { getFileTypeIconProps } from '@fluentui/react-file-type-icons'; + +const iconProps = getFileTypeIconProps({ extension: 'docx', size: 48 }); +Document; +``` + +**v9 (component-based):** + +```tsx +import { FileTypeIcon } from '@fluentui/react-file-type-icons-preview'; + +; +``` + +## Utilities + +The underlying utilities are also exported for advanced use cases: + +```tsx +import { + getFileTypeIconProps, + FileIconType, + getFileTypeIconNameFromExtensionOrType, + FileTypeIconMap, +} from '@fluentui/react-file-type-icons-preview'; + +// Get icon name for custom logic +const iconName = getFileTypeIconNameFromExtensionOrType({ extension: 'docx' }); + +// Get full icon props +const iconProps = getFileTypeIconProps({ extension: 'docx', size: 48 }); +``` + +## API + +See [Fluent UI Storybook](https://aka.ms/fluentui-storybook) for full API documentation and interactive examples. diff --git a/packages/react-components/file-type-icons-preview/library/bundle-size/FileTypeIcon.fixture.js b/packages/react-components/file-type-icons-preview/library/bundle-size/FileTypeIcon.fixture.js new file mode 100644 index 00000000000000..762816526dc35e --- /dev/null +++ b/packages/react-components/file-type-icons-preview/library/bundle-size/FileTypeIcon.fixture.js @@ -0,0 +1,10 @@ +import { FileTypeIcon } from './FileTypeIcon'; + +console.log(FileTypeIcon); + +export default { + name: 'FileTypeIcon', + props: { + extension: 'docx', + }, +}; diff --git a/packages/react-components/file-type-icons-preview/library/config/api-extractor.json b/packages/react-components/file-type-icons-preview/library/config/api-extractor.json new file mode 100644 index 00000000000000..8d482156d10d53 --- /dev/null +++ b/packages/react-components/file-type-icons-preview/library/config/api-extractor.json @@ -0,0 +1,5 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + "extends": "@fluentui/scripts-api-extractor/api-extractor.common.v-next.json", + "mainEntryPointFilePath": "/../../../../../../dist/out-tsc/types/packages/react-components//library/src/index.d.ts" +} diff --git a/packages/react-components/file-type-icons-preview/library/config/tests.js b/packages/react-components/file-type-icons-preview/library/config/tests.js new file mode 100644 index 00000000000000..2e211ae9e21420 --- /dev/null +++ b/packages/react-components/file-type-icons-preview/library/config/tests.js @@ -0,0 +1 @@ +/** Jest test setup file. */ diff --git a/packages/react-components/file-type-icons-preview/library/docs/Spec.md b/packages/react-components/file-type-icons-preview/library/docs/Spec.md new file mode 100644 index 00000000000000..c25b450f42e8c7 --- /dev/null +++ b/packages/react-components/file-type-icons-preview/library/docs/Spec.md @@ -0,0 +1,63 @@ +# @fluentui/file-type-icons-preview Spec + +## Background + +_Description and use cases of this component_ + +## Prior Art + +_Include background research done for this component_ + +- _Link to Open UI research_ +- _Link to comparison of v7 and v0_ +- _Link to GitHub epic issue for the converged component_ + +## Sample Code + +_Provide some representative example code that uses the proposed API for the component_ + +## Variants + +_Describe visual or functional variants of this control, if applicable. For example, a slider could have a 2D variant._ + +## API + +_List the **Props** and **Slots** proposed for the component. Ideally this would just be a link to the component's `.types.ts` file_ + +## Structure + +- _**Public**_ +- _**Internal**_ +- _**DOM** - how the component will be rendered as HTML elements_ + +## Migration + +_Describe what will need to be done to upgrade from the existing implementations:_ + +- _Migration from v8_ +- _Migration from v0_ + +## Behaviors + +_Explain how the component will behave in use, including:_ + +- _Component States_ +- _Interaction_ + - _Keyboard_ + - _Cursor_ + - _Touch_ + - _Screen readers_ + +## Accessibility + +Base accessibility information is included in the design document. After the spec is filled and review, outcomes from it need to be communicated to design and incorporated in the design document. + +- Decide whether to use **native element** or folow **ARIA** and provide reasons +- Identify the **[ARIA](https://www.w3.org/TR/wai-aria-practices-1.2/) pattern** and, if the component is listed there, follow its specification as possible. +- Identify accessibility **variants**, the `role` ([ARIA roles](https://www.w3.org/TR/wai-aria-1.1/#role_definitions)) of the component, its `slots` and `aria-*` props. +- Describe the **keyboard navigation**: Tab Oder and Arrow Key Navigation. Describe any other keyboard **shortcuts** used +- Specify texts for **state change announcements** - [ARIA live regions + ](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions) (number of available items in dropdown, error messages, confirmations, ...) +- Identify UI parts that appear on **hover or focus** and specify keyboard and screen reader interaction with them +- List cases when **focus** needs to be **trapped** in sections of the UI (for dialogs and popups or for hierarchical navigation) +- List cases when **focus** needs to be **moved programatically** (if parts of the UI are appearing/disappearing or other cases) diff --git a/packages/react-components/file-type-icons-preview/library/eslint.config.js b/packages/react-components/file-type-icons-preview/library/eslint.config.js new file mode 100644 index 00000000000000..ec2e7cb1fc479f --- /dev/null +++ b/packages/react-components/file-type-icons-preview/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/file-type-icons-preview/library/etc/file-type-icons-preview.api.md b/packages/react-components/file-type-icons-preview/library/etc/file-type-icons-preview.api.md new file mode 100644 index 00000000000000..777b08a66f0f02 --- /dev/null +++ b/packages/react-components/file-type-icons-preview/library/etc/file-type-icons-preview.api.md @@ -0,0 +1,138 @@ +## API Report File for "@fluentui/file-type-icons-preview" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import type { ComponentProps } from '@fluentui/react-utilities'; +import type { ComponentState } from '@fluentui/react-utilities'; +import type { ForwardRefComponent } from '@fluentui/react-utilities'; +import type { JSXElement } from '@fluentui/react-utilities'; +import * as React_2 from 'react'; +import type { Slot } from '@fluentui/react-utilities'; +import type { SlotClassNames } from '@fluentui/react-utilities'; + +// @public (undocumented) +export const DEFAULT_ICON_SIZE: FileTypeIconSize; + +// @public +export enum FileIconType { + // (undocumented) + album = 21,// Start at 1 so it will evaluate as "truthy" + // (undocumented) + desktopFolder = 9, + // (undocumented) + docset = 1, + // (undocumented) + documentsFolder = 10, + // (undocumented) + folder = 2, + // (undocumented) + form = 14, + // (undocumented) + genericFile = 3, + // (undocumented) + linkedFolder = 12, + // (undocumented) + list = 13, + // (undocumented) + listForm = 22, + // (undocumented) + listItem = 4, + // (undocumented) + loopworkspace = 17, + // (undocumented) + multiple = 6, + // (undocumented) + news = 8, + // (undocumented) + picturesFolder = 11, + // (undocumented) + planner = 18, + // (undocumented) + playlist = 16, + // (undocumented) + portfolio = 20, + // (undocumented) + sharedFolder = 5, + // (undocumented) + stream = 7, + // (undocumented) + sway = 15, + // (undocumented) + todoItem = 19 +} + +// @public (undocumented) +export type FileIconTypeInput = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22; + +// @public +export const FileTypeIcon: ForwardRefComponent; + +// @public (undocumented) +export const fileTypeIconClassNames: SlotClassNames; + +// @public +export const FileTypeIconMap: { + [key: string]: { + extensions?: string[]; + }; +}; + +// @public (undocumented) +export type FileTypeIconProps = ComponentProps & { + extension?: string; + type?: FileIconTypeInput; + size?: FileTypeIconSize; + imageFileType?: ImageFileType; + baseUrl?: string; +}; + +// @public (undocumented) +export type FileTypeIconSize = 16 | 20 | 24 | 32 | 40 | 48 | 64 | 96; + +// @public (undocumented) +export type FileTypeIconSlots = { + root: Slot<'img'>; +}; + +// @public (undocumented) +export type FileTypeIconState = ComponentState & Required> & { + iconUrl: string; +}; + +// @public +export function getFileTypeIconNameFromExtensionOrType(extension: string | undefined, type: FileIconType | undefined): string; + +// @public +export function getFileTypeIconProps(options: IFileTypeIconOptions): { + iconName: string; + 'aria-label'?: string; +}; + +// @public +export function getFileTypeIconSuffix(size: FileTypeIconSize, imageFileType?: ImageFileType, win?: Window): string; + +// @public (undocumented) +export interface IFileTypeIconOptions { + extension?: string; + imageFileType?: ImageFileType; + size?: FileTypeIconSize; + type?: FileIconTypeInput; +} + +// @public (undocumented) +export type ImageFileType = 'svg' | 'png'; + +// @public +export const renderFileTypeIcon_unstable: (state: FileTypeIconState) => JSXElement; + +// @public +export const useFileTypeIcon_unstable: (props: FileTypeIconProps, ref: React_2.Ref) => FileTypeIconState; + +// @public +export const useFileTypeIconStyles_unstable: (state: FileTypeIconState) => FileTypeIconState; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/packages/react-components/file-type-icons-preview/library/jest.config.js b/packages/react-components/file-type-icons-preview/library/jest.config.js new file mode 100644 index 00000000000000..b162ec0d59415e --- /dev/null +++ b/packages/react-components/file-type-icons-preview/library/jest.config.js @@ -0,0 +1,34 @@ +// @ts-check +/* eslint-disable */ + +const { readFileSync } = require('node:fs'); +const { join } = require('node:path'); + +// Reading the SWC compilation config and remove the "exclude" +// for the test files to be compiled by SWC +const { exclude: _, ...swcJestConfig } = JSON.parse(readFileSync(join(__dirname, '.swcrc'), 'utf-8')); + +// disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves. +// If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to "exclude" +if (swcJestConfig.swcrc === undefined) { + swcJestConfig.swcrc = false; +} + +// Uncomment if using global setup/teardown files being transformed via swc +// https://nx.dev/packages/jest/documents/overview#global-setup/teardown-with-nx-libraries +// jest needs EsModule Interop to find the default exported setup/teardown functions +// swcJestConfig.module.noInterop = false; + +/** + * @type {import('@jest/types').Config.InitialOptions} + */ +module.exports = { + displayName: 'file-type-icons-preview', + preset: '../../../../jest.preset.js', + transform: { + '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], + }, + coverageDirectory: './coverage', + setupFilesAfterEnv: ['./config/tests.js'], + snapshotSerializers: ['@griffel/jest-serializer'], +}; diff --git a/packages/react-components/file-type-icons-preview/library/package.json b/packages/react-components/file-type-icons-preview/library/package.json new file mode 100644 index 00000000000000..6307ead298c4fe --- /dev/null +++ b/packages/react-components/file-type-icons-preview/library/package.json @@ -0,0 +1,56 @@ +{ + "name": "@fluentui/file-type-icons-preview", + "version": "0.0.0", + "private": true, + "description": "New fluentui react package", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "typings": "./dist/index.d.ts", + "sideEffects": false, + "files": [ + "*.md", + "dist/*.d.ts", + "lib", + "lib-commonjs" + ], + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui" + }, + "license": "MIT", + "devDependencies": { + "@fluentui/eslint-plugin": "*", + "@fluentui/react-conformance": "*", + "@fluentui/react-conformance-griffel": "*", + "@fluentui/scripts-api-extractor": "*" + }, + "dependencies": { + "@fluentui/react-jsx-runtime": "^9.3.3", + "@fluentui/react-shared-contexts": "^9.26.0", + "@fluentui/react-theme": "^9.2.0", + "@fluentui/react-utilities": "^9.25.4", + "@griffel/react": "^1.5.32", + "@swc/helpers": "^0.5.1" + }, + "peerDependencies": { + "@types/react": ">=16.14.0 <19.0.0", + "@types/react-dom": ">=16.9.0 <19.0.0", + "react": ">=16.14.0 <19.0.0", + "react-dom": ">=16.14.0 <19.0.0" + }, + "exports": { + ".": { + "types": "./dist/index.d.ts", + "node": "./lib-commonjs/index.js", + "import": "./lib/index.js", + "require": "./lib-commonjs/index.js" + }, + "./package.json": "./package.json" + }, + "beachball": { + "disallowedChangeTypes": [ + "major", + "prerelease" + ] + } +} diff --git a/packages/react-components/file-type-icons-preview/library/project.json b/packages/react-components/file-type-icons-preview/library/project.json new file mode 100644 index 00000000000000..a2facb7b2e2771 --- /dev/null +++ b/packages/react-components/file-type-icons-preview/library/project.json @@ -0,0 +1,8 @@ +{ + "name": "file-type-icons-preview", + "$schema": "../../../../node_modules/nx/schemas/project-schema.json", + "projectType": "library", + "sourceRoot": "packages/react-components/file-type-icons-preview/library/src", + "tags": ["platform:web", "vNext"], + "implicitDependencies": [] +} diff --git a/packages/react-components/file-type-icons-preview/library/src/FileTypeIcon.ts b/packages/react-components/file-type-icons-preview/library/src/FileTypeIcon.ts new file mode 100644 index 00000000000000..38044ff59d9603 --- /dev/null +++ b/packages/react-components/file-type-icons-preview/library/src/FileTypeIcon.ts @@ -0,0 +1,12 @@ +export type { + FileTypeIconProps, + FileTypeIconSlots, + FileTypeIconState, +} from './components/FileTypeIcon/index'; +export { + FileTypeIcon, + fileTypeIconClassNames, + renderFileTypeIcon_unstable, + useFileTypeIconStyles_unstable, + useFileTypeIcon_unstable, +} from './components/FileTypeIcon/index'; diff --git a/packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/FileTypeIcon.test.tsx b/packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/FileTypeIcon.test.tsx new file mode 100644 index 00000000000000..bd3a677bf1656c --- /dev/null +++ b/packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/FileTypeIcon.test.tsx @@ -0,0 +1,74 @@ +import * as React from 'react'; +import { isConformant } from '../../testing/isConformant'; +import { render } from '@testing-library/react'; +import { FileTypeIcon } from './FileTypeIcon'; +import { FileIconType } from '../../utils/FileIconType'; + +describe('FileTypeIcon', () => { + isConformant({ + Component: FileTypeIcon, + displayName: 'FileTypeIcon', + }); + + it('renders with a file extension', () => { + const result = render(); + const img = result.container.querySelector('img'); + expect(img).toBeTruthy(); + expect(img?.src).toContain('docx'); + }); + + it('renders with a file type', () => { + const result = render(); + const img = result.container.querySelector('img'); + expect(img).toBeTruthy(); + expect(img?.src).toContain('folder'); + }); + + it('renders with custom size', () => { + const result = render(); + const img = result.container.querySelector('img'); + expect(img).toBeTruthy(); + expect(img?.src).toContain('48'); + }); + + it('renders with PNG image type', () => { + const result = render(); + const img = result.container.querySelector('img'); + expect(img).toBeTruthy(); + expect(img?.src).toContain('png'); + }); + + it('renders with SVG image type by default', () => { + const result = render(); + const img = result.container.querySelector('img'); + expect(img).toBeTruthy(); + expect(img?.src).toContain('svg'); + }); + + it('applies custom className', () => { + const result = render(); + const img = result.container.querySelector('img'); + expect(img?.className).toContain('custom-class'); + }); + + it('renders with custom baseUrl', () => { + const customUrl = 'https://example.com/icons/'; + const result = render(); + const img = result.container.querySelector('img'); + expect(img?.src).toContain(customUrl); + }); + + it('handles file extensions with leading dot', () => { + const result = render(); + const img = result.container.querySelector('img'); + expect(img).toBeTruthy(); + expect(img?.src).toContain('pdf'); + }); + + it('defaults to genericfile for unknown extensions', () => { + const result = render(); + const img = result.container.querySelector('img'); + expect(img).toBeTruthy(); + expect(img?.src).toContain('genericfile'); + }); +}); diff --git a/packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/FileTypeIcon.tsx b/packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/FileTypeIcon.tsx new file mode 100644 index 00000000000000..c0b5835360fcef --- /dev/null +++ b/packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/FileTypeIcon.tsx @@ -0,0 +1,25 @@ +'use client'; + +import * as React from 'react'; +import { renderFileTypeIcon_unstable } from './renderFileTypeIcon'; +import { useFileTypeIcon_unstable } from './useFileTypeIcon'; +import { useFileTypeIconStyles_unstable } from './useFileTypeIconStyles.styles'; +import type { FileTypeIconProps } from './FileTypeIcon.types'; +import type { ForwardRefComponent } from '@fluentui/react-utilities'; +import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts'; + +/** + * FileTypeIcon component displays an icon representing a file type based on its extension or type. + * It supports various sizes and image formats (SVG and PNG). + */ +export const FileTypeIcon: ForwardRefComponent = React.forwardRef((props, ref) => { + const state = useFileTypeIcon_unstable(props, ref); + + useFileTypeIconStyles_unstable(state); + + useCustomStyleHook_unstable('useFileTypeIconStyles_unstable')(state); + + return renderFileTypeIcon_unstable(state); +}); + +FileTypeIcon.displayName = 'FileTypeIcon'; diff --git a/packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/FileTypeIcon.types.ts b/packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/FileTypeIcon.types.ts new file mode 100644 index 00000000000000..241e6d0ba9d4da --- /dev/null +++ b/packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/FileTypeIcon.types.ts @@ -0,0 +1,52 @@ +import type { ComponentState, ComponentProps, Slot } from '@fluentui/react-utilities'; +import type { FileIconTypeInput } from '../../utils/FileIconType'; +import type { FileTypeIconSize, ImageFileType } from '../../utils/getFileTypeIconProps'; + +export type FileTypeIconSlots = { + /** + * The root slot, an img element that displays the file type icon. + */ + root: Slot<'img'>; +}; + +export type FileTypeIconProps = ComponentProps & { + /** + * The file extension, such as 'pptx' or '.docx', for which you need an icon. + * For file type icons that are not associated with a file extension, + * such as folder, use the type property. + */ + extension?: string; + + /** + * The type of file type icon you need. Use this property for + * file type icons that are not associated with a file extension, + * such as folder. + */ + type?: FileIconTypeInput; + + /** + * The size of the icon in pixels. + * @default 16 + */ + size?: FileTypeIconSize; + + /** + * The type of image file to use. Can be svg or png. + * @default 'svg' + */ + imageFileType?: ImageFileType; + + /** + * The base URL for the icon assets. If not provided, uses the default Fluent CDN. + * @default 'https://res-1.cdn.office.net/files/fabric-cdn-prod_20251119.001/assets/item-types/' + */ + baseUrl?: string; +}; + +export type FileTypeIconState = ComponentState & + Required> & { + /** + * The computed icon URL based on extension/type, size, and image file type. + */ + iconUrl: string; + }; diff --git a/packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/index.ts b/packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/index.ts new file mode 100644 index 00000000000000..f70e9027521bc4 --- /dev/null +++ b/packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/index.ts @@ -0,0 +1,5 @@ +export { FileTypeIcon } from './FileTypeIcon'; +export type { FileTypeIconProps, FileTypeIconSlots, FileTypeIconState } from './FileTypeIcon.types'; +export { renderFileTypeIcon_unstable } from './renderFileTypeIcon'; +export { useFileTypeIcon_unstable } from './useFileTypeIcon'; +export { fileTypeIconClassNames, useFileTypeIconStyles_unstable } from './useFileTypeIconStyles.styles'; diff --git a/packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/renderFileTypeIcon.tsx b/packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/renderFileTypeIcon.tsx new file mode 100644 index 00000000000000..b0a81e57b70b58 --- /dev/null +++ b/packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/renderFileTypeIcon.tsx @@ -0,0 +1,15 @@ +/** @jsxRuntime automatic */ +/** @jsxImportSource @fluentui/react-jsx-runtime */ + +import { assertSlots } from '@fluentui/react-utilities'; +import type { JSXElement } from '@fluentui/react-utilities'; +import type { FileTypeIconSlots, FileTypeIconState } from './FileTypeIcon.types'; + +/** + * Render the FileTypeIcon component. + */ +export const renderFileTypeIcon_unstable = (state: FileTypeIconState): JSXElement => { + assertSlots(state); + + return ; +}; diff --git a/packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/useFileTypeIcon.ts b/packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/useFileTypeIcon.ts new file mode 100644 index 00000000000000..560b6c41eac1f4 --- /dev/null +++ b/packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/useFileTypeIcon.ts @@ -0,0 +1,57 @@ +import * as React from 'react'; +import { getIntrinsicElementProps, slot } from '@fluentui/react-utilities'; +import type { FileTypeIconProps, FileTypeIconState } from './FileTypeIcon.types'; +import { getFileTypeIconProps, DEFAULT_ICON_SIZE } from '../../utils/getFileTypeIconProps'; + +const DEFAULT_BASE_URL = 'https://res-1.cdn.office.net/files/fabric-cdn-prod_20251119.001/assets/item-types/'; + +/** + * Returns the props and state required to render the FileTypeIcon component. + */ +export const useFileTypeIcon_unstable = ( + props: FileTypeIconProps, + ref: React.Ref, +): FileTypeIconState => { + const { + extension, + type, + size = DEFAULT_ICON_SIZE, + imageFileType = 'svg', + baseUrl = DEFAULT_BASE_URL, + } = props; + + // Get the icon name using the utility function + const iconProps = getFileTypeIconProps({ + extension, + type, + size, + imageFileType, + }); + + // Construct the full icon URL + const iconUrl = `${baseUrl}${iconProps.iconName}.${imageFileType}`; + + const state: FileTypeIconState = { + size, + imageFileType, + iconUrl, + components: { + root: 'img', + }, + root: slot.always( + getIntrinsicElementProps('img', { + ref, + src: iconUrl, + alt: iconProps['aria-label'] || 'File type icon', + ...props, + // Remove our custom props from being passed to the img element + extension: undefined, + type: undefined, + baseUrl: undefined, + }), + { elementType: 'img' }, + ), + }; + + return state; +}; diff --git a/packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/useFileTypeIconStyles.styles.ts b/packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/useFileTypeIconStyles.styles.ts new file mode 100644 index 00000000000000..cb3502c2a20218 --- /dev/null +++ b/packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/useFileTypeIconStyles.styles.ts @@ -0,0 +1,69 @@ +'use client'; + +import { mergeClasses, makeStyles } from '@griffel/react'; +import type { FileTypeIconSlots, FileTypeIconState } from './FileTypeIcon.types'; +import type { SlotClassNames } from '@fluentui/react-utilities'; + +export const fileTypeIconClassNames: SlotClassNames = { + root: 'fui-FileTypeIcon', +}; + +const useStyles = makeStyles({ + // Base styles + root: { + display: 'inline-block', + verticalAlign: 'middle', + }, + + // Size variations - ensure the icon displays at the correct size + size16: { + width: '16px', + height: '16px', + }, + size20: { + width: '20px', + height: '20px', + }, + size24: { + width: '24px', + height: '24px', + }, + size32: { + width: '32px', + height: '32px', + }, + size40: { + width: '40px', + height: '40px', + }, + size48: { + width: '48px', + height: '48px', + }, + size64: { + width: '64px', + height: '64px', + }, + size96: { + width: '96px', + height: '96px', + }, +}); + +/** + * Apply styling to the FileTypeIcon slots based on the state. + */ +export const useFileTypeIconStyles_unstable = (state: FileTypeIconState): FileTypeIconState => { + 'use no memo'; + + const styles = useStyles(); + + state.root.className = mergeClasses( + fileTypeIconClassNames.root, + styles.root, + styles[`size${state.size}`], + state.root.className, + ); + + return state; +}; diff --git a/packages/react-components/file-type-icons-preview/library/src/index.ts b/packages/react-components/file-type-icons-preview/library/src/index.ts new file mode 100644 index 00000000000000..591cfbed9e30c6 --- /dev/null +++ b/packages/react-components/file-type-icons-preview/library/src/index.ts @@ -0,0 +1,25 @@ +// Component exports +export { + FileTypeIcon, + fileTypeIconClassNames, + renderFileTypeIcon_unstable, + useFileTypeIcon_unstable, + useFileTypeIconStyles_unstable, +} from './components/FileTypeIcon/index'; +export type { FileTypeIconProps, FileTypeIconSlots, FileTypeIconState } from './components/FileTypeIcon/index'; + +// Utility exports (for backward compatibility and advanced usage) +export { FileIconType } from './utils/FileIconType'; +export type { FileIconTypeInput } from './utils/FileIconType'; +export { FileTypeIconMap } from './utils/FileTypeIconMap'; +export { + getFileTypeIconProps, + getFileTypeIconNameFromExtensionOrType, + getFileTypeIconSuffix, + DEFAULT_ICON_SIZE, +} from './utils/getFileTypeIconProps'; +export type { + FileTypeIconSize, + ImageFileType, + IFileTypeIconOptions, +} from './utils/getFileTypeIconProps'; diff --git a/packages/react-components/file-type-icons-preview/library/src/testing/isConformant.ts b/packages/react-components/file-type-icons-preview/library/src/testing/isConformant.ts new file mode 100644 index 00000000000000..8ed2da0f925135 --- /dev/null +++ b/packages/react-components/file-type-icons-preview/library/src/testing/isConformant.ts @@ -0,0 +1,15 @@ +import { isConformant as baseIsConformant } from '@fluentui/react-conformance'; +import type { IsConformantOptions, TestObject } from '@fluentui/react-conformance'; +import griffelTests from '@fluentui/react-conformance-griffel'; + +export function isConformant( + testInfo: Omit, 'componentPath'> & { componentPath?: string }, +): void { + const defaultOptions: Partial> = { + tsConfig: { configName: 'tsconfig.spec.json' }, + componentPath: require.main?.filename.replace('.test', ''), + extraTests: griffelTests as TestObject, + }; + + baseIsConformant(defaultOptions, testInfo); +} diff --git a/packages/react-components/file-type-icons-preview/library/src/utils/FileIconType.ts b/packages/react-components/file-type-icons-preview/library/src/utils/FileIconType.ts new file mode 100644 index 00000000000000..22a7ee22bfcf81 --- /dev/null +++ b/packages/react-components/file-type-icons-preview/library/src/utils/FileIconType.ts @@ -0,0 +1,55 @@ +/** + * Enumerates special file type icons that do not map to any file extensions. + * For example, the 'pptx' icon maps to the extensions 'ppt', 'pptm', 'pptx', + * but the 'folder' icon does not map to any extensions and should be obtained + * via this enum. + */ + +export enum FileIconType { + docset = 1, // Start at 1 so it will evaluate as "truthy" + folder = 2, + genericFile = 3, + listItem = 4, + sharedFolder = 5, + multiple = 6, + stream = 7, + news = 8, + desktopFolder = 9, + documentsFolder = 10, + picturesFolder = 11, + linkedFolder = 12, + list = 13, + form = 14, + sway = 15, + playlist = 16, + loopworkspace = 17, + planner = 18, + todoItem = 19, + portfolio = 20, + album = 21, + listForm = 22, +} + +export type FileIconTypeInput = + | 1 + | 2 + | 3 + | 4 + | 5 + | 6 + | 7 + | 8 + | 9 + | 10 + | 11 + | 12 + | 13 + | 14 + | 15 + | 16 + | 17 + | 18 + | 19 + | 20 + | 21 + | 22; diff --git a/packages/react-components/file-type-icons-preview/library/src/utils/FileTypeIconMap.ts b/packages/react-components/file-type-icons-preview/library/src/utils/FileTypeIconMap.ts new file mode 100644 index 00000000000000..a324f893e1fbf3 --- /dev/null +++ b/packages/react-components/file-type-icons-preview/library/src/utils/FileTypeIconMap.ts @@ -0,0 +1,588 @@ +/** + * Enumeration of icon file names, and what extensions they map to. + * Please keep items alphabetical. Items without extensions may require specific logic in the code to map. + * Always use getFileTypeIconProps to get the most up-to-date icon at the right pixel density. + */ +export const FileTypeIconMap: { [key: string]: { extensions?: string[] } } = { + accdb: { + extensions: ['accdb', 'mdb'], + }, + aipage: { + extensions: ['page'], + }, + archive: { + extensions: ['7z', 'ace', 'arc', 'arj', 'dmg', 'gz', 'iso', 'lzh', 'pkg', 'rar', 'sit', 'tgz', 'tar', 'z'], + }, + album: {}, + audio: { + extensions: [ + 'aif', + 'aiff', + 'aac', + 'alac', + 'amr', + 'ape', + 'au', + 'awb', + 'dct', + 'dss', + 'dvf', + 'flac', + 'gsm', + 'm4a', + 'm4p', + 'mid', + 'mmf', + 'mp3', + 'oga', + 'ra', + 'rm', + 'wav', + 'wma', + 'wv', + ], + }, + calendar: { + extensions: ['ical', 'icalendar', 'ics', 'ifb', 'vcs'], + }, + classifier: { + extensions: ['classifier'], + }, + clipchamp: { + extensions: ['clipchamp'], + }, + cliptemplate: { + extensions: ['cliptemplate'], + }, + code: { + extensions: [ + 'abap', + 'ada', + 'adp', + 'ahk', + 'as', + 'as3', + 'asc', + 'ascx', + 'asm', + 'asp', + 'awk', + 'bash', + 'bash_login', + 'bash_logout', + 'bash_profile', + 'bashrc', + 'bat', + 'bib', + 'bsh', + 'build', + 'builder', + 'c', + 'cbl', + 'c++', + 'capfile', + 'cc', + 'cfc', + 'cfm', + 'cfml', + 'cl', + 'clj', + 'cls', + 'cmake', + 'cmd', + 'coffee', + 'config', + 'cpp', + 'cpt', + 'cpy', + 'cs', + 'cshtml', + 'cson', + 'csproj', + 'css', + 'ctp', + 'cxx', + 'd', + 'ddl', + 'di', + 'disco', + 'dml', + 'dtd', + 'dtml', + 'el', + 'emakefile', + 'erb', + 'erl', + 'f', + 'f90', + 'f95', + 'fs', + 'fsi', + 'fsscript', + 'fsx', + 'gemfile', + 'gemspec', + 'gitconfig', + 'go', + 'groovy', + 'gvy', + 'h', + 'h++', + 'haml', + 'handlebars', + 'hbs', + 'hcp', + 'hh', + 'hpp', + 'hrl', + 'hs', + 'htc', + 'hxx', + 'idl', + 'iim', + 'inc', + 'inf', + 'ini', + 'inl', + 'ipp', + 'irbrc', + 'jade', + 'jav', + 'java', + 'js', + 'json', + 'jsp', + 'jsproj', + 'jsx', + 'l', + 'less', + 'lhs', + 'lisp', + 'log', + 'lst', + 'ltx', + 'lua', + 'm', + 'mak', + 'make', + 'manifest', + 'master', + 'md', + 'markdn', + 'markdown', + 'mdown', + 'mkdn', + 'ml', + 'mli', + 'mll', + 'mly', + 'mm', + 'mud', + 'nfo', + 'opml', + 'osascript', + 'p', + 'pas', + 'patch', + 'php', + 'php2', + 'php3', + 'php4', + 'php5', + 'phtml', + 'pl', + 'pm', + 'pod', + 'pp', + 'profile', + 'ps1', + 'ps1xml', + 'psd1', + 'psm1', + 'pss', + 'pt', + 'py', + 'pyw', + 'r', + 'rake', + 'rb', + 'rbx', + 'rc', + 'rdf', + 're', + 'reg', + 'rest', + 'resw', + 'resx', + 'rhtml', + 'rjs', + 'rprofile', + 'rpy', + 'rss', + 'rst', + 'ruby', + 'rxml', + 's', + 'sass', + 'scala', + 'scm', + 'sconscript', + 'sconstruct', + 'script', + 'scss', + 'sgml', + 'sh', + 'shtml', + 'sml', + 'svn-base', + 'swift', + 'sql', + 'sty', + 'tcl', + 'tex', + 'textile', + 'tld', + 'tli', + 'tmpl', + 'tpl', + 'vb', + 'vi', + 'vim', + 'vmg', + 'webpart', + 'wsp', + 'wsdl', + 'xhtml', + 'xoml', + 'xsd', + 'xslt', + 'yaml', + 'yaws', + 'yml', + 'zsh', + ], + }, + contact: { + extensions: ['vcf'], + }, + copilot: { + extensions: ['copilot'], + }, + /* css: {}, not broken out yet, snapping to 'code' for now */ + csv: { + extensions: ['csv'], + }, + designer: { + extensions: ['design'], + }, + desktopfolder: {}, + docset: {}, + documentsfolder: {}, + docx: { + extensions: ['doc', 'docm', 'docx', 'docb'], + }, + dotx: { + extensions: ['dot', 'dotm', 'dotx'], + }, + email: { + extensions: ['eml', 'msg', 'oft', 'ost', 'pst'], + }, + exe: { + extensions: ['application', 'appref-ms', 'apk', 'app', 'appx', 'exe', 'ipa', 'msi', 'xap'], + }, + favoritesfolder: {}, + folder: {}, + font: { + extensions: ['ttf', 'otf', 'woff'], + }, + form: {}, + genericfile: {}, + html: { + extensions: ['htm', 'html', 'mht', 'mhtml'], + }, + ipynb: { + extensions: ['nnb', 'ipynb'], + }, + link: { + extensions: ['lnk', 'link', 'url', 'website', 'webloc'], + }, + linkedfolder: {}, + listform: {}, + listitem: {}, + loop: { + extensions: ['fluid', 'loop', 'note'], + }, + loopworkspace: {}, + officescript: { + extensions: ['osts'], + }, + splist: {}, + mcworld: { + extensions: ['mcworld'], + }, + mctemplate: { + extensions: ['mctemplate'], + }, + model: { + extensions: [ + '3ds', + '3mf', + 'blend', + 'cool', + 'dae', + 'df', + 'dwfx', + 'dwg', + 'dxf', + 'fbx', + 'glb', + 'gltf', + 'holo', + 'layer', + 'layout', + 'max', + 'mtl', + 'obj', + 'off', + 'ply', + 'skp', + 'stp', + 'stl', + 't', + 'thl', + 'x', + ], + }, + mpp: { + extensions: ['mpp'], + }, + mpt: { + extensions: ['mpt'], + }, + multiple: {}, + one: { + // This is a partial OneNote page or section export. Not whole notebooks, see "onetoc" + extensions: ['one', 'onepart'], + }, + onepage: { + extensions: ['onepage'], + }, + onetoc: { + // This is an entire OneNote notebook. + extensions: ['ms-one-stub', 'onetoc', 'onetoc2', 'onepkg'], // This represents a complete, logical notebook. + }, + pbiapp: {}, + pdf: { + extensions: ['pdf'], + }, + photo: { + extensions: [ + 'arw', + 'bmp', + 'cr2', + 'crw', + 'dic', + 'dicm', + 'dcm', + 'dcm30', + 'dcr', + 'dds', + 'dib', + 'dng', + 'erf', + 'gif', + 'heic', + 'heif', + 'ico', + 'jfi', + 'jfif', + 'jif', + 'jpe', + 'jpeg', + 'jpg', + 'jxr', + 'kdc', + 'mrw', + 'nef', + 'orf', + 'pct', + 'pict', + 'png', + 'pns', + 'psb', + 'psd', + 'raw', + 'tga', + 'tif', + 'tiff', + 'wdp', + ], + }, + photo360: {}, + picturesfolder: {}, + planner: {}, + portfolio: {}, + potx: { + extensions: ['pot', 'potm', 'potx'], + }, + powerbi: { + extensions: ['pbids', 'pbix'], + }, + ppsx: { + extensions: ['pps', 'ppsm', 'ppsx'], + }, + pptx: { + extensions: ['ppt', 'pptm', 'pptx', 'sldx', 'sldm'], + }, + presentation: { + extensions: ['odp', 'gslides', 'key'], + }, + pub: { + extensions: ['pub'], + }, + spo: { + extensions: ['aspx'], + }, + sponews: {}, + spreadsheet: { + extensions: ['odc', 'ods', 'gsheet', 'numbers', 'tsv'], + }, + rtf: { + extensions: ['epub', 'gdoc', 'odt', 'rtf', 'wri', 'pages'], + }, + sharedfolder: {}, + playlist: {}, + sway: {}, + sysfile: { + extensions: [ + 'bak', + 'bin', + 'cab', + 'cache', + 'cat', + 'cer', + 'class', + 'dat', + 'db', + 'dbg', + 'dl_', + 'dll', + 'ithmb', + 'jar', + 'kb', + 'ldt', + 'lrprev', + 'pkpass', + 'ppa', + 'ppam', + 'pdb', + 'rom', + 'thm', + 'thmx', + 'vsl', + 'xla', + 'xlam', + 'xlb', + 'xll', + ], + }, + todoitem: {}, + txt: { + extensions: ['dif', 'diff', 'readme', 'out', 'plist', 'properties', 'text', 'txt'], + }, + vaultclosed: {}, + vaultopen: {}, + vector: { + extensions: [ + 'ai', + 'ait', + 'cvs', + 'dgn', + 'gdraw', + 'pd', + 'emf', + 'eps', + 'fig', + 'ind', + 'indd', + 'indl', + 'indt', + 'indb', + 'ps', + 'svg', + 'svgz', + 'wmf', + 'oxps', + 'xps', + 'xd', + 'sketch', + ], + }, + video: { + extensions: [ + '3g2', + '3gp', + '3gp2', + '3gpp', + 'asf', + 'avi', + 'dvr-ms', + 'flv', + 'm1v', + 'm4v', + 'mkv', + 'mod', + 'mov', + 'mm4p', + 'mp2', + 'mp2v', + 'mp4', + 'mp4v', + 'mpa', + 'mpe', + 'mpeg', + 'mpg', + 'mpv', + 'mpv2', + 'mts', + 'ogg', + 'qt', + 'swf', + 'ts', + 'vob', + 'webm', + 'wlmp', + 'wm', + 'wmv', + 'wmx', + ], + }, + video360: {}, + vsdx: { + extensions: ['vdx', 'vsd', 'vsdm', 'vsdx', 'vsw', 'vdw'], + }, + vssx: { + extensions: ['vss', 'vssm', 'vssx'], + }, + vstx: { + extensions: ['vst', 'vstm', 'vstx', 'vsx'], + }, + whiteboard: { + extensions: ['whiteboard', 'wbtx'], + }, + xlsx: { + extensions: ['xlc', 'xls', 'xlsb', 'xlsm', 'xlsx', 'xlw'], + }, + xltx: { + extensions: ['xlt', 'xltm', 'xltx'], + }, + xml: { + extensions: ['xaml', 'xml', 'xsl'], + }, + xsn: { + extensions: ['xsn'], + }, + zip: { + extensions: ['zip'], + }, +}; diff --git a/packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconProps.ts b/packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconProps.ts new file mode 100644 index 00000000000000..3c69469e2587cf --- /dev/null +++ b/packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconProps.ts @@ -0,0 +1,220 @@ +import { FileTypeIconMap } from './FileTypeIconMap'; +import { FileIconType } from './FileIconType'; +import type { FileIconTypeInput } from './FileIconType'; + +let _extensionToIconName: { [key: string]: string }; + +const GENERIC_FILE = 'genericfile'; +const FOLDER = 'folder'; +const SHARED_FOLDER = 'sharedfolder'; +const DOCSET_FOLDER = 'docset'; +const LIST_ITEM = 'listitem'; +const LIST = 'splist'; +const MULTIPLE_ITEMS = 'multiple'; +const NEWS = 'sponews'; +const STREAM = 'video'; +const DESKTOP_FOLDER = 'desktopfolder'; +const DOCUMENTS_FOLDER = 'documentsfolder'; +const PICTURES_FOLDER = 'picturesfolder'; +const LINKED_FOLDER = 'linkedfolder'; +const FORM = 'form'; +const SWAY = 'sway'; +const PLAYLIST = 'playlist'; +const LOOP_WORKSPACE = 'loopworkspace'; +const TODOITEM = 'todoitem'; +const PLANNER = 'planner'; +const PORTFOLIO = 'portfolio'; +const ALBUM = 'album'; +const LIST_FORM = 'listform'; + +export const DEFAULT_ICON_SIZE: FileTypeIconSize = 16; +export type FileTypeIconSize = 16 | 20 | 24 | 32 | 40 | 48 | 64 | 96; +export type ImageFileType = 'svg' | 'png'; + +export interface IFileTypeIconOptions { + /** + * The file extension, such as .pptx, for which you need an icon. + * For file type icons that are not associated with a file + * extension, such as folder, use the type property. + */ + extension?: string; + /** + * The type of file type icon you need. Use this property for + * file type icons that are not associated with a file extension, + * such as folder. + */ + type?: FileIconTypeInput; + /** + * The size of the icon in pixels. + * @default 16 + */ + size?: FileTypeIconSize; + /** + * The type of image file to use. Can be svg or png. + * @default 'svg' + */ + imageFileType?: ImageFileType; +} + +/** + * This function returns properties for a file type icon given the IFileTypeIconOptions. + * It accounts for different device pixel ratios. For example, + * `getFileTypeIconProps({ extension: 'doc', size: 16, imageFileType: 'png' })` + * will return `{ iconName: 'docx16_2x_png' }` if the `devicePixelRatio` is 2. + * @param options - Configuration options for the file type icon + */ +export function getFileTypeIconProps(options: IFileTypeIconOptions): { iconName: string; 'aria-label'?: string } { + // First, obtain the base name of the icon using the extension or type. + const { extension, type, size, imageFileType } = options; + + const iconBaseName = getFileTypeIconNameFromExtensionOrType(extension, type); + + // Next, obtain the suffix using the icon size, user's device pixel ratio, and + // preference for svg or png + const _size: FileTypeIconSize = size || DEFAULT_ICON_SIZE; + const suffix: string = getFileTypeIconSuffix(_size, imageFileType); + + return { iconName: iconBaseName + suffix, 'aria-label': extension }; +} + +/** + * Gets the base icon name from a file extension or file icon type. + * @param extension - The file extension (e.g., 'docx', 'pdf') + * @param type - The file icon type for non-extension icons + * @returns The base icon name + */ +export function getFileTypeIconNameFromExtensionOrType( + extension: string | undefined, + type: FileIconType | undefined, +): string { + let iconBaseName: string | undefined; + if (extension) { + if (!_extensionToIconName) { + _extensionToIconName = {}; + + for (const iconName in FileTypeIconMap) { + if (FileTypeIconMap.hasOwnProperty(iconName)) { + const extensions = FileTypeIconMap[iconName].extensions; + + if (extensions) { + for (let i = 0; i < extensions.length; i++) { + _extensionToIconName[extensions[i]] = iconName; + } + } + } + } + } + + // Strip periods, force lowercase. + extension = extension.replace('.', '').toLowerCase(); + return _extensionToIconName[extension] || GENERIC_FILE; + } else if (type) { + switch (type) { + case FileIconType.docset: + iconBaseName = DOCSET_FOLDER; + break; + case FileIconType.folder: + iconBaseName = FOLDER; + break; + case FileIconType.listItem: + iconBaseName = LIST_ITEM; + break; + case FileIconType.sharedFolder: + iconBaseName = SHARED_FOLDER; + break; + case FileIconType.stream: + iconBaseName = STREAM; + break; + case FileIconType.multiple: + iconBaseName = MULTIPLE_ITEMS; + break; + case FileIconType.news: + iconBaseName = NEWS; + break; + case FileIconType.desktopFolder: + iconBaseName = DESKTOP_FOLDER; + break; + case FileIconType.documentsFolder: + iconBaseName = DOCUMENTS_FOLDER; + break; + case FileIconType.picturesFolder: + iconBaseName = PICTURES_FOLDER; + break; + case FileIconType.linkedFolder: + iconBaseName = LINKED_FOLDER; + break; + case FileIconType.list: + iconBaseName = LIST; + break; + case FileIconType.form: + iconBaseName = FORM; + break; + case FileIconType.sway: + iconBaseName = SWAY; + break; + case FileIconType.playlist: + iconBaseName = PLAYLIST; + break; + case FileIconType.loopworkspace: + iconBaseName = LOOP_WORKSPACE; + break; + case FileIconType.planner: + iconBaseName = PLANNER; + break; + case FileIconType.todoItem: + iconBaseName = TODOITEM; + break; + case FileIconType.portfolio: + iconBaseName = PORTFOLIO; + break; + case FileIconType.album: + iconBaseName = ALBUM; + break; + case FileIconType.listForm: + iconBaseName = LIST_FORM; + break; + } + } + return iconBaseName || GENERIC_FILE; +} + +/** + * Gets the suffix for the icon name based on size, file type, and device pixel ratio. + * @param size - The icon size in pixels + * @param imageFileType - The image file type ('svg' or 'png') + * @param win - Optional window object for testing + * @returns The icon name suffix + */ +export function getFileTypeIconSuffix( + size: FileTypeIconSize, + imageFileType: ImageFileType = 'svg', + win?: Window, +): string { + // eslint-disable-next-line no-restricted-globals + win ??= window; + const devicePixelRatio: number = win.devicePixelRatio; + let devicePixelRatioSuffix = ''; // Default is 1x + + // SVGs scale well, so you can generally use the default image. + // 1.5x is a special case where SVGs need a different image. + if (imageFileType === 'svg' && devicePixelRatio > 1 && devicePixelRatio <= 1.5) { + // Currently missing 1.5x SVGs at size 20, snap to 1x for now + if (size !== 20) { + devicePixelRatioSuffix = '_1.5x'; + } + } else if (imageFileType === 'png') { + // To look good, PNGs should use a different image for higher device pixel ratios + if (devicePixelRatio > 1 && devicePixelRatio <= 1.5) { + // Currently missing 1.5x icons for size 20, snap to 2x for now + devicePixelRatioSuffix = size === 20 ? '_2x' : '_1.5x'; + } else if (devicePixelRatio > 1.5 && devicePixelRatio <= 2) { + devicePixelRatioSuffix = '_2x'; + } else if (devicePixelRatio > 2 && devicePixelRatio <= 3) { + devicePixelRatioSuffix = '_3x'; + } else if (devicePixelRatio > 3) { + devicePixelRatioSuffix = '_4x'; + } + } + + return size + devicePixelRatioSuffix + '_' + imageFileType; +} diff --git a/packages/react-components/file-type-icons-preview/library/tsconfig.json b/packages/react-components/file-type-icons-preview/library/tsconfig.json new file mode 100644 index 00000000000000..32bdbdf1ac26f0 --- /dev/null +++ b/packages/react-components/file-type-icons-preview/library/tsconfig.json @@ -0,0 +1,22 @@ +{ + "extends": "../../../../tsconfig.base.json", + "compilerOptions": { + "target": "ES2019", + "noEmit": true, + "isolatedModules": true, + "importHelpers": true, + "jsx": "react", + "noUnusedLocals": true, + "preserveConstEnums": true + }, + "include": [], + "files": [], + "references": [ + { + "path": "./tsconfig.lib.json" + }, + { + "path": "./tsconfig.spec.json" + } + ] +} diff --git a/packages/react-components/file-type-icons-preview/library/tsconfig.lib.json b/packages/react-components/file-type-icons-preview/library/tsconfig.lib.json new file mode 100644 index 00000000000000..53066fdd11fff0 --- /dev/null +++ b/packages/react-components/file-type-icons-preview/library/tsconfig.lib.json @@ -0,0 +1,22 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "noEmit": false, + "lib": ["ES2019", "dom"], + "declaration": true, + "declarationDir": "../../../../dist/out-tsc/types", + "outDir": "../../../../dist/out-tsc", + "inlineSources": true, + "types": ["static-assets", "environment"] + }, + "exclude": [ + "./src/testing/**", + "**/*.spec.ts", + "**/*.spec.tsx", + "**/*.test.ts", + "**/*.test.tsx", + "**/*.stories.ts", + "**/*.stories.tsx" + ], + "include": ["./src/**/*.ts", "./src/**/*.tsx"] +} diff --git a/packages/react-components/file-type-icons-preview/library/tsconfig.spec.json b/packages/react-components/file-type-icons-preview/library/tsconfig.spec.json new file mode 100644 index 00000000000000..911456fe4b4d91 --- /dev/null +++ b/packages/react-components/file-type-icons-preview/library/tsconfig.spec.json @@ -0,0 +1,17 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "CommonJS", + "outDir": "dist", + "types": ["jest", "node"] + }, + "include": [ + "**/*.spec.ts", + "**/*.spec.tsx", + "**/*.test.ts", + "**/*.test.tsx", + "**/*.d.ts", + "./src/testing/**/*.ts", + "./src/testing/**/*.tsx" + ] +} diff --git a/packages/react-components/file-type-icons-preview/stories/.storybook/main.js b/packages/react-components/file-type-icons-preview/stories/.storybook/main.js new file mode 100644 index 00000000000000..67905c6bfe15f2 --- /dev/null +++ b/packages/react-components/file-type-icons-preview/stories/.storybook/main.js @@ -0,0 +1,14 @@ +const rootMain = require('../../../../../.storybook/main'); + +module.exports = /** @type {Omit} */ ({ + ...rootMain, + stories: [...rootMain.stories, '../src/**/*.mdx', '../src/**/index.stories.@(ts|tsx)'], + addons: [...rootMain.addons], + webpackFinal: (config, options) => { + const localConfig = { ...rootMain.webpackFinal(config, options) }; + + // add your own webpack tweaks if needed + + return localConfig; + }, +}); diff --git a/packages/react-components/file-type-icons-preview/stories/.storybook/preview.js b/packages/react-components/file-type-icons-preview/stories/.storybook/preview.js new file mode 100644 index 00000000000000..98274ed0b8095f --- /dev/null +++ b/packages/react-components/file-type-icons-preview/stories/.storybook/preview.js @@ -0,0 +1,9 @@ +import * as rootPreview from '../../../../../.storybook/preview'; + +/** @type {typeof rootPreview.decorators} */ +export const decorators = [...rootPreview.decorators]; + +/** @type {typeof rootPreview.parameters} */ +export const parameters = { ...rootPreview.parameters }; + +export const tags = ['autodocs']; diff --git a/packages/react-components/file-type-icons-preview/stories/.storybook/tsconfig.json b/packages/react-components/file-type-icons-preview/stories/.storybook/tsconfig.json new file mode 100644 index 00000000000000..4cdd1ce9d006f1 --- /dev/null +++ b/packages/react-components/file-type-icons-preview/stories/.storybook/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "outDir": "", + "allowJs": true, + "checkJs": true, + "types": ["static-assets", "environment"] + }, + "include": ["*.js"] +} diff --git a/packages/react-components/file-type-icons-preview/stories/README.md b/packages/react-components/file-type-icons-preview/stories/README.md new file mode 100644 index 00000000000000..ee82402c29b63a --- /dev/null +++ b/packages/react-components/file-type-icons-preview/stories/README.md @@ -0,0 +1,17 @@ +# @fluentui/file-type-icons-preview-stories + +Storybook stories for packages/react-components/file-type-icons-preview + +## Usage + +To include within storybook specify stories globs: + +\`\`\`js +module.exports = { +stories: ['../packages/react-components/file-type-icons-preview/stories/src/**/*.mdx', '../packages/react-components/file-type-icons-preview/stories/src/**/index.stories.@(ts|tsx)'], +} +\`\`\` + +## API + +no public API available diff --git a/packages/react-components/file-type-icons-preview/stories/eslint.config.js b/packages/react-components/file-type-icons-preview/stories/eslint.config.js new file mode 100644 index 00000000000000..8d88b5e748085d --- /dev/null +++ b/packages/react-components/file-type-icons-preview/stories/eslint.config.js @@ -0,0 +1,12 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': ['error', { packageDir: ['.', '../../../../'] }], + }, + }, +]; diff --git a/packages/react-components/file-type-icons-preview/stories/package.json b/packages/react-components/file-type-icons-preview/stories/package.json new file mode 100644 index 00000000000000..bc589fd28cb512 --- /dev/null +++ b/packages/react-components/file-type-icons-preview/stories/package.json @@ -0,0 +1,11 @@ +{ + "name": "@fluentui/file-type-icons-preview-stories", + "version": "0.0.0", + "private": true, + "devDependencies": { + "@fluentui/react-storybook-addon": "*", + "@fluentui/react-storybook-addon-export-to-sandbox": "*", + "@fluentui/scripts-storybook": "*", + "@fluentui/eslint-plugin": "*" + } +} diff --git a/packages/react-components/file-type-icons-preview/stories/project.json b/packages/react-components/file-type-icons-preview/stories/project.json new file mode 100644 index 00000000000000..8a5f776b3250ea --- /dev/null +++ b/packages/react-components/file-type-icons-preview/stories/project.json @@ -0,0 +1,8 @@ +{ + "name": "file-type-icons-preview-stories", + "$schema": "../../../../node_modules/nx/schemas/project-schema.json", + "projectType": "library", + "sourceRoot": "packages/react-components/file-type-icons-preview/stories/src", + "tags": ["vNext", "platform:web", "type:stories"], + "implicitDependencies": [] +} diff --git a/packages/react-components/file-type-icons-preview/stories/src/.gitkeep b/packages/react-components/file-type-icons-preview/stories/src/.gitkeep new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconCommon.stories.tsx b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconCommon.stories.tsx new file mode 100644 index 00000000000000..6c05d0b3d4bf64 --- /dev/null +++ b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconCommon.stories.tsx @@ -0,0 +1,64 @@ +import * as React from 'react'; +import type { JSXElement } from '@fluentui/react-components'; +import { FileTypeIcon } from '@fluentui/file-type-icons-preview'; +import { makeStyles } from '@griffel/react'; + +const useStyles = makeStyles({ + container: { + display: 'grid', + gridTemplateColumns: 'repeat(auto-fill, minmax(120px, 1fr))', + gap: '16px', + }, + item: { + display: 'flex', + flexDirection: 'column', + alignItems: 'center', + gap: '8px', + }, + label: { + fontSize: '12px', + textAlign: 'center', + }, +}); + +const commonExtensions = [ + 'docx', + 'xlsx', + 'pptx', + 'pdf', + 'txt', + 'zip', + 'png', + 'jpg', + 'mp4', + 'mp3', + 'html', + 'css', + 'js', + 'json', + 'xml', + 'csv', +]; + +export const CommonFileTypes = (): JSXElement => { + const styles = useStyles(); + + return ( +
+ {commonExtensions.map(ext => ( +
+ +
.{ext}
+
+ ))} +
+ ); +}; + +CommonFileTypes.parameters = { + docs: { + description: { + story: 'FileTypeIcon displays different icons for various common file types and extensions.', + }, + }, +}; diff --git a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx new file mode 100644 index 00000000000000..ae1ba2eed2f3c2 --- /dev/null +++ b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx @@ -0,0 +1,6 @@ +import * as React from 'react'; +import type { JSXElement } from '@fluentui/react-components'; +import { FileTypeIcon } from '@fluentui/file-type-icons-preview'; +import type { FileTypeIconProps } from '@fluentui/file-type-icons-preview'; + +export const Default = (props: Partial): JSXElement => ; diff --git a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconDescription.md b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconDescription.md new file mode 100644 index 00000000000000..c8ed40f13b3c93 --- /dev/null +++ b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconDescription.md @@ -0,0 +1,13 @@ +# FileTypeIcon + +FileTypeIcon displays an icon representing a file type based on its extension or a special type (like folder). + +The component automatically selects the appropriate icon from the Fluent Design file type icon set and handles device pixel ratio for optimal display quality. + +## Features + +- **Automatic icon selection**: Matches file extensions to the appropriate icon +- **Multiple sizes**: Supports 16, 20, 24, 32, 40, 48, 64, and 96 pixel sizes +- **Format support**: Renders icons as SVG or PNG +- **Special types**: Supports non-file-based icons like folders, list items, etc. +- **Accessibility**: Includes appropriate alt text for screen readers diff --git a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconSizes.stories.tsx b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconSizes.stories.tsx new file mode 100644 index 00000000000000..1b443b1593327c --- /dev/null +++ b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconSizes.stories.tsx @@ -0,0 +1,69 @@ +import * as React from 'react'; +import type { JSXElement } from '@fluentui/react-components'; +import { FileTypeIcon } from '@fluentui/file-type-icons-preview'; +import { makeStyles } from '@griffel/react'; + +const useStyles = makeStyles({ + container: { + display: 'flex', + flexDirection: 'column', + gap: '16px', + }, + row: { + display: 'flex', + alignItems: 'center', + gap: '8px', + }, + label: { + width: '100px', + }, +}); + +export const Sizes = (): JSXElement => { + const styles = useStyles(); + + return ( +
+
+
16px:
+ +
+
+
20px:
+ +
+
+
24px:
+ +
+
+
32px:
+ +
+
+
40px:
+ +
+
+
48px:
+ +
+
+
64px:
+ +
+
+
96px:
+ +
+
+ ); +}; + +Sizes.parameters = { + docs: { + description: { + story: 'FileTypeIcon supports multiple sizes: 16, 20, 24, 32, 40, 48, 64, and 96 pixels.', + }, + }, +}; diff --git a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconSpecialTypes.stories.tsx b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconSpecialTypes.stories.tsx new file mode 100644 index 00000000000000..cb8433b1860928 --- /dev/null +++ b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconSpecialTypes.stories.tsx @@ -0,0 +1,54 @@ +import * as React from 'react'; +import type { JSXElement } from '@fluentui/react-components'; +import { FileTypeIcon, FileIconType } from '@fluentui/file-type-icons-preview'; +import { makeStyles } from '@griffel/react'; + +const useStyles = makeStyles({ + container: { + display: 'grid', + gridTemplateColumns: 'repeat(auto-fill, minmax(120px, 1fr))', + gap: '16px', + }, + item: { + display: 'flex', + flexDirection: 'column', + alignItems: 'center', + gap: '8px', + }, + label: { + fontSize: '12px', + textAlign: 'center', + }, +}); + +const specialTypes = [ + { type: FileIconType.folder, label: 'Folder' }, + { type: FileIconType.genericFile, label: 'Generic File' }, + { type: FileIconType.sharedFolder, label: 'Shared Folder' }, + { type: FileIconType.listItem, label: 'List Item' }, + { type: FileIconType.docset, label: 'Docset' }, +]; + +export const SpecialTypes = (): JSXElement => { + const styles = useStyles(); + + return ( +
+ {specialTypes.map(({ type, label }) => ( +
+ +
{label}
+
+ ))} +
+ ); +}; + +SpecialTypes.parameters = { + docs: { + description: { + story: + 'FileTypeIcon supports special file types that are not based on file extensions, such as folders and list items.', + }, + }, +}; diff --git a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/index.stories.tsx b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/index.stories.tsx new file mode 100644 index 00000000000000..04b09445521579 --- /dev/null +++ b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/index.stories.tsx @@ -0,0 +1,22 @@ +import * as React from 'react'; +import { FileTypeIcon } from '@fluentui/file-type-icons-preview'; +import type { Meta } from '@storybook/react'; + +export { Default } from './FileTypeIconDefault.stories'; +export { Sizes } from './FileTypeIconSizes.stories'; +export { CommonFileTypes } from './FileTypeIconCommon.stories'; +export { SpecialTypes } from './FileTypeIconSpecialTypes.stories'; + +import descriptionMd from './FileTypeIconDescription.md'; + +export default { + title: 'Preview Components/FileTypeIcon', + component: FileTypeIcon, + parameters: { + docs: { + description: { + component: descriptionMd, + }, + }, + }, +} as Meta; diff --git a/packages/react-components/file-type-icons-preview/stories/src/index.ts b/packages/react-components/file-type-icons-preview/stories/src/index.ts new file mode 100644 index 00000000000000..cb0ff5c3b541f6 --- /dev/null +++ b/packages/react-components/file-type-icons-preview/stories/src/index.ts @@ -0,0 +1 @@ +export {}; diff --git a/packages/react-components/file-type-icons-preview/stories/tsconfig.json b/packages/react-components/file-type-icons-preview/stories/tsconfig.json new file mode 100644 index 00000000000000..efc50169d1df18 --- /dev/null +++ b/packages/react-components/file-type-icons-preview/stories/tsconfig.json @@ -0,0 +1,22 @@ +{ + "extends": "../../../../tsconfig.base.json", + "compilerOptions": { + "target": "ES2019", + "noEmit": true, + "isolatedModules": true, + "importHelpers": true, + "jsx": "react", + "noUnusedLocals": true, + "preserveConstEnums": true + }, + "include": [], + "files": [], + "references": [ + { + "path": "./tsconfig.lib.json" + }, + { + "path": "./.storybook/tsconfig.json" + } + ] +} diff --git a/packages/react-components/file-type-icons-preview/stories/tsconfig.lib.json b/packages/react-components/file-type-icons-preview/stories/tsconfig.lib.json new file mode 100644 index 00000000000000..9486b224643d9f --- /dev/null +++ b/packages/react-components/file-type-icons-preview/stories/tsconfig.lib.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "lib": ["ES2019", "dom"], + "outDir": "../../../../dist/out-tsc", + "inlineSources": true, + "types": ["static-assets", "environment"] + }, + "include": ["./src/**/*.ts", "./src/**/*.tsx"] +} diff --git a/packages/react-components/react-shared-contexts/library/etc/react-shared-contexts.api.md b/packages/react-components/react-shared-contexts/library/etc/react-shared-contexts.api.md index 32323a2d71971f..6443cf2b761338 100644 --- a/packages/react-components/react-shared-contexts/library/etc/react-shared-contexts.api.md +++ b/packages/react-components/react-shared-contexts/library/etc/react-shared-contexts.api.md @@ -97,6 +97,7 @@ export const CustomStyleHooksContext_unstable: React_2.Context Date: Sun, 23 Nov 2025 14:06:23 -0800 Subject: [PATCH 015/120] refreshing filetype icon references in other storybooks to new icon style (TO-DO: These should be updated to use getFileTypeIconProps with default CDN URL location to perma-fix) --- apps/pr-deploy-site/chiclet-test.html | 2 +- apps/vr-tests/src/stories/Tile.stories.tsx | 2 +- .../src/react-experiments/Chiclet/Chiclet.Basic.Example.tsx | 2 +- .../react-experiments/Chiclet/Chiclet.Breadcrumb.Example.tsx | 2 +- .../src/react-experiments/Chiclet/Chiclet.Xsmall.Example.tsx | 2 +- .../react-experiments/Chiclet/Chiclet.Xsmall.Footer.Example.tsx | 2 +- .../src/react-experiments/Tile/Tile.Document.Example.tsx | 2 +- .../src/react/Pickers/Picker.CustomResult.Example.tsx | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/pr-deploy-site/chiclet-test.html b/apps/pr-deploy-site/chiclet-test.html index 8d4c379d0202ad..ae9b4e3cb1a204 100644 --- a/apps/pr-deploy-site/chiclet-test.html +++ b/apps/pr-deploy-site/chiclet-test.html @@ -16,7 +16,7 @@ /> Chiclet Test Page diff --git a/apps/vr-tests/src/stories/Tile.stories.tsx b/apps/vr-tests/src/stories/Tile.stories.tsx index b0fb8a9652e943..5c56cf11000838 100644 --- a/apps/vr-tests/src/stories/Tile.stories.tsx +++ b/apps/vr-tests/src/stories/Tile.stories.tsx @@ -142,7 +142,7 @@ export const DocumentTileWithIcon = () => ( itemActivity={}>{'Test Activity'}} foreground={ = () => { diff --git a/packages/react-examples/src/react-experiments/Chiclet/Chiclet.Breadcrumb.Example.tsx b/packages/react-examples/src/react-experiments/Chiclet/Chiclet.Breadcrumb.Example.tsx index 32298d06aa8348..27c1ac3327bbb6 100644 --- a/packages/react-examples/src/react-experiments/Chiclet/Chiclet.Breadcrumb.Example.tsx +++ b/packages/react-examples/src/react-experiments/Chiclet/Chiclet.Breadcrumb.Example.tsx @@ -52,7 +52,7 @@ export class ChicletBreadcrumbExample extends React.Component { diff --git a/packages/react-examples/src/react-experiments/Chiclet/Chiclet.Xsmall.Example.tsx b/packages/react-examples/src/react-experiments/Chiclet/Chiclet.Xsmall.Example.tsx index 1a3cf023fe8e72..f915bb7d9336d6 100644 --- a/packages/react-examples/src/react-experiments/Chiclet/Chiclet.Xsmall.Example.tsx +++ b/packages/react-examples/src/react-experiments/Chiclet/Chiclet.Xsmall.Example.tsx @@ -8,7 +8,7 @@ export const ChicletXsmallExample: React.FunctionComponent<{}> = () => { diff --git a/packages/react-examples/src/react-experiments/Chiclet/Chiclet.Xsmall.Footer.Example.tsx b/packages/react-examples/src/react-experiments/Chiclet/Chiclet.Xsmall.Footer.Example.tsx index 7b10220e0a73e2..ec47f88ea8d9a7 100644 --- a/packages/react-examples/src/react-experiments/Chiclet/Chiclet.Xsmall.Footer.Example.tsx +++ b/packages/react-examples/src/react-experiments/Chiclet/Chiclet.Xsmall.Footer.Example.tsx @@ -51,7 +51,7 @@ export const ChicletXsmallFooterExample: React.FunctionComponent<{}> = () => { }>{ITEMS[3].activity}} foreground={ Date: Sun, 23 Nov 2025 15:23:06 -0800 Subject: [PATCH 016/120] more touch-ups in other places that reference the CDN url --- apps/pr-deploy-site/chiclet-test.html | 2 +- apps/vr-tests/src/stories/Tile.stories.tsx | 2 +- .../src/react-experiments/Chiclet/Chiclet.Basic.Example.tsx | 2 +- .../react-experiments/Chiclet/Chiclet.Breadcrumb.Example.tsx | 2 +- .../src/react-experiments/Chiclet/Chiclet.Xsmall.Example.tsx | 2 +- .../react-experiments/Chiclet/Chiclet.Xsmall.Footer.Example.tsx | 2 +- .../src/react-experiments/Tile/Tile.Document.Example.tsx | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/pr-deploy-site/chiclet-test.html b/apps/pr-deploy-site/chiclet-test.html index ae9b4e3cb1a204..32f79c65016e8e 100644 --- a/apps/pr-deploy-site/chiclet-test.html +++ b/apps/pr-deploy-site/chiclet-test.html @@ -16,7 +16,7 @@ /> Chiclet Test Page diff --git a/apps/vr-tests/src/stories/Tile.stories.tsx b/apps/vr-tests/src/stories/Tile.stories.tsx index 5c56cf11000838..eedce33d890865 100644 --- a/apps/vr-tests/src/stories/Tile.stories.tsx +++ b/apps/vr-tests/src/stories/Tile.stories.tsx @@ -142,7 +142,7 @@ export const DocumentTileWithIcon = () => ( itemActivity={}>{'Test Activity'}} foreground={ = () => { diff --git a/packages/react-examples/src/react-experiments/Chiclet/Chiclet.Breadcrumb.Example.tsx b/packages/react-examples/src/react-experiments/Chiclet/Chiclet.Breadcrumb.Example.tsx index 27c1ac3327bbb6..8c497b96c6d559 100644 --- a/packages/react-examples/src/react-experiments/Chiclet/Chiclet.Breadcrumb.Example.tsx +++ b/packages/react-examples/src/react-experiments/Chiclet/Chiclet.Breadcrumb.Example.tsx @@ -52,7 +52,7 @@ export class ChicletBreadcrumbExample extends React.Component { diff --git a/packages/react-examples/src/react-experiments/Chiclet/Chiclet.Xsmall.Example.tsx b/packages/react-examples/src/react-experiments/Chiclet/Chiclet.Xsmall.Example.tsx index f915bb7d9336d6..672f3543e68ba2 100644 --- a/packages/react-examples/src/react-experiments/Chiclet/Chiclet.Xsmall.Example.tsx +++ b/packages/react-examples/src/react-experiments/Chiclet/Chiclet.Xsmall.Example.tsx @@ -8,7 +8,7 @@ export const ChicletXsmallExample: React.FunctionComponent<{}> = () => { diff --git a/packages/react-examples/src/react-experiments/Chiclet/Chiclet.Xsmall.Footer.Example.tsx b/packages/react-examples/src/react-experiments/Chiclet/Chiclet.Xsmall.Footer.Example.tsx index ec47f88ea8d9a7..3040c6badad4a0 100644 --- a/packages/react-examples/src/react-experiments/Chiclet/Chiclet.Xsmall.Footer.Example.tsx +++ b/packages/react-examples/src/react-experiments/Chiclet/Chiclet.Xsmall.Footer.Example.tsx @@ -51,7 +51,7 @@ export const ChicletXsmallFooterExample: React.FunctionComponent<{}> = () => { }>{ITEMS[3].activity}} foreground={ Date: Sun, 23 Nov 2025 15:28:44 -0800 Subject: [PATCH 017/120] verified new file-type-icons-preview package is rendering icons in the storybook as expected --- .../bundle-size/FileTypeIcon.fixture.js | 2 +- .../etc/file-type-icons-preview.api.md | 16 +++++ .../library/package.json | 2 + .../FileTypeIcon/FileTypeIcon.types.ts | 2 +- .../FileTypeIcon/useFileTypeIcon.ts | 35 ++++++---- .../library/src/index.ts | 3 + .../src/utils/getFileTypeIconAsHTMLString.ts | 35 ++++++++++ .../library/src/utils/getFileTypeIconAsUrl.ts | 32 +++++++++ .../src/utils/initializeFileTypeIcons.tsx | 65 +++++++++++++++++++ 9 files changed, 178 insertions(+), 14 deletions(-) create mode 100644 packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconAsHTMLString.ts create mode 100644 packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconAsUrl.ts create mode 100644 packages/react-components/file-type-icons-preview/library/src/utils/initializeFileTypeIcons.tsx diff --git a/packages/react-components/file-type-icons-preview/library/bundle-size/FileTypeIcon.fixture.js b/packages/react-components/file-type-icons-preview/library/bundle-size/FileTypeIcon.fixture.js index 762816526dc35e..a22fdd167bf53c 100644 --- a/packages/react-components/file-type-icons-preview/library/bundle-size/FileTypeIcon.fixture.js +++ b/packages/react-components/file-type-icons-preview/library/bundle-size/FileTypeIcon.fixture.js @@ -1,4 +1,4 @@ -import { FileTypeIcon } from './FileTypeIcon'; +import { FileTypeIcon } from '@fluentui/file-type-icons-preview'; console.log(FileTypeIcon); diff --git a/packages/react-components/file-type-icons-preview/library/etc/file-type-icons-preview.api.md b/packages/react-components/file-type-icons-preview/library/etc/file-type-icons-preview.api.md index 777b08a66f0f02..1b3c1b7301f54a 100644 --- a/packages/react-components/file-type-icons-preview/library/etc/file-type-icons-preview.api.md +++ b/packages/react-components/file-type-icons-preview/library/etc/file-type-icons-preview.api.md @@ -7,11 +7,15 @@ import type { ComponentProps } from '@fluentui/react-utilities'; import type { ComponentState } from '@fluentui/react-utilities'; import type { ForwardRefComponent } from '@fluentui/react-utilities'; +import type { IIconOptions } from '@fluentui/style-utilities'; import type { JSXElement } from '@fluentui/react-utilities'; import * as React_2 from 'react'; import type { Slot } from '@fluentui/react-utilities'; import type { SlotClassNames } from '@fluentui/react-utilities'; +// @public (undocumented) +export const DEFAULT_BASE_URL = "https://res.cdn.office.net/files/fabric-cdn-prod_20251107.003/assets/item-types/"; + // @public (undocumented) export const DEFAULT_ICON_SIZE: FileTypeIconSize; @@ -101,6 +105,12 @@ export type FileTypeIconState = ComponentState & Required): void; + // @public export const renderFileTypeIcon_unstable: (state: FileTypeIconState) => JSXElement; diff --git a/packages/react-components/file-type-icons-preview/library/package.json b/packages/react-components/file-type-icons-preview/library/package.json index 6307ead298c4fe..53252c869c1a5c 100644 --- a/packages/react-components/file-type-icons-preview/library/package.json +++ b/packages/react-components/file-type-icons-preview/library/package.json @@ -29,6 +29,8 @@ "@fluentui/react-shared-contexts": "^9.26.0", "@fluentui/react-theme": "^9.2.0", "@fluentui/react-utilities": "^9.25.4", + "@fluentui/style-utilities": "^8.13.4", + "@fluentui/utilities": "^8.15.1", "@griffel/react": "^1.5.32", "@swc/helpers": "^0.5.1" }, diff --git a/packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/FileTypeIcon.types.ts b/packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/FileTypeIcon.types.ts index 241e6d0ba9d4da..ea78ccb2035986 100644 --- a/packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/FileTypeIcon.types.ts +++ b/packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/FileTypeIcon.types.ts @@ -38,7 +38,7 @@ export type FileTypeIconProps = ComponentProps & { /** * The base URL for the icon assets. If not provided, uses the default Fluent CDN. - * @default 'https://res-1.cdn.office.net/files/fabric-cdn-prod_20251119.001/assets/item-types/' + * @default 'https://res.cdn.office.net/files/fabric-cdn-prod_20251119.001/assets/item-types/' */ baseUrl?: string; }; diff --git a/packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/useFileTypeIcon.ts b/packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/useFileTypeIcon.ts index 560b6c41eac1f4..a72e21a594e51b 100644 --- a/packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/useFileTypeIcon.ts +++ b/packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/useFileTypeIcon.ts @@ -1,9 +1,13 @@ import * as React from 'react'; import { getIntrinsicElementProps, slot } from '@fluentui/react-utilities'; import type { FileTypeIconProps, FileTypeIconState } from './FileTypeIcon.types'; -import { getFileTypeIconProps, DEFAULT_ICON_SIZE } from '../../utils/getFileTypeIconProps'; +import { + getFileTypeIconNameFromExtensionOrType, + getFileTypeIconSuffix, + DEFAULT_ICON_SIZE, +} from '../../utils/getFileTypeIconProps'; -const DEFAULT_BASE_URL = 'https://res-1.cdn.office.net/files/fabric-cdn-prod_20251119.001/assets/item-types/'; +const DEFAULT_BASE_URL = 'https://res.cdn.office.net/files/fabric-cdn-prod_20251119.001/assets/item-types/'; /** * Returns the props and state required to render the FileTypeIcon component. @@ -20,16 +24,23 @@ export const useFileTypeIcon_unstable = ( baseUrl = DEFAULT_BASE_URL, } = props; - // Get the icon name using the utility function - const iconProps = getFileTypeIconProps({ - extension, - type, - size, - imageFileType, - }); + // Get the base icon name and suffix separately using v8 pattern + const baseIconName = getFileTypeIconNameFromExtensionOrType(extension, type); + const baseSuffix = getFileTypeIconSuffix(size, imageFileType); + const suffixArray = baseSuffix.split('_'); // eg: ['96', '3x', 'svg'] or ['96', 'svg'] - // Construct the full icon URL - const iconUrl = `${baseUrl}${iconProps.iconName}.${imageFileType}`; + // Construct the full icon URL using v8's folder-based pattern + let iconUrl: string; + if (suffixArray.length === 3) { + // suffix is of type 96_3x_svg - it has a pixel ratio > 1 + iconUrl = `${baseUrl}${size}_${suffixArray[1]}/${baseIconName}.${suffixArray[2]}`; + } else if (suffixArray.length === 2) { + // suffix is of type 96_svg - it has a pixel ratio of 1 + iconUrl = `${baseUrl}${size}/${baseIconName}.${suffixArray[1]}`; + } else { + // Fallback to 1x format for unexpected cases + iconUrl = `${baseUrl}${size}/${baseIconName}.${imageFileType}`; + } const state: FileTypeIconState = { size, @@ -42,7 +53,7 @@ export const useFileTypeIcon_unstable = ( getIntrinsicElementProps('img', { ref, src: iconUrl, - alt: iconProps['aria-label'] || 'File type icon', + alt: extension || 'File type icon', ...props, // Remove our custom props from being passed to the img element extension: undefined, diff --git a/packages/react-components/file-type-icons-preview/library/src/index.ts b/packages/react-components/file-type-icons-preview/library/src/index.ts index 591cfbed9e30c6..92f84fdce98496 100644 --- a/packages/react-components/file-type-icons-preview/library/src/index.ts +++ b/packages/react-components/file-type-icons-preview/library/src/index.ts @@ -23,3 +23,6 @@ export type { ImageFileType, IFileTypeIconOptions, } from './utils/getFileTypeIconProps'; +export { getFileTypeIconAsUrl } from './utils/getFileTypeIconAsUrl'; +export { getFileTypeIconAsHTMLString } from './utils/getFileTypeIconAsHTMLString'; +export { initializeFileTypeIcons, DEFAULT_BASE_URL, ICON_SIZES } from './utils/initializeFileTypeIcons'; diff --git a/packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconAsHTMLString.ts b/packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconAsHTMLString.ts new file mode 100644 index 00000000000000..ce9ddd23ac081c --- /dev/null +++ b/packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconAsHTMLString.ts @@ -0,0 +1,35 @@ +import { DEFAULT_BASE_URL } from './initializeFileTypeIcons'; +import { + getFileTypeIconNameFromExtensionOrType, + getFileTypeIconSuffix, + DEFAULT_ICON_SIZE, +} from './getFileTypeIconProps'; +import type { IFileTypeIconOptions } from './getFileTypeIconProps'; + +/** + * Given the `fileTypeIconOptions`, this function returns the DOM element for the `FileTypeIcon` + * as an HTML string. Similar to `getFileTypeIconProps`, this also accepts the same type of object + * but rather than returning the `iconName`, this returns the entire DOM element as a string. + * @param options + * @param baseUrl - optionally provide a custom CDN base url to fetch icons from + */ +export function getFileTypeIconAsHTMLString( + options: IFileTypeIconOptions, + baseUrl: string = DEFAULT_BASE_URL, +): string | undefined { + const { extension, size = DEFAULT_ICON_SIZE, type, imageFileType } = options; + const baseIconName = getFileTypeIconNameFromExtensionOrType(extension, type); // eg: docx + const baseSuffix = getFileTypeIconSuffix(size, imageFileType); // eg: 96_3x_svg or 96_png + const suffixArray = baseSuffix.split('_'); // eg: ['96', '3x', 'svg'] + + let src: string | undefined; + if (suffixArray.length === 3) { + /** suffix is of type 96_3x_svg - it has a pixel ratio > 1*/ + src = `${baseUrl}${size}_${suffixArray[1]}/${baseIconName}.${suffixArray[2]}`; + return ``; + } else if (suffixArray.length === 2) { + /** suffix is of type 96_svg - it has a pixel ratio of 1*/ + src = `${baseUrl}${size}/${baseIconName}.${suffixArray[1]}`; + return ``; + } +} diff --git a/packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconAsUrl.ts b/packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconAsUrl.ts new file mode 100644 index 00000000000000..73b7ae28ca07a9 --- /dev/null +++ b/packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconAsUrl.ts @@ -0,0 +1,32 @@ +import { DEFAULT_BASE_URL } from './initializeFileTypeIcons'; +import { + getFileTypeIconNameFromExtensionOrType, + getFileTypeIconSuffix, + DEFAULT_ICON_SIZE, +} from './getFileTypeIconProps'; +import type { IFileTypeIconOptions } from './getFileTypeIconProps'; + +/** + * Given the `fileTypeIconOptions`, this function returns the CDN-based URL for `FileTypeIcon`. + * Similar to `getFileTypeIconProps`, this also accepts the same type of object + * but rather than returning the `iconName`, this returns the raw URL. + * @param options + * @param baseUrl - optionally provide a custom CDN base url to fetch icons from + */ +export function getFileTypeIconAsUrl( + options: IFileTypeIconOptions, + baseUrl: string = DEFAULT_BASE_URL, +): string | undefined { + const { extension, size = DEFAULT_ICON_SIZE, type, imageFileType } = options; + const baseIconName = getFileTypeIconNameFromExtensionOrType(extension, type); // eg: docx + const baseSuffix = getFileTypeIconSuffix(size, imageFileType); // eg: 96_3x_svg or 96_png + const suffixArray = baseSuffix.split('_'); // eg: ['96', '3x', 'svg'] + + if (suffixArray.length === 3) { + /** suffix is of type 96_3x_svg - it has a pixel ratio > 1*/ + return `${baseUrl}${size}_${suffixArray[1]}/${baseIconName}.${suffixArray[2]}`; + } else if (suffixArray.length === 2) { + /** suffix is of type 96_svg - it has a pixel ratio of 1*/ + return `${baseUrl}${size}/${baseIconName}.${suffixArray[1]}`; + } +} diff --git a/packages/react-components/file-type-icons-preview/library/src/utils/initializeFileTypeIcons.tsx b/packages/react-components/file-type-icons-preview/library/src/utils/initializeFileTypeIcons.tsx new file mode 100644 index 00000000000000..cfee9890512ae1 --- /dev/null +++ b/packages/react-components/file-type-icons-preview/library/src/utils/initializeFileTypeIcons.tsx @@ -0,0 +1,65 @@ +import * as React from 'react'; +import { registerIcons, FLUENT_CDN_BASE_URL } from '@fluentui/style-utilities'; +import { FileTypeIconMap } from './FileTypeIconMap'; +import type { IIconOptions } from '@fluentui/style-utilities'; +import type { JSXElement } from '@fluentui/utilities'; + +const PNG_SUFFIX = '_png'; +const SVG_SUFFIX = '_svg'; + +export const DEFAULT_BASE_URL = `${FLUENT_CDN_BASE_URL}/assets/item-types/`; +export const ICON_SIZES: number[] = [16, 20, 24, 32, 40, 48, 64, 96]; + +export function initializeFileTypeIcons(baseUrl: string = DEFAULT_BASE_URL, options?: Partial): void { + ICON_SIZES.forEach((size: number) => { + _initializeIcons(baseUrl, size, options); + }); +} + +function _initializeIcons(baseUrl: string, size: number, options?: Partial): void { + const iconTypes: string[] = Object.keys(FileTypeIconMap); + const fileTypeIcons: { [key: string]: JSXElement } = {}; + + iconTypes.forEach((type: string) => { + const baseUrlSizeType = baseUrl + size + '/' + type; + fileTypeIcons[type + size + PNG_SUFFIX] = ; + fileTypeIcons[type + size + SVG_SUFFIX] = ; + + // For high resolution screens, register additional versions + // Apply height=100% and width=100% to force image to fit into containing element + + // SVGs scale well, so you can generally use the default image. + // 1.5x is a special case where both SVGs and PNGs need a different image. + + fileTypeIcons[type + size + '_1.5x' + PNG_SUFFIX] = ( + + ); + fileTypeIcons[type + size + '_1.5x' + SVG_SUFFIX] = ( + + ); + + fileTypeIcons[type + size + '_2x' + PNG_SUFFIX] = ( + + ); + fileTypeIcons[type + size + '_3x' + PNG_SUFFIX] = ( + + ); + fileTypeIcons[type + size + '_4x' + PNG_SUFFIX] = ( + + ); + }); + + registerIcons( + { + fontFace: {}, + style: { + width: size, + height: size, + overflow: 'hidden', + }, + icons: fileTypeIcons, + mergeImageProps: true, + }, + options, + ); +} From 641eb02e46864a87693b87b6c2d48adda12d02f8 Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Sun, 23 Nov 2025 15:47:41 -0800 Subject: [PATCH 018/120] simplified documentation. --- .../library/MIGRATION.md | 201 +++++------------- .../file-type-icons-preview/library/README.md | 93 ++------ .../library/docs/Spec.md | 63 ------ 3 files changed, 71 insertions(+), 286 deletions(-) delete mode 100644 packages/react-components/file-type-icons-preview/library/docs/Spec.md diff --git a/packages/react-components/file-type-icons-preview/library/MIGRATION.md b/packages/react-components/file-type-icons-preview/library/MIGRATION.md index c99d72f0caa5ce..b8caab721e2829 100644 --- a/packages/react-components/file-type-icons-preview/library/MIGRATION.md +++ b/packages/react-components/file-type-icons-preview/library/MIGRATION.md @@ -4,32 +4,42 @@ This guide helps you migrate from `@fluentui/react-file-type-icons` (v8) to `@fl ## Overview -The v9 version provides a React component-based API instead of utility functions, following Fluent UI v9 patterns and conventions. +The v9 version provides a **modern React component-based API** while maintaining **full backward compatibility** with all v8 utility functions. -## Package Installation +**Key Points:** + +- ✅ All v8 utilities exported and work identically +- ✅ No breaking API changes for utility functions +- 🆕 New component API available (recommended but optional) + +## Installation ```bash -# Remove the v8 package npm uninstall @fluentui/react-file-type-icons - -# Install the v9 preview package npm install @fluentui/react-file-type-icons-preview ``` -## Breaking Changes +## What's Changed + +### Package Name (Breaking Change) -### 1. Component-based API instead of utility functions +The only breaking change is the package name: -**v8 (utility-based):** +- **Old**: `@fluentui/react-file-type-icons` +- **New**: `@fluentui/react-file-type-icons-preview` + +### New Component API (Recommended) + +**v8 (utility-based) - Still works:** ```tsx -import { getFileTypeIconProps, FileIconType } from '@fluentui/react-file-type-icons'; +import { getFileTypeIconProps } from '@fluentui/react-file-type-icons'; const iconProps = getFileTypeIconProps({ extension: 'docx', size: 48 }); Document; ``` -**v9 (component-based):** +**v9 (component-based) - Recommended:** ```tsx import { FileTypeIcon } from '@fluentui/react-file-type-icons-preview'; @@ -37,68 +47,11 @@ import { FileTypeIcon } from '@fluentui/react-file-type-icons-preview'; ; ``` -### 2. Simplified Props - -The v9 component automatically handles icon name resolution and URL construction internally. - -**v8:** - -```tsx -const iconProps = getFileTypeIconProps({ - extension: 'docx', - size: 48, - imageFileType: 'png', -}); -// Manually construct URL and set on img element -``` - -**v9:** - -```tsx - -``` - -### 3. Type Usage - -**v8:** - -```tsx -import { FileIconType, getFileTypeIconProps } from '@fluentui/react-file-type-icons'; - -const iconProps = getFileTypeIconProps({ type: FileIconType.folder }); -``` - -**v9:** - -```tsx -import { FileTypeIcon, FileIconType } from '@fluentui/react-file-type-icons-preview'; - -; -``` - -### 4. Custom Base URL - -**v8:** - -```tsx -const iconProps = getFileTypeIconProps({ - extension: 'docx', - size: 48, -}); -const customUrl = `https://my-cdn.com/${iconProps.iconName}`; -``` - -**v9:** - -```tsx - -``` - ## Migration Examples -### Example 1: Document Icon +### Document Icons -**Before (v8):** +**Before:** ```tsx import { getFileTypeIconProps } from '@fluentui/react-file-type-icons'; @@ -116,7 +69,7 @@ function DocumentItem({ filename }) { } ``` -**After (v9):** +**After:** ```tsx import { FileTypeIcon } from '@fluentui/react-file-type-icons-preview'; @@ -133,22 +86,18 @@ function DocumentItem({ filename }) { } ``` -### Example 2: Folder Icon +### Folder Icons -**Before (v8):** +**Before:** ```tsx import { getFileTypeIconProps, FileIconType } from '@fluentui/react-file-type-icons'; -const folderIconProps = getFileTypeIconProps({ - type: FileIconType.folder, - size: 48, -}); - -Folder; +const iconProps = getFileTypeIconProps({ type: FileIconType.folder, size: 48 }); +Folder; ``` -**After (v9):** +**After:** ```tsx import { FileTypeIcon, FileIconType } from '@fluentui/react-file-type-icons-preview'; @@ -156,93 +105,39 @@ import { FileTypeIcon, FileIconType } from '@fluentui/react-file-type-icons-prev ; ``` -### Example 3: Dynamic File List +## Incremental Migration -**Before (v8):** +**You don't have to migrate all code at once!** All v8 utilities work identically in v9: ```tsx -import { getFileTypeIconProps } from '@fluentui/react-file-type-icons'; +import { + FileTypeIcon, // v9 component (new) + getFileTypeIconAsUrl, // v8 utility (still works) +} from '@fluentui/react-file-type-icons-preview'; -function FileList({ files }) { +function MyComponent() { return ( -
    - {files.map(file => { - const extension = file.name.split('.').pop(); - const iconProps = getFileTypeIconProps({ extension, size: 24 }); - - return ( -
  • - {file.name} - {file.name} -
  • - ); - })} -
- ); -} -``` - -**After (v9):** - -```tsx -import { FileTypeIcon } from '@fluentui/react-file-type-icons-preview'; +
+ {/* Old code - still works */} + Document -function FileList({ files }) { - return ( -
    - {files.map(file => { - const extension = file.name.split('.').pop(); - - return ( -
  • - - {file.name} -
  • - ); - })} -
+ {/* New code - recommended */} + +
); } ``` -## Utilities Still Available - -If you need to access the underlying utilities for custom use cases, they are still exported: - -```tsx -import { - getFileTypeIconProps, - FileIconType, - getFileTypeIconNameFromExtensionOrType, -} from '@fluentui/react-file-type-icons-preview'; - -// Use utilities if you need custom logic -const iconName = getFileTypeIconNameFromExtensionOrType({ extension: 'docx' }); -``` - -## Benefits of Migration - -1. **Simpler API**: Use a React component instead of manually handling URLs and img elements -2. **Better TypeScript**: Full type safety with v9's improved type definitions -3. **Consistent with Fluent UI v9**: Follows the same patterns as other v9 components -4. **Automatic optimization**: The component handles pixel ratio and image format internally -5. **Better accessibility**: Built-in alt text and ARIA support - -## Feature Parity - -The v9 package maintains full feature parity with v8: +## Benefits of the New Component API -- ✅ All file type icons (100+ extensions) -- ✅ Special types (folder, genericFile, listItem, etc.) -- ✅ All sizes (16, 20, 24, 32, 40, 48, 64, 96) -- ✅ SVG and PNG support -- ✅ Custom base URL -- ✅ Device pixel ratio handling +1. **Simpler** - No manual URL handling or img element construction +2. **Better TypeScript** - Full type safety with v9's type definitions +3. **Accessible** - Built-in alt text and ARIA support +4. **Optimized** - Automatic pixel ratio and format handling ## Need Help? -If you encounter issues during migration: +If you encounter issues: 1. Check the [Storybook examples](https://aka.ms/fluentui-storybook) -2. Review the [API documentation](https://aka.ms/fluentui-api) -3. Open an issue on [GitHub](https://github.com/microsoft/fluentui) +2. Open an issue on [GitHub](https://github.com/microsoft/fluentui) diff --git a/packages/react-components/file-type-icons-preview/library/README.md b/packages/react-components/file-type-icons-preview/library/README.md index 81c371e34e730b..bad0f3b4d9a11b 100644 --- a/packages/react-components/file-type-icons-preview/library/README.md +++ b/packages/react-components/file-type-icons-preview/library/README.md @@ -8,144 +8,97 @@ These are not production-ready components and **should never be used in product* ### FileTypeIcon -The `FileTypeIcon` component displays an icon representing a file type based on its extension or a special type (like folder). It automatically selects the appropriate icon from the Fluent Design file type icon set. +Displays an icon representing a file type based on its extension or a special type (like folder). Automatically selects the appropriate icon from the Fluent Design file type icon set. #### Features - 🎨 **100+ file type icons** - Supports all common file extensions - 📏 **Multiple sizes** - 16, 20, 24, 32, 40, 48, 64, and 96 pixels -- 🖼️ **Format support** - Renders icons as SVG or PNG +- 🖼️ **Format support** - SVG (default) or PNG - 📁 **Special types** - Folder, list items, and other non-file icons -- ♿ **Accessible** - Includes proper alt text for screen readers -- 🎯 **Automatic optimization** - Handles device pixel ratio for crisp display +- ♿ **Accessible** - Proper alt text for screen readers ## Usage -### Basic Usage +### Basic Examples ```tsx -import { FileTypeIcon } from '@fluentui/react-file-type-icons-preview'; +import { FileTypeIcon, FileIconType } from '@fluentui/react-file-type-icons-preview'; -// Display a Word document icon +// File extension -// Display a folder icon +// Special type -``` - -### File Extensions - -The component recognizes 100+ file extensions: - -```tsx -import { FileTypeIcon } from '@fluentui/react-file-type-icons-preview'; - // Word document - // Excel spreadsheet - // PowerPoint presentation - // PDF document - // Archive file - // Video file - // Image file +// Common file types + + + ``` ### Sizes -All standard Fluent UI icon sizes are supported: - ```tsx - - - - -``` - -### Special Types - -Use the `type` prop for non-extension-based icons: - -```tsx -import { FileTypeIcon, FileIconType } from '@fluentui/react-file-type-icons-preview'; - - - - - - ``` ### Image Format -Choose between SVG (default) or PNG: - ```tsx -// SVG (default, recommended for most cases) +// SVG (default, recommended) -// PNG (better for certain legacy scenarios) +// PNG (for legacy scenarios) ``` ### Custom CDN -Override the default Fluent CDN with your own: - ```tsx ``` -### With Custom Styling - -Apply custom className or style: +### Custom Styling ```tsx - + ``` ## Migration from v8 If you're migrating from `@fluentui/react-file-type-icons` (v8), see the [Migration Guide](./MIGRATION.md). -### Quick Comparison - -**v8 (utility-based):** +**v8:** ```tsx import { getFileTypeIconProps } from '@fluentui/react-file-type-icons'; - const iconProps = getFileTypeIconProps({ extension: 'docx', size: 48 }); Document; ``` -**v9 (component-based):** +**v9:** ```tsx import { FileTypeIcon } from '@fluentui/react-file-type-icons-preview'; - ; ``` ## Utilities -The underlying utilities are also exported for advanced use cases: +Underlying utilities are exported for advanced use cases: ```tsx -import { - getFileTypeIconProps, - FileIconType, - getFileTypeIconNameFromExtensionOrType, - FileTypeIconMap, -} from '@fluentui/react-file-type-icons-preview'; +import { getFileTypeIconProps, getFileTypeIconAsUrl, FileIconType } from '@fluentui/react-file-type-icons-preview'; -// Get icon name for custom logic -const iconName = getFileTypeIconNameFromExtensionOrType({ extension: 'docx' }); +// Get icon URL +const url = getFileTypeIconAsUrl({ extension: 'docx', size: 48 }); -// Get full icon props -const iconProps = getFileTypeIconProps({ extension: 'docx', size: 48 }); +// Get icon props +const props = getFileTypeIconProps({ extension: 'docx', size: 48 }); ``` ## API diff --git a/packages/react-components/file-type-icons-preview/library/docs/Spec.md b/packages/react-components/file-type-icons-preview/library/docs/Spec.md deleted file mode 100644 index c25b450f42e8c7..00000000000000 --- a/packages/react-components/file-type-icons-preview/library/docs/Spec.md +++ /dev/null @@ -1,63 +0,0 @@ -# @fluentui/file-type-icons-preview Spec - -## Background - -_Description and use cases of this component_ - -## Prior Art - -_Include background research done for this component_ - -- _Link to Open UI research_ -- _Link to comparison of v7 and v0_ -- _Link to GitHub epic issue for the converged component_ - -## Sample Code - -_Provide some representative example code that uses the proposed API for the component_ - -## Variants - -_Describe visual or functional variants of this control, if applicable. For example, a slider could have a 2D variant._ - -## API - -_List the **Props** and **Slots** proposed for the component. Ideally this would just be a link to the component's `.types.ts` file_ - -## Structure - -- _**Public**_ -- _**Internal**_ -- _**DOM** - how the component will be rendered as HTML elements_ - -## Migration - -_Describe what will need to be done to upgrade from the existing implementations:_ - -- _Migration from v8_ -- _Migration from v0_ - -## Behaviors - -_Explain how the component will behave in use, including:_ - -- _Component States_ -- _Interaction_ - - _Keyboard_ - - _Cursor_ - - _Touch_ - - _Screen readers_ - -## Accessibility - -Base accessibility information is included in the design document. After the spec is filled and review, outcomes from it need to be communicated to design and incorporated in the design document. - -- Decide whether to use **native element** or folow **ARIA** and provide reasons -- Identify the **[ARIA](https://www.w3.org/TR/wai-aria-practices-1.2/) pattern** and, if the component is listed there, follow its specification as possible. -- Identify accessibility **variants**, the `role` ([ARIA roles](https://www.w3.org/TR/wai-aria-1.1/#role_definitions)) of the component, its `slots` and `aria-*` props. -- Describe the **keyboard navigation**: Tab Oder and Arrow Key Navigation. Describe any other keyboard **shortcuts** used -- Specify texts for **state change announcements** - [ARIA live regions - ](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions) (number of available items in dropdown, error messages, confirmations, ...) -- Identify UI parts that appear on **hover or focus** and specify keyboard and screen reader interaction with them -- List cases when **focus** needs to be **trapped** in sections of the UI (for dialogs and popups or for hierarchical navigation) -- List cases when **focus** needs to be **moved programatically** (if parts of the UI are appearing/disappearing or other cases) From 59298fa73c4f43742c48f207b6d39371ca49f919 Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Sun, 23 Nov 2025 21:17:19 -0800 Subject: [PATCH 019/120] simplifying getFileTypeIconAsURL and getFileTypeIconAsHTMLString --- .../library/src/index.ts | 3 +- .../src/utils/getFileTypeIconAsHTMLString.ts | 35 --------------- .../library/src/utils/getFileTypeIconAsUrl.ts | 44 ++++++++++++++----- .../library/src/utils/getFileTypeIconProps.ts | 13 +++--- 4 files changed, 40 insertions(+), 55 deletions(-) delete mode 100644 packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconAsHTMLString.ts diff --git a/packages/react-components/file-type-icons-preview/library/src/index.ts b/packages/react-components/file-type-icons-preview/library/src/index.ts index 92f84fdce98496..bb3c614df484cd 100644 --- a/packages/react-components/file-type-icons-preview/library/src/index.ts +++ b/packages/react-components/file-type-icons-preview/library/src/index.ts @@ -23,6 +23,5 @@ export type { ImageFileType, IFileTypeIconOptions, } from './utils/getFileTypeIconProps'; -export { getFileTypeIconAsUrl } from './utils/getFileTypeIconAsUrl'; -export { getFileTypeIconAsHTMLString } from './utils/getFileTypeIconAsHTMLString'; +export { getFileTypeIconAsUrl, getFileTypeIconAsHTMLString } from './utils/getFileTypeIconAsUrl'; export { initializeFileTypeIcons, DEFAULT_BASE_URL, ICON_SIZES } from './utils/initializeFileTypeIcons'; diff --git a/packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconAsHTMLString.ts b/packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconAsHTMLString.ts deleted file mode 100644 index ce9ddd23ac081c..00000000000000 --- a/packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconAsHTMLString.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { DEFAULT_BASE_URL } from './initializeFileTypeIcons'; -import { - getFileTypeIconNameFromExtensionOrType, - getFileTypeIconSuffix, - DEFAULT_ICON_SIZE, -} from './getFileTypeIconProps'; -import type { IFileTypeIconOptions } from './getFileTypeIconProps'; - -/** - * Given the `fileTypeIconOptions`, this function returns the DOM element for the `FileTypeIcon` - * as an HTML string. Similar to `getFileTypeIconProps`, this also accepts the same type of object - * but rather than returning the `iconName`, this returns the entire DOM element as a string. - * @param options - * @param baseUrl - optionally provide a custom CDN base url to fetch icons from - */ -export function getFileTypeIconAsHTMLString( - options: IFileTypeIconOptions, - baseUrl: string = DEFAULT_BASE_URL, -): string | undefined { - const { extension, size = DEFAULT_ICON_SIZE, type, imageFileType } = options; - const baseIconName = getFileTypeIconNameFromExtensionOrType(extension, type); // eg: docx - const baseSuffix = getFileTypeIconSuffix(size, imageFileType); // eg: 96_3x_svg or 96_png - const suffixArray = baseSuffix.split('_'); // eg: ['96', '3x', 'svg'] - - let src: string | undefined; - if (suffixArray.length === 3) { - /** suffix is of type 96_3x_svg - it has a pixel ratio > 1*/ - src = `${baseUrl}${size}_${suffixArray[1]}/${baseIconName}.${suffixArray[2]}`; - return ``; - } else if (suffixArray.length === 2) { - /** suffix is of type 96_svg - it has a pixel ratio of 1*/ - src = `${baseUrl}${size}/${baseIconName}.${suffixArray[1]}`; - return ``; - } -} diff --git a/packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconAsUrl.ts b/packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconAsUrl.ts index 73b7ae28ca07a9..114de43e1f4393 100644 --- a/packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconAsUrl.ts +++ b/packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconAsUrl.ts @@ -17,16 +17,40 @@ export function getFileTypeIconAsUrl( options: IFileTypeIconOptions, baseUrl: string = DEFAULT_BASE_URL, ): string | undefined { - const { extension, size = DEFAULT_ICON_SIZE, type, imageFileType } = options; - const baseIconName = getFileTypeIconNameFromExtensionOrType(extension, type); // eg: docx - const baseSuffix = getFileTypeIconSuffix(size, imageFileType); // eg: 96_3x_svg or 96_png - const suffixArray = baseSuffix.split('_'); // eg: ['96', '3x', 'svg'] + const { extension, size = DEFAULT_ICON_SIZE, type, imageFileType = 'svg' } = options; + const baseIconName = getFileTypeIconNameFromExtensionOrType(extension, type); + const suffix = getFileTypeIconSuffix(size, imageFileType); - if (suffixArray.length === 3) { - /** suffix is of type 96_3x_svg - it has a pixel ratio > 1*/ - return `${baseUrl}${size}_${suffixArray[1]}/${baseIconName}.${suffixArray[2]}`; - } else if (suffixArray.length === 2) { - /** suffix is of type 96_svg - it has a pixel ratio of 1*/ - return `${baseUrl}${size}/${baseIconName}.${suffixArray[1]}`; + // suffix format: {size}_{imageType} or {size}_{pixelRatio}_{imageType} + // Examples: "16_svg", "96_3x_svg", "20_1.5x_png" + const lastUnderscoreIndex = suffix.lastIndexOf('_'); + const fileExtension = suffix.substring(lastUnderscoreIndex + 1); + const pathPrefix = suffix.substring(0, lastUnderscoreIndex); // "16" or "96_3x" or "20_1.5x" + + // CDN path format: {baseUrl}{pathPrefix}/{iconName}.{fileExtension} + // Examples: baseUrl16/docx.svg, baseUrl96_3x/docx.svg + return `${baseUrl}${pathPrefix}/${baseIconName}.${fileExtension}`; +} + +/** + * Given the `fileTypeIconOptions`, this function returns the DOM element for the `FileTypeIcon` + * as an HTML string. Similar to `getFileTypeIconProps`, this also accepts the same type of object + * but rather than returning the `iconName`, this returns the entire DOM element as a string. + * @param options + * @param baseUrl - optionally provide a custom CDN base url to fetch icons from + */ +export function getFileTypeIconAsHTMLString( + options: IFileTypeIconOptions, + baseUrl: string = DEFAULT_BASE_URL, +): string | undefined { + const url = getFileTypeIconAsUrl(options, baseUrl); + + if (!url) { + return undefined; } + + const { size = DEFAULT_ICON_SIZE, imageFileType = 'svg' } = options; + //const suffix = getFileTypeIconSuffix(size, imageFileType); + + return ``; } diff --git a/packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconProps.ts b/packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconProps.ts index 3c69469e2587cf..d243f8013472e7 100644 --- a/packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconProps.ts +++ b/packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconProps.ts @@ -196,17 +196,14 @@ export function getFileTypeIconSuffix( let devicePixelRatioSuffix = ''; // Default is 1x // SVGs scale well, so you can generally use the default image. - // 1.5x is a special case where SVGs need a different image. - if (imageFileType === 'svg' && devicePixelRatio > 1 && devicePixelRatio <= 1.5) { - // Currently missing 1.5x SVGs at size 20, snap to 1x for now - if (size !== 20) { - devicePixelRatioSuffix = '_1.5x'; - } + if (imageFileType === 'svg' && devicePixelRatio > 1 && devicePixelRatio <= 1.9) { + // 1.5x is a special case where SVGs need a different image. + devicePixelRatioSuffix = '_1.5x'; + } else if (imageFileType === 'png') { // To look good, PNGs should use a different image for higher device pixel ratios if (devicePixelRatio > 1 && devicePixelRatio <= 1.5) { - // Currently missing 1.5x icons for size 20, snap to 2x for now - devicePixelRatioSuffix = size === 20 ? '_2x' : '_1.5x'; + devicePixelRatioSuffix ='_1.5x'; } else if (devicePixelRatio > 1.5 && devicePixelRatio <= 2) { devicePixelRatioSuffix = '_2x'; } else if (devicePixelRatio > 2 && devicePixelRatio <= 3) { From 792e79239bcca673f2949ede1bfd663eab115474 Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Sun, 23 Nov 2025 21:47:27 -0800 Subject: [PATCH 020/120] updated storybook / tests to evaluate helper functions --- .../src/utils/getFileTypeIconAsUrl.test.ts | 245 ++++++++++++++++++ .../FileTypeIconUrlAndHtml.stories.tsx | 219 ++++++++++++++++ .../src/FileTypeIcon/index.stories.tsx | 1 + 3 files changed, 465 insertions(+) create mode 100644 packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconAsUrl.test.ts create mode 100644 packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconUrlAndHtml.stories.tsx diff --git a/packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconAsUrl.test.ts b/packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconAsUrl.test.ts new file mode 100644 index 00000000000000..7503b9b3a050ba --- /dev/null +++ b/packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconAsUrl.test.ts @@ -0,0 +1,245 @@ +import { getFileTypeIconAsUrl, getFileTypeIconAsHTMLString } from './getFileTypeIconAsUrl'; +import { DEFAULT_BASE_URL } from './initializeFileTypeIcons'; + +describe('getFileTypeIconAsUrl', () => { + // Store original DPR once at the start + const originalDPR = typeof window !== 'undefined' ? window.devicePixelRatio : 1; + + beforeEach(() => { + // Reset to 1x before each test + if (typeof window !== 'undefined') { + Object.defineProperty(window, 'devicePixelRatio', { + writable: true, + configurable: true, + value: 1, + }); + } + }); + + afterAll(() => { + // Restore original DPR after all tests in this suite + if (typeof window !== 'undefined') { + Object.defineProperty(window, 'devicePixelRatio', { + writable: true, + configurable: true, + value: originalDPR, + }); + } + }); + + describe('with different DPI values', () => { + it('should return correct URL for 1x DPI with docx extension', () => { + const result = getFileTypeIconAsUrl({ extension: 'docx', size: 16, imageFileType: 'png' }, DEFAULT_BASE_URL); + expect(result).toBe(`${DEFAULT_BASE_URL}16/docx.png`); + }); + + it('should return correct URL for 1.5x DPI with pdf extension', () => { + // Mock window with 1.5x DPI + Object.defineProperty(window, 'devicePixelRatio', { + writable: true, + configurable: true, + value: 1.5, + }); + + const result = getFileTypeIconAsUrl({ extension: 'pdf', size: 16, imageFileType: 'png' }, DEFAULT_BASE_URL); + expect(result).toBe(`${DEFAULT_BASE_URL}16_1.5x/pdf.png`); + }); + + it('should return correct URL for 2x DPI with xlsx extension', () => { + // Mock window with 2x DPI + Object.defineProperty(window, 'devicePixelRatio', { + writable: true, + configurable: true, + value: 2, + }); + + const result = getFileTypeIconAsUrl({ extension: 'xlsx', size: 16, imageFileType: 'png' }, DEFAULT_BASE_URL); + expect(result).toBe(`${DEFAULT_BASE_URL}16_2x/xlsx.png`); + }); + }); + + describe('with SVG format', () => { + it('should return correct URL for 1x DPI with SVG', () => { + const result = getFileTypeIconAsUrl({ extension: 'docx', size: 16, imageFileType: 'svg' }, DEFAULT_BASE_URL); + expect(result).toBe(`${DEFAULT_BASE_URL}16/docx.svg`); + }); + + it('should return correct URL for 1.5x DPI with SVG', () => { + Object.defineProperty(window, 'devicePixelRatio', { + writable: true, + configurable: true, + value: 1.5, + }); + + const result = getFileTypeIconAsUrl({ extension: 'pdf', size: 16, imageFileType: 'svg' }, DEFAULT_BASE_URL); + expect(result).toBe(`${DEFAULT_BASE_URL}16_1.5x/pdf.svg`); + }); + + it('should return correct URL for 2x DPI with SVG (should not include DPI suffix)', () => { + Object.defineProperty(window, 'devicePixelRatio', { + writable: true, + configurable: true, + value: 2, + }); + + const result = getFileTypeIconAsUrl({ extension: 'xlsx', size: 16, imageFileType: 'svg' }, DEFAULT_BASE_URL); + expect(result).toBe(`${DEFAULT_BASE_URL}16/xlsx.svg`); + }); + }); + + describe('with different sizes', () => { + it('should return correct URL for size 20', () => { + const result = getFileTypeIconAsUrl({ extension: 'docx', size: 20, imageFileType: 'png' }, DEFAULT_BASE_URL); + expect(result).toBe(`${DEFAULT_BASE_URL}20/docx.png`); + }); + + it('should return correct URL for size 24', () => { + const result = getFileTypeIconAsUrl({ extension: 'pdf', size: 24, imageFileType: 'svg' }, DEFAULT_BASE_URL); + expect(result).toBe(`${DEFAULT_BASE_URL}24/pdf.svg`); + }); + + it('should return correct URL for size 48', () => { + const result = getFileTypeIconAsUrl({ extension: 'xlsx', size: 48, imageFileType: 'png' }, DEFAULT_BASE_URL); + expect(result).toBe(`${DEFAULT_BASE_URL}48/xlsx.png`); + }); + }); + + describe('with custom base URL', () => { + const customBaseUrl = 'https://custom.cdn.com/icons/'; + + it('should use custom base URL', () => { + const result = getFileTypeIconAsUrl({ extension: 'docx', size: 16, imageFileType: 'svg' }, customBaseUrl); + expect(result).toBe(`${customBaseUrl}16/docx.svg`); + }); + }); +}); + +describe('getFileTypeIconAsHTMLString', () => { + // Store original DPR once at the start + const originalDPR = typeof window !== 'undefined' ? window.devicePixelRatio : 1; + + beforeEach(() => { + // Reset to 1x before each test + if (typeof window !== 'undefined') { + Object.defineProperty(window, 'devicePixelRatio', { + writable: true, + configurable: true, + value: 1, + }); + } + }); + + afterAll(() => { + // Restore original DPR after all tests in this suite + if (typeof window !== 'undefined') { + Object.defineProperty(window, 'devicePixelRatio', { + writable: true, + configurable: true, + value: originalDPR, + }); + } + }); + + describe('with different DPI values', () => { + it('should return correct HTML string for 1x DPI with docx extension', () => { + const result = getFileTypeIconAsHTMLString( + { extension: 'docx', size: 16, imageFileType: 'png' }, + DEFAULT_BASE_URL, + ); + expect(result).toBe(``); + }); + + it('should return correct HTML string for 1.5x DPI with pdf extension', () => { + Object.defineProperty(window, 'devicePixelRatio', { + writable: true, + configurable: true, + value: 1.5, + }); + + const result = getFileTypeIconAsHTMLString( + { extension: 'pdf', size: 16, imageFileType: 'png' }, + DEFAULT_BASE_URL, + ); + expect(result).toBe(``); + }); + + it('should return correct HTML string for 2x DPI with xlsx extension', () => { + Object.defineProperty(window, 'devicePixelRatio', { + writable: true, + configurable: true, + value: 2, + }); + + const result = getFileTypeIconAsHTMLString( + { extension: 'xlsx', size: 16, imageFileType: 'png' }, + DEFAULT_BASE_URL, + ); + expect(result).toBe(``); + }); + }); + + describe('with SVG format', () => { + it('should return correct HTML string for 1x DPI with SVG', () => { + const result = getFileTypeIconAsHTMLString( + { extension: 'docx', size: 24, imageFileType: 'svg' }, + DEFAULT_BASE_URL, + ); + expect(result).toBe(``); + }); + + it('should return correct HTML string for 1.5x DPI with SVG', () => { + Object.defineProperty(window, 'devicePixelRatio', { + writable: true, + configurable: true, + value: 1.5, + }); + + const result = getFileTypeIconAsHTMLString( + { extension: 'pdf', size: 20, imageFileType: 'svg' }, + DEFAULT_BASE_URL, + ); + expect(result).toBe(``); + }); + }); + + describe('with different sizes', () => { + it('should include correct size attributes for size 32', () => { + const result = getFileTypeIconAsHTMLString( + { extension: 'docx', size: 32, imageFileType: 'png' }, + DEFAULT_BASE_URL, + ); + expect(result).toContain('height="32"'); + expect(result).toContain('width="32"'); + }); + + it('should include correct size attributes for size 48', () => { + const result = getFileTypeIconAsHTMLString( + { extension: 'xlsx', size: 48, imageFileType: 'svg' }, + DEFAULT_BASE_URL, + ); + expect(result).toContain('height="48"'); + expect(result).toContain('width="48"'); + }); + }); + + describe('with custom base URL', () => { + const customBaseUrl = 'https://custom.cdn.com/icons/'; + + it('should use custom base URL in HTML string', () => { + const result = getFileTypeIconAsHTMLString( + { extension: 'docx', size: 16, imageFileType: 'svg' }, + customBaseUrl, + ); + expect(result).toBe(``); + }); + }); + + describe('edge cases', () => { + it('should handle undefined URL gracefully', () => { + // This would only happen if getFileTypeIconAsUrl returns undefined + // which shouldn't happen in normal circumstances, but we test for robustness + const result = getFileTypeIconAsHTMLString({ extension: 'unknown', size: 16 }, DEFAULT_BASE_URL); + expect(result).toBeDefined(); + }); + }); +}); diff --git a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconUrlAndHtml.stories.tsx b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconUrlAndHtml.stories.tsx new file mode 100644 index 00000000000000..2fd255c9c24979 --- /dev/null +++ b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconUrlAndHtml.stories.tsx @@ -0,0 +1,219 @@ +import * as React from 'react'; +import type { JSXElement } from '@fluentui/react-components'; +import { getFileTypeIconAsUrl, getFileTypeIconAsHTMLString } from '@fluentui/file-type-icons-preview'; +import { makeStyles, shorthands } from '@griffel/react'; + +const useStyles = makeStyles({ + container: { + display: 'flex', + flexDirection: 'column', + gap: '24px', + }, + section: { + display: 'flex', + flexDirection: 'column', + gap: '12px', + ...shorthands.padding('16px'), + ...shorthands.border('1px', 'solid', '#e0e0e0'), + ...shorthands.borderRadius('8px'), + }, + sectionTitle: { + fontSize: '16px', + fontWeight: '600', + marginBottom: '8px', + }, + grid: { + display: 'grid', + gridTemplateColumns: 'repeat(3, 1fr)', + gap: '16px', + }, + card: { + display: 'flex', + flexDirection: 'column', + gap: '8px', + ...shorthands.padding('12px'), + backgroundColor: '#f5f5f5', + ...shorthands.borderRadius('4px'), + }, + cardTitle: { + fontSize: '14px', + fontWeight: '600', + marginBottom: '4px', + }, + iconPreview: { + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + ...shorthands.padding('12px'), + backgroundColor: '#ffffff', + ...shorthands.borderRadius('4px'), + minHeight: '60px', + }, + code: { + fontSize: '11px', + fontFamily: 'monospace', + backgroundColor: '#ffffff', + ...shorthands.padding('8px'), + ...shorthands.borderRadius('4px'), + overflowX: 'auto', + wordBreak: 'break-all', + }, + label: { + fontSize: '12px', + color: '#666', + fontWeight: '500', + }, +}); + +const commonFileTypes = ['docx', 'pdf', 'xlsx']; + +export const UrlAndHtmlFunctions = (): JSXElement => { + const styles = useStyles(); + + return ( +
+ {/* URL Function Demo */} +
+
getFileTypeIconAsUrl() - PNG Format with Different DPIs
+
+ {commonFileTypes.map(extension => ( +
+
.{extension}
+ {(['1x', '1.5x', '2x'] as const).map(dpi => { + const url = getFileTypeIconAsUrl({ + extension, + size: 48, + imageFileType: 'png', + }); + + // For demo purposes, we'll show what the URL would be for each DPI + // In real usage, the browser's devicePixelRatio would determine this + const dpiSuffix = dpi === '1x' ? '' : `_${dpi}`; + const demoUrl = url?.replace(/48/, `48${dpiSuffix}`); + + return ( +
+
{dpi} DPI:
+
{demoUrl}
+
+ ); + })} +
+ ))} +
+
+ + {/* SVG URL Demo */} +
+
getFileTypeIconAsUrl() - SVG Format with Different DPIs
+
+ {commonFileTypes.map(extension => ( +
+
.{extension}
+ {(['1x', '1.5x', '2x'] as const).map(dpi => { + const url = getFileTypeIconAsUrl({ + extension, + size: 48, + imageFileType: 'svg', + }); + + // SVG only uses 1.5x for specific DPI ranges, otherwise uses base + const dpiSuffix = dpi === '1.5x' ? '_1.5x' : ''; + const demoUrl = url?.replace(/48/, `48${dpiSuffix}`); + + return ( +
+
{dpi} DPI:
+
{demoUrl}
+
+ ); + })} +
+ ))} +
+
+ + {/* HTML String Demo */} +
+
getFileTypeIconAsHTMLString() - Visual Preview
+
+ {commonFileTypes.map(extension => ( +
+
.{extension}
+
+
+
+
HTML Output:
+
+ {getFileTypeIconAsHTMLString({ + extension, + size: 48, + imageFileType: 'svg', + })} +
+
+ ))} +
+
+ + {/* Comparison at Different Sizes */} +
+
getFileTypeIconAsHTMLString() - Different Sizes
+
+ {([16, 24, 48] as const).map(size => ( +
+
Size: {size}px
+ {commonFileTypes.map(extension => ( +
+
.{extension}:
+
+
+
+
+ ))} +
+ ))} +
+
+ + {/* Interactive Example */} +
+
Current Device Information
+
+ Device Pixel Ratio: {typeof window !== 'undefined' ? window.devicePixelRatio : 'N/A'} +
+
+ This affects which icon variant is loaded for PNG images. SVG images scale better but may use 1.5x variant + for better rendering. +
+
+
+ ); +}; + +UrlAndHtmlFunctions.parameters = { + docs: { + description: { + story: + 'Demonstrates the `getFileTypeIconAsUrl()` and `getFileTypeIconAsHTMLString()` utility functions with different DPI settings (1x, 1.5x, 2x) and common file types (docx, pdf, xlsx). These functions are useful when you need direct access to CDN URLs or HTML markup for file type icons.', + }, + }, +}; diff --git a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/index.stories.tsx b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/index.stories.tsx index 04b09445521579..cc1dcba73b9b31 100644 --- a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/index.stories.tsx +++ b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/index.stories.tsx @@ -6,6 +6,7 @@ export { Default } from './FileTypeIconDefault.stories'; export { Sizes } from './FileTypeIconSizes.stories'; export { CommonFileTypes } from './FileTypeIconCommon.stories'; export { SpecialTypes } from './FileTypeIconSpecialTypes.stories'; +export { UrlAndHtmlFunctions } from './FileTypeIconUrlAndHtml.stories'; import descriptionMd from './FileTypeIconDescription.md'; From 3c64988dec9586ec82c8c364de5e54c666eb56d1 Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Sun, 23 Nov 2025 23:01:17 -0800 Subject: [PATCH 021/120] organizing storybook place in nav --- .../file-type-icons-preview/stories/package.json | 1 + .../stories/src/FileTypeIcon/index.stories.tsx | 3 +-- packages/react-components/react-components/package.json | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/react-components/file-type-icons-preview/stories/package.json b/packages/react-components/file-type-icons-preview/stories/package.json index bc589fd28cb512..a4fbe99940dc2d 100644 --- a/packages/react-components/file-type-icons-preview/stories/package.json +++ b/packages/react-components/file-type-icons-preview/stories/package.json @@ -3,6 +3,7 @@ "version": "0.0.0", "private": true, "devDependencies": { + "@fluentui/file-type-icons-preview": "*", "@fluentui/react-storybook-addon": "*", "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", diff --git a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/index.stories.tsx b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/index.stories.tsx index cc1dcba73b9b31..56b4dd692e1472 100644 --- a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/index.stories.tsx +++ b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/index.stories.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { FileTypeIcon } from '@fluentui/file-type-icons-preview'; import type { Meta } from '@storybook/react'; @@ -11,7 +10,7 @@ export { UrlAndHtmlFunctions } from './FileTypeIconUrlAndHtml.stories'; import descriptionMd from './FileTypeIconDescription.md'; export default { - title: 'Preview Components/FileTypeIcon', + title: 'Icons/Filetype Icons', component: FileTypeIcon, parameters: { docs: { diff --git a/packages/react-components/react-components/package.json b/packages/react-components/react-components/package.json index 60effe6d4a3fdc..7af6d6e3be332e 100644 --- a/packages/react-components/react-components/package.json +++ b/packages/react-components/react-components/package.json @@ -77,7 +77,8 @@ "@fluentui/react-motion": "^9.11.4", "@fluentui/react-carousel": "^9.8.12", "@fluentui/react-color-picker": "^9.2.11", - "@fluentui/react-nav": "^9.3.14" + "@fluentui/react-nav": "^9.3.14", + "@fluentui/file-type-icons-preview": "^0.0.1" }, "peerDependencies": { "@types/react": ">=16.14.0 <20.0.0", From 8d379e6fef716d4fcb94d1f213d269f1fa9bfc76 Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Mon, 24 Nov 2025 12:54:29 -0800 Subject: [PATCH 022/120] update getFileTypeIconProps to use same mapping file FileTypeIconMap.ts to fetch by FileIconType instead of a separate enum --- .../library/src/utils/FileTypeIconMap.ts | 89 +++++++++++---- .../src/utils/getFileTypeIconAsUrl.test.ts | 71 ++++++++++++ .../library/src/utils/getFileTypeIconAsUrl.ts | 12 +- .../library/src/utils/getFileTypeIconProps.ts | 107 ++++-------------- 4 files changed, 162 insertions(+), 117 deletions(-) diff --git a/packages/react-components/file-type-icons-preview/library/src/utils/FileTypeIconMap.ts b/packages/react-components/file-type-icons-preview/library/src/utils/FileTypeIconMap.ts index a324f893e1fbf3..4f39e24ab25af3 100644 --- a/packages/react-components/file-type-icons-preview/library/src/utils/FileTypeIconMap.ts +++ b/packages/react-components/file-type-icons-preview/library/src/utils/FileTypeIconMap.ts @@ -1,9 +1,11 @@ +import { FileIconType } from './FileIconType'; + /** * Enumeration of icon file names, and what extensions they map to. * Please keep items alphabetical. Items without extensions may require specific logic in the code to map. * Always use getFileTypeIconProps to get the most up-to-date icon at the right pixel density. */ -export const FileTypeIconMap: { [key: string]: { extensions?: string[] } } = { +export const FileTypeIconMap: { [key: string]: { extensions?: string[]; types?: FileIconType[] } } = { accdb: { extensions: ['accdb', 'mdb'], }, @@ -13,7 +15,9 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[] } } = { archive: { extensions: ['7z', 'ace', 'arc', 'arj', 'dmg', 'gz', 'iso', 'lzh', 'pkg', 'rar', 'sit', 'tgz', 'tar', 'z'], }, - album: {}, + album: { + types: [FileIconType.album], + }, audio: { extensions: [ 'aif', @@ -275,9 +279,15 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[] } } = { designer: { extensions: ['design'], }, - desktopfolder: {}, - docset: {}, - documentsfolder: {}, + desktopfolder: { + types: [FileIconType.desktopFolder], + }, + docset: { + types: [FileIconType.docset], + }, + documentsfolder: { + types: [FileIconType.documentsFolder], + }, docx: { extensions: ['doc', 'docm', 'docx', 'docb'], }, @@ -291,12 +301,18 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[] } } = { extensions: ['application', 'appref-ms', 'apk', 'app', 'appx', 'exe', 'ipa', 'msi', 'xap'], }, favoritesfolder: {}, - folder: {}, + folder: { + types: [FileIconType.folder], + }, font: { extensions: ['ttf', 'otf', 'woff'], }, - form: {}, - genericfile: {}, + form: { + types: [FileIconType.form], + }, + genericfile: { + types: [FileIconType.genericFile], + }, html: { extensions: ['htm', 'html', 'mht', 'mhtml'], }, @@ -306,17 +322,27 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[] } } = { link: { extensions: ['lnk', 'link', 'url', 'website', 'webloc'], }, - linkedfolder: {}, - listform: {}, - listitem: {}, + linkedfolder: { + types: [FileIconType.linkedFolder], + }, + listform: { + types: [FileIconType.listForm], + }, + listitem: { + types: [FileIconType.listItem], + }, loop: { extensions: ['fluid', 'loop', 'note'], }, - loopworkspace: {}, + loopworkspace: { + types: [FileIconType.loopworkspace], + }, officescript: { extensions: ['osts'], }, - splist: {}, + splist: { + types: [FileIconType.list], + }, mcworld: { extensions: ['mcworld'], }, @@ -359,7 +385,9 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[] } } = { mpt: { extensions: ['mpt'], }, - multiple: {}, + multiple: { + types: [FileIconType.multiple], + }, one: { // This is a partial OneNote page or section export. Not whole notebooks, see "onetoc" extensions: ['one', 'onepart'], @@ -419,9 +447,15 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[] } } = { ], }, photo360: {}, - picturesfolder: {}, - planner: {}, - portfolio: {}, + picturesfolder: { + types: [FileIconType.picturesFolder], + }, + planner: { + types: [FileIconType.planner], + }, + portfolio: { + types: [FileIconType.portfolio], + }, potx: { extensions: ['pot', 'potm', 'potx'], }, @@ -443,16 +477,24 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[] } } = { spo: { extensions: ['aspx'], }, - sponews: {}, + sponews: { + types: [FileIconType.news], + }, spreadsheet: { extensions: ['odc', 'ods', 'gsheet', 'numbers', 'tsv'], }, rtf: { extensions: ['epub', 'gdoc', 'odt', 'rtf', 'wri', 'pages'], }, - sharedfolder: {}, - playlist: {}, - sway: {}, + sharedfolder: { + types: [FileIconType.sharedFolder], + }, + playlist: { + types: [FileIconType.playlist], + }, + sway: { + types: [FileIconType.sway], + }, sysfile: { extensions: [ 'bak', @@ -486,7 +528,9 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[] } } = { 'xll', ], }, - todoitem: {}, + todoitem: { + types: [FileIconType.todoItem], + }, txt: { extensions: ['dif', 'diff', 'readme', 'out', 'plist', 'properties', 'text', 'txt'], }, @@ -519,6 +563,7 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[] } } = { ], }, video: { + types: [FileIconType.stream], extensions: [ '3g2', '3gp', diff --git a/packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconAsUrl.test.ts b/packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconAsUrl.test.ts index 7503b9b3a050ba..b543a33f118167 100644 --- a/packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconAsUrl.test.ts +++ b/packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconAsUrl.test.ts @@ -1,5 +1,76 @@ import { getFileTypeIconAsUrl, getFileTypeIconAsHTMLString } from './getFileTypeIconAsUrl'; import { DEFAULT_BASE_URL } from './initializeFileTypeIcons'; +import { getFileTypeIconNameFromExtensionOrType } from './getFileTypeIconProps'; +import { FileIconType } from './FileIconType'; + +describe('getFileTypeIconNameFromExtensionOrType', () => { + describe('with FileIconType enum values', () => { + it('should map all FileIconType enum values to specific icon names', () => { + // Test all 22 enum values + expect(getFileTypeIconNameFromExtensionOrType(undefined, FileIconType.docset)).toBe('docset'); + expect(getFileTypeIconNameFromExtensionOrType(undefined, FileIconType.folder)).toBe('folder'); + expect(getFileTypeIconNameFromExtensionOrType(undefined, FileIconType.genericFile)).toBe('genericfile'); + expect(getFileTypeIconNameFromExtensionOrType(undefined, FileIconType.listItem)).toBe('listitem'); + expect(getFileTypeIconNameFromExtensionOrType(undefined, FileIconType.sharedFolder)).toBe('sharedfolder'); + expect(getFileTypeIconNameFromExtensionOrType(undefined, FileIconType.multiple)).toBe('multiple'); + expect(getFileTypeIconNameFromExtensionOrType(undefined, FileIconType.stream)).toBe('video'); + expect(getFileTypeIconNameFromExtensionOrType(undefined, FileIconType.news)).toBe('sponews'); + expect(getFileTypeIconNameFromExtensionOrType(undefined, FileIconType.desktopFolder)).toBe('desktopfolder'); + expect(getFileTypeIconNameFromExtensionOrType(undefined, FileIconType.documentsFolder)).toBe('documentsfolder'); + expect(getFileTypeIconNameFromExtensionOrType(undefined, FileIconType.picturesFolder)).toBe('picturesfolder'); + expect(getFileTypeIconNameFromExtensionOrType(undefined, FileIconType.linkedFolder)).toBe('linkedfolder'); + expect(getFileTypeIconNameFromExtensionOrType(undefined, FileIconType.list)).toBe('splist'); + expect(getFileTypeIconNameFromExtensionOrType(undefined, FileIconType.form)).toBe('form'); + expect(getFileTypeIconNameFromExtensionOrType(undefined, FileIconType.sway)).toBe('sway'); + expect(getFileTypeIconNameFromExtensionOrType(undefined, FileIconType.playlist)).toBe('playlist'); + expect(getFileTypeIconNameFromExtensionOrType(undefined, FileIconType.loopworkspace)).toBe('loopworkspace'); + expect(getFileTypeIconNameFromExtensionOrType(undefined, FileIconType.planner)).toBe('planner'); + expect(getFileTypeIconNameFromExtensionOrType(undefined, FileIconType.todoItem)).toBe('todoitem'); + expect(getFileTypeIconNameFromExtensionOrType(undefined, FileIconType.portfolio)).toBe('portfolio'); + expect(getFileTypeIconNameFromExtensionOrType(undefined, FileIconType.album)).toBe('album'); + expect(getFileTypeIconNameFromExtensionOrType(undefined, FileIconType.listForm)).toBe('listform'); + }); + + it('should not return genericfile for any valid FileIconType enum', () => { + // Verify no enum value falls back to the default + const enumValues = [ + FileIconType.docset, + FileIconType.folder, + FileIconType.genericFile, + FileIconType.listItem, + FileIconType.sharedFolder, + FileIconType.multiple, + FileIconType.stream, + FileIconType.news, + FileIconType.desktopFolder, + FileIconType.documentsFolder, + FileIconType.picturesFolder, + FileIconType.linkedFolder, + FileIconType.list, + FileIconType.form, + FileIconType.sway, + FileIconType.playlist, + FileIconType.loopworkspace, + FileIconType.planner, + FileIconType.todoItem, + FileIconType.portfolio, + FileIconType.album, + FileIconType.listForm, + ]; + + enumValues.forEach(enumValue => { + const result = getFileTypeIconNameFromExtensionOrType(undefined, enumValue); + expect(result).toBeDefined(); + // Only FileIconType.genericFile should map to 'genericfile' + if (enumValue !== FileIconType.genericFile) { + expect(result).not.toBe('genericfile'); + } else { + expect(result).toBe('genericfile'); + } + }); + }); + }); +}); describe('getFileTypeIconAsUrl', () => { // Store original DPR once at the start diff --git a/packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconAsUrl.ts b/packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconAsUrl.ts index 114de43e1f4393..64d3580c1df8df 100644 --- a/packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconAsUrl.ts +++ b/packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconAsUrl.ts @@ -8,8 +8,7 @@ import type { IFileTypeIconOptions } from './getFileTypeIconProps'; /** * Given the `fileTypeIconOptions`, this function returns the CDN-based URL for `FileTypeIcon`. - * Similar to `getFileTypeIconProps`, this also accepts the same type of object - * but rather than returning the `iconName`, this returns the raw URL. + * Similar to `getFileTypeIconProps`, but rather than returning the `iconName`, this returns the raw URL. * @param options * @param baseUrl - optionally provide a custom CDN base url to fetch icons from */ @@ -33,9 +32,8 @@ export function getFileTypeIconAsUrl( } /** - * Given the `fileTypeIconOptions`, this function returns the DOM element for the `FileTypeIcon` - * as an HTML string. Similar to `getFileTypeIconProps`, this also accepts the same type of object - * but rather than returning the `iconName`, this returns the entire DOM element as a string. + * Given the `fileTypeIconOptions`, similar to `getFileTypeIconProps`, this function returns + * an tag DOM element that renders the icon, as a string. * @param options * @param baseUrl - optionally provide a custom CDN base url to fetch icons from */ @@ -49,8 +47,6 @@ export function getFileTypeIconAsHTMLString( return undefined; } - const { size = DEFAULT_ICON_SIZE, imageFileType = 'svg' } = options; - //const suffix = getFileTypeIconSuffix(size, imageFileType); - + const { size = DEFAULT_ICON_SIZE } = options; return ``; } diff --git a/packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconProps.ts b/packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconProps.ts index d243f8013472e7..7ffed219a658b4 100644 --- a/packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconProps.ts +++ b/packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconProps.ts @@ -3,29 +3,9 @@ import { FileIconType } from './FileIconType'; import type { FileIconTypeInput } from './FileIconType'; let _extensionToIconName: { [key: string]: string }; +let _typeToIconName: { [key: number]: string }; const GENERIC_FILE = 'genericfile'; -const FOLDER = 'folder'; -const SHARED_FOLDER = 'sharedfolder'; -const DOCSET_FOLDER = 'docset'; -const LIST_ITEM = 'listitem'; -const LIST = 'splist'; -const MULTIPLE_ITEMS = 'multiple'; -const NEWS = 'sponews'; -const STREAM = 'video'; -const DESKTOP_FOLDER = 'desktopfolder'; -const DOCUMENTS_FOLDER = 'documentsfolder'; -const PICTURES_FOLDER = 'picturesfolder'; -const LINKED_FOLDER = 'linkedfolder'; -const FORM = 'form'; -const SWAY = 'sway'; -const PLAYLIST = 'playlist'; -const LOOP_WORKSPACE = 'loopworkspace'; -const TODOITEM = 'todoitem'; -const PLANNER = 'planner'; -const PORTFOLIO = 'portfolio'; -const ALBUM = 'album'; -const LIST_FORM = 'listform'; export const DEFAULT_ICON_SIZE: FileTypeIconSize = 16; export type FileTypeIconSize = 16 | 20 | 24 | 32 | 40 | 48 | 64 | 96; @@ -87,7 +67,6 @@ export function getFileTypeIconNameFromExtensionOrType( extension: string | undefined, type: FileIconType | undefined, ): string { - let iconBaseName: string | undefined; if (extension) { if (!_extensionToIconName) { _extensionToIconName = {}; @@ -108,74 +87,28 @@ export function getFileTypeIconNameFromExtensionOrType( // Strip periods, force lowercase. extension = extension.replace('.', '').toLowerCase(); return _extensionToIconName[extension] || GENERIC_FILE; + } else if (type) { - switch (type) { - case FileIconType.docset: - iconBaseName = DOCSET_FOLDER; - break; - case FileIconType.folder: - iconBaseName = FOLDER; - break; - case FileIconType.listItem: - iconBaseName = LIST_ITEM; - break; - case FileIconType.sharedFolder: - iconBaseName = SHARED_FOLDER; - break; - case FileIconType.stream: - iconBaseName = STREAM; - break; - case FileIconType.multiple: - iconBaseName = MULTIPLE_ITEMS; - break; - case FileIconType.news: - iconBaseName = NEWS; - break; - case FileIconType.desktopFolder: - iconBaseName = DESKTOP_FOLDER; - break; - case FileIconType.documentsFolder: - iconBaseName = DOCUMENTS_FOLDER; - break; - case FileIconType.picturesFolder: - iconBaseName = PICTURES_FOLDER; - break; - case FileIconType.linkedFolder: - iconBaseName = LINKED_FOLDER; - break; - case FileIconType.list: - iconBaseName = LIST; - break; - case FileIconType.form: - iconBaseName = FORM; - break; - case FileIconType.sway: - iconBaseName = SWAY; - break; - case FileIconType.playlist: - iconBaseName = PLAYLIST; - break; - case FileIconType.loopworkspace: - iconBaseName = LOOP_WORKSPACE; - break; - case FileIconType.planner: - iconBaseName = PLANNER; - break; - case FileIconType.todoItem: - iconBaseName = TODOITEM; - break; - case FileIconType.portfolio: - iconBaseName = PORTFOLIO; - break; - case FileIconType.album: - iconBaseName = ALBUM; - break; - case FileIconType.listForm: - iconBaseName = LIST_FORM; - break; + if (!_typeToIconName) { + _typeToIconName = {}; + + for (const iconName in FileTypeIconMap) { + if (FileTypeIconMap.hasOwnProperty(iconName)) { + const types = FileTypeIconMap[iconName].types; + + if (types) { + for (let i = 0; i < types.length; i++) { + _typeToIconName[types[i]] = iconName; + } + } + } + } } + + return _typeToIconName[type] || GENERIC_FILE; } - return iconBaseName || GENERIC_FILE; + + return GENERIC_FILE; } /** From e51a9c6b5896c0916bd42dfac7289ea6e0d6be92 Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Mon, 24 Nov 2025 12:56:30 -0800 Subject: [PATCH 023/120] new documentation pass 1 (broken) --- .../FileTypeIconAccessibility.stories.tsx | 217 ++++++++++++++ .../FileTypeIcon/FileTypeIconBestPractices.md | 52 ++++ .../FileTypeIconCommon.stories.tsx | 170 +++++++++-- .../FileTypeIcon/FileTypeIconDescription.md | 27 +- .../FileTypeIconEdgeCases.stories.tsx | 270 ++++++++++++++++++ .../FileTypeIconSizes.stories.tsx | 63 ++-- .../src/FileTypeIcon/index.stories.tsx | 40 ++- 7 files changed, 784 insertions(+), 55 deletions(-) create mode 100644 packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconAccessibility.stories.tsx create mode 100644 packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconBestPractices.md create mode 100644 packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconEdgeCases.stories.tsx diff --git a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconAccessibility.stories.tsx b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconAccessibility.stories.tsx new file mode 100644 index 00000000000000..68b1be69558809 --- /dev/null +++ b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconAccessibility.stories.tsx @@ -0,0 +1,217 @@ +import * as React from 'react'; +import type { JSXElement } from '@fluentui/react-components'; +import { tokens } from '@fluentui/react-components'; +import { FileTypeIcon, FileIconType } from '@fluentui/file-type-icons-preview'; +import { makeStyles, shorthands } from '@griffel/react'; + +const useStyles = makeStyles({ + container: { + display: 'flex', + flexDirection: 'column', + gap: '32px', + }, + section: { + display: 'flex', + flexDirection: 'column', + gap: '12px', + }, + sectionTitle: { + fontSize: tokens.fontSizeBase400, + fontWeight: tokens.fontWeightSemibold, + marginBottom: '8px', + }, + description: { + fontSize: tokens.fontSizeBase300, + color: tokens.colorNeutralForeground3, + marginBottom: '8px', + }, + exampleRow: { + display: 'flex', + alignItems: 'center', + gap: '16px', + ...shorthands.padding('12px'), + backgroundColor: tokens.colorNeutralBackground1, + ...shorthands.borderRadius(tokens.borderRadiusMedium), + }, + fileInfo: { + display: 'flex', + flexDirection: 'column', + gap: '4px', + }, + fileName: { + fontSize: tokens.fontSizeBase300, + fontWeight: tokens.fontWeightSemibold, + }, + fileDetails: { + fontSize: tokens.fontSizeBase200, + color: tokens.colorNeutralForeground3, + }, + codeBlock: { + backgroundColor: tokens.colorNeutralBackground3, + ...shorthands.padding('8px', '12px'), + ...shorthands.borderRadius(tokens.borderRadiusMedium), + fontFamily: tokens.fontFamilyMonospace, + fontSize: tokens.fontSizeBase200, + overflowX: 'auto', + }, + highContrastDemo: { + '@media (forced-colors: active)': { + ...shorthands.border('2px', 'solid', 'CanvasText'), + ...shorthands.padding('16px'), + ...shorthands.borderRadius(tokens.borderRadiusMedium), + }, + }, + listExample: { + display: 'flex', + flexDirection: 'column', + gap: '8px', + }, + listItem: { + display: 'flex', + alignItems: 'center', + gap: '12px', + ...shorthands.padding('8px', '12px'), + backgroundColor: tokens.colorNeutralBackground1, + ...shorthands.borderRadius(tokens.borderRadiusMedium), + ':hover': { + backgroundColor: tokens.colorNeutralBackground1Hover, + }, + ':focus-within': { + ...shorthands.outline('2px', 'solid', tokens.colorStrokeFocus2), + outlineOffset: '2px', + }, + }, + link: { + textDecoration: 'none', + color: 'inherit', + display: 'flex', + alignItems: 'center', + gap: '12px', + flex: 1, + ':focus': { + ...shorthands.outline('none'), + }, + }, +}); + +export const Accessibility = (): JSXElement => { + const styles = useStyles(); + + return ( +
+
+
Default Alt Text
+
+ FileTypeIcon automatically generates descriptive alt text based on the file extension or type. This ensures + screen readers can convey the file type to users. +
+
+ +
+
Annual Report.pdf
+
Alt text: "pdf file icon"
+
+
+
+ +
+
Documents
+
Alt text: "folder file icon"
+
+
+ + {` +// Rendered with alt="pdf file icon"`} + +
+ +
+
Context with File Names
+
+ Always pair file type icons with file names or labels. The icon provides visual recognition while the text + ensures accessibility for all users. +
+
+
+ + Project Proposal.docx +
+
+ + Budget 2025.xlsx +
+
+ + Q4 Presentation.pptx +
+
+
+ +
+
Keyboard Navigation
+
+ When icons are part of interactive elements, ensure proper keyboard navigation and focus indicators are + present. +
+ +
+ Try pressing Tab to navigate through the list above. Focus indicators clearly show the active item. +
+
+ +
+
High Contrast Mode Support
+
+ FileTypeIcon respects Windows High Contrast mode and other forced-colors settings, ensuring icons remain + visible and distinguishable. +
+
+ + + + + +
+
+ Icons automatically adapt to high contrast themes while maintaining their recognizable shapes. +
+
+ +
+
Screen Reader Announcements
+
+ When using icons in dynamic content (like file upload feedback), ensure screen readers announce changes + appropriately using ARIA live regions. +
+ + {`
+ + Report.pdf uploaded successfully +
`} +
+
+
+ ); +}; + +Accessibility.parameters = { + docs: { + description: { + story: + 'FileTypeIcon includes built-in accessibility features like automatic alt text generation, support for high contrast mode, and compatibility with screen readers. Always provide surrounding context (file names, labels) to ensure all users can identify files effectively.', + }, + }, +}; diff --git a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconBestPractices.md b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconBestPractices.md new file mode 100644 index 00000000000000..5c361f463f1f2a --- /dev/null +++ b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconBestPractices.md @@ -0,0 +1,52 @@ +# FileTypeIcon Best Practices + +## Do + +- **Use SVG format (default) for better scalability and smaller file sizes** - SVG icons scale perfectly at any size and are more performant than PNG. +- **Choose appropriate sizes based on UI density**: + - Use 16-20px for compact interfaces, toolbars, and dense lists + - Use 24-32px for standard list items and cards + - Use 40-48px for featured content and file pickers + - Use 64-96px only for hero sections or file upload zones +- **Provide meaningful context through surrounding UI** - File type icons work best when combined with file names, metadata, or labels. +- **Use special types for non-file entities** - Use `folder`, `sharedFolder`, `listItem`, `docset`, or `genericFile` types for appropriate contexts instead of trying to force file extensions. +- **Handle unknown file extensions gracefully** - The component automatically falls back to `genericFile` for unrecognized extensions. +- **Consider accessibility** - The component provides default alt text, but ensure the surrounding context makes the file's purpose clear to all users. +- **Use consistent sizes within the same UI context** - Mixing different icon sizes in a single list or grid creates visual inconsistency. + +## Don't + +- **Don't use file type icons as the sole means of identifying files** - Always pair icons with file names or descriptions for better usability and accessibility. +- **Don't use file type icons as primary navigation elements** - These icons are meant to represent file types, not actions or navigation destinations. +- **Don't override the default alt text without good reason** - The component provides sensible defaults based on the file extension or type. +- **Don't use very large sizes (64px+) in dense lists or tables** - Large icons create excessive whitespace and reduce content density. +- **Don't mix PNG and SVG formats in the same UI context** - Stick to one format for visual consistency; prefer SVG unless you have specific compatibility requirements. +- **Don't forget to handle loading states** - When displaying many icons, consider performance implications and implement appropriate loading strategies. +- **Don't use file type icons for branding or decorative purposes** - These icons follow Fluent Design System conventions and are meant for functional file type representation. +- **Don't assume all file types have unique icons** - Many extensions share the same generic icon; rely on file names for precise identification. + +## Usage Guidelines + +### In Lists and Tables + +Use smaller sizes (16-24px) and ensure adequate spacing between icons and text labels for readability. + +### In File Upload Interfaces + +Use medium to large sizes (40-64px) to create clear drop zones and visual feedback during file selection. + +### In Search Results + +Combine icons with file metadata (size, date modified, path) to help users quickly identify files. + +### In Breadcrumbs and Navigation + +Use small sizes (16-20px) to maintain compact navigation while providing visual cues about file types. + +### With Custom Styling + +When applying custom styles, maintain the icon's aspect ratio and avoid distorting the visual design. + +### Performance Considerations + +When rendering many icons (100+), consider virtualization and lazy loading techniques to maintain smooth performance. diff --git a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconCommon.stories.tsx b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconCommon.stories.tsx index 6c05d0b3d4bf64..2f40d2504a6d76 100644 --- a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconCommon.stories.tsx +++ b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconCommon.stories.tsx @@ -1,10 +1,26 @@ import * as React from 'react'; import type { JSXElement } from '@fluentui/react-components'; +import { tokens } from '@fluentui/react-components'; import { FileTypeIcon } from '@fluentui/file-type-icons-preview'; -import { makeStyles } from '@griffel/react'; +import { makeStyles, shorthands } from '@griffel/react'; const useStyles = makeStyles({ container: { + display: 'flex', + flexDirection: 'column', + gap: '32px', + }, + categorySection: { + display: 'flex', + flexDirection: 'column', + gap: '12px', + }, + categoryTitle: { + fontSize: tokens.fontSizeBase400, + fontWeight: tokens.fontWeightSemibold, + marginBottom: '8px', + }, + grid: { display: 'grid', gridTemplateColumns: 'repeat(auto-fill, minmax(120px, 1fr))', gap: '16px', @@ -14,43 +30,144 @@ const useStyles = makeStyles({ flexDirection: 'column', alignItems: 'center', gap: '8px', + ...shorthands.padding('12px'), + backgroundColor: tokens.colorNeutralBackground1, + ...shorthands.borderRadius(tokens.borderRadiusMedium), + ':hover': { + backgroundColor: tokens.colorNeutralBackground1Hover, + }, }, label: { - fontSize: '12px', + fontSize: tokens.fontSizeBase200, textAlign: 'center', + color: tokens.colorNeutralForeground2, }, }); -const commonExtensions = [ - 'docx', - 'xlsx', - 'pptx', - 'pdf', - 'txt', - 'zip', - 'png', - 'jpg', - 'mp4', - 'mp3', - 'html', - 'css', - 'js', - 'json', - 'xml', - 'csv', -]; +const fileTypeCategories = { + documents: ['docx', 'doc', 'pdf', 'txt', 'rtf', 'odt'], + spreadsheets: ['xlsx', 'xls', 'csv', 'ods'], + presentations: ['pptx', 'ppt', 'odp'], + images: ['png', 'jpg', 'jpeg', 'gif', 'bmp', 'svg', 'ico', 'webp'], + media: ['mp4', 'avi', 'mov', 'wmv', 'mp3', 'wav', 'flac', 'aac'], + web: ['html', 'htm', 'css', 'js', 'jsx', 'ts', 'tsx', 'json', 'xml'], + code: ['py', 'java', 'c', 'cpp', 'cs', 'go', 'rb', 'php', 'swift'], + archives: ['zip', 'rar', '7z', 'tar', 'gz', 'iso'], + data: ['sql', 'db', 'mdb', 'accdb', 'xml', 'json', 'yaml'], +}; export const CommonFileTypes = (): JSXElement => { const styles = useStyles(); return (
- {commonExtensions.map(ext => ( -
- -
.{ext}
+
+
Documents
+
+ {fileTypeCategories.documents.map(ext => ( +
+ +
.{ext}
+
+ ))} +
+
+ +
+
Spreadsheets
+
+ {fileTypeCategories.spreadsheets.map(ext => ( +
+ +
.{ext}
+
+ ))} +
+
+ +
+
Presentations
+
+ {fileTypeCategories.presentations.map(ext => ( +
+ +
.{ext}
+
+ ))} +
+
+ +
+
Images
+
+ {fileTypeCategories.images.map(ext => ( +
+ +
.{ext}
+
+ ))} +
+
+ +
+
Audio & Video
+
+ {fileTypeCategories.media.map(ext => ( +
+ +
.{ext}
+
+ ))} +
+
+ +
+
Web Files
+
+ {fileTypeCategories.web.map(ext => ( +
+ +
.{ext}
+
+ ))} +
+
+ +
+
Programming
+
+ {fileTypeCategories.code.map(ext => ( +
+ +
.{ext}
+
+ ))} +
+
+ +
+
Archives
+
+ {fileTypeCategories.archives.map(ext => ( +
+ +
.{ext}
+
+ ))} +
+
+ +
+
Data & Databases
+
+ {fileTypeCategories.data.map(ext => ( +
+ +
.{ext}
+
+ ))}
- ))} +
); }; @@ -58,7 +175,8 @@ export const CommonFileTypes = (): JSXElement => { CommonFileTypes.parameters = { docs: { description: { - story: 'FileTypeIcon displays different icons for various common file types and extensions.', + story: + 'FileTypeIcon supports a comprehensive library of common file extensions organized by category. This includes documents, spreadsheets, presentations, images, media files, web files, code files, archives, and database files. Each file type has a distinct, recognizable icon.', }, }, }; diff --git a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconDescription.md b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconDescription.md index c8ed40f13b3c93..8b1dd53675017e 100644 --- a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconDescription.md +++ b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconDescription.md @@ -1,13 +1,26 @@ # FileTypeIcon -FileTypeIcon displays an icon representing a file type based on its extension or a special type (like folder). +Filetype icons represent a file or other "digital object" based on its extension or a special type (like folder). The Fluent UI design system component helps you provide consistent, recognizable visual representations of the user's items and documents across your application aligned with Microsoft 365. -The component automatically selects the appropriate icon from the Fluent Design file type icon set and handles device pixel ratio for optimal display quality. +The component automatically selects the appropriate icon from the comprehensive Fluent Design file type icon set and handles device pixel ratio for optimal display quality on all screens. + +## When to use Filetype Icons + +Use FileTypeIcon when you need to: + +- **Display file lists or grids** - Help users quickly identify file types in recent lists, document libraries, file browsers, or search results +- **Show file attachments** - Indicate attachment types in emails, messages, or forms +- **Create file upload interfaces** - Provide visual feedback about accepted or uploaded file types +- **Represent documents in workflows** - Show file types in approval processes, cloud content management interfaces, document workflows, or collaboration tools + +This control integrates seamlessly with other Fluent UI v9 components using the same design principles. It can be used in `DataGrid`, `List`, and `Card` components for displaying file collections, following consistent theming, spacing and sizing patterns with the broader Fluent Design System. ## Features -- **Automatic icon selection**: Matches file extensions to the appropriate icon -- **Multiple sizes**: Supports 16, 20, 24, 32, 40, 48, 64, and 96 pixel sizes -- **Format support**: Renders icons as SVG or PNG -- **Special types**: Supports non-file-based icons like folders, list items, etc. -- **Accessibility**: Includes appropriate alt text for screen readers +- **Automatic icon selection**: Matches file extensions to the appropriate icon from a comprehensive library +- **Multiple sizes**: Supports 16, 20, 24, 32, 40, 48, 64, and 96 pixel sizes for different UI contexts +- **Format support**: Renders icons as SVG (default, recommended) or PNG for maximum compatibility +- **Special types**: Supports non-file-based icons like folders, shared folders, list items, docsets, and generic files +- **Accessibility**: Includes appropriate alt text for screen readers and follows WCAG guidelines +- **Device-aware rendering**: Automatically handles different pixel densities for crisp display on all screens +- **Customizable base URL**: Configure a custom CDN or asset path for icon resources diff --git a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconEdgeCases.stories.tsx b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconEdgeCases.stories.tsx new file mode 100644 index 00000000000000..e2364404655111 --- /dev/null +++ b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconEdgeCases.stories.tsx @@ -0,0 +1,270 @@ +import * as React from 'react'; +import type { JSXElement } from '@fluentui/react-components'; +import { tokens } from '@fluentui/react-components'; +import { FileTypeIcon } from '@fluentui/file-type-icons-preview'; +import { makeStyles, shorthands } from '@griffel/react'; + +const useStyles = makeStyles({ + container: { + display: 'flex', + flexDirection: 'column', + gap: '32px', + }, + section: { + display: 'flex', + flexDirection: 'column', + gap: '12px', + }, + sectionTitle: { + fontSize: tokens.fontSizeBase400, + fontWeight: tokens.fontWeightSemibold, + marginBottom: '8px', + }, + description: { + fontSize: tokens.fontSizeBase300, + color: tokens.colorNeutralForeground3, + marginBottom: '8px', + }, + exampleGrid: { + display: 'grid', + gridTemplateColumns: 'repeat(auto-fill, minmax(200px, 1fr))', + gap: '16px', + }, + exampleItem: { + display: 'flex', + alignItems: 'center', + gap: '12px', + ...shorthands.padding('12px'), + backgroundColor: tokens.colorNeutralBackground1, + ...shorthands.borderRadius(tokens.borderRadiusMedium), + }, + label: { + fontSize: tokens.fontSizeBase300, + fontFamily: tokens.fontFamilyMonospace, + }, + fallbackNote: { + fontSize: tokens.fontSizeBase200, + color: tokens.colorNeutralForeground3, + fontStyle: 'italic', + }, + warningBox: { + ...shorthands.padding('12px', '16px'), + backgroundColor: tokens.colorPaletteYellowBackground2, + ...shorthands.borderLeft('4px', 'solid', tokens.colorPaletteYellowBorder1), + ...shorthands.borderRadius(tokens.borderRadiusMedium), + fontSize: tokens.fontSizeBase300, + }, + codeBlock: { + backgroundColor: tokens.colorNeutralBackground3, + ...shorthands.padding('12px'), + ...shorthands.borderRadius(tokens.borderRadiusMedium), + fontFamily: tokens.fontFamilyMonospace, + fontSize: tokens.fontSizeBase200, + overflowX: 'auto', + }, +}); + +export const EdgeCases = (): JSXElement => { + const styles = useStyles(); + + return ( +
+
+
Unknown Extensions
+
+ When FileTypeIcon encounters an unknown or unsupported file extension, it automatically falls back to the + generic file icon, ensuring consistent visual representation. +
+
+
+ +
+
.xyz123
+
→ genericFile
+
+
+
+ +
+
.unknown
+
→ genericFile
+
+
+
+ +
+
.custom
+
→ genericFile
+
+
+
+ +
+
.proprietary
+
→ genericFile
+
+
+
+
+ +
+
Empty or Null Extensions
+
+ When no extension is provided or the extension is empty, the component gracefully handles the case by showing + the generic file icon. +
+
+
+ +
+
extension=""
+
→ genericFile
+
+
+
+ +
+
no extension prop
+
→ genericFile
+
+
+
+
+ +
+
Special Characters in Extensions
+
+ Extensions with special characters, numbers, or unusual formatting are handled gracefully, though they + typically fall back to the generic icon if not recognized. +
+
+
+ +
+
.file.bak
+
Handles dots
+
+
+
+ +
+
.tar.gz
+
Double extension
+
+
+
+ +
+
.123
+
Numeric only
+
+
+
+ +
+
.v2
+
Alphanumeric
+
+
+
+
+ +
+
Very Long File Names
+
+ The icon component focuses on the extension, not the filename length. Regardless of filename length, the + correct icon is displayed. However, UI layouts should handle text truncation appropriately. +
+
+ +
+
+ This_is_a_very_long_filename_that_could_cause_layout_issues_in_some_contexts_Q4_2025_Final_Report_v3.pdf +
+
+
+
+ Note: While FileTypeIcon handles any extension length, consider truncating long filenames in + your UI layout to maintain readability and prevent overflow issues. +
+
+ +
+
Case Sensitivity
+
+ File extensions are handled in a case-insensitive manner. The component recognizes extensions regardless of + capitalization. +
+
+
+ +
.PDF
+
+
+ +
.pdf
+
+
+ +
.Pdf
+
+
+ +
.PdF
+
+
+
All variations display the same PDF icon
+
+ +
+
Best Practice: Handle Edge Cases in Your Code
+
+ When integrating FileTypeIcon, consider extracting and normalizing file extensions from full filenames: +
+ + {`// Extract extension from filename +const getExtension = (filename: string): string => { + const parts = filename.split('.'); + return parts.length > 1 ? parts[parts.length - 1].toLowerCase() : ''; +}; + +// Usage +const filename = "Report.Final.PDF"; +const extension = getExtension(filename); // "pdf" + +`} + +
+ +
+
Extensions with Leading Dots
+
+ The extension prop should be provided without the leading dot. If a dot is included, the component handles it + appropriately. +
+
+
+ +
extension="docx" ✓
+
+
+ +
extension=".docx"
+
+
+
+ Best Practice: Always provide extensions without the leading dot for consistent behavior. +
+
+
+ ); +}; + +EdgeCases.parameters = { + docs: { + description: { + story: + 'FileTypeIcon gracefully handles edge cases including unknown extensions, empty values, special characters, and case variations. The component falls back to a generic file icon for unrecognized extensions, ensuring your UI always displays something meaningful.', + }, + }, +}; diff --git a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconSizes.stories.tsx b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconSizes.stories.tsx index 1b443b1593327c..75b3fc6d985b40 100644 --- a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconSizes.stories.tsx +++ b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconSizes.stories.tsx @@ -1,21 +1,32 @@ import * as React from 'react'; import type { JSXElement } from '@fluentui/react-components'; +import { tokens } from '@fluentui/react-components'; import { FileTypeIcon } from '@fluentui/file-type-icons-preview'; import { makeStyles } from '@griffel/react'; const useStyles = makeStyles({ container: { display: 'flex', - flexDirection: 'column', - gap: '16px', + alignItems: 'flex-end', + gap: '24px', + flexWrap: 'wrap', }, - row: { + iconGroup: { display: 'flex', + flexDirection: 'column', alignItems: 'center', gap: '8px', }, label: { - width: '100px', + fontSize: tokens.fontSizeBase200, + fontWeight: tokens.fontWeightSemibold, + color: tokens.colorNeutralForeground2, + }, + description: { + fontSize: tokens.fontSizeBase100, + color: tokens.colorNeutralForeground3, + textAlign: 'center', + maxWidth: '120px', }, }); @@ -24,37 +35,45 @@ export const Sizes = (): JSXElement => { return (
-
-
16px:
+
+
16px
+
Compact UIs, toolbars, dense tables
-
-
20px:
+
+
20px
+
Compact lists, navigation items
-
-
24px:
+
+
24px
+
Standard list items, search results
-
-
32px:
+
+
32px
+
Standard cards, file browsers
-
-
40px:
+
+
40px
+
Featured items, file pickers
-
-
48px:
+
+
48px
+
Grid views, attachment previews
-
-
64px:
+
+
64px
+
Large grid items, file upload zones
-
-
96px:
+
+
96px
+
Hero sections, large previews
); @@ -63,7 +82,9 @@ export const Sizes = (): JSXElement => { Sizes.parameters = { docs: { description: { - story: 'FileTypeIcon supports multiple sizes: 16, 20, 24, 32, 40, 48, 64, and 96 pixels.', + story: + 'FileTypeIcon supports 8 size variants (16, 20, 24, 32, 40, 48, 64, and 96 pixels) to accommodate different UI contexts. Choose smaller sizes for compact interfaces and larger sizes for featured content or file upload experiences.', }, }, }; + diff --git a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/index.stories.tsx b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/index.stories.tsx index 56b4dd692e1472..93a907a7b972b3 100644 --- a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/index.stories.tsx +++ b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/index.stories.tsx @@ -6,8 +6,11 @@ export { Sizes } from './FileTypeIconSizes.stories'; export { CommonFileTypes } from './FileTypeIconCommon.stories'; export { SpecialTypes } from './FileTypeIconSpecialTypes.stories'; export { UrlAndHtmlFunctions } from './FileTypeIconUrlAndHtml.stories'; +export { Accessibility } from './FileTypeIconAccessibility.stories'; +export { EdgeCases } from './FileTypeIconEdgeCases.stories'; import descriptionMd from './FileTypeIconDescription.md'; +import bestPracticesMd from './FileTypeIconBestPractices.md'; export default { title: 'Icons/Filetype Icons', @@ -15,7 +18,42 @@ export default { parameters: { docs: { description: { - component: descriptionMd, + component: [descriptionMd, bestPracticesMd].join('\n'), + }, + }, + }, + argTypes: { + size: { + control: { type: 'select' }, + options: [16, 20, 24, 32, 40, 48, 64, 96], + description: 'The size of the icon in pixels', + table: { + type: { summary: '16 | 20 | 24 | 32 | 40 | 48 | 64 | 96' }, + defaultValue: { summary: '48' }, + }, + }, + extension: { + control: { type: 'text' }, + description: 'The file extension (without the dot)', + table: { + type: { summary: 'string' }, + }, + }, + type: { + control: { type: 'select' }, + options: ['folder', 'genericFile', 'sharedFolder', 'listItem', 'docset'], + description: 'Special icon type (alternative to extension)', + table: { + type: { summary: 'FileIconType' }, + }, + }, + imageFileType: { + control: { type: 'radio' }, + options: ['svg', 'png'], + description: 'The image format to use', + table: { + type: { summary: "'svg' | 'png'" }, + defaultValue: { summary: "'svg'" }, }, }, }, From 213d6f07422c22b5d10964874244cebba827ec89 Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Mon, 24 Nov 2025 13:24:08 -0800 Subject: [PATCH 024/120] documentation rendering ok, ready to condense --- .../FileTypeIconCommon.stories.tsx | 81 ++----------------- .../FileTypeIconDefault.stories.tsx | 6 ++ .../FileTypeIcon/FileTypeIconDescription.md | 3 +- 3 files changed, 15 insertions(+), 75 deletions(-) diff --git a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconCommon.stories.tsx b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconCommon.stories.tsx index 2f40d2504a6d76..5616aebcdc96a3 100644 --- a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconCommon.stories.tsx +++ b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconCommon.stories.tsx @@ -45,15 +45,10 @@ const useStyles = makeStyles({ }); const fileTypeCategories = { - documents: ['docx', 'doc', 'pdf', 'txt', 'rtf', 'odt'], - spreadsheets: ['xlsx', 'xls', 'csv', 'ods'], - presentations: ['pptx', 'ppt', 'odp'], - images: ['png', 'jpg', 'jpeg', 'gif', 'bmp', 'svg', 'ico', 'webp'], - media: ['mp4', 'avi', 'mov', 'wmv', 'mp3', 'wav', 'flac', 'aac'], - web: ['html', 'htm', 'css', 'js', 'jsx', 'ts', 'tsx', 'json', 'xml'], - code: ['py', 'java', 'c', 'cpp', 'cs', 'go', 'rb', 'php', 'swift'], - archives: ['zip', 'rar', '7z', 'tar', 'gz', 'iso'], - data: ['sql', 'db', 'mdb', 'accdb', 'xml', 'json', 'yaml'], + documents: ['docx', 'xlsx', 'pdf', 'txt', 'rtf', 'odt', 'pptx', 'csv'], + media: ['jpg', 'svg', 'mp4', 'mp3', 'wav', 'aac'], + code: ['html', 'url', 'json', 'xml', 'py', 'java', 'cpp'], + data: ['zip', 'tar', 'sql', 'accdb', 'xml'], }; export const CommonFileTypes = (): JSXElement => { @@ -62,7 +57,7 @@ export const CommonFileTypes = (): JSXElement => { return (
-
Documents
+
Common Documents
{fileTypeCategories.documents.map(ext => (
@@ -74,43 +69,7 @@ export const CommonFileTypes = (): JSXElement => {
-
Spreadsheets
-
- {fileTypeCategories.spreadsheets.map(ext => ( -
- -
.{ext}
-
- ))} -
-
- -
-
Presentations
-
- {fileTypeCategories.presentations.map(ext => ( -
- -
.{ext}
-
- ))} -
-
- -
-
Images
-
- {fileTypeCategories.images.map(ext => ( -
- -
.{ext}
-
- ))} -
-
- -
-
Audio & Video
+
Media Files
{fileTypeCategories.media.map(ext => (
@@ -122,19 +81,7 @@ export const CommonFileTypes = (): JSXElement => {
-
Web Files
-
- {fileTypeCategories.web.map(ext => ( -
- -
.{ext}
-
- ))} -
-
- -
-
Programming
+
Web & Programming
{fileTypeCategories.code.map(ext => (
@@ -146,19 +93,7 @@ export const CommonFileTypes = (): JSXElement => {
-
Archives
-
- {fileTypeCategories.archives.map(ext => ( -
- -
.{ext}
-
- ))} -
-
- -
-
Data & Databases
+
Data Files
{fileTypeCategories.data.map(ext => (
diff --git a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx index ae1ba2eed2f3c2..a31c8f09ae04d4 100644 --- a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx +++ b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx @@ -4,3 +4,9 @@ import { FileTypeIcon } from '@fluentui/file-type-icons-preview'; import type { FileTypeIconProps } from '@fluentui/file-type-icons-preview'; export const Default = (props: Partial): JSXElement => ; + +Default.args = { + extension: 'docx', + size: 48, + imageFileType: 'svg', +}; diff --git a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconDescription.md b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconDescription.md index 8b1dd53675017e..d5b06be38d7e8c 100644 --- a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconDescription.md +++ b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconDescription.md @@ -9,8 +9,7 @@ The component automatically selects the appropriate icon from the comprehensive Use FileTypeIcon when you need to: - **Display file lists or grids** - Help users quickly identify file types in recent lists, document libraries, file browsers, or search results -- **Show file attachments** - Indicate attachment types in emails, messages, or forms -- **Create file upload interfaces** - Provide visual feedback about accepted or uploaded file types +- **Show file attachments or file upload interfaces** - Indicate attachment types in emails, messages, or forms. Provide visual feedback about accepted or uploaded file types - **Represent documents in workflows** - Show file types in approval processes, cloud content management interfaces, document workflows, or collaboration tools This control integrates seamlessly with other Fluent UI v9 components using the same design principles. It can be used in `DataGrid`, `List`, and `Card` components for displaying file collections, following consistent theming, spacing and sizing patterns with the broader Fluent Design System. From f0a02bf94c9f0f128838d662015387d3cbe99dca Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Mon, 24 Nov 2025 15:12:50 -0800 Subject: [PATCH 025/120] refining FileIconType and storybook --- .../FileTypeIcon/FileTypeIcon.types.ts | 4 ++-- .../library/src/index.ts | 1 - .../library/src/utils/FileIconType.ts | 24 ------------------- .../library/src/utils/getFileTypeIconProps.ts | 3 +-- .../FileTypeIconDefault.stories.tsx | 2 +- .../src/FileTypeIcon/index.stories.tsx | 3 +-- 6 files changed, 5 insertions(+), 32 deletions(-) diff --git a/packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/FileTypeIcon.types.ts b/packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/FileTypeIcon.types.ts index ea78ccb2035986..01469d9cd2a8e0 100644 --- a/packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/FileTypeIcon.types.ts +++ b/packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/FileTypeIcon.types.ts @@ -1,5 +1,5 @@ import type { ComponentState, ComponentProps, Slot } from '@fluentui/react-utilities'; -import type { FileIconTypeInput } from '../../utils/FileIconType'; +import type { FileIconType } from '../../utils/FileIconType'; import type { FileTypeIconSize, ImageFileType } from '../../utils/getFileTypeIconProps'; export type FileTypeIconSlots = { @@ -22,7 +22,7 @@ export type FileTypeIconProps = ComponentProps & { * file type icons that are not associated with a file extension, * such as folder. */ - type?: FileIconTypeInput; + type?: FileIconType; /** * The size of the icon in pixels. diff --git a/packages/react-components/file-type-icons-preview/library/src/index.ts b/packages/react-components/file-type-icons-preview/library/src/index.ts index bb3c614df484cd..279136bbbb0973 100644 --- a/packages/react-components/file-type-icons-preview/library/src/index.ts +++ b/packages/react-components/file-type-icons-preview/library/src/index.ts @@ -10,7 +10,6 @@ export type { FileTypeIconProps, FileTypeIconSlots, FileTypeIconState } from './ // Utility exports (for backward compatibility and advanced usage) export { FileIconType } from './utils/FileIconType'; -export type { FileIconTypeInput } from './utils/FileIconType'; export { FileTypeIconMap } from './utils/FileTypeIconMap'; export { getFileTypeIconProps, diff --git a/packages/react-components/file-type-icons-preview/library/src/utils/FileIconType.ts b/packages/react-components/file-type-icons-preview/library/src/utils/FileIconType.ts index 22a7ee22bfcf81..0a3b112acb3b00 100644 --- a/packages/react-components/file-type-icons-preview/library/src/utils/FileIconType.ts +++ b/packages/react-components/file-type-icons-preview/library/src/utils/FileIconType.ts @@ -29,27 +29,3 @@ export enum FileIconType { album = 21, listForm = 22, } - -export type FileIconTypeInput = - | 1 - | 2 - | 3 - | 4 - | 5 - | 6 - | 7 - | 8 - | 9 - | 10 - | 11 - | 12 - | 13 - | 14 - | 15 - | 16 - | 17 - | 18 - | 19 - | 20 - | 21 - | 22; diff --git a/packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconProps.ts b/packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconProps.ts index 7ffed219a658b4..befb086339094f 100644 --- a/packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconProps.ts +++ b/packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconProps.ts @@ -1,6 +1,5 @@ import { FileTypeIconMap } from './FileTypeIconMap'; import { FileIconType } from './FileIconType'; -import type { FileIconTypeInput } from './FileIconType'; let _extensionToIconName: { [key: string]: string }; let _typeToIconName: { [key: number]: string }; @@ -23,7 +22,7 @@ export interface IFileTypeIconOptions { * file type icons that are not associated with a file extension, * such as folder. */ - type?: FileIconTypeInput; + type?: FileIconType; /** * The size of the icon in pixels. * @default 16 diff --git a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx index a31c8f09ae04d4..8d454b4565d214 100644 --- a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx +++ b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx @@ -3,7 +3,7 @@ import type { JSXElement } from '@fluentui/react-components'; import { FileTypeIcon } from '@fluentui/file-type-icons-preview'; import type { FileTypeIconProps } from '@fluentui/file-type-icons-preview'; -export const Default = (props: Partial): JSXElement => ; +export const Default = (args: FileTypeIconProps): JSXElement => ; Default.args = { extension: 'docx', diff --git a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/index.stories.tsx b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/index.stories.tsx index 93a907a7b972b3..d70d435d3635a6 100644 --- a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/index.stories.tsx +++ b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/index.stories.tsx @@ -1,8 +1,7 @@ import { FileTypeIcon } from '@fluentui/file-type-icons-preview'; import type { Meta } from '@storybook/react'; -export { Default } from './FileTypeIconDefault.stories'; -export { Sizes } from './FileTypeIconSizes.stories'; +export { Sizes as Default } from './FileTypeIconSizes.stories'; export { CommonFileTypes } from './FileTypeIconCommon.stories'; export { SpecialTypes } from './FileTypeIconSpecialTypes.stories'; export { UrlAndHtmlFunctions } from './FileTypeIconUrlAndHtml.stories'; From 71338bf0a05fa7c56469e60958987ea7625d748e Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Mon, 24 Nov 2025 16:56:50 -0800 Subject: [PATCH 026/120] story condensation snapshot --- .../FileTypeIcon/FileTypeIconBestPractices.md | 46 +-- .../FileTypeIconBestPractices.stories.tsx | 25 ++ .../FileTypeIconCommon.stories.tsx | 29 +- .../FileTypeIconDefault.stories.tsx | 89 +++++- .../FileTypeIcon/FileTypeIconDescription.md | 6 +- .../FileTypeIconSizes.stories.tsx | 90 ------ .../FileTypeIconSpecialTypes.stories.tsx | 54 ---- .../FileTypeIconUrlAndHtml.stories.tsx | 262 +++++++++--------- .../src/FileTypeIcon/index.stories.tsx | 9 +- 9 files changed, 280 insertions(+), 330 deletions(-) create mode 100644 packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconBestPractices.stories.tsx delete mode 100644 packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconSizes.stories.tsx delete mode 100644 packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconSpecialTypes.stories.tsx diff --git a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconBestPractices.md b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconBestPractices.md index 5c361f463f1f2a..011c3eb39b47aa 100644 --- a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconBestPractices.md +++ b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconBestPractices.md @@ -1,52 +1,22 @@ -# FileTypeIcon Best Practices - -## Do +# FileTypeIcon best practices - **Use SVG format (default) for better scalability and smaller file sizes** - SVG icons scale perfectly at any size and are more performant than PNG. - **Choose appropriate sizes based on UI density**: - - Use 16-20px for compact interfaces, toolbars, and dense lists + - Use 16-20px for compact interfaces, breadcrumbs, and dense lists - Use 24-32px for standard list items and cards - Use 40-48px for featured content and file pickers - Use 64-96px only for hero sections or file upload zones -- **Provide meaningful context through surrounding UI** - File type icons work best when combined with file names, metadata, or labels. +- **Provide meaningful context through surrounding UI** - File type icons work best when combined with file names, metadata, or labels. This is especially valuable in search results or similar experiences where diverse item types may be present. - **Use special types for non-file entities** - Use `folder`, `sharedFolder`, `listItem`, `docset`, or `genericFile` types for appropriate contexts instead of trying to force file extensions. -- **Handle unknown file extensions gracefully** - The component automatically falls back to `genericFile` for unrecognized extensions. +- **Handle unknown file extensions gracefully** - The component automatically falls back to `genericFile` for unrecognized extensions, and is regularly updated to support new file types if they have a recognized icon. - **Consider accessibility** - The component provides default alt text, but ensure the surrounding context makes the file's purpose clear to all users. - **Use consistent sizes within the same UI context** - Mixing different icon sizes in a single list or grid creates visual inconsistency. -## Don't +## Things to avoid - **Don't use file type icons as the sole means of identifying files** - Always pair icons with file names or descriptions for better usability and accessibility. - **Don't use file type icons as primary navigation elements** - These icons are meant to represent file types, not actions or navigation destinations. - **Don't override the default alt text without good reason** - The component provides sensible defaults based on the file extension or type. -- **Don't use very large sizes (64px+) in dense lists or tables** - Large icons create excessive whitespace and reduce content density. -- **Don't mix PNG and SVG formats in the same UI context** - Stick to one format for visual consistency; prefer SVG unless you have specific compatibility requirements. -- **Don't forget to handle loading states** - When displaying many icons, consider performance implications and implement appropriate loading strategies. -- **Don't use file type icons for branding or decorative purposes** - These icons follow Fluent Design System conventions and are meant for functional file type representation. -- **Don't assume all file types have unique icons** - Many extensions share the same generic icon; rely on file names for precise identification. - -## Usage Guidelines - -### In Lists and Tables - -Use smaller sizes (16-24px) and ensure adequate spacing between icons and text labels for readability. - -### In File Upload Interfaces - -Use medium to large sizes (40-64px) to create clear drop zones and visual feedback during file selection. - -### In Search Results - -Combine icons with file metadata (size, date modified, path) to help users quickly identify files. - -### In Breadcrumbs and Navigation - -Use small sizes (16-20px) to maintain compact navigation while providing visual cues about file types. - -### With Custom Styling - -When applying custom styles, maintain the icon's aspect ratio and avoid distorting the visual design. - -### Performance Considerations - -When rendering many icons (100+), consider virtualization and lazy loading techniques to maintain smooth performance. +- **Don't use very large sizes (64px+) in dense lists or tables** - Large icons create excessive whitespace and reduce content density. Use thumbnail previews of the real file contents if available. +- **Don't use file type icons for branding or decorative purposes** - These icons follow Fluent Design System conventions and are meant for functional file type representation. Avoid non-square aspect ratios, custom styling overrides or distorting the visual design. +- **Don't assume all file types have unique icons** - Many extensions may share the same icon; rely on file names for precise identification. diff --git a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconBestPractices.stories.tsx b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconBestPractices.stories.tsx new file mode 100644 index 00000000000000..6ef69ab533e035 --- /dev/null +++ b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconBestPractices.stories.tsx @@ -0,0 +1,25 @@ +import * as React from 'react'; +import type { JSXElement } from '@fluentui/react-components'; + +import bestPracticesMd from './FileTypeIconBestPractices.md'; + +export const BestPractices = (): JSXElement => { + return <>; +}; + +BestPractices.storyName = 'Best Practices'; + +BestPractices.parameters = { + docs: { + description: { + story: bestPracticesMd, + }, + canvas: { + sourceState: 'hidden', + }, + }, + previewTabs: { + 'storybook/docs/panel': { hidden: true }, + }, + viewMode: 'docs', +}; diff --git a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconCommon.stories.tsx b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconCommon.stories.tsx index 5616aebcdc96a3..9a60597c678e14 100644 --- a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconCommon.stories.tsx +++ b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconCommon.stories.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import type { JSXElement } from '@fluentui/react-components'; import { tokens } from '@fluentui/react-components'; -import { FileTypeIcon } from '@fluentui/file-type-icons-preview'; +import { FileTypeIcon, FileIconType } from '@fluentui/file-type-icons-preview'; import { makeStyles, shorthands } from '@griffel/react'; const useStyles = makeStyles({ @@ -51,6 +51,14 @@ const fileTypeCategories = { data: ['zip', 'tar', 'sql', 'accdb', 'xml'], }; +const specialTypes = [ + { type: FileIconType.folder, label: 'Folder' }, + { type: FileIconType.genericFile, label: 'Generic File' }, + { type: FileIconType.sharedFolder, label: 'Shared Folder' }, + { type: FileIconType.listItem, label: 'List Item' }, + { type: FileIconType.docset, label: 'Docset' }, +]; + export const CommonFileTypes = (): JSXElement => { const styles = useStyles(); @@ -103,6 +111,21 @@ export const CommonFileTypes = (): JSXElement => { ))}
+ +
+
Special Types
+

+ These types are not based on file extensions, but represent objects like folders and list items. +

+
+ {specialTypes.map(({ type, label }) => ( +
+ +
{label}
+
+ ))} +
+
); }; @@ -111,7 +134,9 @@ CommonFileTypes.parameters = { docs: { description: { story: - 'FileTypeIcon supports a comprehensive library of common file extensions organized by category. This includes documents, spreadsheets, presentations, images, media files, web files, code files, archives, and database files. Each file type has a distinct, recognizable icon.', + 'FileTypeIcon supports a comprehensive library of file extensions organized by category (documents, media, code, data) and special types that are not based on file extensions (folder, shared folder, list item, docset, generic file).', }, }, }; + +CommonFileTypes.storyName = 'File Types'; diff --git a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx index 8d454b4565d214..6b6772c7599a05 100644 --- a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx +++ b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx @@ -1,12 +1,87 @@ import * as React from 'react'; import type { JSXElement } from '@fluentui/react-components'; -import { FileTypeIcon } from '@fluentui/file-type-icons-preview'; -import type { FileTypeIconProps } from '@fluentui/file-type-icons-preview'; +import { tokens } from '@fluentui/react-components'; +import { FileIconType, FileTypeIcon } from '@fluentui/file-type-icons-preview'; +import { makeStyles } from '@griffel/react'; -export const Default = (args: FileTypeIconProps): JSXElement => ; +const useStyles = makeStyles({ + container: { + display: 'flex', + flexDirection: 'column', + gap: '16px', + }, + iconGroup: { + display: 'flex', + alignItems: 'center', + gap: '16px', + }, + label: { + fontSize: tokens.fontSizeBase200, + fontWeight: tokens.fontWeightSemibold, + color: tokens.colorNeutralForeground2, + minWidth: '40px', + }, + description: { + fontSize: tokens.fontSizeBase100, + color: tokens.colorNeutralForeground3, + }, +}); -Default.args = { - extension: 'docx', - size: 48, - imageFileType: 'svg', +export const Default = (): JSXElement => { + const styles = useStyles(); + + return ( +
+
+ +
16px
+
Compact UIs, toolbars, dense tables. Example shows a Word document filetype icon.
+
+
+ +
20px
+
Compact lists, navigation items. Example shows a folder, referenced via FileIconType.
+
+
+ +
24px
+
Standard list items, search results. Example shows a PDF.
+
+
+ +
32px
+
Standard cards, file browsers. Example shows a PowerPoint presentation with a legacy file extension.
+
+
+ +
40px
+
Featured items, file pickers. Example shows a video file.
+
+
+ +
48px
+
Grid views, attachment previews. Example shows a Microsoft Lists object.
+
+
+ +
64px
+
Large grid items, file upload zones. Text file.
+
+
+ +
96px
+
Hero sections, large previews. Example shows a shared folder.
+
+
+ ); +}; + +Default.parameters = { + docs: { + description: { + story: + 'FileTypeIcon supports 8 size variants (16, 20, 24, 32, 40, 48, 64, and 96 pixels) to accommodate different UI contexts. Choose smaller sizes for compact interfaces and larger sizes for featured content or file upload experiences.', + }, + }, }; + diff --git a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconDescription.md b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconDescription.md index d5b06be38d7e8c..1674419d5c509c 100644 --- a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconDescription.md +++ b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconDescription.md @@ -1,12 +1,10 @@ # FileTypeIcon -Filetype icons represent a file or other "digital object" based on its extension or a special type (like folder). The Fluent UI design system component helps you provide consistent, recognizable visual representations of the user's items and documents across your application aligned with Microsoft 365. +Filetype icons represent a file or other "digital object" based on its extension or a special type (like folder). This Fluent UI design system component provides consistent, recognizable visual representations of the user's items and documents across your application, aligned with Microsoft 365. The component automatically selects the appropriate icon from the comprehensive Fluent Design file type icon set and handles device pixel ratio for optimal display quality on all screens. -## When to use Filetype Icons - -Use FileTypeIcon when you need to: +## Use Filetype Icons when you need to: - **Display file lists or grids** - Help users quickly identify file types in recent lists, document libraries, file browsers, or search results - **Show file attachments or file upload interfaces** - Indicate attachment types in emails, messages, or forms. Provide visual feedback about accepted or uploaded file types diff --git a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconSizes.stories.tsx b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconSizes.stories.tsx deleted file mode 100644 index 75b3fc6d985b40..00000000000000 --- a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconSizes.stories.tsx +++ /dev/null @@ -1,90 +0,0 @@ -import * as React from 'react'; -import type { JSXElement } from '@fluentui/react-components'; -import { tokens } from '@fluentui/react-components'; -import { FileTypeIcon } from '@fluentui/file-type-icons-preview'; -import { makeStyles } from '@griffel/react'; - -const useStyles = makeStyles({ - container: { - display: 'flex', - alignItems: 'flex-end', - gap: '24px', - flexWrap: 'wrap', - }, - iconGroup: { - display: 'flex', - flexDirection: 'column', - alignItems: 'center', - gap: '8px', - }, - label: { - fontSize: tokens.fontSizeBase200, - fontWeight: tokens.fontWeightSemibold, - color: tokens.colorNeutralForeground2, - }, - description: { - fontSize: tokens.fontSizeBase100, - color: tokens.colorNeutralForeground3, - textAlign: 'center', - maxWidth: '120px', - }, -}); - -export const Sizes = (): JSXElement => { - const styles = useStyles(); - - return ( -
-
- -
16px
-
Compact UIs, toolbars, dense tables
-
-
- -
20px
-
Compact lists, navigation items
-
-
- -
24px
-
Standard list items, search results
-
-
- -
32px
-
Standard cards, file browsers
-
-
- -
40px
-
Featured items, file pickers
-
-
- -
48px
-
Grid views, attachment previews
-
-
- -
64px
-
Large grid items, file upload zones
-
-
- -
96px
-
Hero sections, large previews
-
-
- ); -}; - -Sizes.parameters = { - docs: { - description: { - story: - 'FileTypeIcon supports 8 size variants (16, 20, 24, 32, 40, 48, 64, and 96 pixels) to accommodate different UI contexts. Choose smaller sizes for compact interfaces and larger sizes for featured content or file upload experiences.', - }, - }, -}; - diff --git a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconSpecialTypes.stories.tsx b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconSpecialTypes.stories.tsx deleted file mode 100644 index cb8433b1860928..00000000000000 --- a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconSpecialTypes.stories.tsx +++ /dev/null @@ -1,54 +0,0 @@ -import * as React from 'react'; -import type { JSXElement } from '@fluentui/react-components'; -import { FileTypeIcon, FileIconType } from '@fluentui/file-type-icons-preview'; -import { makeStyles } from '@griffel/react'; - -const useStyles = makeStyles({ - container: { - display: 'grid', - gridTemplateColumns: 'repeat(auto-fill, minmax(120px, 1fr))', - gap: '16px', - }, - item: { - display: 'flex', - flexDirection: 'column', - alignItems: 'center', - gap: '8px', - }, - label: { - fontSize: '12px', - textAlign: 'center', - }, -}); - -const specialTypes = [ - { type: FileIconType.folder, label: 'Folder' }, - { type: FileIconType.genericFile, label: 'Generic File' }, - { type: FileIconType.sharedFolder, label: 'Shared Folder' }, - { type: FileIconType.listItem, label: 'List Item' }, - { type: FileIconType.docset, label: 'Docset' }, -]; - -export const SpecialTypes = (): JSXElement => { - const styles = useStyles(); - - return ( -
- {specialTypes.map(({ type, label }) => ( -
- -
{label}
-
- ))} -
- ); -}; - -SpecialTypes.parameters = { - docs: { - description: { - story: - 'FileTypeIcon supports special file types that are not based on file extensions, such as folders and list items.', - }, - }, -}; diff --git a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconUrlAndHtml.stories.tsx b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconUrlAndHtml.stories.tsx index 2fd255c9c24979..191f098399eeae 100644 --- a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconUrlAndHtml.stories.tsx +++ b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconUrlAndHtml.stories.tsx @@ -67,153 +67,155 @@ const useStyles = makeStyles({ const commonFileTypes = ['docx', 'pdf', 'xlsx']; -export const UrlAndHtmlFunctions = (): JSXElement => { - const styles = useStyles(); +export const UrlAndHtml = { + render: (): JSXElement => { + const styles = useStyles(); - return ( -
- {/* URL Function Demo */} -
-
getFileTypeIconAsUrl() - PNG Format with Different DPIs
-
- {commonFileTypes.map(extension => ( -
-
.{extension}
- {(['1x', '1.5x', '2x'] as const).map(dpi => { - const url = getFileTypeIconAsUrl({ - extension, - size: 48, - imageFileType: 'png', - }); + return ( +
+ {/* URL Function Demo */} +
+
getFileTypeIconAsUrl() - PNG Format with Different DPIs
+
+ {commonFileTypes.map(extension => ( +
+
.{extension}
+ {(['1x', '1.5x', '2x'] as const).map(dpi => { + const url = getFileTypeIconAsUrl({ + extension, + size: 48, + imageFileType: 'png', + }); - // For demo purposes, we'll show what the URL would be for each DPI - // In real usage, the browser's devicePixelRatio would determine this - const dpiSuffix = dpi === '1x' ? '' : `_${dpi}`; - const demoUrl = url?.replace(/48/, `48${dpiSuffix}`); + // For demo purposes, we'll show what the URL would be for each DPI + // In real usage, the browser's devicePixelRatio would determine this + const dpiSuffix = dpi === '1x' ? '' : `_${dpi}`; + const demoUrl = url?.replace(/48/, `48${dpiSuffix}`); - return ( -
-
{dpi} DPI:
-
{demoUrl}
-
- ); - })} -
- ))} + return ( +
+
{dpi} DPI:
+
{demoUrl}
+
+ ); + })} +
+ ))} +
-
- - {/* SVG URL Demo */} -
-
getFileTypeIconAsUrl() - SVG Format with Different DPIs
-
- {commonFileTypes.map(extension => ( -
-
.{extension}
- {(['1x', '1.5x', '2x'] as const).map(dpi => { - const url = getFileTypeIconAsUrl({ - extension, - size: 48, - imageFileType: 'svg', - }); - // SVG only uses 1.5x for specific DPI ranges, otherwise uses base - const dpiSuffix = dpi === '1.5x' ? '_1.5x' : ''; - const demoUrl = url?.replace(/48/, `48${dpiSuffix}`); + {/* SVG URL Demo */} +
+
getFileTypeIconAsUrl() - SVG Format with Different DPIs
+
+ {commonFileTypes.map(extension => ( +
+
.{extension}
+ {(['1x', '1.5x', '2x'] as const).map(dpi => { + const url = getFileTypeIconAsUrl({ + extension, + size: 48, + imageFileType: 'svg', + }); - return ( -
-
{dpi} DPI:
-
{demoUrl}
-
- ); - })} -
- ))} -
-
+ // SVG only uses 1.5x for specific DPI ranges, otherwise uses base + const dpiSuffix = dpi === '1.5x' ? '_1.5x' : ''; + const demoUrl = url?.replace(/48/, `48${dpiSuffix}`); - {/* HTML String Demo */} -
-
getFileTypeIconAsHTMLString() - Visual Preview
-
- {commonFileTypes.map(extension => ( -
-
.{extension}
-
-
-
-
HTML Output:
-
- {getFileTypeIconAsHTMLString({ - extension, - size: 48, - imageFileType: 'svg', + return ( +
+
{dpi} DPI:
+
{demoUrl}
+
+ ); })}
-
- ))} + ))} +
-
- {/* Comparison at Different Sizes */} -
-
getFileTypeIconAsHTMLString() - Different Sizes
-
- {([16, 24, 48] as const).map(size => ( -
-
Size: {size}px
- {commonFileTypes.map(extension => ( -
-
.{extension}:
-
-
-
+ {/* HTML String Demo */} +
+
getFileTypeIconAsHTMLString() - Visual Preview
+
+ {commonFileTypes.map(extension => ( +
+
.{extension}
+
+
+
+
HTML Output:
+
+ {getFileTypeIconAsHTMLString({ + extension, + size: 48, + imageFileType: 'svg', + })}
- ))} -
- ))} +
+ ))} +
-
- {/* Interactive Example */} -
-
Current Device Information
-
- Device Pixel Ratio: {typeof window !== 'undefined' ? window.devicePixelRatio : 'N/A'} + {/* Comparison at Different Sizes */} +
+
getFileTypeIconAsHTMLString() - Different Sizes
+
+ {([16, 24, 48] as const).map(size => ( +
+
Size: {size}px
+ {commonFileTypes.map(extension => ( +
+
.{extension}:
+
+
+
+
+ ))} +
+ ))} +
-
- This affects which icon variant is loaded for PNG images. SVG images scale better but may use 1.5x variant - for better rendering. + + {/* Interactive Example */} +
+
Current Device Information
+
+ Device Pixel Ratio: {typeof window !== 'undefined' ? window.devicePixelRatio : 'N/A'} +
+
+ This affects which icon variant is loaded for PNG images. SVG images scale better but may use 1.5x variant + for better rendering. +
-
- ); -}; - -UrlAndHtmlFunctions.parameters = { - docs: { - description: { - story: - 'Demonstrates the `getFileTypeIconAsUrl()` and `getFileTypeIconAsHTMLString()` utility functions with different DPI settings (1x, 1.5x, 2x) and common file types (docx, pdf, xlsx). These functions are useful when you need direct access to CDN URLs or HTML markup for file type icons.', + ); + }, + name: 'URL and HTML Functions', + parameters: { + docs: { + description: { + story: + 'Demonstrates the `getFileTypeIconAsUrl()` and `getFileTypeIconAsHTMLString()` utility functions with different DPI settings (1x, 1.5x, 2x) and common file types (docx, pdf, xlsx). These functions are useful when you need direct access to CDN URLs or HTML markup for file type icons.', + }, }, }, }; diff --git a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/index.stories.tsx b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/index.stories.tsx index d70d435d3635a6..2386679b4da3e6 100644 --- a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/index.stories.tsx +++ b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/index.stories.tsx @@ -1,15 +1,14 @@ import { FileTypeIcon } from '@fluentui/file-type-icons-preview'; import type { Meta } from '@storybook/react'; -export { Sizes as Default } from './FileTypeIconSizes.stories'; +export { Default } from './FileTypeIconDefault.stories'; export { CommonFileTypes } from './FileTypeIconCommon.stories'; -export { SpecialTypes } from './FileTypeIconSpecialTypes.stories'; -export { UrlAndHtmlFunctions } from './FileTypeIconUrlAndHtml.stories'; +export { UrlAndHtml } from './FileTypeIconUrlAndHtml.stories'; +export { BestPractices } from './FileTypeIconBestPractices.stories'; export { Accessibility } from './FileTypeIconAccessibility.stories'; export { EdgeCases } from './FileTypeIconEdgeCases.stories'; import descriptionMd from './FileTypeIconDescription.md'; -import bestPracticesMd from './FileTypeIconBestPractices.md'; export default { title: 'Icons/Filetype Icons', @@ -17,7 +16,7 @@ export default { parameters: { docs: { description: { - component: [descriptionMd, bestPracticesMd].join('\n'), + component: descriptionMd, }, }, }, From 93a577bf34c6861df827f5a28ee94c85af14f370 Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Mon, 24 Nov 2025 17:12:44 -0800 Subject: [PATCH 027/120] condensation 2 --- .../FileTypeIcon/FileTypeIconBestPractices.md | 2 +- .../FileTypeIconBestPractices.stories.tsx | 25 ------------------- .../src/FileTypeIcon/index.stories.tsx | 8 +++--- 3 files changed, 5 insertions(+), 30 deletions(-) delete mode 100644 packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconBestPractices.stories.tsx diff --git a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconBestPractices.md b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconBestPractices.md index 011c3eb39b47aa..f09ce54e1b468b 100644 --- a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconBestPractices.md +++ b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconBestPractices.md @@ -1,4 +1,4 @@ -# FileTypeIcon best practices +# Best practices - **Use SVG format (default) for better scalability and smaller file sizes** - SVG icons scale perfectly at any size and are more performant than PNG. - **Choose appropriate sizes based on UI density**: diff --git a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconBestPractices.stories.tsx b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconBestPractices.stories.tsx deleted file mode 100644 index 6ef69ab533e035..00000000000000 --- a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconBestPractices.stories.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import * as React from 'react'; -import type { JSXElement } from '@fluentui/react-components'; - -import bestPracticesMd from './FileTypeIconBestPractices.md'; - -export const BestPractices = (): JSXElement => { - return <>; -}; - -BestPractices.storyName = 'Best Practices'; - -BestPractices.parameters = { - docs: { - description: { - story: bestPracticesMd, - }, - canvas: { - sourceState: 'hidden', - }, - }, - previewTabs: { - 'storybook/docs/panel': { hidden: true }, - }, - viewMode: 'docs', -}; diff --git a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/index.stories.tsx b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/index.stories.tsx index 2386679b4da3e6..2bad32ff9f38ec 100644 --- a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/index.stories.tsx +++ b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/index.stories.tsx @@ -1,22 +1,22 @@ import { FileTypeIcon } from '@fluentui/file-type-icons-preview'; import type { Meta } from '@storybook/react'; +import descriptionMd from './FileTypeIconDescription.md'; +import bestPracticesMd from './FileTypeIconBestPractices.md'; + export { Default } from './FileTypeIconDefault.stories'; export { CommonFileTypes } from './FileTypeIconCommon.stories'; export { UrlAndHtml } from './FileTypeIconUrlAndHtml.stories'; -export { BestPractices } from './FileTypeIconBestPractices.stories'; export { Accessibility } from './FileTypeIconAccessibility.stories'; export { EdgeCases } from './FileTypeIconEdgeCases.stories'; -import descriptionMd from './FileTypeIconDescription.md'; - export default { title: 'Icons/Filetype Icons', component: FileTypeIcon, parameters: { docs: { description: { - component: descriptionMd, + component: [descriptionMd, bestPracticesMd].join('\n'), }, }, }, From 3d484aedfbb7c897633214a4418ef063badb3d79 Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Mon, 24 Nov 2025 17:23:03 -0800 Subject: [PATCH 028/120] improving alt tag generation in the control itself, removing a11y story since it doesnt add much --- .../FileTypeIcon/useFileTypeIcon.ts | 6 +- .../FileTypeIconAccessibility.stories.tsx | 217 ------------------ .../src/FileTypeIcon/index.stories.tsx | 1 - 3 files changed, 5 insertions(+), 219 deletions(-) delete mode 100644 packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconAccessibility.stories.tsx diff --git a/packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/useFileTypeIcon.ts b/packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/useFileTypeIcon.ts index a72e21a594e51b..9be1f7105007b4 100644 --- a/packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/useFileTypeIcon.ts +++ b/packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/useFileTypeIcon.ts @@ -6,6 +6,7 @@ import { getFileTypeIconSuffix, DEFAULT_ICON_SIZE, } from '../../utils/getFileTypeIconProps'; +import { FileIconType } from '../../utils/FileIconType'; const DEFAULT_BASE_URL = 'https://res.cdn.office.net/files/fabric-cdn-prod_20251119.001/assets/item-types/'; @@ -42,6 +43,9 @@ export const useFileTypeIcon_unstable = ( iconUrl = `${baseUrl}${size}/${baseIconName}.${imageFileType}`; } + // Generate alt text: use extension if provided, otherwise get the enum name for type + const altText = extension || (type !== undefined ? FileIconType[type] : ''); + const state: FileTypeIconState = { size, imageFileType, @@ -53,7 +57,7 @@ export const useFileTypeIcon_unstable = ( getIntrinsicElementProps('img', { ref, src: iconUrl, - alt: extension || 'File type icon', + alt: `${altText} file icon`, ...props, // Remove our custom props from being passed to the img element extension: undefined, diff --git a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconAccessibility.stories.tsx b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconAccessibility.stories.tsx deleted file mode 100644 index 68b1be69558809..00000000000000 --- a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconAccessibility.stories.tsx +++ /dev/null @@ -1,217 +0,0 @@ -import * as React from 'react'; -import type { JSXElement } from '@fluentui/react-components'; -import { tokens } from '@fluentui/react-components'; -import { FileTypeIcon, FileIconType } from '@fluentui/file-type-icons-preview'; -import { makeStyles, shorthands } from '@griffel/react'; - -const useStyles = makeStyles({ - container: { - display: 'flex', - flexDirection: 'column', - gap: '32px', - }, - section: { - display: 'flex', - flexDirection: 'column', - gap: '12px', - }, - sectionTitle: { - fontSize: tokens.fontSizeBase400, - fontWeight: tokens.fontWeightSemibold, - marginBottom: '8px', - }, - description: { - fontSize: tokens.fontSizeBase300, - color: tokens.colorNeutralForeground3, - marginBottom: '8px', - }, - exampleRow: { - display: 'flex', - alignItems: 'center', - gap: '16px', - ...shorthands.padding('12px'), - backgroundColor: tokens.colorNeutralBackground1, - ...shorthands.borderRadius(tokens.borderRadiusMedium), - }, - fileInfo: { - display: 'flex', - flexDirection: 'column', - gap: '4px', - }, - fileName: { - fontSize: tokens.fontSizeBase300, - fontWeight: tokens.fontWeightSemibold, - }, - fileDetails: { - fontSize: tokens.fontSizeBase200, - color: tokens.colorNeutralForeground3, - }, - codeBlock: { - backgroundColor: tokens.colorNeutralBackground3, - ...shorthands.padding('8px', '12px'), - ...shorthands.borderRadius(tokens.borderRadiusMedium), - fontFamily: tokens.fontFamilyMonospace, - fontSize: tokens.fontSizeBase200, - overflowX: 'auto', - }, - highContrastDemo: { - '@media (forced-colors: active)': { - ...shorthands.border('2px', 'solid', 'CanvasText'), - ...shorthands.padding('16px'), - ...shorthands.borderRadius(tokens.borderRadiusMedium), - }, - }, - listExample: { - display: 'flex', - flexDirection: 'column', - gap: '8px', - }, - listItem: { - display: 'flex', - alignItems: 'center', - gap: '12px', - ...shorthands.padding('8px', '12px'), - backgroundColor: tokens.colorNeutralBackground1, - ...shorthands.borderRadius(tokens.borderRadiusMedium), - ':hover': { - backgroundColor: tokens.colorNeutralBackground1Hover, - }, - ':focus-within': { - ...shorthands.outline('2px', 'solid', tokens.colorStrokeFocus2), - outlineOffset: '2px', - }, - }, - link: { - textDecoration: 'none', - color: 'inherit', - display: 'flex', - alignItems: 'center', - gap: '12px', - flex: 1, - ':focus': { - ...shorthands.outline('none'), - }, - }, -}); - -export const Accessibility = (): JSXElement => { - const styles = useStyles(); - - return ( -
-
-
Default Alt Text
-
- FileTypeIcon automatically generates descriptive alt text based on the file extension or type. This ensures - screen readers can convey the file type to users. -
-
- -
-
Annual Report.pdf
-
Alt text: "pdf file icon"
-
-
-
- -
-
Documents
-
Alt text: "folder file icon"
-
-
- - {` -// Rendered with alt="pdf file icon"`} - -
- -
-
Context with File Names
-
- Always pair file type icons with file names or labels. The icon provides visual recognition while the text - ensures accessibility for all users. -
-
-
- - Project Proposal.docx -
-
- - Budget 2025.xlsx -
-
- - Q4 Presentation.pptx -
-
-
- -
-
Keyboard Navigation
-
- When icons are part of interactive elements, ensure proper keyboard navigation and focus indicators are - present. -
- -
- Try pressing Tab to navigate through the list above. Focus indicators clearly show the active item. -
-
- -
-
High Contrast Mode Support
-
- FileTypeIcon respects Windows High Contrast mode and other forced-colors settings, ensuring icons remain - visible and distinguishable. -
-
- - - - - -
-
- Icons automatically adapt to high contrast themes while maintaining their recognizable shapes. -
-
- -
-
Screen Reader Announcements
-
- When using icons in dynamic content (like file upload feedback), ensure screen readers announce changes - appropriately using ARIA live regions. -
- - {`
- - Report.pdf uploaded successfully -
`} -
-
-
- ); -}; - -Accessibility.parameters = { - docs: { - description: { - story: - 'FileTypeIcon includes built-in accessibility features like automatic alt text generation, support for high contrast mode, and compatibility with screen readers. Always provide surrounding context (file names, labels) to ensure all users can identify files effectively.', - }, - }, -}; diff --git a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/index.stories.tsx b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/index.stories.tsx index 2bad32ff9f38ec..1ab5a0f6625dbe 100644 --- a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/index.stories.tsx +++ b/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/index.stories.tsx @@ -7,7 +7,6 @@ import bestPracticesMd from './FileTypeIconBestPractices.md'; export { Default } from './FileTypeIconDefault.stories'; export { CommonFileTypes } from './FileTypeIconCommon.stories'; export { UrlAndHtml } from './FileTypeIconUrlAndHtml.stories'; -export { Accessibility } from './FileTypeIconAccessibility.stories'; export { EdgeCases } from './FileTypeIconEdgeCases.stories'; export default { From 199803c64bdd8e393969b9bbc6b9323483f425e4 Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Mon, 24 Nov 2025 17:49:58 -0800 Subject: [PATCH 029/120] ran all pre-checks from plan-testingAndPromotionEnhanced. ready to start package rename --- .../etc/file-type-icons-preview.api.md | 28 +++++++++---------- .../library/src/index.ts | 2 +- .../library/src/utils/getFileTypeIconAsUrl.ts | 6 ++-- .../library/src/utils/getFileTypeIconProps.ts | 8 +++--- 4 files changed, 21 insertions(+), 23 deletions(-) diff --git a/packages/react-components/file-type-icons-preview/library/etc/file-type-icons-preview.api.md b/packages/react-components/file-type-icons-preview/library/etc/file-type-icons-preview.api.md index 1b3c1b7301f54a..331805b238c088 100644 --- a/packages/react-components/file-type-icons-preview/library/etc/file-type-icons-preview.api.md +++ b/packages/react-components/file-type-icons-preview/library/etc/file-type-icons-preview.api.md @@ -67,9 +67,6 @@ export enum FileIconType { todoItem = 19 } -// @public (undocumented) -export type FileIconTypeInput = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22; - // @public export const FileTypeIcon: ForwardRefComponent; @@ -80,13 +77,22 @@ export const fileTypeIconClassNames: SlotClassNames; export const FileTypeIconMap: { [key: string]: { extensions?: string[]; + types?: FileIconType[]; }; }; +// @public (undocumented) +export interface FileTypeIconOptions { + extension?: string; + imageFileType?: ImageFileType; + size?: FileTypeIconSize; + type?: FileIconType; +} + // @public (undocumented) export type FileTypeIconProps = ComponentProps & { extension?: string; - type?: FileIconTypeInput; + type?: FileIconType; size?: FileTypeIconSize; imageFileType?: ImageFileType; baseUrl?: string; @@ -106,16 +112,16 @@ export type FileTypeIconState = ComponentState & Required Date: Mon, 24 Nov 2025 17:58:03 -0800 Subject: [PATCH 030/120] package move to remove -preview suffix --- .../library/.babelrc.json | 0 .../library/.swcrc | 0 .../library/LICENSE | 0 .../library/MIGRATION.md | 0 .../library/README.md | 0 .../library/bundle-size/FileTypeIcon.fixture.js | 0 .../library/config/api-extractor.json | 0 .../library/config/tests.js | 0 .../library/eslint.config.js | 0 .../library/etc/file-type-icons-preview.api.md | 0 .../library/jest.config.js | 0 .../library/package.json | 0 .../library/project.json | 0 .../library/src/FileTypeIcon.ts | 0 .../library/src/components/FileTypeIcon/FileTypeIcon.test.tsx | 0 .../library/src/components/FileTypeIcon/FileTypeIcon.tsx | 0 .../library/src/components/FileTypeIcon/FileTypeIcon.types.ts | 0 .../library/src/components/FileTypeIcon/index.ts | 0 .../library/src/components/FileTypeIcon/renderFileTypeIcon.tsx | 0 .../library/src/components/FileTypeIcon/useFileTypeIcon.ts | 0 .../src/components/FileTypeIcon/useFileTypeIconStyles.styles.ts | 0 .../library/src/index.ts | 0 .../library/src/testing/isConformant.ts | 0 .../library/src/utils/FileIconType.ts | 0 .../library/src/utils/FileTypeIconMap.ts | 0 .../library/src/utils/getFileTypeIconAsUrl.test.ts | 0 .../library/src/utils/getFileTypeIconAsUrl.ts | 0 .../library/src/utils/getFileTypeIconProps.ts | 0 .../library/src/utils/initializeFileTypeIcons.tsx | 0 .../library/tsconfig.json | 0 .../library/tsconfig.lib.json | 0 .../library/tsconfig.spec.json | 0 .../stories/.storybook/main.js | 0 .../stories/.storybook/preview.js | 0 .../stories/.storybook/tsconfig.json | 0 .../stories/README.md | 0 .../stories/eslint.config.js | 0 .../stories/package.json | 0 .../stories/project.json | 0 .../stories/src/.gitkeep | 0 .../stories/src/FileTypeIcon/FileTypeIconBestPractices.md | 0 .../stories/src/FileTypeIcon/FileTypeIconCommon.stories.tsx | 0 .../stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx | 0 .../stories/src/FileTypeIcon/FileTypeIconDescription.md | 0 .../stories/src/FileTypeIcon/FileTypeIconEdgeCases.stories.tsx | 0 .../stories/src/FileTypeIcon/FileTypeIconUrlAndHtml.stories.tsx | 0 .../stories/src/FileTypeIcon/index.stories.tsx | 0 .../stories/src/index.ts | 0 .../stories/tsconfig.json | 0 .../stories/tsconfig.lib.json | 0 50 files changed, 0 insertions(+), 0 deletions(-) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/library/.babelrc.json (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/library/.swcrc (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/library/LICENSE (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/library/MIGRATION.md (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/library/README.md (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/library/bundle-size/FileTypeIcon.fixture.js (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/library/config/api-extractor.json (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/library/config/tests.js (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/library/eslint.config.js (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/library/etc/file-type-icons-preview.api.md (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/library/jest.config.js (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/library/package.json (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/library/project.json (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/library/src/FileTypeIcon.ts (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/library/src/components/FileTypeIcon/FileTypeIcon.test.tsx (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/library/src/components/FileTypeIcon/FileTypeIcon.tsx (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/library/src/components/FileTypeIcon/FileTypeIcon.types.ts (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/library/src/components/FileTypeIcon/index.ts (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/library/src/components/FileTypeIcon/renderFileTypeIcon.tsx (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/library/src/components/FileTypeIcon/useFileTypeIcon.ts (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/library/src/components/FileTypeIcon/useFileTypeIconStyles.styles.ts (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/library/src/index.ts (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/library/src/testing/isConformant.ts (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/library/src/utils/FileIconType.ts (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/library/src/utils/FileTypeIconMap.ts (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/library/src/utils/getFileTypeIconAsUrl.test.ts (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/library/src/utils/getFileTypeIconAsUrl.ts (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/library/src/utils/getFileTypeIconProps.ts (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/library/src/utils/initializeFileTypeIcons.tsx (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/library/tsconfig.json (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/library/tsconfig.lib.json (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/library/tsconfig.spec.json (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/stories/.storybook/main.js (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/stories/.storybook/preview.js (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/stories/.storybook/tsconfig.json (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/stories/README.md (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/stories/eslint.config.js (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/stories/package.json (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/stories/project.json (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/stories/src/.gitkeep (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/stories/src/FileTypeIcon/FileTypeIconBestPractices.md (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/stories/src/FileTypeIcon/FileTypeIconCommon.stories.tsx (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/stories/src/FileTypeIcon/FileTypeIconDescription.md (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/stories/src/FileTypeIcon/FileTypeIconEdgeCases.stories.tsx (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/stories/src/FileTypeIcon/FileTypeIconUrlAndHtml.stories.tsx (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/stories/src/FileTypeIcon/index.stories.tsx (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/stories/src/index.ts (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/stories/tsconfig.json (100%) rename packages/react-components/{file-type-icons-preview => react-file-type-icons}/stories/tsconfig.lib.json (100%) diff --git a/packages/react-components/file-type-icons-preview/library/.babelrc.json b/packages/react-components/react-file-type-icons/library/.babelrc.json similarity index 100% rename from packages/react-components/file-type-icons-preview/library/.babelrc.json rename to packages/react-components/react-file-type-icons/library/.babelrc.json diff --git a/packages/react-components/file-type-icons-preview/library/.swcrc b/packages/react-components/react-file-type-icons/library/.swcrc similarity index 100% rename from packages/react-components/file-type-icons-preview/library/.swcrc rename to packages/react-components/react-file-type-icons/library/.swcrc diff --git a/packages/react-components/file-type-icons-preview/library/LICENSE b/packages/react-components/react-file-type-icons/library/LICENSE similarity index 100% rename from packages/react-components/file-type-icons-preview/library/LICENSE rename to packages/react-components/react-file-type-icons/library/LICENSE diff --git a/packages/react-components/file-type-icons-preview/library/MIGRATION.md b/packages/react-components/react-file-type-icons/library/MIGRATION.md similarity index 100% rename from packages/react-components/file-type-icons-preview/library/MIGRATION.md rename to packages/react-components/react-file-type-icons/library/MIGRATION.md diff --git a/packages/react-components/file-type-icons-preview/library/README.md b/packages/react-components/react-file-type-icons/library/README.md similarity index 100% rename from packages/react-components/file-type-icons-preview/library/README.md rename to packages/react-components/react-file-type-icons/library/README.md diff --git a/packages/react-components/file-type-icons-preview/library/bundle-size/FileTypeIcon.fixture.js b/packages/react-components/react-file-type-icons/library/bundle-size/FileTypeIcon.fixture.js similarity index 100% rename from packages/react-components/file-type-icons-preview/library/bundle-size/FileTypeIcon.fixture.js rename to packages/react-components/react-file-type-icons/library/bundle-size/FileTypeIcon.fixture.js diff --git a/packages/react-components/file-type-icons-preview/library/config/api-extractor.json b/packages/react-components/react-file-type-icons/library/config/api-extractor.json similarity index 100% rename from packages/react-components/file-type-icons-preview/library/config/api-extractor.json rename to packages/react-components/react-file-type-icons/library/config/api-extractor.json diff --git a/packages/react-components/file-type-icons-preview/library/config/tests.js b/packages/react-components/react-file-type-icons/library/config/tests.js similarity index 100% rename from packages/react-components/file-type-icons-preview/library/config/tests.js rename to packages/react-components/react-file-type-icons/library/config/tests.js diff --git a/packages/react-components/file-type-icons-preview/library/eslint.config.js b/packages/react-components/react-file-type-icons/library/eslint.config.js similarity index 100% rename from packages/react-components/file-type-icons-preview/library/eslint.config.js rename to packages/react-components/react-file-type-icons/library/eslint.config.js diff --git a/packages/react-components/file-type-icons-preview/library/etc/file-type-icons-preview.api.md b/packages/react-components/react-file-type-icons/library/etc/file-type-icons-preview.api.md similarity index 100% rename from packages/react-components/file-type-icons-preview/library/etc/file-type-icons-preview.api.md rename to packages/react-components/react-file-type-icons/library/etc/file-type-icons-preview.api.md diff --git a/packages/react-components/file-type-icons-preview/library/jest.config.js b/packages/react-components/react-file-type-icons/library/jest.config.js similarity index 100% rename from packages/react-components/file-type-icons-preview/library/jest.config.js rename to packages/react-components/react-file-type-icons/library/jest.config.js diff --git a/packages/react-components/file-type-icons-preview/library/package.json b/packages/react-components/react-file-type-icons/library/package.json similarity index 100% rename from packages/react-components/file-type-icons-preview/library/package.json rename to packages/react-components/react-file-type-icons/library/package.json diff --git a/packages/react-components/file-type-icons-preview/library/project.json b/packages/react-components/react-file-type-icons/library/project.json similarity index 100% rename from packages/react-components/file-type-icons-preview/library/project.json rename to packages/react-components/react-file-type-icons/library/project.json diff --git a/packages/react-components/file-type-icons-preview/library/src/FileTypeIcon.ts b/packages/react-components/react-file-type-icons/library/src/FileTypeIcon.ts similarity index 100% rename from packages/react-components/file-type-icons-preview/library/src/FileTypeIcon.ts rename to packages/react-components/react-file-type-icons/library/src/FileTypeIcon.ts diff --git a/packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/FileTypeIcon.test.tsx b/packages/react-components/react-file-type-icons/library/src/components/FileTypeIcon/FileTypeIcon.test.tsx similarity index 100% rename from packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/FileTypeIcon.test.tsx rename to packages/react-components/react-file-type-icons/library/src/components/FileTypeIcon/FileTypeIcon.test.tsx diff --git a/packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/FileTypeIcon.tsx b/packages/react-components/react-file-type-icons/library/src/components/FileTypeIcon/FileTypeIcon.tsx similarity index 100% rename from packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/FileTypeIcon.tsx rename to packages/react-components/react-file-type-icons/library/src/components/FileTypeIcon/FileTypeIcon.tsx diff --git a/packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/FileTypeIcon.types.ts b/packages/react-components/react-file-type-icons/library/src/components/FileTypeIcon/FileTypeIcon.types.ts similarity index 100% rename from packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/FileTypeIcon.types.ts rename to packages/react-components/react-file-type-icons/library/src/components/FileTypeIcon/FileTypeIcon.types.ts diff --git a/packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/index.ts b/packages/react-components/react-file-type-icons/library/src/components/FileTypeIcon/index.ts similarity index 100% rename from packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/index.ts rename to packages/react-components/react-file-type-icons/library/src/components/FileTypeIcon/index.ts diff --git a/packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/renderFileTypeIcon.tsx b/packages/react-components/react-file-type-icons/library/src/components/FileTypeIcon/renderFileTypeIcon.tsx similarity index 100% rename from packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/renderFileTypeIcon.tsx rename to packages/react-components/react-file-type-icons/library/src/components/FileTypeIcon/renderFileTypeIcon.tsx diff --git a/packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/useFileTypeIcon.ts b/packages/react-components/react-file-type-icons/library/src/components/FileTypeIcon/useFileTypeIcon.ts similarity index 100% rename from packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/useFileTypeIcon.ts rename to packages/react-components/react-file-type-icons/library/src/components/FileTypeIcon/useFileTypeIcon.ts diff --git a/packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/useFileTypeIconStyles.styles.ts b/packages/react-components/react-file-type-icons/library/src/components/FileTypeIcon/useFileTypeIconStyles.styles.ts similarity index 100% rename from packages/react-components/file-type-icons-preview/library/src/components/FileTypeIcon/useFileTypeIconStyles.styles.ts rename to packages/react-components/react-file-type-icons/library/src/components/FileTypeIcon/useFileTypeIconStyles.styles.ts diff --git a/packages/react-components/file-type-icons-preview/library/src/index.ts b/packages/react-components/react-file-type-icons/library/src/index.ts similarity index 100% rename from packages/react-components/file-type-icons-preview/library/src/index.ts rename to packages/react-components/react-file-type-icons/library/src/index.ts diff --git a/packages/react-components/file-type-icons-preview/library/src/testing/isConformant.ts b/packages/react-components/react-file-type-icons/library/src/testing/isConformant.ts similarity index 100% rename from packages/react-components/file-type-icons-preview/library/src/testing/isConformant.ts rename to packages/react-components/react-file-type-icons/library/src/testing/isConformant.ts diff --git a/packages/react-components/file-type-icons-preview/library/src/utils/FileIconType.ts b/packages/react-components/react-file-type-icons/library/src/utils/FileIconType.ts similarity index 100% rename from packages/react-components/file-type-icons-preview/library/src/utils/FileIconType.ts rename to packages/react-components/react-file-type-icons/library/src/utils/FileIconType.ts diff --git a/packages/react-components/file-type-icons-preview/library/src/utils/FileTypeIconMap.ts b/packages/react-components/react-file-type-icons/library/src/utils/FileTypeIconMap.ts similarity index 100% rename from packages/react-components/file-type-icons-preview/library/src/utils/FileTypeIconMap.ts rename to packages/react-components/react-file-type-icons/library/src/utils/FileTypeIconMap.ts diff --git a/packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconAsUrl.test.ts b/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconAsUrl.test.ts similarity index 100% rename from packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconAsUrl.test.ts rename to packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconAsUrl.test.ts diff --git a/packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconAsUrl.ts b/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconAsUrl.ts similarity index 100% rename from packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconAsUrl.ts rename to packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconAsUrl.ts diff --git a/packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconProps.ts b/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconProps.ts similarity index 100% rename from packages/react-components/file-type-icons-preview/library/src/utils/getFileTypeIconProps.ts rename to packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconProps.ts diff --git a/packages/react-components/file-type-icons-preview/library/src/utils/initializeFileTypeIcons.tsx b/packages/react-components/react-file-type-icons/library/src/utils/initializeFileTypeIcons.tsx similarity index 100% rename from packages/react-components/file-type-icons-preview/library/src/utils/initializeFileTypeIcons.tsx rename to packages/react-components/react-file-type-icons/library/src/utils/initializeFileTypeIcons.tsx diff --git a/packages/react-components/file-type-icons-preview/library/tsconfig.json b/packages/react-components/react-file-type-icons/library/tsconfig.json similarity index 100% rename from packages/react-components/file-type-icons-preview/library/tsconfig.json rename to packages/react-components/react-file-type-icons/library/tsconfig.json diff --git a/packages/react-components/file-type-icons-preview/library/tsconfig.lib.json b/packages/react-components/react-file-type-icons/library/tsconfig.lib.json similarity index 100% rename from packages/react-components/file-type-icons-preview/library/tsconfig.lib.json rename to packages/react-components/react-file-type-icons/library/tsconfig.lib.json diff --git a/packages/react-components/file-type-icons-preview/library/tsconfig.spec.json b/packages/react-components/react-file-type-icons/library/tsconfig.spec.json similarity index 100% rename from packages/react-components/file-type-icons-preview/library/tsconfig.spec.json rename to packages/react-components/react-file-type-icons/library/tsconfig.spec.json diff --git a/packages/react-components/file-type-icons-preview/stories/.storybook/main.js b/packages/react-components/react-file-type-icons/stories/.storybook/main.js similarity index 100% rename from packages/react-components/file-type-icons-preview/stories/.storybook/main.js rename to packages/react-components/react-file-type-icons/stories/.storybook/main.js diff --git a/packages/react-components/file-type-icons-preview/stories/.storybook/preview.js b/packages/react-components/react-file-type-icons/stories/.storybook/preview.js similarity index 100% rename from packages/react-components/file-type-icons-preview/stories/.storybook/preview.js rename to packages/react-components/react-file-type-icons/stories/.storybook/preview.js diff --git a/packages/react-components/file-type-icons-preview/stories/.storybook/tsconfig.json b/packages/react-components/react-file-type-icons/stories/.storybook/tsconfig.json similarity index 100% rename from packages/react-components/file-type-icons-preview/stories/.storybook/tsconfig.json rename to packages/react-components/react-file-type-icons/stories/.storybook/tsconfig.json diff --git a/packages/react-components/file-type-icons-preview/stories/README.md b/packages/react-components/react-file-type-icons/stories/README.md similarity index 100% rename from packages/react-components/file-type-icons-preview/stories/README.md rename to packages/react-components/react-file-type-icons/stories/README.md diff --git a/packages/react-components/file-type-icons-preview/stories/eslint.config.js b/packages/react-components/react-file-type-icons/stories/eslint.config.js similarity index 100% rename from packages/react-components/file-type-icons-preview/stories/eslint.config.js rename to packages/react-components/react-file-type-icons/stories/eslint.config.js diff --git a/packages/react-components/file-type-icons-preview/stories/package.json b/packages/react-components/react-file-type-icons/stories/package.json similarity index 100% rename from packages/react-components/file-type-icons-preview/stories/package.json rename to packages/react-components/react-file-type-icons/stories/package.json diff --git a/packages/react-components/file-type-icons-preview/stories/project.json b/packages/react-components/react-file-type-icons/stories/project.json similarity index 100% rename from packages/react-components/file-type-icons-preview/stories/project.json rename to packages/react-components/react-file-type-icons/stories/project.json diff --git a/packages/react-components/file-type-icons-preview/stories/src/.gitkeep b/packages/react-components/react-file-type-icons/stories/src/.gitkeep similarity index 100% rename from packages/react-components/file-type-icons-preview/stories/src/.gitkeep rename to packages/react-components/react-file-type-icons/stories/src/.gitkeep diff --git a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconBestPractices.md b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconBestPractices.md similarity index 100% rename from packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconBestPractices.md rename to packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconBestPractices.md diff --git a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconCommon.stories.tsx b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconCommon.stories.tsx similarity index 100% rename from packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconCommon.stories.tsx rename to packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconCommon.stories.tsx diff --git a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx similarity index 100% rename from packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx rename to packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx diff --git a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconDescription.md b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconDescription.md similarity index 100% rename from packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconDescription.md rename to packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconDescription.md diff --git a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconEdgeCases.stories.tsx b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconEdgeCases.stories.tsx similarity index 100% rename from packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconEdgeCases.stories.tsx rename to packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconEdgeCases.stories.tsx diff --git a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconUrlAndHtml.stories.tsx b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconUrlAndHtml.stories.tsx similarity index 100% rename from packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/FileTypeIconUrlAndHtml.stories.tsx rename to packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconUrlAndHtml.stories.tsx diff --git a/packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/index.stories.tsx b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/index.stories.tsx similarity index 100% rename from packages/react-components/file-type-icons-preview/stories/src/FileTypeIcon/index.stories.tsx rename to packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/index.stories.tsx diff --git a/packages/react-components/file-type-icons-preview/stories/src/index.ts b/packages/react-components/react-file-type-icons/stories/src/index.ts similarity index 100% rename from packages/react-components/file-type-icons-preview/stories/src/index.ts rename to packages/react-components/react-file-type-icons/stories/src/index.ts diff --git a/packages/react-components/file-type-icons-preview/stories/tsconfig.json b/packages/react-components/react-file-type-icons/stories/tsconfig.json similarity index 100% rename from packages/react-components/file-type-icons-preview/stories/tsconfig.json rename to packages/react-components/react-file-type-icons/stories/tsconfig.json diff --git a/packages/react-components/file-type-icons-preview/stories/tsconfig.lib.json b/packages/react-components/react-file-type-icons/stories/tsconfig.lib.json similarity index 100% rename from packages/react-components/file-type-icons-preview/stories/tsconfig.lib.json rename to packages/react-components/react-file-type-icons/stories/tsconfig.lib.json From 092682f7c2bd0a60d487330c6300358a694b2a3f Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Mon, 24 Nov 2025 18:16:43 -0800 Subject: [PATCH 031/120] first test passed after package rename --- .github/CODEOWNERS | 4 ++-- .../react-components/package.json | 2 +- .../react-file-type-icons/library/LICENSE | 2 +- .../react-file-type-icons/library/MIGRATION.md | 17 ++++++++--------- .../react-file-type-icons/library/README.md | 10 ++++------ .../library/bundle-size/FileTypeIcon.fixture.js | 2 +- .../library/etc/file-type-icons-preview.api.md | 2 +- .../library/jest.config.js | 2 +- .../react-file-type-icons/library/package.json | 2 +- .../react-file-type-icons/library/project.json | 4 ++-- .../react-file-type-icons/stories/README.md | 6 +++--- .../react-file-type-icons/stories/package.json | 4 ++-- .../react-file-type-icons/stories/project.json | 4 ++-- .../FileTypeIcon/FileTypeIconCommon.stories.tsx | 2 +- .../FileTypeIconDefault.stories.tsx | 2 +- .../FileTypeIconEdgeCases.stories.tsx | 2 +- .../FileTypeIconUrlAndHtml.stories.tsx | 2 +- .../stories/src/FileTypeIcon/index.stories.tsx | 2 +- packages/react-file-type-icons/project.json | 2 +- tsconfig.base.all.json | 6 +++--- tsconfig.base.json | 6 +++--- 21 files changed, 41 insertions(+), 44 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 4368f1d6ac6561..bb9d1c0d0e0175 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -331,8 +331,8 @@ packages/react-components/component-selector-preview/library @microsoft/teams-pr packages/react-components/component-selector-preview/stories @microsoft/teams-prg packages/react-components/react-menu-grid-preview/library @microsoft/teams-prg packages/react-components/react-menu-grid-preview/stories @microsoft/teams-prg -packages/react-components/file-type-icons-preview/library @microsoft/cxe-red -packages/react-components/file-type-icons-preview/stories @microsoft/cxe-red +packages/react-components/react-file-type-icons/library @microsoft/cxe-red @jahnp @bigbadcapers +packages/react-components/react-file-type-icons/stories @microsoft/cxe-red @jahnp @bigbadcapers # <%= NX-CODEOWNER-PLACEHOLDER %> # Deprecated v9 packages - exposed as part of `/unstable` api diff --git a/packages/react-components/react-components/package.json b/packages/react-components/react-components/package.json index 7af6d6e3be332e..5a563bee9b8ce3 100644 --- a/packages/react-components/react-components/package.json +++ b/packages/react-components/react-components/package.json @@ -78,7 +78,7 @@ "@fluentui/react-carousel": "^9.8.12", "@fluentui/react-color-picker": "^9.2.11", "@fluentui/react-nav": "^9.3.14", - "@fluentui/file-type-icons-preview": "^0.0.1" + "@fluentui/react-file-type-icons": "^0.0.1" }, "peerDependencies": { "@types/react": ">=16.14.0 <20.0.0", diff --git a/packages/react-components/react-file-type-icons/library/LICENSE b/packages/react-components/react-file-type-icons/library/LICENSE index ebc6d4c8e5118f..d2bf0af9ab9baf 100644 --- a/packages/react-components/react-file-type-icons/library/LICENSE +++ b/packages/react-components/react-file-type-icons/library/LICENSE @@ -1,4 +1,4 @@ -@fluentui/file-type-icons-preview +@fluentui/react-file-type-icons Copyright (c) Microsoft Corporation diff --git a/packages/react-components/react-file-type-icons/library/MIGRATION.md b/packages/react-components/react-file-type-icons/library/MIGRATION.md index b8caab721e2829..afa43598837e62 100644 --- a/packages/react-components/react-file-type-icons/library/MIGRATION.md +++ b/packages/react-components/react-file-type-icons/library/MIGRATION.md @@ -1,6 +1,6 @@ -# Migration Guide: react-file-type-icons to react-file-type-icons-preview +# Migration Guide: react-file-type-icons to react-file-type-icons -This guide helps you migrate from `@fluentui/react-file-type-icons` (v8) to `@fluentui/react-file-type-icons-preview` (v9). +This guide helps you migrate from `@fluentui/react-file-type-icons` (v8) to `@fluentui/react-file-type-icons` (v9). ## Overview @@ -15,8 +15,7 @@ The v9 version provides a **modern React component-based API** while maintaining ## Installation ```bash -npm uninstall @fluentui/react-file-type-icons -npm install @fluentui/react-file-type-icons-preview +npm install @fluentui/react-file-type-icons ``` ## What's Changed @@ -26,7 +25,7 @@ npm install @fluentui/react-file-type-icons-preview The only breaking change is the package name: - **Old**: `@fluentui/react-file-type-icons` -- **New**: `@fluentui/react-file-type-icons-preview` +- **New**: `@fluentui/react-file-type-icons` ### New Component API (Recommended) @@ -42,7 +41,7 @@ const iconProps = getFileTypeIconProps({ extension: 'docx', size: 48 }); **v9 (component-based) - Recommended:** ```tsx -import { FileTypeIcon } from '@fluentui/react-file-type-icons-preview'; +import { FileTypeIcon } from '@fluentui/react-file-type-icons'; ; ``` @@ -72,7 +71,7 @@ function DocumentItem({ filename }) { **After:** ```tsx -import { FileTypeIcon } from '@fluentui/react-file-type-icons-preview'; +import { FileTypeIcon } from '@fluentui/react-file-type-icons'; function DocumentItem({ filename }) { const extension = filename.split('.').pop(); @@ -100,7 +99,7 @@ const iconProps = getFileTypeIconProps({ type: FileIconType.folder, size: 48 }); **After:** ```tsx -import { FileTypeIcon, FileIconType } from '@fluentui/react-file-type-icons-preview'; +import { FileTypeIcon, FileIconType } from '@fluentui/react-file-type-icons'; ; ``` @@ -113,7 +112,7 @@ import { FileTypeIcon, FileIconType } from '@fluentui/react-file-type-icons-prev import { FileTypeIcon, // v9 component (new) getFileTypeIconAsUrl, // v8 utility (still works) -} from '@fluentui/react-file-type-icons-preview'; +} from '@fluentui/react-file-type-icons'; function MyComponent() { return ( diff --git a/packages/react-components/react-file-type-icons/library/README.md b/packages/react-components/react-file-type-icons/library/README.md index bad0f3b4d9a11b..b8eac1168c1740 100644 --- a/packages/react-components/react-file-type-icons/library/README.md +++ b/packages/react-components/react-file-type-icons/library/README.md @@ -1,9 +1,7 @@ -# @fluentui/file-type-icons-preview +# @fluentui/react-file-type-icons **File Type Icons components for [Fluent UI React](https://react.fluentui.dev/)** -These are not production-ready components and **should never be used in product**. This space is useful for testing new components whose APIs might change before final release. - ## Components ### FileTypeIcon @@ -23,7 +21,7 @@ Displays an icon representing a file type based on its extension or a special ty ### Basic Examples ```tsx -import { FileTypeIcon, FileIconType } from '@fluentui/react-file-type-icons-preview'; +import { FileTypeIcon, FileIconType } from '@fluentui/react-file-type-icons'; // File extension @@ -83,7 +81,7 @@ const iconProps = getFileTypeIconProps({ extension: 'docx', size: 48 }); **v9:** ```tsx -import { FileTypeIcon } from '@fluentui/react-file-type-icons-preview'; +import { FileTypeIcon } from '@fluentui/react-file-type-icons'; ; ``` @@ -92,7 +90,7 @@ import { FileTypeIcon } from '@fluentui/react-file-type-icons-preview'; Underlying utilities are exported for advanced use cases: ```tsx -import { getFileTypeIconProps, getFileTypeIconAsUrl, FileIconType } from '@fluentui/react-file-type-icons-preview'; +import { getFileTypeIconProps, getFileTypeIconAsUrl, FileIconType } from '@fluentui/react-file-type-icons'; // Get icon URL const url = getFileTypeIconAsUrl({ extension: 'docx', size: 48 }); diff --git a/packages/react-components/react-file-type-icons/library/bundle-size/FileTypeIcon.fixture.js b/packages/react-components/react-file-type-icons/library/bundle-size/FileTypeIcon.fixture.js index a22fdd167bf53c..5e374a14cd3a02 100644 --- a/packages/react-components/react-file-type-icons/library/bundle-size/FileTypeIcon.fixture.js +++ b/packages/react-components/react-file-type-icons/library/bundle-size/FileTypeIcon.fixture.js @@ -1,4 +1,4 @@ -import { FileTypeIcon } from '@fluentui/file-type-icons-preview'; +import { FileTypeIcon } from '@fluentui/react-file-type-icons'; console.log(FileTypeIcon); diff --git a/packages/react-components/react-file-type-icons/library/etc/file-type-icons-preview.api.md b/packages/react-components/react-file-type-icons/library/etc/file-type-icons-preview.api.md index 331805b238c088..33f598e1176e29 100644 --- a/packages/react-components/react-file-type-icons/library/etc/file-type-icons-preview.api.md +++ b/packages/react-components/react-file-type-icons/library/etc/file-type-icons-preview.api.md @@ -1,4 +1,4 @@ -## API Report File for "@fluentui/file-type-icons-preview" +## API Report File for "@fluentui/react-file-type-icons" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). diff --git a/packages/react-components/react-file-type-icons/library/jest.config.js b/packages/react-components/react-file-type-icons/library/jest.config.js index b162ec0d59415e..8946bffacce655 100644 --- a/packages/react-components/react-file-type-icons/library/jest.config.js +++ b/packages/react-components/react-file-type-icons/library/jest.config.js @@ -23,7 +23,7 @@ if (swcJestConfig.swcrc === undefined) { * @type {import('@jest/types').Config.InitialOptions} */ module.exports = { - displayName: 'file-type-icons-preview', + displayName: 'react-file-type-icons', preset: '../../../../jest.preset.js', transform: { '^.+\\.tsx?$': ['@swc/jest', swcJestConfig], diff --git a/packages/react-components/react-file-type-icons/library/package.json b/packages/react-components/react-file-type-icons/library/package.json index 53252c869c1a5c..b339ac524adfae 100644 --- a/packages/react-components/react-file-type-icons/library/package.json +++ b/packages/react-components/react-file-type-icons/library/package.json @@ -1,5 +1,5 @@ { - "name": "@fluentui/file-type-icons-preview", + "name": "@fluentui/react-file-type-icons", "version": "0.0.0", "private": true, "description": "New fluentui react package", diff --git a/packages/react-components/react-file-type-icons/library/project.json b/packages/react-components/react-file-type-icons/library/project.json index a2facb7b2e2771..227a8e1ad8d90e 100644 --- a/packages/react-components/react-file-type-icons/library/project.json +++ b/packages/react-components/react-file-type-icons/library/project.json @@ -1,8 +1,8 @@ { - "name": "file-type-icons-preview", + "name": "react-file-type-icons", "$schema": "../../../../node_modules/nx/schemas/project-schema.json", "projectType": "library", - "sourceRoot": "packages/react-components/file-type-icons-preview/library/src", + "sourceRoot": "packages/react-components/react-file-type-icons/library/src", "tags": ["platform:web", "vNext"], "implicitDependencies": [] } diff --git a/packages/react-components/react-file-type-icons/stories/README.md b/packages/react-components/react-file-type-icons/stories/README.md index ee82402c29b63a..4e07135387f9a6 100644 --- a/packages/react-components/react-file-type-icons/stories/README.md +++ b/packages/react-components/react-file-type-icons/stories/README.md @@ -1,6 +1,6 @@ -# @fluentui/file-type-icons-preview-stories +# @fluentui/react-file-type-icons-stories -Storybook stories for packages/react-components/file-type-icons-preview +Storybook stories for packages/react-components/react-file-type-icons ## Usage @@ -8,7 +8,7 @@ To include within storybook specify stories globs: \`\`\`js module.exports = { -stories: ['../packages/react-components/file-type-icons-preview/stories/src/**/*.mdx', '../packages/react-components/file-type-icons-preview/stories/src/**/index.stories.@(ts|tsx)'], +stories: ['../packages/react-components/react-file-type-icons/stories/src/**/*.mdx', '../packages/react-components/react-file-type-icons/stories/src/**/index.stories.@(ts|tsx)'], } \`\`\` diff --git a/packages/react-components/react-file-type-icons/stories/package.json b/packages/react-components/react-file-type-icons/stories/package.json index a4fbe99940dc2d..75570f7e81e644 100644 --- a/packages/react-components/react-file-type-icons/stories/package.json +++ b/packages/react-components/react-file-type-icons/stories/package.json @@ -1,9 +1,9 @@ { - "name": "@fluentui/file-type-icons-preview-stories", + "name": "@fluentui/react-file-type-icons-stories", "version": "0.0.0", "private": true, "devDependencies": { - "@fluentui/file-type-icons-preview": "*", + "@fluentui/react-file-type-icons": "*", "@fluentui/react-storybook-addon": "*", "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", diff --git a/packages/react-components/react-file-type-icons/stories/project.json b/packages/react-components/react-file-type-icons/stories/project.json index 8a5f776b3250ea..0a48172868e0f1 100644 --- a/packages/react-components/react-file-type-icons/stories/project.json +++ b/packages/react-components/react-file-type-icons/stories/project.json @@ -1,8 +1,8 @@ { - "name": "file-type-icons-preview-stories", + "name": "react-file-type-icons-stories", "$schema": "../../../../node_modules/nx/schemas/project-schema.json", "projectType": "library", - "sourceRoot": "packages/react-components/file-type-icons-preview/stories/src", + "sourceRoot": "packages/react-components/react-file-type-icons/stories/src", "tags": ["vNext", "platform:web", "type:stories"], "implicitDependencies": [] } diff --git a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconCommon.stories.tsx b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconCommon.stories.tsx index 9a60597c678e14..bf32a05e235340 100644 --- a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconCommon.stories.tsx +++ b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconCommon.stories.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import type { JSXElement } from '@fluentui/react-components'; import { tokens } from '@fluentui/react-components'; -import { FileTypeIcon, FileIconType } from '@fluentui/file-type-icons-preview'; +import { FileTypeIcon, FileIconType } from '@fluentui/react-file-type-icons'; import { makeStyles, shorthands } from '@griffel/react'; const useStyles = makeStyles({ diff --git a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx index 6b6772c7599a05..e473d4f487ee12 100644 --- a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx +++ b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import type { JSXElement } from '@fluentui/react-components'; import { tokens } from '@fluentui/react-components'; -import { FileIconType, FileTypeIcon } from '@fluentui/file-type-icons-preview'; +import { FileIconType, FileTypeIcon } from '@fluentui/react-file-type-icons'; import { makeStyles } from '@griffel/react'; const useStyles = makeStyles({ diff --git a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconEdgeCases.stories.tsx b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconEdgeCases.stories.tsx index e2364404655111..395b0a2fbe1788 100644 --- a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconEdgeCases.stories.tsx +++ b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconEdgeCases.stories.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import type { JSXElement } from '@fluentui/react-components'; import { tokens } from '@fluentui/react-components'; -import { FileTypeIcon } from '@fluentui/file-type-icons-preview'; +import { FileTypeIcon } from '@fluentui/react-file-type-icons'; import { makeStyles, shorthands } from '@griffel/react'; const useStyles = makeStyles({ diff --git a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconUrlAndHtml.stories.tsx b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconUrlAndHtml.stories.tsx index 191f098399eeae..35c15390bcc516 100644 --- a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconUrlAndHtml.stories.tsx +++ b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconUrlAndHtml.stories.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import type { JSXElement } from '@fluentui/react-components'; -import { getFileTypeIconAsUrl, getFileTypeIconAsHTMLString } from '@fluentui/file-type-icons-preview'; +import { getFileTypeIconAsUrl, getFileTypeIconAsHTMLString } from '@fluentui/react-file-type-icons'; import { makeStyles, shorthands } from '@griffel/react'; const useStyles = makeStyles({ diff --git a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/index.stories.tsx b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/index.stories.tsx index 1ab5a0f6625dbe..7b307246cb12a9 100644 --- a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/index.stories.tsx +++ b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/index.stories.tsx @@ -1,4 +1,4 @@ -import { FileTypeIcon } from '@fluentui/file-type-icons-preview'; +import { FileTypeIcon } from '@fluentui/react-file-type-icons'; import type { Meta } from '@storybook/react'; import descriptionMd from './FileTypeIconDescription.md'; diff --git a/packages/react-file-type-icons/project.json b/packages/react-file-type-icons/project.json index 49d600378aadde..d22962c6b794da 100644 --- a/packages/react-file-type-icons/project.json +++ b/packages/react-file-type-icons/project.json @@ -1,5 +1,5 @@ { - "name": "react-file-type-icons", + "name": "react-file-type-icons-v8", "$schema": "../../node_modules/nx/schemas/project-schema.json", "projectType": "library", "sourceRoot": "packages/react-file-type-icons/src", diff --git a/tsconfig.base.all.json b/tsconfig.base.all.json index afdc079d0154ba..b37a8ebe8fcc17 100644 --- a/tsconfig.base.all.json +++ b/tsconfig.base.all.json @@ -71,7 +71,7 @@ "@fluentui/eslint-plugin-react-components": [ "packages/react-components/eslint-plugin-react-components/src/index.ts" ], - "@fluentui/file-type-icons-preview": ["packages/react-components/file-type-icons-preview/library/src/index.ts"], + "@fluentui/react-file-type-icons": ["packages/react-components/react-file-type-icons/library/src/index.ts"], "@fluentui/global-context": ["packages/react-components/global-context/src/index.ts"], "@fluentui/keyboard-key": ["packages/keyboard-key/src/index.ts"], "@fluentui/keyboard-keys": ["packages/react-components/keyboard-keys/src/index.ts"], @@ -256,8 +256,8 @@ "@fluentui/visual-regression-assert": ["tools/visual-regression-assert/src/index.ts"], "@fluentui/visual-regression-utilities": ["tools/visual-regression-utilities/src/index.ts"], "@fluentui/workspace-plugin": ["tools/workspace-plugin/src/index.ts"], - "@fluentui/file-type-icons-preview-stories": [ - "packages/react-components/file-type-icons-preview/stories/src/index.ts" + "@fluentui/react-file-type-icons-stories": [ + "packages/react-components/react-file-type-icons/stories/src/index.ts" ] } } diff --git a/tsconfig.base.json b/tsconfig.base.json index 07e4d6b0dcc2e8..1b053bbdae6acd 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -26,9 +26,9 @@ "@fluentui/eslint-plugin-react-components": [ "packages/react-components/eslint-plugin-react-components/src/index.ts" ], - "@fluentui/file-type-icons-preview": ["packages/react-components/file-type-icons-preview/library/src/index.ts"], - "@fluentui/file-type-icons-preview-stories": [ - "packages/react-components/file-type-icons-preview/stories/src/index.ts" + "@fluentui/react-file-type-icons": ["packages/react-components/react-file-type-icons/library/src/index.ts"], + "@fluentui/react-file-type-icons-stories": [ + "packages/react-components/react-file-type-icons/stories/src/index.ts" ], "@fluentui/global-context": ["packages/react-components/global-context/src/index.ts"], "@fluentui/keyboard-key": ["packages/keyboard-key/src/index.ts"], From f5b16cc1ded6206bf3fcca95fee46da325bf65c0 Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Mon, 24 Nov 2025 22:37:27 -0800 Subject: [PATCH 032/120] API update and undoing newFileTypeMethod in v8 package --- .../library/etc/react-file-type-icons.api.md | 152 ++++++++++++++++++ .../src/FileIconType.test.ts | 3 +- .../react-file-type-icons/src/FileIconType.ts | 66 +++++--- .../src/FileTypeIconMap.ts | 90 +++-------- .../src/getFileTypeIconProps.ts | 108 ++++++++++--- 5 files changed, 310 insertions(+), 109 deletions(-) create mode 100644 packages/react-components/react-file-type-icons/library/etc/react-file-type-icons.api.md diff --git a/packages/react-components/react-file-type-icons/library/etc/react-file-type-icons.api.md b/packages/react-components/react-file-type-icons/library/etc/react-file-type-icons.api.md new file mode 100644 index 00000000000000..33f598e1176e29 --- /dev/null +++ b/packages/react-components/react-file-type-icons/library/etc/react-file-type-icons.api.md @@ -0,0 +1,152 @@ +## API Report File for "@fluentui/react-file-type-icons" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import type { ComponentProps } from '@fluentui/react-utilities'; +import type { ComponentState } from '@fluentui/react-utilities'; +import type { ForwardRefComponent } from '@fluentui/react-utilities'; +import type { IIconOptions } from '@fluentui/style-utilities'; +import type { JSXElement } from '@fluentui/react-utilities'; +import * as React_2 from 'react'; +import type { Slot } from '@fluentui/react-utilities'; +import type { SlotClassNames } from '@fluentui/react-utilities'; + +// @public (undocumented) +export const DEFAULT_BASE_URL = "https://res.cdn.office.net/files/fabric-cdn-prod_20251107.003/assets/item-types/"; + +// @public (undocumented) +export const DEFAULT_ICON_SIZE: FileTypeIconSize; + +// @public +export enum FileIconType { + // (undocumented) + album = 21,// Start at 1 so it will evaluate as "truthy" + // (undocumented) + desktopFolder = 9, + // (undocumented) + docset = 1, + // (undocumented) + documentsFolder = 10, + // (undocumented) + folder = 2, + // (undocumented) + form = 14, + // (undocumented) + genericFile = 3, + // (undocumented) + linkedFolder = 12, + // (undocumented) + list = 13, + // (undocumented) + listForm = 22, + // (undocumented) + listItem = 4, + // (undocumented) + loopworkspace = 17, + // (undocumented) + multiple = 6, + // (undocumented) + news = 8, + // (undocumented) + picturesFolder = 11, + // (undocumented) + planner = 18, + // (undocumented) + playlist = 16, + // (undocumented) + portfolio = 20, + // (undocumented) + sharedFolder = 5, + // (undocumented) + stream = 7, + // (undocumented) + sway = 15, + // (undocumented) + todoItem = 19 +} + +// @public +export const FileTypeIcon: ForwardRefComponent; + +// @public (undocumented) +export const fileTypeIconClassNames: SlotClassNames; + +// @public +export const FileTypeIconMap: { + [key: string]: { + extensions?: string[]; + types?: FileIconType[]; + }; +}; + +// @public (undocumented) +export interface FileTypeIconOptions { + extension?: string; + imageFileType?: ImageFileType; + size?: FileTypeIconSize; + type?: FileIconType; +} + +// @public (undocumented) +export type FileTypeIconProps = ComponentProps & { + extension?: string; + type?: FileIconType; + size?: FileTypeIconSize; + imageFileType?: ImageFileType; + baseUrl?: string; +}; + +// @public (undocumented) +export type FileTypeIconSize = 16 | 20 | 24 | 32 | 40 | 48 | 64 | 96; + +// @public (undocumented) +export type FileTypeIconSlots = { + root: Slot<'img'>; +}; + +// @public (undocumented) +export type FileTypeIconState = ComponentState & Required> & { + iconUrl: string; +}; + +// @public +export function getFileTypeIconAsHTMLString(options: FileTypeIconOptions, baseUrl?: string): string | undefined; + +// @public +export function getFileTypeIconAsUrl(options: FileTypeIconOptions, baseUrl?: string): string | undefined; + +// @public +export function getFileTypeIconNameFromExtensionOrType(extension: string | undefined, type: FileIconType | undefined): string; + +// @public +export function getFileTypeIconProps(options: FileTypeIconOptions): { + iconName: string; + 'aria-label'?: string; +}; + +// @public +export function getFileTypeIconSuffix(size: FileTypeIconSize, imageFileType?: ImageFileType, win?: Window): string; + +// @public (undocumented) +export const ICON_SIZES: number[]; + +// @public (undocumented) +export type ImageFileType = 'svg' | 'png'; + +// @public (undocumented) +export function initializeFileTypeIcons(baseUrl?: string, options?: Partial): void; + +// @public +export const renderFileTypeIcon_unstable: (state: FileTypeIconState) => JSXElement; + +// @public +export const useFileTypeIcon_unstable: (props: FileTypeIconProps, ref: React_2.Ref) => FileTypeIconState; + +// @public +export const useFileTypeIconStyles_unstable: (state: FileTypeIconState) => FileTypeIconState; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/packages/react-file-type-icons/src/FileIconType.test.ts b/packages/react-file-type-icons/src/FileIconType.test.ts index 3ca2190759a3dc..47511569bde706 100644 --- a/packages/react-file-type-icons/src/FileIconType.test.ts +++ b/packages/react-file-type-icons/src/FileIconType.test.ts @@ -1,8 +1,9 @@ import { FileIconType } from './FileIconType'; +import type { FileIconTypeInput } from './FileIconType'; let allFileTypeIconValues: FileIconType | undefined; -function validateFileIconTypeValues(allowedFileTypeIconValues: FileIconType | undefined): void { +function validateFileIconTypeValues(allowedFileTypeIconValues: FileIconTypeInput | undefined): void { // The purpose of this function is to verify that the below call compiles, // which may only occur if every enum value matches its key. } diff --git a/packages/react-file-type-icons/src/FileIconType.ts b/packages/react-file-type-icons/src/FileIconType.ts index 38dd670fc363bc..22a7ee22bfcf81 100644 --- a/packages/react-file-type-icons/src/FileIconType.ts +++ b/packages/react-file-type-icons/src/FileIconType.ts @@ -7,25 +7,49 @@ export enum FileIconType { docset = 1, // Start at 1 so it will evaluate as "truthy" - folder, - genericFile, - listItem, - sharedFolder, - multiple, - stream, - news, - desktopFolder, - documentsFolder, - picturesFolder, - linkedFolder, - list, - form, - sway, - playlist, - loopworkspace, - planner, - todoItem, - portfolio, - album, - listForm, + folder = 2, + genericFile = 3, + listItem = 4, + sharedFolder = 5, + multiple = 6, + stream = 7, + news = 8, + desktopFolder = 9, + documentsFolder = 10, + picturesFolder = 11, + linkedFolder = 12, + list = 13, + form = 14, + sway = 15, + playlist = 16, + loopworkspace = 17, + planner = 18, + todoItem = 19, + portfolio = 20, + album = 21, + listForm = 22, } + +export type FileIconTypeInput = + | 1 + | 2 + | 3 + | 4 + | 5 + | 6 + | 7 + | 8 + | 9 + | 10 + | 11 + | 12 + | 13 + | 14 + | 15 + | 16 + | 17 + | 18 + | 19 + | 20 + | 21 + | 22; diff --git a/packages/react-file-type-icons/src/FileTypeIconMap.ts b/packages/react-file-type-icons/src/FileTypeIconMap.ts index 01d5916909fb23..a324f893e1fbf3 100644 --- a/packages/react-file-type-icons/src/FileTypeIconMap.ts +++ b/packages/react-file-type-icons/src/FileTypeIconMap.ts @@ -1,11 +1,9 @@ -import { FileIconType } from './FileIconType'; - /** * Enumeration of icon file names, and what extensions they map to. * Please keep items alphabetical. Items without extensions may require specific logic in the code to map. * Always use getFileTypeIconProps to get the most up-to-date icon at the right pixel density. */ -export const FileTypeIconMap: { [key: string]: { extensions?: string[]; types?: FileIconType[] } } = { +export const FileTypeIconMap: { [key: string]: { extensions?: string[] } } = { accdb: { extensions: ['accdb', 'mdb'], }, @@ -15,9 +13,7 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[]; types?: archive: { extensions: ['7z', 'ace', 'arc', 'arj', 'dmg', 'gz', 'iso', 'lzh', 'pkg', 'rar', 'sit', 'tgz', 'tar', 'z'], }, - album: { - types: [FileIconType.album], - }, + album: {}, audio: { extensions: [ 'aif', @@ -279,15 +275,9 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[]; types?: designer: { extensions: ['design'], }, - desktopfolder: { - types: [FileIconType.desktopFolder], - }, - docset: { - types: [FileIconType.docset], - }, - documentsfolder: { - types: [FileIconType.documentsFolder], - }, + desktopfolder: {}, + docset: {}, + documentsfolder: {}, docx: { extensions: ['doc', 'docm', 'docx', 'docb'], }, @@ -300,18 +290,13 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[]; types?: exe: { extensions: ['application', 'appref-ms', 'apk', 'app', 'appx', 'exe', 'ipa', 'msi', 'xap'], }, - folder: { - types: [FileIconType.folder], - }, + favoritesfolder: {}, + folder: {}, font: { extensions: ['ttf', 'otf', 'woff'], }, - form: { - types: [FileIconType.form], - }, - genericfile: { - types: [FileIconType.genericFile], - }, + form: {}, + genericfile: {}, html: { extensions: ['htm', 'html', 'mht', 'mhtml'], }, @@ -321,27 +306,17 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[]; types?: link: { extensions: ['lnk', 'link', 'url', 'website', 'webloc'], }, - linkedfolder: { - types: [FileIconType.linkedFolder], - }, - listform: { - types: [FileIconType.listForm], - }, - listitem: { - types: [FileIconType.listItem], - }, + linkedfolder: {}, + listform: {}, + listitem: {}, loop: { extensions: ['fluid', 'loop', 'note'], }, - loopworkspace: { - types: [FileIconType.loopworkspace], - }, + loopworkspace: {}, officescript: { extensions: ['osts'], }, - splist: { - types: [FileIconType.list], - }, + splist: {}, mcworld: { extensions: ['mcworld'], }, @@ -384,9 +359,7 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[]; types?: mpt: { extensions: ['mpt'], }, - multiple: { - types: [FileIconType.multiple], - }, + multiple: {}, one: { // This is a partial OneNote page or section export. Not whole notebooks, see "onetoc" extensions: ['one', 'onepart'], @@ -446,15 +419,9 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[]; types?: ], }, photo360: {}, - picturesfolder: { - types: [FileIconType.picturesFolder], - }, - planner: { - types: [FileIconType.planner], - }, - portfolio: { - types: [FileIconType.portfolio], - }, + picturesfolder: {}, + planner: {}, + portfolio: {}, potx: { extensions: ['pot', 'potm', 'potx'], }, @@ -476,24 +443,16 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[]; types?: spo: { extensions: ['aspx'], }, - sponews: { - types: [FileIconType.news], - }, + sponews: {}, spreadsheet: { extensions: ['odc', 'ods', 'gsheet', 'numbers', 'tsv'], }, rtf: { extensions: ['epub', 'gdoc', 'odt', 'rtf', 'wri', 'pages'], }, - sharedfolder: { - types: [FileIconType.sharedFolder], - }, - playlist: { - types: [FileIconType.playlist], - }, - sway: { - types: [FileIconType.sway], - }, + sharedfolder: {}, + playlist: {}, + sway: {}, sysfile: { extensions: [ 'bak', @@ -527,9 +486,7 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[]; types?: 'xll', ], }, - todoitem: { - types: [FileIconType.todoItem], - }, + todoitem: {}, txt: { extensions: ['dif', 'diff', 'readme', 'out', 'plist', 'properties', 'text', 'txt'], }, @@ -562,7 +519,6 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[]; types?: ], }, video: { - types: [FileIconType.stream], extensions: [ '3g2', '3gp', diff --git a/packages/react-file-type-icons/src/getFileTypeIconProps.ts b/packages/react-file-type-icons/src/getFileTypeIconProps.ts index e473167d7c9fbb..f0a13076e346ef 100644 --- a/packages/react-file-type-icons/src/getFileTypeIconProps.ts +++ b/packages/react-file-type-icons/src/getFileTypeIconProps.ts @@ -1,10 +1,31 @@ import { FileTypeIconMap } from './FileTypeIconMap'; import { FileIconType } from './FileIconType'; +import type { FileIconTypeInput } from './FileIconType'; let _extensionToIconName: { [key: string]: string }; -let _typeToIconName: { [key: number]: string }; const GENERIC_FILE = 'genericfile'; +const FOLDER = 'folder'; +const SHARED_FOLDER = 'sharedfolder'; +const DOCSET_FOLDER = 'docset'; +const LIST_ITEM = 'listitem'; +const LIST = 'splist'; +const MULTIPLE_ITEMS = 'multiple'; +const NEWS = 'sponews'; +const STREAM = 'video'; +const DESKTOP_FOLDER = 'desktopfolder'; +const DOCUMENTS_FOLDER = 'documentsfolder'; +const PICTURES_FOLDER = 'picturesfolder'; +const LINKED_FOLDER = 'linkedfolder'; +const FORM = 'form'; +const SWAY = 'sway'; +const PLAYLIST = 'playlist'; +const LOOP_WORKSPACE = 'loopworkspace'; +const TODOITEM = 'todoitem'; +const PLANNER = 'planner'; +const PORTFOLIO = 'portfolio'; +const ALBUM = 'album'; +const LIST_FORM = 'listform'; export const DEFAULT_ICON_SIZE: FileTypeIconSize = 16; export type FileTypeIconSize = 16 | 20 | 24 | 32 | 40 | 48 | 64 | 96; @@ -22,7 +43,7 @@ export interface IFileTypeIconOptions { * file type icons that are not associated with a file extension, * such as folder. */ - type?: FileIconType; + type?: FileIconTypeInput; /** * The size of the icon in pixels. * @default 16 @@ -82,26 +103,73 @@ export function getFileTypeIconNameFromExtensionOrType( extension = extension.replace('.', '').toLowerCase(); return _extensionToIconName[extension] || GENERIC_FILE; } else if (type) { - if (!_typeToIconName) { - _typeToIconName = {}; - - for (const iconName in FileTypeIconMap) { - if (FileTypeIconMap.hasOwnProperty(iconName)) { - const types = FileTypeIconMap[iconName].types; - - if (types) { - for (let i = 0; i < types.length; i++) { - _typeToIconName[types[i]] = iconName; - } - } - } - } + switch (type) { + case FileIconType.docset: + iconBaseName = DOCSET_FOLDER; + break; + case FileIconType.folder: + iconBaseName = FOLDER; + break; + case FileIconType.listItem: + iconBaseName = LIST_ITEM; + break; + case FileIconType.sharedFolder: + iconBaseName = SHARED_FOLDER; + break; + case FileIconType.stream: + iconBaseName = STREAM; + break; + case FileIconType.multiple: + iconBaseName = MULTIPLE_ITEMS; + break; + case FileIconType.news: + iconBaseName = NEWS; + break; + case FileIconType.desktopFolder: + iconBaseName = DESKTOP_FOLDER; + break; + case FileIconType.documentsFolder: + iconBaseName = DOCUMENTS_FOLDER; + break; + case FileIconType.picturesFolder: + iconBaseName = PICTURES_FOLDER; + break; + case FileIconType.linkedFolder: + iconBaseName = LINKED_FOLDER; + break; + case FileIconType.list: + iconBaseName = LIST; + break; + case FileIconType.form: + iconBaseName = FORM; + break; + case FileIconType.sway: + iconBaseName = SWAY; + break; + case FileIconType.playlist: + iconBaseName = PLAYLIST; + break; + case FileIconType.loopworkspace: + iconBaseName = LOOP_WORKSPACE; + break; + case FileIconType.planner: + iconBaseName = PLANNER; + break; + case FileIconType.todoItem: + iconBaseName = TODOITEM; + break; + case FileIconType.portfolio: + iconBaseName = PORTFOLIO; + break; + case FileIconType.album: + iconBaseName = ALBUM; + break; + case FileIconType.listForm: + iconBaseName = LIST_FORM; + break; } - - return _typeToIconName[type] || GENERIC_FILE; } - - return GENERIC_FILE; + return iconBaseName || GENERIC_FILE; } export function getFileTypeIconSuffix( From baa34305b0c05a5c3d566e711e927a587902919e Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Mon, 24 Nov 2025 23:41:37 -0800 Subject: [PATCH 033/120] package semver cleanup, build pass, documentation simplification --- .../react-components/package.json | 2 +- .../library/package.json | 4 +- .../library/src/FileTypeIcon.ts | 6 +-- .../FileTypeIcon/useFileTypeIcon.ts | 8 +--- .../library/src/index.ts | 6 +-- .../src/utils/getFileTypeIconAsUrl.test.ts | 5 +- .../library/src/utils/getFileTypeIconProps.ts | 4 +- .../FileTypeIconDefault.stories.tsx | 17 +++++-- .../FileTypeIconEdgeCases.stories.tsx | 47 ++++--------------- tsconfig.base.all.json | 1 - tsconfig.base.json | 8 ++-- 11 files changed, 34 insertions(+), 74 deletions(-) diff --git a/packages/react-components/react-components/package.json b/packages/react-components/react-components/package.json index 5a563bee9b8ce3..cb8502b2543773 100644 --- a/packages/react-components/react-components/package.json +++ b/packages/react-components/react-components/package.json @@ -78,7 +78,7 @@ "@fluentui/react-carousel": "^9.8.12", "@fluentui/react-color-picker": "^9.2.11", "@fluentui/react-nav": "^9.3.14", - "@fluentui/react-file-type-icons": "^0.0.1" + "@fluentui/react-file-type-icons": "^9.0.0" }, "peerDependencies": { "@types/react": ">=16.14.0 <20.0.0", diff --git a/packages/react-components/react-file-type-icons/library/package.json b/packages/react-components/react-file-type-icons/library/package.json index b339ac524adfae..99660817316e34 100644 --- a/packages/react-components/react-file-type-icons/library/package.json +++ b/packages/react-components/react-file-type-icons/library/package.json @@ -1,8 +1,8 @@ { "name": "@fluentui/react-file-type-icons", - "version": "0.0.0", + "version": "9.0.0", "private": true, - "description": "New fluentui react package", + "description": "Filetype icons for FluentUI", "main": "lib-commonjs/index.js", "module": "lib/index.js", "typings": "./dist/index.d.ts", diff --git a/packages/react-components/react-file-type-icons/library/src/FileTypeIcon.ts b/packages/react-components/react-file-type-icons/library/src/FileTypeIcon.ts index 38044ff59d9603..a24037c4ce477b 100644 --- a/packages/react-components/react-file-type-icons/library/src/FileTypeIcon.ts +++ b/packages/react-components/react-file-type-icons/library/src/FileTypeIcon.ts @@ -1,8 +1,4 @@ -export type { - FileTypeIconProps, - FileTypeIconSlots, - FileTypeIconState, -} from './components/FileTypeIcon/index'; +export type { FileTypeIconProps, FileTypeIconSlots, FileTypeIconState } from './components/FileTypeIcon/index'; export { FileTypeIcon, fileTypeIconClassNames, diff --git a/packages/react-components/react-file-type-icons/library/src/components/FileTypeIcon/useFileTypeIcon.ts b/packages/react-components/react-file-type-icons/library/src/components/FileTypeIcon/useFileTypeIcon.ts index 9be1f7105007b4..916fa7c18e8ddd 100644 --- a/packages/react-components/react-file-type-icons/library/src/components/FileTypeIcon/useFileTypeIcon.ts +++ b/packages/react-components/react-file-type-icons/library/src/components/FileTypeIcon/useFileTypeIcon.ts @@ -17,13 +17,7 @@ export const useFileTypeIcon_unstable = ( props: FileTypeIconProps, ref: React.Ref, ): FileTypeIconState => { - const { - extension, - type, - size = DEFAULT_ICON_SIZE, - imageFileType = 'svg', - baseUrl = DEFAULT_BASE_URL, - } = props; + const { extension, type, size = DEFAULT_ICON_SIZE, imageFileType = 'svg', baseUrl = DEFAULT_BASE_URL } = props; // Get the base icon name and suffix separately using v8 pattern const baseIconName = getFileTypeIconNameFromExtensionOrType(extension, type); diff --git a/packages/react-components/react-file-type-icons/library/src/index.ts b/packages/react-components/react-file-type-icons/library/src/index.ts index 303a3719d4577f..03e642d227d94b 100644 --- a/packages/react-components/react-file-type-icons/library/src/index.ts +++ b/packages/react-components/react-file-type-icons/library/src/index.ts @@ -17,10 +17,6 @@ export { getFileTypeIconSuffix, DEFAULT_ICON_SIZE, } from './utils/getFileTypeIconProps'; -export type { - FileTypeIconSize, - ImageFileType, - FileTypeIconOptions, -} from './utils/getFileTypeIconProps'; +export type { FileTypeIconSize, ImageFileType, FileTypeIconOptions } from './utils/getFileTypeIconProps'; export { getFileTypeIconAsUrl, getFileTypeIconAsHTMLString } from './utils/getFileTypeIconAsUrl'; export { initializeFileTypeIcons, DEFAULT_BASE_URL, ICON_SIZES } from './utils/initializeFileTypeIcons'; diff --git a/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconAsUrl.test.ts b/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconAsUrl.test.ts index b543a33f118167..06c332ebfcc05a 100644 --- a/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconAsUrl.test.ts +++ b/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconAsUrl.test.ts @@ -297,10 +297,7 @@ describe('getFileTypeIconAsHTMLString', () => { const customBaseUrl = 'https://custom.cdn.com/icons/'; it('should use custom base URL in HTML string', () => { - const result = getFileTypeIconAsHTMLString( - { extension: 'docx', size: 16, imageFileType: 'svg' }, - customBaseUrl, - ); + const result = getFileTypeIconAsHTMLString({ extension: 'docx', size: 16, imageFileType: 'svg' }, customBaseUrl); expect(result).toBe(``); }); }); diff --git a/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconProps.ts b/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconProps.ts index 879a1cbad7233c..d45d02b8e01362 100644 --- a/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconProps.ts +++ b/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconProps.ts @@ -86,7 +86,6 @@ export function getFileTypeIconNameFromExtensionOrType( // Strip periods, force lowercase. extension = extension.replace('.', '').toLowerCase(); return _extensionToIconName[extension] || GENERIC_FILE; - } else if (type) { if (!_typeToIconName) { _typeToIconName = {}; @@ -131,11 +130,10 @@ export function getFileTypeIconSuffix( if (imageFileType === 'svg' && devicePixelRatio > 1 && devicePixelRatio <= 1.9) { // 1.5x is a special case where SVGs need a different image. devicePixelRatioSuffix = '_1.5x'; - } else if (imageFileType === 'png') { // To look good, PNGs should use a different image for higher device pixel ratios if (devicePixelRatio > 1 && devicePixelRatio <= 1.5) { - devicePixelRatioSuffix ='_1.5x'; + devicePixelRatioSuffix = '_1.5x'; } else if (devicePixelRatio > 1.5 && devicePixelRatio <= 2) { devicePixelRatioSuffix = '_2x'; } else if (devicePixelRatio > 2 && devicePixelRatio <= 3) { diff --git a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx index e473d4f487ee12..506926f859b70a 100644 --- a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx +++ b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx @@ -35,12 +35,16 @@ export const Default = (): JSXElement => {
16px
-
Compact UIs, toolbars, dense tables. Example shows a Word document filetype icon.
+
+ Compact UIs, toolbars, dense tables. Example shows a Word document filetype icon. +
20px
-
Compact lists, navigation items. Example shows a folder, referenced via FileIconType.
+
+ Compact lists, navigation items. Example shows a folder, referenced via FileIconType. +
@@ -50,7 +54,9 @@ export const Default = (): JSXElement => {
32px
-
Standard cards, file browsers. Example shows a PowerPoint presentation with a legacy file extension.
+
+ Standard cards, file browsers. Example shows a PowerPoint presentation with a legacy file extension. +
@@ -60,7 +66,9 @@ export const Default = (): JSXElement => {
48px
-
Grid views, attachment previews. Example shows a Microsoft Lists object.
+
+ Grid views, attachment previews. Example shows a Microsoft Lists object. +
@@ -84,4 +92,3 @@ Default.parameters = { }, }, }; - diff --git a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconEdgeCases.stories.tsx b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconEdgeCases.stories.tsx index 395b0a2fbe1788..4ded35267789be 100644 --- a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconEdgeCases.stories.tsx +++ b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconEdgeCases.stories.tsx @@ -190,10 +190,10 @@ export const EdgeCases = (): JSXElement => {
-
Case Sensitivity
+
Case Sensitivity and Periods
File extensions are handled in a case-insensitive manner. The component recognizes extensions regardless of - capitalization. + capitalization. Periods before the extension will be ignored.
@@ -205,24 +205,16 @@ export const EdgeCases = (): JSXElement => {
.pdf
- +
.Pdf
-
- -
.PdF
-
-
All variations display the same PDF icon
-
- -
-
Best Practice: Handle Edge Cases in Your Code
-
- When integrating FileTypeIcon, consider extracting and normalizing file extensions from full filenames: +
All variations display the same PDF icon. If you want to further sanitize + your code, consider extracting and normalizing file extensions from full filenames:
- - {`// Extract extension from filename +
+          
+            {`// Extract extension from filename
 const getExtension = (filename: string): string => {
   const parts = filename.split('.');
   return parts.length > 1 ? parts[parts.length - 1].toLowerCase() : '';
@@ -233,29 +225,10 @@ const filename = "Report.Final.PDF";
 const extension = getExtension(filename); // "pdf"
 
 `}
-        
+          
+        
-
-
Extensions with Leading Dots
-
- The extension prop should be provided without the leading dot. If a dot is included, the component handles it - appropriately. -
-
-
- -
extension="docx" ✓
-
-
- -
extension=".docx"
-
-
-
- Best Practice: Always provide extensions without the leading dot for consistent behavior. -
-
); }; diff --git a/tsconfig.base.all.json b/tsconfig.base.all.json index b37a8ebe8fcc17..fa01a90c54fe9b 100644 --- a/tsconfig.base.all.json +++ b/tsconfig.base.all.json @@ -26,7 +26,6 @@ "@fluentui/react-date-time": ["packages/react-date-time/src/index.ts"], "@fluentui/react-experiments": ["packages/react-experiments/src/index.ts"], "@fluentui/react-experiments/lib/*": ["packages/react-experiments/src/*"], - "@fluentui/react-file-type-icons": ["packages/react-file-type-icons/src/index.ts"], "@fluentui/react-focus": ["packages/react-focus/src/index.ts"], "@fluentui/react-hooks": ["packages/react-hooks/src/index.ts"], "@fluentui/scheme-utilities": ["packages/scheme-utilities/src/index.ts"], diff --git a/tsconfig.base.json b/tsconfig.base.json index 1b053bbdae6acd..77fee2fa2b0840 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -26,10 +26,6 @@ "@fluentui/eslint-plugin-react-components": [ "packages/react-components/eslint-plugin-react-components/src/index.ts" ], - "@fluentui/react-file-type-icons": ["packages/react-components/react-file-type-icons/library/src/index.ts"], - "@fluentui/react-file-type-icons-stories": [ - "packages/react-components/react-file-type-icons/stories/src/index.ts" - ], "@fluentui/global-context": ["packages/react-components/global-context/src/index.ts"], "@fluentui/keyboard-key": ["packages/keyboard-key/src/index.ts"], "@fluentui/keyboard-keys": ["packages/react-components/keyboard-keys/src/index.ts"], @@ -80,6 +76,10 @@ "@fluentui/react-drawer-stories": ["packages/react-components/react-drawer/stories/src/index.ts"], "@fluentui/react-field": ["packages/react-components/react-field/library/src/index.ts"], "@fluentui/react-field-stories": ["packages/react-components/react-field/stories/src/index.ts"], + "@fluentui/react-file-type-icons": ["packages/react-components/react-file-type-icons/library/src/index.ts"], + "@fluentui/react-file-type-icons-stories": [ + "packages/react-components/react-file-type-icons/stories/src/index.ts" + ], "@fluentui/react-focus-management": ["packages/react-focus-management/src/index.ts"], "@fluentui/react-icons-compat": ["packages/react-components/react-icons-compat/library/src/index.ts"], "@fluentui/react-icons-compat-stories": ["packages/react-components/react-icons-compat/stories/src/index.ts"], From 1f4861249b882f0269371324cfb4303965d28065 Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Tue, 25 Nov 2025 00:20:12 -0800 Subject: [PATCH 034/120] error checking and optimizations --- .../FileTypeIcon/useFileTypeIcon.ts | 3 +- .../src/utils/getFileTypeIconAsUrl.test.ts | 32 ++++++++++++----- .../library/src/utils/getFileTypeIconAsUrl.ts | 7 ++-- .../library/src/utils/getFileTypeIconProps.ts | 2 +- .../FileTypeIconCommon.stories.tsx | 8 +++-- .../FileTypeIconDefault.stories.tsx | 2 +- .../FileTypeIconEdgeCases.stories.tsx | 12 +++++-- .../FileTypeIconUrlAndHtml.stories.tsx | 35 ++++++++++--------- .../src/FileTypeIcon/index.stories.tsx | 2 +- 9 files changed, 65 insertions(+), 38 deletions(-) diff --git a/packages/react-components/react-file-type-icons/library/src/components/FileTypeIcon/useFileTypeIcon.ts b/packages/react-components/react-file-type-icons/library/src/components/FileTypeIcon/useFileTypeIcon.ts index 916fa7c18e8ddd..a788a518a4083e 100644 --- a/packages/react-components/react-file-type-icons/library/src/components/FileTypeIcon/useFileTypeIcon.ts +++ b/packages/react-components/react-file-type-icons/library/src/components/FileTypeIcon/useFileTypeIcon.ts @@ -7,8 +7,7 @@ import { DEFAULT_ICON_SIZE, } from '../../utils/getFileTypeIconProps'; import { FileIconType } from '../../utils/FileIconType'; - -const DEFAULT_BASE_URL = 'https://res.cdn.office.net/files/fabric-cdn-prod_20251119.001/assets/item-types/'; +import { DEFAULT_BASE_URL } from '../../utils/initializeFileTypeIcons'; /** * Returns the props and state required to render the FileTypeIcon component. diff --git a/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconAsUrl.test.ts b/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconAsUrl.test.ts index 06c332ebfcc05a..f53ee55e9ca51c 100644 --- a/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconAsUrl.test.ts +++ b/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconAsUrl.test.ts @@ -217,7 +217,7 @@ describe('getFileTypeIconAsHTMLString', () => { { extension: 'docx', size: 16, imageFileType: 'png' }, DEFAULT_BASE_URL, ); - expect(result).toBe(``); + expect(result).toBe(`docx file icon`); }); it('should return correct HTML string for 1.5x DPI with pdf extension', () => { @@ -231,7 +231,7 @@ describe('getFileTypeIconAsHTMLString', () => { { extension: 'pdf', size: 16, imageFileType: 'png' }, DEFAULT_BASE_URL, ); - expect(result).toBe(``); + expect(result).toBe(`pdf file icon`); }); it('should return correct HTML string for 2x DPI with xlsx extension', () => { @@ -245,7 +245,7 @@ describe('getFileTypeIconAsHTMLString', () => { { extension: 'xlsx', size: 16, imageFileType: 'png' }, DEFAULT_BASE_URL, ); - expect(result).toBe(``); + expect(result).toBe(`xlsx file icon`); }); }); @@ -255,7 +255,7 @@ describe('getFileTypeIconAsHTMLString', () => { { extension: 'docx', size: 24, imageFileType: 'svg' }, DEFAULT_BASE_URL, ); - expect(result).toBe(``); + expect(result).toBe(`docx file icon`); }); it('should return correct HTML string for 1.5x DPI with SVG', () => { @@ -269,7 +269,7 @@ describe('getFileTypeIconAsHTMLString', () => { { extension: 'pdf', size: 20, imageFileType: 'svg' }, DEFAULT_BASE_URL, ); - expect(result).toBe(``); + expect(result).toBe(`pdf file icon`); }); }); @@ -281,6 +281,7 @@ describe('getFileTypeIconAsHTMLString', () => { ); expect(result).toContain('height="32"'); expect(result).toContain('width="32"'); + expect(result).toContain('alt="docx file icon"'); }); it('should include correct size attributes for size 48', () => { @@ -290,6 +291,7 @@ describe('getFileTypeIconAsHTMLString', () => { ); expect(result).toContain('height="48"'); expect(result).toContain('width="48"'); + expect(result).toContain('alt="xlsx file icon"'); }); }); @@ -298,16 +300,28 @@ describe('getFileTypeIconAsHTMLString', () => { it('should use custom base URL in HTML string', () => { const result = getFileTypeIconAsHTMLString({ extension: 'docx', size: 16, imageFileType: 'svg' }, customBaseUrl); - expect(result).toBe(``); + expect(result).toBe(`docx file icon`); }); }); describe('edge cases', () => { - it('should handle undefined URL gracefully', () => { - // This would only happen if getFileTypeIconAsUrl returns undefined - // which shouldn't happen in normal circumstances, but we test for robustness + it('should handle unknown extension gracefully with alt text', () => { + // Unknown extensions should still generate valid HTML with alt text const result = getFileTypeIconAsHTMLString({ extension: 'unknown', size: 16 }, DEFAULT_BASE_URL); expect(result).toBeDefined(); + expect(result).toContain('alt="unknown file icon"'); + }); + + it('should generate alt text from FileIconType when extension is not provided', () => { + const result = getFileTypeIconAsHTMLString({ type: FileIconType.folder, size: 16 }, DEFAULT_BASE_URL); + expect(result).toBeDefined(); + expect(result).toContain('alt="folder file icon"'); + }); + + it('should generate empty alt text prefix when neither extension nor type is provided', () => { + const result = getFileTypeIconAsHTMLString({ size: 16 }, DEFAULT_BASE_URL); + expect(result).toBeDefined(); + expect(result).toContain('alt=" file icon"'); }); }); }); diff --git a/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconAsUrl.ts b/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconAsUrl.ts index c341e892ced94a..e7bc5d77d5c63a 100644 --- a/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconAsUrl.ts +++ b/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconAsUrl.ts @@ -5,6 +5,7 @@ import { DEFAULT_ICON_SIZE, } from './getFileTypeIconProps'; import type { FileTypeIconOptions } from './getFileTypeIconProps'; +import { FileIconType } from './FileIconType'; /** * Given the `fileTypeIconOptions`, this function returns the CDN-based URL for `FileTypeIcon`. @@ -47,6 +48,8 @@ export function getFileTypeIconAsHTMLString( return undefined; } - const { size = DEFAULT_ICON_SIZE } = options; - return ``; + const { size = DEFAULT_ICON_SIZE, extension, type } = options; + // Generate alt text: use extension if provided, otherwise get the enum name for type + const altText = extension || (type !== undefined ? FileIconType[type] : ''); + return `${altText} file icon`; } diff --git a/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconProps.ts b/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconProps.ts index d45d02b8e01362..780fe314408d7e 100644 --- a/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconProps.ts +++ b/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconProps.ts @@ -122,7 +122,7 @@ export function getFileTypeIconSuffix( win?: Window, ): string { // eslint-disable-next-line @nx/workspace-no-restricted-globals - win ??= window; + win ??= typeof window !== 'undefined' ? window : ({ devicePixelRatio: 1 } as Window); const devicePixelRatio: number = win.devicePixelRatio; let devicePixelRatioSuffix = ''; // Default is 1x diff --git a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconCommon.stories.tsx b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconCommon.stories.tsx index bf32a05e235340..4449b2c8568af6 100644 --- a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconCommon.stories.tsx +++ b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconCommon.stories.tsx @@ -42,13 +42,17 @@ const useStyles = makeStyles({ textAlign: 'center', color: tokens.colorNeutralForeground2, }, + specialTypesDescription: { + marginBottom: '12px', + color: tokens.colorNeutralForeground3, + }, }); const fileTypeCategories = { documents: ['docx', 'xlsx', 'pdf', 'txt', 'rtf', 'odt', 'pptx', 'csv'], media: ['jpg', 'svg', 'mp4', 'mp3', 'wav', 'aac'], code: ['html', 'url', 'json', 'xml', 'py', 'java', 'cpp'], - data: ['zip', 'tar', 'sql', 'accdb', 'xml'], + data: ['zip', 'tar', 'sql', 'accdb'], }; const specialTypes = [ @@ -114,7 +118,7 @@ export const CommonFileTypes = (): JSXElement => {
Special Types
-

+

These types are not based on file extensions, but represent objects like folders and list items.

diff --git a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx index 506926f859b70a..db8cda511a7f51 100644 --- a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx +++ b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx @@ -49,7 +49,7 @@ export const Default = (): JSXElement => {
24px
-
Standard list items, search results. Example shows a PDF.
+
Standard list items, search results. Example shows a Word document.
diff --git a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconEdgeCases.stories.tsx b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconEdgeCases.stories.tsx index 4ded35267789be..35fc6816866298 100644 --- a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconEdgeCases.stories.tsx +++ b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconEdgeCases.stories.tsx @@ -62,6 +62,12 @@ const useStyles = makeStyles({ fontSize: tokens.fontSizeBase200, overflowX: 'auto', }, + truncatedText: { + overflow: 'hidden', + textOverflow: 'ellipsis', + whiteSpace: 'nowrap', + flex: 1, + }, }); export const EdgeCases = (): JSXElement => { @@ -177,7 +183,7 @@ export const EdgeCases = (): JSXElement => {
-
+
This_is_a_very_long_filename_that_could_cause_layout_issues_in_some_contexts_Q4_2025_Final_Report_v3.pdf
@@ -198,11 +204,11 @@ export const EdgeCases = (): JSXElement => {
-
.PDF
+
PDF
-
.pdf
+
pdf
diff --git a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconUrlAndHtml.stories.tsx b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconUrlAndHtml.stories.tsx index 35c15390bcc516..64f5bd35d3294b 100644 --- a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconUrlAndHtml.stories.tsx +++ b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconUrlAndHtml.stories.tsx @@ -1,5 +1,6 @@ import * as React from 'react'; import type { JSXElement } from '@fluentui/react-components'; +import { tokens } from '@fluentui/react-components'; import { getFileTypeIconAsUrl, getFileTypeIconAsHTMLString } from '@fluentui/react-file-type-icons'; import { makeStyles, shorthands } from '@griffel/react'; @@ -14,12 +15,12 @@ const useStyles = makeStyles({ flexDirection: 'column', gap: '12px', ...shorthands.padding('16px'), - ...shorthands.border('1px', 'solid', '#e0e0e0'), - ...shorthands.borderRadius('8px'), + ...shorthands.border('1px', 'solid', tokens.colorNeutralStroke1), + ...shorthands.borderRadius(tokens.borderRadiusMedium), }, sectionTitle: { - fontSize: '16px', - fontWeight: '600', + fontSize: tokens.fontSizeBase400, + fontWeight: tokens.fontWeightSemibold, marginBottom: '8px', }, grid: { @@ -32,12 +33,12 @@ const useStyles = makeStyles({ flexDirection: 'column', gap: '8px', ...shorthands.padding('12px'), - backgroundColor: '#f5f5f5', - ...shorthands.borderRadius('4px'), + backgroundColor: tokens.colorNeutralBackground2, + ...shorthands.borderRadius(tokens.borderRadiusSmall), }, cardTitle: { - fontSize: '14px', - fontWeight: '600', + fontSize: tokens.fontSizeBase300, + fontWeight: tokens.fontWeightSemibold, marginBottom: '4px', }, iconPreview: { @@ -45,23 +46,23 @@ const useStyles = makeStyles({ alignItems: 'center', justifyContent: 'center', ...shorthands.padding('12px'), - backgroundColor: '#ffffff', - ...shorthands.borderRadius('4px'), + backgroundColor: tokens.colorNeutralBackground1, + ...shorthands.borderRadius(tokens.borderRadiusSmall), minHeight: '60px', }, code: { - fontSize: '11px', - fontFamily: 'monospace', - backgroundColor: '#ffffff', + fontSize: tokens.fontSizeBase100, + fontFamily: tokens.fontFamilyMonospace, + backgroundColor: tokens.colorNeutralBackground1, ...shorthands.padding('8px'), - ...shorthands.borderRadius('4px'), + ...shorthands.borderRadius(tokens.borderRadiusSmall), overflowX: 'auto', wordBreak: 'break-all', }, label: { - fontSize: '12px', - color: '#666', - fontWeight: '500', + fontSize: tokens.fontSizeBase200, + color: tokens.colorNeutralForeground3, + fontWeight: tokens.fontWeightMedium, }, }); diff --git a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/index.stories.tsx b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/index.stories.tsx index 7b307246cb12a9..06451131e0a04d 100644 --- a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/index.stories.tsx +++ b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/index.stories.tsx @@ -26,7 +26,7 @@ export default { description: 'The size of the icon in pixels', table: { type: { summary: '16 | 20 | 24 | 32 | 40 | 48 | 64 | 96' }, - defaultValue: { summary: '48' }, + defaultValue: { summary: '16' }, }, }, extension: { From 5996d700eb386139e535315fee46a06c4f9d8b30 Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Tue, 25 Nov 2025 00:31:48 -0800 Subject: [PATCH 035/120] initializeFileTypeIcons with alternate CDN URL is now honored by new methods --- .../FileTypeIcon/FileTypeIcon.test.tsx | 49 ++++++ .../FileTypeIcon/useFileTypeIcon.ts | 4 +- .../library/src/index.ts | 8 +- .../library/src/utils/getFileTypeIconAsUrl.ts | 14 +- .../src/utils/initializeFileTypeIcons.test.ts | 149 ++++++++++++++++++ .../src/utils/initializeFileTypeIcons.tsx | 23 +++ 6 files changed, 239 insertions(+), 8 deletions(-) create mode 100644 packages/react-components/react-file-type-icons/library/src/utils/initializeFileTypeIcons.test.ts diff --git a/packages/react-components/react-file-type-icons/library/src/components/FileTypeIcon/FileTypeIcon.test.tsx b/packages/react-components/react-file-type-icons/library/src/components/FileTypeIcon/FileTypeIcon.test.tsx index bd3a677bf1656c..f4b2df95e985e0 100644 --- a/packages/react-components/react-file-type-icons/library/src/components/FileTypeIcon/FileTypeIcon.test.tsx +++ b/packages/react-components/react-file-type-icons/library/src/components/FileTypeIcon/FileTypeIcon.test.tsx @@ -3,6 +3,11 @@ import { isConformant } from '../../testing/isConformant'; import { render } from '@testing-library/react'; import { FileTypeIcon } from './FileTypeIcon'; import { FileIconType } from '../../utils/FileIconType'; +import { + initializeFileTypeIcons, + resetConfiguredBaseUrl, + DEFAULT_BASE_URL, +} from '../../utils/initializeFileTypeIcons'; describe('FileTypeIcon', () => { isConformant({ @@ -72,3 +77,47 @@ describe('FileTypeIcon', () => { expect(img?.src).toContain('genericfile'); }); }); + +describe('FileTypeIcon with initializeFileTypeIcons', () => { + beforeEach(() => { + // Reset to default state before each test + resetConfiguredBaseUrl(); + }); + + afterAll(() => { + // Reset to default state after all tests + resetConfiguredBaseUrl(); + }); + + it('should use DEFAULT_BASE_URL when initializeFileTypeIcons has not been called', () => { + const result = render(); + const img = result.container.querySelector('img'); + expect(img?.src).toContain(DEFAULT_BASE_URL); + }); + + it('should use custom URL after initializeFileTypeIcons is called with custom URL', () => { + const customUrl = 'https://my-custom-cdn.com/icons/'; + initializeFileTypeIcons(customUrl); + + const result = render(); + const img = result.container.querySelector('img'); + expect(img?.src).toContain(customUrl); + }); + + it('should allow explicit baseUrl prop to override configured URL', () => { + const configuredUrl = 'https://configured-cdn.com/icons/'; + const explicitUrl = 'https://explicit-cdn.com/icons/'; + + initializeFileTypeIcons(configuredUrl); + + // Without explicit baseUrl - uses configured URL + const result1 = render(); + const img1 = result1.container.querySelector('img'); + expect(img1?.src).toContain(configuredUrl); + + // With explicit baseUrl - uses explicit URL + const result2 = render(); + const img2 = result2.container.querySelector('img'); + expect(img2?.src).toContain(explicitUrl); + }); +}); diff --git a/packages/react-components/react-file-type-icons/library/src/components/FileTypeIcon/useFileTypeIcon.ts b/packages/react-components/react-file-type-icons/library/src/components/FileTypeIcon/useFileTypeIcon.ts index a788a518a4083e..db9181477c03c6 100644 --- a/packages/react-components/react-file-type-icons/library/src/components/FileTypeIcon/useFileTypeIcon.ts +++ b/packages/react-components/react-file-type-icons/library/src/components/FileTypeIcon/useFileTypeIcon.ts @@ -7,7 +7,7 @@ import { DEFAULT_ICON_SIZE, } from '../../utils/getFileTypeIconProps'; import { FileIconType } from '../../utils/FileIconType'; -import { DEFAULT_BASE_URL } from '../../utils/initializeFileTypeIcons'; +import { getConfiguredBaseUrl } from '../../utils/initializeFileTypeIcons'; /** * Returns the props and state required to render the FileTypeIcon component. @@ -16,7 +16,7 @@ export const useFileTypeIcon_unstable = ( props: FileTypeIconProps, ref: React.Ref, ): FileTypeIconState => { - const { extension, type, size = DEFAULT_ICON_SIZE, imageFileType = 'svg', baseUrl = DEFAULT_BASE_URL } = props; + const { extension, type, size = DEFAULT_ICON_SIZE, imageFileType = 'svg', baseUrl = getConfiguredBaseUrl() } = props; // Get the base icon name and suffix separately using v8 pattern const baseIconName = getFileTypeIconNameFromExtensionOrType(extension, type); diff --git a/packages/react-components/react-file-type-icons/library/src/index.ts b/packages/react-components/react-file-type-icons/library/src/index.ts index 03e642d227d94b..f8f5771663adc9 100644 --- a/packages/react-components/react-file-type-icons/library/src/index.ts +++ b/packages/react-components/react-file-type-icons/library/src/index.ts @@ -19,4 +19,10 @@ export { } from './utils/getFileTypeIconProps'; export type { FileTypeIconSize, ImageFileType, FileTypeIconOptions } from './utils/getFileTypeIconProps'; export { getFileTypeIconAsUrl, getFileTypeIconAsHTMLString } from './utils/getFileTypeIconAsUrl'; -export { initializeFileTypeIcons, DEFAULT_BASE_URL, ICON_SIZES } from './utils/initializeFileTypeIcons'; +export { + initializeFileTypeIcons, + getConfiguredBaseUrl, + resetConfiguredBaseUrl, + DEFAULT_BASE_URL, + ICON_SIZES, +} from './utils/initializeFileTypeIcons'; diff --git a/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconAsUrl.ts b/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconAsUrl.ts index e7bc5d77d5c63a..88ee15e35535bc 100644 --- a/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconAsUrl.ts +++ b/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconAsUrl.ts @@ -1,4 +1,4 @@ -import { DEFAULT_BASE_URL } from './initializeFileTypeIcons'; +import { getConfiguredBaseUrl } from './initializeFileTypeIcons'; import { getFileTypeIconNameFromExtensionOrType, getFileTypeIconSuffix, @@ -11,11 +11,13 @@ import { FileIconType } from './FileIconType'; * Given the `fileTypeIconOptions`, this function returns the CDN-based URL for `FileTypeIcon`. * Similar to `getFileTypeIconProps`, but rather than returning the `iconName`, this returns the raw URL. * @param options - * @param baseUrl - optionally provide a custom CDN base url to fetch icons from + * @param baseUrl - optionally provide a custom CDN base url to fetch icons from. + * If not provided, uses the URL configured via `initializeFileTypeIcons()`, + * or falls back to the default CDN URL. */ export function getFileTypeIconAsUrl( options: FileTypeIconOptions, - baseUrl: string = DEFAULT_BASE_URL, + baseUrl: string = getConfiguredBaseUrl(), ): string | undefined { const { extension, size = DEFAULT_ICON_SIZE, type, imageFileType = 'svg' } = options; const baseIconName = getFileTypeIconNameFromExtensionOrType(extension, type); @@ -36,11 +38,13 @@ export function getFileTypeIconAsUrl( * Given the `fileTypeIconOptions`, similar to `getFileTypeIconProps`, this function returns * an tag DOM element that renders the icon, as a string. * @param options - * @param baseUrl - optionally provide a custom CDN base url to fetch icons from + * @param baseUrl - optionally provide a custom CDN base url to fetch icons from. + * If not provided, uses the URL configured via `initializeFileTypeIcons()`, + * or falls back to the default CDN URL. */ export function getFileTypeIconAsHTMLString( options: FileTypeIconOptions, - baseUrl: string = DEFAULT_BASE_URL, + baseUrl: string = getConfiguredBaseUrl(), ): string | undefined { const url = getFileTypeIconAsUrl(options, baseUrl); diff --git a/packages/react-components/react-file-type-icons/library/src/utils/initializeFileTypeIcons.test.ts b/packages/react-components/react-file-type-icons/library/src/utils/initializeFileTypeIcons.test.ts new file mode 100644 index 00000000000000..f55ba145473f67 --- /dev/null +++ b/packages/react-components/react-file-type-icons/library/src/utils/initializeFileTypeIcons.test.ts @@ -0,0 +1,149 @@ +import { + initializeFileTypeIcons, + getConfiguredBaseUrl, + resetConfiguredBaseUrl, + DEFAULT_BASE_URL, +} from './initializeFileTypeIcons'; +import { getFileTypeIconAsUrl, getFileTypeIconAsHTMLString } from './getFileTypeIconAsUrl'; + +describe('initializeFileTypeIcons', () => { + // Store original DPR once at the start + const originalDPR = typeof window !== 'undefined' ? window.devicePixelRatio : 1; + + beforeEach(() => { + // Reset to default state before each test + resetConfiguredBaseUrl(); + + // Reset to 1x DPR before each test + if (typeof window !== 'undefined') { + Object.defineProperty(window, 'devicePixelRatio', { + writable: true, + configurable: true, + value: 1, + }); + } + }); + + afterAll(() => { + // Restore original DPR after all tests + if (typeof window !== 'undefined') { + Object.defineProperty(window, 'devicePixelRatio', { + writable: true, + configurable: true, + value: originalDPR, + }); + } + // Reset to default state + resetConfiguredBaseUrl(); + }); + + describe('getConfiguredBaseUrl', () => { + it('should return DEFAULT_BASE_URL when initializeFileTypeIcons has not been called', () => { + expect(getConfiguredBaseUrl()).toBe(DEFAULT_BASE_URL); + }); + + it('should return DEFAULT_BASE_URL after calling initializeFileTypeIcons with no arguments', () => { + initializeFileTypeIcons(); + expect(getConfiguredBaseUrl()).toBe(DEFAULT_BASE_URL); + }); + + it('should return custom URL after calling initializeFileTypeIcons with custom URL', () => { + const customUrl = 'https://my-custom-cdn.com/icons/'; + initializeFileTypeIcons(customUrl); + expect(getConfiguredBaseUrl()).toBe(customUrl); + }); + + it('should return DEFAULT_BASE_URL after resetConfiguredBaseUrl is called', () => { + const customUrl = 'https://my-custom-cdn.com/icons/'; + initializeFileTypeIcons(customUrl); + expect(getConfiguredBaseUrl()).toBe(customUrl); + + resetConfiguredBaseUrl(); + expect(getConfiguredBaseUrl()).toBe(DEFAULT_BASE_URL); + }); + }); + + describe('integration with getFileTypeIconAsUrl', () => { + it('should use DEFAULT_BASE_URL when initializeFileTypeIcons has not been called', () => { + const result = getFileTypeIconAsUrl({ extension: 'docx', size: 16 }); + expect(result).toBe(`${DEFAULT_BASE_URL}16/docx.svg`); + }); + + it('should use custom URL after initializeFileTypeIcons is called with custom URL', () => { + const customUrl = 'https://my-custom-cdn.com/icons/'; + initializeFileTypeIcons(customUrl); + + const result = getFileTypeIconAsUrl({ extension: 'docx', size: 16 }); + expect(result).toBe(`${customUrl}16/docx.svg`); + }); + + it('should allow explicit baseUrl parameter to override configured URL', () => { + const configuredUrl = 'https://configured-cdn.com/icons/'; + const explicitUrl = 'https://explicit-cdn.com/icons/'; + + initializeFileTypeIcons(configuredUrl); + + // Without explicit baseUrl - uses configured URL + const resultWithoutExplicit = getFileTypeIconAsUrl({ extension: 'docx', size: 16 }); + expect(resultWithoutExplicit).toBe(`${configuredUrl}16/docx.svg`); + + // With explicit baseUrl - uses explicit URL + const resultWithExplicit = getFileTypeIconAsUrl({ extension: 'docx', size: 16 }, explicitUrl); + expect(resultWithExplicit).toBe(`${explicitUrl}16/docx.svg`); + }); + }); + + describe('integration with getFileTypeIconAsHTMLString', () => { + it('should use DEFAULT_BASE_URL when initializeFileTypeIcons has not been called', () => { + const result = getFileTypeIconAsHTMLString({ extension: 'pdf', size: 24 }); + expect(result).toBe(`pdf file icon`); + }); + + it('should use custom URL after initializeFileTypeIcons is called with custom URL', () => { + const customUrl = 'https://my-custom-cdn.com/icons/'; + initializeFileTypeIcons(customUrl); + + const result = getFileTypeIconAsHTMLString({ extension: 'pdf', size: 24 }); + expect(result).toBe(`pdf file icon`); + }); + + it('should allow explicit baseUrl parameter to override configured URL', () => { + const configuredUrl = 'https://configured-cdn.com/icons/'; + const explicitUrl = 'https://explicit-cdn.com/icons/'; + + initializeFileTypeIcons(configuredUrl); + + // Without explicit baseUrl - uses configured URL + const resultWithoutExplicit = getFileTypeIconAsHTMLString({ extension: 'xlsx', size: 32 }); + expect(resultWithoutExplicit).toContain(configuredUrl); + + // With explicit baseUrl - uses explicit URL + const resultWithExplicit = getFileTypeIconAsHTMLString({ extension: 'xlsx', size: 32 }, explicitUrl); + expect(resultWithExplicit).toContain(explicitUrl); + }); + }); + + describe('URL override persistence', () => { + it('should persist custom URL across multiple utility calls', () => { + const customUrl = 'https://persistent-cdn.com/icons/'; + initializeFileTypeIcons(customUrl); + + // Multiple calls should all use the configured URL + expect(getFileTypeIconAsUrl({ extension: 'docx', size: 16 })).toContain(customUrl); + expect(getFileTypeIconAsUrl({ extension: 'pdf', size: 24 })).toContain(customUrl); + expect(getFileTypeIconAsUrl({ extension: 'xlsx', size: 32 })).toContain(customUrl); + expect(getFileTypeIconAsHTMLString({ extension: 'pptx', size: 48 })).toContain(customUrl); + }); + + it('should update configured URL when initializeFileTypeIcons is called again', () => { + const firstUrl = 'https://first-cdn.com/icons/'; + const secondUrl = 'https://second-cdn.com/icons/'; + + initializeFileTypeIcons(firstUrl); + expect(getFileTypeIconAsUrl({ extension: 'docx', size: 16 })).toContain(firstUrl); + + initializeFileTypeIcons(secondUrl); + expect(getFileTypeIconAsUrl({ extension: 'docx', size: 16 })).toContain(secondUrl); + }); + }); +}); diff --git a/packages/react-components/react-file-type-icons/library/src/utils/initializeFileTypeIcons.tsx b/packages/react-components/react-file-type-icons/library/src/utils/initializeFileTypeIcons.tsx index cfee9890512ae1..899dfbb006d599 100644 --- a/packages/react-components/react-file-type-icons/library/src/utils/initializeFileTypeIcons.tsx +++ b/packages/react-components/react-file-type-icons/library/src/utils/initializeFileTypeIcons.tsx @@ -10,7 +10,30 @@ const SVG_SUFFIX = '_svg'; export const DEFAULT_BASE_URL = `${FLUENT_CDN_BASE_URL}/assets/item-types/`; export const ICON_SIZES: number[] = [16, 20, 24, 32, 40, 48, 64, 96]; +// Module-level state to track the configured base URL +let _configuredBaseUrl: string | undefined; + +/** + * Returns the configured base URL if `initializeFileTypeIcons` was called with a custom URL, + * otherwise returns the default CDN base URL. + * This is used internally by FileTypeIcon component and utility functions. + */ +export function getConfiguredBaseUrl(): string { + return _configuredBaseUrl ?? DEFAULT_BASE_URL; +} + +/** + * Resets the configured base URL to undefined, causing `getConfiguredBaseUrl` to return + * the default CDN base URL. This is primarily intended for testing purposes. + */ +export function resetConfiguredBaseUrl(): void { + _configuredBaseUrl = undefined; +} + export function initializeFileTypeIcons(baseUrl: string = DEFAULT_BASE_URL, options?: Partial): void { + // Store the configured base URL for use by v9 components and utilities + _configuredBaseUrl = baseUrl; + ICON_SIZES.forEach((size: number) => { _initializeIcons(baseUrl, size, options); }); From e89bd7b6cf7a85105bc251672a985fb464183ea8 Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Tue, 25 Nov 2025 00:50:38 -0800 Subject: [PATCH 036/120] improved icon size checking, removing unnecessary public exports, fixing tests --- .../FileTypeIcon/FileTypeIcon.test.tsx | 61 ++++++++- .../FileTypeIcon/useFileTypeIcon.ts | 6 +- .../library/src/index.ts | 9 +- .../library/src/testing/index.ts | 9 ++ .../src/utils/getFileTypeIconAsUrl.test.ts | 122 +++++++++++++++++- .../library/src/utils/getFileTypeIconProps.ts | 56 +++++++- .../src/utils/initializeFileTypeIcons.test.ts | 8 +- 7 files changed, 246 insertions(+), 25 deletions(-) create mode 100644 packages/react-components/react-file-type-icons/library/src/testing/index.ts diff --git a/packages/react-components/react-file-type-icons/library/src/components/FileTypeIcon/FileTypeIcon.test.tsx b/packages/react-components/react-file-type-icons/library/src/components/FileTypeIcon/FileTypeIcon.test.tsx index f4b2df95e985e0..9ac92d9431070f 100644 --- a/packages/react-components/react-file-type-icons/library/src/components/FileTypeIcon/FileTypeIcon.test.tsx +++ b/packages/react-components/react-file-type-icons/library/src/components/FileTypeIcon/FileTypeIcon.test.tsx @@ -2,12 +2,10 @@ import * as React from 'react'; import { isConformant } from '../../testing/isConformant'; import { render } from '@testing-library/react'; import { FileTypeIcon } from './FileTypeIcon'; +import type { FileTypeIconProps } from './FileTypeIcon.types'; import { FileIconType } from '../../utils/FileIconType'; -import { - initializeFileTypeIcons, - resetConfiguredBaseUrl, - DEFAULT_BASE_URL, -} from '../../utils/initializeFileTypeIcons'; +import { initializeFileTypeIcons, DEFAULT_BASE_URL } from '../../utils/initializeFileTypeIcons'; +import { resetConfiguredBaseUrl } from '../../testing'; describe('FileTypeIcon', () => { isConformant({ @@ -76,6 +74,59 @@ describe('FileTypeIcon', () => { expect(img).toBeTruthy(); expect(img?.src).toContain('genericfile'); }); + + it('handles compound extensions like .tar.gz by using last extension', () => { + const result = render(); + const img = result.container.querySelector('img'); + expect(img).toBeTruthy(); + // gz maps to archive icon + expect(img?.src).toContain('archive'); + }); + + it('handles compound extensions like file.min.js', () => { + const result = render(); + const img = result.container.querySelector('img'); + expect(img).toBeTruthy(); + // js maps to code icon + expect(img?.src).toContain('code'); + }); +}); + +describe('FileTypeIcon size fallback', () => { + it('uses next smallest size when 30 is requested (falls back to 24)', () => { + const result = render(); + const img = result.container.querySelector('img'); + expect(img).toBeTruthy(); + expect(img?.src).toContain('/24/'); + }); + + it('uses next smallest size when 50 is requested (falls back to 48)', () => { + const result = render(); + const img = result.container.querySelector('img'); + expect(img).toBeTruthy(); + expect(img?.src).toContain('/48/'); + }); + + it('uses largest size (96) when size above maximum is requested', () => { + const result = render(); + const img = result.container.querySelector('img'); + expect(img).toBeTruthy(); + expect(img?.src).toContain('/96/'); + }); + + it('uses largest size (96) when size 128 is requested', () => { + const result = render(); + const img = result.container.querySelector('img'); + expect(img).toBeTruthy(); + expect(img?.src).toContain('/96/'); + }); + + it('uses smallest size (16) when size below minimum is requested', () => { + const result = render(); + const img = result.container.querySelector('img'); + expect(img).toBeTruthy(); + expect(img?.src).toContain('/16/'); + }); }); describe('FileTypeIcon with initializeFileTypeIcons', () => { diff --git a/packages/react-components/react-file-type-icons/library/src/components/FileTypeIcon/useFileTypeIcon.ts b/packages/react-components/react-file-type-icons/library/src/components/FileTypeIcon/useFileTypeIcon.ts index db9181477c03c6..316cbb0067075c 100644 --- a/packages/react-components/react-file-type-icons/library/src/components/FileTypeIcon/useFileTypeIcon.ts +++ b/packages/react-components/react-file-type-icons/library/src/components/FileTypeIcon/useFileTypeIcon.ts @@ -4,6 +4,7 @@ import type { FileTypeIconProps, FileTypeIconState } from './FileTypeIcon.types' import { getFileTypeIconNameFromExtensionOrType, getFileTypeIconSuffix, + getValidIconSize, DEFAULT_ICON_SIZE, } from '../../utils/getFileTypeIconProps'; import { FileIconType } from '../../utils/FileIconType'; @@ -16,7 +17,10 @@ export const useFileTypeIcon_unstable = ( props: FileTypeIconProps, ref: React.Ref, ): FileTypeIconState => { - const { extension, type, size = DEFAULT_ICON_SIZE, imageFileType = 'svg', baseUrl = getConfiguredBaseUrl() } = props; + const { extension, type, size: requestedSize = DEFAULT_ICON_SIZE, imageFileType = 'svg', baseUrl = getConfiguredBaseUrl() } = props; + + // Validate and adjust size to nearest available + const size = getValidIconSize(requestedSize); // Get the base icon name and suffix separately using v8 pattern const baseIconName = getFileTypeIconNameFromExtensionOrType(extension, type); diff --git a/packages/react-components/react-file-type-icons/library/src/index.ts b/packages/react-components/react-file-type-icons/library/src/index.ts index f8f5771663adc9..8c33d5996d47fd 100644 --- a/packages/react-components/react-file-type-icons/library/src/index.ts +++ b/packages/react-components/react-file-type-icons/library/src/index.ts @@ -15,14 +15,9 @@ export { getFileTypeIconProps, getFileTypeIconNameFromExtensionOrType, getFileTypeIconSuffix, + getValidIconSize, DEFAULT_ICON_SIZE, } from './utils/getFileTypeIconProps'; export type { FileTypeIconSize, ImageFileType, FileTypeIconOptions } from './utils/getFileTypeIconProps'; export { getFileTypeIconAsUrl, getFileTypeIconAsHTMLString } from './utils/getFileTypeIconAsUrl'; -export { - initializeFileTypeIcons, - getConfiguredBaseUrl, - resetConfiguredBaseUrl, - DEFAULT_BASE_URL, - ICON_SIZES, -} from './utils/initializeFileTypeIcons'; +export { initializeFileTypeIcons, DEFAULT_BASE_URL, ICON_SIZES } from './utils/initializeFileTypeIcons'; diff --git a/packages/react-components/react-file-type-icons/library/src/testing/index.ts b/packages/react-components/react-file-type-icons/library/src/testing/index.ts new file mode 100644 index 00000000000000..7ed58323b5b9a5 --- /dev/null +++ b/packages/react-components/react-file-type-icons/library/src/testing/index.ts @@ -0,0 +1,9 @@ +/** + * Testing utilities for @fluentui/react-file-type-icons + * + * These exports are intended for testing purposes only and should not be used in production code. + * They provide access to internal state management functions that allow tests to reset and verify + * the configured base URL state. + */ + +export { getConfiguredBaseUrl, resetConfiguredBaseUrl } from '../utils/initializeFileTypeIcons'; diff --git a/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconAsUrl.test.ts b/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconAsUrl.test.ts index f53ee55e9ca51c..b83ea3c4630d15 100644 --- a/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconAsUrl.test.ts +++ b/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconAsUrl.test.ts @@ -1,6 +1,6 @@ import { getFileTypeIconAsUrl, getFileTypeIconAsHTMLString } from './getFileTypeIconAsUrl'; import { DEFAULT_BASE_URL } from './initializeFileTypeIcons'; -import { getFileTypeIconNameFromExtensionOrType } from './getFileTypeIconProps'; +import { getFileTypeIconNameFromExtensionOrType, getValidIconSize } from './getFileTypeIconProps'; import { FileIconType } from './FileIconType'; describe('getFileTypeIconNameFromExtensionOrType', () => { @@ -70,6 +70,126 @@ describe('getFileTypeIconNameFromExtensionOrType', () => { }); }); }); + + describe('with compound extensions', () => { + it('should extract the last extension from .tar.gz', () => { + // .tar.gz should extract 'gz' and map to appropriate icon + const result = getFileTypeIconNameFromExtensionOrType('.tar.gz', undefined); + expect(result).toBe('archive'); // gz maps to archive icon + }); + + it('should extract the last extension from archive.tar.bz2', () => { + const result = getFileTypeIconNameFromExtensionOrType('archive.tar.bz2', undefined); + // bz2 is not a known extension, should fall back to genericfile + expect(result).toBe('genericfile'); + }); + + it('should extract the last extension from file.min.js', () => { + const result = getFileTypeIconNameFromExtensionOrType('file.min.js', undefined); + expect(result).toBe('code'); // js maps to code icon + }); + + it('should extract the last extension from styles.module.css', () => { + const result = getFileTypeIconNameFromExtensionOrType('styles.module.css', undefined); + expect(result).toBe('code'); // css maps to code icon + }); + + it('should handle simple extension with leading dot', () => { + const result = getFileTypeIconNameFromExtensionOrType('.docx', undefined); + expect(result).toBe('docx'); + }); + + it('should handle simple extension without leading dot', () => { + const result = getFileTypeIconNameFromExtensionOrType('pdf', undefined); + expect(result).toBe('pdf'); + }); + }); +}); + +describe('getValidIconSize', () => { + describe('with exact valid sizes', () => { + it('should return exact size when 16 is requested', () => { + expect(getValidIconSize(16)).toBe(16); + }); + + it('should return exact size when 20 is requested', () => { + expect(getValidIconSize(20)).toBe(20); + }); + + it('should return exact size when 24 is requested', () => { + expect(getValidIconSize(24)).toBe(24); + }); + + it('should return exact size when 32 is requested', () => { + expect(getValidIconSize(32)).toBe(32); + }); + + it('should return exact size when 40 is requested', () => { + expect(getValidIconSize(40)).toBe(40); + }); + + it('should return exact size when 48 is requested', () => { + expect(getValidIconSize(48)).toBe(48); + }); + + it('should return exact size when 64 is requested', () => { + expect(getValidIconSize(64)).toBe(64); + }); + + it('should return exact size when 96 is requested', () => { + expect(getValidIconSize(96)).toBe(96); + }); + }); + + describe('with sizes requiring fallback to smaller', () => { + it('should return 16 when 18 is requested (next smallest)', () => { + expect(getValidIconSize(18)).toBe(16); + }); + + it('should return 20 when 22 is requested (next smallest)', () => { + expect(getValidIconSize(22)).toBe(20); + }); + + it('should return 24 when 30 is requested (next smallest)', () => { + expect(getValidIconSize(30)).toBe(24); + }); + + it('should return 32 when 35 is requested (next smallest)', () => { + expect(getValidIconSize(35)).toBe(32); + }); + + it('should return 64 when 80 is requested (next smallest)', () => { + expect(getValidIconSize(80)).toBe(64); + }); + }); + + describe('with sizes larger than maximum', () => { + it('should return 96 when 100 is requested', () => { + expect(getValidIconSize(100)).toBe(96); + }); + + it('should return 96 when 128 is requested', () => { + expect(getValidIconSize(128)).toBe(96); + }); + + it('should return 96 when 256 is requested', () => { + expect(getValidIconSize(256)).toBe(96); + }); + }); + + describe('with sizes smaller than minimum', () => { + it('should return 16 when 10 is requested', () => { + expect(getValidIconSize(10)).toBe(16); + }); + + it('should return 16 when 8 is requested', () => { + expect(getValidIconSize(8)).toBe(16); + }); + + it('should return 16 when 1 is requested', () => { + expect(getValidIconSize(1)).toBe(16); + }); + }); }); describe('getFileTypeIconAsUrl', () => { diff --git a/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconProps.ts b/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconProps.ts index 780fe314408d7e..4e5545ff7839a7 100644 --- a/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconProps.ts +++ b/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconProps.ts @@ -1,5 +1,6 @@ import { FileTypeIconMap } from './FileTypeIconMap'; import { FileIconType } from './FileIconType'; +import { ICON_SIZES } from './initializeFileTypeIcons'; let _extensionToIconName: { [key: string]: string }; let _typeToIconName: { [key: number]: string }; @@ -35,6 +36,45 @@ export interface FileTypeIconOptions { imageFileType?: ImageFileType; } +/** + * Gets the nearest valid icon size. If the requested size is not available, + * returns the next smallest available size. If the requested size is larger + * than all available sizes, returns the largest available size (96). + * If the requested size is smaller than all available sizes, returns the smallest (16). + * + * @param size - The requested icon size + * @returns The nearest valid icon size from ICON_SIZES + */ +export function getValidIconSize(size: number): FileTypeIconSize { + // ICON_SIZES is already sorted: [16, 20, 24, 32, 40, 48, 64, 96] + const sortedSizes = ICON_SIZES as FileTypeIconSize[]; + + // If exact match exists, return it + if (sortedSizes.includes(size as FileTypeIconSize)) { + return size as FileTypeIconSize; + } + + // If size is larger than the largest available, return the largest + if (size > sortedSizes[sortedSizes.length - 1]) { + return sortedSizes[sortedSizes.length - 1]; + } + + // If size is smaller than the smallest available, return the smallest + if (size < sortedSizes[0]) { + return sortedSizes[0]; + } + + // Find the next smallest available size + for (let i = sortedSizes.length - 1; i >= 0; i--) { + if (sortedSizes[i] <= size) { + return sortedSizes[i]; + } + } + + // Fallback to default (should never reach here) + return DEFAULT_ICON_SIZE; +} + /** * This function returns properties for a file type icon given the FileTypeIconOptions. * It accounts for different device pixel ratios. For example, @@ -83,8 +123,10 @@ export function getFileTypeIconNameFromExtensionOrType( } } - // Strip periods, force lowercase. - extension = extension.replace('.', '').toLowerCase(); + // Extract only the last extension (handles compound extensions like .tar.gz -> gz) + // and force lowercase + const lastDotIndex = extension.lastIndexOf('.'); + extension = (lastDotIndex >= 0 ? extension.substring(lastDotIndex + 1) : extension).toLowerCase(); return _extensionToIconName[extension] || GENERIC_FILE; } else if (type) { if (!_typeToIconName) { @@ -111,16 +153,20 @@ export function getFileTypeIconNameFromExtensionOrType( /** * Gets the suffix for the icon name based on size, file type, and device pixel ratio. - * @param size - The icon size in pixels + * If the requested size is not available, it will be adjusted to the nearest valid size. + * @param size - The icon size in pixels (will be validated against available sizes) * @param imageFileType - The image file type ('svg' or 'png') * @param win - Optional window object for testing * @returns The icon name suffix */ export function getFileTypeIconSuffix( - size: FileTypeIconSize, + size: FileTypeIconSize | number, imageFileType: ImageFileType = 'svg', win?: Window, ): string { + // Validate and adjust size to nearest available + const validSize = getValidIconSize(size); + // eslint-disable-next-line @nx/workspace-no-restricted-globals win ??= typeof window !== 'undefined' ? window : ({ devicePixelRatio: 1 } as Window); const devicePixelRatio: number = win.devicePixelRatio; @@ -143,5 +189,5 @@ export function getFileTypeIconSuffix( } } - return size + devicePixelRatioSuffix + '_' + imageFileType; + return validSize + devicePixelRatioSuffix + '_' + imageFileType; } diff --git a/packages/react-components/react-file-type-icons/library/src/utils/initializeFileTypeIcons.test.ts b/packages/react-components/react-file-type-icons/library/src/utils/initializeFileTypeIcons.test.ts index f55ba145473f67..c94feed6a513ac 100644 --- a/packages/react-components/react-file-type-icons/library/src/utils/initializeFileTypeIcons.test.ts +++ b/packages/react-components/react-file-type-icons/library/src/utils/initializeFileTypeIcons.test.ts @@ -1,9 +1,5 @@ -import { - initializeFileTypeIcons, - getConfiguredBaseUrl, - resetConfiguredBaseUrl, - DEFAULT_BASE_URL, -} from './initializeFileTypeIcons'; +import { initializeFileTypeIcons, DEFAULT_BASE_URL } from './initializeFileTypeIcons'; +import { getConfiguredBaseUrl, resetConfiguredBaseUrl } from '../testing'; import { getFileTypeIconAsUrl, getFileTypeIconAsHTMLString } from './getFileTypeIconAsUrl'; describe('initializeFileTypeIcons', () => { From 9af6811a5c43158a0ef0144af2931c11d801be06 Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Tue, 25 Nov 2025 10:05:16 -0800 Subject: [PATCH 037/120] cleanup stray API file --- .../etc/file-type-icons-preview.api.md | 152 ------------------ 1 file changed, 152 deletions(-) delete mode 100644 packages/react-components/react-file-type-icons/library/etc/file-type-icons-preview.api.md diff --git a/packages/react-components/react-file-type-icons/library/etc/file-type-icons-preview.api.md b/packages/react-components/react-file-type-icons/library/etc/file-type-icons-preview.api.md deleted file mode 100644 index 33f598e1176e29..00000000000000 --- a/packages/react-components/react-file-type-icons/library/etc/file-type-icons-preview.api.md +++ /dev/null @@ -1,152 +0,0 @@ -## API Report File for "@fluentui/react-file-type-icons" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts - -import type { ComponentProps } from '@fluentui/react-utilities'; -import type { ComponentState } from '@fluentui/react-utilities'; -import type { ForwardRefComponent } from '@fluentui/react-utilities'; -import type { IIconOptions } from '@fluentui/style-utilities'; -import type { JSXElement } from '@fluentui/react-utilities'; -import * as React_2 from 'react'; -import type { Slot } from '@fluentui/react-utilities'; -import type { SlotClassNames } from '@fluentui/react-utilities'; - -// @public (undocumented) -export const DEFAULT_BASE_URL = "https://res.cdn.office.net/files/fabric-cdn-prod_20251107.003/assets/item-types/"; - -// @public (undocumented) -export const DEFAULT_ICON_SIZE: FileTypeIconSize; - -// @public -export enum FileIconType { - // (undocumented) - album = 21,// Start at 1 so it will evaluate as "truthy" - // (undocumented) - desktopFolder = 9, - // (undocumented) - docset = 1, - // (undocumented) - documentsFolder = 10, - // (undocumented) - folder = 2, - // (undocumented) - form = 14, - // (undocumented) - genericFile = 3, - // (undocumented) - linkedFolder = 12, - // (undocumented) - list = 13, - // (undocumented) - listForm = 22, - // (undocumented) - listItem = 4, - // (undocumented) - loopworkspace = 17, - // (undocumented) - multiple = 6, - // (undocumented) - news = 8, - // (undocumented) - picturesFolder = 11, - // (undocumented) - planner = 18, - // (undocumented) - playlist = 16, - // (undocumented) - portfolio = 20, - // (undocumented) - sharedFolder = 5, - // (undocumented) - stream = 7, - // (undocumented) - sway = 15, - // (undocumented) - todoItem = 19 -} - -// @public -export const FileTypeIcon: ForwardRefComponent; - -// @public (undocumented) -export const fileTypeIconClassNames: SlotClassNames; - -// @public -export const FileTypeIconMap: { - [key: string]: { - extensions?: string[]; - types?: FileIconType[]; - }; -}; - -// @public (undocumented) -export interface FileTypeIconOptions { - extension?: string; - imageFileType?: ImageFileType; - size?: FileTypeIconSize; - type?: FileIconType; -} - -// @public (undocumented) -export type FileTypeIconProps = ComponentProps & { - extension?: string; - type?: FileIconType; - size?: FileTypeIconSize; - imageFileType?: ImageFileType; - baseUrl?: string; -}; - -// @public (undocumented) -export type FileTypeIconSize = 16 | 20 | 24 | 32 | 40 | 48 | 64 | 96; - -// @public (undocumented) -export type FileTypeIconSlots = { - root: Slot<'img'>; -}; - -// @public (undocumented) -export type FileTypeIconState = ComponentState & Required> & { - iconUrl: string; -}; - -// @public -export function getFileTypeIconAsHTMLString(options: FileTypeIconOptions, baseUrl?: string): string | undefined; - -// @public -export function getFileTypeIconAsUrl(options: FileTypeIconOptions, baseUrl?: string): string | undefined; - -// @public -export function getFileTypeIconNameFromExtensionOrType(extension: string | undefined, type: FileIconType | undefined): string; - -// @public -export function getFileTypeIconProps(options: FileTypeIconOptions): { - iconName: string; - 'aria-label'?: string; -}; - -// @public -export function getFileTypeIconSuffix(size: FileTypeIconSize, imageFileType?: ImageFileType, win?: Window): string; - -// @public (undocumented) -export const ICON_SIZES: number[]; - -// @public (undocumented) -export type ImageFileType = 'svg' | 'png'; - -// @public (undocumented) -export function initializeFileTypeIcons(baseUrl?: string, options?: Partial): void; - -// @public -export const renderFileTypeIcon_unstable: (state: FileTypeIconState) => JSXElement; - -// @public -export const useFileTypeIcon_unstable: (props: FileTypeIconProps, ref: React_2.Ref) => FileTypeIconState; - -// @public -export const useFileTypeIconStyles_unstable: (state: FileTypeIconState) => FileTypeIconState; - -// (No @packageDocumentation comment for this package) - -``` From df430ed9d298633cde1baa1031d61198e671e154 Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Tue, 25 Nov 2025 11:01:38 -0800 Subject: [PATCH 038/120] changing v8 package name and adding publishConfig so it emits to the same npm --- apps/public-docsite/package.json | 2 +- .../pages/Styles/FileTypeIconsPage/FileTypeIconsPage.tsx | 2 +- apps/public-docsite/src/root.tsx | 2 +- .../library/etc/react-file-type-icons.api.md | 5 ++++- packages/react-examples/package.json | 2 +- .../FileTypeIcon/FileTypeIcon.Basic.Example.tsx | 2 +- .../react-examples/src/react-experiments/demo/index.tsx | 2 +- packages/react-file-type-icons/package.json | 7 +++++-- tsconfig.base.v8.json | 2 +- 9 files changed, 16 insertions(+), 10 deletions(-) diff --git a/apps/public-docsite/package.json b/apps/public-docsite/package.json index 84a013c8e8fac3..776e69559c7e75 100644 --- a/apps/public-docsite/package.json +++ b/apps/public-docsite/package.json @@ -39,7 +39,7 @@ "@fluentui/react-examples": "*", "@fluentui/react-experiments": "*", "@fluentui/fluent2-theme": "*", - "@fluentui/react-file-type-icons": "*", + "@fluentui/react-file-type-icons-v8": "*", "@fluentui/react-icons-mdl2": "*", "@fluentui/react-icons-mdl2-branded": "*", "@fluentui/set-version": "*", diff --git a/apps/public-docsite/src/pages/Styles/FileTypeIconsPage/FileTypeIconsPage.tsx b/apps/public-docsite/src/pages/Styles/FileTypeIconsPage/FileTypeIconsPage.tsx index 0036be34cb055e..e120a777e78212 100644 --- a/apps/public-docsite/src/pages/Styles/FileTypeIconsPage/FileTypeIconsPage.tsx +++ b/apps/public-docsite/src/pages/Styles/FileTypeIconsPage/FileTypeIconsPage.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import { Icon, Link } from '@fluentui/react'; -import { getFileTypeIconProps } from '@fluentui/react-file-type-icons'; +import { getFileTypeIconProps } from '@fluentui/react-file-type-icons-v8'; import { Markdown, MarkdownHeader, IPageSectionProps } from '@fluentui/react-docsite-components/lib/index2'; import { IStylesPageProps, StylesAreaPage } from '../StylesAreaPage'; import { FileTypeIconsPageProps } from './FileTypeIconsPage.doc'; diff --git a/apps/public-docsite/src/root.tsx b/apps/public-docsite/src/root.tsx index 8cd4d118a27760..4373ad99366451 100644 --- a/apps/public-docsite/src/root.tsx +++ b/apps/public-docsite/src/root.tsx @@ -1,5 +1,5 @@ import { registerIcons, on, KeyCodes, setRTL } from '@fluentui/react'; -import { initializeFileTypeIcons } from '@fluentui/react-file-type-icons'; +import { initializeFileTypeIcons } from '@fluentui/react-file-type-icons-v8'; import { createSite } from './utilities/createSite'; import * as platformPickerStyles from '@fluentui/react-docsite-components/lib/components/PlatformPicker/PlatformPicker.module.scss'; import { SiteDefinition } from './SiteDefinition/index'; diff --git a/packages/react-components/react-file-type-icons/library/etc/react-file-type-icons.api.md b/packages/react-components/react-file-type-icons/library/etc/react-file-type-icons.api.md index 33f598e1176e29..ba285fb0bb30a4 100644 --- a/packages/react-components/react-file-type-icons/library/etc/react-file-type-icons.api.md +++ b/packages/react-components/react-file-type-icons/library/etc/react-file-type-icons.api.md @@ -127,7 +127,10 @@ export function getFileTypeIconProps(options: FileTypeIconOptions): { }; // @public -export function getFileTypeIconSuffix(size: FileTypeIconSize, imageFileType?: ImageFileType, win?: Window): string; +export function getFileTypeIconSuffix(size: FileTypeIconSize | number, imageFileType?: ImageFileType, win?: Window): string; + +// @public +export function getValidIconSize(size: number): FileTypeIconSize; // @public (undocumented) export const ICON_SIZES: number[]; diff --git a/packages/react-examples/package.json b/packages/react-examples/package.json index 5bfd0be85071cc..2a7bf32375ef6e 100644 --- a/packages/react-examples/package.json +++ b/packages/react-examples/package.json @@ -36,7 +36,7 @@ "@fluentui/react-charting": "^5.25.2", "@fluentui/react-docsite-components": "^8.15.0", "@fluentui/react-experiments": "^8.16.1", - "@fluentui/react-file-type-icons": "^8.15.1", + "@fluentui/react-file-type-icons-v8": "^8.15.1", "@fluentui/react-focus": "^8.10.1", "@fluentui/react-hooks": "^8.10.1", "@fluentui/react-icons-mdl2": "^1.4.1", diff --git a/packages/react-examples/src/react-experiments/FileTypeIcon/FileTypeIcon.Basic.Example.tsx b/packages/react-examples/src/react-experiments/FileTypeIcon/FileTypeIcon.Basic.Example.tsx index a28997259c3962..b6effbf51a4ce6 100644 --- a/packages/react-examples/src/react-experiments/FileTypeIcon/FileTypeIcon.Basic.Example.tsx +++ b/packages/react-examples/src/react-experiments/FileTypeIcon/FileTypeIcon.Basic.Example.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import { Icon } from '@fluentui/react/lib/Icon'; -import { getFileTypeIconProps, FileIconType, initializeFileTypeIcons } from '@fluentui/react-file-type-icons'; +import { getFileTypeIconProps, FileIconType, initializeFileTypeIcons } from '@fluentui/react-file-type-icons-v8'; import type { JSXElement } from '@fluentui/utilities'; initializeFileTypeIcons(undefined); diff --git a/packages/react-examples/src/react-experiments/demo/index.tsx b/packages/react-examples/src/react-experiments/demo/index.tsx index 6470f6821f687d..f70c2b123f3548 100644 --- a/packages/react-examples/src/react-experiments/demo/index.tsx +++ b/packages/react-examples/src/react-experiments/demo/index.tsx @@ -1,7 +1,7 @@ import { createDemoApp } from '@fluentui/react-docsite-components'; import { AppDefinition } from './AppDefinition'; import { GettingStartedPage } from './GettingStartedPage'; -import { initializeFileTypeIcons } from '@fluentui/react-file-type-icons'; +import { initializeFileTypeIcons } from '@fluentui/react-file-type-icons-v8'; import { initializeFolderCovers } from '@fluentui/react-experiments'; initializeFileTypeIcons(); diff --git a/packages/react-file-type-icons/package.json b/packages/react-file-type-icons/package.json index 0e925c0894507c..ca5cda82661fdb 100644 --- a/packages/react-file-type-icons/package.json +++ b/packages/react-file-type-icons/package.json @@ -1,7 +1,7 @@ { - "name": "@fluentui/react-file-type-icons", + "name": "@fluentui/react-file-type-icons-v8", "version": "8.15.1", - "description": "Fluent UI React file type icon set.", + "description": "Fluent UI React file type icon set for FluentUI v8", "main": "lib-commonjs/index.js", "module": "lib/index.js", "sideEffects": [ @@ -13,6 +13,9 @@ "url": "https://github.com/microsoft/fluentui" }, "license": "MIT", + "publishConfig": { + "name": "@fluentui/react-file-type-icons" + }, "scripts": { "build": "just-scripts build", "clean": "just-scripts clean" diff --git a/tsconfig.base.v8.json b/tsconfig.base.v8.json index 16cf17379d5982..87e00e6671e86f 100644 --- a/tsconfig.base.v8.json +++ b/tsconfig.base.v8.json @@ -27,7 +27,7 @@ "@fluentui/react-date-time": ["packages/react-date-time/src/index.ts"], "@fluentui/react-experiments": ["packages/react-experiments/src/index.ts"], "@fluentui/react-experiments/lib/*": ["packages/react-experiments/src/*"], - "@fluentui/react-file-type-icons": ["packages/react-file-type-icons/src/index.ts"], + "@fluentui/react-file-type-icons-v8": ["packages/react-file-type-icons/src/index.ts"], "@fluentui/react-focus": ["packages/react-focus/src/index.ts"], "@fluentui/react-hooks": ["packages/react-hooks/src/index.ts"], "@fluentui/scheme-utilities": ["packages/scheme-utilities/src/index.ts"], From 02048244fa52875a24d8da3aaaa345d51f072ae0 Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Tue, 25 Nov 2025 11:23:25 -0800 Subject: [PATCH 039/120] updating swc packages and lint tweaks --- package.json | 7 +- yarn.lock | 334 ++++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 270 insertions(+), 71 deletions(-) diff --git a/package.json b/package.json index 9b582500103a8a..8b22087fbb8144 100644 --- a/package.json +++ b/package.json @@ -38,8 +38,8 @@ "@babel/plugin-proposal-class-properties": "7.18.6", "@babel/plugin-proposal-decorators": "7.24.6", "@babel/plugin-proposal-nullish-coalescing-operator": "7.18.6", - "@babel/plugin-proposal-optional-chaining": "7.21.0", "@babel/plugin-proposal-object-rest-spread": "7.20.7", + "@babel/plugin-proposal-optional-chaining": "7.21.0", "@babel/plugin-syntax-dynamic-import": "7.8.3", "@babel/plugin-syntax-object-rest-spread": "7.8.3", "@babel/plugin-transform-runtime": "7.24.6", @@ -106,7 +106,7 @@ "@storybook/react-webpack5": "8.6.14", "@storybook/theming": "8.6.14", "@swc/cli": "0.7.7", - "@swc/core": "1.11.24", + "@swc/core": "1.15.3", "@swc/helpers": "0.5.1", "@swc/jest": "0.2.38", "@testing-library/dom": "10.4.0", @@ -166,8 +166,8 @@ "@types/webpack-hot-middleware": "2.25.9", "@types/yargs": "13.0.11", "@types/yargs-unparser": "2.0.1", - "@typescript-eslint/rule-tester": "8.46.2", "@typescript-eslint/eslint-plugin": "^8.46.2", + "@typescript-eslint/rule-tester": "8.46.2", "autoprefixer": "10.2.1", "babel-jest": "29.7.0", "babel-loader": "9.1.3", @@ -338,6 +338,7 @@ "dependencies": { "@fluentui/react-icons-northstar": "0.66.5", "@fluentui/react-northstar": "0.66.5", + "@swc-node/register": "1.11.1", "copy-to-clipboard": "3.3.1" }, "license": "MIT", diff --git a/yarn.lock b/yarn.lock index dc554e366e92ec..1afa02e48e7ed6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1589,6 +1589,14 @@ "@emnapi/wasi-threads" "1.0.1" tslib "^2.4.0" +"@emnapi/core@^1.5.0": + version "1.7.1" + resolved "https://registry.yarnpkg.com/@emnapi/core/-/core-1.7.1.tgz#3a79a02dbc84f45884a1806ebb98e5746bdfaac4" + integrity sha512-o1uhUASyo921r2XtHYOHy7gdkGLge8ghBEQHMWmyJFoXlpU58kIrhhN3w26lpQb6dspetweapMn2CSNwQ8I4wg== + dependencies: + "@emnapi/wasi-threads" "1.1.0" + tslib "^2.4.0" + "@emnapi/runtime@^1.1.0": version "1.4.0" resolved "https://registry.yarnpkg.com/@emnapi/runtime/-/runtime-1.4.0.tgz#8f509bf1059a5551c8fe829a1c4e91db35fdfbee" @@ -1596,6 +1604,13 @@ dependencies: tslib "^2.4.0" +"@emnapi/runtime@^1.5.0": + version "1.7.1" + resolved "https://registry.yarnpkg.com/@emnapi/runtime/-/runtime-1.7.1.tgz#a73784e23f5d57287369c808197288b52276b791" + integrity sha512-PVtJr5CmLwYAU9PZDMITZoR5iAOShYREoR45EyyLrbntV50mdePTgUn4AmOw90Ifcj+x2kRjdzr1HP3RrNiHGA== + dependencies: + tslib "^2.4.0" + "@emnapi/wasi-threads@1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@emnapi/wasi-threads/-/wasi-threads-1.0.1.tgz#d7ae71fd2166b1c916c6cd2d0df2ef565a2e1a5b" @@ -1603,6 +1618,13 @@ dependencies: tslib "^2.4.0" +"@emnapi/wasi-threads@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@emnapi/wasi-threads/-/wasi-threads-1.1.0.tgz#60b2102fddc9ccb78607e4a3cf8403ea69be41bf" + integrity sha512-WI0DdZ8xFSbgMjR1sFsKABJ/C5OnRrjT06JXbZKexJGrDuPTzZdDYfFlsgcCXCyf+suG5QU2e/y1Wo2V/OapLQ== + dependencies: + tslib "^2.4.0" + "@emotion/hash@^0.8.0": version "0.8.0" resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.8.0.tgz#bbbff68978fefdbe68ccb533bc8cbe1d1afb5413" @@ -2828,6 +2850,15 @@ "@emnapi/runtime" "^1.1.0" "@tybys/wasm-util" "^0.9.0" +"@napi-rs/wasm-runtime@^1.0.7": + version "1.0.7" + resolved "https://registry.yarnpkg.com/@napi-rs/wasm-runtime/-/wasm-runtime-1.0.7.tgz#dcfea99a75f06209a235f3d941e3460a51e9b14c" + integrity sha512-SeDnOO0Tk7Okiq6DbXmmBODgOAb9dp9gjlphokTUxmt8U3liIP1ZsozBahH69j/RJv+Rfs6IwUKHTgQYJ/HBAw== + dependencies: + "@emnapi/core" "^1.5.0" + "@emnapi/runtime" "^1.5.0" + "@tybys/wasm-util" "^0.10.1" + "@nevware21/ts-async@>= 0.5.2 < 2.x": version "0.5.2" resolved "https://registry.yarnpkg.com/@nevware21/ts-async/-/ts-async-0.5.2.tgz#a41883dc6ccc4666bdf156e92f35f3003fd3f6f0" @@ -3160,6 +3191,103 @@ css-tree "^3.0.0" nanoid "^5.0.8" +"@oxc-resolver/binding-android-arm-eabi@11.14.0": + version "11.14.0" + resolved "https://registry.yarnpkg.com/@oxc-resolver/binding-android-arm-eabi/-/binding-android-arm-eabi-11.14.0.tgz#98a6b41316d9283c89dac4261ef2b3d3458943ec" + integrity sha512-jB47iZ/thvhE+USCLv+XY3IknBbkKr/p7OBsQDTHode/GPw+OHRlit3NQ1bjt1Mj8V2CS7iHdSDYobZ1/0gagQ== + +"@oxc-resolver/binding-android-arm64@11.14.0": + version "11.14.0" + resolved "https://registry.yarnpkg.com/@oxc-resolver/binding-android-arm64/-/binding-android-arm64-11.14.0.tgz#1a2f24785dc4b8f86eebe5873f0fcd8ba850fd54" + integrity sha512-XFJ9t7d/Cz+dWLyqtTy3Xrekz+qqN4hmOU2iOUgr7u71OQsPUHIIeS9/wKanEK0l413gPwapIkyc5x9ltlOtyw== + +"@oxc-resolver/binding-darwin-arm64@11.14.0": + version "11.14.0" + resolved "https://registry.yarnpkg.com/@oxc-resolver/binding-darwin-arm64/-/binding-darwin-arm64-11.14.0.tgz#67cb9b66b060e9a29f6c8d9549669fa061ff6006" + integrity sha512-gwehBS9smA1mzK8frDsmUCHz+6baJVwkKF6qViHhoqA3kRKvIZ3k6WNP4JmF19JhOiGxRcoPa8gZRfzNgXwP2A== + +"@oxc-resolver/binding-darwin-x64@11.14.0": + version "11.14.0" + resolved "https://registry.yarnpkg.com/@oxc-resolver/binding-darwin-x64/-/binding-darwin-x64-11.14.0.tgz#b7ab6433a6babc8df133497edd847894d3b10061" + integrity sha512-5wwJvfuoahKiAqqAsMLOI28rqdh3P2K7HkjIWUXNMWAZq6ErX0L5rwJzu6T32+Zxw3k18C7R9IS4wDq/3Ar+6w== + +"@oxc-resolver/binding-freebsd-x64@11.14.0": + version "11.14.0" + resolved "https://registry.yarnpkg.com/@oxc-resolver/binding-freebsd-x64/-/binding-freebsd-x64-11.14.0.tgz#a7910fc9ad69c12ba227a57580b2053cffc623f0" + integrity sha512-MWTt+LOQNcQ6fa+Uu5VikkihLi1PSIrQqqp0QD44k2AORasNWl0jRGBTcMSBIgNe82qEQWYvlGzvOEEOBp01Og== + +"@oxc-resolver/binding-linux-arm-gnueabihf@11.14.0": + version "11.14.0" + resolved "https://registry.yarnpkg.com/@oxc-resolver/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-11.14.0.tgz#c06d530315f4df3151f44ee3d10488a426fee359" + integrity sha512-b6/IBqYrS3o0XiLVBsnex/wK8pTTK+hbGfAMOHVU6p7DBpwPPLgC/tav4IXoOIUCssTFz7aWh/xtUok0swn8VQ== + +"@oxc-resolver/binding-linux-arm-musleabihf@11.14.0": + version "11.14.0" + resolved "https://registry.yarnpkg.com/@oxc-resolver/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-11.14.0.tgz#50be40fb4a4cdbbb600198bfc9a1f3a6f4233d16" + integrity sha512-o2Qh5+y5YoqVK6YfzkalHdpmQ5bkbGGxuLg1pZLQ1Ift0x+Vix7DaFEpdCl5Z9xvYXogd/TwOlL0TPl4+MTFLA== + +"@oxc-resolver/binding-linux-arm64-gnu@11.14.0": + version "11.14.0" + resolved "https://registry.yarnpkg.com/@oxc-resolver/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-11.14.0.tgz#62fc245a4e83bd2d932de5865cdea3240cf08097" + integrity sha512-lk8mCSg0Tg4sEG73RiPjb7keGcEPwqQnBHX3Z+BR2SWe+qNHpoHcyFMNafzSvEC18vlxC04AUSoa6kJl/C5zig== + +"@oxc-resolver/binding-linux-arm64-musl@11.14.0": + version "11.14.0" + resolved "https://registry.yarnpkg.com/@oxc-resolver/binding-linux-arm64-musl/-/binding-linux-arm64-musl-11.14.0.tgz#c90bfd0dde8466f982fed7e9332b39c60ffbe682" + integrity sha512-KykeIVhCM7pn93ABa0fNe8vk4XvnbfZMELne2s6P9tdJH9KMBsCFBi7a2BmSdUtTqWCAJokAcm46lpczU52Xaw== + +"@oxc-resolver/binding-linux-ppc64-gnu@11.14.0": + version "11.14.0" + resolved "https://registry.yarnpkg.com/@oxc-resolver/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-11.14.0.tgz#a9fc775ec2db68761df8437ec11b015c46741b34" + integrity sha512-QqPPWAcZU/jHAuam4f3zV8OdEkYRPD2XR0peVet3hoMMgsihR3Lhe7J/bLclmod297FG0+OgBYQVMh2nTN6oWA== + +"@oxc-resolver/binding-linux-riscv64-gnu@11.14.0": + version "11.14.0" + resolved "https://registry.yarnpkg.com/@oxc-resolver/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-11.14.0.tgz#8002c80ba035e26d476fbad50e0b149b9a16079c" + integrity sha512-DunWA+wafeG3hj1NADUD3c+DRvmyVNqF5LSHVUWA2bzswqmuEZXl3VYBSzxfD0j+UnRTFYLxf27AMptoMsepYg== + +"@oxc-resolver/binding-linux-riscv64-musl@11.14.0": + version "11.14.0" + resolved "https://registry.yarnpkg.com/@oxc-resolver/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-11.14.0.tgz#6a3c20f55295626572be80de82b4b4a927d5b073" + integrity sha512-4SRvwKTTk2k67EQr9Ny4NGf/BhlwggCI1CXwBbA9IV4oP38DH8b+NAPxDY0ySGRsWbPkG92FYOqM4AWzG4GSgA== + +"@oxc-resolver/binding-linux-s390x-gnu@11.14.0": + version "11.14.0" + resolved "https://registry.yarnpkg.com/@oxc-resolver/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-11.14.0.tgz#c8031033466a64206ce59bbc771c43c135843495" + integrity sha512-hZKvkbsurj4JOom//R1Ab2MlC4cGeVm5zzMt4IsS3XySQeYjyMJ5TDZ3J5rQ8bVj3xi4FpJU2yFZ72GApsHQ6A== + +"@oxc-resolver/binding-linux-x64-gnu@11.14.0": + version "11.14.0" + resolved "https://registry.yarnpkg.com/@oxc-resolver/binding-linux-x64-gnu/-/binding-linux-x64-gnu-11.14.0.tgz#7ef94d565dd4be964df1b80e34b515339652f358" + integrity sha512-hABxQXFXJurivw+0amFdeEcK67cF1BGBIN1+sSHzq3TRv4RoG8n5q2JE04Le2n2Kpt6xg4Y5+lcv+rb2mCJLgQ== + +"@oxc-resolver/binding-linux-x64-musl@11.14.0": + version "11.14.0" + resolved "https://registry.yarnpkg.com/@oxc-resolver/binding-linux-x64-musl/-/binding-linux-x64-musl-11.14.0.tgz#2d4226bc06ad336f4854dfd3709f566c02683da6" + integrity sha512-Ln73wUB5migZRvC7obAAdqVwvFvk7AUs2JLt4g9QHr8FnqivlsjpUC9Nf2ssrybdjyQzEMjttUxPZz6aKPSAHw== + +"@oxc-resolver/binding-wasm32-wasi@11.14.0": + version "11.14.0" + resolved "https://registry.yarnpkg.com/@oxc-resolver/binding-wasm32-wasi/-/binding-wasm32-wasi-11.14.0.tgz#c8a048253fa58e239b69f89734d954a631434a9e" + integrity sha512-z+NbELmCOKNtWOqEB5qDfHXOSWB3kGQIIehq6nHtZwHLzdVO2oBq6De/ayhY3ygriC1XhgaIzzniY7jgrNl4Kw== + dependencies: + "@napi-rs/wasm-runtime" "^1.0.7" + +"@oxc-resolver/binding-win32-arm64-msvc@11.14.0": + version "11.14.0" + resolved "https://registry.yarnpkg.com/@oxc-resolver/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-11.14.0.tgz#b0cdf4f7ad4a58995b6b538c844b5b9a2efb7edb" + integrity sha512-Ft0+qd7HSO61qCTLJ4LCdBGZkpKyDj1rG0OVSZL1DxWQoh97m7vEHd7zAvUtw8EcWjOMBQuX4mfRap/x2MOCpQ== + +"@oxc-resolver/binding-win32-ia32-msvc@11.14.0": + version "11.14.0" + resolved "https://registry.yarnpkg.com/@oxc-resolver/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-11.14.0.tgz#616a641967db9fcacebdc06443fad29dcda70a42" + integrity sha512-o54jYNSfGdPxHSvXEhZg8FOV3K99mJ1f7hb1alRFb+Yec1GQXNrJXxZPIxNMYeFT13kwAWB7zuQ0HZLnDHFxfw== + +"@oxc-resolver/binding-win32-x64-msvc@11.14.0": + version "11.14.0" + resolved "https://registry.yarnpkg.com/@oxc-resolver/binding-win32-x64-msvc/-/binding-win32-x64-msvc-11.14.0.tgz#53e9a5257332da71cce15f09e42e3b1927156370" + integrity sha512-j97icaORyM6A7GjgmUzfn7V+KGzVvctRA+eAlJb0c2OQNaETFxl6BXZdnGBDb+6oA0Y4Sr/wnekd1kQ0aVyKGg== + "@phenomnomnominal/tsquery@6.1.3", "@phenomnomnominal/tsquery@~5.0.1": version "6.1.3" resolved "https://registry.yarnpkg.com/@phenomnomnominal/tsquery/-/tsquery-6.1.3.tgz#5e819403da2fa6a64b009f1876278fb105ec6b55" @@ -3942,6 +4070,32 @@ "@types/express" "^4.7.0" file-system-cache "2.3.0" +"@swc-node/core@^1.14.1": + version "1.14.1" + resolved "https://registry.yarnpkg.com/@swc-node/core/-/core-1.14.1.tgz#b3f85f9ac055faee1a3454a0cf71bb953c814f1a" + integrity sha512-jrt5GUaZUU6cmMS+WTJEvGvaB6j1YNKPHPzC2PUi2BjaFbtxURHj6641Az6xN7b665hNniAIdvjxWcRml5yCnw== + +"@swc-node/register@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@swc-node/register/-/register-1.11.1.tgz#bc353f9df7d9c6f0e7f067fe2b3a7552fd667698" + integrity sha512-VQ0hJ5jX31TVv/fhZx4xJRzd8pwn6VvzYd2tGOHHr2TfXGCBixZoqdPDXTiEoJLCTS2MmvBf6zyQZZ0M8aGQCQ== + dependencies: + "@swc-node/core" "^1.14.1" + "@swc-node/sourcemap-support" "^0.6.1" + colorette "^2.0.20" + debug "^4.4.1" + oxc-resolver "^11.6.1" + pirates "^4.0.7" + tslib "^2.8.1" + +"@swc-node/sourcemap-support@^0.6.1": + version "0.6.1" + resolved "https://registry.yarnpkg.com/@swc-node/sourcemap-support/-/sourcemap-support-0.6.1.tgz#579bd0cfebc9cea51dd0de7c59c47ecd07b9e505" + integrity sha512-ovltDVH5QpdHXZkW138vG4+dgcNsxfwxHVoV6BtmTbz2KKl1A8ZSlbdtxzzfNjCjbpayda8Us9eMtcHobm38dA== + dependencies: + source-map-support "^0.5.21" + tslib "^2.8.1" + "@swc/cli@0.7.7": version "0.7.7" resolved "https://registry.yarnpkg.com/@swc/cli/-/cli-0.7.7.tgz#b367daba7db5a25fdcdbefe6a80f4c49c300d5fc" @@ -3957,74 +4111,74 @@ slash "3.0.0" source-map "^0.7.3" -"@swc/core-darwin-arm64@1.11.24": - version "1.11.24" - resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.11.24.tgz#c9fcc9c4bad0511fed26210449556d2b33fb2d9a" - integrity sha512-dhtVj0PC1APOF4fl5qT2neGjRLgHAAYfiVP8poJelhzhB/318bO+QCFWAiimcDoyMgpCXOhTp757gnoJJrheWA== - -"@swc/core-darwin-x64@1.11.24": - version "1.11.24" - resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.11.24.tgz#048ea3ee43281264a62fccb5a944b76d1c56eb24" - integrity sha512-H/3cPs8uxcj2Fe3SoLlofN5JG6Ny5bl8DuZ6Yc2wr7gQFBmyBkbZEz+sPVgsID7IXuz7vTP95kMm1VL74SO5AQ== - -"@swc/core-linux-arm-gnueabihf@1.11.24": - version "1.11.24" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.11.24.tgz#f01ba657a81c67d8fb9f681712e65abf1324cec6" - integrity sha512-PHJgWEpCsLo/NGj+A2lXZ2mgGjsr96ULNW3+T3Bj2KTc8XtMUkE8tmY2Da20ItZOvPNC/69KroU7edyo1Flfbw== - -"@swc/core-linux-arm64-gnu@1.11.24": - version "1.11.24" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.11.24.tgz#9aefca7f7f87c8312c2fa714c1eb731411d8596c" - integrity sha512-C2FJb08+n5SD4CYWCTZx1uR88BN41ZieoHvI8A55hfVf2woT8+6ZiBzt74qW2g+ntZ535Jts5VwXAKdu41HpBg== - -"@swc/core-linux-arm64-musl@1.11.24": - version "1.11.24" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.11.24.tgz#e4805484779bbc59b639eab4f8e45166f3d7a4f7" - integrity sha512-ypXLIdszRo0re7PNNaXN0+2lD454G8l9LPK/rbfRXnhLWDBPURxzKlLlU/YGd2zP98wPcVooMmegRSNOKfvErw== - -"@swc/core-linux-x64-gnu@1.11.24": - version "1.11.24" - resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.11.24.tgz#e8d8cc50a49903880944379590b73733e150a5d4" - integrity sha512-IM7d+STVZD48zxcgo69L0yYptfhaaE9cMZ+9OoMxirNafhKKXwoZuufol1+alEFKc+Wbwp+aUPe/DeWC/Lh3dg== - -"@swc/core-linux-x64-musl@1.11.24": - version "1.11.24" - resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.11.24.tgz#f3c46212eb8a793f6a42a36b2a9017a9b1462737" - integrity sha512-DZByJaMVzSfjQKKQn3cqSeqwy6lpMaQDQQ4HPlch9FWtDx/dLcpdIhxssqZXcR2rhaQVIaRQsCqwV6orSDGAGw== - -"@swc/core-win32-arm64-msvc@1.11.24": - version "1.11.24" - resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.11.24.tgz#b1c3327d81a5f94415ac0b1713e192df1c121fbd" - integrity sha512-Q64Ytn23y9aVDKN5iryFi8mRgyHw3/kyjTjT4qFCa8AEb5sGUuSj//AUZ6c0J7hQKMHlg9do5Etvoe61V98/JQ== - -"@swc/core-win32-ia32-msvc@1.11.24": - version "1.11.24" - resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.11.24.tgz#6a944dd6111ec5fae3cf5925b73701e49b109edc" - integrity sha512-9pKLIisE/Hh2vJhGIPvSoTK4uBSPxNVyXHmOrtdDot4E1FUUI74Vi8tFdlwNbaj8/vusVnb8xPXsxF1uB0VgiQ== - -"@swc/core-win32-x64-msvc@1.11.24": - version "1.11.24" - resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.11.24.tgz#eebb5d5ece2710aeb25cc58bd7c5c4c2c046f030" - integrity sha512-sybnXtOsdB+XvzVFlBVGgRHLqp3yRpHK7CrmpuDKszhj/QhmsaZzY/GHSeALlMtLup13M0gqbcQvsTNlAHTg3w== - -"@swc/core@1.11.24": - version "1.11.24" - resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.11.24.tgz#340425648296964f815c940b8da00fcdb1ff2abd" - integrity sha512-MaQEIpfcEMzx3VWWopbofKJvaraqmL6HbLlw2bFZ7qYqYw3rkhM0cQVEgyzbHtTWwCwPMFZSC2DUbhlZgrMfLg== +"@swc/core-darwin-arm64@1.15.3": + version "1.15.3" + resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.15.3.tgz#bd0bd3ab7730e3ffa64cf200c0ed7c572cbaba97" + integrity sha512-AXfeQn0CvcQ4cndlIshETx6jrAM45oeUrK8YeEY6oUZU/qzz0Id0CyvlEywxkWVC81Ajpd8TQQ1fW5yx6zQWkQ== + +"@swc/core-darwin-x64@1.15.3": + version "1.15.3" + resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.15.3.tgz#502b1e1c680df6b962265ca81a0c1a23e6ff070f" + integrity sha512-p68OeCz1ui+MZYG4wmfJGvcsAcFYb6Sl25H9TxWl+GkBgmNimIiRdnypK9nBGlqMZAcxngNPtnG3kEMNnvoJ2A== + +"@swc/core-linux-arm-gnueabihf@1.15.3": + version "1.15.3" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.15.3.tgz#e32cc6a2e06a75060d6f598ba2ca6f96c5c0cc43" + integrity sha512-Nuj5iF4JteFgwrai97mUX+xUOl+rQRHqTvnvHMATL/l9xE6/TJfPBpd3hk/PVpClMXG3Uvk1MxUFOEzM1JrMYg== + +"@swc/core-linux-arm64-gnu@1.15.3": + version "1.15.3" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.15.3.tgz#9b9861bc44059e393d4baf98b3cd3d6c4ea6f521" + integrity sha512-2Nc/s8jE6mW2EjXWxO/lyQuLKShcmTrym2LRf5Ayp3ICEMX6HwFqB1EzDhwoMa2DcUgmnZIalesq2lG3krrUNw== + +"@swc/core-linux-arm64-musl@1.15.3": + version "1.15.3" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.15.3.tgz#f6388743e5a159018bd468e8f710940b2614384b" + integrity sha512-j4SJniZ/qaZ5g8op+p1G9K1z22s/EYGg1UXIb3+Cg4nsxEpF5uSIGEE4mHUfA70L0BR9wKT2QF/zv3vkhfpX4g== + +"@swc/core-linux-x64-gnu@1.15.3": + version "1.15.3" + resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.15.3.tgz#15fea551c7a3aeb1bdc3ad5c652d73c9321ddba8" + integrity sha512-aKttAZnz8YB1VJwPQZtyU8Uk0BfMP63iDMkvjhJzRZVgySmqt/apWSdnoIcZlUoGheBrcqbMC17GGUmur7OT5A== + +"@swc/core-linux-x64-musl@1.15.3": + version "1.15.3" + resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.15.3.tgz#d3f17bab4ffcadbb47f135e6a14d6f3e401af289" + integrity sha512-oe8FctPu1gnUsdtGJRO2rvOUIkkIIaHqsO9xxN0bTR7dFTlPTGi2Fhk1tnvXeyAvCPxLIcwD8phzKg6wLv9yug== + +"@swc/core-win32-arm64-msvc@1.15.3": + version "1.15.3" + resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.15.3.tgz#9da386df7fed00b3473bcf4281ff3fcd14726d2c" + integrity sha512-L9AjzP2ZQ/Xh58e0lTRMLvEDrcJpR7GwZqAtIeNLcTK7JVE+QineSyHp0kLkO1rttCHyCy0U74kDTj0dRz6raA== + +"@swc/core-win32-ia32-msvc@1.15.3": + version "1.15.3" + resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.15.3.tgz#c398d4f0f10ffec2151a79733ee1ce86a945a1ea" + integrity sha512-B8UtogMzErUPDWUoKONSVBdsgKYd58rRyv2sHJWKOIMCHfZ22FVXICR4O/VwIYtlnZ7ahERcjayBHDlBZpR0aw== + +"@swc/core-win32-x64-msvc@1.15.3": + version "1.15.3" + resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.15.3.tgz#715596b034a654c82b03ef734a9b44c29bcd3a68" + integrity sha512-SpZKMR9QBTecHeqpzJdYEfgw30Oo8b/Xl6rjSzBt1g0ZsXyy60KLXrp6IagQyfTYqNYE/caDvwtF2FPn7pomog== + +"@swc/core@1.15.3": + version "1.15.3" + resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.15.3.tgz#2d0a5c4ac4c180c3dbf2f6d5d958b9fcbaa9755f" + integrity sha512-Qd8eBPkUFL4eAONgGjycZXj1jFCBW8Fd+xF0PzdTlBCWQIV1xnUT7B93wUANtW3KGjl3TRcOyxwSx/u/jyKw/Q== dependencies: "@swc/counter" "^0.1.3" - "@swc/types" "^0.1.21" + "@swc/types" "^0.1.25" optionalDependencies: - "@swc/core-darwin-arm64" "1.11.24" - "@swc/core-darwin-x64" "1.11.24" - "@swc/core-linux-arm-gnueabihf" "1.11.24" - "@swc/core-linux-arm64-gnu" "1.11.24" - "@swc/core-linux-arm64-musl" "1.11.24" - "@swc/core-linux-x64-gnu" "1.11.24" - "@swc/core-linux-x64-musl" "1.11.24" - "@swc/core-win32-arm64-msvc" "1.11.24" - "@swc/core-win32-ia32-msvc" "1.11.24" - "@swc/core-win32-x64-msvc" "1.11.24" + "@swc/core-darwin-arm64" "1.15.3" + "@swc/core-darwin-x64" "1.15.3" + "@swc/core-linux-arm-gnueabihf" "1.15.3" + "@swc/core-linux-arm64-gnu" "1.15.3" + "@swc/core-linux-arm64-musl" "1.15.3" + "@swc/core-linux-x64-gnu" "1.15.3" + "@swc/core-linux-x64-musl" "1.15.3" + "@swc/core-win32-arm64-msvc" "1.15.3" + "@swc/core-win32-ia32-msvc" "1.15.3" + "@swc/core-win32-x64-msvc" "1.15.3" "@swc/counter@^0.1.3": version "0.1.3" @@ -4047,7 +4201,7 @@ "@swc/counter" "^0.1.3" jsonc-parser "^3.2.0" -"@swc/types@^0.1.21": +"@swc/types@^0.1.25": version "0.1.25" resolved "https://registry.yarnpkg.com/@swc/types/-/types-0.1.25.tgz#b517b2a60feb37dd933e542d93093719e4cf1078" integrity sha512-iAoY/qRhNH8a/hBvm3zKj9qQ4oc2+3w1unPJa2XvTK3XjeLXtzcCingVPw/9e5mn1+0yPqxcBGp9Jf0pkfMb1g== @@ -4246,6 +4400,13 @@ resolved "https://registry.yarnpkg.com/@tsconfig/node20/-/node20-20.1.6.tgz#cdf11db8322e1c245d5a4bb2e398239c82ae78b2" integrity sha512-sz+Hqx9zwZDpZIV871WSbUzSqNIsXzghZydypnfgzPKLltVJfkINfUeTct31n/tTSa9ZE1ZOfKdRre1uHHquYQ== +"@tybys/wasm-util@^0.10.1": + version "0.10.1" + resolved "https://registry.yarnpkg.com/@tybys/wasm-util/-/wasm-util-0.10.1.tgz#ecddd3205cf1e2d5274649ff0eedd2991ed7f414" + integrity sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg== + dependencies: + tslib "^2.4.0" + "@tybys/wasm-util@^0.9.0": version "0.9.0" resolved "https://registry.yarnpkg.com/@tybys/wasm-util/-/wasm-util-0.9.0.tgz#3e75eb00604c8d6db470bf18c37b7d984a0e3355" @@ -7597,7 +7758,7 @@ colorette@^1.2.1: resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.2.tgz#cbcc79d5e99caea2dbf10eb3a26fd8b3e6acfa94" integrity sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w== -colorette@^2.0.10, colorette@^2.0.14, colorette@^2.0.16: +colorette@^2.0.10, colorette@^2.0.14, colorette@^2.0.16, colorette@^2.0.20: version "2.0.20" resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== @@ -8446,6 +8607,13 @@ debug@^3.1.0, debug@^3.1.1, debug@^3.2.7: dependencies: ms "^2.1.1" +debug@^4.4.1: + version "4.4.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.3.tgz#c6ae432d9bd9662582fce08709b038c58e9e3d6a" + integrity sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA== + dependencies: + ms "^2.1.3" + decamelize@^1.1.1, decamelize@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" @@ -16055,6 +16223,31 @@ own-keys@^1.0.1: object-keys "^1.1.1" safe-push-apply "^1.0.0" +oxc-resolver@^11.6.1: + version "11.14.0" + resolved "https://registry.yarnpkg.com/oxc-resolver/-/oxc-resolver-11.14.0.tgz#8737deba9b8cd51054d56fb9886213d1fa7cf5a5" + integrity sha512-i4wNrqhOd+4YdHJfHglHtFiqqSxXuzFA+RUqmmWN1aMD3r1HqUSrIhw17tSO4jwKfhLs9uw1wzFPmvMsWacStg== + optionalDependencies: + "@oxc-resolver/binding-android-arm-eabi" "11.14.0" + "@oxc-resolver/binding-android-arm64" "11.14.0" + "@oxc-resolver/binding-darwin-arm64" "11.14.0" + "@oxc-resolver/binding-darwin-x64" "11.14.0" + "@oxc-resolver/binding-freebsd-x64" "11.14.0" + "@oxc-resolver/binding-linux-arm-gnueabihf" "11.14.0" + "@oxc-resolver/binding-linux-arm-musleabihf" "11.14.0" + "@oxc-resolver/binding-linux-arm64-gnu" "11.14.0" + "@oxc-resolver/binding-linux-arm64-musl" "11.14.0" + "@oxc-resolver/binding-linux-ppc64-gnu" "11.14.0" + "@oxc-resolver/binding-linux-riscv64-gnu" "11.14.0" + "@oxc-resolver/binding-linux-riscv64-musl" "11.14.0" + "@oxc-resolver/binding-linux-s390x-gnu" "11.14.0" + "@oxc-resolver/binding-linux-x64-gnu" "11.14.0" + "@oxc-resolver/binding-linux-x64-musl" "11.14.0" + "@oxc-resolver/binding-wasm32-wasi" "11.14.0" + "@oxc-resolver/binding-win32-arm64-msvc" "11.14.0" + "@oxc-resolver/binding-win32-ia32-msvc" "11.14.0" + "@oxc-resolver/binding-win32-x64-msvc" "11.14.0" + p-cancelable@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-3.0.0.tgz#63826694b54d61ca1c20ebcb6d3ecf5e14cd8050" @@ -16577,6 +16770,11 @@ pirates@^4.0.4, pirates@^4.0.6: resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.6.tgz#3018ae32ecfcff6c29ba2267cbf21166ac1f36b9" integrity sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg== +pirates@^4.0.7: + version "4.0.7" + resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.7.tgz#643b4a18c4257c8a65104b73f3049ce9a0a15e22" + integrity sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA== + piscina@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/piscina/-/piscina-3.2.0.tgz#f5a1dde0c05567775690cccefe59d9223924d154" @@ -18551,7 +18749,7 @@ source-map-support@0.5.19: buffer-from "^1.0.0" source-map "^0.6.0" -source-map-support@^0.5.16, source-map-support@~0.5.12, source-map-support@~0.5.20: +source-map-support@^0.5.16, source-map-support@^0.5.21, source-map-support@~0.5.12, source-map-support@~0.5.20: version "0.5.21" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== From 3b2ed1373513c2691f14304e8fd5d7ca0731e512 Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Tue, 25 Nov 2025 11:48:57 -0800 Subject: [PATCH 040/120] yarn change --- ...ct-components-a2e03411-e541-4b7c-b342-5ebe7b8cd7ac.json | 7 +++++++ ...type-icons-v8-d71e68d3-89bb-4f77-ab67-c4051a45cac2.json | 7 +++++++ ...ared-contexts-acf99833-5132-498d-9ef1-abcc8ee5a656.json | 7 +++++++ 3 files changed, 21 insertions(+) create mode 100644 change/@fluentui-react-components-a2e03411-e541-4b7c-b342-5ebe7b8cd7ac.json create mode 100644 change/@fluentui-react-file-type-icons-v8-d71e68d3-89bb-4f77-ab67-c4051a45cac2.json create mode 100644 change/@fluentui-react-shared-contexts-acf99833-5132-498d-9ef1-abcc8ee5a656.json diff --git a/change/@fluentui-react-components-a2e03411-e541-4b7c-b342-5ebe7b8cd7ac.json b/change/@fluentui-react-components-a2e03411-e541-4b7c-b342-5ebe7b8cd7ac.json new file mode 100644 index 00000000000000..49cf230d6548f9 --- /dev/null +++ b/change/@fluentui-react-components-a2e03411-e541-4b7c-b342-5ebe7b8cd7ac.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "Adding react-file-type-icons package for FluentUI v9", + "packageName": "@fluentui/react-components", + "email": "caperez@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-file-type-icons-v8-d71e68d3-89bb-4f77-ab67-c4051a45cac2.json b/change/@fluentui-react-file-type-icons-v8-d71e68d3-89bb-4f77-ab67-c4051a45cac2.json new file mode 100644 index 00000000000000..7a7a3b78a6e49b --- /dev/null +++ b/change/@fluentui-react-file-type-icons-v8-d71e68d3-89bb-4f77-ab67-c4051a45cac2.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "Adding react-file-type-icons package for FluentUI v9. This package is now suffixed with v8 in the repo, but published to the same @fluentui/react-file-type-icons namespace in NPM with no suffix, just retaining the 8.x.x semver.", + "packageName": "@fluentui/react-file-type-icons-v8", + "email": "caperez@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-shared-contexts-acf99833-5132-498d-9ef1-abcc8ee5a656.json b/change/@fluentui-react-shared-contexts-acf99833-5132-498d-9ef1-abcc8ee5a656.json new file mode 100644 index 00000000000000..f37e335fe31030 --- /dev/null +++ b/change/@fluentui-react-shared-contexts-acf99833-5132-498d-9ef1-abcc8ee5a656.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "Adding react-file-type-icons package for FluentUI v9", + "packageName": "@fluentui/react-shared-contexts", + "email": "caperez@microsoft.com", + "dependentChangeType": "patch" +} From 07d1b03d3c90635df22d7f5c5b879a60324720d6 Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Tue, 25 Nov 2025 12:08:15 -0800 Subject: [PATCH 041/120] remove private flag from package.json for react-file-type-icons --- .../react-components/react-file-type-icons/library/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/react-components/react-file-type-icons/library/package.json b/packages/react-components/react-file-type-icons/library/package.json index 99660817316e34..e7363b155f2426 100644 --- a/packages/react-components/react-file-type-icons/library/package.json +++ b/packages/react-components/react-file-type-icons/library/package.json @@ -1,7 +1,6 @@ { "name": "@fluentui/react-file-type-icons", "version": "9.0.0", - "private": true, "description": "Filetype icons for FluentUI", "main": "lib-commonjs/index.js", "module": "lib/index.js", From 379416972453207c2cde6a6346ec528820df4172 Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Tue, 25 Nov 2025 12:23:49 -0800 Subject: [PATCH 042/120] deduplicating yarn lock and solving plugin issue in react-utilities .swcrc --- .../react-components/react-utilities/.swcrc | 3 - yarn.lock | 112 ++++++------------ 2 files changed, 39 insertions(+), 76 deletions(-) diff --git a/packages/react-components/react-utilities/.swcrc b/packages/react-components/react-utilities/.swcrc index 7c60535c03e245..b4ffa86dee3067 100644 --- a/packages/react-components/react-utilities/.swcrc +++ b/packages/react-components/react-utilities/.swcrc @@ -10,9 +10,6 @@ "/**/*.test.tsx" ], "jsc": { - "experimental": { - "plugins": [["swc-plugin-de-indent-template-literal", {}]] - }, "parser": { "syntax": "typescript", "tsx": true, diff --git a/yarn.lock b/yarn.lock index 1afa02e48e7ed6..a38d2c801de707 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1581,15 +1581,7 @@ "@effect/io" "^0.26.0" fast-check "^3.10.0" -"@emnapi/core@^1.1.0": - version "1.4.0" - resolved "https://registry.yarnpkg.com/@emnapi/core/-/core-1.4.0.tgz#8844b02d799198158ac1fea21ae2bc81b881da9a" - integrity sha512-H+N/FqT07NmLmt6OFFtDfwe8PNygprzBikrEMyQfgqSmT0vzE515Pz7R8izwB9q/zsH/MA64AKoul3sA6/CzVg== - dependencies: - "@emnapi/wasi-threads" "1.0.1" - tslib "^2.4.0" - -"@emnapi/core@^1.5.0": +"@emnapi/core@^1.1.0", "@emnapi/core@^1.5.0": version "1.7.1" resolved "https://registry.yarnpkg.com/@emnapi/core/-/core-1.7.1.tgz#3a79a02dbc84f45884a1806ebb98e5746bdfaac4" integrity sha512-o1uhUASyo921r2XtHYOHy7gdkGLge8ghBEQHMWmyJFoXlpU58kIrhhN3w26lpQb6dspetweapMn2CSNwQ8I4wg== @@ -1597,27 +1589,13 @@ "@emnapi/wasi-threads" "1.1.0" tslib "^2.4.0" -"@emnapi/runtime@^1.1.0": - version "1.4.0" - resolved "https://registry.yarnpkg.com/@emnapi/runtime/-/runtime-1.4.0.tgz#8f509bf1059a5551c8fe829a1c4e91db35fdfbee" - integrity sha512-64WYIf4UYcdLnbKn/umDlNjQDSS8AgZrI/R9+x5ilkUVFxXcA1Ebl+gQLc/6mERA4407Xof0R7wEyEuj091CVw== - dependencies: - tslib "^2.4.0" - -"@emnapi/runtime@^1.5.0": +"@emnapi/runtime@^1.1.0", "@emnapi/runtime@^1.5.0": version "1.7.1" resolved "https://registry.yarnpkg.com/@emnapi/runtime/-/runtime-1.7.1.tgz#a73784e23f5d57287369c808197288b52276b791" integrity sha512-PVtJr5CmLwYAU9PZDMITZoR5iAOShYREoR45EyyLrbntV50mdePTgUn4AmOw90Ifcj+x2kRjdzr1HP3RrNiHGA== dependencies: tslib "^2.4.0" -"@emnapi/wasi-threads@1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@emnapi/wasi-threads/-/wasi-threads-1.0.1.tgz#d7ae71fd2166b1c916c6cd2d0df2ef565a2e1a5b" - integrity sha512-iIBu7mwkq4UQGeMEM8bLwNK962nXdhodeScX4slfQnRhEMMzvYivHhutCIk8uojvmASXXPC2WNEjwxFWk72Oqw== - dependencies: - tslib "^2.4.0" - "@emnapi/wasi-threads@1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@emnapi/wasi-threads/-/wasi-threads-1.1.0.tgz#60b2102fddc9ccb78607e4a3cf8403ea69be41bf" @@ -8579,10 +8557,10 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3: dependencies: ms "2.0.0" -debug@4, debug@^4.0.0, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@^4.3.5, debug@^4.3.6, debug@^4.3.7: - version "4.4.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.0.tgz#2b3f2aea2ffeb776477460267377dc8710faba8a" - integrity sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA== +debug@4, debug@^4.0.0, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@^4.3.5, debug@^4.3.6, debug@^4.3.7, debug@^4.4.1: + version "4.4.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.3.tgz#c6ae432d9bd9662582fce08709b038c58e9e3d6a" + integrity sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA== dependencies: ms "^2.1.3" @@ -8607,13 +8585,6 @@ debug@^3.1.0, debug@^3.1.1, debug@^3.2.7: dependencies: ms "^2.1.1" -debug@^4.4.1: - version "4.4.3" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.3.tgz#c6ae432d9bd9662582fce08709b038c58e9e3d6a" - integrity sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA== - dependencies: - ms "^2.1.3" - decamelize@^1.1.1, decamelize@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" @@ -11331,17 +11302,17 @@ globalthis@^1.0.4: define-properties "^1.2.1" gopd "^1.0.1" -globby@*, globby@11.1.0, globby@^11.0.0, globby@^11.0.1, globby@^11.1.0: - version "11.1.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" - integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== +globby@*, globby@^14.0.0: + version "14.0.1" + resolved "https://registry.yarnpkg.com/globby/-/globby-14.0.1.tgz#a1b44841aa7f4c6d8af2bc39951109d77301959b" + integrity sha512-jOMLD2Z7MAhyG8aJpNOpmziMOP4rPLcc95oQPKXBazW82z+CEgPFBQvEpRUa1KeIMUJo4Wsm+q6uzO/Q/4BksQ== dependencies: - array-union "^2.1.0" - dir-glob "^3.0.1" - fast-glob "^3.2.9" - ignore "^5.2.0" - merge2 "^1.4.1" - slash "^3.0.0" + "@sindresorhus/merge-streams" "^2.1.0" + fast-glob "^3.3.2" + ignore "^5.2.4" + path-type "^5.0.0" + slash "^5.1.0" + unicorn-magic "^0.1.0" globby@11.0.4: version "11.0.4" @@ -11355,6 +11326,18 @@ globby@11.0.4: merge2 "^1.3.0" slash "^3.0.0" +globby@11.1.0, globby@^11.0.0, globby@^11.0.1, globby@^11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" + integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== + dependencies: + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.2.9" + ignore "^5.2.0" + merge2 "^1.4.1" + slash "^3.0.0" + globby@^10.0.1: version "10.0.2" resolved "https://registry.yarnpkg.com/globby/-/globby-10.0.2.tgz#277593e745acaa4646c3ab411289ec47a0392543" @@ -11369,18 +11352,6 @@ globby@^10.0.1: merge2 "^1.2.3" slash "^3.0.0" -globby@^14.0.0: - version "14.0.1" - resolved "https://registry.yarnpkg.com/globby/-/globby-14.0.1.tgz#a1b44841aa7f4c6d8af2bc39951109d77301959b" - integrity sha512-jOMLD2Z7MAhyG8aJpNOpmziMOP4rPLcc95oQPKXBazW82z+CEgPFBQvEpRUa1KeIMUJo4Wsm+q6uzO/Q/4BksQ== - dependencies: - "@sindresorhus/merge-streams" "^2.1.0" - fast-glob "^3.3.2" - ignore "^5.2.4" - path-type "^5.0.0" - slash "^5.1.0" - unicorn-magic "^0.1.0" - globby@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c" @@ -16765,12 +16736,7 @@ pinkie@^2.0.0: resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= -pirates@^4.0.4, pirates@^4.0.6: - version "4.0.6" - resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.6.tgz#3018ae32ecfcff6c29ba2267cbf21166ac1f36b9" - integrity sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg== - -pirates@^4.0.7: +pirates@^4.0.4, pirates@^4.0.6, pirates@^4.0.7: version "4.0.7" resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.7.tgz#643b4a18c4257c8a65104b73f3049ce9a0a15e22" integrity sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA== @@ -18142,20 +18108,20 @@ rw@1: resolved "https://registry.yarnpkg.com/rw/-/rw-1.3.3.tgz#3f862dfa91ab766b14885ef4d01124bfda074fb4" integrity sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ== -rxjs@>=6.4.0, rxjs@^6.5.5, rxjs@^6.6.0: - version "6.6.7" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9" - integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ== - dependencies: - tslib "^1.9.0" - -rxjs@^7.5.1: +rxjs@>=6.4.0, rxjs@^7.5.1: version "7.8.1" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.1.tgz#6f6f3d99ea8044291efd92e7c7fcf562c4057543" integrity sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg== dependencies: tslib "^2.1.0" +rxjs@^6.5.5, rxjs@^6.6.0: + version "6.6.7" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9" + integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ== + dependencies: + tslib "^1.9.0" + sade@^1.7.3: version "1.8.1" resolved "https://registry.yarnpkg.com/sade/-/sade-1.8.1.tgz#0a78e81d658d394887be57d2a409bf703a3b2701" @@ -18179,12 +18145,12 @@ safe-array-concat@^1.1.3: has-symbols "^1.1.0" isarray "^2.0.5" -safe-buffer@5.1.2, safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: +safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -safe-buffer@5.2.1: +safe-buffer@5.2.1, safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.2: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== From 935f9679e3dc058c0b5e826f7d727f0ca3b627be Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Tue, 25 Nov 2025 12:31:38 -0800 Subject: [PATCH 043/120] yarn change for react-utilities --- ...act-utilities-16ca2224-8177-4ede-ba6a-91d9c817054f.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 change/@fluentui-react-utilities-16ca2224-8177-4ede-ba6a-91d9c817054f.json diff --git a/change/@fluentui-react-utilities-16ca2224-8177-4ede-ba6a-91d9c817054f.json b/change/@fluentui-react-utilities-16ca2224-8177-4ede-ba6a-91d9c817054f.json new file mode 100644 index 00000000000000..953eb2d68a01d6 --- /dev/null +++ b/change/@fluentui-react-utilities-16ca2224-8177-4ede-ba6a-91d9c817054f.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "Adding react-file-type-icons package for FluentUI v9", + "packageName": "@fluentui/react-utilities", + "email": "caperez@microsoft.com", + "dependentChangeType": "patch" +} From 237b828c0d7d4582abc73436acd20cb9c8a1b00a Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Tue, 25 Nov 2025 12:39:20 -0800 Subject: [PATCH 044/120] npx yarn-deduplicate --strategy fewer --- yarn.lock | 64 +++++++++++++++++++++++++++---------------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/yarn.lock b/yarn.lock index a38d2c801de707..b6a6323af9ef4c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11302,17 +11302,17 @@ globalthis@^1.0.4: define-properties "^1.2.1" gopd "^1.0.1" -globby@*, globby@^14.0.0: - version "14.0.1" - resolved "https://registry.yarnpkg.com/globby/-/globby-14.0.1.tgz#a1b44841aa7f4c6d8af2bc39951109d77301959b" - integrity sha512-jOMLD2Z7MAhyG8aJpNOpmziMOP4rPLcc95oQPKXBazW82z+CEgPFBQvEpRUa1KeIMUJo4Wsm+q6uzO/Q/4BksQ== +globby@*, globby@11.1.0, globby@^11.0.0, globby@^11.0.1, globby@^11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" + integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== dependencies: - "@sindresorhus/merge-streams" "^2.1.0" - fast-glob "^3.3.2" - ignore "^5.2.4" - path-type "^5.0.0" - slash "^5.1.0" - unicorn-magic "^0.1.0" + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.2.9" + ignore "^5.2.0" + merge2 "^1.4.1" + slash "^3.0.0" globby@11.0.4: version "11.0.4" @@ -11326,18 +11326,6 @@ globby@11.0.4: merge2 "^1.3.0" slash "^3.0.0" -globby@11.1.0, globby@^11.0.0, globby@^11.0.1, globby@^11.1.0: - version "11.1.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" - integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== - dependencies: - array-union "^2.1.0" - dir-glob "^3.0.1" - fast-glob "^3.2.9" - ignore "^5.2.0" - merge2 "^1.4.1" - slash "^3.0.0" - globby@^10.0.1: version "10.0.2" resolved "https://registry.yarnpkg.com/globby/-/globby-10.0.2.tgz#277593e745acaa4646c3ab411289ec47a0392543" @@ -11352,6 +11340,18 @@ globby@^10.0.1: merge2 "^1.2.3" slash "^3.0.0" +globby@^14.0.0: + version "14.0.1" + resolved "https://registry.yarnpkg.com/globby/-/globby-14.0.1.tgz#a1b44841aa7f4c6d8af2bc39951109d77301959b" + integrity sha512-jOMLD2Z7MAhyG8aJpNOpmziMOP4rPLcc95oQPKXBazW82z+CEgPFBQvEpRUa1KeIMUJo4Wsm+q6uzO/Q/4BksQ== + dependencies: + "@sindresorhus/merge-streams" "^2.1.0" + fast-glob "^3.3.2" + ignore "^5.2.4" + path-type "^5.0.0" + slash "^5.1.0" + unicorn-magic "^0.1.0" + globby@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c" @@ -18108,20 +18108,20 @@ rw@1: resolved "https://registry.yarnpkg.com/rw/-/rw-1.3.3.tgz#3f862dfa91ab766b14885ef4d01124bfda074fb4" integrity sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ== -rxjs@>=6.4.0, rxjs@^7.5.1: - version "7.8.1" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.1.tgz#6f6f3d99ea8044291efd92e7c7fcf562c4057543" - integrity sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg== - dependencies: - tslib "^2.1.0" - -rxjs@^6.5.5, rxjs@^6.6.0: +rxjs@>=6.4.0, rxjs@^6.5.5, rxjs@^6.6.0: version "6.6.7" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9" integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ== dependencies: tslib "^1.9.0" +rxjs@^7.5.1: + version "7.8.1" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.1.tgz#6f6f3d99ea8044291efd92e7c7fcf562c4057543" + integrity sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg== + dependencies: + tslib "^2.1.0" + sade@^1.7.3: version "1.8.1" resolved "https://registry.yarnpkg.com/sade/-/sade-1.8.1.tgz#0a78e81d658d394887be57d2a409bf703a3b2701" @@ -18145,12 +18145,12 @@ safe-array-concat@^1.1.3: has-symbols "^1.1.0" isarray "^2.0.5" -safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: +safe-buffer@5.1.2, safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -safe-buffer@5.2.1, safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.2: +safe-buffer@5.2.1: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== From cb42047f17e663e8e9905e5a8670c42a7a8c3afe Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Tue, 25 Nov 2025 12:57:21 -0800 Subject: [PATCH 045/120] Add path mapping for react-file-type-icons-v8 in tsconfig.base.all.json --- .../src/generators/tsconfig-base-all/lib/utils.ts | 5 ++--- tsconfig.base.all.json | 11 ++++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tools/workspace-plugin/src/generators/tsconfig-base-all/lib/utils.ts b/tools/workspace-plugin/src/generators/tsconfig-base-all/lib/utils.ts index 9bc9c3e0730a39..62382e3da8517b 100644 --- a/tools/workspace-plugin/src/generators/tsconfig-base-all/lib/utils.ts +++ b/tools/workspace-plugin/src/generators/tsconfig-base-all/lib/utils.ts @@ -1,5 +1,4 @@ // use this module to define any kind of generic utilities that are used in more than 1 place within the generator implementation -import path from 'path'; import { readJson, Tree } from '@nx/devkit'; /** @@ -11,8 +10,8 @@ export function createPathAliasesConfig(tree: Tree) { const existingTsConfig = tree.exists(tsConfigAllPath) ? readJson(tree, tsConfigAllPath) : null; const baseConfigs = { - v8: readJson(tree, path.join('/tsconfig.base.v8.json')), - v9: readJson(tree, path.join('/tsconfig.base.json')), + v8: readJson(tree, '/tsconfig.base.v8.json'), + v9: readJson(tree, '/tsconfig.base.json'), }; const tsConfigBase = '.'; const mergedTsConfig = { diff --git a/tsconfig.base.all.json b/tsconfig.base.all.json index fa01a90c54fe9b..d4aa1e0359ef04 100644 --- a/tsconfig.base.all.json +++ b/tsconfig.base.all.json @@ -26,6 +26,7 @@ "@fluentui/react-date-time": ["packages/react-date-time/src/index.ts"], "@fluentui/react-experiments": ["packages/react-experiments/src/index.ts"], "@fluentui/react-experiments/lib/*": ["packages/react-experiments/src/*"], + "@fluentui/react-file-type-icons-v8": ["packages/react-file-type-icons/src/index.ts"], "@fluentui/react-focus": ["packages/react-focus/src/index.ts"], "@fluentui/react-hooks": ["packages/react-hooks/src/index.ts"], "@fluentui/scheme-utilities": ["packages/scheme-utilities/src/index.ts"], @@ -70,7 +71,6 @@ "@fluentui/eslint-plugin-react-components": [ "packages/react-components/eslint-plugin-react-components/src/index.ts" ], - "@fluentui/react-file-type-icons": ["packages/react-components/react-file-type-icons/library/src/index.ts"], "@fluentui/global-context": ["packages/react-components/global-context/src/index.ts"], "@fluentui/keyboard-key": ["packages/keyboard-key/src/index.ts"], "@fluentui/keyboard-keys": ["packages/react-components/keyboard-keys/src/index.ts"], @@ -121,6 +121,10 @@ "@fluentui/react-drawer-stories": ["packages/react-components/react-drawer/stories/src/index.ts"], "@fluentui/react-field": ["packages/react-components/react-field/library/src/index.ts"], "@fluentui/react-field-stories": ["packages/react-components/react-field/stories/src/index.ts"], + "@fluentui/react-file-type-icons": ["packages/react-components/react-file-type-icons/library/src/index.ts"], + "@fluentui/react-file-type-icons-stories": [ + "packages/react-components/react-file-type-icons/stories/src/index.ts" + ], "@fluentui/react-focus-management": ["packages/react-focus-management/src/index.ts"], "@fluentui/react-icons-compat": ["packages/react-components/react-icons-compat/library/src/index.ts"], "@fluentui/react-icons-compat-stories": ["packages/react-components/react-icons-compat/stories/src/index.ts"], @@ -254,10 +258,7 @@ "@fluentui/tokens": ["packages/tokens/src/index.ts"], "@fluentui/visual-regression-assert": ["tools/visual-regression-assert/src/index.ts"], "@fluentui/visual-regression-utilities": ["tools/visual-regression-utilities/src/index.ts"], - "@fluentui/workspace-plugin": ["tools/workspace-plugin/src/index.ts"], - "@fluentui/react-file-type-icons-stories": [ - "packages/react-components/react-file-type-icons/stories/src/index.ts" - ] + "@fluentui/workspace-plugin": ["tools/workspace-plugin/src/index.ts"] } } } From cfa9fba0fd5297719016716a1068f4c566fdc108 Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Tue, 25 Nov 2025 13:10:37 -0800 Subject: [PATCH 046/120] re-running yarn nx format:write --- .../src/components/FileTypeIcon/useFileTypeIcon.ts | 8 +++++++- .../library/src/utils/getFileTypeIconAsUrl.test.ts | 12 +++++++++--- .../FileTypeIcon/FileTypeIconEdgeCases.stories.tsx | 6 +++--- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/packages/react-components/react-file-type-icons/library/src/components/FileTypeIcon/useFileTypeIcon.ts b/packages/react-components/react-file-type-icons/library/src/components/FileTypeIcon/useFileTypeIcon.ts index 316cbb0067075c..abd7aeb7808215 100644 --- a/packages/react-components/react-file-type-icons/library/src/components/FileTypeIcon/useFileTypeIcon.ts +++ b/packages/react-components/react-file-type-icons/library/src/components/FileTypeIcon/useFileTypeIcon.ts @@ -17,7 +17,13 @@ export const useFileTypeIcon_unstable = ( props: FileTypeIconProps, ref: React.Ref, ): FileTypeIconState => { - const { extension, type, size: requestedSize = DEFAULT_ICON_SIZE, imageFileType = 'svg', baseUrl = getConfiguredBaseUrl() } = props; + const { + extension, + type, + size: requestedSize = DEFAULT_ICON_SIZE, + imageFileType = 'svg', + baseUrl = getConfiguredBaseUrl(), + } = props; // Validate and adjust size to nearest available const size = getValidIconSize(requestedSize); diff --git a/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconAsUrl.test.ts b/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconAsUrl.test.ts index b83ea3c4630d15..35f7f0d77b6de9 100644 --- a/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconAsUrl.test.ts +++ b/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconAsUrl.test.ts @@ -351,7 +351,9 @@ describe('getFileTypeIconAsHTMLString', () => { { extension: 'pdf', size: 16, imageFileType: 'png' }, DEFAULT_BASE_URL, ); - expect(result).toBe(`pdf file icon`); + expect(result).toBe( + `pdf file icon`, + ); }); it('should return correct HTML string for 2x DPI with xlsx extension', () => { @@ -365,7 +367,9 @@ describe('getFileTypeIconAsHTMLString', () => { { extension: 'xlsx', size: 16, imageFileType: 'png' }, DEFAULT_BASE_URL, ); - expect(result).toBe(`xlsx file icon`); + expect(result).toBe( + `xlsx file icon`, + ); }); }); @@ -389,7 +393,9 @@ describe('getFileTypeIconAsHTMLString', () => { { extension: 'pdf', size: 20, imageFileType: 'svg' }, DEFAULT_BASE_URL, ); - expect(result).toBe(`pdf file icon`); + expect(result).toBe( + `pdf file icon`, + ); }); }); diff --git a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconEdgeCases.stories.tsx b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconEdgeCases.stories.tsx index 35fc6816866298..ae00b2a590f73f 100644 --- a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconEdgeCases.stories.tsx +++ b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconEdgeCases.stories.tsx @@ -215,8 +215,9 @@ export const EdgeCases = (): JSXElement => {
.Pdf
-
All variations display the same PDF icon. If you want to further sanitize - your code, consider extracting and normalizing file extensions from full filenames: +
+ All variations display the same PDF icon. If you want to further sanitize your code, consider extracting and + normalizing file extensions from full filenames:
           
@@ -234,7 +235,6 @@ const extension = getExtension(filename); // "pdf"
           
         
-
); }; From ef929f168b6152f201a3156e45c69efd008d16cd Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Tue, 25 Nov 2025 13:41:38 -0800 Subject: [PATCH 047/120] undoing removal of indent rule --- packages/react-components/react-utilities/.swcrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/react-components/react-utilities/.swcrc b/packages/react-components/react-utilities/.swcrc index b4ffa86dee3067..7c60535c03e245 100644 --- a/packages/react-components/react-utilities/.swcrc +++ b/packages/react-components/react-utilities/.swcrc @@ -10,6 +10,9 @@ "/**/*.test.tsx" ], "jsc": { + "experimental": { + "plugins": [["swc-plugin-de-indent-template-literal", {}]] + }, "parser": { "syntax": "typescript", "tsx": true, From 9824a02704fbd55e5634c47059330f23aa3abd28 Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Tue, 25 Nov 2025 13:58:52 -0800 Subject: [PATCH 048/120] plugin swc-plugin-de-indent-template-literal is crashing, removing --- packages/react-components/react-dialog/library/.swcrc | 3 --- packages/react-components/react-jsx-runtime/.swcrc | 3 --- packages/react-components/react-tree/library/.swcrc | 3 --- packages/react-components/react-utilities/.swcrc | 5 +---- 4 files changed, 1 insertion(+), 13 deletions(-) diff --git a/packages/react-components/react-dialog/library/.swcrc b/packages/react-components/react-dialog/library/.swcrc index 7c60535c03e245..b4ffa86dee3067 100644 --- a/packages/react-components/react-dialog/library/.swcrc +++ b/packages/react-components/react-dialog/library/.swcrc @@ -10,9 +10,6 @@ "/**/*.test.tsx" ], "jsc": { - "experimental": { - "plugins": [["swc-plugin-de-indent-template-literal", {}]] - }, "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-jsx-runtime/.swcrc b/packages/react-components/react-jsx-runtime/.swcrc index 7c60535c03e245..b4ffa86dee3067 100644 --- a/packages/react-components/react-jsx-runtime/.swcrc +++ b/packages/react-components/react-jsx-runtime/.swcrc @@ -10,9 +10,6 @@ "/**/*.test.tsx" ], "jsc": { - "experimental": { - "plugins": [["swc-plugin-de-indent-template-literal", {}]] - }, "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-tree/library/.swcrc b/packages/react-components/react-tree/library/.swcrc index 7c60535c03e245..b4ffa86dee3067 100644 --- a/packages/react-components/react-tree/library/.swcrc +++ b/packages/react-components/react-tree/library/.swcrc @@ -10,9 +10,6 @@ "/**/*.test.tsx" ], "jsc": { - "experimental": { - "plugins": [["swc-plugin-de-indent-template-literal", {}]] - }, "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-utilities/.swcrc b/packages/react-components/react-utilities/.swcrc index 7c60535c03e245..1f90e743a01739 100644 --- a/packages/react-components/react-utilities/.swcrc +++ b/packages/react-components/react-utilities/.swcrc @@ -1,5 +1,5 @@ { - "$schema": "https://json.schemastore.org/swcrc", + "$schema": "https://swc.rs/schema.json", "exclude": [ "/testing", "/**/*.cy.ts", @@ -10,9 +10,6 @@ "/**/*.test.tsx" ], "jsc": { - "experimental": { - "plugins": [["swc-plugin-de-indent-template-literal", {}]] - }, "parser": { "syntax": "typescript", "tsx": true, From 9b0917c445be9d20ea824e33561aeccf51d67a72 Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Tue, 25 Nov 2025 14:00:37 -0800 Subject: [PATCH 049/120] yarn change for experimental swc.rs indentation plugin removal --- ...-react-dialog-8feae847-a6df-438f-babf-60e6ecb351c5.json | 7 +++++++ ...t-jsx-runtime-7b4bdb9f-c16e-4bda-9459-b3b7c30755ab.json | 7 +++++++ ...ui-react-tree-c84f263a-964a-47d9-9a5c-337406e22fa5.json | 7 +++++++ 3 files changed, 21 insertions(+) create mode 100644 change/@fluentui-react-dialog-8feae847-a6df-438f-babf-60e6ecb351c5.json create mode 100644 change/@fluentui-react-jsx-runtime-7b4bdb9f-c16e-4bda-9459-b3b7c30755ab.json create mode 100644 change/@fluentui-react-tree-c84f263a-964a-47d9-9a5c-337406e22fa5.json diff --git a/change/@fluentui-react-dialog-8feae847-a6df-438f-babf-60e6ecb351c5.json b/change/@fluentui-react-dialog-8feae847-a6df-438f-babf-60e6ecb351c5.json new file mode 100644 index 00000000000000..5fa0fefdde37fd --- /dev/null +++ b/change/@fluentui-react-dialog-8feae847-a6df-438f-babf-60e6ecb351c5.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "plugin swc-plugin-de-indent-template-literal is crashing, removing", + "packageName": "@fluentui/react-dialog", + "email": "caperez@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-jsx-runtime-7b4bdb9f-c16e-4bda-9459-b3b7c30755ab.json b/change/@fluentui-react-jsx-runtime-7b4bdb9f-c16e-4bda-9459-b3b7c30755ab.json new file mode 100644 index 00000000000000..cb9eaed66d38ea --- /dev/null +++ b/change/@fluentui-react-jsx-runtime-7b4bdb9f-c16e-4bda-9459-b3b7c30755ab.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "plugin swc-plugin-de-indent-template-literal is crashing, removing", + "packageName": "@fluentui/react-jsx-runtime", + "email": "caperez@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-tree-c84f263a-964a-47d9-9a5c-337406e22fa5.json b/change/@fluentui-react-tree-c84f263a-964a-47d9-9a5c-337406e22fa5.json new file mode 100644 index 00000000000000..020e81b21ce7e7 --- /dev/null +++ b/change/@fluentui-react-tree-c84f263a-964a-47d9-9a5c-337406e22fa5.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "plugin swc-plugin-de-indent-template-literal is crashing, removing", + "packageName": "@fluentui/react-tree", + "email": "caperez@microsoft.com", + "dependentChangeType": "patch" +} From 2d73b85095c3aa743f5d47ac6f6efcb2c65d0403 Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Tue, 25 Nov 2025 14:14:03 -0800 Subject: [PATCH 050/120] fix missing param in documentation for getFileTypeIcon --- .../library/src/utils/getFileTypeIconAsUrl.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconAsUrl.ts b/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconAsUrl.ts index 88ee15e35535bc..d27885a86ef5d0 100644 --- a/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconAsUrl.ts +++ b/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconAsUrl.ts @@ -10,7 +10,7 @@ import { FileIconType } from './FileIconType'; /** * Given the `fileTypeIconOptions`, this function returns the CDN-based URL for `FileTypeIcon`. * Similar to `getFileTypeIconProps`, but rather than returning the `iconName`, this returns the raw URL. - * @param options + * @param options - Provide extension, FileIconType, size, and imageFileType for the requested icon. * @param baseUrl - optionally provide a custom CDN base url to fetch icons from. * If not provided, uses the URL configured via `initializeFileTypeIcons()`, * or falls back to the default CDN URL. @@ -37,7 +37,7 @@ export function getFileTypeIconAsUrl( /** * Given the `fileTypeIconOptions`, similar to `getFileTypeIconProps`, this function returns * an tag DOM element that renders the icon, as a string. - * @param options + * @param options - Provide extension, FileIconType, size, and imageFileType for the requested icon. * @param baseUrl - optionally provide a custom CDN base url to fetch icons from. * If not provided, uses the URL configured via `initializeFileTypeIcons()`, * or falls back to the default CDN URL. From 13974b76dc7674fc68c7f7806f62492ba1a8a703 Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Tue, 25 Nov 2025 16:49:23 -0800 Subject: [PATCH 051/120] Add missing dependency and update styles in file type icon stories --- .../stories/package.json | 1 + .../FileTypeIconCommon.stories.tsx | 8 +- .../FileTypeIconDefault.stories.tsx | 4 +- .../FileTypeIconEdgeCases.stories.tsx | 18 +- .../FileTypeIconUrlAndHtml.stories.tsx | 274 +++++++++--------- .../src/FileTypeIcon/index.stories.tsx | 3 +- .../tsconfig.lib.json | 1 + .../storybook-llms-extractor/src/typings.d.ts | 7 - .../tsconfig.lib.json | 1 + .../tsconfig.lib.json | 1 + 10 files changed, 159 insertions(+), 159 deletions(-) delete mode 100644 tools/storybook-llms-extractor/src/typings.d.ts diff --git a/packages/react-components/react-file-type-icons/stories/package.json b/packages/react-components/react-file-type-icons/stories/package.json index 75570f7e81e644..880429588b2e1c 100644 --- a/packages/react-components/react-file-type-icons/stories/package.json +++ b/packages/react-components/react-file-type-icons/stories/package.json @@ -3,6 +3,7 @@ "version": "0.0.0", "private": true, "devDependencies": { + "@fluentui/react-components": "*", "@fluentui/react-file-type-icons": "*", "@fluentui/react-storybook-addon": "*", "@fluentui/react-storybook-addon-export-to-sandbox": "*", diff --git a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconCommon.stories.tsx b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconCommon.stories.tsx index 4449b2c8568af6..4acc77589980be 100644 --- a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconCommon.stories.tsx +++ b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconCommon.stories.tsx @@ -1,8 +1,8 @@ +/* eslint-disable @fluentui/no-restricted-imports */ import * as React from 'react'; +import { makeStyles, tokens } from '@fluentui/react-components'; import type { JSXElement } from '@fluentui/react-components'; -import { tokens } from '@fluentui/react-components'; import { FileTypeIcon, FileIconType } from '@fluentui/react-file-type-icons'; -import { makeStyles, shorthands } from '@griffel/react'; const useStyles = makeStyles({ container: { @@ -30,9 +30,9 @@ const useStyles = makeStyles({ flexDirection: 'column', alignItems: 'center', gap: '8px', - ...shorthands.padding('12px'), + padding: '12px', backgroundColor: tokens.colorNeutralBackground1, - ...shorthands.borderRadius(tokens.borderRadiusMedium), + borderRadius: tokens.borderRadiusMedium, ':hover': { backgroundColor: tokens.colorNeutralBackground1Hover, }, diff --git a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx index db8cda511a7f51..8f150560d7b118 100644 --- a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx +++ b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx @@ -1,8 +1,8 @@ +/* eslint-disable @fluentui/no-restricted-imports */ import * as React from 'react'; +import { makeStyles, tokens } from '@fluentui/react-components'; import type { JSXElement } from '@fluentui/react-components'; -import { tokens } from '@fluentui/react-components'; import { FileIconType, FileTypeIcon } from '@fluentui/react-file-type-icons'; -import { makeStyles } from '@griffel/react'; const useStyles = makeStyles({ container: { diff --git a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconEdgeCases.stories.tsx b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconEdgeCases.stories.tsx index ae00b2a590f73f..e5e2e61ffb3a36 100644 --- a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconEdgeCases.stories.tsx +++ b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconEdgeCases.stories.tsx @@ -1,8 +1,8 @@ +/* eslint-disable @fluentui/no-restricted-imports */ import * as React from 'react'; +import { makeStyles, tokens } from '@fluentui/react-components'; import type { JSXElement } from '@fluentui/react-components'; -import { tokens } from '@fluentui/react-components'; import { FileTypeIcon } from '@fluentui/react-file-type-icons'; -import { makeStyles, shorthands } from '@griffel/react'; const useStyles = makeStyles({ container: { @@ -34,9 +34,9 @@ const useStyles = makeStyles({ display: 'flex', alignItems: 'center', gap: '12px', - ...shorthands.padding('12px'), + padding: '12px', backgroundColor: tokens.colorNeutralBackground1, - ...shorthands.borderRadius(tokens.borderRadiusMedium), + borderRadius: tokens.borderRadiusMedium, }, label: { fontSize: tokens.fontSizeBase300, @@ -48,16 +48,16 @@ const useStyles = makeStyles({ fontStyle: 'italic', }, warningBox: { - ...shorthands.padding('12px', '16px'), + padding: '12px 16px', backgroundColor: tokens.colorPaletteYellowBackground2, - ...shorthands.borderLeft('4px', 'solid', tokens.colorPaletteYellowBorder1), - ...shorthands.borderRadius(tokens.borderRadiusMedium), + borderLeft: `4px solid ${tokens.colorPaletteYellowBorder1}`, + borderRadius: tokens.borderRadiusMedium, fontSize: tokens.fontSizeBase300, }, codeBlock: { backgroundColor: tokens.colorNeutralBackground3, - ...shorthands.padding('12px'), - ...shorthands.borderRadius(tokens.borderRadiusMedium), + padding: '12px', + borderRadius: tokens.borderRadiusMedium, fontFamily: tokens.fontFamilyMonospace, fontSize: tokens.fontSizeBase200, overflowX: 'auto', diff --git a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconUrlAndHtml.stories.tsx b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconUrlAndHtml.stories.tsx index 64f5bd35d3294b..0b6555fb02543e 100644 --- a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconUrlAndHtml.stories.tsx +++ b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconUrlAndHtml.stories.tsx @@ -1,8 +1,8 @@ +/* eslint-disable @fluentui/no-restricted-imports */ import * as React from 'react'; +import { makeStyles, tokens } from '@fluentui/react-components'; import type { JSXElement } from '@fluentui/react-components'; -import { tokens } from '@fluentui/react-components'; import { getFileTypeIconAsUrl, getFileTypeIconAsHTMLString } from '@fluentui/react-file-type-icons'; -import { makeStyles, shorthands } from '@griffel/react'; const useStyles = makeStyles({ container: { @@ -14,9 +14,9 @@ const useStyles = makeStyles({ display: 'flex', flexDirection: 'column', gap: '12px', - ...shorthands.padding('16px'), - ...shorthands.border('1px', 'solid', tokens.colorNeutralStroke1), - ...shorthands.borderRadius(tokens.borderRadiusMedium), + padding: '16px', + border: `1px solid ${tokens.colorNeutralStroke1}`, + borderRadius: tokens.borderRadiusMedium, }, sectionTitle: { fontSize: tokens.fontSizeBase400, @@ -32,9 +32,9 @@ const useStyles = makeStyles({ display: 'flex', flexDirection: 'column', gap: '8px', - ...shorthands.padding('12px'), + padding: '12px', backgroundColor: tokens.colorNeutralBackground2, - ...shorthands.borderRadius(tokens.borderRadiusSmall), + borderRadius: tokens.borderRadiusSmall, }, cardTitle: { fontSize: tokens.fontSizeBase300, @@ -45,17 +45,17 @@ const useStyles = makeStyles({ display: 'flex', alignItems: 'center', justifyContent: 'center', - ...shorthands.padding('12px'), + padding: '12px', backgroundColor: tokens.colorNeutralBackground1, - ...shorthands.borderRadius(tokens.borderRadiusSmall), + borderRadius: tokens.borderRadiusSmall, minHeight: '60px', }, code: { fontSize: tokens.fontSizeBase100, fontFamily: tokens.fontFamilyMonospace, backgroundColor: tokens.colorNeutralBackground1, - ...shorthands.padding('8px'), - ...shorthands.borderRadius(tokens.borderRadiusSmall), + padding: '8px', + borderRadius: tokens.borderRadiusSmall, overflowX: 'auto', wordBreak: 'break-all', }, @@ -68,148 +68,150 @@ const useStyles = makeStyles({ const commonFileTypes = ['docx', 'pdf', 'xlsx']; -export const UrlAndHtml = { - render: (): JSXElement => { - const styles = useStyles(); +const UrlAndHtmlComponent = (): JSXElement => { + const styles = useStyles(); - return ( -
- {/* URL Function Demo */} -
-
getFileTypeIconAsUrl() - PNG Format with Different DPIs
-
- {commonFileTypes.map(extension => ( -
-
.{extension}
- {(['1x', '1.5x', '2x'] as const).map(dpi => { - const url = getFileTypeIconAsUrl({ - extension, - size: 48, - imageFileType: 'png', - }); + return ( +
+ {/* URL Function Demo */} +
+
getFileTypeIconAsUrl() - PNG Format with Different DPIs
+
+ {commonFileTypes.map(extension => ( +
+
.{extension}
+ {(['1x', '1.5x', '2x'] as const).map(dpi => { + const url = getFileTypeIconAsUrl({ + extension, + size: 48, + imageFileType: 'png', + }); - // For demo purposes, we'll show what the URL would be for each DPI - // In real usage, the browser's devicePixelRatio would determine this - const dpiSuffix = dpi === '1x' ? '' : `_${dpi}`; - const demoUrl = url?.replace(/48/, `48${dpiSuffix}`); + // For demo purposes, we'll show what the URL would be for each DPI + // In real usage, the browser's devicePixelRatio would determine this + const dpiSuffix = dpi === '1x' ? '' : `_${dpi}`; + const demoUrl = url?.replace(/48/, `48${dpiSuffix}`); - return ( -
-
{dpi} DPI:
-
{demoUrl}
-
- ); - })} -
- ))} -
+ return ( +
+
{dpi} DPI:
+
{demoUrl}
+
+ ); + })} +
+ ))}
+
- {/* SVG URL Demo */} -
-
getFileTypeIconAsUrl() - SVG Format with Different DPIs
-
- {commonFileTypes.map(extension => ( -
-
.{extension}
- {(['1x', '1.5x', '2x'] as const).map(dpi => { - const url = getFileTypeIconAsUrl({ - extension, - size: 48, - imageFileType: 'svg', - }); + {/* SVG URL Demo */} +
+
getFileTypeIconAsUrl() - SVG Format with Different DPIs
+
+ {commonFileTypes.map(extension => ( +
+
.{extension}
+ {(['1x', '1.5x', '2x'] as const).map(dpi => { + const url = getFileTypeIconAsUrl({ + extension, + size: 48, + imageFileType: 'svg', + }); - // SVG only uses 1.5x for specific DPI ranges, otherwise uses base - const dpiSuffix = dpi === '1.5x' ? '_1.5x' : ''; - const demoUrl = url?.replace(/48/, `48${dpiSuffix}`); + // SVG only uses 1.5x for specific DPI ranges, otherwise uses base + const dpiSuffix = dpi === '1.5x' ? '_1.5x' : ''; + const demoUrl = url?.replace(/48/, `48${dpiSuffix}`); - return ( -
-
{dpi} DPI:
-
{demoUrl}
-
- ); - })} -
- ))} -
+ return ( +
+
{dpi} DPI:
+
{demoUrl}
+
+ ); + })} +
+ ))}
+
- {/* HTML String Demo */} -
-
getFileTypeIconAsHTMLString() - Visual Preview
-
- {commonFileTypes.map(extension => ( -
-
.{extension}
-
-
-
-
HTML Output:
-
- {getFileTypeIconAsHTMLString({ - extension, - size: 48, - imageFileType: 'svg', - })} -
+ {/* HTML String Demo */} +
+
getFileTypeIconAsHTMLString() - Visual Preview
+
+ {commonFileTypes.map(extension => ( +
+
.{extension}
+
+
- ))} -
+
HTML Output:
+
+ {getFileTypeIconAsHTMLString({ + extension, + size: 48, + imageFileType: 'svg', + })} +
+
+ ))}
+
- {/* Comparison at Different Sizes */} -
-
getFileTypeIconAsHTMLString() - Different Sizes
-
- {([16, 24, 48] as const).map(size => ( -
-
Size: {size}px
- {commonFileTypes.map(extension => ( -
-
.{extension}:
-
-
-
+ {/* Comparison at Different Sizes */} +
+
getFileTypeIconAsHTMLString() - Different Sizes
+
+ {([16, 24, 48] as const).map(size => ( +
+
Size: {size}px
+ {commonFileTypes.map(extension => ( +
+
.{extension}:
+
+
- ))} -
- ))} -
+
+ ))} +
+ ))}
+
- {/* Interactive Example */} -
-
Current Device Information
-
- Device Pixel Ratio: {typeof window !== 'undefined' ? window.devicePixelRatio : 'N/A'} -
-
- This affects which icon variant is loaded for PNG images. SVG images scale better but may use 1.5x variant - for better rendering. -
+ {/* Interactive Example */} +
+
Current Device Information
+
+ Device Pixel Ratio: {typeof window !== 'undefined' ? window.devicePixelRatio : 'N/A'} +
+
+ This affects which icon variant is loaded for PNG images. SVG images scale better but may use 1.5x variant + for better rendering.
- ); - }, +
+ ); +}; + +export const UrlAndHtml = { + render: UrlAndHtmlComponent, name: 'URL and HTML Functions', parameters: { docs: { diff --git a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/index.stories.tsx b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/index.stories.tsx index 06451131e0a04d..043aecf909fe74 100644 --- a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/index.stories.tsx +++ b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/index.stories.tsx @@ -1,5 +1,6 @@ -import { FileTypeIcon } from '@fluentui/react-file-type-icons'; +/* eslint-disable @fluentui/no-restricted-imports */ import type { Meta } from '@storybook/react'; +import { FileTypeIcon } from '@fluentui/react-file-type-icons'; import descriptionMd from './FileTypeIconDescription.md'; import bestPracticesMd from './FileTypeIconBestPractices.md'; diff --git a/tools/react-integration-tester/tsconfig.lib.json b/tools/react-integration-tester/tsconfig.lib.json index 33eca2c2cdf8c6..71bb06dd725935 100644 --- a/tools/react-integration-tester/tsconfig.lib.json +++ b/tools/react-integration-tester/tsconfig.lib.json @@ -1,6 +1,7 @@ { "extends": "./tsconfig.json", "compilerOptions": { + "rootDir": "src", "outDir": "../../dist/out-tsc", "declaration": true, "types": ["node"] diff --git a/tools/storybook-llms-extractor/src/typings.d.ts b/tools/storybook-llms-extractor/src/typings.d.ts deleted file mode 100644 index 3e63e0662d2ff3..00000000000000 --- a/tools/storybook-llms-extractor/src/typings.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -declare module 'turndown-plugin-gfm' { - import type { Plugin } from 'turndown'; - - export const strikethrough: Plugin; - export const tables: Plugin; - export const taskListItems: Plugin; -} diff --git a/tools/storybook-llms-extractor/tsconfig.lib.json b/tools/storybook-llms-extractor/tsconfig.lib.json index 0e55672051597b..3bcfb1fccd2c99 100644 --- a/tools/storybook-llms-extractor/tsconfig.lib.json +++ b/tools/storybook-llms-extractor/tsconfig.lib.json @@ -2,6 +2,7 @@ "extends": "./tsconfig.json", "compilerOptions": { "module": "CommonJS", + "rootDir": "src", "noEmit": false, "lib": ["ES2020", "DOM"], "declaration": true, diff --git a/tools/visual-regression-assert/tsconfig.lib.json b/tools/visual-regression-assert/tsconfig.lib.json index e8e07a7a01fe7b..27ed0f811a1f10 100644 --- a/tools/visual-regression-assert/tsconfig.lib.json +++ b/tools/visual-regression-assert/tsconfig.lib.json @@ -2,6 +2,7 @@ "extends": "./tsconfig.json", "compilerOptions": { "module": "CommonJS", + "rootDir": "src", "noEmit": false, "lib": ["ES2020"], "declaration": true, From d949974c2b2848d2cb81a12cf9f8ce5645d2d414 Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Tue, 25 Nov 2025 16:56:22 -0800 Subject: [PATCH 052/120] lint and yarn change again --- ...lms-extractor-5bd0b738-e38e-4a5e-bc2c-7861db41e211.json | 7 +++++++ .../src/FileTypeIcon/FileTypeIconUrlAndHtml.stories.tsx | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 change/@fluentui-storybook-llms-extractor-5bd0b738-e38e-4a5e-bc2c-7861db41e211.json diff --git a/change/@fluentui-storybook-llms-extractor-5bd0b738-e38e-4a5e-bc2c-7861db41e211.json b/change/@fluentui-storybook-llms-extractor-5bd0b738-e38e-4a5e-bc2c-7861db41e211.json new file mode 100644 index 00000000000000..d23f99308f1b95 --- /dev/null +++ b/change/@fluentui-storybook-llms-extractor-5bd0b738-e38e-4a5e-bc2c-7861db41e211.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "cleanup of stray .d.ts", + "packageName": "@fluentui/storybook-llms-extractor", + "email": "caperez@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconUrlAndHtml.stories.tsx b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconUrlAndHtml.stories.tsx index 0b6555fb02543e..901c595222c4a5 100644 --- a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconUrlAndHtml.stories.tsx +++ b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconUrlAndHtml.stories.tsx @@ -202,8 +202,8 @@ const UrlAndHtmlComponent = (): JSXElement => { Device Pixel Ratio: {typeof window !== 'undefined' ? window.devicePixelRatio : 'N/A'}
- This affects which icon variant is loaded for PNG images. SVG images scale better but may use 1.5x variant - for better rendering. + This affects which icon variant is loaded for PNG images. SVG images scale better but may use 1.5x variant for + better rendering.
From 2d6e940d7e79f05d1365cadab025b3a8aeeb8397 Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Tue, 25 Nov 2025 17:06:09 -0800 Subject: [PATCH 053/120] undoing overeager deletion of a file i had no business touching --- ...lms-extractor-5bd0b738-e38e-4a5e-bc2c-7861db41e211.json | 7 ------- tools/storybook-llms-extractor/src/typings.d.ts | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) delete mode 100644 change/@fluentui-storybook-llms-extractor-5bd0b738-e38e-4a5e-bc2c-7861db41e211.json create mode 100644 tools/storybook-llms-extractor/src/typings.d.ts diff --git a/change/@fluentui-storybook-llms-extractor-5bd0b738-e38e-4a5e-bc2c-7861db41e211.json b/change/@fluentui-storybook-llms-extractor-5bd0b738-e38e-4a5e-bc2c-7861db41e211.json deleted file mode 100644 index d23f99308f1b95..00000000000000 --- a/change/@fluentui-storybook-llms-extractor-5bd0b738-e38e-4a5e-bc2c-7861db41e211.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "patch", - "comment": "cleanup of stray .d.ts", - "packageName": "@fluentui/storybook-llms-extractor", - "email": "caperez@microsoft.com", - "dependentChangeType": "patch" -} diff --git a/tools/storybook-llms-extractor/src/typings.d.ts b/tools/storybook-llms-extractor/src/typings.d.ts new file mode 100644 index 00000000000000..3e63e0662d2ff3 --- /dev/null +++ b/tools/storybook-llms-extractor/src/typings.d.ts @@ -0,0 +1,7 @@ +declare module 'turndown-plugin-gfm' { + import type { Plugin } from 'turndown'; + + export const strikethrough: Plugin; + export const tables: Plugin; + export const taskListItems: Plugin; +} From ba6015cf72f8835f33e99028d757625477d8f9c9 Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Tue, 25 Nov 2025 17:10:16 -0800 Subject: [PATCH 054/120] fixing compilation config issues - no change --- ...lms-extractor-1e20ce18-54fc-412a-bcaa-65ecabde4e57.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 change/@fluentui-storybook-llms-extractor-1e20ce18-54fc-412a-bcaa-65ecabde4e57.json diff --git a/change/@fluentui-storybook-llms-extractor-1e20ce18-54fc-412a-bcaa-65ecabde4e57.json b/change/@fluentui-storybook-llms-extractor-1e20ce18-54fc-412a-bcaa-65ecabde4e57.json new file mode 100644 index 00000000000000..8f4167c2d18c7b --- /dev/null +++ b/change/@fluentui-storybook-llms-extractor-1e20ce18-54fc-412a-bcaa-65ecabde4e57.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "fixing compilation config issues", + "packageName": "@fluentui/storybook-llms-extractor", + "email": "caperez@microsoft.com", + "dependentChangeType": "none" +} From c2ad25aacad60a5ef4845efc9d74646b56ffe1d1 Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Tue, 25 Nov 2025 18:03:21 -0800 Subject: [PATCH 055/120] Refactor UrlAndHtml component export and update story parameters --- .../FileTypeIconUrlAndHtml.stories.tsx | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconUrlAndHtml.stories.tsx b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconUrlAndHtml.stories.tsx index 901c595222c4a5..47b449e1e39170 100644 --- a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconUrlAndHtml.stories.tsx +++ b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconUrlAndHtml.stories.tsx @@ -68,7 +68,7 @@ const useStyles = makeStyles({ const commonFileTypes = ['docx', 'pdf', 'xlsx']; -const UrlAndHtmlComponent = (): JSXElement => { +export const UrlAndHtml = (): JSXElement => { const styles = useStyles(); return ( @@ -210,15 +210,13 @@ const UrlAndHtmlComponent = (): JSXElement => { ); }; -export const UrlAndHtml = { - render: UrlAndHtmlComponent, - name: 'URL and HTML Functions', - parameters: { - docs: { - description: { - story: - 'Demonstrates the `getFileTypeIconAsUrl()` and `getFileTypeIconAsHTMLString()` utility functions with different DPI settings (1x, 1.5x, 2x) and common file types (docx, pdf, xlsx). These functions are useful when you need direct access to CDN URLs or HTML markup for file type icons.', - }, +UrlAndHtml.parameters = { + docs: { + description: { + story: + 'Demonstrates the `getFileTypeIconAsUrl()` and `getFileTypeIconAsHTMLString()` utility functions with different DPI settings (1x, 1.5x, 2x) and common file types (docx, pdf, xlsx). These functions are useful when you need direct access to CDN URLs or HTML markup for file type icons.', }, }, }; + +UrlAndHtml.storyName = 'URL and HTML Functions'; From c31ef7ea2e47194a1e48a1f47f5697ba3783d47c Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Tue, 25 Nov 2025 18:37:14 -0800 Subject: [PATCH 056/120] Add device pixel ratio state and effect to UrlAndHtml component to pass ci/cd test --- .../src/FileTypeIcon/FileTypeIconUrlAndHtml.stories.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconUrlAndHtml.stories.tsx b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconUrlAndHtml.stories.tsx index 47b449e1e39170..5bdecbd82d1182 100644 --- a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconUrlAndHtml.stories.tsx +++ b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconUrlAndHtml.stories.tsx @@ -70,6 +70,11 @@ const commonFileTypes = ['docx', 'pdf', 'xlsx']; export const UrlAndHtml = (): JSXElement => { const styles = useStyles(); + const [devicePixelRatio, setDevicePixelRatio] = React.useState('N/A'); + + React.useEffect(() => { + setDevicePixelRatio(window.devicePixelRatio); + }, []); return (
@@ -199,7 +204,7 @@ export const UrlAndHtml = (): JSXElement => {
Current Device Information
- Device Pixel Ratio: {typeof window !== 'undefined' ? window.devicePixelRatio : 'N/A'} + Device Pixel Ratio: {devicePixelRatio}
This affects which icon variant is loaded for PNG images. SVG images scale better but may use 1.5x variant for From 6c94223d24488a63ea05b33dfc943516dfe8cfce Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Tue, 25 Nov 2025 19:05:25 -0800 Subject: [PATCH 057/120] yarn nx format:write prettier --- .../src/FileTypeIcon/FileTypeIconUrlAndHtml.stories.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconUrlAndHtml.stories.tsx b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconUrlAndHtml.stories.tsx index 5bdecbd82d1182..9af847edfcc730 100644 --- a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconUrlAndHtml.stories.tsx +++ b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconUrlAndHtml.stories.tsx @@ -203,9 +203,7 @@ export const UrlAndHtml = (): JSXElement => { {/* Interactive Example */}
Current Device Information
-
- Device Pixel Ratio: {devicePixelRatio} -
+
Device Pixel Ratio: {devicePixelRatio}
This affects which icon variant is loaded for PNG images. SVG images scale better but may use 1.5x variant for better rendering. From 917f8782849cf555d150f10d691e57f9dc207118 Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Tue, 25 Nov 2025 23:04:53 -0800 Subject: [PATCH 058/120] dead end ci/cd solving ci/main no dice --- .../src/PortalCompat.cy.tsx | 2 +- tools/workspace-plugin/project.json | 8 ++ .../src/executors/build/executor.spec.ts | 32 ++++--- .../src/executors/build/lib/assets.spec.ts | 14 +-- .../src/executors/clean/executor.spec.ts | 8 +- .../executors/generate-api/executor.spec.ts | 10 +- .../generators/eslint-rule/generator.spec.ts | 2 +- .../migrate-converged-pkg/index.spec.ts | 4 +- .../generators/move-packages/index.spec.ts | 94 +++++++++++-------- .../generators/react-component/index.spec.ts | 28 +++--- .../generators/react-library/index.spec.ts | 12 +-- .../split-library-in-two/generator.spec.ts | 10 +- .../src/plugins/testing-utils/temp-fs.ts | 55 ++++++++++- 13 files changed, 177 insertions(+), 102 deletions(-) diff --git a/packages/react-components/react-portal-compat/src/PortalCompat.cy.tsx b/packages/react-components/react-portal-compat/src/PortalCompat.cy.tsx index e564a0a72fd66c..0422af5a5c7479 100644 --- a/packages/react-components/react-portal-compat/src/PortalCompat.cy.tsx +++ b/packages/react-components/react-portal-compat/src/PortalCompat.cy.tsx @@ -3,7 +3,7 @@ import { mount as mountBase } from '@fluentui/scripts-cypress'; import { FluentProvider } from '@fluentui/react-provider'; import { teamsLightTheme } from '@fluentui/react-theme'; import type { JSXElement } from '@fluentui/react-utilities/'; -import { PortalCompatProvider } from '@fluentui/react-portal-compat'; +import { PortalCompatProvider } from './index'; import { usePortalCompat } from '@fluentui/react-portal-compat-context'; const mount = (element: JSXElement) => { diff --git a/tools/workspace-plugin/project.json b/tools/workspace-plugin/project.json index 7fea5bc0475bed..078fa3542d1d4e 100644 --- a/tools/workspace-plugin/project.json +++ b/tools/workspace-plugin/project.json @@ -41,6 +41,14 @@ "options": { "cwd": "{projectRoot}" } + }, + "test": { + "executor": "@nx/jest:jest", + "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], + "options": { + "jestConfig": "tools/workspace-plugin/jest.config.ts", + "passWithNoTests": true + } } } } diff --git a/tools/workspace-plugin/src/executors/build/executor.spec.ts b/tools/workspace-plugin/src/executors/build/executor.spec.ts index 73cd97294c5e8f..daa4f06459cf10 100644 --- a/tools/workspace-plugin/src/executors/build/executor.spec.ts +++ b/tools/workspace-plugin/src/executors/build/executor.spec.ts @@ -86,13 +86,15 @@ describe('Build Executor', () => { // mute api extractor - END }); - it('runs build and api-generation and fails on api update', async () => { - const loggerLogSpy = jest.spyOn(logger, 'log').mockImplementation(() => { - return; - }); - const loggerVerboseSpy = jest.spyOn(logger, 'verbose').mockImplementation(() => { - return; - }); + it( + 'runs build and api-generation and fails on api update', + async () => { + const loggerLogSpy = jest.spyOn(logger, 'log').mockImplementation(() => { + return; + }); + const loggerVerboseSpy = jest.spyOn(logger, 'verbose').mockImplementation(() => { + return; + }); const output = await executor(options, context); expect(output.success).toBe(true); @@ -103,9 +105,9 @@ describe('Build Executor', () => { expect(stripIndents`${clearLogs}`).toEqual(stripIndents` Cleaning outputs: - - ${workspaceRoot}/libs/proj/lib-commonjs - - ${workspaceRoot}/libs/proj/lib - - ${workspaceRoot}/libs/proj/dist/assets/spec.md + - ${join(workspaceRoot, 'libs', 'proj', 'lib-commonjs')} + - ${join(workspaceRoot, 'libs', 'proj', 'lib')} + - ${join(workspaceRoot, 'libs', 'proj', 'dist', 'assets', 'spec.md')} `); expect(restOfLogs).toEqual([ @@ -116,22 +118,22 @@ describe('Build Executor', () => { expect(loggerVerboseSpy.mock.calls.flat()).toEqual([ `Applying transforms: 0`, - `babel: transformed ${workspaceRoot}/libs/proj/lib/greeter.styles.js`, + `babel: transformed ${join(workspaceRoot, 'libs', 'proj', 'lib', 'greeter.styles.js')}`, `Applying transforms: 0`, ]); expect(rmMock.mock.calls.flat()).toEqual([ - `${workspaceRoot}/libs/proj/lib-commonjs`, + join(workspaceRoot, 'libs', 'proj', 'lib-commonjs'), { force: true, recursive: true, }, - `${workspaceRoot}/libs/proj/lib`, + join(workspaceRoot, 'libs', 'proj', 'lib'), { force: true, recursive: true, }, - `${workspaceRoot}/libs/proj/dist/assets/spec.md`, + join(workspaceRoot, 'libs', 'proj', 'dist', 'assets', 'spec.md'), { force: true, recursive: true, @@ -387,6 +389,6 @@ describe('Build Executor', () => { expect(existsSync(join(workspaceRoot, 'libs/proj/lib/greeter.styles.raw.js.map'))).toBe(false); expect(existsSync(join(workspaceRoot, 'libs/proj/lib-commonjs/greeter.styles.raw.js'))).toBe(false); expect(existsSync(join(workspaceRoot, 'libs/proj/lib-commonjs/greeter.styles.raw.js.map'))).toBe(false); - }, 60000); + }, 180000); }); }); diff --git a/tools/workspace-plugin/src/executors/build/lib/assets.spec.ts b/tools/workspace-plugin/src/executors/build/lib/assets.spec.ts index f326448aae5fef..06d79d14b17cd9 100644 --- a/tools/workspace-plugin/src/executors/build/lib/assets.spec.ts +++ b/tools/workspace-plugin/src/executors/build/lib/assets.spec.ts @@ -1,4 +1,4 @@ -import { join } from 'node:path'; +import { join, normalize } from 'node:path'; // ==== mock start ==== import { cp } from 'node:fs/promises'; @@ -36,16 +36,16 @@ describe(`assets`, () => { expect(actual).toBe(true); expect(cpMock.mock.calls.flat()).toEqual([ // from - `${rootDir}/libs/proj/world.md`, + join(rootDir, 'libs', 'proj', 'world.md'), // to - `${rootDir}/libs/proj/dist/world.md`, + join(rootDir, 'libs', 'proj', 'dist', 'world.md'), { recursive: true, }, // from - `${rootDir}/libs/proj/hello.txt`, + join(rootDir, 'libs', 'proj', 'hello.txt'), // to - `${rootDir}/libs/proj/dist/copied-assets/hello.txt`, + join(rootDir, 'libs', 'proj', 'dist', 'copied-assets', 'hello.txt'), { recursive: true, }, @@ -72,9 +72,9 @@ describe(`assets`, () => { expect(actual).toBe(true); expect(cpMock.mock.calls.flat()).toEqual([ // from - `${rootDir}/libs/proj/hello.md__tmpl__`, + join(rootDir, 'libs', 'proj', 'hello.md__tmpl__'), // to - `${rootDir}/libs/proj/dist/copied-assets/hello.md`, + join(rootDir, 'libs', 'proj', 'dist', 'copied-assets', 'hello.md'), { recursive: true, }, diff --git a/tools/workspace-plugin/src/executors/clean/executor.spec.ts b/tools/workspace-plugin/src/executors/clean/executor.spec.ts index 38b4bb9d972ee1..72b8107df37cd0 100644 --- a/tools/workspace-plugin/src/executors/clean/executor.spec.ts +++ b/tools/workspace-plugin/src/executors/clean/executor.spec.ts @@ -68,12 +68,12 @@ describe('Clean Executor', () => { expect(output.success).toBe(true); expect(rmMock.mock.calls.flat()).toEqual([ - expect.stringContaining('tools/workspace-plugin/src/executors/clean/__fixtures__/proj/dist'), + join(projRoot, 'dist'), { force: true, recursive: true, }, - expect.stringContaining('tools/workspace-plugin/src/executors/clean/__fixtures__/proj/lib'), + join(projRoot, 'lib'), { force: true, recursive: true, @@ -90,12 +90,12 @@ describe('Clean Executor', () => { expect(output.success).toBe(true); expect(rmMock.mock.calls.flat()).toEqual([ - expect.stringContaining('tools/workspace-plugin/src/executors/clean/__fixtures__/proj/foo-bar'), + join(projRoot, 'foo-bar'), { force: true, recursive: true, }, - expect.stringContaining('tools/workspace-plugin/src/executors/clean/__fixtures__/proj/mr-wick'), + join(projRoot, 'mr-wick'), { force: true, recursive: true, diff --git a/tools/workspace-plugin/src/executors/generate-api/executor.spec.ts b/tools/workspace-plugin/src/executors/generate-api/executor.spec.ts index 378da85a19c1e8..f32fbfd61bbda4 100644 --- a/tools/workspace-plugin/src/executors/generate-api/executor.spec.ts +++ b/tools/workspace-plugin/src/executors/generate-api/executor.spec.ts @@ -5,7 +5,7 @@ import { type ExtractorConfig, type ExtractorResult, } from '@microsoft/api-extractor'; -import { basename, join } from 'node:path'; +import { basename, join, normalize } from 'node:path'; import { mkdirSync, mkdtempSync, rmSync, writeFileSync, readdirSync } from 'node:fs'; import { type TsConfig } from '../../types'; @@ -143,7 +143,7 @@ describe('GenerateApi Executor', () => { try { await executor(options, context); } catch (err) { - expect(err).toMatchInlineSnapshot(`[Error: ${paths.projRoot}/tsconfig.json doesn't exist]`); + expect((err as Error).message).toContain(`tsconfig.json doesn't exist`); } writeFileSync(join(paths.projRoot, 'tsconfig.json'), '{}', 'utf-8'); @@ -151,9 +151,7 @@ describe('GenerateApi Executor', () => { try { await executor(options, context); } catch (err) { - expect(err).toMatchInlineSnapshot( - `[Error: Cannot find api-extractor.json at "${paths.projRoot}/config/api-extractor.json"]`, - ); + expect((err as Error).message).toContain(`Cannot find api-extractor.json at`); } }); @@ -172,7 +170,7 @@ describe('GenerateApi Executor', () => { const output = await executor(options, context); expect(execSyncMock.mock.calls.flat()).toEqual([ - `tsc -p ${paths.projRoot}/tsconfig.lib.json --pretty --emitDeclarationOnly --baseUrl ${paths.projRoot}`, + `tsc -p ${join(paths.projRoot, 'tsconfig.lib.json')} --pretty --emitDeclarationOnly --baseUrl ${paths.projRoot}`, { stdio: 'inherit' }, ]); diff --git a/tools/workspace-plugin/src/generators/eslint-rule/generator.spec.ts b/tools/workspace-plugin/src/generators/eslint-rule/generator.spec.ts index 0e1ce9e8a9d43b..dde7f64ef41eb3 100644 --- a/tools/workspace-plugin/src/generators/eslint-rule/generator.spec.ts +++ b/tools/workspace-plugin/src/generators/eslint-rule/generator.spec.ts @@ -15,7 +15,7 @@ describe('eslint-rule generator', () => { jest.spyOn(console, 'info').mockImplementation(noop); tree = createTreeWithEmptyWorkspace(); await lintWorkspaceRulesProjectGenerator(tree, {}); - }); + }, 10000); it('should generate new eslint rule', async () => { const config = readProjectConfiguration(tree, 'eslint-rules'); diff --git a/tools/workspace-plugin/src/generators/migrate-converged-pkg/index.spec.ts b/tools/workspace-plugin/src/generators/migrate-converged-pkg/index.spec.ts index 9ddbc96b6aa064..13dce889761dda 100644 --- a/tools/workspace-plugin/src/generators/migrate-converged-pkg/index.spec.ts +++ b/tools/workspace-plugin/src/generators/migrate-converged-pkg/index.spec.ts @@ -1123,7 +1123,7 @@ describe('migrate-converged-pkg generator', () => { let babelConfig = getBabelConfig(projectConfig); expect(babelConfig).toEqual({ - extends: '../../.babelrc-v9.json', + extends: '../../.babelrc-v9.json'.replace(/\//g, '\\'), plugins: ['annotate-pure-calls', '@babel/transform-react-pure-annotations'], }); @@ -1133,7 +1133,7 @@ describe('migrate-converged-pkg generator', () => { babelConfig = getBabelConfig(projectConfig); expect(babelConfig).toEqual({ - extends: '../../.babelrc-v9.json', + extends: '../../.babelrc-v9.json'.replace(/\//g, '\\'), plugins: ['annotate-pure-calls', '@babel/transform-react-pure-annotations'], }); }); diff --git a/tools/workspace-plugin/src/generators/move-packages/index.spec.ts b/tools/workspace-plugin/src/generators/move-packages/index.spec.ts index 2aa5ee14094003..f22b6da21ec468 100644 --- a/tools/workspace-plugin/src/generators/move-packages/index.spec.ts +++ b/tools/workspace-plugin/src/generators/move-packages/index.spec.ts @@ -59,11 +59,15 @@ describe('move-packages generator', () => { }); describe('general', () => { - it('should run successfully', async () => { - await generator(tree, options); - const config = readProjectConfiguration(tree, options.name); - expect(config).toBeDefined(); - }); + it( + 'should run successfully', + async () => { + await generator(tree, options); + const config = readProjectConfiguration(tree, options.name); + expect(config).toBeDefined(); + }, + 10000, + ); describe('schema validation', () => { it('should throw if --name && --allConverged are both specified', async () => { @@ -205,24 +209,28 @@ describe('move-packages generator', () => { setupDummyPackage(tree, { name: '@proj/react-old', version: '8.0.1' }); }); - it(`should move all v9 packages in batch`, async () => { - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const projects = [ - options.name, - '@proj/react-foo', - '@proj/react-bar', - '@proj/react-moo', - '@proj/react-old', - ] as const; - - const destinationFolder = 'testFolder'; - await generator(tree, { allConverged: true, destination: destinationFolder }); - - expect(tree.exists(`packages/${destinationFolder}/react-foo/src/index.ts`)).toBeTruthy(); - expect(tree.exists(`packages/${destinationFolder}/react-bar/src/index.ts`)).toBeTruthy(); - expect(tree.exists(`packages/${destinationFolder}/react-moo/src/index.ts`)).toBeTruthy(); - expect(tree.exists(`packages/${destinationFolder}/react-old/src/index.ts`)).toBeFalsy(); - }); + it( + `should move all v9 packages in batch`, + async () => { + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const projects = [ + options.name, + '@proj/react-foo', + '@proj/react-bar', + '@proj/react-moo', + '@proj/react-old', + ] as const; + + const destinationFolder = 'testFolder'; + await generator(tree, { allConverged: true, destination: destinationFolder }); + + expect(tree.exists(`packages/${destinationFolder}/react-foo/src/index.ts`)).toBeTruthy(); + expect(tree.exists(`packages/${destinationFolder}/react-bar/src/index.ts`)).toBeTruthy(); + expect(tree.exists(`packages/${destinationFolder}/react-moo/src/index.ts`)).toBeTruthy(); + expect(tree.exists(`packages/${destinationFolder}/react-old/src/index.ts`)).toBeFalsy(); + }, + 10000, + ); }); describe('--allV8', () => { @@ -233,24 +241,28 @@ describe('move-packages generator', () => { setupDummyPackage(tree, { name: '@proj/react-old', version: '9.0.1' }); }); - it(`should move all v8 packages in batch`, async () => { - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const projects = [ - options.name, - '@proj/react-foo', - '@proj/react-bar', - '@proj/react-moo', - '@proj/react-old', - ] as const; - - const destinationFolder = 'testFolder'; - await generator(tree, { allV8: true, destination: destinationFolder }); - - expect(tree.exists(`packages/${destinationFolder}/react-foo/src/index.ts`)).toBeTruthy(); - expect(tree.exists(`packages/${destinationFolder}/react-bar/src/index.ts`)).toBeTruthy(); - expect(tree.exists(`packages/${destinationFolder}/react-moo/src/index.ts`)).toBeTruthy(); - expect(tree.exists(`packages/${destinationFolder}/react-old/src/index.ts`)).toBeFalsy(); - }); + it( + `should move all v8 packages in batch`, + async () => { + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const projects = [ + options.name, + '@proj/react-foo', + '@proj/react-bar', + '@proj/react-moo', + '@proj/react-old', + ] as const; + + const destinationFolder = 'testFolder'; + await generator(tree, { allV8: true, destination: destinationFolder }); + + expect(tree.exists(`packages/${destinationFolder}/react-foo/src/index.ts`)).toBeTruthy(); + expect(tree.exists(`packages/${destinationFolder}/react-bar/src/index.ts`)).toBeTruthy(); + expect(tree.exists(`packages/${destinationFolder}/react-moo/src/index.ts`)).toBeTruthy(); + expect(tree.exists(`packages/${destinationFolder}/react-old/src/index.ts`)).toBeFalsy(); + }, + 10000, + ); }); }); diff --git a/tools/workspace-plugin/src/generators/react-component/index.spec.ts b/tools/workspace-plugin/src/generators/react-component/index.spec.ts index 80f342159309c0..eff4c2f3eb7328 100644 --- a/tools/workspace-plugin/src/generators/react-component/index.spec.ts +++ b/tools/workspace-plugin/src/generators/react-component/index.spec.ts @@ -20,16 +20,20 @@ describe('react-component generator', () => { } }); - it(`should throw error if component already exists`, async () => { - createLibrary(tree, 'react-one'); - await generator(tree, { project: 'react-one', name: 'MyOne' }); - - try { + it( + `should throw error if component already exists`, + async () => { + createLibrary(tree, 'react-one'); await generator(tree, { project: 'react-one', name: 'MyOne' }); - } catch (err) { - expect(err).toMatchInlineSnapshot(`[Error: The component "MyOne" already exists]`); - } - }); + + try { + await generator(tree, { project: 'react-one', name: 'MyOne' }); + } catch (err) { + expect(err).toMatchInlineSnapshot(`[Error: The component "MyOne" already exists]`); + } + }, + 10000, + ); }); describe(`component`, () => { @@ -70,7 +74,8 @@ describe('react-component generator', () => { " `); - expect(tree.children(componentRootPath)).toMatchInlineSnapshot(` + const children = tree.children(componentRootPath).sort(); + expect(children).toMatchInlineSnapshot(` Array [ "MyOne.test.tsx", "MyOne.tsx", @@ -267,7 +272,8 @@ describe('react-component generator', () => { : 'packages/react-components/react-one/stories/src/MyOne'; await generator(tree, { project: 'react-one', name: 'MyOne' }); - expect(tree.children(componentStoryRootPath)).toMatchInlineSnapshot(` + const storyChildren = tree.children(componentStoryRootPath).sort(); + expect(storyChildren).toMatchInlineSnapshot(` Array [ "MyOneBestPractices.md", "MyOneDefault.stories.tsx", diff --git a/tools/workspace-plugin/src/generators/react-library/index.spec.ts b/tools/workspace-plugin/src/generators/react-library/index.spec.ts index 0bc3f897812ec4..dea5a6563c8629 100644 --- a/tools/workspace-plugin/src/generators/react-library/index.spec.ts +++ b/tools/workspace-plugin/src/generators/react-library/index.spec.ts @@ -55,14 +55,14 @@ describe('react-library generator', () => { "project.json", ".babelrc.json", ".swcrc", - "LICENSE", - "README.md", "config", "docs", "eslint.config.js", "etc", "jest.config.js", + "LICENSE", "package.json", + "README.md", "src", "tsconfig.json", "tsconfig.lib.json", @@ -249,7 +249,7 @@ describe('react-library generator', () => { packages/react-components/react-one-preview/stories @org/chosen-one `), ); - }); + }, 10000); it(`should create compat package`, async () => { setup(tree); @@ -265,14 +265,14 @@ describe('react-library generator', () => { "project.json", ".babelrc.json", ".swcrc", - "LICENSE", - "README.md", "config", "docs", "eslint.config.js", "etc", "jest.config.js", + "LICENSE", "package.json", + "README.md", "src", "tsconfig.json", "tsconfig.lib.json", @@ -309,7 +309,7 @@ describe('react-library generator', () => { tags: ['vNext', 'platform:web', 'compat', 'type:stories'], }), ); - }); + }, 10000); }); function setup(tree: Tree) { diff --git a/tools/workspace-plugin/src/generators/split-library-in-two/generator.spec.ts b/tools/workspace-plugin/src/generators/split-library-in-two/generator.spec.ts index 3b1ecf8b4eb22a..fdf1305eeb5485 100644 --- a/tools/workspace-plugin/src/generators/split-library-in-two/generator.spec.ts +++ b/tools/workspace-plugin/src/generators/split-library-in-two/generator.spec.ts @@ -34,10 +34,12 @@ describe('split-library-in-two generator', () => { jest.spyOn(output, 'error').mockImplementation(noop); }); - it('should split v9 project into 2', async () => { - const oldConfig = readProjectConfiguration(tree, options.project); + it( + 'should split v9 project into 2', + async () => { + const oldConfig = readProjectConfiguration(tree, options.project); - await splitLibraryInTwoGenerator(tree, options); + await splitLibraryInTwoGenerator(tree, options); const newConfig = readProjectConfiguration(tree, options.project); const storiesConfig = readProjectConfiguration(tree, `${options.project}-stories`); @@ -324,7 +326,7 @@ describe('split-library-in-two generator', () => { export const tags = ['autodocs']; " `); - }); + }, 10000); }); function setup(tree: Tree) { diff --git a/tools/workspace-plugin/src/plugins/testing-utils/temp-fs.ts b/tools/workspace-plugin/src/plugins/testing-utils/temp-fs.ts index 46b97b314a24e8..3a280fa7fa43ea 100644 --- a/tools/workspace-plugin/src/plugins/testing-utils/temp-fs.ts +++ b/tools/workspace-plugin/src/plugins/testing-utils/temp-fs.ts @@ -90,12 +90,59 @@ export class TempFs { } cleanup() { - rmSync(this.tempDir, { recursive: true, force: true }); - setWorkspaceRoot(this.previousWorkspaceRoot); + // Retry cleanup on Windows to handle EBUSY errors + let attempts = 0; + const maxAttempts = 3; + while (attempts < maxAttempts) { + try { + rmSync(this.tempDir, { recursive: true, force: true }); + setWorkspaceRoot(this.previousWorkspaceRoot); + return; + } catch (error: any) { + attempts++; + if (attempts >= maxAttempts || !error?.code || error.code !== 'EBUSY') { + // If we've exhausted retries or it's a different error, just continue + // Don't throw to avoid breaking tests + console.warn(`Failed to cleanup temp directory after ${attempts} attempts:`, error.message); + setWorkspaceRoot(this.previousWorkspaceRoot); + return; + } + // Wait before retry with exponential backoff + const delay = 100 * Math.pow(2, attempts - 1); + const start = Date.now(); + while (Date.now() - start < delay) { + // Busy wait + } + } + } } reset() { - rmSync(this.tempDir, { recursive: true, force: true }); - mkdirSync(this.tempDir, { recursive: true }); + // Retry reset on Windows to handle EBUSY errors + let attempts = 0; + const maxAttempts = 3; + while (attempts < maxAttempts) { + try { + rmSync(this.tempDir, { recursive: true, force: true }); + mkdirSync(this.tempDir, { recursive: true }); + return; + } catch (error: any) { + attempts++; + if (attempts >= maxAttempts || !error?.code || error.code !== 'EBUSY') { + console.warn(`Failed to reset temp directory after ${attempts} attempts:`, error.message); + // Try to at least create the directory if it doesn't exist + if (!existsSync(this.tempDir)) { + mkdirSync(this.tempDir, { recursive: true }); + } + return; + } + // Wait before retry with exponential backoff + const delay = 100 * Math.pow(2, attempts - 1); + const start = Date.now(); + while (Date.now() - start < delay) { + // Busy wait + } + } + } } } From f1984d181a405ad2ee698a17afa5e54365c830dc Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Tue, 25 Nov 2025 23:20:34 -0800 Subject: [PATCH 059/120] first late undo --- ...-3335c1ee-ca00-4b7f-b234-b8326800843d.json | 7 -- .../chart-web-components/CHANGELOG.json | 15 +++ .../charts/chart-web-components/CHANGELOG.md | 11 ++- .../charts/chart-web-components/package.json | 4 +- .../src/PortalCompat.cy.tsx | 2 +- packages/web-components/CHANGELOG.json | 15 +++ packages/web-components/CHANGELOG.md | 11 ++- packages/web-components/package.json | 2 +- tools/workspace-plugin/project.json | 8 -- .../src/executors/build/executor.spec.ts | 32 +++---- .../src/executors/build/lib/assets.spec.ts | 14 +-- .../src/executors/clean/executor.spec.ts | 8 +- .../executors/generate-api/executor.spec.ts | 10 +- .../generators/eslint-rule/generator.spec.ts | 2 +- .../migrate-converged-pkg/index.spec.ts | 4 +- .../generators/move-packages/index.spec.ts | 94 ++++++++----------- .../generators/react-component/index.spec.ts | 28 +++--- .../generators/react-library/index.spec.ts | 12 +-- .../split-library-in-two/generator.spec.ts | 10 +- .../src/plugins/testing-utils/temp-fs.ts | 55 +---------- 20 files changed, 155 insertions(+), 189 deletions(-) delete mode 100644 change/@fluentui-web-components-3335c1ee-ca00-4b7f-b234-b8326800843d.json diff --git a/change/@fluentui-web-components-3335c1ee-ca00-4b7f-b234-b8326800843d.json b/change/@fluentui-web-components-3335c1ee-ca00-4b7f-b234-b8326800843d.json deleted file mode 100644 index a865801d178161..00000000000000 --- a/change/@fluentui-web-components-3335c1ee-ca00-4b7f-b234-b8326800843d.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "prerelease", - "comment": "move web components package from beta to release candidate", - "packageName": "@fluentui/web-components", - "email": "13071055+chrisdholt@users.noreply.github.com", - "dependentChangeType": "patch" -} diff --git a/packages/charts/chart-web-components/CHANGELOG.json b/packages/charts/chart-web-components/CHANGELOG.json index 45f563fb3e75e7..49a43743e6bf02 100644 --- a/packages/charts/chart-web-components/CHANGELOG.json +++ b/packages/charts/chart-web-components/CHANGELOG.json @@ -1,6 +1,21 @@ { "name": "@fluentui/chart-web-components", "entries": [ + { + "date": "Wed, 26 Nov 2025 04:06:59 GMT", + "tag": "@fluentui/chart-web-components_v0.0.59", + "version": "0.0.59", + "comments": { + "patch": [ + { + "author": "beachball", + "package": "@fluentui/chart-web-components", + "comment": "Bump @fluentui/web-components to v3.0.0-rc.1", + "commit": "0c388e45a89a459efa4d8dc023fcebeadccc4f40" + } + ] + } + }, { "date": "Wed, 12 Nov 2025 04:07:28 GMT", "tag": "@fluentui/chart-web-components_v0.0.58", diff --git a/packages/charts/chart-web-components/CHANGELOG.md b/packages/charts/chart-web-components/CHANGELOG.md index 2172899e5ace58..da1e352ff09d19 100644 --- a/packages/charts/chart-web-components/CHANGELOG.md +++ b/packages/charts/chart-web-components/CHANGELOG.md @@ -1,9 +1,18 @@ # Change Log - @fluentui/chart-web-components -This log was last generated on Wed, 12 Nov 2025 04:07:28 GMT and should not be manually modified. +This log was last generated on Wed, 26 Nov 2025 04:06:59 GMT and should not be manually modified. +## [0.0.59](https://github.com/microsoft/fluentui/tree/@fluentui/chart-web-components_v0.0.59) + +Wed, 26 Nov 2025 04:06:59 GMT +[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/chart-web-components_v0.0.58..@fluentui/chart-web-components_v0.0.59) + +### Patches + +- Bump @fluentui/web-components to v3.0.0-rc.1 ([PR #35499](https://github.com/microsoft/fluentui/pull/35499) by beachball) + ## [0.0.58](https://github.com/microsoft/fluentui/tree/@fluentui/chart-web-components_v0.0.58) Wed, 12 Nov 2025 04:07:28 GMT diff --git a/packages/charts/chart-web-components/package.json b/packages/charts/chart-web-components/package.json index 5029e66da8feb5..bc15d1fd30df27 100644 --- a/packages/charts/chart-web-components/package.json +++ b/packages/charts/chart-web-components/package.json @@ -1,7 +1,7 @@ { "name": "@fluentui/chart-web-components", "description": "A library of Fluent Chart Web Components", - "version": "0.0.58", + "version": "0.0.59", "author": { "name": "Microsoft" }, @@ -71,7 +71,7 @@ "dependencies": { "@microsoft/fast-web-utilities": "^6.0.0", "@fluentui/tokens": "^1.0.0-alpha.22", - "@fluentui/web-components": "^3.0.0-beta.133", + "@fluentui/web-components": "^3.0.0-rc.1", "@types/d3-selection": "^3.0.0", "@types/d3-shape": "^3.0.0", "d3-selection": "^3.0.0", diff --git a/packages/react-components/react-portal-compat/src/PortalCompat.cy.tsx b/packages/react-components/react-portal-compat/src/PortalCompat.cy.tsx index 0422af5a5c7479..e564a0a72fd66c 100644 --- a/packages/react-components/react-portal-compat/src/PortalCompat.cy.tsx +++ b/packages/react-components/react-portal-compat/src/PortalCompat.cy.tsx @@ -3,7 +3,7 @@ import { mount as mountBase } from '@fluentui/scripts-cypress'; import { FluentProvider } from '@fluentui/react-provider'; import { teamsLightTheme } from '@fluentui/react-theme'; import type { JSXElement } from '@fluentui/react-utilities/'; -import { PortalCompatProvider } from './index'; +import { PortalCompatProvider } from '@fluentui/react-portal-compat'; import { usePortalCompat } from '@fluentui/react-portal-compat-context'; const mount = (element: JSXElement) => { diff --git a/packages/web-components/CHANGELOG.json b/packages/web-components/CHANGELOG.json index 92d289a10d4ce7..9f173d23cee0bf 100644 --- a/packages/web-components/CHANGELOG.json +++ b/packages/web-components/CHANGELOG.json @@ -1,6 +1,21 @@ { "name": "@fluentui/web-components", "entries": [ + { + "date": "Wed, 26 Nov 2025 04:06:59 GMT", + "tag": "@fluentui/web-components_v3.0.0-rc.1", + "version": "3.0.0-rc.1", + "comments": { + "prerelease": [ + { + "author": "13071055+chrisdholt@users.noreply.github.com", + "package": "@fluentui/web-components", + "commit": "0c388e45a89a459efa4d8dc023fcebeadccc4f40", + "comment": "move web components package from beta to release candidate" + } + ] + } + }, { "date": "Wed, 12 Nov 2025 04:07:28 GMT", "tag": "@fluentui/web-components_v3.0.0-beta.133", diff --git a/packages/web-components/CHANGELOG.md b/packages/web-components/CHANGELOG.md index ac91de83d0cf64..da3b82dba6ce0d 100644 --- a/packages/web-components/CHANGELOG.md +++ b/packages/web-components/CHANGELOG.md @@ -1,9 +1,18 @@ # Change Log - @fluentui/web-components -This log was last generated on Wed, 12 Nov 2025 04:07:28 GMT and should not be manually modified. +This log was last generated on Wed, 26 Nov 2025 04:06:59 GMT and should not be manually modified. +## [3.0.0-rc.1](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v3.0.0-rc.1) + +Wed, 26 Nov 2025 04:06:59 GMT +[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v3.0.0-beta.133..@fluentui/web-components_v3.0.0-rc.1) + +### Changes + +- move web components package from beta to release candidate ([PR #35499](https://github.com/microsoft/fluentui/pull/35499) by 13071055+chrisdholt@users.noreply.github.com) + ## [3.0.0-beta.133](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v3.0.0-beta.133) Wed, 12 Nov 2025 04:07:28 GMT diff --git a/packages/web-components/package.json b/packages/web-components/package.json index 6e343fb2719335..7fda873e49f2c2 100644 --- a/packages/web-components/package.json +++ b/packages/web-components/package.json @@ -1,7 +1,7 @@ { "name": "@fluentui/web-components", "description": "A library of Fluent Web Components", - "version": "3.0.0-rc.0", + "version": "3.0.0-rc.1", "author": { "name": "Microsoft", "url": "https://discord.gg/FcSNfg4" diff --git a/tools/workspace-plugin/project.json b/tools/workspace-plugin/project.json index 078fa3542d1d4e..7fea5bc0475bed 100644 --- a/tools/workspace-plugin/project.json +++ b/tools/workspace-plugin/project.json @@ -41,14 +41,6 @@ "options": { "cwd": "{projectRoot}" } - }, - "test": { - "executor": "@nx/jest:jest", - "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], - "options": { - "jestConfig": "tools/workspace-plugin/jest.config.ts", - "passWithNoTests": true - } } } } diff --git a/tools/workspace-plugin/src/executors/build/executor.spec.ts b/tools/workspace-plugin/src/executors/build/executor.spec.ts index daa4f06459cf10..73cd97294c5e8f 100644 --- a/tools/workspace-plugin/src/executors/build/executor.spec.ts +++ b/tools/workspace-plugin/src/executors/build/executor.spec.ts @@ -86,15 +86,13 @@ describe('Build Executor', () => { // mute api extractor - END }); - it( - 'runs build and api-generation and fails on api update', - async () => { - const loggerLogSpy = jest.spyOn(logger, 'log').mockImplementation(() => { - return; - }); - const loggerVerboseSpy = jest.spyOn(logger, 'verbose').mockImplementation(() => { - return; - }); + it('runs build and api-generation and fails on api update', async () => { + const loggerLogSpy = jest.spyOn(logger, 'log').mockImplementation(() => { + return; + }); + const loggerVerboseSpy = jest.spyOn(logger, 'verbose').mockImplementation(() => { + return; + }); const output = await executor(options, context); expect(output.success).toBe(true); @@ -105,9 +103,9 @@ describe('Build Executor', () => { expect(stripIndents`${clearLogs}`).toEqual(stripIndents` Cleaning outputs: - - ${join(workspaceRoot, 'libs', 'proj', 'lib-commonjs')} - - ${join(workspaceRoot, 'libs', 'proj', 'lib')} - - ${join(workspaceRoot, 'libs', 'proj', 'dist', 'assets', 'spec.md')} + - ${workspaceRoot}/libs/proj/lib-commonjs + - ${workspaceRoot}/libs/proj/lib + - ${workspaceRoot}/libs/proj/dist/assets/spec.md `); expect(restOfLogs).toEqual([ @@ -118,22 +116,22 @@ describe('Build Executor', () => { expect(loggerVerboseSpy.mock.calls.flat()).toEqual([ `Applying transforms: 0`, - `babel: transformed ${join(workspaceRoot, 'libs', 'proj', 'lib', 'greeter.styles.js')}`, + `babel: transformed ${workspaceRoot}/libs/proj/lib/greeter.styles.js`, `Applying transforms: 0`, ]); expect(rmMock.mock.calls.flat()).toEqual([ - join(workspaceRoot, 'libs', 'proj', 'lib-commonjs'), + `${workspaceRoot}/libs/proj/lib-commonjs`, { force: true, recursive: true, }, - join(workspaceRoot, 'libs', 'proj', 'lib'), + `${workspaceRoot}/libs/proj/lib`, { force: true, recursive: true, }, - join(workspaceRoot, 'libs', 'proj', 'dist', 'assets', 'spec.md'), + `${workspaceRoot}/libs/proj/dist/assets/spec.md`, { force: true, recursive: true, @@ -389,6 +387,6 @@ describe('Build Executor', () => { expect(existsSync(join(workspaceRoot, 'libs/proj/lib/greeter.styles.raw.js.map'))).toBe(false); expect(existsSync(join(workspaceRoot, 'libs/proj/lib-commonjs/greeter.styles.raw.js'))).toBe(false); expect(existsSync(join(workspaceRoot, 'libs/proj/lib-commonjs/greeter.styles.raw.js.map'))).toBe(false); - }, 180000); + }, 60000); }); }); diff --git a/tools/workspace-plugin/src/executors/build/lib/assets.spec.ts b/tools/workspace-plugin/src/executors/build/lib/assets.spec.ts index 06d79d14b17cd9..f326448aae5fef 100644 --- a/tools/workspace-plugin/src/executors/build/lib/assets.spec.ts +++ b/tools/workspace-plugin/src/executors/build/lib/assets.spec.ts @@ -1,4 +1,4 @@ -import { join, normalize } from 'node:path'; +import { join } from 'node:path'; // ==== mock start ==== import { cp } from 'node:fs/promises'; @@ -36,16 +36,16 @@ describe(`assets`, () => { expect(actual).toBe(true); expect(cpMock.mock.calls.flat()).toEqual([ // from - join(rootDir, 'libs', 'proj', 'world.md'), + `${rootDir}/libs/proj/world.md`, // to - join(rootDir, 'libs', 'proj', 'dist', 'world.md'), + `${rootDir}/libs/proj/dist/world.md`, { recursive: true, }, // from - join(rootDir, 'libs', 'proj', 'hello.txt'), + `${rootDir}/libs/proj/hello.txt`, // to - join(rootDir, 'libs', 'proj', 'dist', 'copied-assets', 'hello.txt'), + `${rootDir}/libs/proj/dist/copied-assets/hello.txt`, { recursive: true, }, @@ -72,9 +72,9 @@ describe(`assets`, () => { expect(actual).toBe(true); expect(cpMock.mock.calls.flat()).toEqual([ // from - join(rootDir, 'libs', 'proj', 'hello.md__tmpl__'), + `${rootDir}/libs/proj/hello.md__tmpl__`, // to - join(rootDir, 'libs', 'proj', 'dist', 'copied-assets', 'hello.md'), + `${rootDir}/libs/proj/dist/copied-assets/hello.md`, { recursive: true, }, diff --git a/tools/workspace-plugin/src/executors/clean/executor.spec.ts b/tools/workspace-plugin/src/executors/clean/executor.spec.ts index 72b8107df37cd0..38b4bb9d972ee1 100644 --- a/tools/workspace-plugin/src/executors/clean/executor.spec.ts +++ b/tools/workspace-plugin/src/executors/clean/executor.spec.ts @@ -68,12 +68,12 @@ describe('Clean Executor', () => { expect(output.success).toBe(true); expect(rmMock.mock.calls.flat()).toEqual([ - join(projRoot, 'dist'), + expect.stringContaining('tools/workspace-plugin/src/executors/clean/__fixtures__/proj/dist'), { force: true, recursive: true, }, - join(projRoot, 'lib'), + expect.stringContaining('tools/workspace-plugin/src/executors/clean/__fixtures__/proj/lib'), { force: true, recursive: true, @@ -90,12 +90,12 @@ describe('Clean Executor', () => { expect(output.success).toBe(true); expect(rmMock.mock.calls.flat()).toEqual([ - join(projRoot, 'foo-bar'), + expect.stringContaining('tools/workspace-plugin/src/executors/clean/__fixtures__/proj/foo-bar'), { force: true, recursive: true, }, - join(projRoot, 'mr-wick'), + expect.stringContaining('tools/workspace-plugin/src/executors/clean/__fixtures__/proj/mr-wick'), { force: true, recursive: true, diff --git a/tools/workspace-plugin/src/executors/generate-api/executor.spec.ts b/tools/workspace-plugin/src/executors/generate-api/executor.spec.ts index f32fbfd61bbda4..378da85a19c1e8 100644 --- a/tools/workspace-plugin/src/executors/generate-api/executor.spec.ts +++ b/tools/workspace-plugin/src/executors/generate-api/executor.spec.ts @@ -5,7 +5,7 @@ import { type ExtractorConfig, type ExtractorResult, } from '@microsoft/api-extractor'; -import { basename, join, normalize } from 'node:path'; +import { basename, join } from 'node:path'; import { mkdirSync, mkdtempSync, rmSync, writeFileSync, readdirSync } from 'node:fs'; import { type TsConfig } from '../../types'; @@ -143,7 +143,7 @@ describe('GenerateApi Executor', () => { try { await executor(options, context); } catch (err) { - expect((err as Error).message).toContain(`tsconfig.json doesn't exist`); + expect(err).toMatchInlineSnapshot(`[Error: ${paths.projRoot}/tsconfig.json doesn't exist]`); } writeFileSync(join(paths.projRoot, 'tsconfig.json'), '{}', 'utf-8'); @@ -151,7 +151,9 @@ describe('GenerateApi Executor', () => { try { await executor(options, context); } catch (err) { - expect((err as Error).message).toContain(`Cannot find api-extractor.json at`); + expect(err).toMatchInlineSnapshot( + `[Error: Cannot find api-extractor.json at "${paths.projRoot}/config/api-extractor.json"]`, + ); } }); @@ -170,7 +172,7 @@ describe('GenerateApi Executor', () => { const output = await executor(options, context); expect(execSyncMock.mock.calls.flat()).toEqual([ - `tsc -p ${join(paths.projRoot, 'tsconfig.lib.json')} --pretty --emitDeclarationOnly --baseUrl ${paths.projRoot}`, + `tsc -p ${paths.projRoot}/tsconfig.lib.json --pretty --emitDeclarationOnly --baseUrl ${paths.projRoot}`, { stdio: 'inherit' }, ]); diff --git a/tools/workspace-plugin/src/generators/eslint-rule/generator.spec.ts b/tools/workspace-plugin/src/generators/eslint-rule/generator.spec.ts index dde7f64ef41eb3..0e1ce9e8a9d43b 100644 --- a/tools/workspace-plugin/src/generators/eslint-rule/generator.spec.ts +++ b/tools/workspace-plugin/src/generators/eslint-rule/generator.spec.ts @@ -15,7 +15,7 @@ describe('eslint-rule generator', () => { jest.spyOn(console, 'info').mockImplementation(noop); tree = createTreeWithEmptyWorkspace(); await lintWorkspaceRulesProjectGenerator(tree, {}); - }, 10000); + }); it('should generate new eslint rule', async () => { const config = readProjectConfiguration(tree, 'eslint-rules'); diff --git a/tools/workspace-plugin/src/generators/migrate-converged-pkg/index.spec.ts b/tools/workspace-plugin/src/generators/migrate-converged-pkg/index.spec.ts index 13dce889761dda..9ddbc96b6aa064 100644 --- a/tools/workspace-plugin/src/generators/migrate-converged-pkg/index.spec.ts +++ b/tools/workspace-plugin/src/generators/migrate-converged-pkg/index.spec.ts @@ -1123,7 +1123,7 @@ describe('migrate-converged-pkg generator', () => { let babelConfig = getBabelConfig(projectConfig); expect(babelConfig).toEqual({ - extends: '../../.babelrc-v9.json'.replace(/\//g, '\\'), + extends: '../../.babelrc-v9.json', plugins: ['annotate-pure-calls', '@babel/transform-react-pure-annotations'], }); @@ -1133,7 +1133,7 @@ describe('migrate-converged-pkg generator', () => { babelConfig = getBabelConfig(projectConfig); expect(babelConfig).toEqual({ - extends: '../../.babelrc-v9.json'.replace(/\//g, '\\'), + extends: '../../.babelrc-v9.json', plugins: ['annotate-pure-calls', '@babel/transform-react-pure-annotations'], }); }); diff --git a/tools/workspace-plugin/src/generators/move-packages/index.spec.ts b/tools/workspace-plugin/src/generators/move-packages/index.spec.ts index f22b6da21ec468..2aa5ee14094003 100644 --- a/tools/workspace-plugin/src/generators/move-packages/index.spec.ts +++ b/tools/workspace-plugin/src/generators/move-packages/index.spec.ts @@ -59,15 +59,11 @@ describe('move-packages generator', () => { }); describe('general', () => { - it( - 'should run successfully', - async () => { - await generator(tree, options); - const config = readProjectConfiguration(tree, options.name); - expect(config).toBeDefined(); - }, - 10000, - ); + it('should run successfully', async () => { + await generator(tree, options); + const config = readProjectConfiguration(tree, options.name); + expect(config).toBeDefined(); + }); describe('schema validation', () => { it('should throw if --name && --allConverged are both specified', async () => { @@ -209,28 +205,24 @@ describe('move-packages generator', () => { setupDummyPackage(tree, { name: '@proj/react-old', version: '8.0.1' }); }); - it( - `should move all v9 packages in batch`, - async () => { - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const projects = [ - options.name, - '@proj/react-foo', - '@proj/react-bar', - '@proj/react-moo', - '@proj/react-old', - ] as const; - - const destinationFolder = 'testFolder'; - await generator(tree, { allConverged: true, destination: destinationFolder }); - - expect(tree.exists(`packages/${destinationFolder}/react-foo/src/index.ts`)).toBeTruthy(); - expect(tree.exists(`packages/${destinationFolder}/react-bar/src/index.ts`)).toBeTruthy(); - expect(tree.exists(`packages/${destinationFolder}/react-moo/src/index.ts`)).toBeTruthy(); - expect(tree.exists(`packages/${destinationFolder}/react-old/src/index.ts`)).toBeFalsy(); - }, - 10000, - ); + it(`should move all v9 packages in batch`, async () => { + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const projects = [ + options.name, + '@proj/react-foo', + '@proj/react-bar', + '@proj/react-moo', + '@proj/react-old', + ] as const; + + const destinationFolder = 'testFolder'; + await generator(tree, { allConverged: true, destination: destinationFolder }); + + expect(tree.exists(`packages/${destinationFolder}/react-foo/src/index.ts`)).toBeTruthy(); + expect(tree.exists(`packages/${destinationFolder}/react-bar/src/index.ts`)).toBeTruthy(); + expect(tree.exists(`packages/${destinationFolder}/react-moo/src/index.ts`)).toBeTruthy(); + expect(tree.exists(`packages/${destinationFolder}/react-old/src/index.ts`)).toBeFalsy(); + }); }); describe('--allV8', () => { @@ -241,28 +233,24 @@ describe('move-packages generator', () => { setupDummyPackage(tree, { name: '@proj/react-old', version: '9.0.1' }); }); - it( - `should move all v8 packages in batch`, - async () => { - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const projects = [ - options.name, - '@proj/react-foo', - '@proj/react-bar', - '@proj/react-moo', - '@proj/react-old', - ] as const; - - const destinationFolder = 'testFolder'; - await generator(tree, { allV8: true, destination: destinationFolder }); - - expect(tree.exists(`packages/${destinationFolder}/react-foo/src/index.ts`)).toBeTruthy(); - expect(tree.exists(`packages/${destinationFolder}/react-bar/src/index.ts`)).toBeTruthy(); - expect(tree.exists(`packages/${destinationFolder}/react-moo/src/index.ts`)).toBeTruthy(); - expect(tree.exists(`packages/${destinationFolder}/react-old/src/index.ts`)).toBeFalsy(); - }, - 10000, - ); + it(`should move all v8 packages in batch`, async () => { + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const projects = [ + options.name, + '@proj/react-foo', + '@proj/react-bar', + '@proj/react-moo', + '@proj/react-old', + ] as const; + + const destinationFolder = 'testFolder'; + await generator(tree, { allV8: true, destination: destinationFolder }); + + expect(tree.exists(`packages/${destinationFolder}/react-foo/src/index.ts`)).toBeTruthy(); + expect(tree.exists(`packages/${destinationFolder}/react-bar/src/index.ts`)).toBeTruthy(); + expect(tree.exists(`packages/${destinationFolder}/react-moo/src/index.ts`)).toBeTruthy(); + expect(tree.exists(`packages/${destinationFolder}/react-old/src/index.ts`)).toBeFalsy(); + }); }); }); diff --git a/tools/workspace-plugin/src/generators/react-component/index.spec.ts b/tools/workspace-plugin/src/generators/react-component/index.spec.ts index eff4c2f3eb7328..80f342159309c0 100644 --- a/tools/workspace-plugin/src/generators/react-component/index.spec.ts +++ b/tools/workspace-plugin/src/generators/react-component/index.spec.ts @@ -20,20 +20,16 @@ describe('react-component generator', () => { } }); - it( - `should throw error if component already exists`, - async () => { - createLibrary(tree, 'react-one'); - await generator(tree, { project: 'react-one', name: 'MyOne' }); + it(`should throw error if component already exists`, async () => { + createLibrary(tree, 'react-one'); + await generator(tree, { project: 'react-one', name: 'MyOne' }); - try { - await generator(tree, { project: 'react-one', name: 'MyOne' }); - } catch (err) { - expect(err).toMatchInlineSnapshot(`[Error: The component "MyOne" already exists]`); - } - }, - 10000, - ); + try { + await generator(tree, { project: 'react-one', name: 'MyOne' }); + } catch (err) { + expect(err).toMatchInlineSnapshot(`[Error: The component "MyOne" already exists]`); + } + }); }); describe(`component`, () => { @@ -74,8 +70,7 @@ describe('react-component generator', () => { " `); - const children = tree.children(componentRootPath).sort(); - expect(children).toMatchInlineSnapshot(` + expect(tree.children(componentRootPath)).toMatchInlineSnapshot(` Array [ "MyOne.test.tsx", "MyOne.tsx", @@ -272,8 +267,7 @@ describe('react-component generator', () => { : 'packages/react-components/react-one/stories/src/MyOne'; await generator(tree, { project: 'react-one', name: 'MyOne' }); - const storyChildren = tree.children(componentStoryRootPath).sort(); - expect(storyChildren).toMatchInlineSnapshot(` + expect(tree.children(componentStoryRootPath)).toMatchInlineSnapshot(` Array [ "MyOneBestPractices.md", "MyOneDefault.stories.tsx", diff --git a/tools/workspace-plugin/src/generators/react-library/index.spec.ts b/tools/workspace-plugin/src/generators/react-library/index.spec.ts index dea5a6563c8629..0bc3f897812ec4 100644 --- a/tools/workspace-plugin/src/generators/react-library/index.spec.ts +++ b/tools/workspace-plugin/src/generators/react-library/index.spec.ts @@ -55,14 +55,14 @@ describe('react-library generator', () => { "project.json", ".babelrc.json", ".swcrc", + "LICENSE", + "README.md", "config", "docs", "eslint.config.js", "etc", "jest.config.js", - "LICENSE", "package.json", - "README.md", "src", "tsconfig.json", "tsconfig.lib.json", @@ -249,7 +249,7 @@ describe('react-library generator', () => { packages/react-components/react-one-preview/stories @org/chosen-one `), ); - }, 10000); + }); it(`should create compat package`, async () => { setup(tree); @@ -265,14 +265,14 @@ describe('react-library generator', () => { "project.json", ".babelrc.json", ".swcrc", + "LICENSE", + "README.md", "config", "docs", "eslint.config.js", "etc", "jest.config.js", - "LICENSE", "package.json", - "README.md", "src", "tsconfig.json", "tsconfig.lib.json", @@ -309,7 +309,7 @@ describe('react-library generator', () => { tags: ['vNext', 'platform:web', 'compat', 'type:stories'], }), ); - }, 10000); + }); }); function setup(tree: Tree) { diff --git a/tools/workspace-plugin/src/generators/split-library-in-two/generator.spec.ts b/tools/workspace-plugin/src/generators/split-library-in-two/generator.spec.ts index fdf1305eeb5485..3b1ecf8b4eb22a 100644 --- a/tools/workspace-plugin/src/generators/split-library-in-two/generator.spec.ts +++ b/tools/workspace-plugin/src/generators/split-library-in-two/generator.spec.ts @@ -34,12 +34,10 @@ describe('split-library-in-two generator', () => { jest.spyOn(output, 'error').mockImplementation(noop); }); - it( - 'should split v9 project into 2', - async () => { - const oldConfig = readProjectConfiguration(tree, options.project); + it('should split v9 project into 2', async () => { + const oldConfig = readProjectConfiguration(tree, options.project); - await splitLibraryInTwoGenerator(tree, options); + await splitLibraryInTwoGenerator(tree, options); const newConfig = readProjectConfiguration(tree, options.project); const storiesConfig = readProjectConfiguration(tree, `${options.project}-stories`); @@ -326,7 +324,7 @@ describe('split-library-in-two generator', () => { export const tags = ['autodocs']; " `); - }, 10000); + }); }); function setup(tree: Tree) { diff --git a/tools/workspace-plugin/src/plugins/testing-utils/temp-fs.ts b/tools/workspace-plugin/src/plugins/testing-utils/temp-fs.ts index 3a280fa7fa43ea..46b97b314a24e8 100644 --- a/tools/workspace-plugin/src/plugins/testing-utils/temp-fs.ts +++ b/tools/workspace-plugin/src/plugins/testing-utils/temp-fs.ts @@ -90,59 +90,12 @@ export class TempFs { } cleanup() { - // Retry cleanup on Windows to handle EBUSY errors - let attempts = 0; - const maxAttempts = 3; - while (attempts < maxAttempts) { - try { - rmSync(this.tempDir, { recursive: true, force: true }); - setWorkspaceRoot(this.previousWorkspaceRoot); - return; - } catch (error: any) { - attempts++; - if (attempts >= maxAttempts || !error?.code || error.code !== 'EBUSY') { - // If we've exhausted retries or it's a different error, just continue - // Don't throw to avoid breaking tests - console.warn(`Failed to cleanup temp directory after ${attempts} attempts:`, error.message); - setWorkspaceRoot(this.previousWorkspaceRoot); - return; - } - // Wait before retry with exponential backoff - const delay = 100 * Math.pow(2, attempts - 1); - const start = Date.now(); - while (Date.now() - start < delay) { - // Busy wait - } - } - } + rmSync(this.tempDir, { recursive: true, force: true }); + setWorkspaceRoot(this.previousWorkspaceRoot); } reset() { - // Retry reset on Windows to handle EBUSY errors - let attempts = 0; - const maxAttempts = 3; - while (attempts < maxAttempts) { - try { - rmSync(this.tempDir, { recursive: true, force: true }); - mkdirSync(this.tempDir, { recursive: true }); - return; - } catch (error: any) { - attempts++; - if (attempts >= maxAttempts || !error?.code || error.code !== 'EBUSY') { - console.warn(`Failed to reset temp directory after ${attempts} attempts:`, error.message); - // Try to at least create the directory if it doesn't exist - if (!existsSync(this.tempDir)) { - mkdirSync(this.tempDir, { recursive: true }); - } - return; - } - // Wait before retry with exponential backoff - const delay = 100 * Math.pow(2, attempts - 1); - const start = Date.now(); - while (Date.now() - start < delay) { - // Busy wait - } - } - } + rmSync(this.tempDir, { recursive: true, force: true }); + mkdirSync(this.tempDir, { recursive: true }); } } From f55e035b40fa7856a677768c5afd06a543d7812d Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Tue, 25 Nov 2025 23:31:06 -0800 Subject: [PATCH 060/120] attempted reset --- ...-8feae847-a6df-438f-babf-60e6ecb351c5.json | 7 - ...-7b4bdb9f-c16e-4bda-9459-b3b7c30755ab.json | 7 - ...-acf99833-5132-498d-9ef1-abcc8ee5a656.json | 7 - ...-c84f263a-964a-47d9-9a5c-337406e22fa5.json | 7 - ...-16ca2224-8177-4ede-ba6a-91d9c817054f.json | 7 - ...-1e20ce18-54fc-412a-bcaa-65ecabde4e57.json | 7 - package.json | 7 +- .../react-dialog/library/.swcrc | 3 + .../react-components/react-jsx-runtime/.swcrc | 3 + .../react-tree/library/.swcrc | 3 + .../react-components/react-utilities/.swcrc | 5 +- .../tsconfig.lib.json | 1 - .../tsconfig.lib.json | 1 - .../tsconfig.lib.json | 1 - .../generators/tsconfig-base-all/lib/utils.ts | 5 +- yarn.lock | 342 +++++------------- 16 files changed, 108 insertions(+), 305 deletions(-) delete mode 100644 change/@fluentui-react-dialog-8feae847-a6df-438f-babf-60e6ecb351c5.json delete mode 100644 change/@fluentui-react-jsx-runtime-7b4bdb9f-c16e-4bda-9459-b3b7c30755ab.json delete mode 100644 change/@fluentui-react-shared-contexts-acf99833-5132-498d-9ef1-abcc8ee5a656.json delete mode 100644 change/@fluentui-react-tree-c84f263a-964a-47d9-9a5c-337406e22fa5.json delete mode 100644 change/@fluentui-react-utilities-16ca2224-8177-4ede-ba6a-91d9c817054f.json delete mode 100644 change/@fluentui-storybook-llms-extractor-1e20ce18-54fc-412a-bcaa-65ecabde4e57.json diff --git a/change/@fluentui-react-dialog-8feae847-a6df-438f-babf-60e6ecb351c5.json b/change/@fluentui-react-dialog-8feae847-a6df-438f-babf-60e6ecb351c5.json deleted file mode 100644 index 5fa0fefdde37fd..00000000000000 --- a/change/@fluentui-react-dialog-8feae847-a6df-438f-babf-60e6ecb351c5.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "patch", - "comment": "plugin swc-plugin-de-indent-template-literal is crashing, removing", - "packageName": "@fluentui/react-dialog", - "email": "caperez@microsoft.com", - "dependentChangeType": "patch" -} diff --git a/change/@fluentui-react-jsx-runtime-7b4bdb9f-c16e-4bda-9459-b3b7c30755ab.json b/change/@fluentui-react-jsx-runtime-7b4bdb9f-c16e-4bda-9459-b3b7c30755ab.json deleted file mode 100644 index cb9eaed66d38ea..00000000000000 --- a/change/@fluentui-react-jsx-runtime-7b4bdb9f-c16e-4bda-9459-b3b7c30755ab.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "patch", - "comment": "plugin swc-plugin-de-indent-template-literal is crashing, removing", - "packageName": "@fluentui/react-jsx-runtime", - "email": "caperez@microsoft.com", - "dependentChangeType": "patch" -} diff --git a/change/@fluentui-react-shared-contexts-acf99833-5132-498d-9ef1-abcc8ee5a656.json b/change/@fluentui-react-shared-contexts-acf99833-5132-498d-9ef1-abcc8ee5a656.json deleted file mode 100644 index f37e335fe31030..00000000000000 --- a/change/@fluentui-react-shared-contexts-acf99833-5132-498d-9ef1-abcc8ee5a656.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "minor", - "comment": "Adding react-file-type-icons package for FluentUI v9", - "packageName": "@fluentui/react-shared-contexts", - "email": "caperez@microsoft.com", - "dependentChangeType": "patch" -} diff --git a/change/@fluentui-react-tree-c84f263a-964a-47d9-9a5c-337406e22fa5.json b/change/@fluentui-react-tree-c84f263a-964a-47d9-9a5c-337406e22fa5.json deleted file mode 100644 index 020e81b21ce7e7..00000000000000 --- a/change/@fluentui-react-tree-c84f263a-964a-47d9-9a5c-337406e22fa5.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "patch", - "comment": "plugin swc-plugin-de-indent-template-literal is crashing, removing", - "packageName": "@fluentui/react-tree", - "email": "caperez@microsoft.com", - "dependentChangeType": "patch" -} diff --git a/change/@fluentui-react-utilities-16ca2224-8177-4ede-ba6a-91d9c817054f.json b/change/@fluentui-react-utilities-16ca2224-8177-4ede-ba6a-91d9c817054f.json deleted file mode 100644 index 953eb2d68a01d6..00000000000000 --- a/change/@fluentui-react-utilities-16ca2224-8177-4ede-ba6a-91d9c817054f.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "minor", - "comment": "Adding react-file-type-icons package for FluentUI v9", - "packageName": "@fluentui/react-utilities", - "email": "caperez@microsoft.com", - "dependentChangeType": "patch" -} diff --git a/change/@fluentui-storybook-llms-extractor-1e20ce18-54fc-412a-bcaa-65ecabde4e57.json b/change/@fluentui-storybook-llms-extractor-1e20ce18-54fc-412a-bcaa-65ecabde4e57.json deleted file mode 100644 index 8f4167c2d18c7b..00000000000000 --- a/change/@fluentui-storybook-llms-extractor-1e20ce18-54fc-412a-bcaa-65ecabde4e57.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "none", - "comment": "fixing compilation config issues", - "packageName": "@fluentui/storybook-llms-extractor", - "email": "caperez@microsoft.com", - "dependentChangeType": "none" -} diff --git a/package.json b/package.json index 8b22087fbb8144..9b582500103a8a 100644 --- a/package.json +++ b/package.json @@ -38,8 +38,8 @@ "@babel/plugin-proposal-class-properties": "7.18.6", "@babel/plugin-proposal-decorators": "7.24.6", "@babel/plugin-proposal-nullish-coalescing-operator": "7.18.6", - "@babel/plugin-proposal-object-rest-spread": "7.20.7", "@babel/plugin-proposal-optional-chaining": "7.21.0", + "@babel/plugin-proposal-object-rest-spread": "7.20.7", "@babel/plugin-syntax-dynamic-import": "7.8.3", "@babel/plugin-syntax-object-rest-spread": "7.8.3", "@babel/plugin-transform-runtime": "7.24.6", @@ -106,7 +106,7 @@ "@storybook/react-webpack5": "8.6.14", "@storybook/theming": "8.6.14", "@swc/cli": "0.7.7", - "@swc/core": "1.15.3", + "@swc/core": "1.11.24", "@swc/helpers": "0.5.1", "@swc/jest": "0.2.38", "@testing-library/dom": "10.4.0", @@ -166,8 +166,8 @@ "@types/webpack-hot-middleware": "2.25.9", "@types/yargs": "13.0.11", "@types/yargs-unparser": "2.0.1", - "@typescript-eslint/eslint-plugin": "^8.46.2", "@typescript-eslint/rule-tester": "8.46.2", + "@typescript-eslint/eslint-plugin": "^8.46.2", "autoprefixer": "10.2.1", "babel-jest": "29.7.0", "babel-loader": "9.1.3", @@ -338,7 +338,6 @@ "dependencies": { "@fluentui/react-icons-northstar": "0.66.5", "@fluentui/react-northstar": "0.66.5", - "@swc-node/register": "1.11.1", "copy-to-clipboard": "3.3.1" }, "license": "MIT", diff --git a/packages/react-components/react-dialog/library/.swcrc b/packages/react-components/react-dialog/library/.swcrc index b4ffa86dee3067..7c60535c03e245 100644 --- a/packages/react-components/react-dialog/library/.swcrc +++ b/packages/react-components/react-dialog/library/.swcrc @@ -10,6 +10,9 @@ "/**/*.test.tsx" ], "jsc": { + "experimental": { + "plugins": [["swc-plugin-de-indent-template-literal", {}]] + }, "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-jsx-runtime/.swcrc b/packages/react-components/react-jsx-runtime/.swcrc index b4ffa86dee3067..7c60535c03e245 100644 --- a/packages/react-components/react-jsx-runtime/.swcrc +++ b/packages/react-components/react-jsx-runtime/.swcrc @@ -10,6 +10,9 @@ "/**/*.test.tsx" ], "jsc": { + "experimental": { + "plugins": [["swc-plugin-de-indent-template-literal", {}]] + }, "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-tree/library/.swcrc b/packages/react-components/react-tree/library/.swcrc index b4ffa86dee3067..7c60535c03e245 100644 --- a/packages/react-components/react-tree/library/.swcrc +++ b/packages/react-components/react-tree/library/.swcrc @@ -10,6 +10,9 @@ "/**/*.test.tsx" ], "jsc": { + "experimental": { + "plugins": [["swc-plugin-de-indent-template-literal", {}]] + }, "parser": { "syntax": "typescript", "tsx": true, diff --git a/packages/react-components/react-utilities/.swcrc b/packages/react-components/react-utilities/.swcrc index 1f90e743a01739..7c60535c03e245 100644 --- a/packages/react-components/react-utilities/.swcrc +++ b/packages/react-components/react-utilities/.swcrc @@ -1,5 +1,5 @@ { - "$schema": "https://swc.rs/schema.json", + "$schema": "https://json.schemastore.org/swcrc", "exclude": [ "/testing", "/**/*.cy.ts", @@ -10,6 +10,9 @@ "/**/*.test.tsx" ], "jsc": { + "experimental": { + "plugins": [["swc-plugin-de-indent-template-literal", {}]] + }, "parser": { "syntax": "typescript", "tsx": true, diff --git a/tools/react-integration-tester/tsconfig.lib.json b/tools/react-integration-tester/tsconfig.lib.json index 71bb06dd725935..33eca2c2cdf8c6 100644 --- a/tools/react-integration-tester/tsconfig.lib.json +++ b/tools/react-integration-tester/tsconfig.lib.json @@ -1,7 +1,6 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "rootDir": "src", "outDir": "../../dist/out-tsc", "declaration": true, "types": ["node"] diff --git a/tools/storybook-llms-extractor/tsconfig.lib.json b/tools/storybook-llms-extractor/tsconfig.lib.json index 3bcfb1fccd2c99..0e55672051597b 100644 --- a/tools/storybook-llms-extractor/tsconfig.lib.json +++ b/tools/storybook-llms-extractor/tsconfig.lib.json @@ -2,7 +2,6 @@ "extends": "./tsconfig.json", "compilerOptions": { "module": "CommonJS", - "rootDir": "src", "noEmit": false, "lib": ["ES2020", "DOM"], "declaration": true, diff --git a/tools/visual-regression-assert/tsconfig.lib.json b/tools/visual-regression-assert/tsconfig.lib.json index 27ed0f811a1f10..e8e07a7a01fe7b 100644 --- a/tools/visual-regression-assert/tsconfig.lib.json +++ b/tools/visual-regression-assert/tsconfig.lib.json @@ -2,7 +2,6 @@ "extends": "./tsconfig.json", "compilerOptions": { "module": "CommonJS", - "rootDir": "src", "noEmit": false, "lib": ["ES2020"], "declaration": true, diff --git a/tools/workspace-plugin/src/generators/tsconfig-base-all/lib/utils.ts b/tools/workspace-plugin/src/generators/tsconfig-base-all/lib/utils.ts index 62382e3da8517b..9bc9c3e0730a39 100644 --- a/tools/workspace-plugin/src/generators/tsconfig-base-all/lib/utils.ts +++ b/tools/workspace-plugin/src/generators/tsconfig-base-all/lib/utils.ts @@ -1,4 +1,5 @@ // use this module to define any kind of generic utilities that are used in more than 1 place within the generator implementation +import path from 'path'; import { readJson, Tree } from '@nx/devkit'; /** @@ -10,8 +11,8 @@ export function createPathAliasesConfig(tree: Tree) { const existingTsConfig = tree.exists(tsConfigAllPath) ? readJson(tree, tsConfigAllPath) : null; const baseConfigs = { - v8: readJson(tree, '/tsconfig.base.v8.json'), - v9: readJson(tree, '/tsconfig.base.json'), + v8: readJson(tree, path.join('/tsconfig.base.v8.json')), + v9: readJson(tree, path.join('/tsconfig.base.json')), }; const tsConfigBase = '.'; const mergedTsConfig = { diff --git a/yarn.lock b/yarn.lock index b6a6323af9ef4c..dc554e366e92ec 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1581,25 +1581,25 @@ "@effect/io" "^0.26.0" fast-check "^3.10.0" -"@emnapi/core@^1.1.0", "@emnapi/core@^1.5.0": - version "1.7.1" - resolved "https://registry.yarnpkg.com/@emnapi/core/-/core-1.7.1.tgz#3a79a02dbc84f45884a1806ebb98e5746bdfaac4" - integrity sha512-o1uhUASyo921r2XtHYOHy7gdkGLge8ghBEQHMWmyJFoXlpU58kIrhhN3w26lpQb6dspetweapMn2CSNwQ8I4wg== +"@emnapi/core@^1.1.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@emnapi/core/-/core-1.4.0.tgz#8844b02d799198158ac1fea21ae2bc81b881da9a" + integrity sha512-H+N/FqT07NmLmt6OFFtDfwe8PNygprzBikrEMyQfgqSmT0vzE515Pz7R8izwB9q/zsH/MA64AKoul3sA6/CzVg== dependencies: - "@emnapi/wasi-threads" "1.1.0" + "@emnapi/wasi-threads" "1.0.1" tslib "^2.4.0" -"@emnapi/runtime@^1.1.0", "@emnapi/runtime@^1.5.0": - version "1.7.1" - resolved "https://registry.yarnpkg.com/@emnapi/runtime/-/runtime-1.7.1.tgz#a73784e23f5d57287369c808197288b52276b791" - integrity sha512-PVtJr5CmLwYAU9PZDMITZoR5iAOShYREoR45EyyLrbntV50mdePTgUn4AmOw90Ifcj+x2kRjdzr1HP3RrNiHGA== +"@emnapi/runtime@^1.1.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@emnapi/runtime/-/runtime-1.4.0.tgz#8f509bf1059a5551c8fe829a1c4e91db35fdfbee" + integrity sha512-64WYIf4UYcdLnbKn/umDlNjQDSS8AgZrI/R9+x5ilkUVFxXcA1Ebl+gQLc/6mERA4407Xof0R7wEyEuj091CVw== dependencies: tslib "^2.4.0" -"@emnapi/wasi-threads@1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@emnapi/wasi-threads/-/wasi-threads-1.1.0.tgz#60b2102fddc9ccb78607e4a3cf8403ea69be41bf" - integrity sha512-WI0DdZ8xFSbgMjR1sFsKABJ/C5OnRrjT06JXbZKexJGrDuPTzZdDYfFlsgcCXCyf+suG5QU2e/y1Wo2V/OapLQ== +"@emnapi/wasi-threads@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@emnapi/wasi-threads/-/wasi-threads-1.0.1.tgz#d7ae71fd2166b1c916c6cd2d0df2ef565a2e1a5b" + integrity sha512-iIBu7mwkq4UQGeMEM8bLwNK962nXdhodeScX4slfQnRhEMMzvYivHhutCIk8uojvmASXXPC2WNEjwxFWk72Oqw== dependencies: tslib "^2.4.0" @@ -2828,15 +2828,6 @@ "@emnapi/runtime" "^1.1.0" "@tybys/wasm-util" "^0.9.0" -"@napi-rs/wasm-runtime@^1.0.7": - version "1.0.7" - resolved "https://registry.yarnpkg.com/@napi-rs/wasm-runtime/-/wasm-runtime-1.0.7.tgz#dcfea99a75f06209a235f3d941e3460a51e9b14c" - integrity sha512-SeDnOO0Tk7Okiq6DbXmmBODgOAb9dp9gjlphokTUxmt8U3liIP1ZsozBahH69j/RJv+Rfs6IwUKHTgQYJ/HBAw== - dependencies: - "@emnapi/core" "^1.5.0" - "@emnapi/runtime" "^1.5.0" - "@tybys/wasm-util" "^0.10.1" - "@nevware21/ts-async@>= 0.5.2 < 2.x": version "0.5.2" resolved "https://registry.yarnpkg.com/@nevware21/ts-async/-/ts-async-0.5.2.tgz#a41883dc6ccc4666bdf156e92f35f3003fd3f6f0" @@ -3169,103 +3160,6 @@ css-tree "^3.0.0" nanoid "^5.0.8" -"@oxc-resolver/binding-android-arm-eabi@11.14.0": - version "11.14.0" - resolved "https://registry.yarnpkg.com/@oxc-resolver/binding-android-arm-eabi/-/binding-android-arm-eabi-11.14.0.tgz#98a6b41316d9283c89dac4261ef2b3d3458943ec" - integrity sha512-jB47iZ/thvhE+USCLv+XY3IknBbkKr/p7OBsQDTHode/GPw+OHRlit3NQ1bjt1Mj8V2CS7iHdSDYobZ1/0gagQ== - -"@oxc-resolver/binding-android-arm64@11.14.0": - version "11.14.0" - resolved "https://registry.yarnpkg.com/@oxc-resolver/binding-android-arm64/-/binding-android-arm64-11.14.0.tgz#1a2f24785dc4b8f86eebe5873f0fcd8ba850fd54" - integrity sha512-XFJ9t7d/Cz+dWLyqtTy3Xrekz+qqN4hmOU2iOUgr7u71OQsPUHIIeS9/wKanEK0l413gPwapIkyc5x9ltlOtyw== - -"@oxc-resolver/binding-darwin-arm64@11.14.0": - version "11.14.0" - resolved "https://registry.yarnpkg.com/@oxc-resolver/binding-darwin-arm64/-/binding-darwin-arm64-11.14.0.tgz#67cb9b66b060e9a29f6c8d9549669fa061ff6006" - integrity sha512-gwehBS9smA1mzK8frDsmUCHz+6baJVwkKF6qViHhoqA3kRKvIZ3k6WNP4JmF19JhOiGxRcoPa8gZRfzNgXwP2A== - -"@oxc-resolver/binding-darwin-x64@11.14.0": - version "11.14.0" - resolved "https://registry.yarnpkg.com/@oxc-resolver/binding-darwin-x64/-/binding-darwin-x64-11.14.0.tgz#b7ab6433a6babc8df133497edd847894d3b10061" - integrity sha512-5wwJvfuoahKiAqqAsMLOI28rqdh3P2K7HkjIWUXNMWAZq6ErX0L5rwJzu6T32+Zxw3k18C7R9IS4wDq/3Ar+6w== - -"@oxc-resolver/binding-freebsd-x64@11.14.0": - version "11.14.0" - resolved "https://registry.yarnpkg.com/@oxc-resolver/binding-freebsd-x64/-/binding-freebsd-x64-11.14.0.tgz#a7910fc9ad69c12ba227a57580b2053cffc623f0" - integrity sha512-MWTt+LOQNcQ6fa+Uu5VikkihLi1PSIrQqqp0QD44k2AORasNWl0jRGBTcMSBIgNe82qEQWYvlGzvOEEOBp01Og== - -"@oxc-resolver/binding-linux-arm-gnueabihf@11.14.0": - version "11.14.0" - resolved "https://registry.yarnpkg.com/@oxc-resolver/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-11.14.0.tgz#c06d530315f4df3151f44ee3d10488a426fee359" - integrity sha512-b6/IBqYrS3o0XiLVBsnex/wK8pTTK+hbGfAMOHVU6p7DBpwPPLgC/tav4IXoOIUCssTFz7aWh/xtUok0swn8VQ== - -"@oxc-resolver/binding-linux-arm-musleabihf@11.14.0": - version "11.14.0" - resolved "https://registry.yarnpkg.com/@oxc-resolver/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-11.14.0.tgz#50be40fb4a4cdbbb600198bfc9a1f3a6f4233d16" - integrity sha512-o2Qh5+y5YoqVK6YfzkalHdpmQ5bkbGGxuLg1pZLQ1Ift0x+Vix7DaFEpdCl5Z9xvYXogd/TwOlL0TPl4+MTFLA== - -"@oxc-resolver/binding-linux-arm64-gnu@11.14.0": - version "11.14.0" - resolved "https://registry.yarnpkg.com/@oxc-resolver/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-11.14.0.tgz#62fc245a4e83bd2d932de5865cdea3240cf08097" - integrity sha512-lk8mCSg0Tg4sEG73RiPjb7keGcEPwqQnBHX3Z+BR2SWe+qNHpoHcyFMNafzSvEC18vlxC04AUSoa6kJl/C5zig== - -"@oxc-resolver/binding-linux-arm64-musl@11.14.0": - version "11.14.0" - resolved "https://registry.yarnpkg.com/@oxc-resolver/binding-linux-arm64-musl/-/binding-linux-arm64-musl-11.14.0.tgz#c90bfd0dde8466f982fed7e9332b39c60ffbe682" - integrity sha512-KykeIVhCM7pn93ABa0fNe8vk4XvnbfZMELne2s6P9tdJH9KMBsCFBi7a2BmSdUtTqWCAJokAcm46lpczU52Xaw== - -"@oxc-resolver/binding-linux-ppc64-gnu@11.14.0": - version "11.14.0" - resolved "https://registry.yarnpkg.com/@oxc-resolver/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-11.14.0.tgz#a9fc775ec2db68761df8437ec11b015c46741b34" - integrity sha512-QqPPWAcZU/jHAuam4f3zV8OdEkYRPD2XR0peVet3hoMMgsihR3Lhe7J/bLclmod297FG0+OgBYQVMh2nTN6oWA== - -"@oxc-resolver/binding-linux-riscv64-gnu@11.14.0": - version "11.14.0" - resolved "https://registry.yarnpkg.com/@oxc-resolver/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-11.14.0.tgz#8002c80ba035e26d476fbad50e0b149b9a16079c" - integrity sha512-DunWA+wafeG3hj1NADUD3c+DRvmyVNqF5LSHVUWA2bzswqmuEZXl3VYBSzxfD0j+UnRTFYLxf27AMptoMsepYg== - -"@oxc-resolver/binding-linux-riscv64-musl@11.14.0": - version "11.14.0" - resolved "https://registry.yarnpkg.com/@oxc-resolver/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-11.14.0.tgz#6a3c20f55295626572be80de82b4b4a927d5b073" - integrity sha512-4SRvwKTTk2k67EQr9Ny4NGf/BhlwggCI1CXwBbA9IV4oP38DH8b+NAPxDY0ySGRsWbPkG92FYOqM4AWzG4GSgA== - -"@oxc-resolver/binding-linux-s390x-gnu@11.14.0": - version "11.14.0" - resolved "https://registry.yarnpkg.com/@oxc-resolver/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-11.14.0.tgz#c8031033466a64206ce59bbc771c43c135843495" - integrity sha512-hZKvkbsurj4JOom//R1Ab2MlC4cGeVm5zzMt4IsS3XySQeYjyMJ5TDZ3J5rQ8bVj3xi4FpJU2yFZ72GApsHQ6A== - -"@oxc-resolver/binding-linux-x64-gnu@11.14.0": - version "11.14.0" - resolved "https://registry.yarnpkg.com/@oxc-resolver/binding-linux-x64-gnu/-/binding-linux-x64-gnu-11.14.0.tgz#7ef94d565dd4be964df1b80e34b515339652f358" - integrity sha512-hABxQXFXJurivw+0amFdeEcK67cF1BGBIN1+sSHzq3TRv4RoG8n5q2JE04Le2n2Kpt6xg4Y5+lcv+rb2mCJLgQ== - -"@oxc-resolver/binding-linux-x64-musl@11.14.0": - version "11.14.0" - resolved "https://registry.yarnpkg.com/@oxc-resolver/binding-linux-x64-musl/-/binding-linux-x64-musl-11.14.0.tgz#2d4226bc06ad336f4854dfd3709f566c02683da6" - integrity sha512-Ln73wUB5migZRvC7obAAdqVwvFvk7AUs2JLt4g9QHr8FnqivlsjpUC9Nf2ssrybdjyQzEMjttUxPZz6aKPSAHw== - -"@oxc-resolver/binding-wasm32-wasi@11.14.0": - version "11.14.0" - resolved "https://registry.yarnpkg.com/@oxc-resolver/binding-wasm32-wasi/-/binding-wasm32-wasi-11.14.0.tgz#c8a048253fa58e239b69f89734d954a631434a9e" - integrity sha512-z+NbELmCOKNtWOqEB5qDfHXOSWB3kGQIIehq6nHtZwHLzdVO2oBq6De/ayhY3ygriC1XhgaIzzniY7jgrNl4Kw== - dependencies: - "@napi-rs/wasm-runtime" "^1.0.7" - -"@oxc-resolver/binding-win32-arm64-msvc@11.14.0": - version "11.14.0" - resolved "https://registry.yarnpkg.com/@oxc-resolver/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-11.14.0.tgz#b0cdf4f7ad4a58995b6b538c844b5b9a2efb7edb" - integrity sha512-Ft0+qd7HSO61qCTLJ4LCdBGZkpKyDj1rG0OVSZL1DxWQoh97m7vEHd7zAvUtw8EcWjOMBQuX4mfRap/x2MOCpQ== - -"@oxc-resolver/binding-win32-ia32-msvc@11.14.0": - version "11.14.0" - resolved "https://registry.yarnpkg.com/@oxc-resolver/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-11.14.0.tgz#616a641967db9fcacebdc06443fad29dcda70a42" - integrity sha512-o54jYNSfGdPxHSvXEhZg8FOV3K99mJ1f7hb1alRFb+Yec1GQXNrJXxZPIxNMYeFT13kwAWB7zuQ0HZLnDHFxfw== - -"@oxc-resolver/binding-win32-x64-msvc@11.14.0": - version "11.14.0" - resolved "https://registry.yarnpkg.com/@oxc-resolver/binding-win32-x64-msvc/-/binding-win32-x64-msvc-11.14.0.tgz#53e9a5257332da71cce15f09e42e3b1927156370" - integrity sha512-j97icaORyM6A7GjgmUzfn7V+KGzVvctRA+eAlJb0c2OQNaETFxl6BXZdnGBDb+6oA0Y4Sr/wnekd1kQ0aVyKGg== - "@phenomnomnominal/tsquery@6.1.3", "@phenomnomnominal/tsquery@~5.0.1": version "6.1.3" resolved "https://registry.yarnpkg.com/@phenomnomnominal/tsquery/-/tsquery-6.1.3.tgz#5e819403da2fa6a64b009f1876278fb105ec6b55" @@ -4048,32 +3942,6 @@ "@types/express" "^4.7.0" file-system-cache "2.3.0" -"@swc-node/core@^1.14.1": - version "1.14.1" - resolved "https://registry.yarnpkg.com/@swc-node/core/-/core-1.14.1.tgz#b3f85f9ac055faee1a3454a0cf71bb953c814f1a" - integrity sha512-jrt5GUaZUU6cmMS+WTJEvGvaB6j1YNKPHPzC2PUi2BjaFbtxURHj6641Az6xN7b665hNniAIdvjxWcRml5yCnw== - -"@swc-node/register@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@swc-node/register/-/register-1.11.1.tgz#bc353f9df7d9c6f0e7f067fe2b3a7552fd667698" - integrity sha512-VQ0hJ5jX31TVv/fhZx4xJRzd8pwn6VvzYd2tGOHHr2TfXGCBixZoqdPDXTiEoJLCTS2MmvBf6zyQZZ0M8aGQCQ== - dependencies: - "@swc-node/core" "^1.14.1" - "@swc-node/sourcemap-support" "^0.6.1" - colorette "^2.0.20" - debug "^4.4.1" - oxc-resolver "^11.6.1" - pirates "^4.0.7" - tslib "^2.8.1" - -"@swc-node/sourcemap-support@^0.6.1": - version "0.6.1" - resolved "https://registry.yarnpkg.com/@swc-node/sourcemap-support/-/sourcemap-support-0.6.1.tgz#579bd0cfebc9cea51dd0de7c59c47ecd07b9e505" - integrity sha512-ovltDVH5QpdHXZkW138vG4+dgcNsxfwxHVoV6BtmTbz2KKl1A8ZSlbdtxzzfNjCjbpayda8Us9eMtcHobm38dA== - dependencies: - source-map-support "^0.5.21" - tslib "^2.8.1" - "@swc/cli@0.7.7": version "0.7.7" resolved "https://registry.yarnpkg.com/@swc/cli/-/cli-0.7.7.tgz#b367daba7db5a25fdcdbefe6a80f4c49c300d5fc" @@ -4089,74 +3957,74 @@ slash "3.0.0" source-map "^0.7.3" -"@swc/core-darwin-arm64@1.15.3": - version "1.15.3" - resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.15.3.tgz#bd0bd3ab7730e3ffa64cf200c0ed7c572cbaba97" - integrity sha512-AXfeQn0CvcQ4cndlIshETx6jrAM45oeUrK8YeEY6oUZU/qzz0Id0CyvlEywxkWVC81Ajpd8TQQ1fW5yx6zQWkQ== - -"@swc/core-darwin-x64@1.15.3": - version "1.15.3" - resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.15.3.tgz#502b1e1c680df6b962265ca81a0c1a23e6ff070f" - integrity sha512-p68OeCz1ui+MZYG4wmfJGvcsAcFYb6Sl25H9TxWl+GkBgmNimIiRdnypK9nBGlqMZAcxngNPtnG3kEMNnvoJ2A== - -"@swc/core-linux-arm-gnueabihf@1.15.3": - version "1.15.3" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.15.3.tgz#e32cc6a2e06a75060d6f598ba2ca6f96c5c0cc43" - integrity sha512-Nuj5iF4JteFgwrai97mUX+xUOl+rQRHqTvnvHMATL/l9xE6/TJfPBpd3hk/PVpClMXG3Uvk1MxUFOEzM1JrMYg== - -"@swc/core-linux-arm64-gnu@1.15.3": - version "1.15.3" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.15.3.tgz#9b9861bc44059e393d4baf98b3cd3d6c4ea6f521" - integrity sha512-2Nc/s8jE6mW2EjXWxO/lyQuLKShcmTrym2LRf5Ayp3ICEMX6HwFqB1EzDhwoMa2DcUgmnZIalesq2lG3krrUNw== - -"@swc/core-linux-arm64-musl@1.15.3": - version "1.15.3" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.15.3.tgz#f6388743e5a159018bd468e8f710940b2614384b" - integrity sha512-j4SJniZ/qaZ5g8op+p1G9K1z22s/EYGg1UXIb3+Cg4nsxEpF5uSIGEE4mHUfA70L0BR9wKT2QF/zv3vkhfpX4g== - -"@swc/core-linux-x64-gnu@1.15.3": - version "1.15.3" - resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.15.3.tgz#15fea551c7a3aeb1bdc3ad5c652d73c9321ddba8" - integrity sha512-aKttAZnz8YB1VJwPQZtyU8Uk0BfMP63iDMkvjhJzRZVgySmqt/apWSdnoIcZlUoGheBrcqbMC17GGUmur7OT5A== - -"@swc/core-linux-x64-musl@1.15.3": - version "1.15.3" - resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.15.3.tgz#d3f17bab4ffcadbb47f135e6a14d6f3e401af289" - integrity sha512-oe8FctPu1gnUsdtGJRO2rvOUIkkIIaHqsO9xxN0bTR7dFTlPTGi2Fhk1tnvXeyAvCPxLIcwD8phzKg6wLv9yug== - -"@swc/core-win32-arm64-msvc@1.15.3": - version "1.15.3" - resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.15.3.tgz#9da386df7fed00b3473bcf4281ff3fcd14726d2c" - integrity sha512-L9AjzP2ZQ/Xh58e0lTRMLvEDrcJpR7GwZqAtIeNLcTK7JVE+QineSyHp0kLkO1rttCHyCy0U74kDTj0dRz6raA== - -"@swc/core-win32-ia32-msvc@1.15.3": - version "1.15.3" - resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.15.3.tgz#c398d4f0f10ffec2151a79733ee1ce86a945a1ea" - integrity sha512-B8UtogMzErUPDWUoKONSVBdsgKYd58rRyv2sHJWKOIMCHfZ22FVXICR4O/VwIYtlnZ7ahERcjayBHDlBZpR0aw== - -"@swc/core-win32-x64-msvc@1.15.3": - version "1.15.3" - resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.15.3.tgz#715596b034a654c82b03ef734a9b44c29bcd3a68" - integrity sha512-SpZKMR9QBTecHeqpzJdYEfgw30Oo8b/Xl6rjSzBt1g0ZsXyy60KLXrp6IagQyfTYqNYE/caDvwtF2FPn7pomog== - -"@swc/core@1.15.3": - version "1.15.3" - resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.15.3.tgz#2d0a5c4ac4c180c3dbf2f6d5d958b9fcbaa9755f" - integrity sha512-Qd8eBPkUFL4eAONgGjycZXj1jFCBW8Fd+xF0PzdTlBCWQIV1xnUT7B93wUANtW3KGjl3TRcOyxwSx/u/jyKw/Q== +"@swc/core-darwin-arm64@1.11.24": + version "1.11.24" + resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.11.24.tgz#c9fcc9c4bad0511fed26210449556d2b33fb2d9a" + integrity sha512-dhtVj0PC1APOF4fl5qT2neGjRLgHAAYfiVP8poJelhzhB/318bO+QCFWAiimcDoyMgpCXOhTp757gnoJJrheWA== + +"@swc/core-darwin-x64@1.11.24": + version "1.11.24" + resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.11.24.tgz#048ea3ee43281264a62fccb5a944b76d1c56eb24" + integrity sha512-H/3cPs8uxcj2Fe3SoLlofN5JG6Ny5bl8DuZ6Yc2wr7gQFBmyBkbZEz+sPVgsID7IXuz7vTP95kMm1VL74SO5AQ== + +"@swc/core-linux-arm-gnueabihf@1.11.24": + version "1.11.24" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.11.24.tgz#f01ba657a81c67d8fb9f681712e65abf1324cec6" + integrity sha512-PHJgWEpCsLo/NGj+A2lXZ2mgGjsr96ULNW3+T3Bj2KTc8XtMUkE8tmY2Da20ItZOvPNC/69KroU7edyo1Flfbw== + +"@swc/core-linux-arm64-gnu@1.11.24": + version "1.11.24" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.11.24.tgz#9aefca7f7f87c8312c2fa714c1eb731411d8596c" + integrity sha512-C2FJb08+n5SD4CYWCTZx1uR88BN41ZieoHvI8A55hfVf2woT8+6ZiBzt74qW2g+ntZ535Jts5VwXAKdu41HpBg== + +"@swc/core-linux-arm64-musl@1.11.24": + version "1.11.24" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.11.24.tgz#e4805484779bbc59b639eab4f8e45166f3d7a4f7" + integrity sha512-ypXLIdszRo0re7PNNaXN0+2lD454G8l9LPK/rbfRXnhLWDBPURxzKlLlU/YGd2zP98wPcVooMmegRSNOKfvErw== + +"@swc/core-linux-x64-gnu@1.11.24": + version "1.11.24" + resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.11.24.tgz#e8d8cc50a49903880944379590b73733e150a5d4" + integrity sha512-IM7d+STVZD48zxcgo69L0yYptfhaaE9cMZ+9OoMxirNafhKKXwoZuufol1+alEFKc+Wbwp+aUPe/DeWC/Lh3dg== + +"@swc/core-linux-x64-musl@1.11.24": + version "1.11.24" + resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.11.24.tgz#f3c46212eb8a793f6a42a36b2a9017a9b1462737" + integrity sha512-DZByJaMVzSfjQKKQn3cqSeqwy6lpMaQDQQ4HPlch9FWtDx/dLcpdIhxssqZXcR2rhaQVIaRQsCqwV6orSDGAGw== + +"@swc/core-win32-arm64-msvc@1.11.24": + version "1.11.24" + resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.11.24.tgz#b1c3327d81a5f94415ac0b1713e192df1c121fbd" + integrity sha512-Q64Ytn23y9aVDKN5iryFi8mRgyHw3/kyjTjT4qFCa8AEb5sGUuSj//AUZ6c0J7hQKMHlg9do5Etvoe61V98/JQ== + +"@swc/core-win32-ia32-msvc@1.11.24": + version "1.11.24" + resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.11.24.tgz#6a944dd6111ec5fae3cf5925b73701e49b109edc" + integrity sha512-9pKLIisE/Hh2vJhGIPvSoTK4uBSPxNVyXHmOrtdDot4E1FUUI74Vi8tFdlwNbaj8/vusVnb8xPXsxF1uB0VgiQ== + +"@swc/core-win32-x64-msvc@1.11.24": + version "1.11.24" + resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.11.24.tgz#eebb5d5ece2710aeb25cc58bd7c5c4c2c046f030" + integrity sha512-sybnXtOsdB+XvzVFlBVGgRHLqp3yRpHK7CrmpuDKszhj/QhmsaZzY/GHSeALlMtLup13M0gqbcQvsTNlAHTg3w== + +"@swc/core@1.11.24": + version "1.11.24" + resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.11.24.tgz#340425648296964f815c940b8da00fcdb1ff2abd" + integrity sha512-MaQEIpfcEMzx3VWWopbofKJvaraqmL6HbLlw2bFZ7qYqYw3rkhM0cQVEgyzbHtTWwCwPMFZSC2DUbhlZgrMfLg== dependencies: "@swc/counter" "^0.1.3" - "@swc/types" "^0.1.25" + "@swc/types" "^0.1.21" optionalDependencies: - "@swc/core-darwin-arm64" "1.15.3" - "@swc/core-darwin-x64" "1.15.3" - "@swc/core-linux-arm-gnueabihf" "1.15.3" - "@swc/core-linux-arm64-gnu" "1.15.3" - "@swc/core-linux-arm64-musl" "1.15.3" - "@swc/core-linux-x64-gnu" "1.15.3" - "@swc/core-linux-x64-musl" "1.15.3" - "@swc/core-win32-arm64-msvc" "1.15.3" - "@swc/core-win32-ia32-msvc" "1.15.3" - "@swc/core-win32-x64-msvc" "1.15.3" + "@swc/core-darwin-arm64" "1.11.24" + "@swc/core-darwin-x64" "1.11.24" + "@swc/core-linux-arm-gnueabihf" "1.11.24" + "@swc/core-linux-arm64-gnu" "1.11.24" + "@swc/core-linux-arm64-musl" "1.11.24" + "@swc/core-linux-x64-gnu" "1.11.24" + "@swc/core-linux-x64-musl" "1.11.24" + "@swc/core-win32-arm64-msvc" "1.11.24" + "@swc/core-win32-ia32-msvc" "1.11.24" + "@swc/core-win32-x64-msvc" "1.11.24" "@swc/counter@^0.1.3": version "0.1.3" @@ -4179,7 +4047,7 @@ "@swc/counter" "^0.1.3" jsonc-parser "^3.2.0" -"@swc/types@^0.1.25": +"@swc/types@^0.1.21": version "0.1.25" resolved "https://registry.yarnpkg.com/@swc/types/-/types-0.1.25.tgz#b517b2a60feb37dd933e542d93093719e4cf1078" integrity sha512-iAoY/qRhNH8a/hBvm3zKj9qQ4oc2+3w1unPJa2XvTK3XjeLXtzcCingVPw/9e5mn1+0yPqxcBGp9Jf0pkfMb1g== @@ -4378,13 +4246,6 @@ resolved "https://registry.yarnpkg.com/@tsconfig/node20/-/node20-20.1.6.tgz#cdf11db8322e1c245d5a4bb2e398239c82ae78b2" integrity sha512-sz+Hqx9zwZDpZIV871WSbUzSqNIsXzghZydypnfgzPKLltVJfkINfUeTct31n/tTSa9ZE1ZOfKdRre1uHHquYQ== -"@tybys/wasm-util@^0.10.1": - version "0.10.1" - resolved "https://registry.yarnpkg.com/@tybys/wasm-util/-/wasm-util-0.10.1.tgz#ecddd3205cf1e2d5274649ff0eedd2991ed7f414" - integrity sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg== - dependencies: - tslib "^2.4.0" - "@tybys/wasm-util@^0.9.0": version "0.9.0" resolved "https://registry.yarnpkg.com/@tybys/wasm-util/-/wasm-util-0.9.0.tgz#3e75eb00604c8d6db470bf18c37b7d984a0e3355" @@ -7736,7 +7597,7 @@ colorette@^1.2.1: resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.2.tgz#cbcc79d5e99caea2dbf10eb3a26fd8b3e6acfa94" integrity sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w== -colorette@^2.0.10, colorette@^2.0.14, colorette@^2.0.16, colorette@^2.0.20: +colorette@^2.0.10, colorette@^2.0.14, colorette@^2.0.16: version "2.0.20" resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== @@ -8557,10 +8418,10 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3: dependencies: ms "2.0.0" -debug@4, debug@^4.0.0, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@^4.3.5, debug@^4.3.6, debug@^4.3.7, debug@^4.4.1: - version "4.4.3" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.3.tgz#c6ae432d9bd9662582fce08709b038c58e9e3d6a" - integrity sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA== +debug@4, debug@^4.0.0, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@^4.3.5, debug@^4.3.6, debug@^4.3.7: + version "4.4.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.0.tgz#2b3f2aea2ffeb776477460267377dc8710faba8a" + integrity sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA== dependencies: ms "^2.1.3" @@ -16194,31 +16055,6 @@ own-keys@^1.0.1: object-keys "^1.1.1" safe-push-apply "^1.0.0" -oxc-resolver@^11.6.1: - version "11.14.0" - resolved "https://registry.yarnpkg.com/oxc-resolver/-/oxc-resolver-11.14.0.tgz#8737deba9b8cd51054d56fb9886213d1fa7cf5a5" - integrity sha512-i4wNrqhOd+4YdHJfHglHtFiqqSxXuzFA+RUqmmWN1aMD3r1HqUSrIhw17tSO4jwKfhLs9uw1wzFPmvMsWacStg== - optionalDependencies: - "@oxc-resolver/binding-android-arm-eabi" "11.14.0" - "@oxc-resolver/binding-android-arm64" "11.14.0" - "@oxc-resolver/binding-darwin-arm64" "11.14.0" - "@oxc-resolver/binding-darwin-x64" "11.14.0" - "@oxc-resolver/binding-freebsd-x64" "11.14.0" - "@oxc-resolver/binding-linux-arm-gnueabihf" "11.14.0" - "@oxc-resolver/binding-linux-arm-musleabihf" "11.14.0" - "@oxc-resolver/binding-linux-arm64-gnu" "11.14.0" - "@oxc-resolver/binding-linux-arm64-musl" "11.14.0" - "@oxc-resolver/binding-linux-ppc64-gnu" "11.14.0" - "@oxc-resolver/binding-linux-riscv64-gnu" "11.14.0" - "@oxc-resolver/binding-linux-riscv64-musl" "11.14.0" - "@oxc-resolver/binding-linux-s390x-gnu" "11.14.0" - "@oxc-resolver/binding-linux-x64-gnu" "11.14.0" - "@oxc-resolver/binding-linux-x64-musl" "11.14.0" - "@oxc-resolver/binding-wasm32-wasi" "11.14.0" - "@oxc-resolver/binding-win32-arm64-msvc" "11.14.0" - "@oxc-resolver/binding-win32-ia32-msvc" "11.14.0" - "@oxc-resolver/binding-win32-x64-msvc" "11.14.0" - p-cancelable@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-3.0.0.tgz#63826694b54d61ca1c20ebcb6d3ecf5e14cd8050" @@ -16736,10 +16572,10 @@ pinkie@^2.0.0: resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= -pirates@^4.0.4, pirates@^4.0.6, pirates@^4.0.7: - version "4.0.7" - resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.7.tgz#643b4a18c4257c8a65104b73f3049ce9a0a15e22" - integrity sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA== +pirates@^4.0.4, pirates@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.6.tgz#3018ae32ecfcff6c29ba2267cbf21166ac1f36b9" + integrity sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg== piscina@^3.2.0: version "3.2.0" @@ -18715,7 +18551,7 @@ source-map-support@0.5.19: buffer-from "^1.0.0" source-map "^0.6.0" -source-map-support@^0.5.16, source-map-support@^0.5.21, source-map-support@~0.5.12, source-map-support@~0.5.20: +source-map-support@^0.5.16, source-map-support@~0.5.12, source-map-support@~0.5.20: version "0.5.21" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== From 15c87a6f8deb14babe5cf763b151e0b7c5e32ac8 Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Tue, 25 Nov 2025 23:34:29 -0800 Subject: [PATCH 061/120] yarn change in shared-contexts --- ...ared-contexts-8bdf4419-527c-4852-accd-686067675ba9.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 change/@fluentui-react-shared-contexts-8bdf4419-527c-4852-accd-686067675ba9.json diff --git a/change/@fluentui-react-shared-contexts-8bdf4419-527c-4852-accd-686067675ba9.json b/change/@fluentui-react-shared-contexts-8bdf4419-527c-4852-accd-686067675ba9.json new file mode 100644 index 00000000000000..0c3fc823a60a83 --- /dev/null +++ b/change/@fluentui-react-shared-contexts-8bdf4419-527c-4852-accd-686067675ba9.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "including package react-file-type-icons v9", + "packageName": "@fluentui/react-shared-contexts", + "email": "caperez@microsoft.com", + "dependentChangeType": "patch" +} From 921aeff9c98aa852c1852ebf10f530ed7d5f5d8c Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Wed, 26 Nov 2025 10:30:37 -0800 Subject: [PATCH 062/120] chore: update package dependencies for react and charting components --- packages/public-docsite-setup/package.json | 3 +-- packages/react-examples/package.json | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/public-docsite-setup/package.json b/packages/public-docsite-setup/package.json index 6959a27adc4fce..ead0980295c33e 100644 --- a/packages/public-docsite-setup/package.json +++ b/packages/public-docsite-setup/package.json @@ -26,6 +26,5 @@ "devDependencies": { "@fluentui/eslint-plugin": "*", "@fluentui/scripts-tasks": "*" - }, - "dependencies": {} + } } diff --git a/packages/react-examples/package.json b/packages/react-examples/package.json index 2a80d668b2d90b..813f858f189340 100644 --- a/packages/react-examples/package.json +++ b/packages/react-examples/package.json @@ -31,13 +31,13 @@ "@fluentui/font-icons-mdl2": "^8.5.69", "@fluentui/foundation-legacy": "^8.6.2", "@fluentui/merge-styles": "^8.6.14", - "@fluentui/react": "^8.125.1", + "@fluentui/react": "^8.125.2", "@fluentui/react-cards": "^0.207.1", - "@fluentui/react-charting": "^5.25.2", + "@fluentui/react-charting": "^5.25.3", "@fluentui/react-docsite-components": "^8.15.0", "@fluentui/react-experiments": "^8.16.1", "@fluentui/react-file-type-icons-v8": "^8.15.1", - "@fluentui/react-focus": "^8.10.1", + "@fluentui/react-focus": "^8.10.2", "@fluentui/react-hooks": "^8.10.1", "@fluentui/react-icons-mdl2": "^1.4.2", "@fluentui/react-window-provider": "^2.3.1", From 91ed548522a6a9ae600fe1fecb1d4b4c4525f3b6 Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Wed, 26 Nov 2025 11:26:49 -0800 Subject: [PATCH 063/120] feat: add public docsite setup for v8 version of file-type-icons package --- ...docsite-setup-7ad0c9ff-7dd2-4ebe-a63f-a94d93a6b458.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 change/@fluentui-public-docsite-setup-7ad0c9ff-7dd2-4ebe-a63f-a94d93a6b458.json diff --git a/change/@fluentui-public-docsite-setup-7ad0c9ff-7dd2-4ebe-a63f-a94d93a6b458.json b/change/@fluentui-public-docsite-setup-7ad0c9ff-7dd2-4ebe-a63f-a94d93a6b458.json new file mode 100644 index 00000000000000..880087b79cce6d --- /dev/null +++ b/change/@fluentui-public-docsite-setup-7ad0c9ff-7dd2-4ebe-a63f-a94d93a6b458.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Associating this older public docsite with the v8 version of the file-type-icons package (new workspace name got -v8 suffix added)", + "packageName": "@fluentui/public-docsite-setup", + "email": "caperez@microsoft.com", + "dependentChangeType": "patch" +} From c7a138895e96fc81ddfdbaaf43b8a6c6644a6ab1 Mon Sep 17 00:00:00 2001 From: "C. Perez" Date: Mon, 15 Dec 2025 10:08:06 -0800 Subject: [PATCH 064/120] missing comma after merge --- packages/react-components/react-components/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-components/react-components/package.json b/packages/react-components/react-components/package.json index c3aad284b74b86..7f406dc5a0752f 100644 --- a/packages/react-components/react-components/package.json +++ b/packages/react-components/react-components/package.json @@ -77,7 +77,7 @@ "@fluentui/react-motion": "^9.11.4", "@fluentui/react-carousel": "^9.8.13", "@fluentui/react-color-picker": "^9.2.11", - "@fluentui/react-file-type-icons": "^9.0.0" + "@fluentui/react-file-type-icons": "^9.0.0", "@fluentui/react-nav": "^9.3.15" }, "peerDependencies": { From 741d4b300cc17f4d5cd170b2bbb4505ecb58093e Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Wed, 17 Dec 2025 14:43:54 -0800 Subject: [PATCH 065/120] fixing overwritten package name differentiation, retaining publishConfig to publish both v8.x.x and v9.x.x packages if needed --- packages/react-file-type-icons/package.json | 2 +- yarn.lock | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/react-file-type-icons/package.json b/packages/react-file-type-icons/package.json index c34a55c00b50a4..c406a8ea264ed7 100644 --- a/packages/react-file-type-icons/package.json +++ b/packages/react-file-type-icons/package.json @@ -1,5 +1,5 @@ { - "name": "@fluentui/react-file-type-icons", + "name": "@fluentui/react-file-type-icons-v8", "version": "8.15.3", "description": "Fluent UI React file type icon set for FluentUI v8", "main": "lib-commonjs/index.js", diff --git a/yarn.lock b/yarn.lock index 6ed78a738c5105..d8db6451202f24 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1868,6 +1868,15 @@ "@babel/runtime" "^7.10.4" react-is "^17.0.2" +"@fluentui/react-file-type-icons@^8.15.3": + version "8.15.3" + resolved "https://registry.yarnpkg.com/@fluentui/react-file-type-icons/-/react-file-type-icons-8.15.3.tgz#04b8f5ac77b88e6b23083f7328be80bc9813f6bf" + integrity sha512-RT4gUmkg7UX9FUsG0zTwCNpkK2BmiU2dUVj/VAFm841WDDqMpsVeQutJZ5u+QVdyvEVZMLqUVVw33Rsd1cOHGg== + dependencies: + "@fluentui/set-version" "^8.2.24" + "@fluentui/style-utilities" "^8.13.6" + tslib "^2.1.0" + "@fluentui/react-icons-northstar@*", "@fluentui/react-icons-northstar@0.66.5", "@fluentui/react-icons-northstar@^0.66.5": version "0.66.5" resolved "https://registry.yarnpkg.com/@fluentui/react-icons-northstar/-/react-icons-northstar-0.66.5.tgz#a33765f1c3ac98e1901d9b208d78f42d1ad23cb5" From f06399eb2254f7c798de8f81505d47a38eadc298 Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Wed, 17 Dec 2025 15:45:55 -0800 Subject: [PATCH 066/120] added correct config in syncpack semvergroups to support sim-shipping --- syncpack.config.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/syncpack.config.js b/syncpack.config.js index 6fbd804075c49f..60e179215bcdf4 100644 --- a/syncpack.config.js +++ b/syncpack.config.js @@ -17,6 +17,12 @@ const config = { dependencies: ['@fluentui/**'], isIgnored: true, }, + { + // Allow both v8 and v9 versions of @fluentui/react-file-type-icons to coexist + // v8 publishes as 8.x.x, v9 publishes as 9.x.x to the same npm package name + dependencies: ['@fluentui/react-file-type-icons'], + isIgnored: true, + }, ], versionGroups: [ // completely ignore all devDeps that specify inner workspace deps - as we enforce usage of `*` or `>9.0.0-alpha` From f98c7f1d32e0ff170dc88fadd59fe23e4f6cbcb7 Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Wed, 17 Dec 2025 17:09:25 -0800 Subject: [PATCH 067/120] fixing syncpack config --- syncpack.config.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/syncpack.config.js b/syncpack.config.js index 60e179215bcdf4..46aed39341a96b 100644 --- a/syncpack.config.js +++ b/syncpack.config.js @@ -17,12 +17,6 @@ const config = { dependencies: ['@fluentui/**'], isIgnored: true, }, - { - // Allow both v8 and v9 versions of @fluentui/react-file-type-icons to coexist - // v8 publishes as 8.x.x, v9 publishes as 9.x.x to the same npm package name - dependencies: ['@fluentui/react-file-type-icons'], - isIgnored: true, - }, ], versionGroups: [ // completely ignore all devDeps that specify inner workspace deps - as we enforce usage of `*` or `>9.0.0-alpha` @@ -32,6 +26,13 @@ const config = { dependencies: ['@fluentui/**'], isIgnored: true, }, + { + // Allow both v8 and v9 versions of @fluentui/react-file-type-icons to coexist + // v8 publishes as 8.x.x, v9 publishes as 9.x.x to the same npm package name + packages: ['**'], + dependencies: ['@fluentui/react-file-type-icons'], + isIgnored: true, + }, { packages: ['@fluentui/fluentui-repo'], dependencies: [ From 85c4d999878b30da4a181ad82f209d676e4286c2 Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Wed, 17 Dec 2025 18:18:42 -0800 Subject: [PATCH 068/120] update package name for file type icons to v8 version --- packages/react-examples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-examples/package.json b/packages/react-examples/package.json index 1ca886551586df..96e3c2bda516cd 100644 --- a/packages/react-examples/package.json +++ b/packages/react-examples/package.json @@ -36,7 +36,7 @@ "@fluentui/react-charting": "^5.25.4", "@fluentui/react-docsite-components": "^8.16.0", "@fluentui/react-experiments": "^8.16.3", - "@fluentui/react-file-type-icons": "^8.15.3", + "@fluentui/react-file-type-icons-v8": "^8.15.3", "@fluentui/react-focus": "^8.10.3", "@fluentui/react-hooks": "^8.10.2", "@fluentui/react-icons-mdl2": "^1.4.3", From 2b58691f6c85c046fbde4cc78873a193305b6d4f Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Wed, 17 Dec 2025 22:42:27 -0800 Subject: [PATCH 069/120] fixing name error - undoing --- packages/react-examples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-examples/package.json b/packages/react-examples/package.json index 96e3c2bda516cd..1ca886551586df 100644 --- a/packages/react-examples/package.json +++ b/packages/react-examples/package.json @@ -36,7 +36,7 @@ "@fluentui/react-charting": "^5.25.4", "@fluentui/react-docsite-components": "^8.16.0", "@fluentui/react-experiments": "^8.16.3", - "@fluentui/react-file-type-icons-v8": "^8.15.3", + "@fluentui/react-file-type-icons": "^8.15.3", "@fluentui/react-focus": "^8.10.3", "@fluentui/react-hooks": "^8.10.2", "@fluentui/react-icons-mdl2": "^1.4.3", From 18780add49b9941cd86e9c71501bb6e4130d440d Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Tue, 3 Feb 2026 09:27:50 -0800 Subject: [PATCH 070/120] fix: correct JSON formatting in package.json by adding missing comma --- packages/public-docsite-setup/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/public-docsite-setup/package.json b/packages/public-docsite-setup/package.json index e0c86f59af58c6..6959a27adc4fce 100644 --- a/packages/public-docsite-setup/package.json +++ b/packages/public-docsite-setup/package.json @@ -26,6 +26,6 @@ "devDependencies": { "@fluentui/eslint-plugin": "*", "@fluentui/scripts-tasks": "*" - } + }, "dependencies": {} } From 096518746737d0f01ae84936a3b24b3db0daba65 Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Tue, 3 Feb 2026 10:22:45 -0800 Subject: [PATCH 071/120] chore: update yarn.lock --- yarn.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/yarn.lock b/yarn.lock index 413990b48af1e5..ee1c926687aca8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1863,13 +1863,13 @@ "@babel/runtime" "^7.10.4" react-is "^17.0.2" -"@fluentui/react-file-type-icons@^8.15.3": - version "8.15.3" - resolved "https://registry.yarnpkg.com/@fluentui/react-file-type-icons/-/react-file-type-icons-8.15.3.tgz#04b8f5ac77b88e6b23083f7328be80bc9813f6bf" - integrity sha512-RT4gUmkg7UX9FUsG0zTwCNpkK2BmiU2dUVj/VAFm841WDDqMpsVeQutJZ5u+QVdyvEVZMLqUVVw33Rsd1cOHGg== +"@fluentui/react-file-type-icons@^8.16.0": + version "8.16.0" + resolved "https://registry.yarnpkg.com/@fluentui/react-file-type-icons/-/react-file-type-icons-8.16.0.tgz#f1734ec0ebe51504906c3f454a0c87bef8d0d439" + integrity sha512-8rouTQWDt+8tT2DT/S4ItkBaSaKj1KJ7q66VTw6RIW2QNcVpEaopGfOYQooVbs0u01xjxFd54SG7vRsXH391mw== dependencies: "@fluentui/set-version" "^8.2.24" - "@fluentui/style-utilities" "^8.13.6" + "@fluentui/style-utilities" "^8.14.0" tslib "^2.1.0" "@fluentui/react-icons-northstar@*", "@fluentui/react-icons-northstar@0.66.5", "@fluentui/react-icons-northstar@^0.66.5": From 43a15f51b7ee4747c45d20075426babb247a0103 Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Tue, 3 Feb 2026 11:38:02 -0800 Subject: [PATCH 072/120] chore: update API file for react-file-type-icons --- .../library/etc/react-file-type-icons.api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-components/react-file-type-icons/library/etc/react-file-type-icons.api.md b/packages/react-components/react-file-type-icons/library/etc/react-file-type-icons.api.md index ba285fb0bb30a4..f0fd8497082ba5 100644 --- a/packages/react-components/react-file-type-icons/library/etc/react-file-type-icons.api.md +++ b/packages/react-components/react-file-type-icons/library/etc/react-file-type-icons.api.md @@ -14,7 +14,7 @@ import type { Slot } from '@fluentui/react-utilities'; import type { SlotClassNames } from '@fluentui/react-utilities'; // @public (undocumented) -export const DEFAULT_BASE_URL = "https://res.cdn.office.net/files/fabric-cdn-prod_20251107.003/assets/item-types/"; +export const DEFAULT_BASE_URL = "https://res.cdn.office.net/files/fabric-cdn-prod_20260113.001/assets/item-types/"; // @public (undocumented) export const DEFAULT_ICON_SIZE: FileTypeIconSize; From 41940e8731d30375dee823ffc35b75a73b0c0a08 Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Wed, 4 Feb 2026 00:23:35 -0800 Subject: [PATCH 073/120] feat: add targets configuration for generate-api in project.json --- .../react-file-type-icons/library/project.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/react-components/react-file-type-icons/library/project.json b/packages/react-components/react-file-type-icons/library/project.json index 227a8e1ad8d90e..2be83b5696d712 100644 --- a/packages/react-components/react-file-type-icons/library/project.json +++ b/packages/react-components/react-file-type-icons/library/project.json @@ -4,5 +4,10 @@ "projectType": "library", "sourceRoot": "packages/react-components/react-file-type-icons/library/src", "tags": ["platform:web", "vNext"], - "implicitDependencies": [] + "implicitDependencies": [], + "targets": { + "generate-api": { + "dependsOn": ["^generate-api", "^build"] + } + } } From 6d7057bff84d309d18a64f0d45af62fe38e72327 Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Wed, 25 Feb 2026 20:00:24 -0800 Subject: [PATCH 074/120] initial ship of v9 in v8 --- .vscode/tasks.json | 14 ++++ .../FileTypeIcon/FileTypeIcon.stories.tsx | 32 ++++++++ packages/react-file-type-icons/README.md | 13 ++++ packages/react-file-type-icons/jest.config.js | 10 ++- packages/react-file-type-icons/package.json | 3 + packages/react-file-type-icons/project.json | 2 +- .../react-file-type-icons/src/FileTypeIcon.ts | 13 ++++ .../FileTypeIcon/FileTypeIcon.test.tsx | 74 +++++++++++++++++++ .../components/FileTypeIcon/FileTypeIcon.tsx | 21 ++++++ .../FileTypeIcon/FileTypeIcon.types.ts | 26 +++++++ .../src/components/FileTypeIcon/index.ts | 5 ++ .../renderFileTypeIcon_unstable.tsx | 15 ++++ .../useFileTypeIconStyles.styles.ts | 26 +++++++ .../FileTypeIcon/useFileTypeIcon_unstable.ts | 60 +++++++++++++++ .../src/components/index.ts | 1 + packages/react-file-type-icons/src/index.ts | 9 +++ .../src/testing/setVersionMock.js | 3 + .../stories/.storybook/main.js | 20 +++++ .../stories/.storybook/mocks/set-version.js | 3 + .../stories/.storybook/preview.js | 7 ++ .../stories/.storybook/tsconfig.json | 11 +++ .../react-file-type-icons/stories/README.md | 20 +++++ .../stories/eslint.config.js | 11 +++ .../stories/package.json | 5 ++ .../stories/project.json | 8 ++ .../FileTypeIconDefault.stories.tsx | 12 +++ .../FileTypeIcon/FileTypeIconDescription.md | 3 + .../src/FileTypeIcon/index.stories.tsx | 17 +++++ .../stories/src/index.ts | 1 + .../stories/tsconfig.json | 27 +++++++ .../stories/tsconfig.lib.json | 11 +++ 31 files changed, 481 insertions(+), 2 deletions(-) create mode 100644 apps/vr-tests-react-components/src/stories/FileTypeIcon/FileTypeIcon.stories.tsx create mode 100644 packages/react-file-type-icons/src/FileTypeIcon.ts create mode 100644 packages/react-file-type-icons/src/components/FileTypeIcon/FileTypeIcon.test.tsx create mode 100644 packages/react-file-type-icons/src/components/FileTypeIcon/FileTypeIcon.tsx create mode 100644 packages/react-file-type-icons/src/components/FileTypeIcon/FileTypeIcon.types.ts create mode 100644 packages/react-file-type-icons/src/components/FileTypeIcon/index.ts create mode 100644 packages/react-file-type-icons/src/components/FileTypeIcon/renderFileTypeIcon_unstable.tsx create mode 100644 packages/react-file-type-icons/src/components/FileTypeIcon/useFileTypeIconStyles.styles.ts create mode 100644 packages/react-file-type-icons/src/components/FileTypeIcon/useFileTypeIcon_unstable.ts create mode 100644 packages/react-file-type-icons/src/components/index.ts create mode 100644 packages/react-file-type-icons/src/testing/setVersionMock.js create mode 100644 packages/react-file-type-icons/stories/.storybook/main.js create mode 100644 packages/react-file-type-icons/stories/.storybook/mocks/set-version.js create mode 100644 packages/react-file-type-icons/stories/.storybook/preview.js create mode 100644 packages/react-file-type-icons/stories/.storybook/tsconfig.json create mode 100644 packages/react-file-type-icons/stories/README.md create mode 100644 packages/react-file-type-icons/stories/eslint.config.js create mode 100644 packages/react-file-type-icons/stories/package.json create mode 100644 packages/react-file-type-icons/stories/project.json create mode 100644 packages/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx create mode 100644 packages/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconDescription.md create mode 100644 packages/react-file-type-icons/stories/src/FileTypeIcon/index.stories.tsx create mode 100644 packages/react-file-type-icons/stories/src/index.ts create mode 100644 packages/react-file-type-icons/stories/tsconfig.json create mode 100644 packages/react-file-type-icons/stories/tsconfig.lib.json diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 048adbe1b9712b..11cf761383769a 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -50,6 +50,20 @@ "kind": "build", "isDefault": true } + }, + { + "label": "Storybook FileTypeIcon stories", + "type": "shell", + "command": "node", + "args": [ + "./node_modules/storybook/bin/index.cjs", + "dev", + "-c", + "packages/react-file-type-icons/stories/.storybook", + "-p", + "6011" + ], + "isBackground": true } ] } diff --git a/apps/vr-tests-react-components/src/stories/FileTypeIcon/FileTypeIcon.stories.tsx b/apps/vr-tests-react-components/src/stories/FileTypeIcon/FileTypeIcon.stories.tsx new file mode 100644 index 00000000000000..0e8da90751431c --- /dev/null +++ b/apps/vr-tests-react-components/src/stories/FileTypeIcon/FileTypeIcon.stories.tsx @@ -0,0 +1,32 @@ +import * as React from 'react'; +import type { Meta } from '@storybook/react-webpack5'; +import { Steps } from 'storywright'; +import type { StoryParameters } from 'storywright'; +import { FileIconType, FileTypeIcon } from '@fluentui/react-file-type-icons'; +import { DARK_MODE, getStoryVariant, HIGH_CONTRAST, TestWrapperDecorator } from '../../utilities'; + +export default { + title: 'FileTypeIcon', + component: FileTypeIcon, + decorators: [TestWrapperDecorator], + parameters: { + storyWright: { + steps: new Steps().snapshot('default', { cropTo: '.testWrapper' }).end(), + }, + } satisfies StoryParameters, +} satisfies Meta; + +export const Default = () => ( +
+ + + + + +
+); +Default.storyName = 'default'; + +export const DefaultHighContrast = getStoryVariant(Default, HIGH_CONTRAST); + +export const DefaultDarkMode = getStoryVariant(Default, DARK_MODE); diff --git a/packages/react-file-type-icons/README.md b/packages/react-file-type-icons/README.md index 306739ffaf7035..3618afadfe60f0 100644 --- a/packages/react-file-type-icons/README.md +++ b/packages/react-file-type-icons/README.md @@ -32,6 +32,19 @@ import { getFileTypeIconProps } from '@fluentui/react-file-type-icons'; ; ``` +## FileTypeIcon component (v9-style) + +This package also exports a `FileTypeIcon` React component that can be used directly without separately composing icon props. + +```tsx +import { FileTypeIcon, FileIconType } from '@fluentui/react-file-type-icons'; + +; +; +``` + +`FileTypeIcon` resolves icons through the same shared extension/type logic as `getFileTypeIconProps` to keep v8 and component-based usage in sync. + ## Notes See [GitHub](https://github.com/microsoft/fluentui) for more details on the Fluent UI React project and packages within. diff --git a/packages/react-file-type-icons/jest.config.js b/packages/react-file-type-icons/jest.config.js index c0d56a899958b3..eed53c01846807 100644 --- a/packages/react-file-type-icons/jest.config.js +++ b/packages/react-file-type-icons/jest.config.js @@ -1,3 +1,11 @@ const { createV8Config: createConfig } = require('@fluentui/scripts-jest'); -module.exports = createConfig(); +const config = createConfig(); + +module.exports = { + ...config, + moduleNameMapper: { + ...(config.moduleNameMapper || {}), + '^@fluentui/set-version$': '/src/testing/setVersionMock.js', + }, +}; diff --git a/packages/react-file-type-icons/package.json b/packages/react-file-type-icons/package.json index 0900904f5b1725..63ac2aea15b6f6 100644 --- a/packages/react-file-type-icons/package.json +++ b/packages/react-file-type-icons/package.json @@ -18,8 +18,11 @@ "clean": "just-scripts clean" }, "dependencies": { + "@fluentui/react-jsx-runtime": "^9.3.4", + "@fluentui/react-utilities": "^9.26.0", "@fluentui/set-version": "^8.2.24", "@fluentui/style-utilities": "^8.13.6", + "@griffel/react": "^1.5.32", "tslib": "^2.1.0" }, "peerDependencies": { diff --git a/packages/react-file-type-icons/project.json b/packages/react-file-type-icons/project.json index 49d600378aadde..c889b4881bbdad 100644 --- a/packages/react-file-type-icons/project.json +++ b/packages/react-file-type-icons/project.json @@ -3,7 +3,7 @@ "$schema": "../../node_modules/nx/schemas/project-schema.json", "projectType": "library", "sourceRoot": "packages/react-file-type-icons/src", - "tags": ["v8"], + "tags": ["v8", "vNext", "compat"], "implicitDependencies": [], "targets": { "test": { diff --git a/packages/react-file-type-icons/src/FileTypeIcon.ts b/packages/react-file-type-icons/src/FileTypeIcon.ts new file mode 100644 index 00000000000000..c21d15d335c8b9 --- /dev/null +++ b/packages/react-file-type-icons/src/FileTypeIcon.ts @@ -0,0 +1,13 @@ +export type { + FileTypeIconProps, + FileTypeIconSlots, + FileTypeIconState, + ImageFileType as FileTypeIconImageFileType, +} from './components/FileTypeIcon/index'; +export { + FileTypeIcon, + fileTypeIconClassNames, + renderFileTypeIcon_unstable, + useFileTypeIcon_unstable, + useFileTypeIconStyles_unstable, +} from './components/FileTypeIcon/index'; diff --git a/packages/react-file-type-icons/src/components/FileTypeIcon/FileTypeIcon.test.tsx b/packages/react-file-type-icons/src/components/FileTypeIcon/FileTypeIcon.test.tsx new file mode 100644 index 00000000000000..9b474028261c8d --- /dev/null +++ b/packages/react-file-type-icons/src/components/FileTypeIcon/FileTypeIcon.test.tsx @@ -0,0 +1,74 @@ +import * as React from 'react'; +import { render } from '@testing-library/react'; +import { getFileTypeIconAsUrl } from '../../getFileTypeIconAsUrl'; +import { getFileTypeIconProps } from '../../getFileTypeIconProps'; +import { FileIconType } from '../../FileIconType'; +import { FileTypeIcon } from './FileTypeIcon'; +import { fileTypeIconClassNames } from './useFileTypeIconStyles.styles'; + +describe('FileTypeIcon', () => { + beforeAll(() => { + Object.defineProperty(window, 'devicePixelRatio', { + value: 1, + configurable: true, + }); + }); + + it('renders as an image element', () => { + const { getByRole } = render(); + expect(getByRole('img')).toBeTruthy(); + }); + + it('applies the component static class name', () => { + const { getByRole } = render(); + expect(getByRole('img').className.includes(fileTypeIconClassNames.root)).toBe(true); + }); + + it('uses shared resolver output for icon name and URL', () => { + const options = { extension: 'pptx' as const, size: 24 as const, imageFileType: 'svg' as const }; + const expectedIcon = getFileTypeIconProps(options); + const expectedUrl = getFileTypeIconAsUrl(options); + + const { getByRole } = render(); + const img = getByRole('img'); + + expect(img.getAttribute('data-icon-name')).toBe(expectedIcon.iconName); + expect(img.getAttribute('src')).toBe(expectedUrl); + expect(img.getAttribute('aria-label')).toBe(expectedIcon['aria-label']); + expect(img.getAttribute('width')).toBe('24'); + expect(img.getAttribute('height')).toBe('24'); + }); + + it('supports resolving by FileIconType and custom baseUrl', () => { + const options = { + type: FileIconType.folder, + size: 32 as const, + imageFileType: 'png' as const, + }; + + const expectedUrl = getFileTypeIconAsUrl(options, 'https://example.com/assets/item-types/'); + + const { getByRole } = render( + , + ); + + expect(getByRole('img').getAttribute('src')).toBe(expectedUrl); + }); + + it('falls back to genericfile icon for unknown extension', () => { + const { getByRole } = render(); + expect(getByRole('img').getAttribute('data-icon-name')?.startsWith('genericfile')).toBe(true); + }); + + it('forwards refs to the root img element', () => { + const ref = React.createRef(); + render(); + + expect(ref.current?.tagName).toBe('IMG'); + }); +}); diff --git a/packages/react-file-type-icons/src/components/FileTypeIcon/FileTypeIcon.tsx b/packages/react-file-type-icons/src/components/FileTypeIcon/FileTypeIcon.tsx new file mode 100644 index 00000000000000..85d2a07e783589 --- /dev/null +++ b/packages/react-file-type-icons/src/components/FileTypeIcon/FileTypeIcon.tsx @@ -0,0 +1,21 @@ +'use client'; + +import * as React from 'react'; +import type { ForwardRefComponent } from '@fluentui/react-utilities'; +import type { FileTypeIconProps } from './FileTypeIcon.types'; +import { renderFileTypeIcon_unstable } from './renderFileTypeIcon_unstable'; +import { useFileTypeIcon_unstable } from './useFileTypeIcon_unstable'; +import { useFileTypeIconStyles_unstable } from './useFileTypeIconStyles.styles'; + +/** + * FileTypeIcon renders a file type icon as an image resolved from the file extension or type. + */ +export const FileTypeIcon: ForwardRefComponent = React.forwardRef((props, ref) => { + const state = useFileTypeIcon_unstable(props, ref); + + useFileTypeIconStyles_unstable(state); + + return renderFileTypeIcon_unstable(state); +}); + +FileTypeIcon.displayName = 'FileTypeIcon'; diff --git a/packages/react-file-type-icons/src/components/FileTypeIcon/FileTypeIcon.types.ts b/packages/react-file-type-icons/src/components/FileTypeIcon/FileTypeIcon.types.ts new file mode 100644 index 00000000000000..329ca8e1583714 --- /dev/null +++ b/packages/react-file-type-icons/src/components/FileTypeIcon/FileTypeIcon.types.ts @@ -0,0 +1,26 @@ +import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities'; +import type { ImageFileType, IFileTypeIconOptions } from '../../getFileTypeIconProps'; + +export type FileTypeIconSlots = { + root: Slot<'img'>; +}; + +export type FileTypeIconProps = Omit, 'src'> & + IFileTypeIconOptions & { + /** + * Optional base URL used to resolve image URLs. + * @default DEFAULT_BASE_URL + */ + baseUrl?: string; + }; + +export type FileTypeIconState = ComponentState & + Required> & { + baseUrl?: string; + iconName: string; + src?: string; + extension?: string; + type?: IFileTypeIconOptions['type']; + }; + +export type { ImageFileType }; diff --git a/packages/react-file-type-icons/src/components/FileTypeIcon/index.ts b/packages/react-file-type-icons/src/components/FileTypeIcon/index.ts new file mode 100644 index 00000000000000..eede2598095f66 --- /dev/null +++ b/packages/react-file-type-icons/src/components/FileTypeIcon/index.ts @@ -0,0 +1,5 @@ +export type { FileTypeIconProps, FileTypeIconSlots, FileTypeIconState, ImageFileType } from './FileTypeIcon.types'; +export { FileTypeIcon } from './FileTypeIcon'; +export { renderFileTypeIcon_unstable } from './renderFileTypeIcon_unstable'; +export { useFileTypeIcon_unstable } from './useFileTypeIcon_unstable'; +export { fileTypeIconClassNames, useFileTypeIconStyles_unstable } from './useFileTypeIconStyles.styles'; diff --git a/packages/react-file-type-icons/src/components/FileTypeIcon/renderFileTypeIcon_unstable.tsx b/packages/react-file-type-icons/src/components/FileTypeIcon/renderFileTypeIcon_unstable.tsx new file mode 100644 index 00000000000000..952f8cb09b18f8 --- /dev/null +++ b/packages/react-file-type-icons/src/components/FileTypeIcon/renderFileTypeIcon_unstable.tsx @@ -0,0 +1,15 @@ +/** @jsxRuntime automatic */ +/** @jsxImportSource @fluentui/react-jsx-runtime */ + +import { assertSlots } from '@fluentui/react-utilities'; +import type { JSXElement } from '@fluentui/react-utilities'; +import type { FileTypeIconSlots, FileTypeIconState } from './FileTypeIcon.types'; + +/** + * Render the final JSX of FileTypeIcon. + */ +export const renderFileTypeIcon_unstable = (state: FileTypeIconState): JSXElement => { + assertSlots(state); + + return ; +}; diff --git a/packages/react-file-type-icons/src/components/FileTypeIcon/useFileTypeIconStyles.styles.ts b/packages/react-file-type-icons/src/components/FileTypeIcon/useFileTypeIconStyles.styles.ts new file mode 100644 index 00000000000000..5d5bb3249f48ef --- /dev/null +++ b/packages/react-file-type-icons/src/components/FileTypeIcon/useFileTypeIconStyles.styles.ts @@ -0,0 +1,26 @@ +'use client'; + +import { makeStyles, mergeClasses } from '@griffel/react'; +import type { SlotClassNames } from '@fluentui/react-utilities'; +import type { FileTypeIconSlots, FileTypeIconState } from './FileTypeIcon.types'; + +export const fileTypeIconClassNames: SlotClassNames = { + root: 'fui-FileTypeIcon', +}; + +const useStyles = makeStyles({ + root: { + display: 'inline-block', + verticalAlign: 'middle', + }, +}); + +export const useFileTypeIconStyles_unstable = (state: FileTypeIconState): FileTypeIconState => { + 'use no memo'; + + const styles = useStyles(); + + state.root.className = mergeClasses(fileTypeIconClassNames.root, styles.root, state.root.className); + + return state; +}; diff --git a/packages/react-file-type-icons/src/components/FileTypeIcon/useFileTypeIcon_unstable.ts b/packages/react-file-type-icons/src/components/FileTypeIcon/useFileTypeIcon_unstable.ts new file mode 100644 index 00000000000000..fa2b9f097984e4 --- /dev/null +++ b/packages/react-file-type-icons/src/components/FileTypeIcon/useFileTypeIcon_unstable.ts @@ -0,0 +1,60 @@ +import * as React from 'react'; +import { getIntrinsicElementProps, slot } from '@fluentui/react-utilities'; +import { getFileTypeIconAsUrl } from '../../getFileTypeIconAsUrl'; +import { DEFAULT_ICON_SIZE, getFileTypeIconProps } from '../../getFileTypeIconProps'; +import type { FileTypeIconProps, FileTypeIconState } from './FileTypeIcon.types'; + +/** + * Given user props, returns state and render function for a FileTypeIcon. + */ +export const useFileTypeIcon_unstable = ( + props: FileTypeIconProps, + ref: React.Ref, +): FileTypeIconState => { + const { + baseUrl, + extension, + type, + size = DEFAULT_ICON_SIZE, + imageFileType = 'svg', + 'aria-label': ariaLabel, + ...rootProps + } = props; + + const options = { extension, type, size, imageFileType }; + const iconProps = getFileTypeIconProps(options); + const src = getFileTypeIconAsUrl(options, baseUrl); + + const state: FileTypeIconState = { + size, + imageFileType, + baseUrl, + iconName: iconProps.iconName, + src, + extension, + type, + components: { + root: 'img', + }, + root: slot.always( + getIntrinsicElementProps('img', { + ref, + ...rootProps, + src, + 'aria-label': ariaLabel ?? iconProps['aria-label'], + 'data-icon-name': iconProps.iconName, + }), + { elementType: 'img' }, + ), + }; + + if (state.root.width === undefined) { + state.root.width = size; + } + + if (state.root.height === undefined) { + state.root.height = size; + } + + return state; +}; diff --git a/packages/react-file-type-icons/src/components/index.ts b/packages/react-file-type-icons/src/components/index.ts new file mode 100644 index 00000000000000..be4c861ba9f71c --- /dev/null +++ b/packages/react-file-type-icons/src/components/index.ts @@ -0,0 +1 @@ +export * from './FileTypeIcon/index'; diff --git a/packages/react-file-type-icons/src/index.ts b/packages/react-file-type-icons/src/index.ts index 6cf4a8febb97fa..9c341081e1d3e1 100644 --- a/packages/react-file-type-icons/src/index.ts +++ b/packages/react-file-type-icons/src/index.ts @@ -1,5 +1,13 @@ export { initializeFileTypeIcons } from './initializeFileTypeIcons'; +export { FileTypeIcon } from './FileTypeIcon'; +export { + fileTypeIconClassNames, + renderFileTypeIcon_unstable, + useFileTypeIconStyles_unstable, + useFileTypeIcon_unstable, +} from './FileTypeIcon'; + export { getFileTypeIconProps } from './getFileTypeIconProps'; export { FileIconType } from './FileIconType'; @@ -13,3 +21,4 @@ export { getFileTypeIconAsUrl } from './getFileTypeIconAsUrl'; import './version'; export type { FileTypeIconSize, IFileTypeIconOptions, ImageFileType } from './getFileTypeIconProps'; +export type { FileTypeIconProps, FileTypeIconSlots, FileTypeIconState } from './FileTypeIcon'; diff --git a/packages/react-file-type-icons/src/testing/setVersionMock.js b/packages/react-file-type-icons/src/testing/setVersionMock.js new file mode 100644 index 00000000000000..e9034e29393753 --- /dev/null +++ b/packages/react-file-type-icons/src/testing/setVersionMock.js @@ -0,0 +1,3 @@ +module.exports = { + setVersion: () => undefined, +}; diff --git a/packages/react-file-type-icons/stories/.storybook/main.js b/packages/react-file-type-icons/stories/.storybook/main.js new file mode 100644 index 00000000000000..793cda23a71099 --- /dev/null +++ b/packages/react-file-type-icons/stories/.storybook/main.js @@ -0,0 +1,20 @@ +const rootMain = require('../../../../.storybook/main'); +const path = require('path'); + +module.exports = { + ...rootMain, + stories: [...rootMain.stories, '../src/**/*.mdx', '../src/**/index.stories.@(ts|tsx)'], + addons: [...rootMain.addons], + webpackFinal: (config, options) => { + const localConfig = { ...rootMain.webpackFinal(config, options) }; + + localConfig.resolve = localConfig.resolve || {}; + localConfig.resolve.alias = { + ...(localConfig.resolve.alias || {}), + '@fluentui/react-file-type-icons$': path.resolve(__dirname, '../../src/index.ts'), + '@fluentui/set-version': path.resolve(__dirname, './mocks/set-version.js'), + }; + + return localConfig; + }, +}; diff --git a/packages/react-file-type-icons/stories/.storybook/mocks/set-version.js b/packages/react-file-type-icons/stories/.storybook/mocks/set-version.js new file mode 100644 index 00000000000000..e9034e29393753 --- /dev/null +++ b/packages/react-file-type-icons/stories/.storybook/mocks/set-version.js @@ -0,0 +1,3 @@ +module.exports = { + setVersion: () => undefined, +}; diff --git a/packages/react-file-type-icons/stories/.storybook/preview.js b/packages/react-file-type-icons/stories/.storybook/preview.js new file mode 100644 index 00000000000000..54b770b04a84e3 --- /dev/null +++ b/packages/react-file-type-icons/stories/.storybook/preview.js @@ -0,0 +1,7 @@ +import * as rootPreview from '../../../../.storybook/preview'; + +export const decorators = [...rootPreview.decorators]; + +export const parameters = { ...rootPreview.parameters }; + +export const tags = ['autodocs']; diff --git a/packages/react-file-type-icons/stories/.storybook/tsconfig.json b/packages/react-file-type-icons/stories/.storybook/tsconfig.json new file mode 100644 index 00000000000000..03980896da25ed --- /dev/null +++ b/packages/react-file-type-icons/stories/.storybook/tsconfig.json @@ -0,0 +1,11 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "outDir": "", + "allowJs": true, + "checkJs": true, + "forceConsistentCasingInFileNames": true, + "types": ["static-assets", "environment"] + }, + "include": ["*.js"] +} diff --git a/packages/react-file-type-icons/stories/README.md b/packages/react-file-type-icons/stories/README.md new file mode 100644 index 00000000000000..4c84fb835c13b5 --- /dev/null +++ b/packages/react-file-type-icons/stories/README.md @@ -0,0 +1,20 @@ +# @fluentui/react-file-type-icons-stories + +Storybook stories for packages/react-file-type-icons + +## Usage + +To include within storybook specify stories globs: + +```js +module.exports = { + stories: [ + '../packages/react-file-type-icons/stories/src/**/*.stories.mdx', + '../packages/react-file-type-icons/stories/src/**/index.stories.@(ts|tsx)', + ], +}; +``` + +## API + +No public API available. diff --git a/packages/react-file-type-icons/stories/eslint.config.js b/packages/react-file-type-icons/stories/eslint.config.js new file mode 100644 index 00000000000000..b00f5d9071b136 --- /dev/null +++ b/packages/react-file-type-icons/stories/eslint.config.js @@ -0,0 +1,11 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const rootConfig = require('../../../eslint.config.js'); + +module.exports = defineConfig([ + ...rootConfig, + { + rules: {}, + }, +]); diff --git a/packages/react-file-type-icons/stories/package.json b/packages/react-file-type-icons/stories/package.json new file mode 100644 index 00000000000000..9b73672168c8ee --- /dev/null +++ b/packages/react-file-type-icons/stories/package.json @@ -0,0 +1,5 @@ +{ + "name": "@fluentui/react-file-type-icons-stories", + "version": "0.0.0", + "private": true +} diff --git a/packages/react-file-type-icons/stories/project.json b/packages/react-file-type-icons/stories/project.json new file mode 100644 index 00000000000000..770eba39ab231b --- /dev/null +++ b/packages/react-file-type-icons/stories/project.json @@ -0,0 +1,8 @@ +{ + "name": "react-file-type-icons-stories", + "$schema": "../../../node_modules/nx/schemas/project-schema.json", + "projectType": "library", + "implicitDependencies": [], + "sourceRoot": "packages/react-file-type-icons/stories/src", + "tags": ["v8", "vNext", "compat", "type:stories"] +} diff --git a/packages/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx b/packages/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx new file mode 100644 index 00000000000000..81f8f2564b0a21 --- /dev/null +++ b/packages/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx @@ -0,0 +1,12 @@ +import * as React from 'react'; +import { FileIconType, FileTypeIcon } from '@fluentui/react-file-type-icons'; + +export const Default = () => ( +
+ + + + + +
+); diff --git a/packages/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconDescription.md b/packages/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconDescription.md new file mode 100644 index 00000000000000..c7d2ca09de624a --- /dev/null +++ b/packages/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconDescription.md @@ -0,0 +1,3 @@ +# FileTypeIcon + +`FileTypeIcon` renders a file-type image by extension or file icon type using the same resolver logic as legacy utility APIs. diff --git a/packages/react-file-type-icons/stories/src/FileTypeIcon/index.stories.tsx b/packages/react-file-type-icons/stories/src/FileTypeIcon/index.stories.tsx new file mode 100644 index 00000000000000..bc1de1a55200d1 --- /dev/null +++ b/packages/react-file-type-icons/stories/src/FileTypeIcon/index.stories.tsx @@ -0,0 +1,17 @@ +import { FileTypeIcon } from '@fluentui/react-file-type-icons'; + +import descriptionMd from './FileTypeIconDescription.md'; + +export { Default } from './FileTypeIconDefault.stories'; + +export default { + title: 'Compat Components/FileTypeIcon', + component: FileTypeIcon, + parameters: { + docs: { + description: { + component: descriptionMd, + }, + }, + }, +}; diff --git a/packages/react-file-type-icons/stories/src/index.ts b/packages/react-file-type-icons/stories/src/index.ts new file mode 100644 index 00000000000000..cb0ff5c3b541f6 --- /dev/null +++ b/packages/react-file-type-icons/stories/src/index.ts @@ -0,0 +1 @@ +export {}; diff --git a/packages/react-file-type-icons/stories/tsconfig.json b/packages/react-file-type-icons/stories/tsconfig.json new file mode 100644 index 00000000000000..953035756e47f4 --- /dev/null +++ b/packages/react-file-type-icons/stories/tsconfig.json @@ -0,0 +1,27 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "target": "ES2019", + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "baseUrl": ".", + "paths": { + "@fluentui/react-file-type-icons": ["../src/index.ts"] + }, + "isolatedModules": true, + "importHelpers": true, + "jsx": "react", + "noUnusedLocals": true, + "preserveConstEnums": true + }, + "include": [], + "files": [], + "references": [ + { + "path": "./tsconfig.lib.json" + }, + { + "path": "./.storybook/tsconfig.json" + } + ] +} diff --git a/packages/react-file-type-icons/stories/tsconfig.lib.json b/packages/react-file-type-icons/stories/tsconfig.lib.json new file mode 100644 index 00000000000000..fe05c1b6560197 --- /dev/null +++ b/packages/react-file-type-icons/stories/tsconfig.lib.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "lib": ["ES2019", "dom"], + "outDir": "../../../dist/out-tsc", + "forceConsistentCasingInFileNames": true, + "inlineSources": true, + "types": ["static-assets", "environment"] + }, + "include": ["./src/**/*.ts", "./src/**/*.tsx"] +} From 4a6db74b807cdff257f61467d7769f4c6ebaab1c Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Wed, 25 Feb 2026 20:15:15 -0800 Subject: [PATCH 075/120] feat: enhance FileTypeIcon documentation and add migration/playground stories --- .../FileTypeIcon/FileTypeIconBestPractices.md | 3 + .../FileTypeIcon/FileTypeIconDescription.md | 32 ++++++++- .../FileTypeIconMigration.stories.tsx | 68 +++++++++++++++++++ .../FileTypeIconPlayground.stories.tsx | 56 +++++++++++++++ .../src/FileTypeIcon/index.stories.tsx | 18 ++++- 5 files changed, 173 insertions(+), 4 deletions(-) create mode 100644 packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconMigration.stories.tsx create mode 100644 packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconPlayground.stories.tsx diff --git a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconBestPractices.md b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconBestPractices.md index f09ce54e1b468b..e5336f03d2607a 100644 --- a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconBestPractices.md +++ b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconBestPractices.md @@ -10,6 +10,8 @@ - **Use special types for non-file entities** - Use `folder`, `sharedFolder`, `listItem`, `docset`, or `genericFile` types for appropriate contexts instead of trying to force file extensions. - **Handle unknown file extensions gracefully** - The component automatically falls back to `genericFile` for unrecognized extensions, and is regularly updated to support new file types if they have a recognized icon. - **Consider accessibility** - The component provides default alt text, but ensure the surrounding context makes the file's purpose clear to all users. +- **Prefer the component API for new UI** - Use `FileTypeIcon` in new code and keep utility functions only where direct URL/HTML rendering is required. +- **Use one source of truth for extension parsing** - Normalize filenames to extensions in one helper before rendering lists/tables to avoid inconsistent icon mapping. - **Use consistent sizes within the same UI context** - Mixing different icon sizes in a single list or grid creates visual inconsistency. ## Things to avoid @@ -17,6 +19,7 @@ - **Don't use file type icons as the sole means of identifying files** - Always pair icons with file names or descriptions for better usability and accessibility. - **Don't use file type icons as primary navigation elements** - These icons are meant to represent file types, not actions or navigation destinations. - **Don't override the default alt text without good reason** - The component provides sensible defaults based on the file extension or type. +- **Don't pass both extension and type unless intentional** - `extension` wins; avoid ambiguous callsites. - **Don't use very large sizes (64px+) in dense lists or tables** - Large icons create excessive whitespace and reduce content density. Use thumbnail previews of the real file contents if available. - **Don't use file type icons for branding or decorative purposes** - These icons follow Fluent Design System conventions and are meant for functional file type representation. Avoid non-square aspect ratios, custom styling overrides or distorting the visual design. - **Don't assume all file types have unique icons** - Many extensions may share the same icon; rely on file names for precise identification. diff --git a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconDescription.md b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconDescription.md index 1674419d5c509c..5609d2a47b918c 100644 --- a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconDescription.md +++ b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconDescription.md @@ -4,7 +4,7 @@ Filetype icons represent a file or other "digital object" based on its extension The component automatically selects the appropriate icon from the comprehensive Fluent Design file type icon set and handles device pixel ratio for optimal display quality on all screens. -## Use Filetype Icons when you need to: +## Use Filetype Icons when you need to - **Display file lists or grids** - Help users quickly identify file types in recent lists, document libraries, file browsers, or search results - **Show file attachments or file upload interfaces** - Indicate attachment types in emails, messages, or forms. Provide visual feedback about accepted or uploaded file types @@ -12,6 +12,36 @@ The component automatically selects the appropriate icon from the comprehensive This control integrates seamlessly with other Fluent UI v9 components using the same design principles. It can be used in `DataGrid`, `List`, and `Card` components for displaying file collections, following consistent theming, spacing and sizing patterns with the broader Fluent Design System. +## Quick start + +```tsx +import { FileTypeIcon, FileIconType } from '@fluentui/react-file-type-icons'; + + + +``` + +Use `extension` for real file extensions and `type` for non-extension entities like folders. + +## API guidance + +- `extension` accepts values with or without a leading `.` (for example, `pdf` and `.pdf` both work) +- `type` supports special icons from `FileIconType` for objects that are not files +- `size` supports: `16`, `20`, `24`, `32`, `40`, `48`, `64`, and `96` +- `imageFileType` supports `'svg'` (default) and `'png'` +- `baseUrl` allows overriding the default CDN host for icon assets + +When both `extension` and `type` are provided, `extension` is used for icon resolution. + +## Interop and migration + +This package supports both patterns: + +- component-first rendering via `FileTypeIcon` (recommended for new UI) +- utility-based helpers like `getFileTypeIconAsUrl` and `getFileTypeIconAsHTMLString` (useful for incremental migration) + +See the `Migration` story for side-by-side examples. + ## Features - **Automatic icon selection**: Matches file extensions to the appropriate icon from a comprehensive library diff --git a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconMigration.stories.tsx b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconMigration.stories.tsx new file mode 100644 index 00000000000000..ac078d22291eab --- /dev/null +++ b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconMigration.stories.tsx @@ -0,0 +1,68 @@ +/* eslint-disable @fluentui/no-restricted-imports */ +import * as React from 'react'; +import { makeStyles, tokens } from '@fluentui/react-components'; +import type { JSXElement } from '@fluentui/react-components'; +import { FileTypeIcon, getFileTypeIconAsUrl } from '@fluentui/react-file-type-icons'; + +const useStyles = makeStyles({ + container: { + display: 'grid', + gridTemplateColumns: '1fr 1fr', + gap: '16px', + }, + card: { + display: 'flex', + flexDirection: 'column', + gap: '10px', + padding: '12px', + border: `1px solid ${tokens.colorNeutralStroke1}`, + borderRadius: tokens.borderRadiusMedium, + backgroundColor: tokens.colorNeutralBackground1, + }, + title: { + fontSize: tokens.fontSizeBase300, + fontWeight: tokens.fontWeightSemibold, + }, + row: { + display: 'flex', + alignItems: 'center', + gap: '10px', + }, + code: { + fontFamily: tokens.fontFamilyMonospace, + fontSize: tokens.fontSizeBase100, + color: tokens.colorNeutralForeground3, + }, +}); + +export const V8ToV9Migration = (): JSXElement => { + const styles = useStyles(); + const url = getFileTypeIconAsUrl({ extension: 'docx', size: 32, imageFileType: 'svg' }); + + return ( +
+
+
Utility pattern (legacy-compatible)
+
{url && docx}Manual img rendering
+
getFileTypeIconAsUrl({`{ extension: 'docx', size: 32 }`})
+
+ +
+
Component pattern (recommended)
+
Direct component usage
+
{``}
+
+
+ ); +}; + +V8ToV9Migration.parameters = { + docs: { + description: { + story: + 'Shows side-by-side migration from utility-based URL rendering to the FileTypeIcon component while keeping compatibility utilities available for existing code.', + }, + }, +}; + +V8ToV9Migration.storyName = 'Migration'; diff --git a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconPlayground.stories.tsx b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconPlayground.stories.tsx new file mode 100644 index 00000000000000..adbf330b952a53 --- /dev/null +++ b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconPlayground.stories.tsx @@ -0,0 +1,56 @@ +/* eslint-disable @fluentui/no-restricted-imports */ +import * as React from 'react'; +import type { JSXElement } from '@fluentui/react-components'; +import { makeStyles, tokens } from '@fluentui/react-components'; +import { FileTypeIcon, FileTypeIconProps } from '@fluentui/react-file-type-icons'; + +const useStyles = makeStyles({ + container: { + display: 'flex', + flexDirection: 'column', + gap: '12px', + }, + preview: { + display: 'flex', + alignItems: 'center', + gap: '12px', + padding: '12px', + borderRadius: tokens.borderRadiusMedium, + border: `1px solid ${tokens.colorNeutralStroke1}`, + }, + note: { + color: tokens.colorNeutralForeground3, + fontSize: tokens.fontSizeBase200, + }, +}); + +export const Playground = (args: FileTypeIconProps): JSXElement => { + const styles = useStyles(); + + return ( +
+
+ + Preview using current controls +
+ + Tip: Set either extension or type. When both are provided, extension takes precedence. + +
+ ); +}; + +Playground.args = { + extension: 'docx', + size: 32, + imageFileType: 'svg', +}; + +Playground.parameters = { + docs: { + description: { + story: + 'Interactive playground for trying file extensions, special FileIconType values, size variants, and image format. Use this as the fastest way to validate behavior for your scenario.', + }, + }, +}; diff --git a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/index.stories.tsx b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/index.stories.tsx index 043aecf909fe74..dbaa77ee56fb27 100644 --- a/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/index.stories.tsx +++ b/packages/react-components/react-file-type-icons/stories/src/FileTypeIcon/index.stories.tsx @@ -1,17 +1,19 @@ /* eslint-disable @fluentui/no-restricted-imports */ import type { Meta } from '@storybook/react'; -import { FileTypeIcon } from '@fluentui/react-file-type-icons'; +import { FileTypeIcon, FileIconType } from '@fluentui/react-file-type-icons'; import descriptionMd from './FileTypeIconDescription.md'; import bestPracticesMd from './FileTypeIconBestPractices.md'; export { Default } from './FileTypeIconDefault.stories'; +export { Playground } from './FileTypeIconPlayground.stories'; export { CommonFileTypes } from './FileTypeIconCommon.stories'; export { UrlAndHtml } from './FileTypeIconUrlAndHtml.stories'; export { EdgeCases } from './FileTypeIconEdgeCases.stories'; +export { V8ToV9Migration } from './FileTypeIconMigration.stories'; export default { - title: 'Icons/Filetype Icons', + title: 'Icons/FileTypeIcon', component: FileTypeIcon, parameters: { docs: { @@ -39,7 +41,17 @@ export default { }, type: { control: { type: 'select' }, - options: ['folder', 'genericFile', 'sharedFolder', 'listItem', 'docset'], + options: ['none', 'folder', 'genericFile', 'sharedFolder', 'listItem', 'docset', 'list', 'stream'], + mapping: { + none: undefined, + folder: FileIconType.folder, + genericFile: FileIconType.genericFile, + sharedFolder: FileIconType.sharedFolder, + listItem: FileIconType.listItem, + docset: FileIconType.docset, + list: FileIconType.list, + stream: FileIconType.stream, + }, description: 'Special icon type (alternative to extension)', table: { type: { summary: 'FileIconType' }, From 38bf864fe1e73f813b5b4494ca7110ba7be68818 Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Wed, 25 Feb 2026 21:12:03 -0800 Subject: [PATCH 076/120] feat: add Storybook support for react-file-type-icons and mock set-version module --- .vscode/tasks.json | 14 ++++++++++++++ .../stories/.storybook/main.js | 12 +++++++++--- .../stories/.storybook/mocks/set-version.js | 3 +++ 3 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 packages/react-components/react-file-type-icons/stories/.storybook/mocks/set-version.js diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 048adbe1b9712b..5270fee4f81f41 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -50,6 +50,20 @@ "kind": "build", "isDefault": true } + }, + { + "label": "Storybook react-file-type-icons docs", + "type": "shell", + "command": "node", + "args": [ + "./node_modules/storybook/bin/index.cjs", + "dev", + "-c", + "packages/react-components/react-file-type-icons/stories/.storybook", + "-p", + "6013" + ], + "isBackground": true } ] } diff --git a/packages/react-components/react-file-type-icons/stories/.storybook/main.js b/packages/react-components/react-file-type-icons/stories/.storybook/main.js index 67905c6bfe15f2..94b0413b8ae7f5 100644 --- a/packages/react-components/react-file-type-icons/stories/.storybook/main.js +++ b/packages/react-components/react-file-type-icons/stories/.storybook/main.js @@ -1,13 +1,19 @@ const rootMain = require('../../../../../.storybook/main'); +const path = require('path'); module.exports = /** @type {Omit} */ ({ ...rootMain, stories: [...rootMain.stories, '../src/**/*.mdx', '../src/**/index.stories.@(ts|tsx)'], addons: [...rootMain.addons], - webpackFinal: (config, options) => { - const localConfig = { ...rootMain.webpackFinal(config, options) }; + webpackFinal: async (config, options) => { + const localConfig = await rootMain.webpackFinal(config, options); - // add your own webpack tweaks if needed + localConfig.resolve = localConfig.resolve || {}; + localConfig.resolve.alias = { + ...(localConfig.resolve.alias || {}), + '@fluentui/set-version$': path.resolve(__dirname, './mocks/set-version.js'), + '@fluentui/set-version': path.resolve(__dirname, './mocks/set-version.js'), + }; return localConfig; }, diff --git a/packages/react-components/react-file-type-icons/stories/.storybook/mocks/set-version.js b/packages/react-components/react-file-type-icons/stories/.storybook/mocks/set-version.js new file mode 100644 index 00000000000000..e9034e29393753 --- /dev/null +++ b/packages/react-components/react-file-type-icons/stories/.storybook/mocks/set-version.js @@ -0,0 +1,3 @@ +module.exports = { + setVersion: () => undefined, +}; From b95cdd5e8b81ba04d622b5d699fa230d1421b093 Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Wed, 25 Feb 2026 21:44:05 -0800 Subject: [PATCH 077/120] feat(nx): add skills for generating code, managing plugins, running tasks, and exploring workspaces - Introduced `nx-generate` skill for scaffolding projects and code generation using Nx generators. - Added `nx-plugins` skill to discover and install Nx plugins for various frameworks. - Created `nx-run-tasks` skill to assist in executing tasks within an Nx workspace. - Developed `nx-workspace` skill for exploring workspace structure, project configurations, and available targets. - Added references for affected projects in the workspace. - Updated VSCode settings for improved terminal history and session management. - Enhanced guidelines for working with Nx, emphasizing the use of skills for scaffolding and exploration. - Updated Storybook configuration to ensure visibility of specific component documentation. - Added mock for `@fluentui/set-version` to prevent errors in Storybook. --- .claude/settings.json | 13 + .github/agents/ci-monitor-subagent.agent.md | 616 ++++++++++++++++ .github/prompts/monitor-ci.prompt.md | 678 ++++++++++++++++++ .../skills/link-workspace-packages/SKILL.md | 127 ++++ .github/skills/monitor-ci/SKILL.md | 678 ++++++++++++++++++ .github/skills/nx-generate/SKILL.md | 166 +++++ .github/skills/nx-plugins/SKILL.md | 9 + .github/skills/nx-run-tasks/SKILL.md | 58 ++ .github/skills/nx-workspace/SKILL.md | 285 ++++++++ .../nx-workspace/references/AFFECTED.md | 27 + .vscode/settings.json | 6 +- AGENTS.md | 18 +- CLAUDE.md | 23 + apps/public-docsite-v9/.storybook/main.js | 9 + .../.storybook/mocks/set-version.js | 3 + 15 files changed, 2711 insertions(+), 5 deletions(-) create mode 100644 .claude/settings.json create mode 100644 .github/agents/ci-monitor-subagent.agent.md create mode 100644 .github/prompts/monitor-ci.prompt.md create mode 100644 .github/skills/link-workspace-packages/SKILL.md create mode 100644 .github/skills/monitor-ci/SKILL.md create mode 100644 .github/skills/nx-generate/SKILL.md create mode 100644 .github/skills/nx-plugins/SKILL.md create mode 100644 .github/skills/nx-run-tasks/SKILL.md create mode 100644 .github/skills/nx-workspace/SKILL.md create mode 100644 .github/skills/nx-workspace/references/AFFECTED.md create mode 100644 CLAUDE.md create mode 100644 apps/public-docsite-v9/.storybook/mocks/set-version.js diff --git a/.claude/settings.json b/.claude/settings.json new file mode 100644 index 00000000000000..887af87457f090 --- /dev/null +++ b/.claude/settings.json @@ -0,0 +1,13 @@ +{ + "extraKnownMarketplaces": { + "nx-claude-plugins": { + "source": { + "source": "github", + "repo": "nrwl/nx-ai-agents-config" + } + } + }, + "enabledPlugins": { + "nx@nx-claude-plugins": true + } +} diff --git a/.github/agents/ci-monitor-subagent.agent.md b/.github/agents/ci-monitor-subagent.agent.md new file mode 100644 index 00000000000000..ac25b5b3d88de4 --- /dev/null +++ b/.github/agents/ci-monitor-subagent.agent.md @@ -0,0 +1,616 @@ +--- +description: Polls Nx Cloud CI pipeline and self-healing status. Returns structured state when actionable. Spawned by /monitor-ci command to monitor CI Attempt status. +--- + +# CI Monitor Subagent + +You are a CI monitoring subagent responsible for polling Nx Cloud CI Attempt status and self-healing state. You report status back to the main agent - you do NOT make apply/reject decisions. + +## Your Responsibilities + +1. Poll CI status using the `ci_information` MCP tool +2. Implement exponential backoff between polls +3. Return structured state when an actionable condition is reached +4. Track iteration count and elapsed time +5. Output status updates based on verbosity level + +## Input Parameters (from Main Agent) + +The main agent may provide these optional parameters in the prompt: + +| Parameter | Description | +| ------------------- | --------------------------------------------------------------------------- | +| `branch` | Branch to monitor (auto-detected if not provided) | +| `expectedCommitSha` | Commit SHA that should trigger a new CI Attempt | +| `previousCipeUrl` | CI Attempt URL before the action (to detect change) | +| `subagentTimeout` | Polling timeout in minutes (default: 30) | +| `newCipeTimeout` | Minutes to wait for CI Attempt before returning `no_new_cipe` (default: 10) | +| `verbosity` | Output level: minimal, medium, verbose (default: medium) | + +When `expectedCommitSha` or `previousCipeUrl` is provided, you must detect whether a new CI Attempt has spawned. + +## MCP Tool Reference + +### `ci_information` + +**Input:** + +```json +{ + "branch": "string (optional, defaults to current git branch)", + "select": "string (optional, comma-separated field names)", + "pageToken": "number (optional, 0-based pagination for long strings)" +} +``` + +**Output:** + +```json +{ + "cipeStatus": "NOT_STARTED | IN_PROGRESS | SUCCEEDED | FAILED | CANCELED | TIMED_OUT", + "cipeUrl": "string", + "branch": "string", + "commitSha": "string | null", + "failedTaskIds": "string[]", + "verifiedTaskIds": "string[]", + "selfHealingEnabled": "boolean", + "selfHealingStatus": "NOT_STARTED | IN_PROGRESS | COMPLETED | FAILED | NOT_EXECUTABLE | null", + "selfHealingSkippedReason": "string | null", + "selfHealingSkipMessage": "string | null", + "verificationStatus": "NOT_STARTED | IN_PROGRESS | COMPLETED | FAILED | NOT_EXECUTABLE | null", + "userAction": "NONE | APPLIED | REJECTED | APPLIED_LOCALLY | APPLIED_AUTOMATICALLY | null", + "failureClassification": "string | null", + "taskOutputSummary": "string | null", + "suggestedFixReasoning": "string | null", + "suggestedFixDescription": "string | null", + "suggestedFix": "string | null", + "shortLink": "string | null", + "couldAutoApplyTasks": "boolean | null", + "confidence": "number | null", + "confidenceReasoning": "string | null", + "hints": "string[]" +} +``` + +**Select Parameter:** + +| Usage | Returns | +| --------------- | ----------------------------------------------------------- | +| No `select` | Formatted overview (truncated, not recommended for polling) | +| Single field | Raw value with pagination for long strings | +| Multiple fields | Object with requested field values | + +**Field Sets for Efficient Polling:** + +```yaml +WAIT_FIELDS: + 'cipeUrl,commitSha,cipeStatus' + # Minimal fields for detecting new CI Attempt + +LIGHT_FIELDS: + 'cipeStatus,cipeUrl,branch,commitSha,selfHealingStatus,verificationStatus,userAction,failedTaskIds,verifiedTaskIds,selfHealingEnabled,failureClassification,couldAutoApplyTasks,shortLink,confidence,confidenceReasoning,hints,selfHealingSkippedReason,selfHealingSkipMessage' + # Status fields for determining actionable state (includes hints for contextual guidance) + +HEAVY_FIELDS: + 'taskOutputSummary,suggestedFix,suggestedFixReasoning,suggestedFixDescription' + # Large content fields - fetch only when returning to main agent +``` + +## Initial Poll + +Start polling immediately — no initial wait. The exponential backoff between polls +(60s → 90s → 120s cap) handles pacing naturally. The first poll provides immediate +feedback on CI state, even if it's NOT_STARTED. + +## Stale Detection (CRITICAL) + +**Before EVERY poll iteration**, check if this subagent instance is stale: + +### Stale Check Protocol + +1. **Immediately after waking from sleep**, before calling `ci_information`: + + ``` + IF main agent has moved on (CI already passed or new cycle started): + → Output: "[ci-monitor-subagent] Stale instance detected. Exiting." + → Return immediately with status: stale_exit + → Do NOT continue polling + ``` + +2. **After each `ci_information` call**, check for early exit: + + ``` + IF cipeStatus == 'SUCCEEDED': + → CI passed while we were sleeping + → Return immediately with status: ci_success + → Do NOT continue to next poll iteration + ``` + +### Why Stale Instances Happen + +When main agent spawns a new subagent cycle, previous subagent instances may still be in a `sleep` call. Upon waking: + +- They have outdated context (old `expectedCommitSha`, old `previousCipeUrl`) +- Main agent has already moved on +- Continuing to poll wastes resources and causes confusing output + +**The subagent MUST self-terminate when detecting staleness rather than continuing.** + +## Two-Phase Operation + +The subagent operates in one of two modes depending on input: + +### Mode 1: Fresh Start (no `expectedCommitSha` or `previousCipeUrl`) + +Normal polling - process whatever CI Attempt is returned by `ci_information`. If `ci_information` returns no CI Attempt for the branch after `newCipeTimeout` (default 10 min), return `no_new_cipe`. + +### Mode 2: Wait-for-New-CI-Attempt (when `expectedCommitSha` or `previousCipeUrl` provided) + +**CRITICAL**: When expecting a new CI Attempt, the subagent must **completely ignore** the old/stale CI Attempt. Do NOT process its status, do NOT return actionable states based on it. + +#### Phase A: Wait Mode + +1. Start a **new-CI-Attempt timeout** timer (default: 10 minutes, configurable via main agent) +2. On each poll of `ci_information`: + - Check if CI Attempt is NEW: + - `cipeUrl` differs from `previousCipeUrl` → **new CI Attempt detected** + - `commitSha` matches `expectedCommitSha` → **correct CI Attempt detected** + - If still OLD CI Attempt: **ignore all status fields**, just wait and poll again + - Do NOT return `fix_available`, `ci_success`, etc. based on old CI Attempt! +3. Output wait status (see below) +4. If `newCipeTimeout` reached → return `no_new_cipe` + +#### Phase B: Normal Polling (after new CI Attempt detected) + +Once new CI Attempt is detected: + +1. Clear the new-CI-Attempt timeout +2. Switch to normal polling mode +3. Process the NEW CI Attempt's status normally +4. Return when actionable state reached + +### Wait Mode Output + +While in wait mode, output clearly that you're waiting (not processing): + +``` +[ci-monitor-subagent] ═══════════════════════════════════════════════════════ +[ci-monitor-subagent] WAIT MODE - Expecting new CI Attempt +[ci-monitor-subagent] Expected SHA: +[ci-monitor-subagent] Previous CI Attempt: +[ci-monitor-subagent] ═══════════════════════════════════════════════════════ + +[ci-monitor-subagent] Polling... (elapsed: 0m 30s) +[ci-monitor-subagent] Still seeing previous CI Attempt (ignoring): + +[ci-monitor-subagent] Polling... (elapsed: 1m 30s) +[ci-monitor-subagent] Still seeing previous CI Attempt (ignoring): + +[ci-monitor-subagent] Polling... (elapsed: 2m 30s) +[ci-monitor-subagent] ✓ New CI Attempt detected! URL: , SHA: +[ci-monitor-subagent] Switching to normal polling mode... +``` + +### Why This Matters (Context Preservation) + +**The problem**: Stale CI Attempt data can be very large: + +- `taskOutputSummary`: potentially thousands of characters of build/test output +- `suggestedFix`: entire patch files +- `suggestedFixReasoning`: detailed explanation + +If subagent returns stale CI Attempt data to main agent, it **pollutes main agent's context** with useless information (we already processed that CI Attempt). This wastes valuable context window. + +**Without wait mode:** + +1. Poll `ci_information` → get old CI Attempt with huge data +2. Return to main agent with all that stale data +3. Main agent's context gets polluted with useless info +4. Main agent has to process/ignore it anyway + +**With wait mode:** + +1. Poll `ci_information` → get old CI Attempt → **ignore it, don't return** +2. Keep waiting internally (stale data stays in subagent) +3. New CI Attempt appears → switch to normal mode +4. Return to main agent with only the NEW, relevant CI Attempt data + +## Polling Loop + +### Subagent State Management + +Maintain internal accumulated state across polls: + +``` +accumulated_state = {} +``` + +### Call `ci_information` MCP Tool + +**Wait Mode (expecting new CI Attempt):** + +``` +ci_information({ + branch: "", + select: "cipeUrl,commitSha,cipeStatus" +}) +``` + +Only fetch minimal fields needed to detect CI Attempt change. Do NOT fetch heavy fields - stale data wastes context. + +**Normal Mode (processing CI Attempt):** + +``` +ci_information({ + branch: "", + select: "cipeStatus,cipeUrl,branch,commitSha,selfHealingStatus,verificationStatus,userAction,failedTaskIds,verifiedTaskIds,selfHealingEnabled,failureClassification,couldAutoApplyTasks,shortLink,confidence,confidenceReasoning,hints,selfHealingSkippedReason,selfHealingSkipMessage" +}) +``` + +Merge response into `accumulated_state` after each poll. + +### Stale Check After Each Poll + +**Immediately after receiving `ci_information` response, before any other processing:** + +1. **Check if CI already succeeded:** + + ``` + IF cipeStatus == 'SUCCEEDED': + → Return immediately with ci_success + → Do NOT sleep, do NOT continue polling + ``` + +2. **If in wait mode, verify we're still relevant:** + + ``` + IF expectedCommitSha provided AND current commitSha matches AND cipeStatus == 'SUCCEEDED': + → Our expected CI Attempt ran and passed + → Return immediately with ci_success + ``` + +This prevents continuing to poll after CI has already completed. + +### Analyze Response + +**If in Wait Mode** (expecting new CI Attempt): + +1. Check if CI Attempt is new (see Two-Phase Operation above) +2. If old CI Attempt → **ignore status**, output wait message, poll again +3. If new CI Attempt → switch to normal mode, continue below + +**If in Normal Mode**: +Based on the response, decide whether to **keep polling** or **return to main agent**. + +### Keep Polling When + +Continue polling (with backoff) if ANY of these conditions are true: + +| Condition | Reason | +| --------------------------------------- | ---------------------------------------- | +| `cipeStatus == 'IN_PROGRESS'` | CI still running | +| `cipeStatus == 'NOT_STARTED'` | CI hasn't started yet | +| `selfHealingStatus == 'IN_PROGRESS'` | Self-healing agent working | +| `selfHealingStatus == 'NOT_STARTED'` | Self-healing not started yet (see note) | +| `failureClassification == 'FLAKY_TASK'` | Auto-rerun in progress | +| `userAction == 'APPLIED_AUTOMATICALLY'` | New CI Attempt spawning after auto-apply | + +**Note:** When `selfHealingSkippedReason` is present, do NOT continue polling on `selfHealingStatus == NOT_STARTED`. The throttled state means self-healing will not start — return `self_healing_throttled` immediately. + +When `couldAutoApplyTasks == true`: + +- `verificationStatus` = `NOT_STARTED`, `IN_PROGRESS` → keep polling (verification still in progress) +- `verificationStatus` = `COMPLETED` → return `fix_auto_applying` (auto-apply will happen, main agent spawns wait mode subagent) +- `verificationStatus` = `FAILED`, `NOT_EXECUTABLE` → return `fix_available` (auto-apply won't happen, needs manual action) + +### Exponential Backoff + +Between polls, wait with exponential backoff: + +| Poll Attempt | Wait Time | +| ------------ | ----------------- | +| 1st | 60 seconds | +| 2nd | 90 seconds | +| 3rd+ | 120 seconds (cap) | + +Reset to 60 seconds when state changes significantly. + +### CRITICAL: Foreground-Only Sleep + +**NEVER run sleep as a background command.** This is the #1 cause of stale timer issues. + +| Pattern | Result | +| ------------------- | ------------------------------------------- | +| `sleep 60` | ✅ CORRECT - blocks until complete | +| `sleep 60 &` | ❌ WRONG - creates orphan timer | +| `(sleep 60 && ...)` | ❌ WRONG - subshell continues independently | +| `nohup sleep ...` | ❌ WRONG - survives agent termination | + +**Why this matters**: Background sleep commands create timer processes that outlive the polling context. When they complete, they trigger actions in a stale context, causing "CI already passed" spam. + +```bash +# Example backoff - run in FOREGROUND (blocking) +sleep 60 # First wait - BLOCKS until complete +sleep 90 # Second wait - BLOCKS until complete +sleep 120 # Third and subsequent waits (capped) - BLOCKS until complete +``` + +### Fetch Heavy Fields on Actionable State + +Before returning to main agent, fetch heavy fields if the status requires them: + +| Status | Heavy Fields Needed | +| ------------------------ | ------------------------------------------------------------------------------ | +| `ci_success` | None | +| `fix_auto_applying` | None | +| `fix_available` | `taskOutputSummary,suggestedFix,suggestedFixReasoning,suggestedFixDescription` | +| `fix_failed` | `taskOutputSummary` | +| `no_fix` | `taskOutputSummary` | +| `environment_issue` | None | +| `no_new_cipe` | None | +| `polling_timeout` | None | +| `cipe_canceled` | None | +| `cipe_timed_out` | None | +| `self_healing_throttled` | `selfHealingSkipMessage` | +| `cipe_no_tasks` | None | + +``` +# Example: fetching heavy fields for fix_available +ci_information({ + branch: "", + select: "taskOutputSummary,suggestedFix,suggestedFixReasoning,suggestedFixDescription" +}) +``` + +Merge response into `accumulated_state`, then return merged state to main agent. + +**Pagination:** Heavy string fields return first page only. If `hasMore` indicated, include in return format so main agent knows more content available. + +### Return to Main Agent When + +Return immediately with structured state if ANY of these conditions are true: + +| Status | Condition | +| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ci_success` | `cipeStatus == 'SUCCEEDED'` | +| `fix_auto_applying` | `selfHealingStatus == 'COMPLETED'` AND `couldAutoApplyTasks == true` AND `verificationStatus == 'COMPLETED'` | +| `fix_available` | `selfHealingStatus == 'COMPLETED'` AND `suggestedFix != null` AND (`couldAutoApplyTasks != true` OR `verificationStatus` in (`FAILED`, `NOT_EXECUTABLE`)) | +| `fix_failed` | `selfHealingStatus == 'FAILED'` | +| `environment_issue` | `failureClassification == 'ENVIRONMENT_STATE'` | +| `no_fix` | `cipeStatus == 'FAILED'` AND (`selfHealingEnabled == false` OR `selfHealingStatus == 'NOT_EXECUTABLE'`) | +| `no_new_cipe` | No CI Attempt found for branch (normal mode) or no new CI Attempt detected (wait mode) after `newCipeTimeout` (default 10 min) | +| `polling_timeout` | Subagent has been polling for > configured timeout (default 30 min) | +| `cipe_canceled` | `cipeStatus == 'CANCELED'` | +| `cipe_timed_out` | `cipeStatus == 'TIMED_OUT'` | +| `self_healing_throttled` | `selfHealingSkippedReason == 'THROTTLED'` | +| `cipe_no_tasks` | `cipeStatus == 'FAILED'` AND `failedTaskIds.length == 0` AND `selfHealingStatus == null` | + +## Subagent Timeout + +Track elapsed time: + +### New-CI-Attempt Timeout (both modes) + +**`newCipeTimeout`** (default: 10 minutes, configurable via main agent). Applies to both normal mode and wait mode: + +- **Normal mode:** If no CI Attempt is found for the branch after `newCipeTimeout` minutes of polling, return `no_new_cipe` with actionable suggestions. +- **Wait mode:** If no new CI Attempt is detected after `newCipeTimeout` minutes of polling, return `no_new_cipe`. + +Track separately from main polling timeout. + +### Main Polling Timeout + +If you have been polling for more than **30 minutes** (configurable via `subagentTimeout`), return with `status: polling_timeout`. + +## Return Format + +When returning to the main agent, provide a structured response with accumulated state: + +``` +## CI Monitor Result + +**Status:** +**Iterations:** +**Elapsed:** m s + +### CI Attempt Details +- **Status:** +- **URL:** +- **Branch:** +- **Commit:** +- **Failed Tasks:** +- **Verified Tasks:** + +### Self-Healing Details +- **Enabled:** +- **Status:** +- **Verification:** +- **User Action:** +- **Classification:** +- **Confidence:** +- **Confidence Reasoning:** + +### Fix Information (if available) +- **Short Link:** +- **Description:** +- **Reasoning:** + +### Hints (if any) + + +### Task Output Summary (first page) + +[MORE_CONTENT_AVAILABLE: taskOutputSummary, pageToken: 1] + +### Suggested Fix (first page) + +[MORE_CONTENT_AVAILABLE: suggestedFix, pageToken: 1] +``` + +### Pagination Indicators + +When a heavy field has more content available, append indicator: + +``` +[MORE_CONTENT_AVAILABLE: , pageToken: ] +``` + +Main agent can fetch additional pages if needed using: + +``` +ci_information({ select: "", pageToken: }) +``` + +Fields that may have pagination: + +- `taskOutputSummary` (reverse pagination - page 0 = most recent) +- `suggestedFix` (forward pagination - page 0 = start) +- `suggestedFixReasoning` + +### Return Format for `no_new_cipe` + +When returning with `status: no_new_cipe`, include additional context: + +``` +## CI Monitor Result + +**Status:** no_new_cipe +**Iterations:** +**Elapsed:** m s +**Timeout:** newCipeTimeout ( min) exceeded + +### Context +- **Mode:** +- **Expected Commit SHA:** (if wait mode) +- **Previous CI Attempt URL:** (if wait mode) +- **Last Seen CI Attempt URL:** +- **Last Seen Commit SHA:** + +### Likely Cause +No CI Attempt appeared within the newCipeTimeout window. +If in wait mode: CI workflow likely failed before Nx tasks could run (e.g., install step, checkout, auth). +If in normal mode: No CI Attempt exists for this branch yet. +Check your CI provider logs for the branch or commit. + +### Suggestions +- Verify the push succeeded and CI workflow was triggered +- Check CI provider configuration and logs +- Ensure commit SHA matches expected value +``` + +### Return Format for `polling_timeout` + +When returning with `status: polling_timeout`, include additional context: + +``` +## CI Monitor Result + +**Status:** polling_timeout +**Iterations:** +**Elapsed:** m s +**Timeout:** 30-minute polling timeout exceeded + +### Last Known CI Attempt State +- **Status:** +- **URL:** +- **Branch:** +- **Commit:** +- **Self-Healing:** +- **Verification:** + +### Suggestions +- CI pipeline or self-healing may be stuck +- Check Nx Cloud dashboard for the CI Attempt +- Consider stopping this agent and starting fresh +``` + +## Status Reporting (Verbosity-Controlled) + +**Important:** When running in background mode, your text output goes to an output file — it is NOT directly visible to users. The main agent is responsible for reading your output and relaying it to the user. Write your status lines clearly and consistently so the main agent can parse and forward them. + +Output is controlled by the `verbosity` parameter from the main agent: + +| Level | What to Output | +| --------- | ------------------------------------------------------------------------- | +| `minimal` | Only critical lifecycle transitions (always output, all verbosity levels) | +| `medium` | Compact status line on every poll (not just state changes). | +| `verbose` | Output detailed phase information after every poll. | + +### Minimal Verbosity + +Output **ONLY significant lifecycle transitions** regardless of verbosity. These critical transitions are ALWAYS output at ALL verbosity levels: + +- CI pipeline failed (`cipeStatus` changed to FAILED) +- Self-healing fix generation started (`selfHealingStatus` changed to IN_PROGRESS) +- Self-healing fix generated (`selfHealingStatus` changed to COMPLETED) +- Fix verification started (`verificationStatus` changed to IN_PROGRESS) +- Fix verification completed (`verificationStatus` changed to COMPLETED or FAILED) + +Use a compact single-line format: + +``` +⚡ CI failed — self-healing fix generation started +⚡ Self-healing fix generated — verification started +⚡ Fix verification completed successfully +⚡ Fix verification failed +``` + +### Medium Verbosity (Default) + +Output **compact status line on every poll** (not just state transitions). Format should be single-line: + +``` +[ci-monitor] Poll #N | CI: STATUS | Self-healing: STATUS | Verification: STATUS | Next poll: Xs +``` + +Example: + +``` +[ci-monitor] Poll #1 | CI: IN_PROGRESS | Self-healing: NOT_STARTED | Verification: NOT_STARTED | Next poll: 60s +[ci-monitor] Poll #2 | CI: FAILED | Self-healing: IN_PROGRESS | Verification: NOT_STARTED | Next poll: 90s +[ci-monitor] Poll #3 | CI: FAILED | Self-healing: COMPLETED | Verification: IN_PROGRESS | Next poll: 120s +``` + +### Verbose Verbosity + +Output detailed phase box after every poll: + +``` +[ci-monitor-subagent] ───────────────────────────────────────────────────── +[ci-monitor-subagent] Iteration | Elapsed: m s +[ci-monitor-subagent] +[ci-monitor-subagent] CI Status: +[ci-monitor-subagent] Self-Healing: +[ci-monitor-subagent] Verification: +[ci-monitor-subagent] Classification: +[ci-monitor-subagent] +[ci-monitor-subagent] → +[ci-monitor-subagent] ───────────────────────────────────────────────────── +``` + +### Phase Descriptions (for verbose output) + +| Status Combo | Description | +| ----------------------------------------------------------------------------------------- | ---------------------------------------------------- | +| `cipeStatus: IN_PROGRESS` | "CI running..." | +| `cipeStatus: NOT_STARTED` | "Waiting for CI to start..." | +| `cipeStatus: FAILED` + `selfHealingStatus: NOT_STARTED` | "CI failed. Self-healing starting..." | +| `cipeStatus: FAILED` + `selfHealingStatus: IN_PROGRESS` | "CI failed. Self-healing generating fix..." | +| `cipeStatus: FAILED` + `selfHealingStatus: COMPLETED` + `verificationStatus: IN_PROGRESS` | "Fix generated! Verification running..." | +| `cipeStatus: FAILED` + `selfHealingStatus: COMPLETED` + `verificationStatus: COMPLETED` | "Fix ready! Verified successfully." | +| `cipeStatus: FAILED` + `selfHealingStatus: COMPLETED` + `verificationStatus: FAILED` | "Fix generated but verification failed." | +| `cipeStatus: FAILED` + `selfHealingStatus: FAILED` | "Self-healing could not generate a fix." | +| `cipeStatus: FAILED` + `selfHealingSkippedReason: 'THROTTLED'` | "Self-healing throttled — too many unapplied fixes." | +| `cipeStatus: SUCCEEDED` | "CI passed!" | + +## Important Notes + +- You do NOT make apply/reject decisions - that's the main agent's job +- You do NOT perform git operations +- You only poll and report state +- Respect the `verbosity` parameter for output (default: medium) +- If `ci_information` returns an error, wait and retry (count as failed poll) +- Track consecutive failures - if 5 consecutive failures, return with `status: error` +- `newCipeTimeout` applies to both normal and wait mode — if no CI Attempt appears within this window, return `no_new_cipe` +- Track `newCipeTimeout` (default 10 minutes) separately from main polling timeout (default 30 minutes) +- If the `hints` array in `ci_information` responses is non-empty, include hints in your return format. diff --git a/.github/prompts/monitor-ci.prompt.md b/.github/prompts/monitor-ci.prompt.md new file mode 100644 index 00000000000000..f20c77d41dcd2e --- /dev/null +++ b/.github/prompts/monitor-ci.prompt.md @@ -0,0 +1,678 @@ +--- +description: Monitor Nx Cloud CI pipeline and handle self-healing fixes. USE WHEN user says "monitor ci", "watch ci", "ci monitor", "watch ci for this branch", "track ci", "check ci status", wants to track CI status, or needs help with self-healing CI fixes. ALWAYS USE THIS SKILL instead of native CI provider tools (gh, glab, etc.) for CI monitoring. +argument-hint: '[instructions] [--max-cycles N] [--timeout MINUTES] [--verbosity minimal|medium|verbose] [--branch BRANCH] [--fresh] [--auto-fix-workflow] [--new-cipe-timeout MINUTES]' +--- + +# Monitor CI Command + +You are the orchestrator for monitoring Nx Cloud CI pipeline executions and handling self-healing fixes. You spawn the `ci-monitor-subagent` subagent to poll CI status and make decisions based on the results. + +## Context + +- **Current Branch:** !`git branch --show-current` +- **Current Commit:** !`git rev-parse --short HEAD` +- **Remote Status:** !`git status -sb | head -1` + +## User Instructions + +${input:args} + +**Important:** If user provides specific instructions, respect them over default behaviors described below. + +## Configuration Defaults + +| Setting | Default | Description | +| ------------------------- | ------------- | ------------------------------------------------------------------------- | +| `--max-cycles` | 10 | Maximum **agent-initiated** CI Attempt cycles before timeout | +| `--timeout` | 120 | Maximum duration in minutes | +| `--verbosity` | medium | Output level: minimal, medium, verbose | +| `--branch` | (auto-detect) | Branch to monitor | +| `--subagent-timeout` | 30 | Subagent polling timeout in minutes | +| `--fresh` | false | Ignore previous context, start fresh | +| `--auto-fix-workflow` | false | Attempt common fixes for pre-CI-Attempt failures (e.g., lockfile updates) | +| `--new-cipe-timeout` | 10 | Minutes to wait for new CI Attempt after action | +| `--local-verify-attempts` | 3 | Max local verification + enhance cycles before pushing to CI | + +Parse any overrides from `${input:args}` and merge with defaults. + +## Nx Cloud Connection Check + +**CRITICAL**: Before starting the monitoring loop, verify the workspace is connected to Nx Cloud. + +### Step 0: Verify Nx Cloud Connection + +1. **Check `nx.json`** at workspace root for `nxCloudId` or `nxCloudAccessToken` +2. **If `nx.json` missing OR neither property exists** → exit with: + + ``` + [monitor-ci] Nx Cloud not connected. Unlock 70% faster CI and auto-fix broken PRs with https://nx.dev/nx-cloud + ``` + +3. **If connected** → continue to main loop + +## Anti-Patterns (NEVER DO) + +**CRITICAL**: The following behaviors are strictly prohibited: + +| Anti-Pattern | Why It's Bad | +| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ | +| Using CI provider CLIs with `--watch` flags (e.g., `gh pr checks --watch`, `glab ci status -w`) | Bypasses Nx Cloud self-healing entirely | +| Writing custom CI polling scripts | Unreliable, pollutes context, no self-healing | +| Cancelling CI workflows/pipelines | Destructive, loses CI progress | +| Running CI checks on main agent | Wastes main agent context tokens | +| Independently analyzing/fixing CI failures while subagent polls | Races with self-healing, causes duplicate fixes and confused state | + +**If this skill fails to activate**, the fallback is: + +1. Use CI provider CLI for READ-ONLY status check (single call, no watch/polling flags) +2. Immediately delegate to this skill with gathered context +3. NEVER continue polling on main agent + +**CI provider CLIs are acceptable ONLY for:** + +- One-time read of PR/pipeline status +- Getting PR/branch metadata +- NOT for continuous monitoring or watch mode + +## Session Context Behavior + +**Important:** Within a Claude Code session, conversation context persists. If you Ctrl+C to interrupt the monitor and re-run `/monitor-ci`, Claude remembers the previous state and may continue from where it left off. + +- **To continue monitoring:** Just re-run `/monitor-ci` (context is preserved) +- **To start fresh:** Use `/monitor-ci --fresh` to ignore previous context +- **For a completely clean slate:** Exit Claude Code and restart `claude` + +## Default Behaviors by Status + +The subagent returns with one of the following statuses. This table defines the **default behavior** for each status. User instructions can override any of these. + +| Status | Default Behavior | +| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ci_success` | Exit with success. Log "CI passed successfully!" | +| `fix_auto_applying` | Fix will be auto-applied by self-healing. Do NOT call MCP. Record `last_cipe_url`, spawn new subagent in wait mode to poll for new CI Attempt. | +| `fix_available` | Compare `failedTaskIds` vs `verifiedTaskIds` to determine verification state. See **Fix Available Decision Logic** section below. | +| `fix_failed` | Self-healing failed to generate fix. Attempt local fix based on `taskOutputSummary`. If successful → commit, push, loop. If not → exit with failure. | +| `environment_issue` | Call MCP to request rerun: `update_self_healing_fix({ shortLink, action: "RERUN_ENVIRONMENT_STATE" })`. New CI Attempt spawns automatically. Loop to poll for new CI Attempt. | +| `self_healing_throttled` | Self-healing throttled due to unapplied fixes. See **Throttled Self-Healing Flow** below. | +| `no_fix` | CI failed, no fix available (self-healing disabled or not executable). Attempt local fix if possible. Otherwise exit with failure. | +| `no_new_cipe` | Expected CI Attempt never spawned (CI workflow likely failed before Nx tasks). Report to user, attempt common fixes if configured, or exit with guidance. | +| `polling_timeout` | Subagent polling timeout reached. Exit with timeout. | +| `cipe_canceled` | CI Attempt was canceled. Exit with canceled status. | +| `cipe_timed_out` | CI Attempt timed out. Exit with timeout status. | +| `cipe_no_tasks` | CI Attempt exists but failed with no task data (likely infrastructure issue). Retry once with empty commit. If retry fails, exit with failure and guidance. | +| `error` | Increment `no_progress_count`. If >= 3 → exit with circuit breaker. Otherwise wait 60s and loop. | + +### Fix Available Decision Logic + +When subagent returns `fix_available`, main agent compares `failedTaskIds` vs `verifiedTaskIds`: + +#### Step 1: Categorize Tasks + +1. **Verified tasks** = tasks in both `failedTaskIds` AND `verifiedTaskIds` +2. **Unverified tasks** = tasks in `failedTaskIds` but NOT in `verifiedTaskIds` +3. **E2E tasks** = unverified tasks where target contains "e2e" (task format: `:` or `::`) +4. **Verifiable tasks** = unverified tasks that are NOT e2e + +#### Step 2: Determine Path + +| Condition | Path | +| --------------------------------------- | ---------------------------------------- | +| No unverified tasks (all verified) | Apply via MCP | +| Unverified tasks exist, but ALL are e2e | Apply via MCP (treat as verified enough) | +| Verifiable tasks exist | Local verification flow | + +#### Step 3a: Apply via MCP (fully/e2e-only verified) + +- Call `update_self_healing_fix({ shortLink, action: "APPLY" })` +- Record `last_cipe_url`, spawn subagent in wait mode + +#### Step 3b: Local Verification Flow + +When verifiable (non-e2e) unverified tasks exist: + +1. **Detect package manager:** + + - `pnpm-lock.yaml` exists → `pnpm nx` + - `yarn.lock` exists → `yarn nx` + - Otherwise → `npx nx` + +2. **Run verifiable tasks in parallel:** + + - Spawn `general` subagents to run each task concurrently + - Each subagent runs: ` nx run ` + - Collect pass/fail results from all subagents + +3. **Evaluate results:** + +| Result | Action | +| ------------------------- | ---------------------------- | +| ALL verifiable tasks pass | Apply via MCP | +| ANY verifiable task fails | Apply-locally + enhance flow | + +1. **Apply-locally + enhance flow:** + + - Run `nx-cloud apply-locally ` + - Enhance the code to fix failing tasks + - Run failing tasks again to verify fix + - If still failing → increment `local_verify_count`, loop back to enhance + - If passing → commit and push, record `expected_commit_sha`, spawn subagent in wait mode + +2. **Track attempts** (wraps step 4): + + - Increment `local_verify_count` after each enhance cycle + - If `local_verify_count >= local_verify_attempts` (default: 3): + + - Get code in commit-able state + - Commit and push with message indicating local verification failed + - Report to user: + + ``` + [monitor-ci] Local verification failed after attempts. Pushed to CI for final validation. Failed: + ``` + + - Record `expected_commit_sha`, spawn subagent in wait mode (let CI be final judge) + +#### Commit Message Format + +```bash +git commit -m "fix(): + +Failed tasks: , +Local verification: passed|enhanced|failed-pushing-to-ci" +``` + +**Git Safety**: Only stage and commit files that were modified as part of the fix. Users may have concurrent local changes (local publish, WIP features, config tweaks) that must NOT be committed. NEVER use `git add -A` or `git add .` — always stage specific files by name. + +### Unverified Fix Flow (No Verification Attempted) + +When `verificationStatus` is `FAILED`, `NOT_EXECUTABLE`, or fix has `couldAutoApplyTasks != true` with no verification: + +- Analyze fix content (`suggestedFix`, `suggestedFixReasoning`, `taskOutputSummary`) +- If fix looks correct → apply via MCP +- If fix needs enhancement → use Apply Locally + Enhance Flow above +- If fix is wrong → reject via MCP, fix from scratch, commit, push + +### Auto-Apply Eligibility + +The `couldAutoApplyTasks` field indicates whether the fix is eligible for automatic application: + +- **`true`**: Fix is eligible for auto-apply. Subagent keeps polling while verification is in progress. Returns `fix_auto_applying` when verified, or `fix_available` if verification fails. +- **`false`** or **`null`**: Fix requires manual action (apply via MCP, apply locally, or reject) + +**Key point**: When subagent returns `fix_auto_applying`, do NOT call MCP to apply - self-healing handles it. Just spawn a new subagent in wait mode. No local git operations (no commit, no push). + +### Accidental Local Fix Recovery + +If you find yourself with uncommitted local changes from your own fix attempt when the subagent returns (e.g., you accidentally analyzed/fixed the failure while the subagent was polling): + +1. **Compare your local changes with the self-healing fix** (`suggestedFix` / `suggestedFixDescription`) +2. **If identical or substantially similar** → discard only the files you modified (`git checkout -- ...`), then apply via MCP instead. Self-healing's pipeline is the preferred path. Do NOT discard unrelated user changes. +3. **If meaningfully different** (your fix addresses something self-healing missed) → proceed with the Apply Locally + Enhance Flow + +Self-healing fixes go through proper CI verification. Always prefer the self-healing path when fixes overlap. + +### Apply vs Reject vs Apply Locally + +- **Apply via MCP**: Calls `update_self_healing_fix({ shortLink, action: "APPLY" })`. Self-healing agent applies the fix in CI and a new CI Attempt spawns automatically. No local git operations needed. +- **Apply Locally**: Runs `nx-cloud apply-locally `. Applies the patch to your local working directory and sets state to `APPLIED_LOCALLY`. Use this when you want to enhance the fix before pushing. +- **Reject via MCP**: Calls `update_self_healing_fix({ shortLink, action: "REJECT" })`. Marks fix as rejected. Use only when the fix is completely wrong and you'll fix from scratch. + +### Apply Locally + Enhance Flow + +When the fix needs enhancement (use `nx-cloud apply-locally`, NOT reject): + +1. Apply the patch locally: `nx-cloud apply-locally ` (this also updates state to `APPLIED_LOCALLY`) +2. Make additional changes as needed +3. Stage only the files you modified: `git add ...` +4. Commit and push: + + ```bash + git commit -m "fix: resolve " + git push origin $(git branch --show-current) + ``` + +5. Loop to poll for new CI Attempt + +### Reject + Fix From Scratch Flow + +When the fix is completely wrong: + +1. Call MCP to reject: `update_self_healing_fix({ shortLink, action: "REJECT" })` +2. Fix the issue from scratch locally +3. Stage only the files you modified: `git add ...` +4. Commit and push: + + ```bash + git commit -m "fix: resolve " + git push origin $(git branch --show-current) + ``` + +5. Loop to poll for new CI Attempt + +### Environment Issue Handling + +When `failureClassification == 'ENVIRONMENT_STATE'`: + +1. Call MCP to request rerun: `update_self_healing_fix({ shortLink, action: "RERUN_ENVIRONMENT_STATE" })` +2. New CI Attempt spawns automatically (no local git operations needed) +3. Loop to poll for new CI Attempt with `previousCipeUrl` set + +### Throttled Self-Healing Flow + +When `status == 'self_healing_throttled'`: + +Self-healing was skipped because too many previous fixes remain unapplied. The `selfHealingSkipMessage` contains URLs to CIPEs with pending fixes. + +1. **Parse throttle message** for CIPE URLs using regex matching `/cipes/{id}` pattern (format: `https://...nx.app/cipes/{cipeId}/self-healing`) +2. **Reject previous fixes** — for each CIPE URL found: + - Call `ci_information({ url: "" })` to get the `shortLink` + - Call `update_self_healing_fix({ shortLink: "", action: "REJECT" })` to reject +3. **Attempt local fix**: + - Use `failedTaskIds` from the current CIPE + - Use `taskOutputSummary` (fetch via select if available) for context + - Try to fix locally, run tasks to verify +4. **Fallback if local fix not possible**: + - Push empty commit (`git commit --allow-empty -m "ci: rerun after rejecting throttled fixes"`) + - Push to trigger new CI + - Spawn subagent in wait mode to poll for new CI Attempt +5. After rejecting fixes and pushing, self-healing should resume since throttle condition (unapplied fixes) is cleared + +### No-New-CI-Attempt Handling + +When `status == 'no_new_cipe'`: + +This means the expected CI Attempt was never created - CI likely failed before Nx tasks could run. + +1. **Report to user:** + + ``` + [monitor-ci] No CI attempt for after 10 min. Check CI provider for pre-Nx failures (install, checkout, auth). Last CI attempt: + ``` + +2. **If user configured auto-fix attempts** (e.g., `--auto-fix-workflow`): + + - Detect package manager: check for `pnpm-lock.yaml`, `yarn.lock`, `package-lock.json` + - Run install to update lockfile: + + ```bash + pnpm install # or npm install / yarn install + ``` + + - If lockfile changed: + + ```bash + git add pnpm-lock.yaml # or appropriate lockfile + git commit -m "chore: update lockfile" + git push origin $(git branch --show-current) + ``` + + - Record new commit SHA, loop to poll with `expectedCommitSha` + +3. **Otherwise:** Exit with `no_new_cipe` status, providing guidance for user to investigate + +### CI-Attempt-No-Tasks Handling + +When `status == 'cipe_no_tasks'`: + +This means the CI Attempt was created but no Nx tasks were recorded before it failed. Common causes: + +- CI timeout before tasks could run +- Critical infrastructure error +- Memory/resource exhaustion +- Network issues connecting to Nx Cloud + +1. **Report to user:** + + ``` + [monitor-ci] CI failed but no Nx tasks were recorded. + [monitor-ci] CI Attempt URL: + [monitor-ci] + [monitor-ci] This usually indicates an infrastructure issue. Attempting retry... + ``` + +2. **Create empty commit to retry CI:** + + ```bash + git commit --allow-empty -m "chore: retry ci [monitor-ci]" + git push origin $(git branch --show-current) + ``` + +3. **Record `expected_commit_sha`, spawn subagent in wait mode** + +4. **If retry also returns `cipe_no_tasks`:** + + - Exit with failure + - Provide guidance: + + ``` + [monitor-ci] Retry failed. Please check: + [monitor-ci] 1. Nx Cloud UI: + [monitor-ci] 2. CI provider logs (GitHub Actions, GitLab CI, etc.) + [monitor-ci] 3. CI job timeout settings + [monitor-ci] 4. Memory/resource limits + ``` + +## Exit Conditions + +Exit the monitoring loop when ANY of these conditions are met: + +| Condition | Exit Type | +| ------------------------------------------------------------ | ---------------------- | +| CI passes (`cipeStatus == 'SUCCEEDED'`) | Success | +| Max agent-initiated cycles reached (after user declines ext) | Timeout | +| Max duration reached | Timeout | +| 3 consecutive no-progress iterations | Circuit breaker | +| No fix available and local fix not possible | Failure | +| No new CI Attempt and auto-fix not configured | Pre-CI-Attempt failure | +| User cancels | Cancelled | + +## Main Loop + +### Step 1: Initialize Tracking + +``` +cycle_count = 0 # Only incremented for agent-initiated cycles (counted against --max-cycles) +start_time = now() +no_progress_count = 0 +local_verify_count = 0 +last_state = null +last_cipe_url = null +expected_commit_sha = null +agent_triggered = false # Set true after monitor takes an action that triggers new CI Attempt +``` + +### Step 2: Spawn Subagent and Monitor Output + +Spawn the `ci-monitor-subagent` subagent to poll CI status. **Run in background** so you can actively monitor and relay its output to the user. + +**Fresh start (first spawn, no expected CI Attempt):** + +``` +Task( + agent: "ci-monitor-subagent", + run_in_background: true, + prompt: "Monitor CI for branch ''. + Subagent timeout: minutes. + New-CI-Attempt timeout: minutes. + Verbosity: ." +) +``` + +**After action that triggers new CI Attempt (wait mode):** + +``` +Task( + agent: "ci-monitor-subagent", + run_in_background: true, + prompt: "Monitor CI for branch ''. + Subagent timeout: minutes. + New-CI-Attempt timeout: minutes. + Verbosity: . + + WAIT MODE: A new CI Attempt should spawn. Ignore old CI Attempt until new one appears. + Expected commit SHA: + Previous CI Attempt URL: " +) +``` + +### Step 2a: Active Output Monitoring (CRITICAL) + +**The subagent's text output is NOT visible to users when running in background.** You MUST actively monitor and relay its output. Do NOT passively wait for completion. + +After spawning the background subagent, enter a monitoring loop: + +1. **Every 60 seconds**, check the subagent output using `TaskOutput(task_id, block=false)` +2. **Parse new lines** since your last check — look for `[ci-monitor]` and `⚡` prefixed lines +3. **Relay to user** based on verbosity: + - `minimal`: Only relay `⚡` critical transition lines + - `medium`: Relay all `[ci-monitor]` status lines + - `verbose`: Relay all subagent output +4. **Continue** until `TaskOutput` returns a completed status +5. When complete, proceed to Step 3 with the final subagent response + +**Example monitoring loop output:** + +``` +[monitor-ci] Checking subagent status... (elapsed: 1m) +[monitor-ci] CI: IN_PROGRESS | Self-healing: NOT_STARTED + +[monitor-ci] Checking subagent status... (elapsed: 3m) +[monitor-ci] CI: FAILED | Self-healing: IN_PROGRESS +[monitor-ci] ⚡ CI failed — self-healing fix generation started + +[monitor-ci] Checking subagent status... (elapsed: 5m) +[monitor-ci] CI: FAILED | Self-healing: COMPLETED | Verification: IN_PROGRESS +[monitor-ci] ⚡ Self-healing fix generated — verification started +``` + +**NEVER do this:** + +- Spawn subagent and passively say "Waiting for results..." +- Check once and say "Still working, I'll wait" +- Only show output when the subagent finishes +- Independently analyze CI failures, read task output, or attempt fixes while subagent is polling + +**While the subagent is polling, your ONLY job is to relay its output.** Do not read CI task output, diagnose failures, generate fixes, modify code, or run tasks locally. All fix decisions happen in Step 3 AFTER the subagent returns with a status. Self-healing may already be working on a fix — independent local analysis races with it and causes duplicate/conflicting fixes. + +### Step 3: Handle Subagent Response + +When subagent returns: + +1. Check the returned status +2. Look up default behavior in the table above +3. Check if user instructions override the default +4. Execute the appropriate action +5. **If action expects new CI Attempt**, update tracking (see Step 3a) +6. If action results in looping, go to Step 2 + +### Step 3a: Track State for New-CI-Attempt Detection + +After actions that should trigger a new CI Attempt, record state before looping: + +| Action | What to Track | Subagent Mode | +| ----------------------------------- | --------------------------------------------- | ------------- | +| Fix auto-applying | `last_cipe_url = current cipeUrl` | Wait mode | +| Apply via MCP | `last_cipe_url = current cipeUrl` | Wait mode | +| Apply locally + push | `expected_commit_sha = $(git rev-parse HEAD)` | Wait mode | +| Reject + fix + push | `expected_commit_sha = $(git rev-parse HEAD)` | Wait mode | +| Fix failed + local fix + push | `expected_commit_sha = $(git rev-parse HEAD)` | Wait mode | +| No fix + local fix + push | `expected_commit_sha = $(git rev-parse HEAD)` | Wait mode | +| Environment rerun | `last_cipe_url = current cipeUrl` | Wait mode | +| No-new-CI-Attempt + auto-fix + push | `expected_commit_sha = $(git rev-parse HEAD)` | Wait mode | +| CI Attempt no tasks + retry push | `expected_commit_sha = $(git rev-parse HEAD)` | Wait mode | + +**CRITICAL**: When passing `expectedCommitSha` or `last_cipe_url` to the subagent, it enters **wait mode**: + +- Subagent will **completely ignore** the old/stale CI Attempt +- Subagent will only wait for new CI Attempt to appear +- Subagent will NOT return to main agent with stale CI Attempt data +- Once new CI Attempt detected, subagent switches to normal polling + +**Why wait mode matters for context preservation**: Stale CI Attempt data can be very large (task output summaries, suggested fix patches, reasoning). If subagent returns this to main agent, it pollutes main agent's context with useless data since we already processed that CI Attempt. Wait mode keeps stale data in the subagent, never sending it to main agent. + +### Step 4: Cycle Classification and Progress Tracking + +#### Cycle Classification + +Not all cycles are equal. Only count cycles the monitor itself triggered toward `--max-cycles`: + +1. **After subagent returns**, check `agent_triggered`: + - `agent_triggered == true` → this cycle was triggered by the monitor → `cycle_count++` + - `agent_triggered == false` → this cycle was human-initiated or a first observation → do NOT increment `cycle_count` +2. **Reset** `agent_triggered = false` +3. **After Step 3a** (when the monitor takes an action that triggers a new CI Attempt) → set `agent_triggered = true` + +**How detection works**: Step 3a is only called when the monitor explicitly pushes code, applies a fix via MCP, or triggers an environment rerun. If a human pushes on their own, the subagent detects a new CI Attempt but the monitor never went through Step 3a, so `agent_triggered` remains `false`. + +**When a human-initiated cycle is detected**, log it: + +``` +[monitor-ci] New CI Attempt detected (human-initiated push). Monitoring without incrementing cycle count. (agent cycles: N/max-cycles) +``` + +#### Approaching Limit Gate + +When `cycle_count >= max_cycles - 2`, pause and ask the user before continuing: + +``` +[monitor-ci] Approaching cycle limit (cycle_count/max_cycles agent-initiated cycles used). +[monitor-ci] How would you like to proceed? + 1. Continue with 5 more cycles + 2. Continue with 10 more cycles + 3. Stop monitoring +``` + +Increase `max_cycles` by the user's choice and continue. + +#### Progress Tracking + +After each action: + +- If state changed significantly → reset `no_progress_count = 0` +- If state unchanged → `no_progress_count++` +- On new CI attempt detected → reset `local_verify_count = 0` + +## Status Reporting + +Based on verbosity level: + +| Level | What to Report | +| --------- | -------------------------------------------------------------------------- | +| `minimal` | Only final result (success/failure/timeout) | +| `medium` | State changes + periodic updates ("Cycle N \| Elapsed: Xm \| Status: ...") | +| `verbose` | All of medium + full subagent responses, git outputs, MCP responses | + +## User Instruction Examples + +Users can override default behaviors: + +| Instruction | Effect | +| ------------------------------------------------ | --------------------------------------------------- | +| "never auto-apply" | Always prompt before applying any fix | +| "always ask before git push" | Prompt before each push | +| "reject any fix for e2e tasks" | Auto-reject if `failedTaskIds` contains e2e | +| "apply all fixes regardless of verification" | Skip verification check, apply everything | +| "if confidence < 70, reject" | Check confidence field before applying | +| "run 'nx affected -t typecheck' before applying" | Add local verification step | +| "auto-fix workflow failures" | Attempt lockfile updates on pre-CI-Attempt failures | +| "wait 45 min for new CI Attempt" | Override new-CI-Attempt timeout (default: 10 min) | + +## Error Handling + +| Error | Action | +| ------------------------------ | ----------------------------------------------------------------------------------------------------------- | +| Git rebase conflict | Report to user, exit | +| `nx-cloud apply-locally` fails | Reject fix via MCP (`action: "REJECT"`), then attempt manual patch (Reject + Fix From Scratch Flow) or exit | +| MCP tool error | Retry once, if fails report to user | +| Subagent spawn failure | Retry once, if fails exit with error | +| No new CI Attempt detected | If `--auto-fix-workflow`, try lockfile update; otherwise report to user with guidance | +| Lockfile auto-fix fails | Report to user, exit with guidance to check CI logs | + +## Example Session + +### Example 1: Normal Flow with Self-Healing (medium verbosity) + +``` +[monitor-ci] Starting CI monitor for branch 'feature/add-auth' +[monitor-ci] Config: max-cycles=5, timeout=120m, verbosity=medium + +[monitor-ci] Spawning subagent to poll CI status... +[monitor-ci] Checking subagent status... (elapsed: 1m) +[monitor-ci] CI: IN_PROGRESS | Self-healing: NOT_STARTED +[monitor-ci] Checking subagent status... (elapsed: 3m) +[monitor-ci] CI: FAILED | Self-healing: IN_PROGRESS +[monitor-ci] ⚡ CI failed — self-healing fix generation started +[monitor-ci] Checking subagent status... (elapsed: 5m) +[monitor-ci] CI: FAILED | Self-healing: COMPLETED | Verification: COMPLETED + +[monitor-ci] Fix available! Verification: COMPLETED +[monitor-ci] Applying fix via MCP... +[monitor-ci] Fix applied in CI. Waiting for new CI attempt... + +[monitor-ci] Spawning subagent to poll CI status... +[monitor-ci] Checking subagent status... (elapsed: 7m) +[monitor-ci] ⚡ New CI Attempt detected! +[monitor-ci] Checking subagent status... (elapsed: 8m) +[monitor-ci] CI: SUCCEEDED + +[monitor-ci] CI passed successfully! + +[monitor-ci] Summary: + - Agent cycles: 1/5 + - Total time: 12m 34s + - Fixes applied: 1 + - Result: SUCCESS +``` + +### Example 2: Pre-CI Failure (medium verbosity) + +``` +[monitor-ci] Starting CI monitor for branch 'feature/add-products' +[monitor-ci] Config: max-cycles=5, timeout=120m, auto-fix-workflow=true + +[monitor-ci] Spawning subagent to poll CI status... +[monitor-ci] Checking subagent status... (elapsed: 2m) +[monitor-ci] CI: FAILED | Self-healing: COMPLETED + +[monitor-ci] Fix available! Applying locally, enhancing, and pushing... +[monitor-ci] Committed: abc1234 + +[monitor-ci] Spawning subagent to poll CI status... +[monitor-ci] Checking subagent status... (elapsed: 6m) +[monitor-ci] Waiting for new CI Attempt... (expected SHA: abc1234) +[monitor-ci] Checking subagent status... (elapsed: 12m) +[monitor-ci] ⚠️ CI Attempt timeout (10 min). Status: no_new_cipe + +[monitor-ci] --auto-fix-workflow enabled. Attempting lockfile update... +[monitor-ci] Lockfile updated. Committed: def5678 + +[monitor-ci] Spawning subagent to poll CI status... +[monitor-ci] Checking subagent status... (elapsed: 16m) +[monitor-ci] ⚡ New CI Attempt detected! +[monitor-ci] Checking subagent status... (elapsed: 18m) +[monitor-ci] CI: SUCCEEDED + +[monitor-ci] CI passed successfully! + +[monitor-ci] Summary: + - Agent cycles: 3/5 + - Total time: 22m 15s + - Fixes applied: 1 (self-healing) + 1 (lockfile) + - Result: SUCCESS +``` + +### Example 3: Human-in-the-Loop (user pushes during monitoring) + +``` +[monitor-ci] Starting CI monitor for branch 'feature/refactor-api' +[monitor-ci] Config: max-cycles=5, timeout=120m, verbosity=medium + +[monitor-ci] Spawning subagent to poll CI status... +[monitor-ci] Checking subagent status... (elapsed: 4m) +[monitor-ci] CI: FAILED | Self-healing: COMPLETED + +[monitor-ci] Fix available! Applying fix via MCP... (agent cycles: 0/5) +[monitor-ci] Fix applied in CI. Waiting for new CI attempt... + +[monitor-ci] Spawning subagent to poll CI status... +[monitor-ci] Checking subagent status... (elapsed: 8m) +[monitor-ci] ⚡ New CI Attempt detected! +[monitor-ci] CI: FAILED | Self-healing: COMPLETED + +[monitor-ci] Agent-initiated cycle. (agent cycles: 1/5) +[monitor-ci] Fix available! Applying locally and enhancing... +[monitor-ci] Committed: abc1234 + +[monitor-ci] Spawning subagent to poll CI status... + ... (user pushes their own changes to the branch while monitor waits) ... +[monitor-ci] Checking subagent status... (elapsed: 12m) +[monitor-ci] ⚡ New CI Attempt detected! +[monitor-ci] CI: FAILED | Self-healing: IN_PROGRESS + +[monitor-ci] New CI Attempt detected (human-initiated push). Monitoring without incrementing cycle count. (agent cycles: 2/5) +[monitor-ci] Checking subagent status... (elapsed: 16m) +[monitor-ci] CI: FAILED | Self-healing: COMPLETED + +[monitor-ci] Fix available! Applying via MCP... (agent cycles: 2/5) + ... (continues, human cycles don't eat into the budget) ... +``` diff --git a/.github/skills/link-workspace-packages/SKILL.md b/.github/skills/link-workspace-packages/SKILL.md new file mode 100644 index 00000000000000..de1313497a3ce2 --- /dev/null +++ b/.github/skills/link-workspace-packages/SKILL.md @@ -0,0 +1,127 @@ +--- +name: link-workspace-packages +description: 'Link workspace packages in monorepos (npm, yarn, pnpm, bun). USE WHEN: (1) you just created or generated new packages and need to wire up their dependencies, (2) user imports from a sibling package and needs to add it as a dependency, (3) you get resolution errors for workspace packages (@org/*) like "cannot find module", "failed to resolve import", "TS2307", or "cannot resolve". DO NOT patch around with tsconfig paths or manual package.json edits - use the package manager''s workspace commands to fix actual linking.' +--- + +# Link Workspace Packages + +Add dependencies between packages in a monorepo. All package managers support workspaces but with different syntax. + +## Detect Package Manager + +Check whether there's a `packageManager` field in the root-level `package.json`. + +Alternatively check lockfile in repo root: + +- `pnpm-lock.yaml` → pnpm +- `yarn.lock` → yarn +- `bun.lock` / `bun.lockb` → bun +- `package-lock.json` → npm + +## Workflow + +1. Identify consumer package (the one importing) +2. Identify provider package(s) (being imported) +3. Add dependency using package manager's workspace syntax +4. Verify symlinks created in consumer's `node_modules/` + +--- + +## pnpm + +Uses `workspace:` protocol - symlinks only created when explicitly declared. + +```bash +# From consumer directory +pnpm add @org/ui --workspace + +# Or with --filter from anywhere +pnpm add @org/ui --filter @org/app --workspace +``` + +Result in `package.json`: + +```json +{ "dependencies": { "@org/ui": "workspace:*" } } +``` + +--- + +## yarn (v2+/berry) + +Also uses `workspace:` protocol. + +```bash +yarn workspace @org/app add @org/ui +``` + +Result in `package.json`: + +```json +{ "dependencies": { "@org/ui": "workspace:^" } } +``` + +--- + +## npm + +No `workspace:` protocol. npm auto-symlinks workspace packages. + +```bash +npm install @org/ui --workspace @org/app +``` + +Result in `package.json`: + +```json +{ "dependencies": { "@org/ui": "*" } } +``` + +npm resolves to local workspace automatically during install. + +--- + +## bun + +Supports `workspace:` protocol (pnpm-compatible). + +```bash +cd packages/app && bun add @org/ui +``` + +Result in `package.json`: + +```json +{ "dependencies": { "@org/ui": "workspace:*" } } +``` + +--- + +## Examples + +**Example 1: pnpm - link ui lib to app** + +```bash +pnpm add @org/ui --filter @org/app --workspace +``` + +**Example 2: npm - link multiple packages** + +```bash +npm install @org/data-access @org/ui --workspace @org/dashboard +``` + +**Example 3: Debug "Cannot find module"** + +1. Check if dependency is declared in consumer's `package.json` +2. If not, add it using appropriate command above +3. Run install (`pnpm install`, `npm install`, etc.) + +## Notes + +- Symlinks appear in `/node_modules/@org/` +- **Hoisting differs by manager:** + - npm/bun: hoist shared deps to root `node_modules` + - pnpm: no hoisting (strict isolation, prevents phantom deps) + - yarn berry: uses Plug'n'Play by default (no `node_modules`) +- Root `package.json` should have `"private": true` to prevent accidental publish diff --git a/.github/skills/monitor-ci/SKILL.md b/.github/skills/monitor-ci/SKILL.md new file mode 100644 index 00000000000000..e62f8ba47a28e7 --- /dev/null +++ b/.github/skills/monitor-ci/SKILL.md @@ -0,0 +1,678 @@ +--- +name: monitor-ci +description: Monitor Nx Cloud CI pipeline and handle self-healing fixes. USE WHEN user says "monitor ci", "watch ci", "ci monitor", "watch ci for this branch", "track ci", "check ci status", wants to track CI status, or needs help with self-healing CI fixes. ALWAYS USE THIS SKILL instead of native CI provider tools (gh, glab, etc.) for CI monitoring. +--- + +# Monitor CI Command + +You are the orchestrator for monitoring Nx Cloud CI pipeline executions and handling self-healing fixes. You spawn the `ci-monitor-subagent` subagent to poll CI status and make decisions based on the results. + +## Context + +- **Current Branch:** !`git branch --show-current` +- **Current Commit:** !`git rev-parse --short HEAD` +- **Remote Status:** !`git status -sb | head -1` + +## User Instructions + +$ARGUMENTS + +**Important:** If user provides specific instructions, respect them over default behaviors described below. + +## Configuration Defaults + +| Setting | Default | Description | +| ------------------------- | ------------- | ------------------------------------------------------------------------- | +| `--max-cycles` | 10 | Maximum **agent-initiated** CI Attempt cycles before timeout | +| `--timeout` | 120 | Maximum duration in minutes | +| `--verbosity` | medium | Output level: minimal, medium, verbose | +| `--branch` | (auto-detect) | Branch to monitor | +| `--subagent-timeout` | 30 | Subagent polling timeout in minutes | +| `--fresh` | false | Ignore previous context, start fresh | +| `--auto-fix-workflow` | false | Attempt common fixes for pre-CI-Attempt failures (e.g., lockfile updates) | +| `--new-cipe-timeout` | 10 | Minutes to wait for new CI Attempt after action | +| `--local-verify-attempts` | 3 | Max local verification + enhance cycles before pushing to CI | + +Parse any overrides from `$ARGUMENTS` and merge with defaults. + +## Nx Cloud Connection Check + +**CRITICAL**: Before starting the monitoring loop, verify the workspace is connected to Nx Cloud. + +### Step 0: Verify Nx Cloud Connection + +1. **Check `nx.json`** at workspace root for `nxCloudId` or `nxCloudAccessToken` +2. **If `nx.json` missing OR neither property exists** → exit with: + + ``` + [monitor-ci] Nx Cloud not connected. Unlock 70% faster CI and auto-fix broken PRs with https://nx.dev/nx-cloud + ``` + +3. **If connected** → continue to main loop + +## Anti-Patterns (NEVER DO) + +**CRITICAL**: The following behaviors are strictly prohibited: + +| Anti-Pattern | Why It's Bad | +| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ | +| Using CI provider CLIs with `--watch` flags (e.g., `gh pr checks --watch`, `glab ci status -w`) | Bypasses Nx Cloud self-healing entirely | +| Writing custom CI polling scripts | Unreliable, pollutes context, no self-healing | +| Cancelling CI workflows/pipelines | Destructive, loses CI progress | +| Running CI checks on main agent | Wastes main agent context tokens | +| Independently analyzing/fixing CI failures while subagent polls | Races with self-healing, causes duplicate fixes and confused state | + +**If this skill fails to activate**, the fallback is: + +1. Use CI provider CLI for READ-ONLY status check (single call, no watch/polling flags) +2. Immediately delegate to this skill with gathered context +3. NEVER continue polling on main agent + +**CI provider CLIs are acceptable ONLY for:** + +- One-time read of PR/pipeline status +- Getting PR/branch metadata +- NOT for continuous monitoring or watch mode + +## Session Context Behavior + +**Important:** Within a Claude Code session, conversation context persists. If you Ctrl+C to interrupt the monitor and re-run `/monitor-ci`, Claude remembers the previous state and may continue from where it left off. + +- **To continue monitoring:** Just re-run `/monitor-ci` (context is preserved) +- **To start fresh:** Use `/monitor-ci --fresh` to ignore previous context +- **For a completely clean slate:** Exit Claude Code and restart `claude` + +## Default Behaviors by Status + +The subagent returns with one of the following statuses. This table defines the **default behavior** for each status. User instructions can override any of these. + +| Status | Default Behavior | +| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ci_success` | Exit with success. Log "CI passed successfully!" | +| `fix_auto_applying` | Fix will be auto-applied by self-healing. Do NOT call MCP. Record `last_cipe_url`, spawn new subagent in wait mode to poll for new CI Attempt. | +| `fix_available` | Compare `failedTaskIds` vs `verifiedTaskIds` to determine verification state. See **Fix Available Decision Logic** section below. | +| `fix_failed` | Self-healing failed to generate fix. Attempt local fix based on `taskOutputSummary`. If successful → commit, push, loop. If not → exit with failure. | +| `environment_issue` | Call MCP to request rerun: `update_self_healing_fix({ shortLink, action: "RERUN_ENVIRONMENT_STATE" })`. New CI Attempt spawns automatically. Loop to poll for new CI Attempt. | +| `self_healing_throttled` | Self-healing throttled due to unapplied fixes. See **Throttled Self-Healing Flow** below. | +| `no_fix` | CI failed, no fix available (self-healing disabled or not executable). Attempt local fix if possible. Otherwise exit with failure. | +| `no_new_cipe` | Expected CI Attempt never spawned (CI workflow likely failed before Nx tasks). Report to user, attempt common fixes if configured, or exit with guidance. | +| `polling_timeout` | Subagent polling timeout reached. Exit with timeout. | +| `cipe_canceled` | CI Attempt was canceled. Exit with canceled status. | +| `cipe_timed_out` | CI Attempt timed out. Exit with timeout status. | +| `cipe_no_tasks` | CI Attempt exists but failed with no task data (likely infrastructure issue). Retry once with empty commit. If retry fails, exit with failure and guidance. | +| `error` | Increment `no_progress_count`. If >= 3 → exit with circuit breaker. Otherwise wait 60s and loop. | + +### Fix Available Decision Logic + +When subagent returns `fix_available`, main agent compares `failedTaskIds` vs `verifiedTaskIds`: + +#### Step 1: Categorize Tasks + +1. **Verified tasks** = tasks in both `failedTaskIds` AND `verifiedTaskIds` +2. **Unverified tasks** = tasks in `failedTaskIds` but NOT in `verifiedTaskIds` +3. **E2E tasks** = unverified tasks where target contains "e2e" (task format: `:` or `::`) +4. **Verifiable tasks** = unverified tasks that are NOT e2e + +#### Step 2: Determine Path + +| Condition | Path | +| --------------------------------------- | ---------------------------------------- | +| No unverified tasks (all verified) | Apply via MCP | +| Unverified tasks exist, but ALL are e2e | Apply via MCP (treat as verified enough) | +| Verifiable tasks exist | Local verification flow | + +#### Step 3a: Apply via MCP (fully/e2e-only verified) + +- Call `update_self_healing_fix({ shortLink, action: "APPLY" })` +- Record `last_cipe_url`, spawn subagent in wait mode + +#### Step 3b: Local Verification Flow + +When verifiable (non-e2e) unverified tasks exist: + +1. **Detect package manager:** + + - `pnpm-lock.yaml` exists → `pnpm nx` + - `yarn.lock` exists → `yarn nx` + - Otherwise → `npx nx` + +2. **Run verifiable tasks in parallel:** + + - Spawn `general` subagents to run each task concurrently + - Each subagent runs: ` nx run ` + - Collect pass/fail results from all subagents + +3. **Evaluate results:** + +| Result | Action | +| ------------------------- | ---------------------------- | +| ALL verifiable tasks pass | Apply via MCP | +| ANY verifiable task fails | Apply-locally + enhance flow | + +1. **Apply-locally + enhance flow:** + + - Run `nx-cloud apply-locally ` + - Enhance the code to fix failing tasks + - Run failing tasks again to verify fix + - If still failing → increment `local_verify_count`, loop back to enhance + - If passing → commit and push, record `expected_commit_sha`, spawn subagent in wait mode + +2. **Track attempts** (wraps step 4): + + - Increment `local_verify_count` after each enhance cycle + - If `local_verify_count >= local_verify_attempts` (default: 3): + + - Get code in commit-able state + - Commit and push with message indicating local verification failed + - Report to user: + + ``` + [monitor-ci] Local verification failed after attempts. Pushed to CI for final validation. Failed: + ``` + + - Record `expected_commit_sha`, spawn subagent in wait mode (let CI be final judge) + +#### Commit Message Format + +```bash +git commit -m "fix(): + +Failed tasks: , +Local verification: passed|enhanced|failed-pushing-to-ci" +``` + +**Git Safety**: Only stage and commit files that were modified as part of the fix. Users may have concurrent local changes (local publish, WIP features, config tweaks) that must NOT be committed. NEVER use `git add -A` or `git add .` — always stage specific files by name. + +### Unverified Fix Flow (No Verification Attempted) + +When `verificationStatus` is `FAILED`, `NOT_EXECUTABLE`, or fix has `couldAutoApplyTasks != true` with no verification: + +- Analyze fix content (`suggestedFix`, `suggestedFixReasoning`, `taskOutputSummary`) +- If fix looks correct → apply via MCP +- If fix needs enhancement → use Apply Locally + Enhance Flow above +- If fix is wrong → reject via MCP, fix from scratch, commit, push + +### Auto-Apply Eligibility + +The `couldAutoApplyTasks` field indicates whether the fix is eligible for automatic application: + +- **`true`**: Fix is eligible for auto-apply. Subagent keeps polling while verification is in progress. Returns `fix_auto_applying` when verified, or `fix_available` if verification fails. +- **`false`** or **`null`**: Fix requires manual action (apply via MCP, apply locally, or reject) + +**Key point**: When subagent returns `fix_auto_applying`, do NOT call MCP to apply - self-healing handles it. Just spawn a new subagent in wait mode. No local git operations (no commit, no push). + +### Accidental Local Fix Recovery + +If you find yourself with uncommitted local changes from your own fix attempt when the subagent returns (e.g., you accidentally analyzed/fixed the failure while the subagent was polling): + +1. **Compare your local changes with the self-healing fix** (`suggestedFix` / `suggestedFixDescription`) +2. **If identical or substantially similar** → discard only the files you modified (`git checkout -- ...`), then apply via MCP instead. Self-healing's pipeline is the preferred path. Do NOT discard unrelated user changes. +3. **If meaningfully different** (your fix addresses something self-healing missed) → proceed with the Apply Locally + Enhance Flow + +Self-healing fixes go through proper CI verification. Always prefer the self-healing path when fixes overlap. + +### Apply vs Reject vs Apply Locally + +- **Apply via MCP**: Calls `update_self_healing_fix({ shortLink, action: "APPLY" })`. Self-healing agent applies the fix in CI and a new CI Attempt spawns automatically. No local git operations needed. +- **Apply Locally**: Runs `nx-cloud apply-locally `. Applies the patch to your local working directory and sets state to `APPLIED_LOCALLY`. Use this when you want to enhance the fix before pushing. +- **Reject via MCP**: Calls `update_self_healing_fix({ shortLink, action: "REJECT" })`. Marks fix as rejected. Use only when the fix is completely wrong and you'll fix from scratch. + +### Apply Locally + Enhance Flow + +When the fix needs enhancement (use `nx-cloud apply-locally`, NOT reject): + +1. Apply the patch locally: `nx-cloud apply-locally ` (this also updates state to `APPLIED_LOCALLY`) +2. Make additional changes as needed +3. Stage only the files you modified: `git add ...` +4. Commit and push: + + ```bash + git commit -m "fix: resolve " + git push origin $(git branch --show-current) + ``` + +5. Loop to poll for new CI Attempt + +### Reject + Fix From Scratch Flow + +When the fix is completely wrong: + +1. Call MCP to reject: `update_self_healing_fix({ shortLink, action: "REJECT" })` +2. Fix the issue from scratch locally +3. Stage only the files you modified: `git add ...` +4. Commit and push: + + ```bash + git commit -m "fix: resolve " + git push origin $(git branch --show-current) + ``` + +5. Loop to poll for new CI Attempt + +### Environment Issue Handling + +When `failureClassification == 'ENVIRONMENT_STATE'`: + +1. Call MCP to request rerun: `update_self_healing_fix({ shortLink, action: "RERUN_ENVIRONMENT_STATE" })` +2. New CI Attempt spawns automatically (no local git operations needed) +3. Loop to poll for new CI Attempt with `previousCipeUrl` set + +### Throttled Self-Healing Flow + +When `status == 'self_healing_throttled'`: + +Self-healing was skipped because too many previous fixes remain unapplied. The `selfHealingSkipMessage` contains URLs to CIPEs with pending fixes. + +1. **Parse throttle message** for CIPE URLs using regex matching `/cipes/{id}` pattern (format: `https://...nx.app/cipes/{cipeId}/self-healing`) +2. **Reject previous fixes** — for each CIPE URL found: + - Call `ci_information({ url: "" })` to get the `shortLink` + - Call `update_self_healing_fix({ shortLink: "", action: "REJECT" })` to reject +3. **Attempt local fix**: + - Use `failedTaskIds` from the current CIPE + - Use `taskOutputSummary` (fetch via select if available) for context + - Try to fix locally, run tasks to verify +4. **Fallback if local fix not possible**: + - Push empty commit (`git commit --allow-empty -m "ci: rerun after rejecting throttled fixes"`) + - Push to trigger new CI + - Spawn subagent in wait mode to poll for new CI Attempt +5. After rejecting fixes and pushing, self-healing should resume since throttle condition (unapplied fixes) is cleared + +### No-New-CI-Attempt Handling + +When `status == 'no_new_cipe'`: + +This means the expected CI Attempt was never created - CI likely failed before Nx tasks could run. + +1. **Report to user:** + + ``` + [monitor-ci] No CI attempt for after 10 min. Check CI provider for pre-Nx failures (install, checkout, auth). Last CI attempt: + ``` + +2. **If user configured auto-fix attempts** (e.g., `--auto-fix-workflow`): + + - Detect package manager: check for `pnpm-lock.yaml`, `yarn.lock`, `package-lock.json` + - Run install to update lockfile: + + ```bash + pnpm install # or npm install / yarn install + ``` + + - If lockfile changed: + + ```bash + git add pnpm-lock.yaml # or appropriate lockfile + git commit -m "chore: update lockfile" + git push origin $(git branch --show-current) + ``` + + - Record new commit SHA, loop to poll with `expectedCommitSha` + +3. **Otherwise:** Exit with `no_new_cipe` status, providing guidance for user to investigate + +### CI-Attempt-No-Tasks Handling + +When `status == 'cipe_no_tasks'`: + +This means the CI Attempt was created but no Nx tasks were recorded before it failed. Common causes: + +- CI timeout before tasks could run +- Critical infrastructure error +- Memory/resource exhaustion +- Network issues connecting to Nx Cloud + +1. **Report to user:** + + ``` + [monitor-ci] CI failed but no Nx tasks were recorded. + [monitor-ci] CI Attempt URL: + [monitor-ci] + [monitor-ci] This usually indicates an infrastructure issue. Attempting retry... + ``` + +2. **Create empty commit to retry CI:** + + ```bash + git commit --allow-empty -m "chore: retry ci [monitor-ci]" + git push origin $(git branch --show-current) + ``` + +3. **Record `expected_commit_sha`, spawn subagent in wait mode** + +4. **If retry also returns `cipe_no_tasks`:** + + - Exit with failure + - Provide guidance: + + ``` + [monitor-ci] Retry failed. Please check: + [monitor-ci] 1. Nx Cloud UI: + [monitor-ci] 2. CI provider logs (GitHub Actions, GitLab CI, etc.) + [monitor-ci] 3. CI job timeout settings + [monitor-ci] 4. Memory/resource limits + ``` + +## Exit Conditions + +Exit the monitoring loop when ANY of these conditions are met: + +| Condition | Exit Type | +| ------------------------------------------------------------ | ---------------------- | +| CI passes (`cipeStatus == 'SUCCEEDED'`) | Success | +| Max agent-initiated cycles reached (after user declines ext) | Timeout | +| Max duration reached | Timeout | +| 3 consecutive no-progress iterations | Circuit breaker | +| No fix available and local fix not possible | Failure | +| No new CI Attempt and auto-fix not configured | Pre-CI-Attempt failure | +| User cancels | Cancelled | + +## Main Loop + +### Step 1: Initialize Tracking + +``` +cycle_count = 0 # Only incremented for agent-initiated cycles (counted against --max-cycles) +start_time = now() +no_progress_count = 0 +local_verify_count = 0 +last_state = null +last_cipe_url = null +expected_commit_sha = null +agent_triggered = false # Set true after monitor takes an action that triggers new CI Attempt +``` + +### Step 2: Spawn Subagent and Monitor Output + +Spawn the `ci-monitor-subagent` subagent to poll CI status. **Run in background** so you can actively monitor and relay its output to the user. + +**Fresh start (first spawn, no expected CI Attempt):** + +``` +Task( + agent: "ci-monitor-subagent", + run_in_background: true, + prompt: "Monitor CI for branch ''. + Subagent timeout: minutes. + New-CI-Attempt timeout: minutes. + Verbosity: ." +) +``` + +**After action that triggers new CI Attempt (wait mode):** + +``` +Task( + agent: "ci-monitor-subagent", + run_in_background: true, + prompt: "Monitor CI for branch ''. + Subagent timeout: minutes. + New-CI-Attempt timeout: minutes. + Verbosity: . + + WAIT MODE: A new CI Attempt should spawn. Ignore old CI Attempt until new one appears. + Expected commit SHA: + Previous CI Attempt URL: " +) +``` + +### Step 2a: Active Output Monitoring (CRITICAL) + +**The subagent's text output is NOT visible to users when running in background.** You MUST actively monitor and relay its output. Do NOT passively wait for completion. + +After spawning the background subagent, enter a monitoring loop: + +1. **Every 60 seconds**, check the subagent output using `TaskOutput(task_id, block=false)` +2. **Parse new lines** since your last check — look for `[ci-monitor]` and `⚡` prefixed lines +3. **Relay to user** based on verbosity: + - `minimal`: Only relay `⚡` critical transition lines + - `medium`: Relay all `[ci-monitor]` status lines + - `verbose`: Relay all subagent output +4. **Continue** until `TaskOutput` returns a completed status +5. When complete, proceed to Step 3 with the final subagent response + +**Example monitoring loop output:** + +``` +[monitor-ci] Checking subagent status... (elapsed: 1m) +[monitor-ci] CI: IN_PROGRESS | Self-healing: NOT_STARTED + +[monitor-ci] Checking subagent status... (elapsed: 3m) +[monitor-ci] CI: FAILED | Self-healing: IN_PROGRESS +[monitor-ci] ⚡ CI failed — self-healing fix generation started + +[monitor-ci] Checking subagent status... (elapsed: 5m) +[monitor-ci] CI: FAILED | Self-healing: COMPLETED | Verification: IN_PROGRESS +[monitor-ci] ⚡ Self-healing fix generated — verification started +``` + +**NEVER do this:** + +- Spawn subagent and passively say "Waiting for results..." +- Check once and say "Still working, I'll wait" +- Only show output when the subagent finishes +- Independently analyze CI failures, read task output, or attempt fixes while subagent is polling + +**While the subagent is polling, your ONLY job is to relay its output.** Do not read CI task output, diagnose failures, generate fixes, modify code, or run tasks locally. All fix decisions happen in Step 3 AFTER the subagent returns with a status. Self-healing may already be working on a fix — independent local analysis races with it and causes duplicate/conflicting fixes. + +### Step 3: Handle Subagent Response + +When subagent returns: + +1. Check the returned status +2. Look up default behavior in the table above +3. Check if user instructions override the default +4. Execute the appropriate action +5. **If action expects new CI Attempt**, update tracking (see Step 3a) +6. If action results in looping, go to Step 2 + +### Step 3a: Track State for New-CI-Attempt Detection + +After actions that should trigger a new CI Attempt, record state before looping: + +| Action | What to Track | Subagent Mode | +| ----------------------------------- | --------------------------------------------- | ------------- | +| Fix auto-applying | `last_cipe_url = current cipeUrl` | Wait mode | +| Apply via MCP | `last_cipe_url = current cipeUrl` | Wait mode | +| Apply locally + push | `expected_commit_sha = $(git rev-parse HEAD)` | Wait mode | +| Reject + fix + push | `expected_commit_sha = $(git rev-parse HEAD)` | Wait mode | +| Fix failed + local fix + push | `expected_commit_sha = $(git rev-parse HEAD)` | Wait mode | +| No fix + local fix + push | `expected_commit_sha = $(git rev-parse HEAD)` | Wait mode | +| Environment rerun | `last_cipe_url = current cipeUrl` | Wait mode | +| No-new-CI-Attempt + auto-fix + push | `expected_commit_sha = $(git rev-parse HEAD)` | Wait mode | +| CI Attempt no tasks + retry push | `expected_commit_sha = $(git rev-parse HEAD)` | Wait mode | + +**CRITICAL**: When passing `expectedCommitSha` or `last_cipe_url` to the subagent, it enters **wait mode**: + +- Subagent will **completely ignore** the old/stale CI Attempt +- Subagent will only wait for new CI Attempt to appear +- Subagent will NOT return to main agent with stale CI Attempt data +- Once new CI Attempt detected, subagent switches to normal polling + +**Why wait mode matters for context preservation**: Stale CI Attempt data can be very large (task output summaries, suggested fix patches, reasoning). If subagent returns this to main agent, it pollutes main agent's context with useless data since we already processed that CI Attempt. Wait mode keeps stale data in the subagent, never sending it to main agent. + +### Step 4: Cycle Classification and Progress Tracking + +#### Cycle Classification + +Not all cycles are equal. Only count cycles the monitor itself triggered toward `--max-cycles`: + +1. **After subagent returns**, check `agent_triggered`: + - `agent_triggered == true` → this cycle was triggered by the monitor → `cycle_count++` + - `agent_triggered == false` → this cycle was human-initiated or a first observation → do NOT increment `cycle_count` +2. **Reset** `agent_triggered = false` +3. **After Step 3a** (when the monitor takes an action that triggers a new CI Attempt) → set `agent_triggered = true` + +**How detection works**: Step 3a is only called when the monitor explicitly pushes code, applies a fix via MCP, or triggers an environment rerun. If a human pushes on their own, the subagent detects a new CI Attempt but the monitor never went through Step 3a, so `agent_triggered` remains `false`. + +**When a human-initiated cycle is detected**, log it: + +``` +[monitor-ci] New CI Attempt detected (human-initiated push). Monitoring without incrementing cycle count. (agent cycles: N/max-cycles) +``` + +#### Approaching Limit Gate + +When `cycle_count >= max_cycles - 2`, pause and ask the user before continuing: + +``` +[monitor-ci] Approaching cycle limit (cycle_count/max_cycles agent-initiated cycles used). +[monitor-ci] How would you like to proceed? + 1. Continue with 5 more cycles + 2. Continue with 10 more cycles + 3. Stop monitoring +``` + +Increase `max_cycles` by the user's choice and continue. + +#### Progress Tracking + +After each action: + +- If state changed significantly → reset `no_progress_count = 0` +- If state unchanged → `no_progress_count++` +- On new CI attempt detected → reset `local_verify_count = 0` + +## Status Reporting + +Based on verbosity level: + +| Level | What to Report | +| --------- | -------------------------------------------------------------------------- | +| `minimal` | Only final result (success/failure/timeout) | +| `medium` | State changes + periodic updates ("Cycle N \| Elapsed: Xm \| Status: ...") | +| `verbose` | All of medium + full subagent responses, git outputs, MCP responses | + +## User Instruction Examples + +Users can override default behaviors: + +| Instruction | Effect | +| ------------------------------------------------ | --------------------------------------------------- | +| "never auto-apply" | Always prompt before applying any fix | +| "always ask before git push" | Prompt before each push | +| "reject any fix for e2e tasks" | Auto-reject if `failedTaskIds` contains e2e | +| "apply all fixes regardless of verification" | Skip verification check, apply everything | +| "if confidence < 70, reject" | Check confidence field before applying | +| "run 'nx affected -t typecheck' before applying" | Add local verification step | +| "auto-fix workflow failures" | Attempt lockfile updates on pre-CI-Attempt failures | +| "wait 45 min for new CI Attempt" | Override new-CI-Attempt timeout (default: 10 min) | + +## Error Handling + +| Error | Action | +| ------------------------------ | ----------------------------------------------------------------------------------------------------------- | +| Git rebase conflict | Report to user, exit | +| `nx-cloud apply-locally` fails | Reject fix via MCP (`action: "REJECT"`), then attempt manual patch (Reject + Fix From Scratch Flow) or exit | +| MCP tool error | Retry once, if fails report to user | +| Subagent spawn failure | Retry once, if fails exit with error | +| No new CI Attempt detected | If `--auto-fix-workflow`, try lockfile update; otherwise report to user with guidance | +| Lockfile auto-fix fails | Report to user, exit with guidance to check CI logs | + +## Example Session + +### Example 1: Normal Flow with Self-Healing (medium verbosity) + +``` +[monitor-ci] Starting CI monitor for branch 'feature/add-auth' +[monitor-ci] Config: max-cycles=5, timeout=120m, verbosity=medium + +[monitor-ci] Spawning subagent to poll CI status... +[monitor-ci] Checking subagent status... (elapsed: 1m) +[monitor-ci] CI: IN_PROGRESS | Self-healing: NOT_STARTED +[monitor-ci] Checking subagent status... (elapsed: 3m) +[monitor-ci] CI: FAILED | Self-healing: IN_PROGRESS +[monitor-ci] ⚡ CI failed — self-healing fix generation started +[monitor-ci] Checking subagent status... (elapsed: 5m) +[monitor-ci] CI: FAILED | Self-healing: COMPLETED | Verification: COMPLETED + +[monitor-ci] Fix available! Verification: COMPLETED +[monitor-ci] Applying fix via MCP... +[monitor-ci] Fix applied in CI. Waiting for new CI attempt... + +[monitor-ci] Spawning subagent to poll CI status... +[monitor-ci] Checking subagent status... (elapsed: 7m) +[monitor-ci] ⚡ New CI Attempt detected! +[monitor-ci] Checking subagent status... (elapsed: 8m) +[monitor-ci] CI: SUCCEEDED + +[monitor-ci] CI passed successfully! + +[monitor-ci] Summary: + - Agent cycles: 1/5 + - Total time: 12m 34s + - Fixes applied: 1 + - Result: SUCCESS +``` + +### Example 2: Pre-CI Failure (medium verbosity) + +``` +[monitor-ci] Starting CI monitor for branch 'feature/add-products' +[monitor-ci] Config: max-cycles=5, timeout=120m, auto-fix-workflow=true + +[monitor-ci] Spawning subagent to poll CI status... +[monitor-ci] Checking subagent status... (elapsed: 2m) +[monitor-ci] CI: FAILED | Self-healing: COMPLETED + +[monitor-ci] Fix available! Applying locally, enhancing, and pushing... +[monitor-ci] Committed: abc1234 + +[monitor-ci] Spawning subagent to poll CI status... +[monitor-ci] Checking subagent status... (elapsed: 6m) +[monitor-ci] Waiting for new CI Attempt... (expected SHA: abc1234) +[monitor-ci] Checking subagent status... (elapsed: 12m) +[monitor-ci] ⚠️ CI Attempt timeout (10 min). Status: no_new_cipe + +[monitor-ci] --auto-fix-workflow enabled. Attempting lockfile update... +[monitor-ci] Lockfile updated. Committed: def5678 + +[monitor-ci] Spawning subagent to poll CI status... +[monitor-ci] Checking subagent status... (elapsed: 16m) +[monitor-ci] ⚡ New CI Attempt detected! +[monitor-ci] Checking subagent status... (elapsed: 18m) +[monitor-ci] CI: SUCCEEDED + +[monitor-ci] CI passed successfully! + +[monitor-ci] Summary: + - Agent cycles: 3/5 + - Total time: 22m 15s + - Fixes applied: 1 (self-healing) + 1 (lockfile) + - Result: SUCCESS +``` + +### Example 3: Human-in-the-Loop (user pushes during monitoring) + +``` +[monitor-ci] Starting CI monitor for branch 'feature/refactor-api' +[monitor-ci] Config: max-cycles=5, timeout=120m, verbosity=medium + +[monitor-ci] Spawning subagent to poll CI status... +[monitor-ci] Checking subagent status... (elapsed: 4m) +[monitor-ci] CI: FAILED | Self-healing: COMPLETED + +[monitor-ci] Fix available! Applying fix via MCP... (agent cycles: 0/5) +[monitor-ci] Fix applied in CI. Waiting for new CI attempt... + +[monitor-ci] Spawning subagent to poll CI status... +[monitor-ci] Checking subagent status... (elapsed: 8m) +[monitor-ci] ⚡ New CI Attempt detected! +[monitor-ci] CI: FAILED | Self-healing: COMPLETED + +[monitor-ci] Agent-initiated cycle. (agent cycles: 1/5) +[monitor-ci] Fix available! Applying locally and enhancing... +[monitor-ci] Committed: abc1234 + +[monitor-ci] Spawning subagent to poll CI status... + ... (user pushes their own changes to the branch while monitor waits) ... +[monitor-ci] Checking subagent status... (elapsed: 12m) +[monitor-ci] ⚡ New CI Attempt detected! +[monitor-ci] CI: FAILED | Self-healing: IN_PROGRESS + +[monitor-ci] New CI Attempt detected (human-initiated push). Monitoring without incrementing cycle count. (agent cycles: 2/5) +[monitor-ci] Checking subagent status... (elapsed: 16m) +[monitor-ci] CI: FAILED | Self-healing: COMPLETED + +[monitor-ci] Fix available! Applying via MCP... (agent cycles: 2/5) + ... (continues, human cycles don't eat into the budget) ... +``` diff --git a/.github/skills/nx-generate/SKILL.md b/.github/skills/nx-generate/SKILL.md new file mode 100644 index 00000000000000..af7ba80a4459a6 --- /dev/null +++ b/.github/skills/nx-generate/SKILL.md @@ -0,0 +1,166 @@ +--- +name: nx-generate +description: Generate code using nx generators. INVOKE IMMEDIATELY when user mentions scaffolding, setup, structure, creating apps/libs, or setting up project structure. Trigger words - scaffold, setup, create a ... app, create a ... lib, project structure, generate, add a new project. ALWAYS use this BEFORE calling nx_docs or exploring - this skill handles discovery internally. +--- + +# Run Nx Generator + +Nx generators are powerful tools that scaffold projects, make automated code migrations or automate repetitive tasks in a monorepo. They ensure consistency across the codebase and reduce boilerplate work. + +This skill applies when the user wants to: + +- Create new projects like libraries or applications +- Scaffold features or boilerplate code +- Run workspace-specific or custom generators +- Do anything else that an nx generator exists for + +## Key Principles + +1. **Always use `--no-interactive`** - Prevents prompts that would hang execution +2. **Read the generator source code** - The schema alone is not enough; understand what the generator actually does +3. **Match existing repo patterns** - Study similar artifacts in the repo and follow their conventions +4. **Verify with lint/test/build/typecheck etc.** - Generated code must pass verification. The listed targets are just an example, use what's appropriate for this workspace. + +## Steps + +### 1. Discover Available Generators + +Use the Nx CLI to discover available generators: + +- List all generators for a plugin: `npx nx list @nx/react` +- View available plugins: `npx nx list` + +This includes plugin generators (e.g., `@nx/react:library`) and local workspace generators. + +### 2. Match Generator to User Request + +Identify which generator(s) could fulfill the user's needs. Consider what artifact type they want, which framework is relevant, and any specific generator names mentioned. + +**IMPORTANT**: When both a local workspace generator and an external plugin generator could satisfy the request, **always prefer the local workspace generator**. Local generators are customized for the specific repo's patterns. + +If no suitable generator exists, you can stop using this skill. However, the burden of proof is high—carefully consider all available generators before deciding none apply. + +### 3. Get Generator Options + +Use the `--help` flag to understand available options: + +```bash +npx nx g @nx/react:library --help +``` + +Pay attention to required options, defaults that might need overriding, and options relevant to the user's request. + +### Library Buildability + +**Default to non-buildable libraries** unless there's a specific reason for buildable. + +| Type | When to use | Generator flags | +| --------------------------- | ----------------------------------------------------------------- | ----------------------------------- | +| **Non-buildable** (default) | Internal monorepo libs consumed by apps | No `--bundler` flag | +| **Buildable** | Publishing to npm, cross-repo sharing, stable libs for cache hits | `--bundler=vite` or `--bundler=swc` | + +Non-buildable libs: + +- Export `.ts`/`.tsx` source directly +- Consumer's bundler compiles them +- Faster dev experience, less config + +Buildable libs: + +- Have their own build target +- Useful for stable libs that rarely change (cache hits) +- Required for npm publishing + +**If unclear, ask the user:** "Should this library be buildable (own build step, better caching) or non-buildable (source consumed directly, simpler setup)?" + +### 4. Read Generator Source Code + +**This step is critical.** The schema alone does not tell you everything. Reading the source code helps you: + +- Know exactly what files will be created/modified and where +- Understand side effects (updating configs, installing deps, etc.) +- Identify behaviors and options not obvious from the schema +- Understand how options interact with each other + +To find generator source code: + +- For plugin generators: Use `node -e "console.log(require.resolve('@nx//generators.json'));"` to find the generators.json, then locate the source from there +- If that fails, read directly from `node_modules//generators.json` +- For local generators: Typically in `tools/generators/` or a local plugin directory. Search the repo for the generator name. + +After reading the source, reconsider: Is this the right generator? If not, go back to step 2. + +> **⚠️ `--directory` flag behavior can be misleading.** +> It should specify the full path of the generated library or component, not the parent path that it will be generated in. +> +> ```bash +> # ✅ Correct - directory is the full path for the library +> nx g @nx/react:library --directory=libs/my-lib +> # generates libs/my-lib/package.json and more +> +> # ❌ Wrong - this will create files at libs and libs/src/... +> nx g @nx/react:library --name=my-lib --directory=libs +> # generates libs/package.json and more +> ``` + +### 5. Examine Existing Patterns + +Before generating, examine the target area of the codebase: + +- Look at similar existing artifacts (other libraries, applications, etc.) +- Identify naming conventions, file structures, and configuration patterns +- Note which test runners, build tools, and linters are used +- Configure the generator to match these patterns + +### 6. Dry-Run to Verify File Placement + +**Always run with `--dry-run` first** to verify files will be created in the correct location: + +```bash +npx nx g @nx/react:library --name=my-lib --dry-run --no-interactive +``` + +Review the output carefully. If files would be created in the wrong location, adjust your options based on what you learned from the generator source code. + +Note: Some generators don't support dry-run (e.g., if they install npm packages). If dry-run fails for this reason, proceed to running the generator for real. + +### 7. Run the Generator + +Execute the generator: + +```bash +nx generate --no-interactive +``` + +> **Tip:** New packages often need workspace dependencies wired up (e.g., importing shared types, being consumed by apps). The `link-workspace-packages` skill can help add these correctly. + +### 8. Modify Generated Code (If Needed) + +Generators provide a starting point. Modify the output as needed to: + +- Add or modify functionality as requested +- Adjust imports, exports, or configurations +- Integrate with existing code patterns + +**Important:** If you replace or delete generated test files (e.g., `*.spec.ts`), either write meaningful replacement tests or remove the `test` target from the project configuration. Empty test suites will cause `nx test` to fail. + +### 9. Format and Verify + +Format all generated/modified files: + +```bash +nx format --fix +``` + +This example is for built-in nx formatting with prettier. There might be other formatting tools for this workspace, use these when appropriate. + +Then verify the generated code works. Keep in mind that the changes you make with a generator or subsequent modifications might impact various projects so it's usually not enough to only run targets for the artifact you just created. + +```bash +# these targets are just an example! +nx run-many -t build,lint,test,typecheck +``` + +These targets are common examples used across many workspaces. You should do research into other targets available for this workspace and its projects. CI configuration is usually a good guide for what the critical targets are that have to pass. + +If verification fails with manageable issues (a few lint errors, minor type issues), fix them. If issues are extensive, attempt obvious fixes first, then escalate to the user with details about what was generated, what's failing, and what you've attempted. diff --git a/.github/skills/nx-plugins/SKILL.md b/.github/skills/nx-plugins/SKILL.md new file mode 100644 index 00000000000000..89223c7f2abf88 --- /dev/null +++ b/.github/skills/nx-plugins/SKILL.md @@ -0,0 +1,9 @@ +--- +name: nx-plugins +description: Find and add Nx plugins. USE WHEN user wants to discover available plugins, install a new plugin, or add support for a specific framework or technology to the workspace. +--- + +## Finding and Installing new plugins + +- List plugins: `pnpm nx list` +- Install plugins `pnpm nx add `. Example: `pnpm nx add @nx/react`. diff --git a/.github/skills/nx-run-tasks/SKILL.md b/.github/skills/nx-run-tasks/SKILL.md new file mode 100644 index 00000000000000..7f1263a572503a --- /dev/null +++ b/.github/skills/nx-run-tasks/SKILL.md @@ -0,0 +1,58 @@ +--- +name: nx-run-tasks +description: Helps with running tasks in an Nx workspace. USE WHEN the user wants to execute build, test, lint, serve, or run any other tasks defined in the workspace. +--- + +You can run tasks with Nx in the following way. + +Keep in mind that you might have to prefix things with npx/pnpx/yarn if the user doesn't have nx installed globally. Look at the package.json or lockfile to determine which package manager is in use. + +For more details on any command, run it with `--help` (e.g. `nx run-many --help`, `nx affected --help`). + +## Understand which tasks can be run + +You can check those via `nx show project --json`, for example `nx show project myapp --json`. It contains a `targets` section which has information about targets that can be run. You can also just look at the `package.json` scripts or `project.json` targets, but you might miss out on inferred tasks by Nx plugins. + +## Run a single task + +``` +nx run : +``` + +where `project` is the project name defined in `package.json` or `project.json` (if present). + +## Run multiple tasks + +``` +nx run-many -t build test lint typecheck +``` + +You can pass a `-p` flag to filter to specific projects, otherwise it runs on all projects. You can also use `--exclude` to exclude projects, and `--parallel` to control the number of parallel processes (default is 3). + +Examples: + +- `nx run-many -t test -p proj1 proj2` — test specific projects +- `nx run-many -t test --projects=*-app --exclude=excluded-app` — test projects matching a pattern +- `nx run-many -t test --projects=tag:api-*` — test projects by tag + +## Run tasks for affected projects + +Use `nx affected` to only run tasks on projects that have been changed and projects that depend on changed projects. This is especially useful in CI and for large workspaces. + +``` +nx affected -t build test lint +``` + +By default it compares against the base branch. You can customize this: + +- `nx affected -t test --base=main --head=HEAD` — compare against a specific base and head +- `nx affected -t test --files=libs/mylib/src/index.ts` — specify changed files directly + +## Useful flags + +These flags work with `run`, `run-many`, and `affected`: + +- `--skipNxCache` — rerun tasks even when results are cached +- `--verbose` — print additional information such as stack traces +- `--nxBail` — stop execution after the first failed task +- `--configuration=` — use a specific configuration (e.g. `production`) diff --git a/.github/skills/nx-workspace/SKILL.md b/.github/skills/nx-workspace/SKILL.md new file mode 100644 index 00000000000000..9fc229e91a7403 --- /dev/null +++ b/.github/skills/nx-workspace/SKILL.md @@ -0,0 +1,285 @@ +--- +name: nx-workspace +description: "Explore and understand Nx workspaces. USE WHEN answering questions about the workspace, projects, or tasks. ALSO USE WHEN an nx command fails or you need to check available targets/configuration before running a task. EXAMPLES: 'What projects are in this workspace?', 'How is project X configured?', 'What depends on library Y?', 'What targets can I run?', 'Cannot find configuration for task', 'debug nx task failure'." +--- + +# Nx Workspace Exploration + +This skill provides read-only exploration of Nx workspaces. Use it to understand workspace structure, project configuration, available targets, and dependencies. + +Keep in mind that you might have to prefix commands with `npx`/`pnpx`/`yarn` if nx isn't installed globally. Check the lockfile to determine the package manager in use. + +## Listing Projects + +Use `nx show projects` to list projects in the workspace. + +The project filtering syntax (`-p`/`--projects`) works across many Nx commands including `nx run-many`, `nx release`, `nx show projects`, and more. Filters support explicit names, glob patterns, tag references (e.g. `tag:name`), directories, and negation (e.g. `!project-name`). + +```bash +# List all projects +nx show projects + +# Filter by pattern (glob) +nx show projects --projects "apps/*" +nx show projects --projects "shared-*" + +# Filter by tag +nx show projects --projects "tag:publishable" +nx show projects -p 'tag:publishable,!tag:internal' + +# Filter by target (projects that have a specific target) +nx show projects --withTarget build + +# Combine filters +nx show projects --type lib --withTarget test +nx show projects --affected --exclude="*-e2e" +nx show projects -p "tag:scope:client,packages/*" + +# Negate patterns +nx show projects -p '!tag:private' +nx show projects -p '!*-e2e' + +# Output as JSON +nx show projects --json +``` + +## Project Configuration + +Use `nx show project --json` to get the full resolved configuration for a project. + +**Important**: Do NOT read `project.json` directly - it only contains partial configuration. The `nx show project --json` command returns the full resolved config including inferred targets from plugins. + +You can read the full project schema at `node_modules/nx/schemas/project-schema.json` to understand nx project configuration options. + +```bash +# Get full project configuration +nx show project my-app --json + +# Extract specific parts from the JSON +nx show project my-app --json | jq '.targets' +nx show project my-app --json | jq '.targets.build' +nx show project my-app --json | jq '.targets | keys' + + +# Check project metadata +nx show project my-app --json | jq '{name, root, sourceRoot, projectType, tags}' +``` + +## Target Information + +Targets define what tasks can be run on a project. + +```bash +# List all targets for a project +nx show project my-app --json | jq '.targets | keys' + +# Get full target configuration +nx show project my-app --json | jq '.targets.build' + +# Check target executor/command +nx show project my-app --json | jq '.targets.build.executor' +nx show project my-app --json | jq '.targets.build.command' + +# View target options +nx show project my-app --json | jq '.targets.build.options' + +# Check target inputs/outputs (for caching) +nx show project my-app --json | jq '.targets.build.inputs' +nx show project my-app --json | jq '.targets.build.outputs' + +# Find projects with a specific target +nx show projects --withTarget serve +nx show projects --withTarget e2e +``` + +## Workspace Configuration + +Read `nx.json` directly for workspace-level configuration. +You can read the full project schema at `node_modules/nx/schemas/nx-schema.json` to understand nx project configuration options. + +```bash +# Read the full nx.json +cat nx.json + +# Or use jq for specific sections +cat nx.json | jq '.targetDefaults' +cat nx.json | jq '.namedInputs' +cat nx.json | jq '.plugins' +cat nx.json | jq '.generators' +``` + +Key nx.json sections: + +- `targetDefaults` - Default configuration applied to all targets of a given name +- `namedInputs` - Reusable input definitions for caching +- `plugins` - Nx plugins and their configuration +- ...and much more, read the schema or nx.json for details + +## Affected Projects + +If the user is asking about affected projects, read the [affected projects reference](references/AFFECTED.md) for detailed commands and examples. + +## Common Exploration Patterns + +### "What's in this workspace?" + +```bash +nx show projects +nx show projects --type app +nx show projects --type lib +``` + +### "How do I build/test/lint project X?" + +```bash +nx show project X --json | jq '.targets | keys' +nx show project X --json | jq '.targets.build' +``` + +### "What depends on library Y?" + +```bash +# Use the project graph to find dependents +nx graph --print | jq '.graph.dependencies | to_entries[] | select(.value[].target == "Y") | .key' +``` + +## Programmatic Answers + +When processing nx CLI results, use command-line tools to compute the answer programmatically rather than counting or parsing output manually. Always use `--json` flags to get structured output that can be processed with `jq`, `grep`, or other tools you have installed locally. + +### Listing Projects + +```bash +nx show projects --json +``` + +Example output: + +```json +["my-app", "my-app-e2e", "shared-ui", "shared-utils", "api"] +``` + +Common operations: + +```bash +# Count projects +nx show projects --json | jq 'length' + +# Filter by pattern +nx show projects --json | jq '.[] | select(startswith("shared-"))' + +# Get affected projects as array +nx show projects --affected --json | jq '.' +``` + +### Project Details + +```bash +nx show project my-app --json +``` + +Example output: + +```json +{ + "root": "apps/my-app", + "name": "my-app", + "sourceRoot": "apps/my-app/src", + "projectType": "application", + "tags": ["type:app", "scope:client"], + "targets": { + "build": { + "executor": "@nx/vite:build", + "options": { "outputPath": "dist/apps/my-app" } + }, + "serve": { + "executor": "@nx/vite:dev-server", + "options": { "buildTarget": "my-app:build" } + }, + "test": { + "executor": "@nx/vite:test", + "options": {} + } + }, + "implicitDependencies": [] +} +``` + +Common operations: + +```bash +# Get target names +nx show project my-app --json | jq '.targets | keys' + +# Get specific target config +nx show project my-app --json | jq '.targets.build' + +# Get tags +nx show project my-app --json | jq '.tags' + +# Get project root +nx show project my-app --json | jq -r '.root' +``` + +### Project Graph + +```bash +nx graph --print +``` + +Example output: + +```json +{ + "graph": { + "nodes": { + "my-app": { + "name": "my-app", + "type": "app", + "data": { "root": "apps/my-app", "tags": ["type:app"] } + }, + "shared-ui": { + "name": "shared-ui", + "type": "lib", + "data": { "root": "libs/shared-ui", "tags": ["type:ui"] } + } + }, + "dependencies": { + "my-app": [{ "source": "my-app", "target": "shared-ui", "type": "static" }], + "shared-ui": [] + } + } +} +``` + +Common operations: + +```bash +# Get all project names from graph +nx graph --print | jq '.graph.nodes | keys' + +# Find dependencies of a project +nx graph --print | jq '.graph.dependencies["my-app"]' + +# Find projects that depend on a library +nx graph --print | jq '.graph.dependencies | to_entries[] | select(.value[].target == "shared-ui") | .key' +``` + +## Troubleshooting + +### "Cannot find configuration for task X:target" + +```bash +# Check what targets exist on the project +nx show project X --json | jq '.targets | keys' + +# Check if any projects have that target +nx show projects --withTarget target +``` + +### "The workspace is out of sync" + +```bash +nx sync +nx reset # if sync doesn't fix stale cache +``` diff --git a/.github/skills/nx-workspace/references/AFFECTED.md b/.github/skills/nx-workspace/references/AFFECTED.md new file mode 100644 index 00000000000000..e30f18f6a446b9 --- /dev/null +++ b/.github/skills/nx-workspace/references/AFFECTED.md @@ -0,0 +1,27 @@ +## Affected Projects + +Find projects affected by changes in the current branch. + +```bash +# Affected since base branch (auto-detected) +nx show projects --affected + +# Affected with explicit base +nx show projects --affected --base=main +nx show projects --affected --base=origin/main + +# Affected between two commits +nx show projects --affected --base=abc123 --head=def456 + +# Affected apps only +nx show projects --affected --type app + +# Affected excluding e2e projects +nx show projects --affected --exclude="*-e2e" + +# Affected by uncommitted changes +nx show projects --affected --uncommitted + +# Affected by untracked files +nx show projects --affected --untracked +``` diff --git a/.vscode/settings.json b/.vscode/settings.json index 41454c24a61a1a..3dca2a53a0b2f9 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -78,5 +78,9 @@ "cSpell.words": ["beachball", "borderless", "fluentui", "griffel", "spinbutton", "tabster"], "nxConsole.generateAiAgentRules": true, // Maximum number of requests for the chat agent - Prevents AI agents from stopping mid-session - "chat.agent.maxRequests": 999 + "chat.agent.maxRequests": 999, + // Keep a much larger terminal history so AI terminal queries can access more past output. + "terminal.integrated.scrollback": 200000, + // Preserve substantial scrollback when terminals are reloaded/revived. + "terminal.integrated.persistentSessionScrollback": 50000 } diff --git a/AGENTS.md b/AGENTS.md index 91e8232c569e30..1bd62dcf741aaa 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -3,11 +3,21 @@ # General Guidelines for working with Nx +- For navigating/exploring the workspace, invoke the `nx-workspace` skill first - it has patterns for querying projects, targets, and dependencies - When running tasks (for example build, lint, test, e2e, etc.), always prefer running the task through `nx` (i.e. `nx run`, `nx run-many`, `nx affected`) instead of using the underlying tooling directly +- Prefix nx commands with the workspace's package manager (e.g., `pnpm nx build`, `npm exec nx test`) - avoids using globally installed CLI - You have access to the Nx MCP server and its tools, use them to help the user -- When answering questions about the repository, use the `nx_workspace` tool first to gain an understanding of the workspace architecture where applicable. -- When working in individual projects, use the `nx_project_details` mcp tool to analyze and understand the specific project structure and dependencies -- For questions around nx configuration, best practices or if you're unsure, use the `nx_docs` tool to get relevant, up-to-date docs. Always use this instead of assuming things about nx configuration -- If the user needs help with an Nx configuration or project graph error, use the `nx_workspace` tool to get any errors +- For Nx plugin best practices, check `node_modules/@nx//PLUGIN.md`. Not all plugins have this file - proceed without it if unavailable. +- NEVER guess CLI flags - always check nx_docs or `--help` first when unsure + +## Scaffolding & Generators + +- For scaffolding tasks (creating apps, libs, project structure, setup), ALWAYS invoke the `nx-generate` skill FIRST before exploring or calling MCP tools + +## When to use nx_docs + +- USE for: advanced config options, unfamiliar flags, migration guides, plugin configuration, edge cases +- DON'T USE for: basic generator syntax (`nx g @nx/react:app`), standard commands, things you already know +- The `nx-generate` skill handles generator discovery internally - don't call nx_docs just to look up generator syntax diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 00000000000000..1bd62dcf741aaa --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,23 @@ + + + +# General Guidelines for working with Nx + +- For navigating/exploring the workspace, invoke the `nx-workspace` skill first - it has patterns for querying projects, targets, and dependencies +- When running tasks (for example build, lint, test, e2e, etc.), always prefer running the task through `nx` (i.e. `nx run`, `nx run-many`, `nx affected`) instead of using the underlying tooling directly +- Prefix nx commands with the workspace's package manager (e.g., `pnpm nx build`, `npm exec nx test`) - avoids using globally installed CLI +- You have access to the Nx MCP server and its tools, use them to help the user +- For Nx plugin best practices, check `node_modules/@nx//PLUGIN.md`. Not all plugins have this file - proceed without it if unavailable. +- NEVER guess CLI flags - always check nx_docs or `--help` first when unsure + +## Scaffolding & Generators + +- For scaffolding tasks (creating apps, libs, project structure, setup), ALWAYS invoke the `nx-generate` skill FIRST before exploring or calling MCP tools + +## When to use nx_docs + +- USE for: advanced config options, unfamiliar flags, migration guides, plugin configuration, edge cases +- DON'T USE for: basic generator syntax (`nx g @nx/react:app`), standard commands, things you already know +- The `nx-generate` skill handles generator discovery internally - don't call nx_docs just to look up generator syntax + + diff --git a/apps/public-docsite-v9/.storybook/main.js b/apps/public-docsite-v9/.storybook/main.js index 1482b1839ec516..7ae03cc73092b9 100644 --- a/apps/public-docsite-v9/.storybook/main.js +++ b/apps/public-docsite-v9/.storybook/main.js @@ -30,6 +30,8 @@ module.exports = /** @type {Omit undefined, +}; From cbfc4a1e694f56bbc0ca2e79b57d18092b1e63db Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Thu, 26 Feb 2026 08:02:13 -0800 Subject: [PATCH 078/120] feat: optimize file type icon mapping by introducing FileIconTypeToIconNameMap --- .../library/src/utils/FileTypeIconMap.ts | 15 +++++++++++++ .../library/src/utils/getFileTypeIconProps.ts | 21 ++----------------- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/packages/react-components/react-file-type-icons/library/src/utils/FileTypeIconMap.ts b/packages/react-components/react-file-type-icons/library/src/utils/FileTypeIconMap.ts index 4f39e24ab25af3..89977793366d51 100644 --- a/packages/react-components/react-file-type-icons/library/src/utils/FileTypeIconMap.ts +++ b/packages/react-components/react-file-type-icons/library/src/utils/FileTypeIconMap.ts @@ -631,3 +631,18 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[]; types?: extensions: ['zip'], }, }; + +export const FileIconTypeToIconNameMap: { [key: number]: string } = Object.keys(FileTypeIconMap).reduce( + (accumulator, iconName) => { + const types = FileTypeIconMap[iconName].types; + + if (types) { + for (let i = 0; i < types.length; i++) { + accumulator[types[i]] = iconName; + } + } + + return accumulator; + }, + {} as { [key: number]: string }, +); diff --git a/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconProps.ts b/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconProps.ts index 4e5545ff7839a7..83ce4e670cb9e0 100644 --- a/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconProps.ts +++ b/packages/react-components/react-file-type-icons/library/src/utils/getFileTypeIconProps.ts @@ -1,9 +1,8 @@ -import { FileTypeIconMap } from './FileTypeIconMap'; +import { FileTypeIconMap, FileIconTypeToIconNameMap } from './FileTypeIconMap'; import { FileIconType } from './FileIconType'; import { ICON_SIZES } from './initializeFileTypeIcons'; let _extensionToIconName: { [key: string]: string }; -let _typeToIconName: { [key: number]: string }; const GENERIC_FILE = 'genericfile'; @@ -129,23 +128,7 @@ export function getFileTypeIconNameFromExtensionOrType( extension = (lastDotIndex >= 0 ? extension.substring(lastDotIndex + 1) : extension).toLowerCase(); return _extensionToIconName[extension] || GENERIC_FILE; } else if (type) { - if (!_typeToIconName) { - _typeToIconName = {}; - - for (const iconName in FileTypeIconMap) { - if (FileTypeIconMap.hasOwnProperty(iconName)) { - const types = FileTypeIconMap[iconName].types; - - if (types) { - for (let i = 0; i < types.length; i++) { - _typeToIconName[types[i]] = iconName; - } - } - } - } - } - - return _typeToIconName[type] || GENERIC_FILE; + return FileIconTypeToIconNameMap[type] || GENERIC_FILE; } return GENERIC_FILE; From 6adc0999a3c39c7ff117c53b69c668d91bde9341 Mon Sep 17 00:00:00 2001 From: "Carlos Perez (M365)" Date: Mon, 2 Mar 2026 16:04:24 -0800 Subject: [PATCH 079/120] in progress of creating v9-in-v8 version of file type icons package --- .vscode/tasks.json | 7 + .../src/FileTypeIconMap.ts | 93 +- .../FileTypeIcon/FileTypeIcon.test.tsx | 10 +- .../src/getFileTypeIconProps.test.ts | 32 +- .../src/getFileTypeIconProps.ts | 113 +- .../stories/.storybook/main.js | 2 +- .../FileTypeIconByFileIconType.stories.tsx | 17 + .../FileTypeIconCustomBaseUrl.stories.tsx | 15 + .../FileTypeIconDefault.stories.tsx | 14 + .../FileTypeIcon/FileTypeIconDescription.md | 8 + .../FileTypeIconSizeAndFormats.stories.tsx | 17 + .../FileTypeIconV8UtilityInterop.stories.tsx | 21 + .../src/FileTypeIcon/index.stories.tsx | 17 - .../161.a6cd7028.iframe.bundle.js | 1 + .../357.8566a2e3.iframe.bundle.js | 1 + .../482.5cb5d63e.iframe.bundle.js | 1 + .../533.1174a7ce.iframe.bundle.js | 523 + .../533.1174a7ce.iframe.bundle.js.LICENSE.txt | 54 + .../533.1174a7ce.iframe.bundle.js.map | 1 + .../609.52b8fa14.iframe.bundle.js | 2 + .../609.52b8fa14.iframe.bundle.js.LICENSE.txt | 11 + .../646.9ae4dc57.iframe.bundle.js | 1 + .../648.7f25f7a8.iframe.bundle.js | 1 + .../735.893e5237.iframe.bundle.js | 2 + .../735.893e5237.iframe.bundle.js.LICENSE.txt | 9 + storybook-static/77.d801e673.iframe.bundle.js | 1 + ...IconType-stories.a4cc681c.iframe.bundle.js | 1 + ...mBaseUrl-stories.51ed96d7.iframe.bundle.js | 1 + ...nDefault-stories.7040649c.iframe.bundle.js | 1 + ...dFormats-stories.e59abee8.iframe.bundle.js | 1 + ...yInterop-stories.2356a2b0.iframe.bundle.js | 1 + storybook-static/favicon-wrapper.svg | 46 + storybook-static/favicon.svg | 1 + storybook-static/iframe.html | 1342 + storybook-static/index.html | 127 + storybook-static/index.json | 64 + .../main.4318ed50.iframe.bundle.js | 49 + .../main.4318ed50.iframe.bundle.js.map | 1 + storybook-static/mocker-runtime-injected.js | 2 + .../mocker-runtime-injected.js.LICENSE.txt | 46 + .../nunito-sans-bold-italic.woff2 | Bin 0 -> 49460 bytes storybook-static/nunito-sans-bold.woff2 | Bin 0 -> 47144 bytes storybook-static/nunito-sans-italic.woff2 | Bin 0 -> 49620 bytes storybook-static/nunito-sans-regular.woff2 | Bin 0 -> 47072 bytes storybook-static/project.json | 66 + .../runtime~main.886cff8c.iframe.bundle.js | 1 + .../sb-addons/a11y-1/manager-bundle.js | 5 + .../sb-addons/docs-2/manager-bundle.js | 151 + .../sb-addons/links-3/manager-bundle.js | 3 + .../manager-bundle.js | 3 + .../common-manager-bundle.js | 971 + .../sb-common-assets/favicon-wrapper.svg | 46 + storybook-static/sb-common-assets/favicon.svg | 1 + .../nunito-sans-bold-italic.woff2 | Bin 0 -> 49460 bytes .../sb-common-assets/nunito-sans-bold.woff2 | Bin 0 -> 47144 bytes .../sb-common-assets/nunito-sans-italic.woff2 | Bin 0 -> 49620 bytes .../nunito-sans-regular.woff2 | Bin 0 -> 47072 bytes .../sb-manager/globals-module-info.js | 799 + .../sb-manager/globals-runtime.js | 69791 ++++++++++++++++ storybook-static/sb-manager/globals.js | 34 + storybook-static/sb-manager/runtime.js | 13198 +++ storybook-static/sb-preview/globals.js | 25 + storybook-static/sb-preview/runtime.js | 43284 ++++++++++ 63 files changed, 130896 insertions(+), 139 deletions(-) create mode 100644 packages/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconByFileIconType.stories.tsx create mode 100644 packages/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconCustomBaseUrl.stories.tsx create mode 100644 packages/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconSizeAndFormats.stories.tsx create mode 100644 packages/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconV8UtilityInterop.stories.tsx delete mode 100644 packages/react-file-type-icons/stories/src/FileTypeIcon/index.stories.tsx create mode 100644 storybook-static/161.a6cd7028.iframe.bundle.js create mode 100644 storybook-static/357.8566a2e3.iframe.bundle.js create mode 100644 storybook-static/482.5cb5d63e.iframe.bundle.js create mode 100644 storybook-static/533.1174a7ce.iframe.bundle.js create mode 100644 storybook-static/533.1174a7ce.iframe.bundle.js.LICENSE.txt create mode 100644 storybook-static/533.1174a7ce.iframe.bundle.js.map create mode 100644 storybook-static/609.52b8fa14.iframe.bundle.js create mode 100644 storybook-static/609.52b8fa14.iframe.bundle.js.LICENSE.txt create mode 100644 storybook-static/646.9ae4dc57.iframe.bundle.js create mode 100644 storybook-static/648.7f25f7a8.iframe.bundle.js create mode 100644 storybook-static/735.893e5237.iframe.bundle.js create mode 100644 storybook-static/735.893e5237.iframe.bundle.js.LICENSE.txt create mode 100644 storybook-static/77.d801e673.iframe.bundle.js create mode 100644 storybook-static/FileTypeIcon-FileTypeIconByFileIconType-stories.a4cc681c.iframe.bundle.js create mode 100644 storybook-static/FileTypeIcon-FileTypeIconCustomBaseUrl-stories.51ed96d7.iframe.bundle.js create mode 100644 storybook-static/FileTypeIcon-FileTypeIconDefault-stories.7040649c.iframe.bundle.js create mode 100644 storybook-static/FileTypeIcon-FileTypeIconSizeAndFormats-stories.e59abee8.iframe.bundle.js create mode 100644 storybook-static/FileTypeIcon-FileTypeIconV8UtilityInterop-stories.2356a2b0.iframe.bundle.js create mode 100644 storybook-static/favicon-wrapper.svg create mode 100644 storybook-static/favicon.svg create mode 100644 storybook-static/iframe.html create mode 100644 storybook-static/index.html create mode 100644 storybook-static/index.json create mode 100644 storybook-static/main.4318ed50.iframe.bundle.js create mode 100644 storybook-static/main.4318ed50.iframe.bundle.js.map create mode 100644 storybook-static/mocker-runtime-injected.js create mode 100644 storybook-static/mocker-runtime-injected.js.LICENSE.txt create mode 100644 storybook-static/nunito-sans-bold-italic.woff2 create mode 100644 storybook-static/nunito-sans-bold.woff2 create mode 100644 storybook-static/nunito-sans-italic.woff2 create mode 100644 storybook-static/nunito-sans-regular.woff2 create mode 100644 storybook-static/project.json create mode 100644 storybook-static/runtime~main.886cff8c.iframe.bundle.js create mode 100644 storybook-static/sb-addons/a11y-1/manager-bundle.js create mode 100644 storybook-static/sb-addons/docs-2/manager-bundle.js create mode 100644 storybook-static/sb-addons/links-3/manager-bundle.js create mode 100644 storybook-static/sb-addons/packages-react-components-react-src-preset-4/manager-bundle.js create mode 100644 storybook-static/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js create mode 100644 storybook-static/sb-common-assets/favicon-wrapper.svg create mode 100644 storybook-static/sb-common-assets/favicon.svg create mode 100644 storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 create mode 100644 storybook-static/sb-common-assets/nunito-sans-bold.woff2 create mode 100644 storybook-static/sb-common-assets/nunito-sans-italic.woff2 create mode 100644 storybook-static/sb-common-assets/nunito-sans-regular.woff2 create mode 100644 storybook-static/sb-manager/globals-module-info.js create mode 100644 storybook-static/sb-manager/globals-runtime.js create mode 100644 storybook-static/sb-manager/globals.js create mode 100644 storybook-static/sb-manager/runtime.js create mode 100644 storybook-static/sb-preview/globals.js create mode 100644 storybook-static/sb-preview/runtime.js diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 11cf761383769a..8692f680478056 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -64,6 +64,13 @@ "6011" ], "isBackground": true + }, + { + "label": "Build react-file-type-icons", + "type": "shell", + "command": "yarn", + "args": ["nx", "run", "react-file-type-icons:build", "--outputStyle=stream", "--skip-nx-cache"], + "isBackground": false } ] } diff --git a/packages/react-file-type-icons/src/FileTypeIconMap.ts b/packages/react-file-type-icons/src/FileTypeIconMap.ts index e95fbe5c5db58f..92b17fac69216e 100644 --- a/packages/react-file-type-icons/src/FileTypeIconMap.ts +++ b/packages/react-file-type-icons/src/FileTypeIconMap.ts @@ -1,9 +1,11 @@ +import { FileIconType } from './FileIconType'; + /** * Enumeration of icon file names, and what extensions they map to. * Please keep items alphabetical. Items without extensions may require specific logic in the code to map. * Always use getFileTypeIconProps to get the most up-to-date icon at the right pixel density. */ -export const FileTypeIconMap: { [key: string]: { extensions?: string[] } } = { +export const FileTypeIconMap: { [key: string]: { extensions?: string[]; types?: FileIconType[] } } = { accdb: { extensions: ['accdb', 'mdb'], }, @@ -13,7 +15,9 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[] } } = { archive: { extensions: ['7z', 'ace', 'arc', 'arj', 'dmg', 'gz', 'iso', 'lzh', 'pkg', 'rar', 'sit', 'tgz', 'tar', 'z'], }, - album: {}, + album: { + types: [FileIconType.album], + }, audio: { extensions: [ 'aif', @@ -270,9 +274,15 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[] } } = { designer: { extensions: ['design'], }, - desktopfolder: {}, - docset: {}, - documentsfolder: {}, + desktopfolder: { + types: [FileIconType.desktopFolder], + }, + docset: { + types: [FileIconType.docset], + }, + documentsfolder: { + types: [FileIconType.documentsFolder], + }, docx: { extensions: ['doc', 'docm', 'docx', 'docb'], }, @@ -286,12 +296,18 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[] } } = { extensions: ['application', 'appref-ms', 'apk', 'app', 'appx', 'exe', 'ipa', 'msi', 'xap'], }, favoritesfolder: {}, - folder: {}, + folder: { + types: [FileIconType.folder], + }, font: { extensions: ['ttf', 'otf', 'woff'], }, - form: {}, - genericfile: {}, + form: { + types: [FileIconType.form], + }, + genericfile: { + types: [FileIconType.genericFile], + }, html: { extensions: ['htm', 'html', 'mht', 'mhtml'], }, @@ -301,17 +317,27 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[] } } = { link: { extensions: ['lnk', 'link', 'url', 'website', 'webloc'], }, - linkedfolder: {}, - listform: {}, - listitem: {}, + linkedfolder: { + types: [FileIconType.linkedFolder], + }, + listform: { + types: [FileIconType.listForm], + }, + listitem: { + types: [FileIconType.listItem], + }, loop: { extensions: ['fluid', 'loop', 'note'], }, - loopworkspace: {}, + loopworkspace: { + types: [FileIconType.loopworkspace], + }, officescript: { extensions: ['osts'], }, - splist: {}, + splist: { + types: [FileIconType.list], + }, mcworld: { extensions: ['mcworld'], }, @@ -354,7 +380,9 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[] } } = { mpt: { extensions: ['mpt'], }, - multiple: {}, + multiple: { + types: [FileIconType.multiple], + }, one: { // This is a partial OneNote page or section export. Not whole notebooks, see "onetoc" extensions: ['one', 'onepart'], @@ -414,9 +442,15 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[] } } = { ], }, photo360: {}, - picturesfolder: {}, - planner: {}, - portfolio: {}, + picturesfolder: { + types: [FileIconType.picturesFolder], + }, + planner: { + types: [FileIconType.planner], + }, + portfolio: { + types: [FileIconType.portfolio], + }, potx: { extensions: ['pot', 'potm', 'potx'], }, @@ -438,17 +472,27 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[] } } = { spo: { extensions: ['aspx'], }, - spocampaign: {}, - sponews: {}, + spocampaign: { + types: [FileIconType.campaign], + }, + sponews: { + types: [FileIconType.news], + }, spreadsheet: { extensions: ['odc', 'ods', 'gsheet', 'numbers', 'tsv'], }, rtf: { extensions: ['epub', 'gdoc', 'odt', 'md', 'markdn', 'markdown', 'mdown', 'mkdn', 'rtf', 'wri', 'pages'], }, - sharedfolder: {}, - playlist: {}, - sway: {}, + sharedfolder: { + types: [FileIconType.sharedFolder], + }, + playlist: { + types: [FileIconType.playlist], + }, + sway: { + types: [FileIconType.sway], + }, sysfile: { extensions: [ 'bak', @@ -482,7 +526,9 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[] } } = { 'xll', ], }, - todoitem: {}, + todoitem: { + types: [FileIconType.todoItem], + }, txt: { extensions: ['dif', 'diff', 'readme', 'out', 'plist', 'properties', 'text', 'txt'], }, @@ -515,6 +561,7 @@ export const FileTypeIconMap: { [key: string]: { extensions?: string[] } } = { ], }, video: { + types: [FileIconType.stream], extensions: [ '3g2', '3gp', diff --git a/packages/react-file-type-icons/src/components/FileTypeIcon/FileTypeIcon.test.tsx b/packages/react-file-type-icons/src/components/FileTypeIcon/FileTypeIcon.test.tsx index 9b474028261c8d..6eec398fdb99e2 100644 --- a/packages/react-file-type-icons/src/components/FileTypeIcon/FileTypeIcon.test.tsx +++ b/packages/react-file-type-icons/src/components/FileTypeIcon/FileTypeIcon.test.tsx @@ -21,7 +21,7 @@ describe('FileTypeIcon', () => { it('applies the component static class name', () => { const { getByRole } = render(); - expect(getByRole('img').className.includes(fileTypeIconClassNames.root)).toBe(true); + expect(getByRole('img').className.indexOf(fileTypeIconClassNames.root) >= 0).toBe(true); }); it('uses shared resolver output for icon name and URL', () => { @@ -60,9 +60,15 @@ describe('FileTypeIcon', () => { expect(getByRole('img').getAttribute('src')).toBe(expectedUrl); }); + it('supports v9-style invocation for non-extension campaign type mapping', () => { + const { getByRole } = render(); + expect(getByRole('img').getAttribute('data-icon-name')).toContain('spocampaign24_svg'); + }); + it('falls back to genericfile icon for unknown extension', () => { const { getByRole } = render(); - expect(getByRole('img').getAttribute('data-icon-name')?.startsWith('genericfile')).toBe(true); + const iconName = getByRole('img').getAttribute('data-icon-name') || ''; + expect(iconName.slice(0, 'genericfile'.length)).toBe('genericfile'); }); it('forwards refs to the root img element', () => { diff --git a/packages/react-file-type-icons/src/getFileTypeIconProps.test.ts b/packages/react-file-type-icons/src/getFileTypeIconProps.test.ts index c7dccd4a441428..71dd738300bcea 100644 --- a/packages/react-file-type-icons/src/getFileTypeIconProps.test.ts +++ b/packages/react-file-type-icons/src/getFileTypeIconProps.test.ts @@ -1,9 +1,9 @@ import { FileIconType } from './FileIconType'; import { FileTypeIconMap } from './FileTypeIconMap'; -import { getFileTypeIconNameFromExtensionOrType } from './getFileTypeIconProps'; +import { getFileTypeIconNameFromExtensionOrType, getFileTypeIconProps } from './getFileTypeIconProps'; -describe('return valid icon name', () => { - it('returns an icon name in file type icon map', () => { +describe('getFileTypeIconNameFromExtensionOrType', () => { + it('returns an icon name in file type icon map for every FileIconType enum value', () => { for (const key of Object.keys(FileIconType)) { // Iterate through a TypeScript enum const value = FileIconType[key as unknown as FileIconType]; @@ -12,4 +12,30 @@ describe('return valid icon name', () => { } } }); + + it('supports extension-based mapping with case-insensitive input', () => { + expect(getFileTypeIconNameFromExtensionOrType('DOCX', undefined)).toBe('docx'); + expect(getFileTypeIconNameFromExtensionOrType('.pptx', undefined)).toBe('pptx'); + expect(getFileTypeIconNameFromExtensionOrType('unknown-extension', undefined)).toBe('genericfile'); + }); + + it('supports non-extension mappings from FileIconType declarations in FileTypeIconMap', () => { + expect(getFileTypeIconNameFromExtensionOrType(undefined, FileIconType.folder)).toBe('folder'); + expect(getFileTypeIconNameFromExtensionOrType(undefined, FileIconType.list)).toBe('splist'); + expect(getFileTypeIconNameFromExtensionOrType(undefined, FileIconType.stream)).toBe('video'); + expect(getFileTypeIconNameFromExtensionOrType(undefined, FileIconType.campaign)).toBe('spocampaign'); + }); +}); + +describe('getFileTypeIconProps (v8-style invocation)', () => { + it('returns a usable iconName object for legacy utility callers', () => { + const result = getFileTypeIconProps({ extension: 'docx', size: 16, imageFileType: 'svg' }); + expect(result.iconName).toBe('docx16_svg'); + expect(result['aria-label']).toBe('docx'); + }); + + it('resolves non-extension icon types for legacy utility callers', () => { + const result = getFileTypeIconProps({ type: FileIconType.folder, size: 20, imageFileType: 'png' }); + expect(result.iconName).toContain('folder20'); + }); }); diff --git a/packages/react-file-type-icons/src/getFileTypeIconProps.ts b/packages/react-file-type-icons/src/getFileTypeIconProps.ts index f53ecc96cdd598..1a1e7b3b0a6648 100644 --- a/packages/react-file-type-icons/src/getFileTypeIconProps.ts +++ b/packages/react-file-type-icons/src/getFileTypeIconProps.ts @@ -1,32 +1,10 @@ import { FileTypeIconMap } from './FileTypeIconMap'; -import { FileIconType } from './FileIconType'; -import type { FileIconTypeInput } from './FileIconType'; +import type { FileIconType, FileIconTypeInput } from './FileIconType'; let _extensionToIconName: { [key: string]: string }; +let _typeToIconName: { [key: number]: string }; const GENERIC_FILE = 'genericfile'; -const FOLDER = 'folder'; -const SHARED_FOLDER = 'sharedfolder'; -const DOCSET_FOLDER = 'docset'; -const LIST_ITEM = 'listitem'; -const LIST = 'splist'; -const MULTIPLE_ITEMS = 'multiple'; -const NEWS = 'sponews'; -const STREAM = 'video'; -const DESKTOP_FOLDER = 'desktopfolder'; -const DOCUMENTS_FOLDER = 'documentsfolder'; -const PICTURES_FOLDER = 'picturesfolder'; -const LINKED_FOLDER = 'linkedfolder'; -const FORM = 'form'; -const SWAY = 'sway'; -const PLAYLIST = 'playlist'; -const LOOP_WORKSPACE = 'loopworkspace'; -const TODOITEM = 'todoitem'; -const PLANNER = 'planner'; -const PORTFOLIO = 'portfolio'; -const ALBUM = 'album'; -const LIST_FORM = 'listform'; -const CAMPAIGN = 'spocampaign'; export const DEFAULT_ICON_SIZE: FileTypeIconSize = 16; export type FileTypeIconSize = 16 | 20 | 24 | 32 | 40 | 48 | 64 | 96; @@ -82,7 +60,6 @@ export function getFileTypeIconNameFromExtensionOrType( extension: string | undefined, type: FileIconType | undefined, ): string { - let iconBaseName: string | undefined; if (extension) { if (!_extensionToIconName) { _extensionToIconName = {}; @@ -104,76 +81,26 @@ export function getFileTypeIconNameFromExtensionOrType( extension = extension.replace('.', '').toLowerCase(); return _extensionToIconName[extension] || GENERIC_FILE; } else if (type) { - switch (type) { - case FileIconType.docset: - iconBaseName = DOCSET_FOLDER; - break; - case FileIconType.folder: - iconBaseName = FOLDER; - break; - case FileIconType.listItem: - iconBaseName = LIST_ITEM; - break; - case FileIconType.sharedFolder: - iconBaseName = SHARED_FOLDER; - break; - case FileIconType.stream: - iconBaseName = STREAM; - break; - case FileIconType.multiple: - iconBaseName = MULTIPLE_ITEMS; - break; - case FileIconType.news: - iconBaseName = NEWS; - break; - case FileIconType.desktopFolder: - iconBaseName = DESKTOP_FOLDER; - break; - case FileIconType.documentsFolder: - iconBaseName = DOCUMENTS_FOLDER; - break; - case FileIconType.picturesFolder: - iconBaseName = PICTURES_FOLDER; - break; - case FileIconType.linkedFolder: - iconBaseName = LINKED_FOLDER; - break; - case FileIconType.list: - iconBaseName = LIST; - break; - case FileIconType.form: - iconBaseName = FORM; - break; - case FileIconType.sway: - iconBaseName = SWAY; - break; - case FileIconType.playlist: - iconBaseName = PLAYLIST; - break; - case FileIconType.loopworkspace: - iconBaseName = LOOP_WORKSPACE; - break; - case FileIconType.planner: - iconBaseName = PLANNER; - break; - case FileIconType.todoItem: - iconBaseName = TODOITEM; - break; - case FileIconType.portfolio: - iconBaseName = PORTFOLIO; - break; - case FileIconType.album: - iconBaseName = ALBUM; - break; - case FileIconType.listForm: - iconBaseName = LIST_FORM; - break; - case FileIconType.campaign: - iconBaseName = CAMPAIGN; - break; + if (!_typeToIconName) { + _typeToIconName = {}; + + for (const iconName in FileTypeIconMap) { + if (FileTypeIconMap.hasOwnProperty(iconName)) { + const types = FileTypeIconMap[iconName].types; + + if (types) { + for (let i = 0; i < types.length; i++) { + _typeToIconName[types[i]] = iconName; + } + } + } + } } + + return _typeToIconName[type] || GENERIC_FILE; } - return iconBaseName || GENERIC_FILE; + + return GENERIC_FILE; } export function getFileTypeIconSuffix( diff --git a/packages/react-file-type-icons/stories/.storybook/main.js b/packages/react-file-type-icons/stories/.storybook/main.js index 793cda23a71099..fe343077be7c43 100644 --- a/packages/react-file-type-icons/stories/.storybook/main.js +++ b/packages/react-file-type-icons/stories/.storybook/main.js @@ -3,7 +3,7 @@ const path = require('path'); module.exports = { ...rootMain, - stories: [...rootMain.stories, '../src/**/*.mdx', '../src/**/index.stories.@(ts|tsx)'], + stories: [...rootMain.stories, '../src/**/*.mdx', '../src/**/*.stories.@(ts|tsx)'], addons: [...rootMain.addons], webpackFinal: (config, options) => { const localConfig = { ...rootMain.webpackFinal(config, options) }; diff --git a/packages/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconByFileIconType.stories.tsx b/packages/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconByFileIconType.stories.tsx new file mode 100644 index 00000000000000..22977280b5451e --- /dev/null +++ b/packages/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconByFileIconType.stories.tsx @@ -0,0 +1,17 @@ +import * as React from 'react'; +import type { Meta } from '@storybook/react'; +import { FileIconType, FileTypeIcon } from '@fluentui/react-file-type-icons'; + +export default { + title: 'Compat Components/FileTypeIcon', + component: FileTypeIcon, +} satisfies Meta; + +export const ByFileIconType = () => ( +
+ + + + +
+); diff --git a/packages/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconCustomBaseUrl.stories.tsx b/packages/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconCustomBaseUrl.stories.tsx new file mode 100644 index 00000000000000..635ab3bfb1aab9 --- /dev/null +++ b/packages/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconCustomBaseUrl.stories.tsx @@ -0,0 +1,15 @@ +import * as React from 'react'; +import type { Meta } from '@storybook/react'; +import { FileIconType, FileTypeIcon } from '@fluentui/react-file-type-icons'; + +export default { + title: 'Compat Components/FileTypeIcon', + component: FileTypeIcon, +} satisfies Meta; + +export const CustomBaseUrl = () => ( +
+ + +
+); diff --git a/packages/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx b/packages/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx index 81f8f2564b0a21..27cf25db099f0b 100644 --- a/packages/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx +++ b/packages/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconDefault.stories.tsx @@ -1,5 +1,19 @@ import * as React from 'react'; +import type { Meta } from '@storybook/react'; import { FileIconType, FileTypeIcon } from '@fluentui/react-file-type-icons'; +import descriptionMd from './FileTypeIconDescription.md'; + +export default { + title: 'Compat Components/FileTypeIcon', + component: FileTypeIcon, + parameters: { + docs: { + description: { + component: descriptionMd, + }, + }, + }, +} satisfies Meta; export const Default = () => (
diff --git a/packages/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconDescription.md b/packages/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconDescription.md index c7d2ca09de624a..8c8b37b8519ff6 100644 --- a/packages/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconDescription.md +++ b/packages/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconDescription.md @@ -1,3 +1,11 @@ # FileTypeIcon `FileTypeIcon` renders a file-type image by extension or file icon type using the same resolver logic as legacy utility APIs. + +Stories in this section cover: + +- v9-style component usage with `FileTypeIcon` +- file-type enum usage for non-extension icons +- size and image format variants +- custom base URL scenarios +- utility interop (`getFileTypeIconProps` and `getFileTypeIconAsUrl`) parity diff --git a/packages/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconSizeAndFormats.stories.tsx b/packages/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconSizeAndFormats.stories.tsx new file mode 100644 index 00000000000000..09b88c8a892fe8 --- /dev/null +++ b/packages/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconSizeAndFormats.stories.tsx @@ -0,0 +1,17 @@ +import * as React from 'react'; +import type { Meta } from '@storybook/react'; +import { FileTypeIcon } from '@fluentui/react-file-type-icons'; + +export default { + title: 'Compat Components/FileTypeIcon', + component: FileTypeIcon, +} satisfies Meta; + +export const SizeAndFormats = () => ( +
+ + + + +
+); diff --git a/packages/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconV8UtilityInterop.stories.tsx b/packages/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconV8UtilityInterop.stories.tsx new file mode 100644 index 00000000000000..792fd3e7ae5a3d --- /dev/null +++ b/packages/react-file-type-icons/stories/src/FileTypeIcon/FileTypeIconV8UtilityInterop.stories.tsx @@ -0,0 +1,21 @@ +import * as React from 'react'; +import type { Meta } from '@storybook/react'; +import { FileTypeIcon, getFileTypeIconAsUrl, getFileTypeIconProps } from '@fluentui/react-file-type-icons'; + +export default { + title: 'Compat Components/FileTypeIcon', + component: FileTypeIcon, +} satisfies Meta; + +export const V8UtilityInterop = () => { + const iconProps = getFileTypeIconProps({ extension: 'docx', size: 16, imageFileType: 'svg' }); + const iconUrl = getFileTypeIconAsUrl({ extension: 'docx', size: 16, imageFileType: 'svg' }); + + return ( +
+
Utility iconName: {iconProps.iconName}
+
Utility URL: {iconUrl}
+ +
+ ); +}; diff --git a/packages/react-file-type-icons/stories/src/FileTypeIcon/index.stories.tsx b/packages/react-file-type-icons/stories/src/FileTypeIcon/index.stories.tsx deleted file mode 100644 index bc1de1a55200d1..00000000000000 --- a/packages/react-file-type-icons/stories/src/FileTypeIcon/index.stories.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import { FileTypeIcon } from '@fluentui/react-file-type-icons'; - -import descriptionMd from './FileTypeIconDescription.md'; - -export { Default } from './FileTypeIconDefault.stories'; - -export default { - title: 'Compat Components/FileTypeIcon', - component: FileTypeIcon, - parameters: { - docs: { - description: { - component: descriptionMd, - }, - }, - }, -}; diff --git a/storybook-static/161.a6cd7028.iframe.bundle.js b/storybook-static/161.a6cd7028.iframe.bundle.js new file mode 100644 index 00000000000000..c7488874f6adc2 --- /dev/null +++ b/storybook-static/161.a6cd7028.iframe.bundle.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_fluentui_fluentui_repo=self.webpackChunk_fluentui_fluentui_repo||[]).push([[161],{"./node_modules/@storybook/addon-docs/dist/DocsRenderer-PQXLIZUC.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{DocsRenderer:()=>DocsRenderer});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_storybook_react_dom_shim__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@storybook/react-dom-shim/dist/react-18.mjs"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.mjs"),defaultComponents={code:_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_1__.XA,a:_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_1__.zE,..._storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_1__.Sw},ErrorBoundary=class extends react__WEBPACK_IMPORTED_MODULE_0__.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(err){let{showException}=this.props;showException(err)}render(){let{hasError}=this.state,{children}=this.props;return hasError?null:react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,children)}},DocsRenderer=class{constructor(){this.render=async(context,docsParameter,element)=>{let components={...defaultComponents,...docsParameter?.components},TDocs=_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_1__.kQ;return new Promise(((resolve,reject)=>{__webpack_require__.e(648).then(__webpack_require__.bind(__webpack_require__,"./node_modules/@mdx-js/react/index.js")).then((({MDXProvider})=>(0,_storybook_react_dom_shim__WEBPACK_IMPORTED_MODULE_2__.renderElement)(react__WEBPACK_IMPORTED_MODULE_0__.createElement(ErrorBoundary,{showException:reject,key:Math.random()},react__WEBPACK_IMPORTED_MODULE_0__.createElement(MDXProvider,{components},react__WEBPACK_IMPORTED_MODULE_0__.createElement(TDocs,{context,docsParameter}))),element))).then((()=>resolve()))}))},this.unmount=element=>{(0,_storybook_react_dom_shim__WEBPACK_IMPORTED_MODULE_2__.unmountElement)(element)}}}}}]); \ No newline at end of file diff --git a/storybook-static/357.8566a2e3.iframe.bundle.js b/storybook-static/357.8566a2e3.iframe.bundle.js new file mode 100644 index 00000000000000..c2b9b331078599 --- /dev/null +++ b/storybook-static/357.8566a2e3.iframe.bundle.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_fluentui_fluentui_repo=self.webpackChunk_fluentui_fluentui_repo||[]).push([[357],{"./node_modules/@storybook/addon-docs/dist/Color-AVL7NMMY.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{ColorControl:()=>ColorControl,default:()=>Color_default});var _chunk_SPFYY5GD_mjs__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/@storybook/addon-docs/dist/chunk-SPFYY5GD.mjs"),_chunk_QUZPS4B6_mjs__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@storybook/addon-docs/dist/chunk-QUZPS4B6.mjs"),react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/index.js"),storybook_internal_components__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/storybook/dist/components/index.js"),_storybook_icons__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@storybook/addon-docs/node_modules/@storybook/icons/dist/index.mjs"),storybook_theming__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/storybook/dist/theming/index.js"),require_color_name=(0,_chunk_QUZPS4B6_mjs__WEBPACK_IMPORTED_MODULE_0__.P$)({"../../node_modules/color-name/index.js"(exports,module){module.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}}}),require_conversions=(0,_chunk_QUZPS4B6_mjs__WEBPACK_IMPORTED_MODULE_0__.P$)({"../../node_modules/color-convert/conversions.js"(exports,module){var cssKeywords=require_color_name(),reverseKeywords={};for(let key of Object.keys(cssKeywords))reverseKeywords[cssKeywords[key]]=key;var convert2={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};module.exports=convert2;for(let model of Object.keys(convert2)){if(!("channels"in convert2[model]))throw new Error("missing channels property: "+model);if(!("labels"in convert2[model]))throw new Error("missing channel labels property: "+model);if(convert2[model].labels.length!==convert2[model].channels)throw new Error("channel and label counts mismatch: "+model);let{channels,labels}=convert2[model];delete convert2[model].channels,delete convert2[model].labels,Object.defineProperty(convert2[model],"channels",{value:channels}),Object.defineProperty(convert2[model],"labels",{value:labels})}convert2.rgb.hsl=function(rgb){let h2,s2,r2=rgb[0]/255,g2=rgb[1]/255,b2=rgb[2]/255,min=Math.min(r2,g2,b2),max=Math.max(r2,g2,b2),delta=max-min;max===min?h2=0:r2===max?h2=(g2-b2)/delta:g2===max?h2=2+(b2-r2)/delta:b2===max&&(h2=4+(r2-g2)/delta),h2=Math.min(60*h2,360),h2<0&&(h2+=360);let l2=(min+max)/2;return s2=max===min?0:l2<=.5?delta/(max+min):delta/(2-max-min),[h2,100*s2,100*l2]},convert2.rgb.hsv=function(rgb){let rdif,gdif,bdif,h2,s2,r2=rgb[0]/255,g2=rgb[1]/255,b2=rgb[2]/255,v2=Math.max(r2,g2,b2),diff=v2-Math.min(r2,g2,b2),diffc=function(c2){return(v2-c2)/6/diff+.5};return 0===diff?(h2=0,s2=0):(s2=diff/v2,rdif=diffc(r2),gdif=diffc(g2),bdif=diffc(b2),r2===v2?h2=bdif-gdif:g2===v2?h2=1/3+rdif-bdif:b2===v2&&(h2=2/3+gdif-rdif),h2<0?h2+=1:h2>1&&(h2-=1)),[360*h2,100*s2,100*v2]},convert2.rgb.hwb=function(rgb){let r2=rgb[0],g2=rgb[1],b2=rgb[2],h2=convert2.rgb.hsl(rgb)[0],w2=1/255*Math.min(r2,Math.min(g2,b2));return b2=1-1/255*Math.max(r2,Math.max(g2,b2)),[h2,100*w2,100*b2]},convert2.rgb.cmyk=function(rgb){let r2=rgb[0]/255,g2=rgb[1]/255,b2=rgb[2]/255,k2=Math.min(1-r2,1-g2,1-b2);return[100*((1-r2-k2)/(1-k2)||0),100*((1-g2-k2)/(1-k2)||0),100*((1-b2-k2)/(1-k2)||0),100*k2]},convert2.rgb.keyword=function(rgb){let reversed=reverseKeywords[rgb];if(reversed)return reversed;let currentClosestKeyword,currentClosestDistance=1/0;for(let keyword of Object.keys(cssKeywords)){let value=cssKeywords[keyword],distance=(y2=value,((x2=rgb)[0]-y2[0])**2+(x2[1]-y2[1])**2+(x2[2]-y2[2])**2);distance.04045?((r2+.055)/1.055)**2.4:r2/12.92,g2=g2>.04045?((g2+.055)/1.055)**2.4:g2/12.92,b2=b2>.04045?((b2+.055)/1.055)**2.4:b2/12.92,[100*(.4124*r2+.3576*g2+.1805*b2),100*(.2126*r2+.7152*g2+.0722*b2),100*(.0193*r2+.1192*g2+.9505*b2)]},convert2.rgb.lab=function(rgb){let xyz=convert2.rgb.xyz(rgb),x2=xyz[0],y2=xyz[1],z2=xyz[2];return x2/=95.047,y2/=100,z2/=108.883,x2=x2>.008856?x2**(1/3):7.787*x2+16/116,y2=y2>.008856?y2**(1/3):7.787*y2+16/116,z2=z2>.008856?z2**(1/3):7.787*z2+16/116,[116*y2-16,500*(x2-y2),200*(y2-z2)]},convert2.hsl.rgb=function(hsl){let t2,t3,val,h2=hsl[0]/360,s2=hsl[1]/100,l2=hsl[2]/100;if(0===s2)return val=255*l2,[val,val,val];t2=l2<.5?l2*(1+s2):l2+s2-l2*s2;let t1=2*l2-t2,rgb=[0,0,0];for(let i2=0;i2<3;i2++)t3=h2+1/3*-(i2-1),t3<0&&t3++,t3>1&&t3--,val=6*t3<1?t1+6*(t2-t1)*t3:2*t3<1?t2:3*t3<2?t1+(t2-t1)*(2/3-t3)*6:t1,rgb[i2]=255*val;return rgb},convert2.hsl.hsv=function(hsl){let h2=hsl[0],s2=hsl[1]/100,l2=hsl[2]/100,smin=s2,lmin=Math.max(l2,.01);return l2*=2,s2*=l2<=1?l2:2-l2,smin*=lmin<=1?lmin:2-lmin,[h2,100*(0===l2?2*smin/(lmin+smin):2*s2/(l2+s2)),100*((l2+s2)/2)]},convert2.hsv.rgb=function(hsv){let h2=hsv[0]/60,s2=hsv[1]/100,v2=hsv[2]/100,hi=Math.floor(h2)%6,f2=h2-Math.floor(h2),p2=255*v2*(1-s2),q2=255*v2*(1-s2*f2),t2=255*v2*(1-s2*(1-f2));switch(v2*=255,hi){case 0:return[v2,t2,p2];case 1:return[q2,v2,p2];case 2:return[p2,v2,t2];case 3:return[p2,q2,v2];case 4:return[t2,p2,v2];case 5:return[v2,p2,q2]}},convert2.hsv.hsl=function(hsv){let sl,l2,h2=hsv[0],s2=hsv[1]/100,v2=hsv[2]/100,vmin=Math.max(v2,.01);l2=(2-s2)*v2;let lmin=(2-s2)*vmin;return sl=s2*vmin,sl/=lmin<=1?lmin:2-lmin,sl=sl||0,l2/=2,[h2,100*sl,100*l2]},convert2.hwb.rgb=function(hwb){let f2,h2=hwb[0]/360,wh=hwb[1]/100,bl=hwb[2]/100,ratio=wh+bl;ratio>1&&(wh/=ratio,bl/=ratio);let i2=Math.floor(6*h2),v2=1-bl;f2=6*h2-i2,1&i2&&(f2=1-f2);let r2,g2,b2,n2=wh+f2*(v2-wh);switch(i2){default:case 6:case 0:r2=v2,g2=n2,b2=wh;break;case 1:r2=n2,g2=v2,b2=wh;break;case 2:r2=wh,g2=v2,b2=n2;break;case 3:r2=wh,g2=n2,b2=v2;break;case 4:r2=n2,g2=wh,b2=v2;break;case 5:r2=v2,g2=wh,b2=n2}return[255*r2,255*g2,255*b2]},convert2.cmyk.rgb=function(cmyk){let c2=cmyk[0]/100,m2=cmyk[1]/100,y2=cmyk[2]/100,k2=cmyk[3]/100;return[255*(1-Math.min(1,c2*(1-k2)+k2)),255*(1-Math.min(1,m2*(1-k2)+k2)),255*(1-Math.min(1,y2*(1-k2)+k2))]},convert2.xyz.rgb=function(xyz){let r2,g2,b2,x2=xyz[0]/100,y2=xyz[1]/100,z2=xyz[2]/100;return r2=3.2406*x2+-1.5372*y2+-.4986*z2,g2=-.9689*x2+1.8758*y2+.0415*z2,b2=.0557*x2+-.204*y2+1.057*z2,r2=r2>.0031308?1.055*r2**(1/2.4)-.055:12.92*r2,g2=g2>.0031308?1.055*g2**(1/2.4)-.055:12.92*g2,b2=b2>.0031308?1.055*b2**(1/2.4)-.055:12.92*b2,r2=Math.min(Math.max(0,r2),1),g2=Math.min(Math.max(0,g2),1),b2=Math.min(Math.max(0,b2),1),[255*r2,255*g2,255*b2]},convert2.xyz.lab=function(xyz){let x2=xyz[0],y2=xyz[1],z2=xyz[2];return x2/=95.047,y2/=100,z2/=108.883,x2=x2>.008856?x2**(1/3):7.787*x2+16/116,y2=y2>.008856?y2**(1/3):7.787*y2+16/116,z2=z2>.008856?z2**(1/3):7.787*z2+16/116,[116*y2-16,500*(x2-y2),200*(y2-z2)]},convert2.lab.xyz=function(lab){let x2,y2,z2;y2=(lab[0]+16)/116,x2=lab[1]/500+y2,z2=y2-lab[2]/200;let y22=y2**3,x22=x2**3,z22=z2**3;return y2=y22>.008856?y22:(y2-16/116)/7.787,x2=x22>.008856?x22:(x2-16/116)/7.787,z2=z22>.008856?z22:(z2-16/116)/7.787,x2*=95.047,y2*=100,z2*=108.883,[x2,y2,z2]},convert2.lab.lch=function(lab){let h2,l2=lab[0],a2=lab[1],b2=lab[2];return h2=360*Math.atan2(b2,a2)/2/Math.PI,h2<0&&(h2+=360),[l2,Math.sqrt(a2*a2+b2*b2),h2]},convert2.lch.lab=function(lch){let l2=lch[0],c2=lch[1],hr=lch[2]/360*2*Math.PI;return[l2,c2*Math.cos(hr),c2*Math.sin(hr)]},convert2.rgb.ansi16=function(args,saturation=null){let[r2,g2,b2]=args,value=null===saturation?convert2.rgb.hsv(args)[2]:saturation;if(value=Math.round(value/50),0===value)return 30;let ansi=30+(Math.round(b2/255)<<2|Math.round(g2/255)<<1|Math.round(r2/255));return 2===value&&(ansi+=60),ansi},convert2.hsv.ansi16=function(args){return convert2.rgb.ansi16(convert2.hsv.rgb(args),args[2])},convert2.rgb.ansi256=function(args){let r2=args[0],g2=args[1],b2=args[2];return r2===g2&&g2===b2?r2<8?16:r2>248?231:Math.round((r2-8)/247*24)+232:16+36*Math.round(r2/255*5)+6*Math.round(g2/255*5)+Math.round(b2/255*5)},convert2.ansi16.rgb=function(args){let color=args%10;if(0===color||7===color)return args>50&&(color+=3.5),color=color/10.5*255,[color,color,color];let mult=.5*(1+~~(args>50));return[(1&color)*mult*255,(color>>1&1)*mult*255,(color>>2&1)*mult*255]},convert2.ansi256.rgb=function(args){if(args>=232){let c2=10*(args-232)+8;return[c2,c2,c2]}let rem;return args-=16,[Math.floor(args/36)/5*255,Math.floor((rem=args%36)/6)/5*255,rem%6/5*255]},convert2.rgb.hex=function(args){let string=(((255&Math.round(args[0]))<<16)+((255&Math.round(args[1]))<<8)+(255&Math.round(args[2]))).toString(16).toUpperCase();return"000000".substring(string.length)+string},convert2.hex.rgb=function(args){let match=args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!match)return[0,0,0];let colorString=match[0];3===match[0].length&&(colorString=colorString.split("").map((char=>char+char)).join(""));let integer=parseInt(colorString,16);return[integer>>16&255,integer>>8&255,255&integer]},convert2.rgb.hcg=function(rgb){let grayscale,hue,r2=rgb[0]/255,g2=rgb[1]/255,b2=rgb[2]/255,max=Math.max(Math.max(r2,g2),b2),min=Math.min(Math.min(r2,g2),b2),chroma=max-min;return grayscale=chroma<1?min/(1-chroma):0,hue=chroma<=0?0:max===r2?(g2-b2)/chroma%6:max===g2?2+(b2-r2)/chroma:4+(r2-g2)/chroma,hue/=6,hue%=1,[360*hue,100*chroma,100*grayscale]},convert2.hsl.hcg=function(hsl){let s2=hsl[1]/100,l2=hsl[2]/100,c2=l2<.5?2*s2*l2:2*s2*(1-l2),f2=0;return c2<1&&(f2=(l2-.5*c2)/(1-c2)),[hsl[0],100*c2,100*f2]},convert2.hsv.hcg=function(hsv){let s2=hsv[1]/100,v2=hsv[2]/100,c2=s2*v2,f2=0;return c2<1&&(f2=(v2-c2)/(1-c2)),[hsv[0],100*c2,100*f2]},convert2.hcg.rgb=function(hcg){let h2=hcg[0]/360,c2=hcg[1]/100,g2=hcg[2]/100;if(0===c2)return[255*g2,255*g2,255*g2];let pure=[0,0,0],hi=h2%1*6,v2=hi%1,w2=1-v2,mg=0;switch(Math.floor(hi)){case 0:pure[0]=1,pure[1]=v2,pure[2]=0;break;case 1:pure[0]=w2,pure[1]=1,pure[2]=0;break;case 2:pure[0]=0,pure[1]=1,pure[2]=v2;break;case 3:pure[0]=0,pure[1]=w2,pure[2]=1;break;case 4:pure[0]=v2,pure[1]=0,pure[2]=1;break;default:pure[0]=1,pure[1]=0,pure[2]=w2}return mg=(1-c2)*g2,[255*(c2*pure[0]+mg),255*(c2*pure[1]+mg),255*(c2*pure[2]+mg)]},convert2.hcg.hsv=function(hcg){let c2=hcg[1]/100,v2=c2+hcg[2]/100*(1-c2),f2=0;return v2>0&&(f2=c2/v2),[hcg[0],100*f2,100*v2]},convert2.hcg.hsl=function(hcg){let c2=hcg[1]/100,l2=hcg[2]/100*(1-c2)+.5*c2,s2=0;return l2>0&&l2<.5?s2=c2/(2*l2):l2>=.5&&l2<1&&(s2=c2/(2*(1-l2))),[hcg[0],100*s2,100*l2]},convert2.hcg.hwb=function(hcg){let c2=hcg[1]/100,v2=c2+hcg[2]/100*(1-c2);return[hcg[0],100*(v2-c2),100*(1-v2)]},convert2.hwb.hcg=function(hwb){let w2=hwb[1]/100,v2=1-hwb[2]/100,c2=v2-w2,g2=0;return c2<1&&(g2=(v2-c2)/(1-c2)),[hwb[0],100*c2,100*g2]},convert2.apple.rgb=function(apple){return[apple[0]/65535*255,apple[1]/65535*255,apple[2]/65535*255]},convert2.rgb.apple=function(rgb){return[rgb[0]/255*65535,rgb[1]/255*65535,rgb[2]/255*65535]},convert2.gray.rgb=function(args){return[args[0]/100*255,args[0]/100*255,args[0]/100*255]},convert2.gray.hsl=function(args){return[0,0,args[0]]},convert2.gray.hsv=convert2.gray.hsl,convert2.gray.hwb=function(gray){return[0,100,gray[0]]},convert2.gray.cmyk=function(gray){return[0,0,0,gray[0]]},convert2.gray.lab=function(gray){return[gray[0],0,0]},convert2.gray.hex=function(gray){let val=255&Math.round(gray[0]/100*255),string=((val<<16)+(val<<8)+val).toString(16).toUpperCase();return"000000".substring(string.length)+string},convert2.rgb.gray=function(rgb){return[(rgb[0]+rgb[1]+rgb[2])/3/255*100]}}}),require_route=(0,_chunk_QUZPS4B6_mjs__WEBPACK_IMPORTED_MODULE_0__.P$)({"../../node_modules/color-convert/route.js"(exports,module){var conversions=require_conversions();function deriveBFS(fromModel){let graph=function buildGraph(){let graph={},models=Object.keys(conversions);for(let len=models.length,i2=0;i2{convert2[fromModel]={},Object.defineProperty(convert2[fromModel],"channels",{value:conversions[fromModel].channels}),Object.defineProperty(convert2[fromModel],"labels",{value:conversions[fromModel].labels});let routes=route(fromModel);Object.keys(routes).forEach((toModel=>{let fn=routes[toModel];convert2[fromModel][toModel]=function wrapRounded(fn){let wrappedFn=function(...args){let arg0=args[0];if(null==arg0)return arg0;arg0.length>1&&(args=arg0);let result=fn(args);if("object"==typeof result)for(let len=result.length,i2=0;i21&&(args=arg0),fn(args))};return"conversion"in fn&&(wrappedFn.conversion=fn.conversion),wrappedFn}(fn)}))})),module.exports=convert2}}),import_color_convert=(0,_chunk_QUZPS4B6_mjs__WEBPACK_IMPORTED_MODULE_0__.f1)(require_color_convert());function u(){return(u=Object.assign||function(e2){for(var r2=1;r2=0||(o2[t2]=e2[t2]);return o2}function i(e2){var t2=(0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(e2),n2=(0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)((function(e3){t2.current&&t2.current(e3)}));return t2.current=e2,n2.current}var s=function(e2,r2,t2){return void 0===r2&&(r2=0),void 0===t2&&(t2=1),e2>t2?t2:e20:e3.buttons>0)&&m2.current?g2(d(m2.current,e3,b2.current)):t2(!1)},r2=function(){return t2(!1)};function t2(t3){var n2=_2.current,o3=v(m2.current),a3=t3?o3.addEventListener:o3.removeEventListener;a3(n2?"touchmove":"mousemove",e2),a3(n2?"touchend":"mouseup",r2)}return[function(e3){var e4,r3=e3.nativeEvent,n2=m2.current;if(n2&&(h(r3),e4=r3,(!_2.current||f(e4))&&n2)){if(f(r3)){_2.current=!0;var o3=r3.changedTouches||[];o3.length&&(b2.current=o3[0].identifier)}n2.focus(),g2(d(n2,r3,b2.current)),t2(!0)}},function(e3){var r3=e3.which||e3.keyCode;r3<37||r3>40||(e3.preventDefault(),p2({left:39===r3?.05:37===r3?-.05:0,top:40===r3?.05:38===r3?-.05:0}))},t2]}),[p2,g2]),C2=x2[0],E2=x2[1],H2=x2[2];return(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)((function(){return H2}),[H2]),react__WEBPACK_IMPORTED_MODULE_1__.createElement("div",u({},s2,{onTouchStart:C2,onMouseDown:C2,className:"react-colorful__interactive",ref:m2,onKeyDown:E2,tabIndex:0,role:"slider"}))})),g=function(e2){return e2.filter(Boolean).join(" ")},p=function(r2){var t2=r2.color,n2=r2.left,o2=r2.top,a2=void 0===o2?.5:o2,l2=g(["react-colorful__pointer",r2.className]);return react__WEBPACK_IMPORTED_MODULE_1__.createElement("div",{className:l2,style:{top:100*a2+"%",left:100*n2+"%"}},react__WEBPACK_IMPORTED_MODULE_1__.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t2}}))},b=function(e2,r2,t2){return void 0===r2&&(r2=0),void 0===t2&&(t2=Math.pow(10,r2)),Math.round(t2*e2)/t2},_={grad:.9,turn:360,rad:360/(2*Math.PI)},C=function(e2){return"#"===e2[0]&&(e2=e2.substring(1)),e2.length<6?{r:parseInt(e2[0]+e2[0],16),g:parseInt(e2[1]+e2[1],16),b:parseInt(e2[2]+e2[2],16),a:4===e2.length?b(parseInt(e2[3]+e2[3],16)/255,2):1}:{r:parseInt(e2.substring(0,2),16),g:parseInt(e2.substring(2,4),16),b:parseInt(e2.substring(4,6),16),a:8===e2.length?b(parseInt(e2.substring(6,8),16)/255,2):1}},E=function(e2,r2){return void 0===r2&&(r2="deg"),Number(e2)*(_[r2]||1)},N=function(e2){var r2=e2.s,t2=e2.l;return{h:e2.h,s:(r2*=(t2<50?t2:100-t2)/100)>0?2*r2/(t2+r2)*100:0,v:t2+r2,a:e2.a}},y=function(e2){var r2=e2.s,t2=e2.v,n2=e2.a,o2=(200-r2)*t2/100;return{h:b(e2.h),s:b(o2>0&&o2<200?r2*t2/100/(o2<=100?o2:200-o2)*100:0),l:b(o2/2),a:b(n2,2)}},q=function(e2){var r2=y(e2);return"hsl("+r2.h+", "+r2.s+"%, "+r2.l+"%)"},k=function(e2){var r2=y(e2);return"hsla("+r2.h+", "+r2.s+"%, "+r2.l+"%, "+r2.a+")"},I=function(e2){var r2=e2.h,t2=e2.s,n2=e2.v,o2=e2.a;r2=r2/360*6,t2/=100,n2/=100;var a2=Math.floor(r2),l2=n2*(1-t2),u2=n2*(1-(r2-a2)*t2),c2=n2*(1-(1-r2+a2)*t2),i2=a2%6;return{r:b(255*[n2,u2,l2,l2,c2,n2][i2]),g:b(255*[c2,n2,n2,u2,l2,l2][i2]),b:b(255*[l2,l2,c2,n2,n2,u2][i2]),a:b(o2,2)}},D=function(e2){var r2=e2.toString(16);return r2.length<2?"0"+r2:r2},K=function(e2){var r2=e2.r,t2=e2.g,n2=e2.b,o2=e2.a,a2=o2<1?D(b(255*o2)):"";return"#"+D(r2)+D(t2)+D(n2)+a2},L=function(e2){var r2=e2.r,t2=e2.g,n2=e2.b,o2=e2.a,a2=Math.max(r2,t2,n2),l2=a2-Math.min(r2,t2,n2),u2=l2?a2===r2?(t2-n2)/l2:a2===t2?2+(n2-r2)/l2:4+(r2-t2)/l2:0;return{h:b(60*(u2<0?u2+6:u2)),s:b(a2?l2/a2*100:0),v:b(a2/255*100),a:o2}},S=react__WEBPACK_IMPORTED_MODULE_1__.memo((function(r2){var t2=r2.hue,n2=r2.onChange,o2=g(["react-colorful__hue",r2.className]);return react__WEBPACK_IMPORTED_MODULE_1__.createElement("div",{className:o2},react__WEBPACK_IMPORTED_MODULE_1__.createElement(m,{onMove:function(e2){n2({h:360*e2.left})},onKey:function(e2){n2({h:s(t2+360*e2.left,0,360)})},"aria-label":"Hue","aria-valuenow":b(t2),"aria-valuemax":"360","aria-valuemin":"0"},react__WEBPACK_IMPORTED_MODULE_1__.createElement(p,{className:"react-colorful__hue-pointer",left:t2/360,color:q({h:t2,s:100,v:100,a:1})})))})),T=react__WEBPACK_IMPORTED_MODULE_1__.memo((function(r2){var t2=r2.hsva,n2=r2.onChange,o2={backgroundColor:q({h:t2.h,s:100,v:100,a:1})};return react__WEBPACK_IMPORTED_MODULE_1__.createElement("div",{className:"react-colorful__saturation",style:o2},react__WEBPACK_IMPORTED_MODULE_1__.createElement(m,{onMove:function(e2){n2({s:100*e2.left,v:100-100*e2.top})},onKey:function(e2){n2({s:s(t2.s+100*e2.left,0,100),v:s(t2.v-100*e2.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+b(t2.s)+"%, Brightness "+b(t2.v)+"%"},react__WEBPACK_IMPORTED_MODULE_1__.createElement(p,{className:"react-colorful__saturation-pointer",top:1-t2.v/100,left:t2.s/100,color:q(t2)})))})),F=function(e2,r2){if(e2===r2)return!0;for(var t2 in e2)if(e2[t2]!==r2[t2])return!1;return!0},P=function(e2,r2){return e2.replace(/\s/g,"")===r2.replace(/\s/g,"")};function Y(e2,t2,l2){var u2=i(l2),c2=(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)((function(){return e2.toHsva(t2)})),s2=c2[0],f2=c2[1],v2=(0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)({color:t2,hsva:s2});(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)((function(){if(!e2.equal(t2,v2.current.color)){var r2=e2.toHsva(t2);v2.current={hsva:r2,color:t2},f2(r2)}}),[t2,e2]),(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)((function(){var r2;F(s2,v2.current.hsva)||e2.equal(r2=e2.fromHsva(s2),v2.current.color)||(v2.current={hsva:s2,color:r2},u2(r2))}),[s2,e2,u2]);var d2=(0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)((function(e3){f2((function(r2){return Object.assign({},r2,e3)}))}),[]);return[s2,d2]}var ColorSpace2,V=typeof window<"u"?react__WEBPACK_IMPORTED_MODULE_1__.useLayoutEffect:react__WEBPACK_IMPORTED_MODULE_1__.useEffect,J=new Map,Q=function(e2){V((function(){var r2=e2.current?e2.current.ownerDocument:document;if(void 0!==r2&&!J.has(r2)){var t2=r2.createElement("style");t2.innerHTML='.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url(\'data:image/svg+xml;charset=utf-8,\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}',J.set(r2,t2);var n2=__webpack_require__.nc;n2&&t2.setAttribute("nonce",n2),r2.head.appendChild(t2)}}),[])},U=function(t2){var n2=t2.className,o2=t2.colorModel,a2=t2.color,l2=void 0===a2?o2.defaultColor:a2,i2=t2.onChange,s2=c(t2,["className","colorModel","color","onChange"]),f2=(0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);Q(f2);var v2=Y(o2,l2,i2),d2=v2[0],h2=v2[1],m2=g(["react-colorful",n2]);return react__WEBPACK_IMPORTED_MODULE_1__.createElement("div",u({},s2,{ref:f2,className:m2}),react__WEBPACK_IMPORTED_MODULE_1__.createElement(T,{hsva:d2,onChange:h2}),react__WEBPACK_IMPORTED_MODULE_1__.createElement(S,{hue:d2.h,onChange:h2,className:"react-colorful__last-control"}))},W={defaultColor:"000",toHsva:function(e2){return L(C(e2))},fromHsva:function(e2){return function(e2){return K(I(e2))}({h:e2.h,s:e2.s,v:e2.v,a:1})},equal:function(e2,r2){return e2.toLowerCase()===r2.toLowerCase()||F(C(e2),C(r2))}},ee=function(r2){var t2=r2.className,n2=r2.hsva,o2=r2.onChange,a2={backgroundImage:"linear-gradient(90deg, "+k(Object.assign({},n2,{a:0}))+", "+k(Object.assign({},n2,{a:1}))+")"},l2=g(["react-colorful__alpha",t2]),u2=b(100*n2.a);return react__WEBPACK_IMPORTED_MODULE_1__.createElement("div",{className:l2},react__WEBPACK_IMPORTED_MODULE_1__.createElement("div",{className:"react-colorful__alpha-gradient",style:a2}),react__WEBPACK_IMPORTED_MODULE_1__.createElement(m,{onMove:function(e2){o2({a:e2.left})},onKey:function(e2){o2({a:s(n2.a+e2.left)})},"aria-label":"Alpha","aria-valuetext":u2+"%","aria-valuenow":u2,"aria-valuemin":"0","aria-valuemax":"100"},react__WEBPACK_IMPORTED_MODULE_1__.createElement(p,{className:"react-colorful__alpha-pointer",left:n2.a,color:k(n2)})))},re=function(t2){var n2=t2.className,o2=t2.colorModel,a2=t2.color,l2=void 0===a2?o2.defaultColor:a2,i2=t2.onChange,s2=c(t2,["className","colorModel","color","onChange"]),f2=(0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);Q(f2);var v2=Y(o2,l2,i2),d2=v2[0],h2=v2[1],m2=g(["react-colorful",n2]);return react__WEBPACK_IMPORTED_MODULE_1__.createElement("div",u({},s2,{ref:f2,className:m2}),react__WEBPACK_IMPORTED_MODULE_1__.createElement(T,{hsva:d2,onChange:h2}),react__WEBPACK_IMPORTED_MODULE_1__.createElement(S,{hue:d2.h,onChange:h2}),react__WEBPACK_IMPORTED_MODULE_1__.createElement(ee,{hsva:d2,onChange:h2,className:"react-colorful__last-control"}))},le={defaultColor:"hsla(0, 0%, 0%, 1)",toHsva:function(e2){var r2=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e2);return r2?N({h:E(r2[1],r2[2]),s:Number(r2[3]),l:Number(r2[4]),a:void 0===r2[5]?1:Number(r2[5])/(r2[6]?100:1)}):{h:0,s:0,v:0,a:1}},fromHsva:k,equal:P},Ee={defaultColor:"rgba(0, 0, 0, 1)",toHsva:function(e2){var r2=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e2);return r2?L({r:Number(r2[1])/(r2[2]?100/255:1),g:Number(r2[3])/(r2[4]?100/255:1),b:Number(r2[5])/(r2[6]?100/255:1),a:void 0===r2[7]?1:Number(r2[7])/(r2[8]?100:1)}):{h:0,s:0,v:0,a:1}},fromHsva:function(e2){var r2=I(e2);return"rgba("+r2.r+", "+r2.g+", "+r2.b+", "+r2.a+")"},equal:P},Wrapper=storybook_theming__WEBPACK_IMPORTED_MODULE_2__.I4.div({position:"relative",maxWidth:250,'&[aria-readonly="true"]':{opacity:.5}}),PickerTooltip=(0,storybook_theming__WEBPACK_IMPORTED_MODULE_2__.I4)(storybook_internal_components__WEBPACK_IMPORTED_MODULE_3__.kR)({position:"absolute",zIndex:1,top:4,left:4,"[aria-readonly=true] &":{cursor:"not-allowed"}}),TooltipContent=storybook_theming__WEBPACK_IMPORTED_MODULE_2__.I4.div({width:200,margin:5,".react-colorful__saturation":{borderRadius:"4px 4px 0 0"},".react-colorful__hue":{boxShadow:"inset 0 0 0 1px rgb(0 0 0 / 5%)"},".react-colorful__last-control":{borderRadius:"0 0 4px 4px"}}),Note=(0,storybook_theming__WEBPACK_IMPORTED_MODULE_2__.I4)(storybook_internal_components__WEBPACK_IMPORTED_MODULE_3__._)((({theme})=>({fontFamily:theme.typography.fonts.base}))),Swatches=storybook_theming__WEBPACK_IMPORTED_MODULE_2__.I4.div({display:"grid",gridTemplateColumns:"repeat(9, 16px)",gap:6,padding:3,marginTop:5,width:200}),SwatchColor=storybook_theming__WEBPACK_IMPORTED_MODULE_2__.I4.div((({theme,active})=>({width:16,height:16,boxShadow:active?`${theme.appBorderColor} 0 0 0 1px inset, ${theme.textMutedColor}50 0 0 0 4px`:`${theme.appBorderColor} 0 0 0 1px inset`,borderRadius:theme.appBorderRadius}))),Swatch=({value,style,...props})=>{let backgroundImage=`linear-gradient(${value}, ${value}), url('data:image/svg+xml;charset=utf-8,'), linear-gradient(#fff, #fff)`;return react__WEBPACK_IMPORTED_MODULE_1__.createElement(SwatchColor,{...props,style:{...style,backgroundImage}})},Input=(0,storybook_theming__WEBPACK_IMPORTED_MODULE_2__.I4)(storybook_internal_components__WEBPACK_IMPORTED_MODULE_3__.lV.Input)((({theme,readOnly})=>({width:"100%",paddingLeft:30,paddingRight:30,boxSizing:"border-box",fontFamily:theme.typography.fonts.base}))),ToggleIcon=(0,storybook_theming__WEBPACK_IMPORTED_MODULE_2__.I4)(_storybook_icons__WEBPACK_IMPORTED_MODULE_4__.QDE)((({theme})=>({position:"absolute",zIndex:1,top:6,right:7,width:20,height:20,padding:4,boxSizing:"border-box",cursor:"pointer",color:theme.input.color}))),ColorSpace=((ColorSpace2=ColorSpace||{}).RGB="rgb",ColorSpace2.HSL="hsl",ColorSpace2.HEX="hex",ColorSpace2),COLOR_SPACES=Object.values(ColorSpace),COLOR_REGEXP=/\(([0-9]+),\s*([0-9]+)%?,\s*([0-9]+)%?,?\s*([0-9.]+)?\)/,RGB_REGEXP=/^\s*rgba?\(([0-9]+),\s*([0-9]+),\s*([0-9]+),?\s*([0-9.]+)?\)\s*$/i,HSL_REGEXP=/^\s*hsla?\(([0-9]+),\s*([0-9]+)%,\s*([0-9]+)%,?\s*([0-9.]+)?\)\s*$/i,HEX_REGEXP=/^\s*#?([0-9a-f]{3}|[0-9a-f]{6})\s*$/i,SHORTHEX_REGEXP=/^\s*#?([0-9a-f]{3})\s*$/i,ColorPicker={hex:function(r2){return react__WEBPACK_IMPORTED_MODULE_1__.createElement(U,u({},r2,{colorModel:W}))},rgb:function(r2){return react__WEBPACK_IMPORTED_MODULE_1__.createElement(re,u({},r2,{colorModel:Ee}))},hsl:function(r2){return react__WEBPACK_IMPORTED_MODULE_1__.createElement(re,u({},r2,{colorModel:le}))}},fallbackColor={hex:"transparent",rgb:"rgba(0, 0, 0, 0)",hsl:"hsla(0, 0%, 0%, 0)"},stringToArgs=value=>{let match=value?.match(COLOR_REGEXP);if(!match)return[0,0,0,1];let[,x2,y2,z2,a2=1]=match;return[x2,y2,z2,a2].map(Number)},parseValue=value=>{if(value)return RGB_REGEXP.test(value)?(value=>{let[r2,g2,b2,a2]=stringToArgs(value),[h2,s2,l2]=import_color_convert.default.rgb.hsl([r2,g2,b2])||[0,0,0];return{valid:!0,value,keyword:import_color_convert.default.rgb.keyword([r2,g2,b2]),colorSpace:"rgb",rgb:value,hsl:`hsla(${h2}, ${s2}%, ${l2}%, ${a2})`,hex:`#${import_color_convert.default.rgb.hex([r2,g2,b2]).toLowerCase()}`}})(value):HSL_REGEXP.test(value)?(value=>{let[h2,s2,l2,a2]=stringToArgs(value),[r2,g2,b2]=import_color_convert.default.hsl.rgb([h2,s2,l2])||[0,0,0];return{valid:!0,value,keyword:import_color_convert.default.hsl.keyword([h2,s2,l2]),colorSpace:"hsl",rgb:`rgba(${r2}, ${g2}, ${b2}, ${a2})`,hsl:value,hex:`#${import_color_convert.default.hsl.hex([h2,s2,l2]).toLowerCase()}`}})(value):(value=>{let plain=value.replace("#",""),rgb=import_color_convert.default.keyword.rgb(plain)||import_color_convert.default.hex.rgb(plain),hsl=import_color_convert.default.rgb.hsl(rgb),mapped=value;/[^#a-f0-9]/i.test(value)?mapped=plain:HEX_REGEXP.test(value)&&(mapped=`#${plain}`);let valid=!0;if(mapped.startsWith("#"))valid=HEX_REGEXP.test(mapped);else try{import_color_convert.default.keyword.hex(mapped)}catch{valid=!1}return{valid,value:mapped,keyword:import_color_convert.default.rgb.keyword(rgb),colorSpace:"hex",rgb:`rgba(${rgb[0]}, ${rgb[1]}, ${rgb[2]}, 1)`,hsl:`hsla(${hsl[0]}, ${hsl[1]}%, ${hsl[2]}%, 1)`,hex:mapped}})(value)},useColorInput=(initialValue,onChange)=>{let[value,setValue]=(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(initialValue||""),[color,setColor]=(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)((()=>parseValue(value))),[colorSpace,setColorSpace]=(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(color?.colorSpace||"hex");(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)((()=>{let nextValue=initialValue||"",nextColor=parseValue(nextValue);setValue(nextValue),setColor(nextColor),setColorSpace(nextColor?.colorSpace||"hex")}),[initialValue]);let realValue=(0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)((()=>((value,color,colorSpace)=>{if(!value||!color?.valid)return fallbackColor[colorSpace];if("hex"!==colorSpace)return color?.[colorSpace]||fallbackColor[colorSpace];if(!color.hex.startsWith("#"))try{return`#${import_color_convert.default.keyword.hex(color.hex)}`}catch{return fallbackColor.hex}let short=color.hex.match(SHORTHEX_REGEXP);if(!short)return HEX_REGEXP.test(color.hex)?color.hex:fallbackColor.hex;let[r2,g2,b2]=short[1].split("");return`#${r2}${r2}${g2}${g2}${b2}${b2}`})(value,color,colorSpace).toLowerCase()),[value,color,colorSpace]),updateValue=(0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)((update=>{let parsed=parseValue(update),v2=parsed?.value||update||"";setValue(v2),""===v2&&(setColor(void 0),onChange(void 0)),parsed&&(setColor(parsed),setColorSpace(parsed.colorSpace),onChange(parsed.value))}),[onChange]),cycleColorSpace=(0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)((()=>{let nextIndex=(COLOR_SPACES.indexOf(colorSpace)+1)%COLOR_SPACES.length,nextSpace=COLOR_SPACES[nextIndex];setColorSpace(nextSpace);let updatedValue=color?.[nextSpace]||"";setValue(updatedValue),onChange(updatedValue)}),[color,colorSpace,onChange]);return{value,realValue,updateValue,color,colorSpace,cycleColorSpace}},id=value=>value.replace(/\s*/,"").toLowerCase(),ColorControl=({name,value:initialValue,onChange,onFocus,onBlur,presetColors,startOpen=!1,argType})=>{let debouncedOnChange=(0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)((0,_chunk_SPFYY5GD_mjs__WEBPACK_IMPORTED_MODULE_5__.sg)(onChange,200),[onChange]),{value,realValue,updateValue,color,colorSpace,cycleColorSpace}=useColorInput(initialValue,debouncedOnChange),{presets,addPreset}=((presetColors,currentColor,colorSpace)=>{let[selectedColors,setSelectedColors]=(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(currentColor?.valid?[currentColor]:[]);(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)((()=>{void 0===currentColor&&setSelectedColors([])}),[currentColor]);let presets=(0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)((()=>(presetColors||[]).map((preset=>"string"==typeof preset?parseValue(preset):preset.title?{...parseValue(preset.color),keyword:preset.title}:parseValue(preset.color))).concat(selectedColors).filter(Boolean).slice(-27)),[presetColors,selectedColors]),addPreset=(0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)((color=>{color?.valid&&(presets.some((preset=>preset&&preset[colorSpace]&&id(preset[colorSpace]||"")===id(color[colorSpace]||"")))||setSelectedColors((arr=>arr.concat(color))))}),[colorSpace,presets]);return{presets,addPreset}})(presetColors??[],color,colorSpace),Picker=ColorPicker[colorSpace],readonly=!!argType?.table?.readonly;return react__WEBPACK_IMPORTED_MODULE_1__.createElement(Wrapper,{"aria-readonly":readonly},react__WEBPACK_IMPORTED_MODULE_1__.createElement(PickerTooltip,{startOpen,trigger:readonly?null:void 0,closeOnOutsideClick:!0,onVisibleChange:()=>color&&addPreset(color),tooltip:react__WEBPACK_IMPORTED_MODULE_1__.createElement(TooltipContent,null,react__WEBPACK_IMPORTED_MODULE_1__.createElement(Picker,{color:"transparent"===realValue?"#000000":realValue,onChange:updateValue,onFocus,onBlur}),presets.length>0&&react__WEBPACK_IMPORTED_MODULE_1__.createElement(Swatches,null,presets.map(((preset,index)=>react__WEBPACK_IMPORTED_MODULE_1__.createElement(storybook_internal_components__WEBPACK_IMPORTED_MODULE_3__.kR,{key:`${preset?.value||index}-${index}`,hasChrome:!1,tooltip:react__WEBPACK_IMPORTED_MODULE_1__.createElement(Note,{note:preset?.keyword||preset?.value||""})},react__WEBPACK_IMPORTED_MODULE_1__.createElement(Swatch,{value:preset?.[colorSpace]||"",active:!!(color&&preset&&preset[colorSpace]&&id(preset[colorSpace]||"")===id(color[colorSpace])),onClick:()=>preset&&updateValue(preset.value||"")}))))))},react__WEBPACK_IMPORTED_MODULE_1__.createElement(Swatch,{value:realValue,style:{margin:4}})),react__WEBPACK_IMPORTED_MODULE_1__.createElement(Input,{id:(0,_chunk_SPFYY5GD_mjs__WEBPACK_IMPORTED_MODULE_5__.ZA)(name),value,onChange:e2=>updateValue(e2.target.value),onFocus:e2=>e2.target.select(),readOnly:readonly,placeholder:"Choose color..."}),value?react__WEBPACK_IMPORTED_MODULE_1__.createElement(ToggleIcon,{onClick:cycleColorSpace}):null)},Color_default=ColorControl}}]); \ No newline at end of file diff --git a/storybook-static/482.5cb5d63e.iframe.bundle.js b/storybook-static/482.5cb5d63e.iframe.bundle.js new file mode 100644 index 00000000000000..cea1aa666a572f --- /dev/null +++ b/storybook-static/482.5cb5d63e.iframe.bundle.js @@ -0,0 +1 @@ +(self.webpackChunk_fluentui_fluentui_repo=self.webpackChunk_fluentui_fluentui_repo||[]).push([[482],{"./packages/react-file-type-icons/src/FileIconType.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{y:()=>FileIconType});var FileIconType=function(FileIconType){return FileIconType[FileIconType.docset=1]="docset",FileIconType[FileIconType.folder=2]="folder",FileIconType[FileIconType.genericFile=3]="genericFile",FileIconType[FileIconType.listItem=4]="listItem",FileIconType[FileIconType.sharedFolder=5]="sharedFolder",FileIconType[FileIconType.multiple=6]="multiple",FileIconType[FileIconType.stream=7]="stream",FileIconType[FileIconType.news=8]="news",FileIconType[FileIconType.desktopFolder=9]="desktopFolder",FileIconType[FileIconType.documentsFolder=10]="documentsFolder",FileIconType[FileIconType.picturesFolder=11]="picturesFolder",FileIconType[FileIconType.linkedFolder=12]="linkedFolder",FileIconType[FileIconType.list=13]="list",FileIconType[FileIconType.form=14]="form",FileIconType[FileIconType.sway=15]="sway",FileIconType[FileIconType.playlist=16]="playlist",FileIconType[FileIconType.loopworkspace=17]="loopworkspace",FileIconType[FileIconType.planner=18]="planner",FileIconType[FileIconType.todoItem=19]="todoItem",FileIconType[FileIconType.portfolio=20]="portfolio",FileIconType[FileIconType.album=21]="album",FileIconType[FileIconType.listForm=22]="listForm",FileIconType[FileIconType.campaign=23]="campaign",FileIconType}({})},"./packages/react-file-type-icons/src/components/FileTypeIcon/FileTypeIcon.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{k:()=>FileTypeIcon});var react=__webpack_require__("./node_modules/react/index.js"),jsx_runtime=__webpack_require__("./packages/react-components/react-jsx-runtime/src/jsx-runtime.ts"),assertSlots=__webpack_require__("./packages/react-components/react-utilities/src/compose/assertSlots.ts");const renderFileTypeIcon_unstable=state=>((0,assertSlots.C)(state),(0,jsx_runtime.Y)(state.root,{}));try{renderFileTypeIcon_unstable.displayName="renderFileTypeIcon_unstable",renderFileTypeIcon_unstable.__docgenInfo={description:"Render the final JSX of FileTypeIcon.",displayName:"renderFileTypeIcon_unstable",props:{components:{defaultValue:null,description:"@deprecated The base element type for each slot.\nThis property is deprecated and will be removed in a future version.\nThe slot base element type is declared through `slot.*(slotShorthand, {elementType: ElementType})` instead.",name:"components",required:!0,type:{name:"{ root: ElementType; }"}},root:{defaultValue:null,description:"",name:"root",required:!0,type:{name:'Omit<{ as?: "img"; } & Omit, HTMLImageElement>, "children"> & { ...; }, "children"> & { ...; }'}},size:{defaultValue:{value:"16"},description:"The size of the icon in pixels.",name:"size",required:!1,type:{name:"enum",value:[{value:"16"},{value:"20"},{value:"24"},{value:"32"},{value:"40"},{value:"48"},{value:"64"},{value:"96"}]}},imageFileType:{defaultValue:{value:"'svg'"},description:"The type of image file to use. Can be svg or png.",name:"imageFileType",required:!1,type:{name:"enum",value:[{value:'"svg"'},{value:'"png"'}]}},baseUrl:{defaultValue:null,description:"",name:"baseUrl",required:!1,type:{name:"string"}},iconName:{defaultValue:null,description:"",name:"iconName",required:!0,type:{name:"string"}},src:{defaultValue:null,description:"",name:"src",required:!1,type:{name:"string"}},extension:{defaultValue:null,description:"",name:"extension",required:!1,type:{name:"string"}},type:{defaultValue:null,description:"",name:"type",required:!1,type:{name:"enum",value:[{value:"1"},{value:"2"},{value:"3"},{value:"4"},{value:"5"},{value:"6"},{value:"7"},{value:"8"},{value:"9"},{value:"10"},{value:"11"},{value:"12"},{value:"13"},{value:"14"},{value:"15"},{value:"16"},{value:"17"},{value:"18"},{value:"19"},{value:"20"},{value:"21"},{value:"22"},{value:"23"}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["packages/react-file-type-icons/src/components/FileTypeIcon/renderFileTypeIcon_unstable.tsx#renderFileTypeIcon_unstable"]={docgenInfo:renderFileTypeIcon_unstable.__docgenInfo,name:"renderFileTypeIcon_unstable",path:"packages/react-file-type-icons/src/components/FileTypeIcon/renderFileTypeIcon_unstable.tsx#renderFileTypeIcon_unstable"})}catch(__react_docgen_typescript_loader_error){}var slot=__webpack_require__("./packages/react-components/react-utilities/src/compose/slot.ts"),getIntrinsicElementProps=__webpack_require__("./packages/react-components/react-utilities/src/compose/getIntrinsicElementProps.ts"),getFileTypeIconAsUrl=__webpack_require__("./packages/react-file-type-icons/src/getFileTypeIconAsUrl.ts"),getFileTypeIconProps=__webpack_require__("./packages/react-file-type-icons/src/getFileTypeIconProps.ts");var makeStyles_esm=__webpack_require__("./node_modules/@griffel/react/makeStyles.esm.js"),mergeClasses_esm=__webpack_require__("./node_modules/@griffel/core/mergeClasses.esm.js");const fileTypeIconClassNames_root="fui-FileTypeIcon",useStyles=(0,makeStyles_esm.n)({root:{display:"inline-block",verticalAlign:"middle"}}),FileTypeIcon=react.forwardRef(((props,ref)=>{const state=((props,ref)=>{const{baseUrl,extension,type,size=getFileTypeIconProps.UI,imageFileType="svg","aria-label":ariaLabel,...rootProps}=props,options={extension,type,size,imageFileType},iconProps=(0,getFileTypeIconProps.g)(options),src=(0,getFileTypeIconAsUrl.V)(options,baseUrl),state={size,imageFileType,baseUrl,iconName:iconProps.iconName,src,extension,type,components:{root:"img"},root:slot.Gk((0,getIntrinsicElementProps.g)("img",{ref,...rootProps,src,"aria-label":null!=ariaLabel?ariaLabel:iconProps["aria-label"],"data-icon-name":iconProps.iconName}),{elementType:"img"})};return void 0===state.root.width&&(state.root.width=size),void 0===state.root.height&&(state.root.height=size),state})(props,ref);return(state=>{const styles=useStyles();state.root.className=(0,mergeClasses_esm.z)(fileTypeIconClassNames_root,styles.root,state.root.className)})(state),renderFileTypeIcon_unstable(state)}));FileTypeIcon.displayName="FileTypeIcon";try{FileTypeIcon.displayName="FileTypeIcon",FileTypeIcon.__docgenInfo={description:"FileTypeIcon renders a file type icon as an image resolved from the file extension or type.",displayName:"FileTypeIcon",props:{as:{defaultValue:null,description:"",name:"as",required:!1,type:{name:'"img"'}},extension:{defaultValue:null,description:"The file extension, such as .pptx, for which you need an icon.\nFor file type icons that are not associated with a file\nextension, such as folder, use the type property.",name:"extension",required:!1,type:{name:"string"}},type:{defaultValue:null,description:"The type of file type icon you need. Use this property for\nfile type icons that are not associated with a file extension,\nsuch as folder.",name:"type",required:!1,type:{name:"enum",value:[{value:"1"},{value:"2"},{value:"3"},{value:"4"},{value:"5"},{value:"6"},{value:"7"},{value:"8"},{value:"9"},{value:"10"},{value:"11"},{value:"12"},{value:"13"},{value:"14"},{value:"15"},{value:"16"},{value:"17"},{value:"18"},{value:"19"},{value:"20"},{value:"21"},{value:"22"},{value:"23"}]}},size:{defaultValue:{value:"16"},description:"The size of the icon in pixels.",name:"size",required:!1,type:{name:"enum",value:[{value:"16"},{value:"20"},{value:"24"},{value:"32"},{value:"40"},{value:"48"},{value:"64"},{value:"96"}]}},imageFileType:{defaultValue:{value:"'svg'"},description:"The type of image file to use. Can be svg or png.",name:"imageFileType",required:!1,type:{name:"enum",value:[{value:'"svg"'},{value:'"png"'}]}},baseUrl:{defaultValue:{value:"DEFAULT_BASE_URL"},description:"Optional base URL used to resolve image URLs.",name:"baseUrl",required:!1,type:{name:"string"}},ref:{defaultValue:null,description:"",name:"ref",required:!1,type:{name:"Ref"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["packages/react-file-type-icons/src/components/FileTypeIcon/FileTypeIcon.tsx#FileTypeIcon"]={docgenInfo:FileTypeIcon.__docgenInfo,name:"FileTypeIcon",path:"packages/react-file-type-icons/src/components/FileTypeIcon/FileTypeIcon.tsx#FileTypeIcon"})}catch(__react_docgen_typescript_loader_error){}},"./packages/react-file-type-icons/src/getFileTypeIconAsUrl.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{V:()=>getFileTypeIconAsUrl});__webpack_require__("./node_modules/react/index.js");(0,__webpack_require__("./packages/react-file-type-icons/stories/.storybook/mocks/set-version.js").setVersion)("@fluentui/style-utilities","0.0.0");var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");function canUseDOM(){return"undefined"!=typeof window&&!(!window.document||!window.document.createElement)}var _window=void 0;try{_window=window}catch(e){}function getWindow_getWindow(rootElement){if(canUseDOM()&&void 0!==_window){var el=rootElement;return el&&el.ownerDocument&&el.ownerDocument.defaultView?el.ownerDocument.defaultView:_window}}var _counter=0,GlobalSettings=function(){function GlobalSettings(){}return GlobalSettings.getValue=function(key,defaultValue){var globalSettings=_getGlobalSettings();return void 0===globalSettings[key]&&(globalSettings[key]="function"==typeof defaultValue?defaultValue():defaultValue),globalSettings[key]},GlobalSettings.setValue=function(key,value){var globalSettings=_getGlobalSettings(),callbacks=globalSettings.__callbacks__,oldValue=globalSettings[key];if(value!==oldValue){globalSettings[key]=value;var changeDescription={oldValue,value,key};for(var id in callbacks)callbacks.hasOwnProperty(id)&&callbacks[id](changeDescription)}return value},GlobalSettings.addChangeListener=function(cb){var id=cb.__id__,callbacks=_getCallbacks();id||(id=cb.__id__=String(_counter++)),callbacks[id]=cb},GlobalSettings.removeChangeListener=function(cb){delete _getCallbacks()[cb.__id__]},GlobalSettings}();function _getGlobalSettings(){var _a,globalObj=getWindow_getWindow()||{};return globalObj.__globalSettings__||(globalObj.__globalSettings__=((_a={}).__callbacks__={},_a)),globalObj.__globalSettings__}function _getCallbacks(){return _getGlobalSettings().__callbacks__}var Depths,NO_CUSTOMIZATIONS={settings:{},scopedSettings:{},inCustomizerContext:!1},_allSettings=GlobalSettings.getValue("customizations",{settings:{},scopedSettings:{},inCustomizerContext:!1}),_events=[],Customizations=function(){function Customizations(){}return Customizations.reset=function(){_allSettings.settings={},_allSettings.scopedSettings={}},Customizations.applySettings=function(settings){_allSettings.settings=(0,tslib_es6.Cl)((0,tslib_es6.Cl)({},_allSettings.settings),settings),Customizations._raiseChange()},Customizations.applyScopedSettings=function(scopeName,settings){_allSettings.scopedSettings[scopeName]=(0,tslib_es6.Cl)((0,tslib_es6.Cl)({},_allSettings.scopedSettings[scopeName]),settings),Customizations._raiseChange()},Customizations.getSettings=function(properties,scopeName,localSettings){void 0===localSettings&&(localSettings=NO_CUSTOMIZATIONS);for(var settings={},localScopedSettings=scopeName&&localSettings.scopedSettings[scopeName]||{},globalScopedSettings=scopeName&&_allSettings.scopedSettings[scopeName]||{},_i=0,properties_1=properties;_i-1),isOpera:!!(userAgent&&userAgent.indexOf("opera")>-1),isMs:!(!nav||!/rv:11.0/i.test(nav.userAgent)&&!/Edge\/\d./i.test(navigator.userAgent))}:{isWebkit:!0,isMoz:!0,isOpera:!0,isMs:!0}}return _vendorSettings}(),name=rulePairs[index];if(autoPrefixNames[name]){var value=rulePairs[index+1];autoPrefixNames[name]&&(vendorSettings.isWebkit&&rulePairs.push("-webkit-"+name,value),vendorSettings.isMoz&&rulePairs.push("-moz-"+name,value),vendorSettings.isMs&&rulePairs.push("-ms-"+name,value),vendorSettings.isOpera&&rulePairs.push("-o-"+name,value))}}var _a,NON_PIXEL_NUMBER_PROPS=["column-count","font-weight","flex","flex-grow","flex-shrink","fill-opacity","opacity","order","z-index","zoom"];function provideUnits(rulePairs,index){var name=rulePairs[index],value=rulePairs[index+1];if("number"==typeof value){var isNonPixelProp=NON_PIXEL_NUMBER_PROPS.indexOf(name)>-1,isVariableOrPrefixed=name.indexOf("--")>-1,unit=isNonPixelProp||isVariableOrPrefixed?"":"px";rulePairs[index+1]="".concat(value).concat(unit)}}var LEFT="left",RIGHT="right",NAME_REPLACEMENTS=((_a={})[LEFT]=RIGHT,_a[RIGHT]=LEFT,_a),VALUE_REPLACEMENTS={"w-resize":"e-resize","sw-resize":"se-resize","nw-resize":"ne-resize"};function rtlifyRules(options,rulePairs,index){if(options.rtl){var name_1=rulePairs[index];if(!name_1)return;var value=rulePairs[index+1];if("string"==typeof value&&value.indexOf("@noflip")>=0)rulePairs[index+1]=value.replace(/\s*(?:\/\*\s*)?\@noflip\b(?:\s*\*\/)?\s*?/g,"");else if(name_1.indexOf(LEFT)>=0)rulePairs[index]=name_1.replace(LEFT,RIGHT);else if(name_1.indexOf(RIGHT)>=0)rulePairs[index]=name_1.replace(RIGHT,LEFT);else if(String(value).indexOf(LEFT)>=0)rulePairs[index+1]=value.replace(LEFT,RIGHT);else if(String(value).indexOf(RIGHT)>=0)rulePairs[index+1]=value.replace(RIGHT,LEFT);else if(NAME_REPLACEMENTS[name_1])rulePairs[index]=NAME_REPLACEMENTS[name_1];else if(VALUE_REPLACEMENTS[value])rulePairs[index+1]=VALUE_REPLACEMENTS[value];else switch(name_1){case"margin":case"padding":rulePairs[index+1]=function flipQuad(value){if("string"==typeof value){var parts=value.split(" ");if(4===parts.length)return"".concat(parts[0]," ").concat(parts[3]," ").concat(parts[2]," ").concat(parts[1])}return value}(value);break;case"box-shadow":rulePairs[index+1]=function negateNum(value,partIndex){var parts=value.split(" "),numberVal=parseInt(parts[partIndex],10);return parts[0]=parts[0].replace(String(numberVal),String(-1*numberVal)),parts.join(" ")}(value,0)}}}var LocalizedFontNames,LocalizedFontFamilies,FontSizes,FontWeights,IconFontSizes;function serializeRuleEntries(options,ruleEntries){if(!ruleEntries)return"";var rulePairs,index,rule,allEntries=[];for(var entry in ruleEntries)ruleEntries.hasOwnProperty(entry)&&"displayName"!==entry&&void 0!==ruleEntries[entry]&&allEntries.push(entry,ruleEntries[entry]);for(var i=0;i-1;target[name_1]=isCircularReference?value:_merge(target[name_1]||{},value,circularReferences)}}return circularReferences.pop(),target}function makeSemanticColors(p,e,s,isInverted,depComments){return void 0===depComments&&(depComments=!1),function _fixDeprecatedSlots(s,depComments){var dep="";!0===depComments&&(dep=" /* @deprecated */");return s.listTextColor=s.listText+dep,s.menuItemBackgroundChecked+=dep,s.warningHighlight+=dep,s.warningText=s.messageText+dep,s.successText+=dep,s}(getSemanticColors(p,e,(0,tslib_es6.Cl)({primaryButtonBorder:"transparent",errorText:isInverted?"#F1707B":"#a4262c",messageText:isInverted?"#F3F2F1":"#323130",messageLink:isInverted?"#6CB8F6":"#005A9E",messageLinkHovered:isInverted?"#82C7FF":"#004578",infoIcon:isInverted?"#C8C6C4":"#605e5c",errorIcon:isInverted?"#F1707B":"#A80000",blockingIcon:isInverted?"#442726":"#FDE7E9",warningIcon:isInverted?"#C8C6C4":"#797775",severeWarningIcon:isInverted?"#FCE100":"#D83B01",successIcon:isInverted?"#92C353":"#107C10",infoBackground:isInverted?"#323130":"#f3f2f1",errorBackground:isInverted?"#442726":"#FDE7E9",blockingBackground:isInverted?"#442726":"#FDE7E9",warningBackground:isInverted?"#433519":"#FFF4CE",severeWarningBackground:isInverted?"#4F2A0F":"#FED9CC",successBackground:isInverted?"#393D1B":"#DFF6DD",warningHighlight:isInverted?"#fff100":"#ffb900",successText:isInverted?"#92c353":"#107C10"},s),isInverted),depComments)}function getSemanticColors(p,e,s,isInverted,depComments){void 0===depComments&&(depComments=!1);var result={},_a=p||{},white=_a.white,black=_a.black,themePrimary=_a.themePrimary,themeDark=_a.themeDark,themeDarker=_a.themeDarker,themeDarkAlt=_a.themeDarkAlt,themeLighter=_a.themeLighter,neutralLight=_a.neutralLight,neutralLighter=_a.neutralLighter,neutralDark=_a.neutralDark,neutralQuaternary=_a.neutralQuaternary,neutralQuaternaryAlt=_a.neutralQuaternaryAlt,neutralPrimary=_a.neutralPrimary,neutralSecondary=_a.neutralSecondary,neutralSecondaryAlt=_a.neutralSecondaryAlt,neutralTertiary=_a.neutralTertiary,neutralTertiaryAlt=_a.neutralTertiaryAlt,neutralLighterAlt=_a.neutralLighterAlt,accent=_a.accent;return white&&(result.bodyBackground=white,result.bodyFrameBackground=white,result.accentButtonText=white,result.buttonBackground=white,result.primaryButtonText=white,result.primaryButtonTextHovered=white,result.primaryButtonTextPressed=white,result.inputBackground=white,result.inputForegroundChecked=white,result.listBackground=white,result.menuBackground=white,result.cardStandoutBackground=white),black&&(result.bodyTextChecked=black,result.buttonTextCheckedHovered=black),themePrimary&&(result.link=themePrimary,result.primaryButtonBackground=themePrimary,result.inputBackgroundChecked=themePrimary,result.inputIcon=themePrimary,result.inputFocusBorderAlt=themePrimary,result.menuIcon=themePrimary,result.menuHeader=themePrimary,result.accentButtonBackground=themePrimary),themeDark&&(result.primaryButtonBackgroundPressed=themeDark,result.inputBackgroundCheckedHovered=themeDark,result.inputIconHovered=themeDark),themeDarker&&(result.linkHovered=themeDarker),themeDarkAlt&&(result.primaryButtonBackgroundHovered=themeDarkAlt),themeLighter&&(result.inputPlaceholderBackgroundChecked=themeLighter),neutralLight&&(result.bodyBackgroundChecked=neutralLight,result.bodyFrameDivider=neutralLight,result.bodyDivider=neutralLight,result.variantBorder=neutralLight,result.buttonBackgroundCheckedHovered=neutralLight,result.buttonBackgroundPressed=neutralLight,result.listItemBackgroundChecked=neutralLight,result.listHeaderBackgroundPressed=neutralLight,result.menuItemBackgroundPressed=neutralLight,result.menuItemBackgroundChecked=neutralLight),neutralLighter&&(result.bodyBackgroundHovered=neutralLighter,result.buttonBackgroundHovered=neutralLighter,result.buttonBackgroundDisabled=neutralLighter,result.buttonBorderDisabled=neutralLighter,result.primaryButtonBackgroundDisabled=neutralLighter,result.disabledBackground=neutralLighter,result.listItemBackgroundHovered=neutralLighter,result.listHeaderBackgroundHovered=neutralLighter,result.menuItemBackgroundHovered=neutralLighter),neutralQuaternary&&(result.primaryButtonTextDisabled=neutralQuaternary,result.disabledSubtext=neutralQuaternary),neutralQuaternaryAlt&&(result.listItemBackgroundCheckedHovered=neutralQuaternaryAlt),neutralTertiary&&(result.disabledBodyText=neutralTertiary,result.variantBorderHovered=(null==s?void 0:s.variantBorderHovered)||neutralTertiary,result.buttonTextDisabled=neutralTertiary,result.inputIconDisabled=neutralTertiary,result.disabledText=neutralTertiary),neutralPrimary&&(result.bodyText=neutralPrimary,result.actionLink=neutralPrimary,result.buttonText=neutralPrimary,result.inputBorderHovered=neutralPrimary,result.inputText=neutralPrimary,result.listText=neutralPrimary,result.menuItemText=neutralPrimary),neutralLighterAlt&&(result.bodyStandoutBackground=neutralLighterAlt,result.defaultStateBackground=neutralLighterAlt),neutralDark&&(result.actionLinkHovered=neutralDark,result.buttonTextHovered=neutralDark,result.buttonTextChecked=neutralDark,result.buttonTextPressed=neutralDark,result.inputTextHovered=neutralDark,result.menuItemTextHovered=neutralDark),neutralSecondary&&(result.bodySubtext=neutralSecondary,result.focusBorder=neutralSecondary,result.inputBorder=neutralSecondary,result.smallInputBorder=neutralSecondary,result.inputPlaceholderText=neutralSecondary),neutralSecondaryAlt&&(result.buttonBorder=neutralSecondaryAlt),neutralTertiaryAlt&&(result.disabledBodySubtext=neutralTertiaryAlt,result.disabledBorder=neutralTertiaryAlt,result.buttonBackgroundChecked=neutralTertiaryAlt,result.menuDivider=neutralTertiaryAlt),accent&&(result.accentButtonBackground=accent),(null==e?void 0:e.elevation4)&&(result.cardShadow=e.elevation4),!isInverted&&(null==e?void 0:e.elevation8)?result.cardShadowHovered=e.elevation8:result.variantBorderHovered&&(result.cardShadowHovered="0 0 1px "+result.variantBorderHovered),result=(0,tslib_es6.Cl)((0,tslib_es6.Cl)({},result),s)}!function registerDefaultFontFaces(baseUrl){if(baseUrl){var fontUrl="".concat(baseUrl,"/fonts");_registerFontFaceSet(fontUrl,LocalizedFontNames.Thai,"leelawadeeui-thai","leelawadeeui"),_registerFontFaceSet(fontUrl,LocalizedFontNames.Arabic,"segoeui-arabic"),_registerFontFaceSet(fontUrl,LocalizedFontNames.Cyrillic,"segoeui-cyrillic"),_registerFontFaceSet(fontUrl,LocalizedFontNames.EastEuropean,"segoeui-easteuropean"),_registerFontFaceSet(fontUrl,LocalizedFontNames.Greek,"segoeui-greek"),_registerFontFaceSet(fontUrl,LocalizedFontNames.Hebrew,"segoeui-hebrew"),_registerFontFaceSet(fontUrl,LocalizedFontNames.Vietnamese,"segoeui-vietnamese"),_registerFontFaceSet(fontUrl,LocalizedFontNames.WestEuropean,"segoeui-westeuropean","segoeui","Segoe UI"),_registerFontFaceSet(fontUrl,LocalizedFontFamilies.Selawik,"selawik","selawik"),_registerFontFaceSet(fontUrl,LocalizedFontNames.Armenian,"segoeui-armenian"),_registerFontFaceSet(fontUrl,LocalizedFontNames.Georgian,"segoeui-georgian"),_registerFontFace("Leelawadee UI Web","".concat(fontUrl,"/leelawadeeui-thai/leelawadeeui-semilight"),FontWeights.light),_registerFontFace("Leelawadee UI Web","".concat(fontUrl,"/leelawadeeui-thai/leelawadeeui-bold"),FontWeights.semibold)}}(function _getFontBaseUrl(){var _a,_b,fabricConfig=null===(_a=getWindow_getWindow())||void 0===_a?void 0:_a.FabricConfig;return null!==(_b=null==fabricConfig?void 0:fabricConfig.fontBaseUrl)&&void 0!==_b?_b:"https://res-1.cdn.office.net/files/fabric-cdn-prod_20230815.002/assets"}());var DefaultSpacing={s2:"4px",s1:"8px",m:"16px",l1:"20px",l2:"32px"};function createTheme_createTheme(theme,depComments){void 0===theme&&(theme={}),void 0===depComments&&(depComments=!1);var isInverted=!!theme.isInverted;return function mergeThemes(theme,partialTheme){var _a,_b,_c;void 0===partialTheme&&(partialTheme={});var mergedTheme=merge({},theme,partialTheme,{semanticColors:getSemanticColors(partialTheme.palette,partialTheme.effects,partialTheme.semanticColors,void 0===partialTheme.isInverted?theme.isInverted:partialTheme.isInverted)});if((null===(_a=partialTheme.palette)||void 0===_a?void 0:_a.themePrimary)&&!(null===(_b=partialTheme.palette)||void 0===_b?void 0:_b.accent)&&(mergedTheme.palette.accent=partialTheme.palette.themePrimary),partialTheme.defaultFontStyle)for(var _i=0,_d=Object.keys(mergedTheme.fonts);_i<_d.length;_i++){var fontStyle=_d[_i];mergedTheme.fonts[fontStyle]=merge(mergedTheme.fonts[fontStyle],partialTheme.defaultFontStyle,null===(_c=null==partialTheme?void 0:partialTheme.fonts)||void 0===_c?void 0:_c[fontStyle])}return mergedTheme}({palette:DefaultPalette,effects:DefaultEffects,fonts:DefaultFontStyles,spacing:DefaultSpacing,isInverted,disableGlobalClassNames:!1,semanticColors:makeSemanticColors(DefaultPalette,DefaultEffects,void 0,isInverted,depComments),rtl:void 0},theme)}var _theme=createTheme_createTheme({}),_onThemeChangeCallbacks=[];function initializeThemeInCustomizations(){var _a,_b,_c,win=getWindow_getWindow();(null===(_b=null==win?void 0:win.FabricConfig)||void 0===_b?void 0:_b.legacyTheme)?function loadTheme(theme,depComments){var _a;void 0===depComments&&(depComments=!1);return _theme=createTheme_createTheme(theme,depComments),(0,lib_es6.EQ)((0,tslib_es6.Cl)((0,tslib_es6.Cl)((0,tslib_es6.Cl)((0,tslib_es6.Cl)({},_theme.palette),_theme.semanticColors),_theme.effects),function _loadFonts(theme){for(var lines={},_i=0,_a=Object.keys(theme.fonts);_i<_a.length;_i++)for(var fontName=_a[_i],font=theme.fonts[fontName],_b=0,_c=Object.keys(font);_b<_c.length;_b++){var propName=_c[_b],name_1=fontName+propName.charAt(0).toUpperCase()+propName.slice(1),value=font[propName];"fontSize"===propName&&"number"==typeof value&&(value+="px"),lines[name_1]=value}return lines}(_theme))),Customizations.applySettings((_a={},_a.theme=_theme,_a)),_onThemeChangeCallbacks.forEach((function(callback){try{callback(_theme)}catch(e){}})),_theme}(win.FabricConfig.legacyTheme):Customizations.getSettings(["theme"]).theme||((null===(_c=null==win?void 0:win.FabricConfig)||void 0===_c?void 0:_c.theme)&&(_theme=createTheme_createTheme(win.FabricConfig.theme)),Customizations.applySettings(((_a={}).theme=_theme,_a)))}initializeThemeInCustomizations(),initializeThemeInCustomizations();const DEFAULT_BASE_URL="https://res.cdn.office.net/files/fabric-cdn-prod_20260115.001/assets/item-types/";var getFileTypeIconProps=__webpack_require__("./packages/react-file-type-icons/src/getFileTypeIconProps.ts");function getFileTypeIconAsUrl(options,baseUrl=DEFAULT_BASE_URL){const{extension,size=getFileTypeIconProps.UI,type,imageFileType}=options,baseIconName=(0,getFileTypeIconProps.ZC)(extension,type),suffixArray=(0,getFileTypeIconProps.ZM)(size,imageFileType).split("_");return 3===suffixArray.length?`${baseUrl}${size}_${suffixArray[1]}/${baseIconName}.${suffixArray[2]}`:2===suffixArray.length?`${baseUrl}${size}/${baseIconName}.${suffixArray[1]}`:void 0}},"./packages/react-file-type-icons/src/getFileTypeIconProps.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{UI:()=>DEFAULT_ICON_SIZE,ZC:()=>getFileTypeIconNameFromExtensionOrType,g:()=>getFileTypeIconProps,ZM:()=>getFileTypeIconSuffix});var FileIconType=__webpack_require__("./packages/react-file-type-icons/src/FileIconType.ts");const FileTypeIconMap={accdb:{extensions:["accdb","mdb"]},aipage:{extensions:["page"]},archive:{extensions:["7z","ace","arc","arj","dmg","gz","iso","lzh","pkg","rar","sit","tgz","tar","z"]},album:{types:[FileIconType.y.album]},audio:{extensions:["aif","aiff","aac","alac","amr","ape","au","awb","dct","dss","dvf","flac","gsm","m4a","m4p","mid","mmf","mp3","oga","ra","rm","wav","wma","wv"]},calendar:{extensions:["ical","icalendar","ics","ifb","vcs"]},classifier:{extensions:["classifier"]},clipchamp:{extensions:["clipchamp"]},cliptemplate:{extensions:["cliptemplate"]},code:{extensions:["abap","ada","adp","ahk","as","as3","asc","ascx","asm","asp","awk","bash","bash_login","bash_logout","bash_profile","bashrc","bat","bib","bsh","build","builder","c","cbl","c++","capfile","cc","cfc","cfm","cfml","cl","clj","cls","cmake","cmd","coffee","config","cpp","cpt","cpy","cs","cshtml","cson","csproj","css","ctp","cxx","d","ddl","di","disco","dml","dtd","dtml","el","emakefile","erb","erl","f","f90","f95","fs","fsi","fsscript","fsx","gemfile","gemspec","gitconfig","go","groovy","gvy","h","h++","haml","handlebars","hbs","hcp","hh","hpp","hrl","hs","htc","hxx","idl","iim","inc","inf","ini","inl","ipp","irbrc","jade","jav","java","js","json","jsp","jsproj","jsx","l","less","lhs","lisp","log","lst","ltx","lua","m","mak","make","manifest","master","ml","mli","mll","mly","mm","mud","nfo","opml","osascript","p","pas","patch","php","php2","php3","php4","php5","phtml","pl","pm","pod","pp","profile","ps1","ps1xml","psd1","psm1","pss","pt","py","pyw","r","rake","rb","rbx","rc","rdf","re","reg","rest","resw","resx","rhtml","rjs","rprofile","rpy","rss","rst","ruby","rxml","s","sass","scala","scm","sconscript","sconstruct","script","scss","sgml","sh","shtml","sml","svn-base","swift","sql","sty","tcl","tex","textile","tld","tli","tmpl","tpl","vb","vi","vim","vmg","webpart","wsp","wsdl","xhtml","xoml","xsd","xslt","yaml","yaws","yml","zsh"]},contact:{extensions:["vcf"]},copilot:{extensions:["copilot"]},csv:{extensions:["csv"]},designer:{extensions:["design"]},desktopfolder:{types:[FileIconType.y.desktopFolder]},docset:{types:[FileIconType.y.docset]},documentsfolder:{types:[FileIconType.y.documentsFolder]},docx:{extensions:["doc","docm","docx","docb"]},dotx:{extensions:["dot","dotm","dotx"]},email:{extensions:["eml","msg","oft","ost","pst"]},exe:{extensions:["application","appref-ms","apk","app","appx","exe","ipa","msi","xap"]},favoritesfolder:{},folder:{types:[FileIconType.y.folder]},font:{extensions:["ttf","otf","woff"]},form:{types:[FileIconType.y.form]},genericfile:{types:[FileIconType.y.genericFile]},html:{extensions:["htm","html","mht","mhtml"]},ipynb:{extensions:["nnb","ipynb"]},link:{extensions:["lnk","link","url","website","webloc"]},linkedfolder:{types:[FileIconType.y.linkedFolder]},listform:{types:[FileIconType.y.listForm]},listitem:{types:[FileIconType.y.listItem]},loop:{extensions:["fluid","loop","note"]},loopworkspace:{types:[FileIconType.y.loopworkspace]},officescript:{extensions:["osts"]},splist:{types:[FileIconType.y.list]},mcworld:{extensions:["mcworld"]},mctemplate:{extensions:["mctemplate"]},model:{extensions:["3ds","3mf","blend","cool","dae","df","dwfx","dwg","dxf","fbx","glb","gltf","holo","layer","layout","max","mtl","obj","off","ply","skp","stp","stl","t","thl","x"]},mpp:{extensions:["mpp"]},mpt:{extensions:["mpt"]},multiple:{types:[FileIconType.y.multiple]},one:{extensions:["one","onepart"]},onepage:{extensions:["onepage"]},onetoc:{extensions:["ms-one-stub","onetoc","onetoc2","onepkg"]},pbiapp:{},pdf:{extensions:["pdf"]},photo:{extensions:["arw","bmp","cr2","crw","dic","dicm","dcm","dcm30","dcr","dds","dib","dng","erf","gif","heic","heif","ico","jfi","jfif","jif","jpe","jpeg","jpg","jxr","kdc","mrw","nef","orf","pct","pict","png","pns","psb","psd","raw","tga","tif","tiff","wdp"]},photo360:{},picturesfolder:{types:[FileIconType.y.picturesFolder]},planner:{types:[FileIconType.y.planner]},portfolio:{types:[FileIconType.y.portfolio]},potx:{extensions:["pot","potm","potx"]},powerbi:{extensions:["pbids","pbix"]},ppsx:{extensions:["pps","ppsm","ppsx"]},pptx:{extensions:["ppt","pptm","pptx","sldx","sldm"]},presentation:{extensions:["odp","gslides","key"]},pub:{extensions:["pub"]},spo:{extensions:["aspx"]},spocampaign:{types:[FileIconType.y.campaign]},sponews:{types:[FileIconType.y.news]},spreadsheet:{extensions:["odc","ods","gsheet","numbers","tsv"]},rtf:{extensions:["epub","gdoc","odt","md","markdn","markdown","mdown","mkdn","rtf","wri","pages"]},sharedfolder:{types:[FileIconType.y.sharedFolder]},playlist:{types:[FileIconType.y.playlist]},sway:{types:[FileIconType.y.sway]},sysfile:{extensions:["bak","bin","cab","cache","cat","cer","class","dat","db","dbg","dl_","dll","ithmb","jar","kb","ldt","lrprev","pkpass","ppa","ppam","pdb","rom","thm","thmx","vsl","xla","xlam","xlb","xll"]},todoitem:{types:[FileIconType.y.todoItem]},txt:{extensions:["dif","diff","readme","out","plist","properties","text","txt"]},vaultclosed:{},vaultopen:{},vector:{extensions:["ai","ait","cvs","dgn","gdraw","pd","emf","eps","fig","ind","indd","indl","indt","indb","ps","svg","svgz","wmf","oxps","xps","xd","sketch"]},video:{types:[FileIconType.y.stream],extensions:["3g2","3gp","3gp2","3gpp","asf","avi","dvr-ms","flv","m1v","m4v","mkv","mod","mov","mm4p","mp2","mp2v","mp4","mp4v","mpa","mpe","mpeg","mpg","mpv","mpv2","mts","ogg","qt","swf","ts","vob","webm","wlmp","wm","wmv","wmx"]},video360:{},vsdx:{extensions:["vdx","vsd","vsdm","vsdx","vsw","vdw"]},vssx:{extensions:["vss","vssm","vssx"]},vstx:{extensions:["vst","vstm","vstx","vsx"]},whiteboard:{extensions:["whiteboard","wbtx"]},xlsx:{extensions:["xlc","xls","xlsb","xlsm","xlsx","xlw"]},xltx:{extensions:["xlt","xltm","xltx"]},xml:{extensions:["xaml","xml","xsl"]},xsn:{extensions:["xsn"]},zip:{extensions:["zip"]}};let _extensionToIconName,_typeToIconName;const GENERIC_FILE="genericfile",DEFAULT_ICON_SIZE=16;function getFileTypeIconProps(options){let iconBaseName;const{extension,type,size,imageFileType}=options;iconBaseName=getFileTypeIconNameFromExtensionOrType(extension,type);return{iconName:iconBaseName+getFileTypeIconSuffix(size||DEFAULT_ICON_SIZE,imageFileType),"aria-label":extension}}function getFileTypeIconNameFromExtensionOrType(extension,type){if(extension){if(!_extensionToIconName){_extensionToIconName={};for(const iconName in FileTypeIconMap)if(FileTypeIconMap.hasOwnProperty(iconName)){const extensions=FileTypeIconMap[iconName].extensions;if(extensions)for(let i=0;i1&&devicePixelRatio<=1.5?20!==size&&(devicePixelRatioSuffix="_1.5x"):"png"===imageFileType&&(devicePixelRatio>1&&devicePixelRatio<=1.5?devicePixelRatioSuffix=20===size?"_2x":"_1.5x":devicePixelRatio>1.5&&devicePixelRatio<=2?devicePixelRatioSuffix="_2x":devicePixelRatio>2&&devicePixelRatio<=3?devicePixelRatioSuffix="_3x":devicePixelRatio>3&&(devicePixelRatioSuffix="_4x")),size+devicePixelRatioSuffix+"_"+imageFileType}},"./packages/react-file-type-icons/stories/.storybook/mocks/set-version.js":module=>{module.exports={setVersion:()=>{}}}}]); \ No newline at end of file diff --git a/storybook-static/533.1174a7ce.iframe.bundle.js b/storybook-static/533.1174a7ce.iframe.bundle.js new file mode 100644 index 00000000000000..e2bf845674a5f1 --- /dev/null +++ b/storybook-static/533.1174a7ce.iframe.bundle.js @@ -0,0 +1,523 @@ +/*! For license information please see 533.1174a7ce.iframe.bundle.js.LICENSE.txt */ +(self.webpackChunk_fluentui_fluentui_repo=self.webpackChunk_fluentui_fluentui_repo||[]).push([[533],{"./node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{UE:()=>floating_ui_dom_arrow,rD:()=>floating_ui_dom_computePosition,__:()=>floating_ui_dom_detectOverflow,UU:()=>floating_ui_dom_flip,jD:()=>floating_ui_dom_hide,ER:()=>floating_ui_dom_limitShift,cY:()=>floating_ui_dom_offset,BN:()=>floating_ui_dom_shift,Ej:()=>floating_ui_dom_size});const sides=["top","right","bottom","left"],floating_ui_utils_min=Math.min,floating_ui_utils_max=Math.max,round=Math.round,createCoords=(Math.floor,v=>({x:v,y:v})),oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"},oppositeAlignmentMap={start:"end",end:"start"};function clamp(start,value,end){return floating_ui_utils_max(start,floating_ui_utils_min(value,end))}function floating_ui_utils_evaluate(value,param){return"function"==typeof value?value(param):value}function floating_ui_utils_getSide(placement){return placement.split("-")[0]}function floating_ui_utils_getAlignment(placement){return placement.split("-")[1]}function getOppositeAxis(axis){return"x"===axis?"y":"x"}function getAxisLength(axis){return"y"===axis?"height":"width"}function floating_ui_utils_getSideAxis(placement){return["top","bottom"].includes(floating_ui_utils_getSide(placement))?"y":"x"}function getAlignmentAxis(placement){return getOppositeAxis(floating_ui_utils_getSideAxis(placement))}function floating_ui_utils_getOppositeAlignmentPlacement(placement){return placement.replace(/start|end/g,(alignment=>oppositeAlignmentMap[alignment]))}function getOppositePlacement(placement){return placement.replace(/left|right|bottom|top/g,(side=>oppositeSideMap[side]))}function floating_ui_utils_getPaddingObject(padding){return"number"!=typeof padding?function expandPaddingObject(padding){return{top:0,right:0,bottom:0,left:0,...padding}}(padding):{top:padding,right:padding,bottom:padding,left:padding}}function floating_ui_utils_rectToClientRect(rect){const{x,y,width,height}=rect;return{width,height,top:y,left:x,right:x+width,bottom:y+height,x,y}}function computeCoordsFromPlacement(_ref,placement,rtl){let{reference,floating}=_ref;const sideAxis=floating_ui_utils_getSideAxis(placement),alignmentAxis=getAlignmentAxis(placement),alignLength=getAxisLength(alignmentAxis),side=floating_ui_utils_getSide(placement),isVertical="y"===sideAxis,commonX=reference.x+reference.width/2-floating.width/2,commonY=reference.y+reference.height/2-floating.height/2,commonAlign=reference[alignLength]/2-floating[alignLength]/2;let coords;switch(side){case"top":coords={x:commonX,y:reference.y-floating.height};break;case"bottom":coords={x:commonX,y:reference.y+reference.height};break;case"right":coords={x:reference.x+reference.width,y:commonY};break;case"left":coords={x:reference.x-floating.width,y:commonY};break;default:coords={x:reference.x,y:reference.y}}switch(floating_ui_utils_getAlignment(placement)){case"start":coords[alignmentAxis]-=commonAlign*(rtl&&isVertical?-1:1);break;case"end":coords[alignmentAxis]+=commonAlign*(rtl&&isVertical?-1:1)}return coords}async function detectOverflow(state,options){var _await$platform$isEle;void 0===options&&(options={});const{x,y,platform,rects,elements,strategy}=state,{boundary="clippingAncestors",rootBoundary="viewport",elementContext="floating",altBoundary=!1,padding=0}=floating_ui_utils_evaluate(options,state),paddingObject=floating_ui_utils_getPaddingObject(padding),element=elements[altBoundary?"floating"===elementContext?"reference":"floating":elementContext],clippingClientRect=floating_ui_utils_rectToClientRect(await platform.getClippingRect({element:null==(_await$platform$isEle=await(null==platform.isElement?void 0:platform.isElement(element)))||_await$platform$isEle?element:element.contextElement||await(null==platform.getDocumentElement?void 0:platform.getDocumentElement(elements.floating)),boundary,rootBoundary,strategy})),rect="floating"===elementContext?{x,y,width:rects.floating.width,height:rects.floating.height}:rects.reference,offsetParent=await(null==platform.getOffsetParent?void 0:platform.getOffsetParent(elements.floating)),offsetScale=await(null==platform.isElement?void 0:platform.isElement(offsetParent))&&await(null==platform.getScale?void 0:platform.getScale(offsetParent))||{x:1,y:1},elementClientRect=floating_ui_utils_rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect?await platform.convertOffsetParentRelativeRectToViewportRelativeRect({elements,rect,offsetParent,strategy}):rect);return{top:(clippingClientRect.top-elementClientRect.top+paddingObject.top)/offsetScale.y,bottom:(elementClientRect.bottom-clippingClientRect.bottom+paddingObject.bottom)/offsetScale.y,left:(clippingClientRect.left-elementClientRect.left+paddingObject.left)/offsetScale.x,right:(elementClientRect.right-clippingClientRect.right+paddingObject.right)/offsetScale.x}}function getSideOffsets(overflow,rect){return{top:overflow.top-rect.height,right:overflow.right-rect.width,bottom:overflow.bottom-rect.height,left:overflow.left-rect.width}}function isAnySideFullyClipped(overflow){return sides.some((side=>overflow[side]>=0))}function hasWindow(){return"undefined"!=typeof window}function getNodeName(node){return isNode(node)?(node.nodeName||"").toLowerCase():"#document"}function getWindow(node){var _node$ownerDocument;return(null==node||null==(_node$ownerDocument=node.ownerDocument)?void 0:_node$ownerDocument.defaultView)||window}function floating_ui_utils_dom_getDocumentElement(node){var _ref;return null==(_ref=(isNode(node)?node.ownerDocument:node.document)||window.document)?void 0:_ref.documentElement}function isNode(value){return!!hasWindow()&&(value instanceof Node||value instanceof getWindow(value).Node)}function isElement(value){return!!hasWindow()&&(value instanceof Element||value instanceof getWindow(value).Element)}function isHTMLElement(value){return!!hasWindow()&&(value instanceof HTMLElement||value instanceof getWindow(value).HTMLElement)}function isShadowRoot(value){return!(!hasWindow()||"undefined"==typeof ShadowRoot)&&(value instanceof ShadowRoot||value instanceof getWindow(value).ShadowRoot)}function isOverflowElement(element){const{overflow,overflowX,overflowY,display}=getComputedStyle(element);return/auto|scroll|overlay|hidden|clip/.test(overflow+overflowY+overflowX)&&!["inline","contents"].includes(display)}function isTableElement(element){return["table","td","th"].includes(getNodeName(element))}function isTopLayer(element){return[":popover-open",":modal"].some((selector=>{try{return element.matches(selector)}catch(e){return!1}}))}function isContainingBlock(elementOrCss){const webkit=isWebKit(),css=isElement(elementOrCss)?getComputedStyle(elementOrCss):elementOrCss;return"none"!==css.transform||"none"!==css.perspective||!!css.containerType&&"normal"!==css.containerType||!webkit&&!!css.backdropFilter&&"none"!==css.backdropFilter||!webkit&&!!css.filter&&"none"!==css.filter||["transform","perspective","filter"].some((value=>(css.willChange||"").includes(value)))||["paint","layout","strict","content"].some((value=>(css.contain||"").includes(value)))}function isWebKit(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function isLastTraversableNode(node){return["html","body","#document"].includes(getNodeName(node))}function getComputedStyle(element){return getWindow(element).getComputedStyle(element)}function getNodeScroll(element){return isElement(element)?{scrollLeft:element.scrollLeft,scrollTop:element.scrollTop}:{scrollLeft:element.scrollX,scrollTop:element.scrollY}}function getParentNode(node){if("html"===getNodeName(node))return node;const result=node.assignedSlot||node.parentNode||isShadowRoot(node)&&node.host||floating_ui_utils_dom_getDocumentElement(node);return isShadowRoot(result)?result.host:result}function getNearestOverflowAncestor(node){const parentNode=getParentNode(node);return isLastTraversableNode(parentNode)?node.ownerDocument?node.ownerDocument.body:node.body:isHTMLElement(parentNode)&&isOverflowElement(parentNode)?parentNode:getNearestOverflowAncestor(parentNode)}function floating_ui_utils_dom_getOverflowAncestors(node,list,traverseIframes){var _node$ownerDocument2;void 0===list&&(list=[]),void 0===traverseIframes&&(traverseIframes=!0);const scrollableAncestor=getNearestOverflowAncestor(node),isBody=scrollableAncestor===(null==(_node$ownerDocument2=node.ownerDocument)?void 0:_node$ownerDocument2.body),win=getWindow(scrollableAncestor);if(isBody){const frameElement=getFrameElement(win);return list.concat(win,win.visualViewport||[],isOverflowElement(scrollableAncestor)?scrollableAncestor:[],frameElement&&traverseIframes?floating_ui_utils_dom_getOverflowAncestors(frameElement):[])}return list.concat(scrollableAncestor,floating_ui_utils_dom_getOverflowAncestors(scrollableAncestor,[],traverseIframes))}function getFrameElement(win){return win.parent&&Object.getPrototypeOf(win.parent)?win.frameElement:null}function getCssDimensions(element){const css=getComputedStyle(element);let width=parseFloat(css.width)||0,height=parseFloat(css.height)||0;const hasOffset=isHTMLElement(element),offsetWidth=hasOffset?element.offsetWidth:width,offsetHeight=hasOffset?element.offsetHeight:height,shouldFallback=round(width)!==offsetWidth||round(height)!==offsetHeight;return shouldFallback&&(width=offsetWidth,height=offsetHeight),{width,height,$:shouldFallback}}function unwrapElement(element){return isElement(element)?element:element.contextElement}function getScale(element){const domElement=unwrapElement(element);if(!isHTMLElement(domElement))return createCoords(1);const rect=domElement.getBoundingClientRect(),{width,height,$}=getCssDimensions(domElement);let x=($?round(rect.width):rect.width)/width,y=($?round(rect.height):rect.height)/height;return x&&Number.isFinite(x)||(x=1),y&&Number.isFinite(y)||(y=1),{x,y}}const noOffsets=createCoords(0);function getVisualOffsets(element){const win=getWindow(element);return isWebKit()&&win.visualViewport?{x:win.visualViewport.offsetLeft,y:win.visualViewport.offsetTop}:noOffsets}function getBoundingClientRect(element,includeScale,isFixedStrategy,offsetParent){void 0===includeScale&&(includeScale=!1),void 0===isFixedStrategy&&(isFixedStrategy=!1);const clientRect=element.getBoundingClientRect(),domElement=unwrapElement(element);let scale=createCoords(1);includeScale&&(offsetParent?isElement(offsetParent)&&(scale=getScale(offsetParent)):scale=getScale(element));const visualOffsets=function shouldAddVisualOffsets(element,isFixed,floatingOffsetParent){return void 0===isFixed&&(isFixed=!1),!(!floatingOffsetParent||isFixed&&floatingOffsetParent!==getWindow(element))&&isFixed}(domElement,isFixedStrategy,offsetParent)?getVisualOffsets(domElement):createCoords(0);let x=(clientRect.left+visualOffsets.x)/scale.x,y=(clientRect.top+visualOffsets.y)/scale.y,width=clientRect.width/scale.x,height=clientRect.height/scale.y;if(domElement){const win=getWindow(domElement),offsetWin=offsetParent&&isElement(offsetParent)?getWindow(offsetParent):offsetParent;let currentWin=win,currentIFrame=getFrameElement(currentWin);for(;currentIFrame&&offsetParent&&offsetWin!==currentWin;){const iframeScale=getScale(currentIFrame),iframeRect=currentIFrame.getBoundingClientRect(),css=getComputedStyle(currentIFrame),left=iframeRect.left+(currentIFrame.clientLeft+parseFloat(css.paddingLeft))*iframeScale.x,top=iframeRect.top+(currentIFrame.clientTop+parseFloat(css.paddingTop))*iframeScale.y;x*=iframeScale.x,y*=iframeScale.y,width*=iframeScale.x,height*=iframeScale.y,x+=left,y+=top,currentWin=getWindow(currentIFrame),currentIFrame=getFrameElement(currentWin)}}return floating_ui_utils_rectToClientRect({width,height,x,y})}function getWindowScrollBarX(element,rect){const leftScroll=getNodeScroll(element).scrollLeft;return rect?rect.left+leftScroll:getBoundingClientRect(floating_ui_utils_dom_getDocumentElement(element)).left+leftScroll}function getHTMLOffset(documentElement,scroll,ignoreScrollbarX){void 0===ignoreScrollbarX&&(ignoreScrollbarX=!1);const htmlRect=documentElement.getBoundingClientRect();return{x:htmlRect.left+scroll.scrollLeft-(ignoreScrollbarX?0:getWindowScrollBarX(documentElement,htmlRect)),y:htmlRect.top+scroll.scrollTop}}function getClientRectFromClippingAncestor(element,clippingAncestor,strategy){let rect;if("viewport"===clippingAncestor)rect=function getViewportRect(element,strategy){const win=getWindow(element),html=floating_ui_utils_dom_getDocumentElement(element),visualViewport=win.visualViewport;let width=html.clientWidth,height=html.clientHeight,x=0,y=0;if(visualViewport){width=visualViewport.width,height=visualViewport.height;const visualViewportBased=isWebKit();(!visualViewportBased||visualViewportBased&&"fixed"===strategy)&&(x=visualViewport.offsetLeft,y=visualViewport.offsetTop)}return{width,height,x,y}}(element,strategy);else if("document"===clippingAncestor)rect=function getDocumentRect(element){const html=floating_ui_utils_dom_getDocumentElement(element),scroll=getNodeScroll(element),body=element.ownerDocument.body,width=floating_ui_utils_max(html.scrollWidth,html.clientWidth,body.scrollWidth,body.clientWidth),height=floating_ui_utils_max(html.scrollHeight,html.clientHeight,body.scrollHeight,body.clientHeight);let x=-scroll.scrollLeft+getWindowScrollBarX(element);const y=-scroll.scrollTop;return"rtl"===getComputedStyle(body).direction&&(x+=floating_ui_utils_max(html.clientWidth,body.clientWidth)-width),{width,height,x,y}}(floating_ui_utils_dom_getDocumentElement(element));else if(isElement(clippingAncestor))rect=function getInnerBoundingClientRect(element,strategy){const clientRect=getBoundingClientRect(element,!0,"fixed"===strategy),top=clientRect.top+element.clientTop,left=clientRect.left+element.clientLeft,scale=isHTMLElement(element)?getScale(element):createCoords(1);return{width:element.clientWidth*scale.x,height:element.clientHeight*scale.y,x:left*scale.x,y:top*scale.y}}(clippingAncestor,strategy);else{const visualOffsets=getVisualOffsets(element);rect={x:clippingAncestor.x-visualOffsets.x,y:clippingAncestor.y-visualOffsets.y,width:clippingAncestor.width,height:clippingAncestor.height}}return floating_ui_utils_rectToClientRect(rect)}function hasFixedPositionAncestor(element,stopNode){const parentNode=getParentNode(element);return!(parentNode===stopNode||!isElement(parentNode)||isLastTraversableNode(parentNode))&&("fixed"===getComputedStyle(parentNode).position||hasFixedPositionAncestor(parentNode,stopNode))}function getRectRelativeToOffsetParent(element,offsetParent,strategy){const isOffsetParentAnElement=isHTMLElement(offsetParent),documentElement=floating_ui_utils_dom_getDocumentElement(offsetParent),isFixed="fixed"===strategy,rect=getBoundingClientRect(element,!0,isFixed,offsetParent);let scroll={scrollLeft:0,scrollTop:0};const offsets=createCoords(0);if(isOffsetParentAnElement||!isOffsetParentAnElement&&!isFixed)if(("body"!==getNodeName(offsetParent)||isOverflowElement(documentElement))&&(scroll=getNodeScroll(offsetParent)),isOffsetParentAnElement){const offsetRect=getBoundingClientRect(offsetParent,!0,isFixed,offsetParent);offsets.x=offsetRect.x+offsetParent.clientLeft,offsets.y=offsetRect.y+offsetParent.clientTop}else documentElement&&(offsets.x=getWindowScrollBarX(documentElement));const htmlOffset=!documentElement||isOffsetParentAnElement||isFixed?createCoords(0):getHTMLOffset(documentElement,scroll);return{x:rect.left+scroll.scrollLeft-offsets.x-htmlOffset.x,y:rect.top+scroll.scrollTop-offsets.y-htmlOffset.y,width:rect.width,height:rect.height}}function isStaticPositioned(element){return"static"===getComputedStyle(element).position}function getTrueOffsetParent(element,polyfill){if(!isHTMLElement(element)||"fixed"===getComputedStyle(element).position)return null;if(polyfill)return polyfill(element);let rawOffsetParent=element.offsetParent;return floating_ui_utils_dom_getDocumentElement(element)===rawOffsetParent&&(rawOffsetParent=rawOffsetParent.ownerDocument.body),rawOffsetParent}function getOffsetParent(element,polyfill){const win=getWindow(element);if(isTopLayer(element))return win;if(!isHTMLElement(element)){let svgOffsetParent=getParentNode(element);for(;svgOffsetParent&&!isLastTraversableNode(svgOffsetParent);){if(isElement(svgOffsetParent)&&!isStaticPositioned(svgOffsetParent))return svgOffsetParent;svgOffsetParent=getParentNode(svgOffsetParent)}return win}let offsetParent=getTrueOffsetParent(element,polyfill);for(;offsetParent&&isTableElement(offsetParent)&&isStaticPositioned(offsetParent);)offsetParent=getTrueOffsetParent(offsetParent,polyfill);return offsetParent&&isLastTraversableNode(offsetParent)&&isStaticPositioned(offsetParent)&&!isContainingBlock(offsetParent)?win:offsetParent||function getContainingBlock(element){let currentNode=getParentNode(element);for(;isHTMLElement(currentNode)&&!isLastTraversableNode(currentNode);){if(isContainingBlock(currentNode))return currentNode;if(isTopLayer(currentNode))return null;currentNode=getParentNode(currentNode)}return null}(element)||win}const platform={convertOffsetParentRelativeRectToViewportRelativeRect:function convertOffsetParentRelativeRectToViewportRelativeRect(_ref){let{elements,rect,offsetParent,strategy}=_ref;const isFixed="fixed"===strategy,documentElement=floating_ui_utils_dom_getDocumentElement(offsetParent),topLayer=!!elements&&isTopLayer(elements.floating);if(offsetParent===documentElement||topLayer&&isFixed)return rect;let scroll={scrollLeft:0,scrollTop:0},scale=createCoords(1);const offsets=createCoords(0),isOffsetParentAnElement=isHTMLElement(offsetParent);if((isOffsetParentAnElement||!isOffsetParentAnElement&&!isFixed)&&(("body"!==getNodeName(offsetParent)||isOverflowElement(documentElement))&&(scroll=getNodeScroll(offsetParent)),isHTMLElement(offsetParent))){const offsetRect=getBoundingClientRect(offsetParent);scale=getScale(offsetParent),offsets.x=offsetRect.x+offsetParent.clientLeft,offsets.y=offsetRect.y+offsetParent.clientTop}const htmlOffset=!documentElement||isOffsetParentAnElement||isFixed?createCoords(0):getHTMLOffset(documentElement,scroll,!0);return{width:rect.width*scale.x,height:rect.height*scale.y,x:rect.x*scale.x-scroll.scrollLeft*scale.x+offsets.x+htmlOffset.x,y:rect.y*scale.y-scroll.scrollTop*scale.y+offsets.y+htmlOffset.y}},getDocumentElement:floating_ui_utils_dom_getDocumentElement,getClippingRect:function getClippingRect(_ref){let{element,boundary,rootBoundary,strategy}=_ref;const clippingAncestors=[..."clippingAncestors"===boundary?isTopLayer(element)?[]:function getClippingElementAncestors(element,cache){const cachedResult=cache.get(element);if(cachedResult)return cachedResult;let result=floating_ui_utils_dom_getOverflowAncestors(element,[],!1).filter((el=>isElement(el)&&"body"!==getNodeName(el))),currentContainingBlockComputedStyle=null;const elementIsFixed="fixed"===getComputedStyle(element).position;let currentNode=elementIsFixed?getParentNode(element):element;for(;isElement(currentNode)&&!isLastTraversableNode(currentNode);){const computedStyle=getComputedStyle(currentNode),currentNodeIsContaining=isContainingBlock(currentNode);currentNodeIsContaining||"fixed"!==computedStyle.position||(currentContainingBlockComputedStyle=null),(elementIsFixed?!currentNodeIsContaining&&!currentContainingBlockComputedStyle:!currentNodeIsContaining&&"static"===computedStyle.position&¤tContainingBlockComputedStyle&&["absolute","fixed"].includes(currentContainingBlockComputedStyle.position)||isOverflowElement(currentNode)&&!currentNodeIsContaining&&hasFixedPositionAncestor(element,currentNode))?result=result.filter((ancestor=>ancestor!==currentNode)):currentContainingBlockComputedStyle=computedStyle,currentNode=getParentNode(currentNode)}return cache.set(element,result),result}(element,this._c):[].concat(boundary),rootBoundary],firstClippingAncestor=clippingAncestors[0],clippingRect=clippingAncestors.reduce(((accRect,clippingAncestor)=>{const rect=getClientRectFromClippingAncestor(element,clippingAncestor,strategy);return accRect.top=floating_ui_utils_max(rect.top,accRect.top),accRect.right=floating_ui_utils_min(rect.right,accRect.right),accRect.bottom=floating_ui_utils_min(rect.bottom,accRect.bottom),accRect.left=floating_ui_utils_max(rect.left,accRect.left),accRect}),getClientRectFromClippingAncestor(element,firstClippingAncestor,strategy));return{width:clippingRect.right-clippingRect.left,height:clippingRect.bottom-clippingRect.top,x:clippingRect.left,y:clippingRect.top}},getOffsetParent,getElementRects:async function(data){const getOffsetParentFn=this.getOffsetParent||getOffsetParent,getDimensionsFn=this.getDimensions,floatingDimensions=await getDimensionsFn(data.floating);return{reference:getRectRelativeToOffsetParent(data.reference,await getOffsetParentFn(data.floating),data.strategy),floating:{x:0,y:0,width:floatingDimensions.width,height:floatingDimensions.height}}},getClientRects:function getClientRects(element){return Array.from(element.getClientRects())},getDimensions:function getDimensions(element){const{width,height}=getCssDimensions(element);return{width,height}},getScale,isElement,isRTL:function isRTL(element){return"rtl"===getComputedStyle(element).direction}};const floating_ui_dom_detectOverflow=detectOverflow,floating_ui_dom_offset=function(options){return void 0===options&&(options=0),{name:"offset",options,async fn(state){var _middlewareData$offse,_middlewareData$arrow;const{x,y,placement,middlewareData}=state,diffCoords=await async function convertValueToCoords(state,options){const{placement,platform,elements}=state,rtl=await(null==platform.isRTL?void 0:platform.isRTL(elements.floating)),side=floating_ui_utils_getSide(placement),alignment=floating_ui_utils_getAlignment(placement),isVertical="y"===floating_ui_utils_getSideAxis(placement),mainAxisMulti=["left","top"].includes(side)?-1:1,crossAxisMulti=rtl&&isVertical?-1:1,rawValue=floating_ui_utils_evaluate(options,state);let{mainAxis,crossAxis,alignmentAxis}="number"==typeof rawValue?{mainAxis:rawValue,crossAxis:0,alignmentAxis:null}:{mainAxis:rawValue.mainAxis||0,crossAxis:rawValue.crossAxis||0,alignmentAxis:rawValue.alignmentAxis};return alignment&&"number"==typeof alignmentAxis&&(crossAxis="end"===alignment?-1*alignmentAxis:alignmentAxis),isVertical?{x:crossAxis*crossAxisMulti,y:mainAxis*mainAxisMulti}:{x:mainAxis*mainAxisMulti,y:crossAxis*crossAxisMulti}}(state,options);return placement===(null==(_middlewareData$offse=middlewareData.offset)?void 0:_middlewareData$offse.placement)&&null!=(_middlewareData$arrow=middlewareData.arrow)&&_middlewareData$arrow.alignmentOffset?{}:{x:x+diffCoords.x,y:y+diffCoords.y,data:{...diffCoords,placement}}}}},floating_ui_dom_shift=function(options){return void 0===options&&(options={}),{name:"shift",options,async fn(state){const{x,y,placement}=state,{mainAxis:checkMainAxis=!0,crossAxis:checkCrossAxis=!1,limiter={fn:_ref=>{let{x,y}=_ref;return{x,y}}},...detectOverflowOptions}=floating_ui_utils_evaluate(options,state),coords={x,y},overflow=await detectOverflow(state,detectOverflowOptions),crossAxis=floating_ui_utils_getSideAxis(floating_ui_utils_getSide(placement)),mainAxis=getOppositeAxis(crossAxis);let mainAxisCoord=coords[mainAxis],crossAxisCoord=coords[crossAxis];if(checkMainAxis){const maxSide="y"===mainAxis?"bottom":"right";mainAxisCoord=clamp(mainAxisCoord+overflow["y"===mainAxis?"top":"left"],mainAxisCoord,mainAxisCoord-overflow[maxSide])}if(checkCrossAxis){const maxSide="y"===crossAxis?"bottom":"right";crossAxisCoord=clamp(crossAxisCoord+overflow["y"===crossAxis?"top":"left"],crossAxisCoord,crossAxisCoord-overflow[maxSide])}const limitedCoords=limiter.fn({...state,[mainAxis]:mainAxisCoord,[crossAxis]:crossAxisCoord});return{...limitedCoords,data:{x:limitedCoords.x-x,y:limitedCoords.y-y,enabled:{[mainAxis]:checkMainAxis,[crossAxis]:checkCrossAxis}}}}}},floating_ui_dom_flip=function(options){return void 0===options&&(options={}),{name:"flip",options,async fn(state){var _middlewareData$arrow,_middlewareData$flip;const{placement,middlewareData,rects,initialPlacement,platform,elements}=state,{mainAxis:checkMainAxis=!0,crossAxis:checkCrossAxis=!0,fallbackPlacements:specifiedFallbackPlacements,fallbackStrategy="bestFit",fallbackAxisSideDirection="none",flipAlignment=!0,...detectOverflowOptions}=floating_ui_utils_evaluate(options,state);if(null!=(_middlewareData$arrow=middlewareData.arrow)&&_middlewareData$arrow.alignmentOffset)return{};const side=floating_ui_utils_getSide(placement),initialSideAxis=floating_ui_utils_getSideAxis(initialPlacement),isBasePlacement=floating_ui_utils_getSide(initialPlacement)===initialPlacement,rtl=await(null==platform.isRTL?void 0:platform.isRTL(elements.floating)),fallbackPlacements=specifiedFallbackPlacements||(isBasePlacement||!flipAlignment?[getOppositePlacement(initialPlacement)]:function getExpandedPlacements(placement){const oppositePlacement=getOppositePlacement(placement);return[floating_ui_utils_getOppositeAlignmentPlacement(placement),oppositePlacement,floating_ui_utils_getOppositeAlignmentPlacement(oppositePlacement)]}(initialPlacement)),hasFallbackAxisSideDirection="none"!==fallbackAxisSideDirection;!specifiedFallbackPlacements&&hasFallbackAxisSideDirection&&fallbackPlacements.push(...function getOppositeAxisPlacements(placement,flipAlignment,direction,rtl){const alignment=floating_ui_utils_getAlignment(placement);let list=function getSideList(side,isStart,rtl){const lr=["left","right"],rl=["right","left"],tb=["top","bottom"],bt=["bottom","top"];switch(side){case"top":case"bottom":return rtl?isStart?rl:lr:isStart?lr:rl;case"left":case"right":return isStart?tb:bt;default:return[]}}(floating_ui_utils_getSide(placement),"start"===direction,rtl);return alignment&&(list=list.map((side=>side+"-"+alignment)),flipAlignment&&(list=list.concat(list.map(floating_ui_utils_getOppositeAlignmentPlacement)))),list}(initialPlacement,flipAlignment,fallbackAxisSideDirection,rtl));const placements=[initialPlacement,...fallbackPlacements],overflow=await detectOverflow(state,detectOverflowOptions),overflows=[];let overflowsData=(null==(_middlewareData$flip=middlewareData.flip)?void 0:_middlewareData$flip.overflows)||[];if(checkMainAxis&&overflows.push(overflow[side]),checkCrossAxis){const sides=function floating_ui_utils_getAlignmentSides(placement,rects,rtl){void 0===rtl&&(rtl=!1);const alignment=floating_ui_utils_getAlignment(placement),alignmentAxis=getAlignmentAxis(placement),length=getAxisLength(alignmentAxis);let mainAlignmentSide="x"===alignmentAxis?alignment===(rtl?"end":"start")?"right":"left":"start"===alignment?"bottom":"top";return rects.reference[length]>rects.floating[length]&&(mainAlignmentSide=getOppositePlacement(mainAlignmentSide)),[mainAlignmentSide,getOppositePlacement(mainAlignmentSide)]}(placement,rects,rtl);overflows.push(overflow[sides[0]],overflow[sides[1]])}if(overflowsData=[...overflowsData,{placement,overflows}],!overflows.every((side=>side<=0))){var _middlewareData$flip2,_overflowsData$filter;const nextIndex=((null==(_middlewareData$flip2=middlewareData.flip)?void 0:_middlewareData$flip2.index)||0)+1,nextPlacement=placements[nextIndex];if(nextPlacement)return{data:{index:nextIndex,overflows:overflowsData},reset:{placement:nextPlacement}};let resetPlacement=null==(_overflowsData$filter=overflowsData.filter((d=>d.overflows[0]<=0)).sort(((a,b)=>a.overflows[1]-b.overflows[1]))[0])?void 0:_overflowsData$filter.placement;if(!resetPlacement)switch(fallbackStrategy){case"bestFit":{var _overflowsData$filter2;const placement=null==(_overflowsData$filter2=overflowsData.filter((d=>{if(hasFallbackAxisSideDirection){const currentSideAxis=floating_ui_utils_getSideAxis(d.placement);return currentSideAxis===initialSideAxis||"y"===currentSideAxis}return!0})).map((d=>[d.placement,d.overflows.filter((overflow=>overflow>0)).reduce(((acc,overflow)=>acc+overflow),0)])).sort(((a,b)=>a[1]-b[1]))[0])?void 0:_overflowsData$filter2[0];placement&&(resetPlacement=placement);break}case"initialPlacement":resetPlacement=initialPlacement}if(placement!==resetPlacement)return{reset:{placement:resetPlacement}}}return{}}}},floating_ui_dom_size=function(options){return void 0===options&&(options={}),{name:"size",options,async fn(state){var _state$middlewareData,_state$middlewareData2;const{placement,rects,platform,elements}=state,{apply=()=>{},...detectOverflowOptions}=floating_ui_utils_evaluate(options,state),overflow=await detectOverflow(state,detectOverflowOptions),side=floating_ui_utils_getSide(placement),alignment=floating_ui_utils_getAlignment(placement),isYAxis="y"===floating_ui_utils_getSideAxis(placement),{width,height}=rects.floating;let heightSide,widthSide;"top"===side||"bottom"===side?(heightSide=side,widthSide=alignment===(await(null==platform.isRTL?void 0:platform.isRTL(elements.floating))?"start":"end")?"left":"right"):(widthSide=side,heightSide="end"===alignment?"top":"bottom");const maximumClippingHeight=height-overflow.top-overflow.bottom,maximumClippingWidth=width-overflow.left-overflow.right,overflowAvailableHeight=floating_ui_utils_min(height-overflow[heightSide],maximumClippingHeight),overflowAvailableWidth=floating_ui_utils_min(width-overflow[widthSide],maximumClippingWidth),noShift=!state.middlewareData.shift;let availableHeight=overflowAvailableHeight,availableWidth=overflowAvailableWidth;if(null!=(_state$middlewareData=state.middlewareData.shift)&&_state$middlewareData.enabled.x&&(availableWidth=maximumClippingWidth),null!=(_state$middlewareData2=state.middlewareData.shift)&&_state$middlewareData2.enabled.y&&(availableHeight=maximumClippingHeight),noShift&&!alignment){const xMin=floating_ui_utils_max(overflow.left,0),xMax=floating_ui_utils_max(overflow.right,0),yMin=floating_ui_utils_max(overflow.top,0),yMax=floating_ui_utils_max(overflow.bottom,0);isYAxis?availableWidth=width-2*(0!==xMin||0!==xMax?xMin+xMax:floating_ui_utils_max(overflow.left,overflow.right)):availableHeight=height-2*(0!==yMin||0!==yMax?yMin+yMax:floating_ui_utils_max(overflow.top,overflow.bottom))}await apply({...state,availableWidth,availableHeight});const nextDimensions=await platform.getDimensions(elements.floating);return width!==nextDimensions.width||height!==nextDimensions.height?{reset:{rects:!0}}:{}}}},floating_ui_dom_hide=function(options){return void 0===options&&(options={}),{name:"hide",options,async fn(state){const{rects}=state,{strategy="referenceHidden",...detectOverflowOptions}=floating_ui_utils_evaluate(options,state);switch(strategy){case"referenceHidden":{const offsets=getSideOffsets(await detectOverflow(state,{...detectOverflowOptions,elementContext:"reference"}),rects.reference);return{data:{referenceHiddenOffsets:offsets,referenceHidden:isAnySideFullyClipped(offsets)}}}case"escaped":{const offsets=getSideOffsets(await detectOverflow(state,{...detectOverflowOptions,altBoundary:!0}),rects.floating);return{data:{escapedOffsets:offsets,escaped:isAnySideFullyClipped(offsets)}}}default:return{}}}}},floating_ui_dom_arrow=options=>({name:"arrow",options,async fn(state){const{x,y,placement,rects,platform,elements,middlewareData}=state,{element,padding=0}=floating_ui_utils_evaluate(options,state)||{};if(null==element)return{};const paddingObject=floating_ui_utils_getPaddingObject(padding),coords={x,y},axis=getAlignmentAxis(placement),length=getAxisLength(axis),arrowDimensions=await platform.getDimensions(element),isYAxis="y"===axis,minProp=isYAxis?"top":"left",maxProp=isYAxis?"bottom":"right",clientProp=isYAxis?"clientHeight":"clientWidth",endDiff=rects.reference[length]+rects.reference[axis]-coords[axis]-rects.floating[length],startDiff=coords[axis]-rects.reference[axis],arrowOffsetParent=await(null==platform.getOffsetParent?void 0:platform.getOffsetParent(element));let clientSize=arrowOffsetParent?arrowOffsetParent[clientProp]:0;clientSize&&await(null==platform.isElement?void 0:platform.isElement(arrowOffsetParent))||(clientSize=elements.floating[clientProp]||rects.floating[length]);const centerToReference=endDiff/2-startDiff/2,largestPossiblePadding=clientSize/2-arrowDimensions[length]/2-1,minPadding=floating_ui_utils_min(paddingObject[minProp],largestPossiblePadding),maxPadding=floating_ui_utils_min(paddingObject[maxProp],largestPossiblePadding),min$1=minPadding,max=clientSize-arrowDimensions[length]-maxPadding,center=clientSize/2-arrowDimensions[length]/2+centerToReference,offset=clamp(min$1,center,max),shouldAddOffset=!middlewareData.arrow&&null!=floating_ui_utils_getAlignment(placement)&¢er!==offset&&rects.reference[length]/2-(centerlimitMax&&(mainAxisCoord=limitMax)}if(checkCrossAxis){var _middlewareData$offse,_middlewareData$offse2;const len="y"===mainAxis?"width":"height",isOriginSide=["top","left"].includes(floating_ui_utils_getSide(placement)),limitMin=rects.reference[crossAxis]-rects.floating[len]+(isOriginSide&&(null==(_middlewareData$offse=middlewareData.offset)?void 0:_middlewareData$offse[crossAxis])||0)+(isOriginSide?0:computedOffset.crossAxis),limitMax=rects.reference[crossAxis]+rects.reference[len]+(isOriginSide?0:(null==(_middlewareData$offse2=middlewareData.offset)?void 0:_middlewareData$offse2[crossAxis])||0)-(isOriginSide?computedOffset.crossAxis:0);crossAxisCoordlimitMax&&(crossAxisCoord=limitMax)}return{[mainAxis]:mainAxisCoord,[crossAxis]:crossAxisCoord}}}},floating_ui_dom_computePosition=(reference,floating,options)=>{const cache=new Map,mergedOptions={platform,...options},platformWithCache={...mergedOptions.platform,_c:cache};return(async(reference,floating,config)=>{const{placement="bottom",strategy="absolute",middleware=[],platform}=config,validMiddleware=middleware.filter(Boolean),rtl=await(null==platform.isRTL?void 0:platform.isRTL(floating));let rects=await platform.getElementRects({reference,floating,strategy}),{x,y}=computeCoordsFromPlacement(rects,placement,rtl),statefulPlacement=placement,middlewareData={},resetCount=0;for(let i=0;i{"use strict";__webpack_require__.d(__webpack_exports__,{F:()=>IconDirectionContextProvider,U:()=>useIconContext});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const IconDirectionContext=react__WEBPACK_IMPORTED_MODULE_0__.createContext(void 0),IconDirectionContextDefaultValue={},IconDirectionContextProvider=IconDirectionContext.Provider,useIconContext=()=>{const context=react__WEBPACK_IMPORTED_MODULE_0__.useContext(IconDirectionContext);return null!=context?context:IconDirectionContextDefaultValue}},"./node_modules/@fluentui/react-icons/lib/icons/chunk-1.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Crl:()=>ChevronRightRegular,NGN:()=>ChevronLeftFilled,Tox:()=>DismissCircleFilled,gcm:()=>CheckmarkCircleFilled,nUb:()=>ChevronLeftRegular,oAB:()=>ChevronRightFilled,xeZ:()=>CircleFilled,yuG:()=>ChevronDownRegular});var _utils_createFluentIcon__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@fluentui/react-icons/lib/utils/createFluentIcon.js");const CheckmarkCircleFilled=(0,_utils_createFluentIcon__WEBPACK_IMPORTED_MODULE_0__.U)("CheckmarkCircleFilled","1em",["M10 2a8 8 0 1 1 0 16 8 8 0 0 1 0-16Zm3.36 5.65a.5.5 0 0 0-.64-.06l-.07.06L9 11.3 7.35 9.65l-.07-.06a.5.5 0 0 0-.7.7l.07.07 2 2 .07.06c.17.11.4.11.56 0l.07-.06 4-4 .07-.08a.5.5 0 0 0-.06-.63Z"]),ChevronDownRegular=(0,_utils_createFluentIcon__WEBPACK_IMPORTED_MODULE_0__.U)("ChevronDownRegular","1em",["M15.85 7.65c.2.2.2.5 0 .7l-5.46 5.49a.55.55 0 0 1-.78 0L4.15 8.35a.5.5 0 1 1 .7-.7L10 12.8l5.15-5.16c.2-.2.5-.2.7 0Z"]),ChevronLeftFilled=(0,_utils_createFluentIcon__WEBPACK_IMPORTED_MODULE_0__.U)("ChevronLeftFilled","1em",["M12.27 15.8a.75.75 0 0 1-1.06-.03l-5-5.25a.75.75 0 0 1 0-1.04l5-5.25a.75.75 0 1 1 1.08 1.04L7.8 10l4.5 4.73c.29.3.28.78-.02 1.06Z"]),ChevronLeftRegular=(0,_utils_createFluentIcon__WEBPACK_IMPORTED_MODULE_0__.U)("ChevronLeftRegular","1em",["M12.35 15.85a.5.5 0 0 1-.7 0L6.16 10.4a.55.55 0 0 1 0-.78l5.49-5.46a.5.5 0 1 1 .7.7L7.2 10l5.16 5.15c.2.2.2.5 0 .7Z"]),ChevronRightFilled=(0,_utils_createFluentIcon__WEBPACK_IMPORTED_MODULE_0__.U)("ChevronRightFilled","1em",["M7.73 4.2a.75.75 0 0 1 1.06.03l5 5.25c.28.3.28.75 0 1.04l-5 5.25a.75.75 0 1 1-1.08-1.04L12.2 10l-4.5-4.73a.75.75 0 0 1 .02-1.06Z"]),ChevronRightRegular=(0,_utils_createFluentIcon__WEBPACK_IMPORTED_MODULE_0__.U)("ChevronRightRegular","1em",["M7.65 4.15c.2-.2.5-.2.7 0l5.49 5.46c.21.22.21.57 0 .78l-5.49 5.46a.5.5 0 0 1-.7-.7L12.8 10 7.65 4.85a.5.5 0 0 1 0-.7Z"]),CircleFilled=(0,_utils_createFluentIcon__WEBPACK_IMPORTED_MODULE_0__.U)("CircleFilled","1em",["M10 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Z"]),DismissCircleFilled=(0,_utils_createFluentIcon__WEBPACK_IMPORTED_MODULE_0__.U)("DismissCircleFilled","1em",["M10 2a8 8 0 1 1 0 16 8 8 0 0 1 0-16ZM7.8 7.11a.5.5 0 0 0-.63.06l-.06.07a.5.5 0 0 0 .06.64L9.3 10l-2.12 2.12-.06.07a.5.5 0 0 0 .06.64l.07.06c.2.13.47.11.64-.06L10 10.7l2.12 2.12.07.06c.2.13.46.11.64-.06l.06-.07a.5.5 0 0 0-.06-.64L10.7 10l2.12-2.12.06-.07a.5.5 0 0 0-.06-.64l-.07-.06a.5.5 0 0 0-.64.06L10 9.3 7.88 7.17l-.07-.06Z"])},"./node_modules/@fluentui/react-icons/lib/icons/chunk-2.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{N_H:()=>InfoFilled});var _utils_createFluentIcon__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@fluentui/react-icons/lib/utils/createFluentIcon.js");const InfoFilled=(0,_utils_createFluentIcon__WEBPACK_IMPORTED_MODULE_0__.U)("InfoFilled","1em",["M18 10a8 8 0 1 0-16 0 8 8 0 0 0 16 0ZM9.5 8.91a.5.5 0 0 1 1 0V13.6a.5.5 0 0 1-1 0V8.9Zm-.25-2.16a.75.75 0 1 1 1.5 0 .75.75 0 0 1-1.5 0Z"])},"./node_modules/@fluentui/react-icons/lib/icons/chunk-3.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{G4V:()=>MarkdownRegular,oX$:()=>MarkdownFilled});var _utils_createFluentIcon__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@fluentui/react-icons/lib/utils/createFluentIcon.js");const MarkdownFilled=(0,_utils_createFluentIcon__WEBPACK_IMPORTED_MODULE_0__.U)("MarkdownFilled","1em",["M2.5 4.05c.29-.11.62-.03.82.21L7 8.6l3.68-4.33a.75.75 0 0 1 1.32.49v9.5a.75.75 0 0 1-1.5 0V6.79l-2.93 3.45a.75.75 0 0 1-1.14 0L3.5 6.79v7.46a.75.75 0 0 1-1.5 0v-9.5c0-.31.2-.6.5-.7Zm10.72 7.67c.3-.3.77-.3 1.06 0l.72.72V4.75a.75.75 0 0 1 1.5 0v7.69l.72-.72a.75.75 0 1 1 1.06 1.06l-2 2c-.3.3-.77.3-1.06 0l-2-2a.75.75 0 0 1 0-1.06Z"]),MarkdownRegular=(0,_utils_createFluentIcon__WEBPACK_IMPORTED_MODULE_0__.U)("MarkdownRegular","1em",["M16 4.5a.5.5 0 0 0-1 0v8.8l-1.15-1.15a.5.5 0 0 0-.7.7l2 2c.2.2.5.2.7 0l2-2a.5.5 0 0 0-.7-.7L16 13.29V4.5ZM2.32 4.03a.5.5 0 0 1 .55.14L7 8.75l4.13-4.58a.5.5 0 0 1 .87.33v10a.5.5 0 1 1-1 0V5.8L7.37 9.83a.5.5 0 0 1-.74 0L3 5.8v8.7a.5.5 0 1 1-1 0v-10c0-.2.13-.4.32-.47Z"])},"./node_modules/@fluentui/react-icons/lib/icons/chunk-5.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{BFW:()=>WarningFilled});var _utils_createFluentIcon__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@fluentui/react-icons/lib/utils/createFluentIcon.js");const WarningFilled=(0,_utils_createFluentIcon__WEBPACK_IMPORTED_MODULE_0__.U)("WarningFilled","1em",["M8.68 2.79a1.5 1.5 0 0 1 2.64 0l6.5 12A1.5 1.5 0 0 1 16.5 17h-13a1.5 1.5 0 0 1-1.32-2.21l6.5-12ZM10.5 7.5a.5.5 0 0 0-1 0v4a.5.5 0 0 0 1 0v-4Zm.25 6.25a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Z"])},"./node_modules/@fluentui/react-icons/lib/sizedIcons/chunk-3.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{FUA:()=>Checkmark16Filled});var _utils_createFluentIcon__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@fluentui/react-icons/lib/utils/createFluentIcon.js");const Checkmark16Filled=(0,_utils_createFluentIcon__WEBPACK_IMPORTED_MODULE_0__.U)("Checkmark16Filled","16",["M14.05 3.49c.28.3.27.77-.04 1.06l-7.93 7.47A.85.85 0 0 1 4.9 12L2.22 9.28a.75.75 0 1 1 1.06-1.06l2.24 2.27 7.47-7.04a.75.75 0 0 1 1.06.04Z"])},"./node_modules/@fluentui/react-icons/lib/utils/bundleIcon.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>utils_bundleIcon});var react=__webpack_require__("./node_modules/react/index.js"),mergeClasses_esm=__webpack_require__("./node_modules/@griffel/core/mergeClasses.esm.js"),constants=__webpack_require__("./node_modules/@fluentui/react-icons/lib/utils/constants.js");const useBundledIconStyles=(0,__webpack_require__("./node_modules/@griffel/react/__styles.esm.js").X)({root:{mc9l5x:"fjseox"},visible:{mc9l5x:"f1w7gpdv"}},{d:[".fjseox{display:none;}",".f1w7gpdv{display:inline;}"]}),utils_bundleIcon=(FilledIcon,RegularIcon)=>{const Component=props=>{const{className,filled,...rest}=props,styles=useBundledIconStyles();return react.createElement(react.Fragment,null,react.createElement(FilledIcon,Object.assign({},rest,{className:(0,mergeClasses_esm.z)(styles.root,filled&&styles.visible,constants.ru,className)})),react.createElement(RegularIcon,Object.assign({},rest,{className:(0,mergeClasses_esm.z)(styles.root,!filled&&styles.visible,constants.$C,className)})))};return Component.displayName="CompoundIcon",Component}},"./node_modules/@fluentui/react-icons/lib/utils/constants.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$C:()=>iconRegularClassName,ru:()=>iconFilledClassName});const iconFilledClassName="fui-Icon-filled",iconRegularClassName="fui-Icon-regular"},"./node_modules/@fluentui/react-icons/lib/utils/createFluentIcon.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U:()=>createFluentIcon});var react=__webpack_require__("./node_modules/react/index.js"),mergeClasses_esm=__webpack_require__("./node_modules/@griffel/core/mergeClasses.esm.js"),IconDirectionContext=__webpack_require__("./node_modules/@fluentui/react-icons/lib/contexts/IconDirectionContext.js"),_styles_esm=__webpack_require__("./node_modules/@griffel/react/__styles.esm.js");const useStyles=(0,_styles_esm.X)({root:{mc9l5x:"f1w7gpdv",Bg96gwp:"fez10in"},rtl:{Bz10aip:"f13rod7r"}},{d:[".f1w7gpdv{display:inline;}",".fez10in{line-height:0;}",".f13rod7r{transform:scaleX(-1);}"]}),useRootStyles=(0,_styles_esm.X)({root:{B8gzw0y:"f1dd5bof"}},{m:[["@media (forced-colors: active){.f1dd5bof{forced-color-adjust:auto;}}",{m:"(forced-colors: active)"}]]}),createFluentIcon=(displayName,width,pathsOrSvg,options)=>{const viewBoxWidth="1em"===width?"20":width,Icon=react.forwardRef(((props,ref)=>{const styles=useRootStyles(),iconState=((props,options)=>{const{title,primaryFill="currentColor",...rest}=props,state={...rest,title:void 0,fill:primaryFill},styles=useStyles(),iconContext=(0,IconDirectionContext.U)();return state.className=(0,mergeClasses_esm.z)(styles.root,(null==options?void 0:options.flipInRtl)&&"rtl"===(null==iconContext?void 0:iconContext.textDirection)&&styles.rtl,state.className),title&&(state["aria-label"]=title),state["aria-label"]||state["aria-labelledby"]?state.role="img":state["aria-hidden"]=!0,state})(props,{flipInRtl:null==options?void 0:options.flipInRtl}),state={...iconState,className:(0,mergeClasses_esm.z)(iconState.className,styles.root),ref,width,height:width,viewBox:`0 0 ${viewBoxWidth} ${viewBoxWidth}`,xmlns:"http://www.w3.org/2000/svg"};return"string"==typeof pathsOrSvg?react.createElement("svg",{...state,dangerouslySetInnerHTML:{__html:pathsOrSvg}}):react.createElement("svg",state,...pathsOrSvg.map((d=>react.createElement("path",{d,fill:state.fill}))))}));return Icon.displayName=displayName,Icon}},"./node_modules/@griffel/core/constants.esm.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{AX:()=>LOOKUP_DIR_INDEX,EJ:()=>DATA_PRIORITY_ATTR,Eo:()=>RESET_HASH_PREFIX,FS:()=>LOOKUP_DEFINITIONS_INDEX,Ut:()=>RESET,aN:()=>HASH_PREFIX,ed:()=>DATA_BUCKET_ATTR,ez:()=>SEQUENCE_HASH_LENGTH,fj:()=>SEQUENCE_PREFIX,k1:()=>DEFINITION_LOOKUP_TABLE,qw:()=>UNSUPPORTED_CSS_PROPERTIES,wn:()=>SEQUENCE_SIZE});const __GLOBAL__="undefined"==typeof window?__webpack_require__.g:window;function getGlobalVar(name,defaultValue){return __GLOBAL__[Symbol.for("@griffel/"+name)]||(__GLOBAL__[Symbol.for("@griffel/"+name)]=defaultValue),__GLOBAL__[Symbol.for("@griffel/"+name)]}const DEFINITION_LOOKUP_TABLE=getGlobalVar("DEFINITION_LOOKUP_TABLE",{}),DATA_BUCKET_ATTR="data-make-styles-bucket",DATA_PRIORITY_ATTR="data-priority",HASH_PREFIX="f",RESET_HASH_PREFIX="r",SEQUENCE_HASH_LENGTH=7,SEQUENCE_PREFIX="___",SEQUENCE_SIZE=SEQUENCE_PREFIX.length+SEQUENCE_HASH_LENGTH,LOOKUP_DEFINITIONS_INDEX=0,LOOKUP_DIR_INDEX=1,UNSUPPORTED_CSS_PROPERTIES={all:1,borderColor:1,borderStyle:1,borderWidth:1,borderBlock:1,borderBlockEnd:1,borderBlockStart:1,borderInline:1,borderInlineEnd:1,borderInlineStart:1},RESET="DO_NOT_USE_DIRECTLY: @griffel/reset-value"},"./node_modules/@griffel/core/index.esm.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Pt:()=>shorthands});const positionMap=["Top","Right","Bottom","Left"];function generateStyles(property,suffix,...values){const[firstValue,secondValue=firstValue,thirdValue=firstValue,fourthValue=secondValue]=values,valuesWithDefaults=[firstValue,secondValue,thirdValue,fourthValue],styles={};for(let i=0;i"number"==typeof value&&!Number.isNaN(value),isAuto=value=>"auto"===value,widthReservedKeys=["content","fit-content","max-content","min-content"],isWidth=value=>widthReservedKeys.some((key=>value===key))||(value=>"string"==typeof value&&/(\d+(\w+|%))/.test(value))(value);const cssVarRegEx=/var\(.*\)/gi;const customIdentRegEx=/^[a-zA-Z0-9\-_\\#;]+$/,nonCustomIdentRegEx=/^-moz-initial$|^auto$|^initial$|^inherit$|^revert$|^unset$|^span \d+$|^\d.*/;function isCustomIdent(value){return void 0!==value&&"string"==typeof value&&customIdentRegEx.test(value)&&!nonCustomIdentRegEx.test(value)}const transitionGlobalInputs=["-moz-initial","inherit","initial","revert","unset"];const textDecorationStyleInputs=["dashed","dotted","double","solid","wavy"];const shorthands={border:function border(...values){return isBorderStyle(values[0])?Object.assign({},borderStyle(values[0]),values[1]&&borderWidth(values[1]),values[2]&&borderColor(values[2])):Object.assign({},borderWidth(values[0]),values[1]&&borderStyle(values[1]),values[2]&&borderColor(values[2]))},borderLeft:function borderLeft(...values){return isBorderStyle(values[0])?Object.assign({borderLeftStyle:values[0]},values[1]&&{borderLeftWidth:values[1]},values[2]&&{borderLeftColor:values[2]}):Object.assign({borderLeftWidth:values[0]},values[1]&&{borderLeftStyle:values[1]},values[2]&&{borderLeftColor:values[2]})},borderBottom:function borderBottom(...values){return isBorderStyle(values[0])?Object.assign({borderBottomStyle:values[0]},values[1]&&{borderBottomWidth:values[1]},values[2]&&{borderBottomColor:values[2]}):Object.assign({borderBottomWidth:values[0]},values[1]&&{borderBottomStyle:values[1]},values[2]&&{borderBottomColor:values[2]})},borderRight:function borderRight(...values){return isBorderStyle(values[0])?Object.assign({borderRightStyle:values[0]},values[1]&&{borderRightWidth:values[1]},values[2]&&{borderRightColor:values[2]}):Object.assign({borderRightWidth:values[0]},values[1]&&{borderRightStyle:values[1]},values[2]&&{borderRightColor:values[2]})},borderTop:function borderTop(...values){return isBorderStyle(values[0])?Object.assign({borderTopStyle:values[0]},values[1]&&{borderTopWidth:values[1]},values[2]&&{borderTopColor:values[2]}):Object.assign({borderTopWidth:values[0]},values[1]&&{borderTopStyle:values[1]},values[2]&&{borderTopColor:values[2]})},borderColor,borderStyle,borderRadius:function borderRadius(value1,value2=value1,value3=value1,value4=value2){return{borderBottomRightRadius:value3,borderBottomLeftRadius:value4,borderTopRightRadius:value2,borderTopLeftRadius:value1}},borderWidth,flex:function flex(...values){const isOneValueSyntax=1===values.length,isTwoValueSyntax=2===values.length,isThreeValueSyntax=3===values.length;if(isOneValueSyntax){const[firstValue]=values;if("initial"===firstValue)return{flexGrow:0,flexShrink:1,flexBasis:"auto"};if(isAuto(firstValue))return{flexGrow:1,flexShrink:1,flexBasis:"auto"};if((value=>"none"===value)(firstValue))return{flexGrow:0,flexShrink:0,flexBasis:"auto"};if(isUnitless(firstValue))return{flexGrow:firstValue,flexShrink:1,flexBasis:0};if(isWidth(firstValue))return{flexGrow:1,flexShrink:1,flexBasis:firstValue}}if(isTwoValueSyntax){const[firstValue,secondValue]=values;if(isUnitless(secondValue))return{flexGrow:firstValue,flexShrink:secondValue,flexBasis:0};if(isWidth(secondValue))return{flexGrow:firstValue,flexShrink:1,flexBasis:secondValue}}if(isThreeValueSyntax){const[firstValue,secondValue,thirdValue]=values;if(isUnitless(firstValue)&&isUnitless(secondValue)&&(isAuto(thirdValue)||isWidth(thirdValue)))return{flexGrow:firstValue,flexShrink:secondValue,flexBasis:thirdValue}}return{}},gap:function gap(columnGap,rowGap=columnGap){return{columnGap,rowGap}},gridArea:function gridArea(...values){if(values.some((value=>!function isValidGridAreaInput(value){return void 0===value||"number"==typeof value||"string"==typeof value&&!cssVarRegEx.test(value)}(value))))return{};const gridRowStart=void 0!==values[0]?values[0]:"auto",gridColumnStart=void 0!==values[1]?values[1]:isCustomIdent(gridRowStart)?gridRowStart:"auto";return{gridRowStart,gridColumnStart,gridRowEnd:void 0!==values[2]?values[2]:isCustomIdent(gridRowStart)?gridRowStart:"auto",gridColumnEnd:void 0!==values[3]?values[3]:isCustomIdent(gridColumnStart)?gridColumnStart:"auto"}},margin:function margin(...values){return generateStyles("margin","",...values)},marginBlock:function marginBlock(start,end=start){return{marginBlockStart:start,marginBlockEnd:end}},marginInline:function marginInline(start,end=start){return{marginInlineStart:start,marginInlineEnd:end}},padding:function padding(...values){return generateStyles("padding","",...values)},paddingBlock:function paddingBlock(start,end=start){return{paddingBlockStart:start,paddingBlockEnd:end}},paddingInline:function paddingInline(start,end=start){return{paddingInlineStart:start,paddingInlineEnd:end}},overflow:function overflow(overflowX,overflowY=overflowX){return{overflowX,overflowY}},inset:function inset(...values){const[firstValue,secondValue=firstValue,thirdValue=firstValue,fourthValue=secondValue]=values;return{top:firstValue,right:secondValue,bottom:thirdValue,left:fourthValue}},outline:function outline(outlineWidth,outlineStyle,outlineColor){return Object.assign({outlineWidth},outlineStyle&&{outlineStyle},outlineColor&&{outlineColor})},transition:function transition(...values){return function isTransitionGlobalInputs(values){return 1===values.length&&transitionGlobalInputs.includes(values[0])}(values)?{transitionDelay:values[0],transitionDuration:values[0],transitionProperty:values[0],transitionTimingFunction:values[0]}:function normalizeTransitionInputs(transitionInputs){if(1===transitionInputs.length&&Array.isArray(transitionInputs[0]))return transitionInputs[0];return[transitionInputs]}(values).reduce(((acc,[property,duration="0s",delay="0s",timingFunction="ease"],index)=>(0===index?(acc.transitionProperty=property,acc.transitionDuration=duration,acc.transitionDelay=delay,acc.transitionTimingFunction=timingFunction):(acc.transitionProperty+=`, ${property}`,acc.transitionDuration+=`, ${duration}`,acc.transitionDelay+=`, ${delay}`,acc.transitionTimingFunction+=`, ${timingFunction}`),acc)),{})},textDecoration:function textDecoration(value,...values){if(0===values.length)return function isTextDecorationStyleInput(value){return textDecorationStyleInputs.includes(value)}(value)?{textDecorationStyle:value}:{textDecorationLine:value};const[textDecorationStyle,textDecorationColor,textDecorationThickness]=values;return Object.assign({textDecorationLine:value},textDecorationStyle&&{textDecorationStyle},textDecorationColor&&{textDecorationColor},textDecorationThickness&&{textDecorationThickness})}}},"./node_modules/@griffel/core/insertionFactory.esm.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>insertionFactory});const insertionFactory=()=>{const insertionCache={};return function insertStyles(renderer,cssRules){void 0===insertionCache[renderer.id]&&(renderer.insertCSSRules(cssRules),insertionCache[renderer.id]=!0)}}},"./node_modules/@griffel/core/makeStyles.esm.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{n:()=>makeStyles});var insertionFactory_esm=__webpack_require__("./node_modules/@griffel/core/insertionFactory.esm.js"),emotion_hash_esm=__webpack_require__("./node_modules/@griffel/core/node_modules/@emotion/hash/dist/emotion-hash.esm.js"),core=__webpack_require__("./node_modules/rtl-css-js/dist/esm/core.js"),constants_esm=__webpack_require__("./node_modules/@griffel/core/constants.esm.js"),compileAtomicCSSRule_esm=__webpack_require__("./node_modules/@griffel/core/runtime/compileAtomicCSSRule.esm.js"),compileKeyframeCSS_esm=__webpack_require__("./node_modules/@griffel/core/runtime/compileKeyframeCSS.esm.js");const shorthands={animation:[-1,["animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationTimeline","animationTimingFunction"]],animationRange:[-1,["animationRangeEnd","animationRangeStart"]],background:[-2,["backgroundAttachment","backgroundClip","backgroundColor","backgroundImage","backgroundOrigin","backgroundPosition","backgroundPositionX","backgroundPositionY","backgroundRepeat","backgroundSize"]],backgroundPosition:[-1,["backgroundPositionX","backgroundPositionY"]],border:[-2,["borderBottom","borderBottomColor","borderBottomStyle","borderBottomWidth","borderLeft","borderLeftColor","borderLeftStyle","borderLeftWidth","borderRight","borderRightColor","borderRightStyle","borderRightWidth","borderTop","borderTopColor","borderTopStyle","borderTopWidth"]],borderBottom:[-1,["borderBottomColor","borderBottomStyle","borderBottomWidth"]],borderImage:[-1,["borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth"]],borderLeft:[-1,["borderLeftColor","borderLeftStyle","borderLeftWidth"]],borderRadius:[-1,["borderBottomLeftRadius","borderBottomRightRadius","borderTopLeftRadius","borderTopRightRadius"]],borderRight:[-1,["borderRightColor","borderRightStyle","borderRightWidth"]],borderTop:[-1,["borderTopColor","borderTopStyle","borderTopWidth"]],caret:[-1,["caretColor","caretShape"]],columnRule:[-1,["columnRuleColor","columnRuleStyle","columnRuleWidth"]],columns:[-1,["columnCount","columnWidth"]],containIntrinsicSize:[-1,["containIntrinsicHeight","containIntrinsicWidth"]],container:[-1,["containerName","containerType"]],flex:[-1,["flexBasis","flexGrow","flexShrink"]],flexFlow:[-1,["flexDirection","flexWrap"]],font:[-1,["fontFamily","fontSize","fontStretch","fontStyle","fontVariant","fontWeight","lineHeight"]],gap:[-1,["columnGap","rowGap"]],grid:[-1,["columnGap","gridAutoColumns","gridAutoFlow","gridAutoRows","gridColumnGap","gridRowGap","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","rowGap"]],gridArea:[-1,["gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart"]],gridColumn:[-1,["gridColumnEnd","gridColumnStart"]],gridRow:[-1,["gridRowEnd","gridRowStart"]],gridTemplate:[-1,["gridTemplateAreas","gridTemplateColumns","gridTemplateRows"]],inset:[-1,["bottom","left","right","top"]],insetBlock:[-1,["insetBlockEnd","insetBlockStart"]],insetInline:[-1,["insetInlineEnd","insetInlineStart"]],listStyle:[-1,["listStyleImage","listStylePosition","listStyleType"]],margin:[-1,["marginBottom","marginLeft","marginRight","marginTop"]],marginBlock:[-1,["marginBlockEnd","marginBlockStart"]],marginInline:[-1,["marginInlineEnd","marginInlineStart"]],mask:[-1,["maskClip","maskComposite","maskImage","maskMode","maskOrigin","maskPosition","maskRepeat","maskSize"]],maskBorder:[-1,["maskBorderMode","maskBorderOutset","maskBorderRepeat","maskBorderSlice","maskBorderSource","maskBorderWidth"]],offset:[-1,["offsetAnchor","offsetDistance","offsetPath","offsetPosition","offsetRotate"]],outline:[-1,["outlineColor","outlineStyle","outlineWidth"]],overflow:[-1,["overflowX","overflowY"]],overscrollBehavior:[-1,["overscrollBehaviorX","overscrollBehaviorY"]],padding:[-1,["paddingBottom","paddingLeft","paddingRight","paddingTop"]],paddingBlock:[-1,["paddingBlockEnd","paddingBlockStart"]],paddingInline:[-1,["paddingInlineEnd","paddingInlineStart"]],placeContent:[-1,["alignContent","justifyContent"]],placeItems:[-1,["alignItems","justifyItems"]],placeSelf:[-1,["alignSelf","justifySelf"]],scrollMargin:[-1,["scrollMarginBottom","scrollMarginLeft","scrollMarginRight","scrollMarginTop"]],scrollMarginBlock:[-1,["scrollMarginBlockEnd","scrollMarginBlockStart"]],scrollMarginInline:[-1,["scrollMarginInlineEnd","scrollMarginInlineStart"]],scrollPadding:[-1,["scrollPaddingBottom","scrollPaddingLeft","scrollPaddingRight","scrollPaddingTop"]],scrollPaddingBlock:[-1,["scrollPaddingBlockEnd","scrollPaddingBlockStart"]],scrollPaddingInline:[-1,["scrollPaddingInlineEnd","scrollPaddingInlineStart"]],scrollTimeline:[-1,["scrollTimelineAxis","scrollTimelineName"]],textDecoration:[-1,["textDecorationColor","textDecorationLine","textDecorationStyle","textDecorationThickness"]],textEmphasis:[-1,["textEmphasisColor","textEmphasisStyle"]],transition:[-1,["transitionBehavior","transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction"]],viewTimeline:[-1,["viewTimelineAxis","viewTimelineName"]]};function generateCombinedQuery(currentMediaQuery,nestedMediaQuery){return 0===currentMediaQuery.length?nestedMediaQuery:`${currentMediaQuery} and ${nestedMediaQuery}`}var isMediaQuerySelector_esm=__webpack_require__("./node_modules/@griffel/core/runtime/utils/isMediaQuerySelector.esm.js"),isLayerSelector_esm=__webpack_require__("./node_modules/@griffel/core/runtime/utils/isLayerSelector.esm.js"),isNestedSelector_esm=__webpack_require__("./node_modules/@griffel/core/runtime/utils/isNestedSelector.esm.js"),isSupportQuerySelector_esm=__webpack_require__("./node_modules/@griffel/core/runtime/utils/isSupportQuerySelector.esm.js"),isContainerQuerySelector_esm=__webpack_require__("./node_modules/@griffel/core/runtime/utils/isContainerQuerySelector.esm.js"),normalizeNestedProperty_esm=__webpack_require__("./node_modules/@griffel/core/runtime/utils/normalizeNestedProperty.esm.js"),isObject_esm=__webpack_require__("./node_modules/@griffel/core/runtime/utils/isObject.esm.js");const pseudosMap={"us-w":"w","us-v":"i",nk:"l",si:"v",cu:"f",ve:"h",ti:"a"};function getStyleBucketName(selectors,atRules){if(atRules.media)return"m";if(atRules.layer||atRules.supports)return"t";if(atRules.container)return"c";if(selectors.length>0){const normalizedPseudo=selectors[0].trim();if(58===normalizedPseudo.charCodeAt(0))return pseudosMap[normalizedPseudo.slice(4,8)]||pseudosMap[normalizedPseudo.slice(3,5)]||"d"}return"d"}function addAtRulePrefix(atRule,prefix){return atRule?prefix+atRule:atRule}function atRulesToString(atRules){return addAtRulePrefix(atRules.container,"c")+addAtRulePrefix(atRules.media,"m")+addAtRulePrefix(atRules.layer,"l")+addAtRulePrefix(atRules.supports,"s")}function hashPropertyKey(selector,property,atRules){const computedKey=selector+atRulesToString(atRules)+property,hashedKey=(0,emotion_hash_esm.A)(computedKey),firstCharCode=hashedKey.charCodeAt(0);return firstCharCode>=48&&firstCharCode<=57?String.fromCharCode(firstCharCode+17)+hashedKey.slice(1):hashedKey}function hashClassName({property,selector,salt,value},atRules){return constants_esm.aN+(0,emotion_hash_esm.A)(salt+selector+atRulesToString(atRules)+property+value.trim())}function isResetValue(value){return value===constants_esm.Ut}function trimSelector(selector){return selector.replace(/>\s+/g,">")}var warnAboutUnresolvedRule_esm=__webpack_require__("./node_modules/@griffel/core/runtime/warnings/warnAboutUnresolvedRule.esm.js"),logError_esm=__webpack_require__("./node_modules/@griffel/core/runtime/warnings/logError.esm.js");function warnAboutUnsupportedProperties(property,value){const message=(()=>[`@griffel/react: You are using unsupported shorthand CSS property "${property}". Please check your "makeStyles" calls, there *should not* be following:`," ".repeat(2)+"makeStyles({"," ".repeat(4)+`[slot]: { ${property}: "${value}" }`," ".repeat(2)+"})","","Learn why CSS shorthands are not supported: https://aka.ms/griffel-css-shorthands"].join("\n"))();(0,logError_esm.v)(message)}function getShorthandDefinition(property){return shorthands[property]}function computePropertyPriority(shorthand){var _a;return null!==(_a=null==shorthand?void 0:shorthand[0])&&void 0!==_a?_a:0}function pushToClassesMap(classesMap,propertyKey,ltrClassname,rtlClassname){classesMap[propertyKey]=rtlClassname?[ltrClassname,rtlClassname]:ltrClassname}function createBucketEntry(cssRule,metadata){return metadata.length>0?[cssRule,Object.fromEntries(metadata)]:cssRule}function pushToCSSRules(cssRulesByBucket,styleBucketName,ltrCSS,rtlCSS,media,priority){var _a;const metadata=[];0!==priority&&metadata.push(["p",priority]),"m"===styleBucketName&&media&&metadata.push(["m",media]),null!==(_a=cssRulesByBucket[styleBucketName])&&void 0!==_a||(cssRulesByBucket[styleBucketName]=[]),ltrCSS&&cssRulesByBucket[styleBucketName].push(createBucketEntry(ltrCSS,metadata)),rtlCSS&&cssRulesByBucket[styleBucketName].push(createBucketEntry(rtlCSS,metadata))}function resolveStyleRules(styles,classNameHashSalt="",selectors=[],atRules={container:"",layer:"",media:"",supports:""},cssClassesMap={},cssRulesByBucket={},rtlValue){for(const property in styles){if(constants_esm.qw.hasOwnProperty(property)){warnAboutUnsupportedProperties(property,styles[property]);continue}const value=styles[property];if(null!=value)if(isResetValue(value)){pushToClassesMap(cssClassesMap,hashPropertyKey(trimSelector(selectors.join("")),property,atRules),0,void 0)}else if("string"==typeof value||"number"==typeof value){const selector=trimSelector(selectors.join("")),shorthand=getShorthandDefinition(property);if(shorthand){const shorthandProperties=shorthand[1],shorthandResetStyles=Object.fromEntries(shorthandProperties.map((property=>[property,constants_esm.Ut])));resolveStyleRules(shorthandResetStyles,classNameHashSalt,selectors,atRules,cssClassesMap,cssRulesByBucket)}const key=hashPropertyKey(selector,property,atRules),className=hashClassName({value:value.toString(),salt:classNameHashSalt,selector,property},atRules),rtlDefinition=rtlValue&&{key:property,value:rtlValue}||(0,core.dG)(property,value),flippedInRtl=rtlDefinition.key!==property||rtlDefinition.value!==value,rtlClassName=flippedInRtl?hashClassName({value:rtlDefinition.value.toString(),property:rtlDefinition.key,salt:classNameHashSalt,selector},atRules):void 0,rtlCompileOptions=flippedInRtl?{rtlClassName,rtlProperty:rtlDefinition.key,rtlValue:rtlDefinition.value}:void 0,styleBucketName=getStyleBucketName(selectors,atRules),[ltrCSS,rtlCSS]=(0,compileAtomicCSSRule_esm.K)(Object.assign({className,selectors,property,value},rtlCompileOptions),atRules);pushToClassesMap(cssClassesMap,key,className,rtlClassName),pushToCSSRules(cssRulesByBucket,styleBucketName,ltrCSS,rtlCSS,atRules.media,computePropertyPriority(shorthand))}else if("animationName"===property){const animationNameValue=Array.isArray(value)?value:[value],animationNames=[],rtlAnimationNames=[];for(const keyframeObject of animationNameValue){const keyframeCSS=(0,compileKeyframeCSS_esm.W)(keyframeObject),rtlKeyframeCSS=(0,compileKeyframeCSS_esm.W)((0,core.C6)(keyframeObject)),animationName=constants_esm.aN+(0,emotion_hash_esm.A)(keyframeCSS);let rtlAnimationName;const keyframeRules=(0,compileKeyframeCSS_esm.c)(animationName,keyframeCSS);let rtlKeyframeRules=[];keyframeCSS===rtlKeyframeCSS?rtlAnimationName=animationName:(rtlAnimationName=constants_esm.aN+(0,emotion_hash_esm.A)(rtlKeyframeCSS),rtlKeyframeRules=(0,compileKeyframeCSS_esm.c)(rtlAnimationName,rtlKeyframeCSS));for(let i=0;i[property,constants_esm.Ut])));resolveStyleRules(shorthandResetStyles,classNameHashSalt,selectors,atRules,cssClassesMap,cssRulesByBucket)}const key=hashPropertyKey(selector,property,atRules),className=hashClassName({value:value.map((v=>(null!=v?v:"").toString())).join(";"),salt:classNameHashSalt,selector,property},atRules),rtlDefinitions=value.map((v=>(0,core.dG)(property,v)));if(!!rtlDefinitions.some((v=>v.key!==rtlDefinitions[0].key))){0;continue}const flippedInRtl=rtlDefinitions[0].key!==property||rtlDefinitions.some(((v,i)=>v.value!==value[i])),rtlClassName=flippedInRtl?hashClassName({value:rtlDefinitions.map((v=>{var _a;return(null!==(_a=null==v?void 0:v.value)&&void 0!==_a?_a:"").toString()})).join(";"),salt:classNameHashSalt,property:rtlDefinitions[0].key,selector},atRules):void 0,rtlCompileOptions=flippedInRtl?{rtlClassName,rtlProperty:rtlDefinitions[0].key,rtlValue:rtlDefinitions.map((d=>d.value))}:void 0,styleBucketName=getStyleBucketName(selectors,atRules),[ltrCSS,rtlCSS]=(0,compileAtomicCSSRule_esm.K)(Object.assign({className,selectors,property,value},rtlCompileOptions),atRules);pushToClassesMap(cssClassesMap,key,className,rtlClassName),pushToCSSRules(cssRulesByBucket,styleBucketName,ltrCSS,rtlCSS,atRules.media,computePropertyPriority(shorthand))}else if((0,isObject_esm.G)(value))if((0,isNestedSelector_esm.B)(property))resolveStyleRules(value,classNameHashSalt,selectors.concat((0,normalizeNestedProperty_esm.o)(property)),atRules,cssClassesMap,cssRulesByBucket);else if((0,isMediaQuerySelector_esm.k)(property)){const combinedMediaQuery=generateCombinedQuery(atRules.media,property.slice(6).trim());resolveStyleRules(value,classNameHashSalt,selectors,Object.assign({},atRules,{media:combinedMediaQuery}),cssClassesMap,cssRulesByBucket)}else if((0,isLayerSelector_esm.L)(property)){const combinedLayerQuery=(atRules.layer?`${atRules.layer}.`:"")+property.slice(6).trim();resolveStyleRules(value,classNameHashSalt,selectors,Object.assign({},atRules,{layer:combinedLayerQuery}),cssClassesMap,cssRulesByBucket)}else if((0,isSupportQuerySelector_esm.n)(property)){const combinedSupportQuery=generateCombinedQuery(atRules.supports,property.slice(9).trim());resolveStyleRules(value,classNameHashSalt,selectors,Object.assign({},atRules,{supports:combinedSupportQuery}),cssClassesMap,cssRulesByBucket)}else if((0,isContainerQuerySelector_esm.z)(property)){const containerQuery=property.slice(10).trim();resolveStyleRules(value,classNameHashSalt,selectors,Object.assign({},atRules,{container:containerQuery}),cssClassesMap,cssRulesByBucket)}else(0,warnAboutUnresolvedRule_esm.B)(property,value)}return[cssClassesMap,cssRulesByBucket]}var reduceToClassNameForSlots_esm=__webpack_require__("./node_modules/@griffel/core/runtime/reduceToClassNameForSlots.esm.js");function makeStyles(stylesBySlots,factory=insertionFactory_esm.A){const insertStyles=factory();let classesMapBySlot=null,cssRules=null,ltrClassNamesForSlots=null,rtlClassNamesForSlots=null;return function computeClasses(options){const{dir,renderer}=options;null===classesMapBySlot&&([classesMapBySlot,cssRules]=function resolveStyleRulesForSlots(stylesBySlots,classNameHashSalt=""){const classesMapBySlot={},cssRules={};for(const slotName in stylesBySlots){const slotStyles=stylesBySlots[slotName],[cssClassMap,cssRulesByBucket]=resolveStyleRules(slotStyles,classNameHashSalt);classesMapBySlot[slotName]=cssClassMap,Object.keys(cssRulesByBucket).forEach((styleBucketName=>{cssRules[styleBucketName]=(cssRules[styleBucketName]||[]).concat(cssRulesByBucket[styleBucketName])}))}return[classesMapBySlot,cssRules]}(stylesBySlots,renderer.classNameHashSalt));const isLTR="ltr"===dir;return isLTR?null===ltrClassNamesForSlots&&(ltrClassNamesForSlots=(0,reduceToClassNameForSlots_esm.N)(classesMapBySlot,dir)):null===rtlClassNamesForSlots&&(rtlClassNamesForSlots=(0,reduceToClassNameForSlots_esm.N)(classesMapBySlot,dir)),insertStyles(renderer,cssRules),isLTR?ltrClassNamesForSlots:rtlClassNamesForSlots}}},"./node_modules/@griffel/core/mergeClasses.esm.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{z:()=>mergeClasses});var _constants_esm_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@griffel/core/constants.esm.js"),_runtime_utils_hashSequence_esm_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@griffel/core/runtime/utils/hashSequence.esm.js"),_runtime_reduceToClassNameForSlots_esm_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@griffel/core/runtime/reduceToClassNameForSlots.esm.js");const mergeClassesCachedResults={};function mergeClasses(){let dir=null,resultClassName="",sequenceMatch="";const sequencesIds=new Array(arguments.length);for(let i=0;i0&&(resultClassName+=className.slice(0,sequenceIndex)),sequenceMatch+=sequenceId,sequencesIds[i]=sequenceId}0}}if(""===sequenceMatch)return resultClassName.slice(0,-1);const mergeClassesResult=mergeClassesCachedResults[sequenceMatch];if(void 0!==mergeClassesResult)return resultClassName+mergeClassesResult;const sequenceMappings=[];for(let i=0;i{"use strict";function murmur2(str){for(var k,h=0,i=0,len=str.length;len>=4;++i,len-=4)k=1540483477*(65535&(k=255&str.charCodeAt(i)|(255&str.charCodeAt(++i))<<8|(255&str.charCodeAt(++i))<<16|(255&str.charCodeAt(++i))<<24))+(59797*(k>>>16)<<16),h=1540483477*(65535&(k^=k>>>24))+(59797*(k>>>16)<<16)^1540483477*(65535&h)+(59797*(h>>>16)<<16);switch(len){case 3:h^=(255&str.charCodeAt(i+2))<<16;case 2:h^=(255&str.charCodeAt(i+1))<<8;case 1:h=1540483477*(65535&(h^=255&str.charCodeAt(i)))+(59797*(h>>>16)<<16)}return(((h=1540483477*(65535&(h^=h>>>13))+(59797*(h>>>16)<<16))^h>>>15)>>>0).toString(36)}__webpack_require__.d(__webpack_exports__,{A:()=>murmur2})},"./node_modules/@griffel/core/node_modules/stylis/src/Enum.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$1:()=>SUPPORTS,IO:()=>LAYER,LU:()=>DECLARATION,Rn:()=>MEDIA,Sv:()=>KEYFRAMES,XZ:()=>RULESET,YK:()=>COMMENT,j:()=>WEBKIT,vd:()=>MOZ,yE:()=>IMPORT});var MOZ="-moz-",WEBKIT="-webkit-",COMMENT="comm",RULESET="rule",DECLARATION="decl",MEDIA="@media",IMPORT="@import",SUPPORTS="@supports",KEYFRAMES="@keyframes",LAYER="@layer"},"./node_modules/@griffel/core/node_modules/stylis/src/Middleware.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{MY:()=>rulesheet,r1:()=>middleware});var _Utility_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@griffel/core/node_modules/stylis/src/Utility.js");function middleware(collection){var length=(0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.FK)(collection);return function(element,index,children,callback){for(var output="",i=0;i{"use strict";__webpack_require__.d(__webpack_exports__,{wE:()=>compile});var _Enum_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@griffel/core/node_modules/stylis/src/Enum.js"),_Utility_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@griffel/core/node_modules/stylis/src/Utility.js"),_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@griffel/core/node_modules/stylis/src/Tokenizer.js");function compile(value){return(0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.VF)(parse("",null,null,null,[""],value=(0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.c4)(value),0,[0],value))}function parse(value,root,parent,rule,rules,rulesets,pseudo,points,declarations){for(var index=0,offset=0,length=pseudo,atrule=0,property=0,previous=0,variable=1,scanning=1,ampersand=1,character=0,type="",props=rules,children=rulesets,reference=rule,characters=type;scanning;)switch(previous=character,character=(0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.K2)()){case 40:if(108!=previous&&58==(0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.wN)(characters,length-1)){-1!=(0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.K5)(characters+=(0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.HC)((0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.Tb)(character),"&","&\f"),"&\f")&&(ampersand=-1);break}case 34:case 39:case 91:characters+=(0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.Tb)(character);break;case 9:case 10:case 13:case 32:characters+=(0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.mw)(previous);break;case 92:characters+=(0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.Nc)((0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.OW)()-1,7);continue;case 47:switch((0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.se)()){case 42:case 47:(0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.BC)(comment((0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.nf)((0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.K2)(),(0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.OW)()),root,parent,declarations),declarations);break;default:characters+="/"}break;case 123*variable:points[index++]=(0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.b2)(characters)*ampersand;case 125*variable:case 59:case 0:switch(character){case 0:case 125:scanning=0;case 59+offset:-1==ampersand&&(characters=(0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.HC)(characters,/\f/g,"")),property>0&&(0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.b2)(characters)-length&&(0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.BC)(property>32?declaration(characters+";",rule,parent,length-1,declarations):declaration((0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.HC)(characters," ","")+";",rule,parent,length-2,declarations),declarations);break;case 59:characters+=";";default:if((0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.BC)(reference=ruleset(characters,root,parent,index,offset,rules,points,type,props=[],children=[],length,rulesets),rulesets),123===character)if(0===offset)parse(characters,root,reference,reference,props,rulesets,length,points,children);else switch(99===atrule&&110===(0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.wN)(characters,3)?100:atrule){case 100:case 108:case 109:case 115:parse(value,reference,reference,rule&&(0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.BC)(ruleset(value,reference,reference,0,0,rules,points,type,rules,props=[],length,children),children),rules,children,length,points,rule?props:children);break;default:parse(characters,reference,reference,reference,[""],children,0,points,children)}}index=offset=property=0,variable=ampersand=1,type=characters="",length=pseudo;break;case 58:length=1+(0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.b2)(characters),property=previous;default:if(variable<1)if(123==character)--variable;else if(125==character&&0==variable++&&125==(0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.YL)())continue;switch(characters+=(0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.HT)(character),character*variable){case 38:ampersand=offset>0?1:(characters+="\f",-1);break;case 44:points[index++]=((0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.b2)(characters)-1)*ampersand,ampersand=1;break;case 64:45===(0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.se)()&&(characters+=(0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.Tb)((0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.K2)())),atrule=(0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.se)(),offset=length=(0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.b2)(type=characters+=(0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.Cv)((0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.OW)())),character++;break;case 45:45===previous&&2==(0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.b2)(characters)&&(variable=0)}}return rulesets}function ruleset(value,root,parent,index,offset,rules,points,type,props,children,length,siblings){for(var post=offset-1,rule=0===offset?rules:[""],size=(0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.FK)(rule),i=0,j=0,k=0;i0?rule[x]+" "+y:(0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.HC)(y,/&\f/g,rule[x])))&&(props[k++]=z);return(0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.rH)(value,root,parent,0===offset?_Enum_js__WEBPACK_IMPORTED_MODULE_2__.XZ:type,props,children,length,siblings)}function comment(value,root,parent,siblings){return(0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.rH)(value,root,parent,_Enum_js__WEBPACK_IMPORTED_MODULE_2__.YK,(0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.HT)((0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.Tp)()),(0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.c1)(value,2,-2),0,siblings)}function declaration(value,root,parent,length,siblings){return(0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.rH)(value,root,parent,_Enum_js__WEBPACK_IMPORTED_MODULE_2__.LU,(0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.c1)(value,0,length),(0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.c1)(value,length+1,-1),length,siblings)}},"./node_modules/@griffel/core/node_modules/stylis/src/Serializer.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>stringify,l:()=>serialize});var _Enum_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@griffel/core/node_modules/stylis/src/Enum.js"),_Utility_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@griffel/core/node_modules/stylis/src/Utility.js");function serialize(children,callback){for(var output="",i=0;i{"use strict";__webpack_require__.d(__webpack_exports__,{C:()=>copy,Cv:()=>identifier,K2:()=>next,Nc:()=>escaping,OW:()=>caret,Tb:()=>delimit,Tp:()=>char,VF:()=>dealloc,YL:()=>prev,c4:()=>alloc,mw:()=>whitespace,nf:()=>commenter,qw:()=>tokenize,rH:()=>node,se:()=>peek});var _Utility_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@griffel/core/node_modules/stylis/src/Utility.js"),line=1,column=1,length=0,position=0,character=0,characters="";function node(value,root,parent,type,props,children,length,siblings){return{value,root,parent,type,props,children,line,column,length,return:"",siblings}}function copy(root,props){return(0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.kp)(node("",null,null,"",null,null,0,root.siblings),root,{length:-root.length},props)}function char(){return character}function prev(){return character=position>0?(0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.wN)(characters,--position):0,column--,10===character&&(column=1,line--),character}function next(){return character=position2||token(character)>3?"":" "}function escaping(index,count){for(;--count&&next()&&!(character<48||character>102||character>57&&character<65||character>70&&character<97););return slice(index,caret()+(count<6&&32==peek()&&32==next()))}function delimiter(type){for(;next();)switch(character){case type:return position;case 34:case 39:34!==type&&39!==type&&delimiter(character);break;case 40:41===type&&delimiter(type);break;case 92:next()}return position}function commenter(type,index){for(;next()&&type+character!==57&&(type+character!==84||47!==peek()););return"/*"+slice(index,position-1)+"*"+(0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.HT)(47===type?type:next())}function identifier(index){for(;!token(peek());)next();return slice(index,position)}},"./node_modules/@griffel/core/node_modules/stylis/src/Utility.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{BC:()=>append,Bq:()=>trim,FK:()=>sizeof,HC:()=>replace,HT:()=>from,K5:()=>indexof,YW:()=>match,b2:()=>strlen,c1:()=>substr,kg:()=>combine,kp:()=>assign,tW:()=>hash,tn:()=>abs,wN:()=>charat});var abs=Math.abs,from=String.fromCharCode,assign=Object.assign;function hash(value,length){return 45^charat(value,0)?(((length<<2^charat(value,0))<<2^charat(value,1))<<2^charat(value,2))<<2^charat(value,3):0}function trim(value){return value.trim()}function match(value,pattern){return(value=pattern.exec(value))?value[0]:value}function replace(value,pattern,replacement){return value.replace(pattern,replacement)}function indexof(value,search){return value.indexOf(search)}function charat(value,index){return 0|value.charCodeAt(index)}function substr(value,begin,end){return value.slice(begin,end)}function strlen(value){return value.length}function sizeof(value){return value.length}function append(value,array){return array.push(value),value}function combine(array,callback){return array.map(callback).join("")}},"./node_modules/@griffel/core/runtime/compileAtomicCSSRule.esm.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{K:()=>compileAtomicCSSRule,B:()=>normalizePseudoSelector});var hyphenateProperty_esm=__webpack_require__("./node_modules/@griffel/core/runtime/utils/hyphenateProperty.esm.js"),normalizeNestedProperty_esm=__webpack_require__("./node_modules/@griffel/core/runtime/utils/normalizeNestedProperty.esm.js"),Serializer=__webpack_require__("./node_modules/@griffel/core/node_modules/stylis/src/Serializer.js"),Parser=__webpack_require__("./node_modules/@griffel/core/node_modules/stylis/src/Parser.js"),Middleware=__webpack_require__("./node_modules/@griffel/core/node_modules/stylis/src/Middleware.js"),globalPlugin_esm=__webpack_require__("./node_modules/@griffel/core/runtime/stylis/globalPlugin.esm.js"),prefixerPlugin_esm=__webpack_require__("./node_modules/@griffel/core/runtime/stylis/prefixerPlugin.esm.js"),isAtRuleElement_esm=__webpack_require__("./node_modules/@griffel/core/runtime/stylis/isAtRuleElement.esm.js");const sortClassesInAtRulesPlugin=element=>{(0,isAtRuleElement_esm.q)(element)&&Array.isArray(element.children)&&element.children.sort(((a,b)=>a.props[0]>b.props[0]?1:-1))};function noop(){}const PSEUDO_SELECTOR_REGEX=/,( *[^ &])/g;function normalizePseudoSelector(pseudoSelector){return"&"+(0,normalizeNestedProperty_esm.o)(pseudoSelector.replace(PSEUDO_SELECTOR_REGEX,",&$1"))}function createCSSRule(classNameSelector,cssDeclaration,pseudos){let cssRule=cssDeclaration;return pseudos.length>0&&(cssRule=pseudos.reduceRight(((acc,selector)=>`${normalizePseudoSelector(selector)} { ${acc} }`),cssDeclaration)),`${classNameSelector}{${cssRule}}`}function compileAtomicCSSRule(options,atRules){const{className,selectors,property,rtlClassName,rtlProperty,rtlValue,value}=options,{container,layer,media,supports}=atRules;let cssRule=createCSSRule(`.${className}`,Array.isArray(value)?`${value.map((v=>`${(0,hyphenateProperty_esm.a)(property)}: ${v}`)).join(";")};`:`${(0,hyphenateProperty_esm.a)(property)}: ${value};`,selectors);if(rtlProperty&&rtlClassName){cssRule+=createCSSRule(`.${rtlClassName}`,Array.isArray(rtlValue)?`${rtlValue.map((v=>`${(0,hyphenateProperty_esm.a)(rtlProperty)}: ${v}`)).join(";")};`:`${(0,hyphenateProperty_esm.a)(rtlProperty)}: ${rtlValue};`,selectors)}return media&&(cssRule=`@media ${media} { ${cssRule} }`),layer&&(cssRule=`@layer ${layer} { ${cssRule} }`),supports&&(cssRule=`@supports ${supports} { ${cssRule} }`),container&&(cssRule=`@container ${container} { ${cssRule} }`),function compileCSSRules(cssRules,sortClassesInAtRules){const rules=[];return(0,Serializer.l)((0,Parser.wE)(cssRules),(0,Middleware.r1)([globalPlugin_esm.t,sortClassesInAtRules?sortClassesInAtRulesPlugin:noop,prefixerPlugin_esm.j,Serializer.A,(0,Middleware.MY)((rule=>rules.push(rule)))])),rules}(cssRule,!0)}},"./node_modules/@griffel/core/runtime/compileKeyframeCSS.esm.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{W:()=>compileKeyframeRule,c:()=>compileKeyframesCSS});var Serializer=__webpack_require__("./node_modules/@griffel/core/node_modules/stylis/src/Serializer.js"),Parser=__webpack_require__("./node_modules/@griffel/core/node_modules/stylis/src/Parser.js"),Middleware=__webpack_require__("./node_modules/@griffel/core/node_modules/stylis/src/Middleware.js"),prefixerPlugin_esm=__webpack_require__("./node_modules/@griffel/core/runtime/stylis/prefixerPlugin.esm.js"),hyphenateProperty_esm=__webpack_require__("./node_modules/@griffel/core/runtime/utils/hyphenateProperty.esm.js");function cssifyObject(style){let css="";for(const property in style){const value=style[property];if("string"!=typeof value&&"number"!=typeof value){if(Array.isArray(value))for(const arrValue of value)css+=(0,hyphenateProperty_esm.a)(property)+":"+arrValue+";"}else css+=(0,hyphenateProperty_esm.a)(property)+":"+value+";"}return css}function compileKeyframeRule(keyframeObject){let css="";for(const percentage in keyframeObject)css+=`${percentage}{${cssifyObject(keyframeObject[percentage])}}`;return css}function compileKeyframesCSS(keyframeName,keyframeCSS){const cssRule=`@keyframes ${keyframeName} {${keyframeCSS}}`,rules=[];return(0,Serializer.l)((0,Parser.wE)(cssRule),(0,Middleware.r1)([Serializer.A,prefixerPlugin_esm.j,(0,Middleware.MY)((rule=>rules.push(rule)))])),rules}},"./node_modules/@griffel/core/runtime/reduceToClassNameForSlots.esm.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{N:()=>reduceToClassNameForSlots,z:()=>reduceToClassName});var _constants_esm_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@griffel/core/constants.esm.js"),_utils_hashSequence_esm_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@griffel/core/runtime/utils/hashSequence.esm.js");function reduceToClassName(classMap,dir){let classString="",hashString="";for(const propertyHash in classMap){const classNameMapping=classMap[propertyHash];if(0===classNameMapping){hashString+=propertyHash+" ";continue}const hasRTLClassName=Array.isArray(classNameMapping),className="rtl"===dir?(hasRTLClassName?classNameMapping[1]:classNameMapping)+" ":(hasRTLClassName?classNameMapping[0]:classNameMapping)+" ";classString+=className,hashString+=className}return[classString.slice(0,-1),hashString.slice(0,-1)]}function reduceToClassNameForSlots(classesMapBySlot,dir){const classNamesForSlots={};for(const slotName in classesMapBySlot){const[slotClasses,slotClassesHash]=reduceToClassName(classesMapBySlot[slotName],dir);if(""===slotClassesHash){classNamesForSlots[slotName]="";continue}const sequenceHash=(0,_utils_hashSequence_esm_js__WEBPACK_IMPORTED_MODULE_0__.G)(slotClassesHash,dir),resultSlotClasses=sequenceHash+(""===slotClasses?"":" "+slotClasses);_constants_esm_js__WEBPACK_IMPORTED_MODULE_1__.k1[sequenceHash]=[classesMapBySlot[slotName],dir],classNamesForSlots[slotName]=resultSlotClasses}return classNamesForSlots}},"./node_modules/@griffel/core/runtime/stylis/globalPlugin.esm.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{t:()=>globalPlugin});var stylis__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@griffel/core/node_modules/stylis/src/Enum.js"),stylis__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@griffel/core/node_modules/stylis/src/Tokenizer.js");const globalPlugin=element=>{if(element.type===stylis__WEBPACK_IMPORTED_MODULE_0__.XZ){if("string"==typeof element.props)return void 0;element.props=element.props.map((value=>-1===value.indexOf(":global(")?value:(0,stylis__WEBPACK_IMPORTED_MODULE_1__.qw)(value).reduce(((acc,value,index,children)=>{if(""===value)return acc;if(":"===value&&"global"===children[index+1]){const selector=children[index+2].slice(1,-1)+" ";return acc.unshift(selector),children[index+1]="",children[index+2]="",acc}return acc.push(value),acc}),[]).join("")))}}},"./node_modules/@griffel/core/runtime/stylis/isAtRuleElement.esm.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{q:()=>isAtRuleElement});var stylis__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@griffel/core/node_modules/stylis/src/Enum.js");function isAtRuleElement(element){switch(element.type){case"@container":case stylis__WEBPACK_IMPORTED_MODULE_0__.Rn:case stylis__WEBPACK_IMPORTED_MODULE_0__.$1:case stylis__WEBPACK_IMPORTED_MODULE_0__.IO:return!0}return!1}},"./node_modules/@griffel/core/runtime/stylis/prefixerPlugin.esm.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{j:()=>prefixerPlugin});var stylis__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@griffel/core/node_modules/stylis/src/Utility.js"),stylis__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@griffel/core/node_modules/stylis/src/Enum.js"),stylis__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@griffel/core/node_modules/stylis/src/Serializer.js"),stylis__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@griffel/core/node_modules/stylis/src/Tokenizer.js");function prefix(value,length,children){switch((0,stylis__WEBPACK_IMPORTED_MODULE_0__.tW)(value,length)){case 5103:return stylis__WEBPACK_IMPORTED_MODULE_1__.j+"print-"+value+value;case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:return stylis__WEBPACK_IMPORTED_MODULE_1__.j+value+value;case 4215:if(102===(0,stylis__WEBPACK_IMPORTED_MODULE_0__.wN)(value,9))return stylis__WEBPACK_IMPORTED_MODULE_1__.j+value+value;if(116===(0,stylis__WEBPACK_IMPORTED_MODULE_0__.wN)(value,length+1))return stylis__WEBPACK_IMPORTED_MODULE_1__.j+value+value;break;case 4789:return stylis__WEBPACK_IMPORTED_MODULE_1__.vd+value+value;case 5349:case 4246:case 6968:return stylis__WEBPACK_IMPORTED_MODULE_1__.j+value+stylis__WEBPACK_IMPORTED_MODULE_1__.vd+value+value;case 6187:if(!(0,stylis__WEBPACK_IMPORTED_MODULE_0__.YW)(value,/grab/))return(0,stylis__WEBPACK_IMPORTED_MODULE_0__.HC)((0,stylis__WEBPACK_IMPORTED_MODULE_0__.HC)((0,stylis__WEBPACK_IMPORTED_MODULE_0__.HC)(value,/(zoom-|grab)/,stylis__WEBPACK_IMPORTED_MODULE_1__.j+"$1"),/(image-set)/,stylis__WEBPACK_IMPORTED_MODULE_1__.j+"$1"),value,"")+value;case 5495:case 3959:return(0,stylis__WEBPACK_IMPORTED_MODULE_0__.HC)(value,/(image-set\([^]*)/,stylis__WEBPACK_IMPORTED_MODULE_1__.j+"$1$`$1");case 4095:case 3583:case 4068:case 2532:return(0,stylis__WEBPACK_IMPORTED_MODULE_0__.HC)(value,/(.+)-inline(.+)/,stylis__WEBPACK_IMPORTED_MODULE_1__.j+"$1$2")+value;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if((0,stylis__WEBPACK_IMPORTED_MODULE_0__.b2)(value)-1-length>6)switch((0,stylis__WEBPACK_IMPORTED_MODULE_0__.wN)(value,length+1)){case 102:if(108===(0,stylis__WEBPACK_IMPORTED_MODULE_0__.wN)(value,length+3))return(0,stylis__WEBPACK_IMPORTED_MODULE_0__.HC)(value,/(.+:)(.+)-([^]+)/,"$1"+stylis__WEBPACK_IMPORTED_MODULE_1__.j+"$2-$3$1"+stylis__WEBPACK_IMPORTED_MODULE_1__.vd+(108==(0,stylis__WEBPACK_IMPORTED_MODULE_0__.wN)(value,length+3)?"$3":"$2-$3"))+value;case 115:return~(0,stylis__WEBPACK_IMPORTED_MODULE_0__.K5)(value,"stretch")?prefix((0,stylis__WEBPACK_IMPORTED_MODULE_0__.HC)(value,"stretch","fill-available"),length)+value:value}}return value}function prefixerPlugin(element,index,children,callback){if(element.length>-1&&!element.return)switch(element.type){case stylis__WEBPACK_IMPORTED_MODULE_1__.LU:return void(element.return=prefix(element.value,element.length));case stylis__WEBPACK_IMPORTED_MODULE_1__.XZ:if(element.length)return(0,stylis__WEBPACK_IMPORTED_MODULE_0__.kg)(element.props,(function(value){switch((0,stylis__WEBPACK_IMPORTED_MODULE_0__.YW)(value,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return(0,stylis__WEBPACK_IMPORTED_MODULE_2__.l)([(0,stylis__WEBPACK_IMPORTED_MODULE_3__.C)(element,{props:[(0,stylis__WEBPACK_IMPORTED_MODULE_0__.HC)(value,/:(read-\w+)/,":"+stylis__WEBPACK_IMPORTED_MODULE_1__.vd+"$1")]})],callback);case"::placeholder":return(0,stylis__WEBPACK_IMPORTED_MODULE_2__.l)([(0,stylis__WEBPACK_IMPORTED_MODULE_3__.C)(element,{props:[(0,stylis__WEBPACK_IMPORTED_MODULE_0__.HC)(value,/:(plac\w+)/,":"+stylis__WEBPACK_IMPORTED_MODULE_1__.j+"input-$1")]}),(0,stylis__WEBPACK_IMPORTED_MODULE_3__.C)(element,{props:[(0,stylis__WEBPACK_IMPORTED_MODULE_0__.HC)(value,/:(plac\w+)/,":"+stylis__WEBPACK_IMPORTED_MODULE_1__.vd+"$1")]})],callback)}return""}))}}},"./node_modules/@griffel/core/runtime/utils/hashSequence.esm.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{G:()=>hashSequence});var _emotion_hash__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@griffel/core/node_modules/@emotion/hash/dist/emotion-hash.esm.js"),_constants_esm_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@griffel/core/constants.esm.js");function padEndHash(value){const hashLength=value.length;if(hashLength===_constants_esm_js__WEBPACK_IMPORTED_MODULE_0__.ez)return value;for(let i=hashLength;i<_constants_esm_js__WEBPACK_IMPORTED_MODULE_0__.ez;i++)value+="0";return value}function hashSequence(classes,dir,sequenceIds=[]){return _constants_esm_js__WEBPACK_IMPORTED_MODULE_0__.fj+padEndHash((0,_emotion_hash__WEBPACK_IMPORTED_MODULE_1__.A)(classes+dir))}},"./node_modules/@griffel/core/runtime/utils/hyphenateProperty.esm.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{a:()=>hyphenateProperty});const uppercasePattern=/[A-Z]/g,msPattern=/^ms-/,cache={};function toHyphenLower(match){return"-"+match.toLowerCase()}function hyphenateProperty(name){if(Object.prototype.hasOwnProperty.call(cache,name))return cache[name];if("--"===name.substr(0,2))return name;const hName=name.replace(uppercasePattern,toHyphenLower);return cache[name]=msPattern.test(hName)?"-"+hName:hName}},"./node_modules/@griffel/core/runtime/utils/isContainerQuerySelector.esm.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function isContainerQuerySelector(property){return"@container"===property.substring(0,10)}__webpack_require__.d(__webpack_exports__,{z:()=>isContainerQuerySelector})},"./node_modules/@griffel/core/runtime/utils/isLayerSelector.esm.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function isLayerSelector(property){return"@layer"===property.substr(0,6)}__webpack_require__.d(__webpack_exports__,{L:()=>isLayerSelector})},"./node_modules/@griffel/core/runtime/utils/isMediaQuerySelector.esm.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function isMediaQuerySelector(property){return"@media"===property.substr(0,6)}__webpack_require__.d(__webpack_exports__,{k:()=>isMediaQuerySelector})},"./node_modules/@griffel/core/runtime/utils/isNestedSelector.esm.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{B:()=>isNestedSelector});const regex=/^(:|\[|>|&)/;function isNestedSelector(property){return regex.test(property)}},"./node_modules/@griffel/core/runtime/utils/isObject.esm.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function isObject(val){return null!=val&&"object"==typeof val&&!1===Array.isArray(val)}__webpack_require__.d(__webpack_exports__,{G:()=>isObject})},"./node_modules/@griffel/core/runtime/utils/isSupportQuerySelector.esm.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function isSupportQuerySelector(property){return"@supports"===property.substr(0,9)}__webpack_require__.d(__webpack_exports__,{n:()=>isSupportQuerySelector})},"./node_modules/@griffel/core/runtime/utils/normalizeNestedProperty.esm.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function normalizeNestedProperty(nestedProperty){return"&"===nestedProperty.charAt(0)?nestedProperty.slice(1):nestedProperty}__webpack_require__.d(__webpack_exports__,{o:()=>normalizeNestedProperty})},"./node_modules/@griffel/core/runtime/warnings/logError.esm.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function logError(...args){0}__webpack_require__.d(__webpack_exports__,{v:()=>logError})},"./node_modules/@griffel/core/runtime/warnings/warnAboutUnresolvedRule.esm.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{B:()=>warnAboutUnresolvedRule});var _logError_esm_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@griffel/core/runtime/warnings/logError.esm.js");function warnAboutUnresolvedRule(property,value){const message=(()=>{const ruleText=JSON.stringify(value,null,2),message=["@griffel/react: A rule was not resolved to CSS properly. Please check your `makeStyles` or `makeResetStyles` calls for following:"," ".repeat(2)+"makeStyles({"," ".repeat(4)+"[slot]: {"," ".repeat(6)+`"${property}": ${ruleText.split("\n").map(((l,n)=>" ".repeat(0===n?0:6)+l)).join("\n")}`," ".repeat(4)+"}"," ".repeat(2)+"})",""];return-1===property.indexOf("&")?(message.push("It looks that you're are using a nested selector, but it is missing an ampersand placeholder where the generated class name should be injected."),message.push(`Try to update a property to include it i.e "${property}" => "&${property}".`)):(message.push(""),message.push("If it's not obvious what triggers a problem, please report an issue at https://github.com/microsoft/griffel/issues")),message.join("\n")})();(0,_logError_esm_js__WEBPACK_IMPORTED_MODULE_0__.v)(message)}},"./node_modules/@griffel/react/RendererContext.esm.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{J:()=>useRenderer});var constants_esm=__webpack_require__("./node_modules/@griffel/core/constants.esm.js");function createIsomorphicStyleSheet(styleElement,bucketName,priority,elementAttributes){const __cssRulesForSSR=[];if(elementAttributes[constants_esm.ed]=bucketName,elementAttributes[constants_esm.EJ]=String(priority),styleElement)for(const attrName in elementAttributes)styleElement.setAttribute(attrName,elementAttributes[attrName]);return{elementAttributes,insertRule:function insertRule(rule){return(null==styleElement?void 0:styleElement.sheet)?styleElement.sheet.insertRule(rule,styleElement.sheet.cssRules.length):__cssRulesForSSR.push(rule)},element:styleElement,bucketName,cssRules:()=>(null==styleElement?void 0:styleElement.sheet)?Array.from(styleElement.sheet.cssRules).map((cssRule=>cssRule.cssText)):__cssRulesForSSR}}const styleBucketOrderingMap=["r","d","l","v","w","f","i","h","a","s","k","t","m","c"].reduce(((acc,cur,j)=>(acc[cur]=j,acc)),{});function getStyleSheetKey(bucketName,media,priority){return("m"===bucketName?bucketName+media:bucketName)+priority}function getStyleSheetForBucket(bucketName,targetDocument,insertionPoint,renderer,metadata={}){var _a,_b;const isMediaBucket="m"===bucketName,media=null!==(_a=metadata.m)&&void 0!==_a?_a:"0",priority=null!==(_b=metadata.p)&&void 0!==_b?_b:0,stylesheetKey=getStyleSheetKey(bucketName,media,priority);if(!renderer.stylesheets[stylesheetKey]){const tag=targetDocument&&targetDocument.createElement("style"),stylesheet=createIsomorphicStyleSheet(tag,bucketName,priority,Object.assign({},renderer.styleElementAttributes,isMediaBucket&&{media}));renderer.stylesheets[stylesheetKey]=stylesheet,(null==targetDocument?void 0:targetDocument.head)&&tag&&targetDocument.head.insertBefore(tag,function findInsertionPoint(targetDocument,insertionPoint,targetBucket,renderer,metadata={}){var _a,_b;const targetOrder=styleBucketOrderingMap[targetBucket],media=null!==(_a=metadata.m)&&void 0!==_a?_a:"",priority=null!==(_b=metadata.p)&&void 0!==_b?_b:0;let comparer=el=>targetOrder-styleBucketOrderingMap[el.getAttribute(constants_esm.ed)],styleElements=targetDocument.head.querySelectorAll(`[${constants_esm.ed}]`);if("m"===targetBucket){const mediaElements=targetDocument.head.querySelectorAll(`[${constants_esm.ed}="${targetBucket}"]`);mediaElements.length&&(styleElements=mediaElements,comparer=el=>renderer.compareMediaQueries(media,el.media))}const comparerWithPriority=el=>function isSameInsertionKey(element,bucketName,metadata){var _a,_b;const targetKey=bucketName+(null!==(_a=metadata.m)&&void 0!==_a?_a:""),elementKey=element.getAttribute(constants_esm.ed)+(null!==(_b=element.media)&&void 0!==_b?_b:"");return targetKey===elementKey}(el,targetBucket,metadata)?priority-Number(el.getAttribute("data-priority")):comparer(el),length=styleElements.length;let index=length-1;for(;index>=0;){const styleElement=styleElements.item(index);if(comparerWithPriority(styleElement)>0)return styleElement.nextSibling;index--}if(length>0)return styleElements.item(0);return insertionPoint?insertionPoint.nextSibling:null}(targetDocument,insertionPoint,bucketName,renderer,metadata))}return renderer.stylesheets[stylesheetKey]}function safeInsertRule(sheet,ruleCSS){try{sheet.insertRule(ruleCSS)}catch(e){0}}let lastIndex=0;const defaultCompareMediaQueries=(a,b)=>ab?1:0;function createDOMRenderer(targetDocument=("undefined"==typeof document?void 0:document),options={}){const{classNameHashSalt,unstable_filterCSSRule,insertionPoint,styleElementAttributes,compareMediaQueries=defaultCompareMediaQueries}=options,renderer={classNameHashSalt,insertionCache:{},stylesheets:{},styleElementAttributes:Object.freeze(styleElementAttributes),compareMediaQueries,id:"d"+lastIndex++,insertCSSRules(cssRules){for(const styleBucketName in cssRules){const cssRulesForBucket=cssRules[styleBucketName];for(let i=0,l=cssRulesForBucket.length;i{"use strict";__webpack_require__.d(__webpack_exports__,{e:()=>TextDirectionProvider,m:()=>useTextDirection});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const TextDirectionContext=react__WEBPACK_IMPORTED_MODULE_0__.createContext("ltr"),TextDirectionProvider=({children,dir})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(TextDirectionContext.Provider,{value:dir},children);function useTextDirection(){return react__WEBPACK_IMPORTED_MODULE_0__.useContext(TextDirectionContext)}},"./node_modules/@griffel/react/__styles.esm.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{X:()=>_styles_esm_styles});var insertionFactory_esm=__webpack_require__("./node_modules/@griffel/core/insertionFactory.esm.js"),reduceToClassNameForSlots_esm=__webpack_require__("./node_modules/@griffel/core/runtime/reduceToClassNameForSlots.esm.js");var react_insertionFactory_esm=__webpack_require__("./node_modules/@griffel/react/insertionFactory.esm.js"),RendererContext_esm=__webpack_require__("./node_modules/@griffel/react/RendererContext.esm.js"),TextDirectionContext_esm=__webpack_require__("./node_modules/@griffel/react/TextDirectionContext.esm.js");function _styles_esm_styles(classesMapBySlot,cssRules){const getStyles=function __styles(classesMapBySlot,cssRules,factory=insertionFactory_esm.A){const insertStyles=factory();let ltrClassNamesForSlots=null,rtlClassNamesForSlots=null;return function computeClasses(options){const{dir,renderer}=options,isLTR="ltr"===dir;return isLTR?null===ltrClassNamesForSlots&&(ltrClassNamesForSlots=(0,reduceToClassNameForSlots_esm.N)(classesMapBySlot,dir)):null===rtlClassNamesForSlots&&(rtlClassNamesForSlots=(0,reduceToClassNameForSlots_esm.N)(classesMapBySlot,dir)),insertStyles(renderer,cssRules),isLTR?ltrClassNamesForSlots:rtlClassNamesForSlots}}(classesMapBySlot,cssRules,react_insertionFactory_esm.A);return function useClasses(){const dir=(0,TextDirectionContext_esm.m)(),renderer=(0,RendererContext_esm.J)();return getStyles({dir,renderer})}}},"./node_modules/@griffel/react/insertionFactory.esm.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>insertionFactory});var react=__webpack_require__("./node_modules/react/index.js"),react_namespaceObject=__webpack_require__.t(react,2);const useInsertionEffect=react_namespaceObject.useInsertionEffect?react_namespaceObject.useInsertionEffect:void 0,insertionFactory=()=>{const insertionCache={};return function insert(renderer,cssRules){useInsertionEffect&&function canUseDOM(){return"undefined"!=typeof window&&!(!window.document||!window.document.createElement)}()?useInsertionEffect((()=>{renderer.insertCSSRules(cssRules)}),[renderer,cssRules]):void 0===insertionCache[renderer.id]&&(renderer.insertCSSRules(cssRules),insertionCache[renderer.id]=!0)}}},"./node_modules/@griffel/react/makeResetStyles.esm.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{I:()=>makeResetStyles_esm_makeResetStyles});var insertionFactory_esm=__webpack_require__("./node_modules/@griffel/core/insertionFactory.esm.js"),emotion_hash_esm=__webpack_require__("./node_modules/@griffel/core/node_modules/@emotion/hash/dist/emotion-hash.esm.js"),core=__webpack_require__("./node_modules/rtl-css-js/dist/esm/core.js"),constants_esm=__webpack_require__("./node_modules/@griffel/core/constants.esm.js"),isMediaQuerySelector_esm=__webpack_require__("./node_modules/@griffel/core/runtime/utils/isMediaQuerySelector.esm.js"),isLayerSelector_esm=__webpack_require__("./node_modules/@griffel/core/runtime/utils/isLayerSelector.esm.js"),isNestedSelector_esm=__webpack_require__("./node_modules/@griffel/core/runtime/utils/isNestedSelector.esm.js"),isSupportQuerySelector_esm=__webpack_require__("./node_modules/@griffel/core/runtime/utils/isSupportQuerySelector.esm.js"),isObject_esm=__webpack_require__("./node_modules/@griffel/core/runtime/utils/isObject.esm.js"),hyphenateProperty_esm=__webpack_require__("./node_modules/@griffel/core/runtime/utils/hyphenateProperty.esm.js"),compileAtomicCSSRule_esm=__webpack_require__("./node_modules/@griffel/core/runtime/compileAtomicCSSRule.esm.js"),Serializer=__webpack_require__("./node_modules/@griffel/core/node_modules/stylis/src/Serializer.js"),Parser=__webpack_require__("./node_modules/@griffel/core/node_modules/stylis/src/Parser.js"),Middleware=__webpack_require__("./node_modules/@griffel/core/node_modules/stylis/src/Middleware.js"),globalPlugin_esm=__webpack_require__("./node_modules/@griffel/core/runtime/stylis/globalPlugin.esm.js"),isAtRuleElement_esm=__webpack_require__("./node_modules/@griffel/core/runtime/stylis/isAtRuleElement.esm.js"),prefixerPlugin_esm=__webpack_require__("./node_modules/@griffel/core/runtime/stylis/prefixerPlugin.esm.js");function compileResetCSSRules(cssRules){const rules=[],atRules=[];var callback;return(0,Serializer.l)((0,Parser.wE)(cssRules),(0,Middleware.r1)([globalPlugin_esm.t,prefixerPlugin_esm.j,Serializer.A,(callback=(element,rule)=>{(0,isAtRuleElement_esm.q)(element)?atRules.push(rule):rules.push(rule)},function(element){element.root||element.return&&callback(element,element.return)})])),[rules,atRules]}var compileKeyframeCSS_esm=__webpack_require__("./node_modules/@griffel/core/runtime/compileKeyframeCSS.esm.js"),isContainerQuerySelector_esm=__webpack_require__("./node_modules/@griffel/core/runtime/utils/isContainerQuerySelector.esm.js"),warnAboutUnresolvedRule_esm=__webpack_require__("./node_modules/@griffel/core/runtime/warnings/warnAboutUnresolvedRule.esm.js");function createStringFromStyles(styles){let ltrCSS="",rtlCSS="";for(const property in styles){const value=styles[property];if(null!=value)if("string"!=typeof value&&"number"!=typeof value)if("animationName"!==property||"object"!=typeof value)if(Array.isArray(value)){if(0===value.length){0;continue}const rtlDefinitions=value.map((v=>(0,core.dG)(property,v)));if(!!rtlDefinitions.some((v=>v.key!==rtlDefinitions[0].key))){0;continue}const rtlProperty=rtlDefinitions[0].key;ltrCSS+=value.map((v=>`${(0,hyphenateProperty_esm.a)(property)}:${v};`)).join(""),rtlCSS+=rtlDefinitions.map((definition=>`${(0,hyphenateProperty_esm.a)(rtlProperty)}:${definition.value};`)).join("")}else{if((0,isObject_esm.G)(value)){if((0,isNestedSelector_esm.B)(property)){const nestedSelector=(0,compileAtomicCSSRule_esm.B)(property),[ltrNested,rtlNested]=createStringFromStyles(value);ltrCSS+=`${nestedSelector}{${ltrNested}}`,rtlCSS+=`${nestedSelector}{${rtlNested}}`;continue}if((0,isMediaQuerySelector_esm.k)(property)||(0,isLayerSelector_esm.L)(property)||(0,isSupportQuerySelector_esm.n)(property)||(0,isContainerQuerySelector_esm.z)(property)){const[ltrNested,rtlNested]=createStringFromStyles(value);ltrCSS+=`${property}{${ltrNested}}`,rtlCSS+=`${property}{${rtlNested}}`;continue}}(0,warnAboutUnresolvedRule_esm.B)(property,value)}else{const values=Array.isArray(value)?value:[value],ltrAnimationNames=[],rtlAnimationNames=[];for(const keyframeObject of values){const ltrKeyframeRule=(0,compileKeyframeCSS_esm.W)(keyframeObject),rtlKeyframeRule=(0,compileKeyframeCSS_esm.W)((0,core.C6)(keyframeObject)),ltrAnimationName=constants_esm.Eo+(0,emotion_hash_esm.A)(ltrKeyframeRule),rtlAnimationName=constants_esm.Eo+(0,emotion_hash_esm.A)(rtlKeyframeRule);ltrAnimationNames.push(ltrAnimationName),rtlAnimationNames.push(rtlAnimationName),ltrCSS+=(0,compileKeyframeCSS_esm.c)(ltrAnimationName,ltrKeyframeRule).join(""),ltrAnimationName!==rtlAnimationName&&(rtlCSS+=(0,compileKeyframeCSS_esm.c)(rtlAnimationName,rtlKeyframeRule).join(""))}ltrCSS+=`animation-name:${ltrAnimationNames.join(",")};`,rtlCSS+=`animation-name:${rtlAnimationNames.join(",")};`}else{const{key:rtlProperty,value:rtlValue}=(0,core.dG)(property,value);ltrCSS+=`${(0,hyphenateProperty_esm.a)(property)}:${value};`,rtlCSS+=`${(0,hyphenateProperty_esm.a)(rtlProperty)}:${rtlValue};`}}return[ltrCSS,rtlCSS]}function resolveResetStyleRules(styles,classNameHashSalt=""){const[ltrRule,rtlRule]=createStringFromStyles(styles),ltrClassName=constants_esm.Eo+(0,emotion_hash_esm.A)(classNameHashSalt+ltrRule),[ltrCSS,ltrCSSAtRules]=compileResetCSSRules(`.${ltrClassName}{${ltrRule}}`),hasAtRules=ltrCSSAtRules.length>0;if(ltrRule===rtlRule)return[ltrClassName,null,hasAtRules?{r:ltrCSS,s:ltrCSSAtRules}:ltrCSS];const rtlClassName=constants_esm.Eo+(0,emotion_hash_esm.A)(classNameHashSalt+rtlRule),[rtlCSS,rtlCSSAtRules]=compileResetCSSRules(`.${rtlClassName}{${rtlRule}}`);return[ltrClassName,rtlClassName,hasAtRules?{r:ltrCSS.concat(rtlCSS),s:ltrCSSAtRules.concat(rtlCSSAtRules)}:ltrCSS.concat(rtlCSS)]}var react_insertionFactory_esm=__webpack_require__("./node_modules/@griffel/react/insertionFactory.esm.js"),RendererContext_esm=__webpack_require__("./node_modules/@griffel/react/RendererContext.esm.js"),TextDirectionContext_esm=__webpack_require__("./node_modules/@griffel/react/TextDirectionContext.esm.js");function makeResetStyles_esm_makeResetStyles(styles){const getStyles=function makeResetStyles(styles,factory=insertionFactory_esm.A){const insertStyles=factory();let ltrClassName=null,rtlClassName=null,cssRules=null;return function computeClassName(options){const{dir,renderer}=options;return null===ltrClassName&&([ltrClassName,rtlClassName,cssRules]=resolveResetStyleRules(styles,renderer.classNameHashSalt)),insertStyles(renderer,Array.isArray(cssRules)?{r:cssRules}:cssRules),"ltr"===dir?ltrClassName:rtlClassName||ltrClassName}}(styles,react_insertionFactory_esm.A);return function useClassName(){const dir=(0,TextDirectionContext_esm.m)(),renderer=(0,RendererContext_esm.J)();return getStyles({dir,renderer})}}},"./node_modules/@griffel/react/makeStyles.esm.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{n:()=>makeStyles});var _griffel_core__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@griffel/core/makeStyles.esm.js"),_insertionFactory_esm_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@griffel/react/insertionFactory.esm.js"),_RendererContext_esm_js__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@griffel/react/RendererContext.esm.js"),_TextDirectionContext_esm_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@griffel/react/TextDirectionContext.esm.js");function makeStyles(stylesBySlots){const getStyles=(0,_griffel_core__WEBPACK_IMPORTED_MODULE_0__.n)(stylesBySlots,_insertionFactory_esm_js__WEBPACK_IMPORTED_MODULE_1__.A);return function useClasses(){const dir=(0,_TextDirectionContext_esm_js__WEBPACK_IMPORTED_MODULE_2__.m)(),renderer=(0,_RendererContext_esm_js__WEBPACK_IMPORTED_MODULE_3__.J)();return getStyles({dir,renderer})}}},"./node_modules/@storybook/addon-a11y/dist/preview.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{afterEach:()=>afterEach,initialGlobals:()=>initialGlobals,parameters:()=>parameters});var storybook_test__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("storybook/test"),storybook_internal_preview_errors__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("storybook/internal/preview-errors"),_storybook_global__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("@storybook/global"),storybook_preview_api__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("storybook/preview-api"),ADDON_ID="storybook/a11y",PANEL_ID=`${ADDON_ID}/panel`,EVENTS={RESULT:`${ADDON_ID}/result`,REQUEST:`${ADDON_ID}/request`,RUNNING:`${ADDON_ID}/running`,ERROR:`${ADDON_ID}/error`,MANUAL:`${ADDON_ID}/manual`,SELECT:`${ADDON_ID}/select`},{document}=_storybook_global__WEBPACK_IMPORTED_MODULE_2__.global,{document:document2}=_storybook_global__WEBPACK_IMPORTED_MODULE_2__.global,channel=storybook_preview_api__WEBPACK_IMPORTED_MODULE_3__.addons.getChannel(),DEFAULT_PARAMETERS={config:{},options:{}},DISABLED_RULES=["region"],queue=[],isRunning=!1,runNext=async()=>{if(0===queue.length)return void(isRunning=!1);isRunning=!0;let next=queue.shift();next&&await next(),runNext()},run=async(input=DEFAULT_PARAMETERS,storyId)=>{let axe=(await __webpack_require__.e(609).then(__webpack_require__.t.bind(__webpack_require__,"./node_modules/axe-core/axe.js",23)))?.default||globalThis.axe,{config={},options={}}=input;if(input.element)throw new storybook_internal_preview_errors__WEBPACK_IMPORTED_MODULE_1__.ElementA11yParameterError;let context={include:document2?.body,exclude:[".sb-wrapper","#storybook-docs","#storybook-highlights-root"]};if(input.context){let hasInclude="object"==typeof input.context&&"include"in input.context&&void 0!==input.context.include,hasExclude="object"==typeof input.context&&"exclude"in input.context&&void 0!==input.context.exclude;hasInclude?context.include=input.context.include:!hasInclude&&!hasExclude&&(context.include=input.context),hasExclude&&(context.exclude=context.exclude.concat(input.context.exclude))}axe.reset();let configWithDefault={...config,rules:[...DISABLED_RULES.map((id=>({id,enabled:!1}))),...config?.rules??[]]};return axe.configure(configWithDefault),new Promise(((resolve,reject)=>{let highlightsRoot=document2?.getElementById("storybook-highlights-root");highlightsRoot&&(highlightsRoot.style.display="none");queue.push((async()=>{try{let resultWithLinks=((results,storyId)=>{let pathname=document.location.pathname.replace(/iframe\.html$/,""),enhancedResults={...results};return["incomplete","passes","violations"].forEach((key=>{Array.isArray(results[key])&&(enhancedResults[key]=results[key].map((result=>({...result,nodes:result.nodes.map(((node,index)=>{let id=`${key}.${result.id}.${index+1}`;return{id,...node,linkPath:`${pathname}?path=/story/${storyId}&addonPanel=${PANEL_ID}&a11ySelection=${id}`}}))}))))})),enhancedResults})(await axe.run(context,options),storyId);resolve(resultWithLinks)}catch(error){reject(error)}})),isRunning||runNext(),highlightsRoot&&(highlightsRoot.style.display="")}))};function getIsVitestStandaloneRun(){try{return"false"===(void 0).VITEST_STORYBOOK}catch{return!1}}channel.on(EVENTS.MANUAL,(async(storyId,input=DEFAULT_PARAMETERS)=>{try{await(0,storybook_preview_api__WEBPACK_IMPORTED_MODULE_3__.waitForAnimations)();let result=await run(input,storyId),resultJson=JSON.parse(JSON.stringify(result));channel.emit(EVENTS.RESULT,resultJson,storyId)}catch(error){channel.emit(EVENTS.ERROR,error)}}));var vitestMatchersExtended=!1,afterEach=async({id:storyId,reporting,parameters:parameters2,globals,viewMode})=>{let a11yParameter=parameters2.a11y,a11yGlobals=globals.a11y,getMode=()=>"todo"===a11yParameter?.test?"warning":"failed";if(!0!==a11yParameter?.disable&&"off"!==a11yParameter?.test&&!0!==a11yGlobals?.manual&&"story"===viewMode)try{let result=await run(a11yParameter,storyId);if(result){let hasViolations=(result?.violations.length??0)>0;if(reporting.addReport({type:"a11y",version:1,result,status:hasViolations?getMode():"passed"}),getIsVitestStandaloneRun()&&hasViolations&&"failed"===getMode()){if(!vitestMatchersExtended){let{toHaveNoViolations}=await __webpack_require__.e(646).then(__webpack_require__.bind(__webpack_require__,"./node_modules/@storybook/addon-a11y/dist/matchers-7Z3WT2CE.mjs"));storybook_test__WEBPACK_IMPORTED_MODULE_0__.expect.extend({toHaveNoViolations}),vitestMatchersExtended=!0}(0,storybook_test__WEBPACK_IMPORTED_MODULE_0__.expect)(result).toHaveNoViolations()}}}catch(e){if(reporting.addReport({type:"a11y",version:1,result:{error:e},status:"failed"}),getIsVitestStandaloneRun())throw e}},initialGlobals={a11y:{manual:!1}},parameters={a11y:{test:"todo"}}},"./node_modules/@storybook/addon-docs/dist/blocks.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{zE:()=>AnchorMdx,ov:()=>ArgTypes,XA:()=>CodeOrSourceMdx,VY:()=>DescriptionContainer,kQ:()=>Docs,vD:()=>DocsContainer,vt:()=>DocsContext,xB:()=>HeaderMdx,Sw:()=>HeadersMdx,Tn:()=>Primary,om:()=>Stories,Pd:()=>Subtitle2,hE:()=>Title3});var chunk_SPFYY5GD=__webpack_require__("./node_modules/@storybook/addon-docs/dist/chunk-SPFYY5GD.mjs"),chunk_QUZPS4B6=__webpack_require__("./node_modules/@storybook/addon-docs/dist/chunk-QUZPS4B6.mjs"),react=__webpack_require__("./node_modules/react/index.js"),external_STORYBOOK_MODULE_CLIENT_LOGGER_=__webpack_require__("storybook/internal/client-logger"),components=__webpack_require__("./node_modules/storybook/dist/components/index.js"),csf=__webpack_require__("./node_modules/storybook/dist/csf/index.js"),dist=__webpack_require__("./node_modules/@storybook/addon-docs/node_modules/@storybook/icons/dist/index.mjs"),theming=__webpack_require__("./node_modules/storybook/dist/theming/index.js"),external_STORYBOOK_MODULE_CORE_EVENTS_=__webpack_require__("storybook/internal/core-events"),external_STORYBOOK_MODULE_PREVIEW_API_=__webpack_require__("storybook/preview-api"),docs_tools=__webpack_require__("./node_modules/storybook/dist/docs-tools/index.js");function dedent(templ){for(var values=[],_i=1;_i=0?(this.lastItem=this.list[index],this.list[index].val):void 0},Similar.prototype.set=function(key,val){var index;return this.lastItem&&this.isEqual(this.lastItem.key,key)?(this.lastItem.val=val,this):(index=this.indexOf(key))>=0?(this.lastItem=this.list[index],this.list[index].val=val,this):(this.lastItem={key,val},this.list.push(this.lastItem),this.size++,this)},Similar.prototype.delete=function(key){var index;if(this.lastItem&&this.isEqual(this.lastItem.key,key)&&(this.lastItem=void 0),(index=this.indexOf(key))>=0)return this.size--,this.list.splice(index,1)[0]},Similar.prototype.has=function(key){var index;return!(!this.lastItem||!this.isEqual(this.lastItem.key,key))||(index=this.indexOf(key))>=0&&(this.lastItem=this.list[index],!0)},Similar.prototype.forEach=function(callback,thisArg){var i2;for(i2=0;i20&&(lruPath[argsLengthMinusOne]={cacheItem:currentCache,arg:arguments[argsLengthMinusOne]},isMemoized?function moveToMostRecentLru(lru,lruPath){var isMatch,i2,ii,lruLen=lru.length,lruPathLen=lruPath.length;for(i2=0;i2limit&&function removeCachedResult(removedLru){var tmp,i2,removedLruLen=removedLru.length,currentLru=removedLru[removedLruLen-1];for(currentLru.cacheItem.delete(currentLru.arg),i2=removedLruLen-2;i2>=0&&(currentLru=removedLru[i2],!(tmp=currentLru.cacheItem.get(currentLru.arg))||!tmp.size);i2--)currentLru.cacheItem.delete(currentLru.arg)}(lru.shift())),memoizerific.wasMemoized=isMemoized,memoizerific.numArgs=argsLengthMinusOne+1,fnResult};return memoizerific.limit=limit,memoizerific.wasMemoized=!1,memoizerific.cache=cache,memoizerific.lru=lru,memoizerific}}},{"map-or-similar":1}]},{},[3])(3)}))}});function _extends(){return _extends=Object.assign?Object.assign.bind():function(n2){for(var e2=1;e21?_len2-1:0),_key2=1;_key2<_len2;_key2++)args[_key2-1]=arguments[_key2];return function _assertThisInitialized(e2){if(void 0===e2)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e2}(_Error.call(this,format.apply(void 0,[ERRORS[code]].concat(args)))||this)}return function _inheritsLoose(t2,o2){t2.prototype=Object.create(o2.prototype),t2.prototype.constructor=t2,_setPrototypeOf(t2,o2)}(PolishedError2,_Error),PolishedError2}(_wrapNativeSuper(Error));function colorToInt(color){return Math.round(255*color)}function convertToInt(red,green,blue){return colorToInt(red)+","+colorToInt(green)+","+colorToInt(blue)}function hslToRgb(hue,saturation,lightness,convert2){if(void 0===convert2&&(convert2=convertToInt),0===saturation)return convert2(lightness,lightness,lightness);var huePrime=(hue%360+360)%360/60,chroma=(1-Math.abs(2*lightness-1))*saturation,secondComponent=chroma*(1-Math.abs(huePrime%2-1)),red=0,green=0,blue=0;huePrime>=0&&huePrime<1?(red=chroma,green=secondComponent):huePrime>=1&&huePrime<2?(red=secondComponent,green=chroma):huePrime>=2&&huePrime<3?(green=chroma,blue=secondComponent):huePrime>=3&&huePrime<4?(green=secondComponent,blue=chroma):huePrime>=4&&huePrime<5?(red=secondComponent,blue=chroma):huePrime>=5&&huePrime<6&&(red=chroma,blue=secondComponent);var lightnessModification=lightness-chroma/2;return convert2(red+lightnessModification,green+lightnessModification,blue+lightnessModification)}var namedColorMap={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};var hexRegex=/^#[a-fA-F0-9]{6}$/,hexRgbaRegex=/^#[a-fA-F0-9]{8}$/,reducedHexRegex=/^#[a-fA-F0-9]{3}$/,reducedRgbaHexRegex=/^#[a-fA-F0-9]{4}$/,rgbRegex=/^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i,rgbaRegex=/^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i,hslRegex=/^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,hslaRegex=/^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;function parseToRgb(color){if("string"!=typeof color)throw new PolishedError(3);var normalizedColor=function nameToHex(color){if("string"!=typeof color)return color;var normalizedColorName=color.toLowerCase();return namedColorMap[normalizedColorName]?"#"+namedColorMap[normalizedColorName]:color}(color);if(normalizedColor.match(hexRegex))return{red:parseInt(""+normalizedColor[1]+normalizedColor[2],16),green:parseInt(""+normalizedColor[3]+normalizedColor[4],16),blue:parseInt(""+normalizedColor[5]+normalizedColor[6],16)};if(normalizedColor.match(hexRgbaRegex)){var alpha=parseFloat((parseInt(""+normalizedColor[7]+normalizedColor[8],16)/255).toFixed(2));return{red:parseInt(""+normalizedColor[1]+normalizedColor[2],16),green:parseInt(""+normalizedColor[3]+normalizedColor[4],16),blue:parseInt(""+normalizedColor[5]+normalizedColor[6],16),alpha}}if(normalizedColor.match(reducedHexRegex))return{red:parseInt(""+normalizedColor[1]+normalizedColor[1],16),green:parseInt(""+normalizedColor[2]+normalizedColor[2],16),blue:parseInt(""+normalizedColor[3]+normalizedColor[3],16)};if(normalizedColor.match(reducedRgbaHexRegex)){var _alpha=parseFloat((parseInt(""+normalizedColor[4]+normalizedColor[4],16)/255).toFixed(2));return{red:parseInt(""+normalizedColor[1]+normalizedColor[1],16),green:parseInt(""+normalizedColor[2]+normalizedColor[2],16),blue:parseInt(""+normalizedColor[3]+normalizedColor[3],16),alpha:_alpha}}var rgbMatched=rgbRegex.exec(normalizedColor);if(rgbMatched)return{red:parseInt(""+rgbMatched[1],10),green:parseInt(""+rgbMatched[2],10),blue:parseInt(""+rgbMatched[3],10)};var rgbaMatched=rgbaRegex.exec(normalizedColor.substring(0,50));if(rgbaMatched)return{red:parseInt(""+rgbaMatched[1],10),green:parseInt(""+rgbaMatched[2],10),blue:parseInt(""+rgbaMatched[3],10),alpha:parseFloat(""+rgbaMatched[4])>1?parseFloat(""+rgbaMatched[4])/100:parseFloat(""+rgbaMatched[4])};var hslMatched=hslRegex.exec(normalizedColor);if(hslMatched){var rgbColorString="rgb("+hslToRgb(parseInt(""+hslMatched[1],10),parseInt(""+hslMatched[2],10)/100,parseInt(""+hslMatched[3],10)/100)+")",hslRgbMatched=rgbRegex.exec(rgbColorString);if(!hslRgbMatched)throw new PolishedError(4,normalizedColor,rgbColorString);return{red:parseInt(""+hslRgbMatched[1],10),green:parseInt(""+hslRgbMatched[2],10),blue:parseInt(""+hslRgbMatched[3],10)}}var hslaMatched=hslaRegex.exec(normalizedColor.substring(0,50));if(hslaMatched){var _rgbColorString="rgb("+hslToRgb(parseInt(""+hslaMatched[1],10),parseInt(""+hslaMatched[2],10)/100,parseInt(""+hslaMatched[3],10)/100)+")",_hslRgbMatched=rgbRegex.exec(_rgbColorString);if(!_hslRgbMatched)throw new PolishedError(4,normalizedColor,_rgbColorString);return{red:parseInt(""+_hslRgbMatched[1],10),green:parseInt(""+_hslRgbMatched[2],10),blue:parseInt(""+_hslRgbMatched[3],10),alpha:parseFloat(""+hslaMatched[4])>1?parseFloat(""+hslaMatched[4])/100:parseFloat(""+hslaMatched[4])}}throw new PolishedError(5)}function parseToHsl(color){return function rgbToHsl(color){var red=color.red/255,green=color.green/255,blue=color.blue/255,max=Math.max(red,green,blue),min=Math.min(red,green,blue),lightness=(max+min)/2;if(max===min)return void 0!==color.alpha?{hue:0,saturation:0,lightness,alpha:color.alpha}:{hue:0,saturation:0,lightness};var hue,delta=max-min,saturation=lightness>.5?delta/(2-max-min):delta/(max+min);switch(max){case red:hue=(green-blue)/delta+(green=1?rgb(firstValue,secondValue,thirdValue):"rgba("+firstValue+","+secondValue+","+thirdValue+","+fourthValue+")";if("object"==typeof firstValue&&void 0===secondValue&&void 0===thirdValue&&void 0===fourthValue)return firstValue.alpha>=1?rgb(firstValue.red,firstValue.green,firstValue.blue):"rgba("+firstValue.red+","+firstValue.green+","+firstValue.blue+","+firstValue.alpha+")";throw new PolishedError(7)}function toColorString(color){if("object"!=typeof color)throw new PolishedError(8);if(function(color){return"number"==typeof color.red&&"number"==typeof color.green&&"number"==typeof color.blue&&"number"==typeof color.alpha}(color))return rgba(color);if(function(color){return"number"==typeof color.red&&"number"==typeof color.green&&"number"==typeof color.blue&&("number"!=typeof color.alpha||typeof color.alpha>"u")}(color))return rgb(color);if(function(color){return"number"==typeof color.hue&&"number"==typeof color.saturation&&"number"==typeof color.lightness&&"number"==typeof color.alpha}(color))return function hsla(value2,saturation,lightness,alpha){if("number"==typeof value2&&"number"==typeof saturation&&"number"==typeof lightness&&"number"==typeof alpha)return alpha>=1?hslToHex(value2,saturation,lightness):"rgba("+hslToRgb(value2,saturation,lightness)+","+alpha+")";if("object"==typeof value2&&void 0===saturation&&void 0===lightness&&void 0===alpha)return value2.alpha>=1?hslToHex(value2.hue,value2.saturation,value2.lightness):"rgba("+hslToRgb(value2.hue,value2.saturation,value2.lightness)+","+value2.alpha+")";throw new PolishedError(2)}(color);if(function(color){return"number"==typeof color.hue&&"number"==typeof color.saturation&&"number"==typeof color.lightness&&("number"!=typeof color.alpha||typeof color.alpha>"u")}(color))return function hsl(value2,saturation,lightness){if("number"==typeof value2&&"number"==typeof saturation&&"number"==typeof lightness)return hslToHex(value2,saturation,lightness);if("object"==typeof value2&&void 0===saturation&&void 0===lightness)return hslToHex(value2.hue,value2.saturation,value2.lightness);throw new PolishedError(1)}(color);throw new PolishedError(8)}function curried(f2,length,acc){return function(){var combined=acc.concat(Array.prototype.slice.call(arguments));return combined.length>=length?f2.apply(this,combined):curried(f2,length,combined)}}function curry(f2){return curried(f2,f2.length,[])}function guard(lowerBoundary,upperBoundary,value2){return Math.max(lowerBoundary,Math.min(upperBoundary,value2))}curry((function adjustHue(degree,color){if("transparent"===color)return color;var hslColor=parseToHsl(color);return toColorString(_extends({},hslColor,{hue:hslColor.hue+parseFloat(degree)}))}));var curriedDarken$1=curry((function darken(amount,color){if("transparent"===color)return color;var hslColor=parseToHsl(color);return toColorString(_extends({},hslColor,{lightness:guard(0,1,hslColor.lightness-parseFloat(amount))}))}));curry((function desaturate(amount,color){if("transparent"===color)return color;var hslColor=parseToHsl(color);return toColorString(_extends({},hslColor,{saturation:guard(0,1,hslColor.saturation-parseFloat(amount))}))}));var curriedLighten$1=curry((function lighten(amount,color){if("transparent"===color)return color;var hslColor=parseToHsl(color);return toColorString(_extends({},hslColor,{lightness:guard(0,1,hslColor.lightness+parseFloat(amount))}))}));var mix$1=curry((function mix(weight,color,otherColor){if("transparent"===color)return otherColor;if("transparent"===otherColor)return color;if(0===weight)return otherColor;var parsedColor1=parseToRgb(color),color1=_extends({},parsedColor1,{alpha:"number"==typeof parsedColor1.alpha?parsedColor1.alpha:1}),parsedColor2=parseToRgb(otherColor),color2=_extends({},parsedColor2,{alpha:"number"==typeof parsedColor2.alpha?parsedColor2.alpha:1}),alphaDelta=color1.alpha-color2.alpha,x2=2*parseFloat(weight)-1,weight1=((x2*alphaDelta===-1?x2:x2+alphaDelta)/(1+x2*alphaDelta)+1)/2,weight2=1-weight1;return rgba({red:Math.floor(color1.red*weight1+color2.red*weight2),green:Math.floor(color1.green*weight1+color2.green*weight2),blue:Math.floor(color1.blue*weight1+color2.blue*weight2),alpha:color1.alpha*parseFloat(weight)+color2.alpha*(1-parseFloat(weight))})}));var curriedOpacify$1=curry((function opacify(amount,color){if("transparent"===color)return color;var parsedColor=parseToRgb(color);return rgba(_extends({},parsedColor,{alpha:guard(0,1,(100*("number"==typeof parsedColor.alpha?parsedColor.alpha:1)+100*parseFloat(amount))/100)}))}));curry((function saturate(amount,color){if("transparent"===color)return color;var hslColor=parseToHsl(color);return toColorString(_extends({},hslColor,{saturation:guard(0,1,hslColor.saturation+parseFloat(amount))}))})),curry((function setHue(hue,color){return"transparent"===color?color:toColorString(_extends({},parseToHsl(color),{hue:parseFloat(hue)}))})),curry((function setLightness(lightness,color){return"transparent"===color?color:toColorString(_extends({},parseToHsl(color),{lightness:parseFloat(lightness)}))})),curry((function setSaturation(saturation,color){return"transparent"===color?color:toColorString(_extends({},parseToHsl(color),{saturation:parseFloat(saturation)}))})),curry((function shade(percentage,color){return"transparent"===color?color:mix$1(parseFloat(percentage),"rgb(0, 0, 0)",color)})),curry((function tint(percentage,color){return"transparent"===color?color:mix$1(parseFloat(percentage),"rgb(255, 255, 255)",color)}));var curriedTransparentize$1=curry((function transparentize(amount,color){if("transparent"===color)return color;var parsedColor=parseToRgb(color);return rgba(_extends({},parsedColor,{alpha:guard(0,1,+(100*("number"==typeof parsedColor.alpha?parsedColor.alpha:1)-100*parseFloat(amount)).toFixed(2)/100)}))})),Wrapper=theming.I4.div(components.YV,(({theme})=>({backgroundColor:"light"===theme.base?"rgba(0,0,0,.01)":"rgba(255,255,255,.01)",borderRadius:theme.appBorderRadius,border:`1px dashed ${theme.appBorderColor}`,display:"flex",alignItems:"center",justifyContent:"center",padding:20,margin:"25px 0 40px",color:curriedTransparentize$1(.3,theme.color.defaultText),fontSize:theme.typography.size.s2}))),EmptyBlock=props=>react.createElement(Wrapper,{...props,className:"docblock-emptyblock sb-unstyled"}),StyledSyntaxHighlighter=(0,theming.I4)(components.bF)((({theme})=>({fontSize:theme.typography.size.s2-1+"px",lineHeight:"19px",margin:"25px 0 40px",borderRadius:theme.appBorderRadius,boxShadow:"light"===theme.base?"rgba(0, 0, 0, 0.10) 0 1px 3px 0":"rgba(0, 0, 0, 0.20) 0 2px 5px 0","pre.prismjs":{padding:20,background:"inherit"}}))),SourceSkeletonWrapper=theming.I4.div((({theme})=>({background:theme.background.content,borderRadius:theme.appBorderRadius,border:`1px solid ${theme.appBorderColor}`,boxShadow:"light"===theme.base?"rgba(0, 0, 0, 0.10) 0 1px 3px 0":"rgba(0, 0, 0, 0.20) 0 2px 5px 0",margin:"25px 0 40px",padding:"20px 20px 20px 22px"}))),SourceSkeletonPlaceholder=theming.I4.div((({theme})=>({animation:`${theme.animation.glow} 1.5s ease-in-out infinite`,background:theme.appBorderColor,height:17,marginTop:1,width:"60%",[`&:first-child${theming.v_}`]:{margin:0}}))),SourceSkeleton=()=>react.createElement(SourceSkeletonWrapper,null,react.createElement(SourceSkeletonPlaceholder,null),react.createElement(SourceSkeletonPlaceholder,{style:{width:"80%"}}),react.createElement(SourceSkeletonPlaceholder,{style:{width:"30%"}}),react.createElement(SourceSkeletonPlaceholder,{style:{width:"80%"}})),Source=({isLoading,error,language,code,dark,format:format3=!0,...rest})=>{let{typography}=(0,theming.DP)();if(isLoading)return react.createElement(SourceSkeleton,null);if(error)return react.createElement(EmptyBlock,null,error);let syntaxHighlighter=react.createElement(StyledSyntaxHighlighter,{bordered:!0,copyable:!0,format:format3,language:language??"jsx",className:"docblock-source sb-unstyled",...rest},code);if(typeof dark>"u")return syntaxHighlighter;let overrideTheme=dark?theming.Zj.dark:theming.Zj.light;return react.createElement(theming.NP,{theme:(0,theming.C6)({...overrideTheme,fontCode:typography.fonts.mono,fontBase:typography.fonts.base})},syntaxHighlighter)},toGlobalSelector=element=>`& :where(${element}:not(.sb-anchor, .sb-unstyled, .sb-unstyled ${element}))`,Title=theming.I4.h1(components.YV,(({theme})=>({color:theme.color.defaultText,fontSize:theme.typography.size.m3,fontWeight:theme.typography.weight.bold,lineHeight:"32px","@media (min-width: 600px)":{fontSize:theme.typography.size.l1,lineHeight:"36px",marginBottom:"16px"}}))),Subtitle=theming.I4.h2(components.YV,(({theme})=>({fontWeight:theme.typography.weight.regular,fontSize:theme.typography.size.s3,lineHeight:"20px",borderBottom:"none",marginBottom:15,"@media (min-width: 600px)":{fontSize:theme.typography.size.m1,lineHeight:"28px",marginBottom:24},color:curriedTransparentize$1(.25,theme.color.defaultText)}))),DocsContent=theming.I4.div((({theme})=>{let reset={fontFamily:theme.typography.fonts.base,fontSize:theme.typography.size.s3,margin:0,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitOverflowScrolling:"touch"},headers={margin:"20px 0 8px",padding:0,cursor:"text",position:"relative",color:theme.color.defaultText,"&:first-of-type":{marginTop:0,paddingTop:0},"&:hover a.anchor":{textDecoration:"none"},"& code":{fontSize:"inherit"}},code={lineHeight:1,margin:"0 2px",padding:"3px 5px",whiteSpace:"nowrap",borderRadius:3,fontSize:theme.typography.size.s2-1,border:"light"===theme.base?`1px solid ${theme.color.mediumlight}`:`1px solid ${theme.color.darker}`,color:"light"===theme.base?curriedTransparentize$1(.1,theme.color.defaultText):curriedTransparentize$1(.3,theme.color.defaultText),backgroundColor:"light"===theme.base?theme.color.lighter:theme.color.border};return{maxWidth:1e3,width:"100%",minWidth:0,[toGlobalSelector("a")]:{...reset,fontSize:"inherit",lineHeight:"24px",color:theme.color.secondary,textDecoration:"none","&.absent":{color:"#cc0000"},"&.anchor":{display:"block",paddingLeft:30,marginLeft:-30,cursor:"pointer",position:"absolute",top:0,left:0,bottom:0}},[toGlobalSelector("blockquote")]:{...reset,margin:"16px 0",borderLeft:`4px solid ${theme.color.medium}`,padding:"0 15px",color:theme.color.dark,"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}},[toGlobalSelector("div")]:reset,[toGlobalSelector("dl")]:{...reset,margin:"16px 0",padding:0,"& dt":{fontSize:"14px",fontWeight:"bold",fontStyle:"italic",padding:0,margin:"16px 0 4px"},"& dt:first-of-type":{padding:0},"& dt > :first-of-type":{marginTop:0},"& dt > :last-child":{marginBottom:0},"& dd":{margin:"0 0 16px",padding:"0 15px"},"& dd > :first-of-type":{marginTop:0},"& dd > :last-child":{marginBottom:0}},[toGlobalSelector("h1")]:{...reset,...headers,fontSize:`${theme.typography.size.l1}px`,fontWeight:theme.typography.weight.bold},[toGlobalSelector("h2")]:{...reset,...headers,fontSize:`${theme.typography.size.m2}px`,paddingBottom:4,borderBottom:`1px solid ${theme.appBorderColor}`},[toGlobalSelector("h3")]:{...reset,...headers,fontSize:`${theme.typography.size.m1}px`,fontWeight:theme.typography.weight.bold},[toGlobalSelector("h4")]:{...reset,...headers,fontSize:`${theme.typography.size.s3}px`},[toGlobalSelector("h5")]:{...reset,...headers,fontSize:`${theme.typography.size.s2}px`},[toGlobalSelector("h6")]:{...reset,...headers,fontSize:`${theme.typography.size.s2}px`,color:theme.color.dark},[toGlobalSelector("hr")]:{border:"0 none",borderTop:`1px solid ${theme.appBorderColor}`,height:4,padding:0},[toGlobalSelector("img")]:{maxWidth:"100%"},[toGlobalSelector("li")]:{...reset,fontSize:theme.typography.size.s2,color:theme.color.defaultText,lineHeight:"24px","& + li":{marginTop:".25em"},"& ul, & ol":{marginTop:".25em",marginBottom:0},"& code":code},[toGlobalSelector("ol")]:{...reset,margin:"16px 0",paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},[toGlobalSelector("p")]:{...reset,margin:"16px 0",fontSize:theme.typography.size.s2,lineHeight:"24px",color:theme.color.defaultText,"& code":code},[toGlobalSelector("pre")]:{...reset,fontFamily:theme.typography.fonts.mono,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",lineHeight:"18px",padding:"11px 1rem",whiteSpace:"pre-wrap",color:"inherit",borderRadius:3,margin:"1rem 0","&:not(.prismjs)":{background:"transparent",border:"none",borderRadius:0,padding:0,margin:0},"& pre, &.prismjs":{padding:15,margin:0,whiteSpace:"pre-wrap",color:"inherit",fontSize:"13px",lineHeight:"19px",code:{color:"inherit",fontSize:"inherit"}},"& code":{whiteSpace:"pre"},"& code, & tt":{border:"none"}},[toGlobalSelector("span")]:{...reset,"&.frame":{display:"block",overflow:"hidden","& > span":{border:`1px solid ${theme.color.medium}`,display:"block",float:"left",overflow:"hidden",margin:"13px 0 0",padding:7,width:"auto"},"& span img":{display:"block",float:"left"},"& span span":{clear:"both",color:theme.color.darkest,display:"block",padding:"5px 0 0"}},"&.align-center":{display:"block",overflow:"hidden",clear:"both","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"center"},"& span img":{margin:"0 auto",textAlign:"center"}},"&.align-right":{display:"block",overflow:"hidden",clear:"both","& > span":{display:"block",overflow:"hidden",margin:"13px 0 0",textAlign:"right"},"& span img":{margin:0,textAlign:"right"}},"&.float-left":{display:"block",marginRight:13,overflow:"hidden",float:"left","& span":{margin:"13px 0 0"}},"&.float-right":{display:"block",marginLeft:13,overflow:"hidden",float:"right","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"right"}}},[toGlobalSelector("table")]:{...reset,margin:"16px 0",fontSize:theme.typography.size.s2,lineHeight:"24px",padding:0,borderCollapse:"collapse","& tr":{borderTop:`1px solid ${theme.appBorderColor}`,backgroundColor:theme.appContentBg,margin:0,padding:0},"& tr:nth-of-type(2n)":{backgroundColor:"dark"===theme.base?theme.color.darker:theme.color.lighter},"& tr th":{fontWeight:"bold",color:theme.color.defaultText,border:`1px solid ${theme.appBorderColor}`,margin:0,padding:"6px 13px"},"& tr td":{border:`1px solid ${theme.appBorderColor}`,color:theme.color.defaultText,margin:0,padding:"6px 13px"},"& tr th :first-of-type, & tr td :first-of-type":{marginTop:0},"& tr th :last-child, & tr td :last-child":{marginBottom:0}},[toGlobalSelector("ul")]:{...reset,margin:"16px 0",paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0},listStyle:"disc"}}})),DocsWrapper=theming.I4.div((({theme})=>({background:theme.background.content,display:"flex",flexDirection:"row-reverse",justifyContent:"center",padding:"4rem 20px",minHeight:"100vh",boxSizing:"border-box",gap:"3rem","@media (min-width: 600px)":{}}))),DocsPageWrapper=({children,toc})=>react.createElement(DocsWrapper,{className:"sbdocs sbdocs-wrapper"},toc,react.createElement(DocsContent,{className:"sbdocs sbdocs-content"},children)),getBlockBackgroundStyle=theme=>({borderRadius:theme.appBorderRadius,background:theme.background.content,boxShadow:"light"===theme.base?"rgba(0, 0, 0, 0.10) 0 1px 3px 0":"rgba(0, 0, 0, 0.20) 0 2px 5px 0",border:`1px solid ${theme.appBorderColor}`}),{window:globalWindow}=globalThis,IFrame=class extends react.Component{constructor(){super(...arguments),this.iframe=null}componentDidMount(){let{id}=this.props;this.iframe=globalWindow.document.getElementById(id)}shouldComponentUpdate(nextProps){let{scale}=nextProps;return scale!==this.props.scale&&this.setIframeBodyStyle({width:100*scale+"%",height:100*scale+"%",transform:`scale(${1/scale})`,transformOrigin:"top left"}),!1}setIframeBodyStyle(style){return Object.assign(this.iframe.contentDocument.body.style,style)}render(){let{id,title,src,allowFullScreen,scale,...rest}=this.props;return react.createElement("iframe",{id,title,src,...allowFullScreen?{allow:"fullscreen"}:{},loading:"lazy",...rest})}},ZoomContext=(0,react.createContext)({scale:1}),{PREVIEW_URL}=globalThis,BASE_URL=PREVIEW_URL||"iframe.html",storyBlockIdFromId=({story,primary})=>`story--${story.id}${primary?"--primary":""}`,InlineStory=props=>{let storyRef=(0,react.useRef)(),[showLoader,setShowLoader]=(0,react.useState)(!0),[error,setError]=(0,react.useState)(),{story,height,autoplay,forceInitialArgs,renderStoryToElement}=props;return(0,react.useEffect)((()=>{if(!story||!storyRef.current)return()=>{};let element=storyRef.current,cleanup=renderStoryToElement(story,element,{showMain:()=>{},showError:({title,description})=>setError(new Error(`${title} - ${description}`)),showException:err=>setError(err)},{autoplay,forceInitialArgs});return setShowLoader(!1),()=>{Promise.resolve().then((()=>cleanup()))}}),[autoplay,renderStoryToElement,story]),error?react.createElement("pre",null,react.createElement(components.Df,{error})):react.createElement(react.Fragment,null,height?react.createElement("style",null,`#${storyBlockIdFromId(props)} { min-height: ${height}; transform: translateZ(0); overflow: auto }`):null,showLoader&&react.createElement(StorySkeleton,null),react.createElement("div",{ref:storyRef,id:`${storyBlockIdFromId(props)}-inner`,"data-name":story.name}))},IFrameStory=({story,height="500px"})=>react.createElement("div",{style:{width:"100%",height}},react.createElement(ZoomContext.Consumer,null,(({scale})=>react.createElement(IFrame,{key:"iframe",id:`iframe--${story.id}`,title:story.name,src:(0,components.jZ)(BASE_URL,story.id,{viewMode:"story"}),allowFullScreen:!0,scale,style:{width:"100%",height:"100%",border:"0 none"}})))),ErrorMessage=theming.I4.strong((({theme})=>({color:theme.color.orange}))),Story=props=>{let{inline,story}=props;return inline&&!props.autoplay&&story.usesMount?react.createElement(ErrorMessage,null,"This story mounts inside of play. Set"," ",react.createElement("a",{href:"https://storybook.js.org/docs/api/doc-blocks/doc-block-story?ref=ui#autoplay"},"autoplay")," ","to true to view this story."):react.createElement("div",{id:storyBlockIdFromId(props),className:"sb-story sb-unstyled","data-story-block":"true"},inline?react.createElement(InlineStory,{...props}):react.createElement(IFrameStory,{...props}))},StorySkeleton=()=>react.createElement(components.aH,null),Bar=(0,theming.I4)(components.px)({position:"absolute",left:0,right:0,top:0,transition:"transform .2s linear"}),Wrapper2=theming.I4.div({display:"flex",alignItems:"center",gap:4}),IconPlaceholder=theming.I4.div((({theme})=>({width:14,height:14,borderRadius:2,margin:"0 7px",backgroundColor:theme.appBorderColor,animation:`${theme.animation.glow} 1.5s ease-in-out infinite`}))),ChildrenContainer=theming.I4.div((({isColumn,columns,layout})=>({display:isColumn||!columns?"block":"flex",position:"relative",flexWrap:"wrap",overflow:"auto",flexDirection:isColumn?"column":"row","& .innerZoomElementWrapper > *":isColumn?{width:"fullscreen"!==layout?"calc(100% - 20px)":"100%",display:"block"}:{maxWidth:"fullscreen"!==layout?"calc(100% - 20px)":"100%",display:"inline-block"}})),(({layout="padded",inline})=>"centered"===layout||"padded"===layout?{padding:inline?"32px 22px":"0px","& .innerZoomElementWrapper > *":{width:"auto",border:"8px solid transparent!important"}}:{}),(({layout="padded",inline})=>"centered"===layout&&inline?{display:"flex",justifyContent:"center",justifyItems:"center",alignContent:"center",alignItems:"center"}:{}),(({columns})=>columns&&columns>1?{".innerZoomElementWrapper > *":{minWidth:`calc(100% / ${columns} - 20px)`}}:{})),StyledSource=(0,theming.I4)(Source)((({theme})=>({margin:0,borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:theme.appBorderRadius,borderBottomRightRadius:theme.appBorderRadius,border:"none",background:"light"===theme.base?"rgba(0, 0, 0, 0.85)":curriedDarken$1(.05,theme.background.content),color:theme.color.lightest,button:{background:"light"===theme.base?"rgba(0, 0, 0, 0.85)":curriedDarken$1(.05,theme.background.content)}}))),PreviewContainer=theming.I4.div((({theme,withSource,isExpanded})=>({position:"relative",overflow:"hidden",margin:"25px 0 40px",...getBlockBackgroundStyle(theme),borderBottomLeftRadius:withSource&&isExpanded&&0,borderBottomRightRadius:withSource&&isExpanded&&0,borderBottomWidth:isExpanded&&0,"h3 + &":{marginTop:"16px"}})),(({withToolbar})=>withToolbar&&{paddingTop:40}));function getStoryId(children){if(1===react.Children.count(children)){let elt=children;if(elt.props)return elt.props.id}return null}var PositionedToolbar=(0,theming.I4)((({isLoading,storyId,baseUrl,zoom,resetZoom,...rest})=>react.createElement(Bar,{...rest},react.createElement(Wrapper2,{key:"left"},isLoading?[1,2,3].map((key=>react.createElement(IconPlaceholder,{key}))):react.createElement(react.Fragment,null,react.createElement(components.K0,{key:"zoomin",onClick:e2=>{e2.preventDefault(),zoom(.8)},title:"Zoom in"},react.createElement(dist.PU,null)),react.createElement(components.K0,{key:"zoomout",onClick:e2=>{e2.preventDefault(),zoom(1.25)},title:"Zoom out"},react.createElement(dist.LoD,null)),react.createElement(components.K0,{key:"zoomreset",onClick:e2=>{e2.preventDefault(),resetZoom()},title:"Reset zoom"},react.createElement(dist.wV5,null)))))))({position:"absolute",top:0,left:0,right:0,height:40}),Relative=theming.I4.div({overflow:"hidden",position:"relative"}),Preview=({isLoading,isColumn,columns,children,withSource,withToolbar=!1,isExpanded=!1,additionalActions,className,layout="padded",inline=!1,...props})=>{let[expanded,setExpanded]=(0,react.useState)(isExpanded),{source,actionItem}=((withSource,expanded,setExpanded)=>{switch(!0){case!(!withSource||!withSource.error):return{source:null,actionItem:{title:"No code available",className:"docblock-code-toggle docblock-code-toggle--disabled",disabled:!0,onClick:()=>setExpanded(!1)}};case expanded:return{source:react.createElement(StyledSource,{...withSource,dark:!0}),actionItem:{title:"Hide code",className:"docblock-code-toggle docblock-code-toggle--expanded",onClick:()=>setExpanded(!1)}};default:return{source:react.createElement(StyledSource,{...withSource,dark:!0}),actionItem:{title:"Show code",className:"docblock-code-toggle",onClick:()=>setExpanded(!0)}}}})(withSource,expanded,setExpanded),[scale,setScale]=(0,react.useState)(1),previewClasses=[className].concat(["sbdocs","sbdocs-preview","sb-unstyled"]),defaultActionItems=withSource?[actionItem]:[],[additionalActionItems,setAdditionalActionItems]=(0,react.useState)(additionalActions?[...additionalActions]:[]),actionItems=[...defaultActionItems,...additionalActionItems],{window:globalWindow4}=globalThis,copyToClipboard=(0,react.useCallback)((async text=>{let{createCopyToClipboardFunction}=await Promise.resolve().then(__webpack_require__.bind(__webpack_require__,"./node_modules/storybook/dist/components/index.js"));createCopyToClipboardFunction()}),[]);return react.createElement(PreviewContainer,{withSource,withToolbar,...props,className:previewClasses.join(" ")},withToolbar&&react.createElement(PositionedToolbar,{isLoading,border:!0,zoom:z2=>setScale(scale*z2),resetZoom:()=>setScale(1),storyId:getStoryId(children),baseUrl:"./iframe.html"}),react.createElement(ZoomContext.Provider,{value:{scale}},react.createElement(Relative,{className:"docs-story",onCopyCapture:withSource&&(e2=>{let selection=globalWindow4.getSelection();selection&&"Range"===selection.type||(e2.preventDefault(),0===additionalActionItems.filter((item=>"Copied"===item.title)).length&©ToClipboard(source?.props.code??"").then((()=>{setAdditionalActionItems([...additionalActionItems,{title:"Copied",onClick:()=>{}}]),globalWindow4.setTimeout((()=>setAdditionalActionItems(additionalActionItems.filter((item=>"Copied"!==item.title)))),1500)})))})},react.createElement(ChildrenContainer,{isColumn:isColumn||!Array.isArray(children),columns,layout,inline},react.createElement(components.GP.Element,{centered:"centered"===layout,scale:inline?scale:1},Array.isArray(children)?children.map(((child,i2)=>react.createElement("div",{key:i2},child))):react.createElement("div",null,children))),react.createElement(components.E7,{actionItems}))),withSource&&expanded&&source)};(0,theming.I4)(Preview)((()=>({".docs-story":{paddingTop:32,paddingBottom:40}})));var TabbedArgsTable=({tabs,...props})=>{let entries=Object.entries(tabs);return 1===entries.length?react.createElement(ArgsTable,{...entries[0][1],...props}):react.createElement(components._j,null,entries.map(((entry,index)=>{let[label,table]=entry,id=`prop_table_div_${label}`,argsTableProps=0===index?props:{sort:props.sort};return react.createElement("div",{key:id,id,title:label},(({active})=>active?react.createElement(ArgsTable,{key:`prop_table_${label}`,...table,...argsTableProps}):null))})))};theming.I4.div((({theme})=>({marginRight:30,fontSize:`${theme.typography.size.s1}px`,color:"light"===theme.base?curriedTransparentize$1(.4,theme.color.defaultText):curriedTransparentize$1(.6,theme.color.defaultText)}))),theming.I4.div({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),theming.I4.div({display:"flex",flexDirection:"row",alignItems:"baseline","&:not(:last-child)":{marginBottom:"1rem"}}),theming.I4.div(components.YV,(({theme})=>({...getBlockBackgroundStyle(theme),margin:"25px 0 40px",padding:"30px 20px"}))),theming.I4.div((({theme})=>({fontWeight:theme.typography.weight.bold,color:theme.color.defaultText}))),theming.I4.div((({theme})=>({color:"light"===theme.base?curriedTransparentize$1(.2,theme.color.defaultText):curriedTransparentize$1(.6,theme.color.defaultText)}))),theming.I4.div({flex:"0 0 30%",lineHeight:"20px",marginTop:5}),theming.I4.div((({theme})=>({flex:1,textAlign:"center",fontFamily:theme.typography.fonts.mono,fontSize:theme.typography.size.s1,lineHeight:1,overflow:"hidden",color:"light"===theme.base?curriedTransparentize$1(.4,theme.color.defaultText):curriedTransparentize$1(.6,theme.color.defaultText),"> div":{display:"inline-block",overflow:"hidden",maxWidth:"100%",textOverflow:"ellipsis"},span:{display:"block",marginTop:2}}))),theming.I4.div({display:"flex",flexDirection:"row"}),theming.I4.div((({background})=>({position:"relative",flex:1,"&::before":{position:"absolute",top:0,left:0,width:"100%",height:"100%",background,content:'""'}}))),theming.I4.div((({theme})=>({...getBlockBackgroundStyle(theme),display:"flex",flexDirection:"row",height:50,marginBottom:5,overflow:"hidden",backgroundColor:"white",backgroundImage:"repeating-linear-gradient(-45deg, #ccc, #ccc 1px, #fff 1px, #fff 16px)",backgroundClip:"padding-box"}))),theming.I4.div({display:"flex",flexDirection:"column",flex:1,position:"relative",marginBottom:30}),theming.I4.div({flex:1,display:"flex",flexDirection:"row"}),theming.I4.div({display:"flex",alignItems:"flex-start"}),theming.I4.div({flex:"0 0 30%"}),theming.I4.div({flex:1}),theming.I4.div((({theme})=>({display:"flex",flexDirection:"row",alignItems:"center",paddingBottom:20,fontWeight:theme.typography.weight.bold,color:"light"===theme.base?curriedTransparentize$1(.4,theme.color.defaultText):curriedTransparentize$1(.6,theme.color.defaultText)}))),theming.I4.div((({theme})=>({fontSize:theme.typography.size.s2,lineHeight:"20px",display:"flex",flexDirection:"column"})));theming.I4.div((({theme})=>({fontFamily:theme.typography.fonts.base,fontSize:theme.typography.size.s1,color:theme.color.defaultText,marginLeft:10,lineHeight:1.2,display:"-webkit-box",overflow:"hidden",wordBreak:"break-word",textOverflow:"ellipsis",WebkitLineClamp:2,WebkitBoxOrient:"vertical"}))),theming.I4.div((({theme})=>({...getBlockBackgroundStyle(theme),overflow:"hidden",height:40,width:40,display:"flex",alignItems:"center",justifyContent:"center",flex:"none","> img, > svg":{width:20,height:20}}))),theming.I4.div({display:"inline-flex",flexDirection:"row",alignItems:"center",width:"100%"}),theming.I4.div({display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(140px, 1fr))",gridGap:"8px 16px",gridAutoFlow:"row dense",gridAutoRows:50});function build_html_default(options){let tocElement,forEach=[].forEach,some=[].some,body=typeof window<"u"&&document.body,currentlyHighlighting=!0,eventCount=0;function createEl(d2,container){let link=container.appendChild(function createLink(data){let item=document.createElement("li"),a2=document.createElement("a");return options.listItemClass&&item.setAttribute("class",options.listItemClass),options.onClick&&(a2.onclick=options.onClick),options.includeTitleTags&&a2.setAttribute("title",data.textContent),options.includeHtml&&data.childNodes.length?forEach.call(data.childNodes,(node=>{a2.appendChild(node.cloneNode(!0))})):a2.textContent=data.textContent,a2.setAttribute("href",`${options.basePath}#${data.id}`),a2.setAttribute("class",`${options.linkClass+" "}node-name--${data.nodeName} ${options.extraLinkClasses}`),item.appendChild(a2),item}(d2));if(d2.children.length){let list=createList(d2.isCollapsed);d2.children.forEach((child=>{createEl(child,list)})),link.appendChild(list)}}function createList(isCollapsed){let listElement=options.orderedList?"ol":"ul",list=document.createElement(listElement),classes=options.listClass+" "+options.extraListClasses;return isCollapsed&&(classes=classes+" "+options.collapsibleClass,classes=classes+" "+options.isCollapsedClass),list.setAttribute("class",classes),list}function getHeadingTopPos(obj){let position=0;return null!==obj&&(position=obj.offsetTop,options.hasInnerContainers&&(position+=getHeadingTopPos(obj.offsetParent))),position}function updateClassname(obj,className){return obj&&obj.className!==className&&(obj.className=className),obj}function removeCollapsedFromParents(element){return element&&-1!==element.className.indexOf(options.collapsibleClass)&&-1!==element.className.indexOf(options.isCollapsedClass)?(updateClassname(element,element.className.replace(" "+options.isCollapsedClass,"")),removeCollapsedFromParents(element.parentNode.parentNode)):element}function getIsHeaderBottomMode(headerId){let scrollEl=getScrollEl();return(document?.getElementById(headerId)).offsetTop>scrollEl.offsetHeight-1.4*scrollEl.clientHeight-options.bottomModeThreshold}function getIsPageBottomMode(){let scrollEl=getScrollEl(),isScrollable=scrollEl.scrollHeight>scrollEl.clientHeight,isBottomMode=getScrollTop()+scrollEl.clientHeight>scrollEl.offsetHeight-options.bottomModeThreshold;return isScrollable&&isBottomMode}function getScrollEl(){let el;return el=options.scrollContainer&&document.querySelector(options.scrollContainer)?document.querySelector(options.scrollContainer):document.documentElement||body,el}function getScrollTop(){return getScrollEl()?.scrollTop||0}function getTopHeader(headings,scrollTop=getScrollTop()){let topHeader;return some.call(headings,((heading,i2)=>{if(getHeadingTopPos(heading)>scrollTop+options.headingsOffset+10){return topHeader=headings[0===i2?i2:i2-1],!0}if(i2===headings.length-1)return topHeader=headings[headings.length-1],!0})),topHeader}return{enableTocAnimation:function enableTocAnimation(){currentlyHighlighting=!0},disableTocAnimation:function disableTocAnimation(event){let target=event.target||event.srcElement;"string"!=typeof target.className||-1===target.className.indexOf(options.linkClass)||(currentlyHighlighting=!1)},render:function render(parent,data){let container=createList(!1);if(data.forEach((d2=>{createEl(d2,container)})),tocElement=parent||tocElement,null!==tocElement)return tocElement.firstChild&&tocElement.removeChild(tocElement.firstChild),0===data.length?tocElement:tocElement.appendChild(container)},updateToc:function updateToc(headingsArray,event){options.positionFixedSelector&&function updateFixedSidebarClass(){let scrollTop=getScrollTop(),posFixedEl=document.querySelector(options.positionFixedSelector);"auto"===options.fixedSidebarOffset&&(options.fixedSidebarOffset=tocElement.offsetTop),scrollTop>options.fixedSidebarOffset?-1===posFixedEl.className.indexOf(options.positionFixedClass)&&(posFixedEl.className+=" "+options.positionFixedClass):posFixedEl.className=posFixedEl.className.replace(" "+options.positionFixedClass,"")}();let headings=headingsArray,clickedHref=event?.target?.getAttribute?event?.target?.getAttribute("href"):null,isBottomMode=!(!clickedHref||"#"!==clickedHref.charAt(0))&&getIsHeaderBottomMode(clickedHref.replace("#",""));if(event&&eventCount<5&&eventCount++,(currentlyHighlighting||isBottomMode)&&tocElement&&headings.length>0){let topHeader=getTopHeader(headings),oldActiveTocLink=tocElement.querySelector(`.${options.activeLinkClass}`),topHeaderId=topHeader.id.replace(/([ #;&,.+*~':"!^$[\]()=>|/\\@])/g,"\\$1"),hashId=window.location.hash.replace("#",""),activeId=topHeaderId,isPageBottomMode=getIsPageBottomMode();clickedHref&&isBottomMode?activeId=clickedHref.replace("#",""):hashId&&hashId!==topHeaderId&&isPageBottomMode&&(getIsHeaderBottomMode(topHeaderId)||eventCount<=2)&&(activeId=hashId);let activeTocLink=tocElement.querySelector(`.${options.linkClass}[href="${options.basePath}#${activeId}"]`);if(oldActiveTocLink===activeTocLink)return;let tocLinks=tocElement.querySelectorAll(`.${options.linkClass}`);forEach.call(tocLinks,(tocLink=>{updateClassname(tocLink,tocLink.className.replace(" "+options.activeLinkClass,""))}));let tocLis=tocElement.querySelectorAll(`.${options.listItemClass}`);forEach.call(tocLis,(tocLi=>{updateClassname(tocLi,tocLi.className.replace(" "+options.activeListItemClass,""))})),activeTocLink&&-1===activeTocLink.className.indexOf(options.activeLinkClass)&&(activeTocLink.className+=" "+options.activeLinkClass);let li=activeTocLink?.parentNode;li&&-1===li.className.indexOf(options.activeListItemClass)&&(li.className+=" "+options.activeListItemClass);let tocLists=tocElement.querySelectorAll(`.${options.listClass}.${options.collapsibleClass}`);forEach.call(tocLists,(list=>{-1===list.className.indexOf(options.isCollapsedClass)&&(list.className+=" "+options.isCollapsedClass)})),activeTocLink?.nextSibling&&-1!==activeTocLink.nextSibling.className.indexOf(options.isCollapsedClass)&&updateClassname(activeTocLink.nextSibling,activeTocLink.nextSibling.className.replace(" "+options.isCollapsedClass,"")),removeCollapsedFromParents(activeTocLink?.parentNode.parentNode)}},getCurrentlyHighlighting:function getCurrentlyHighlighting(){return currentlyHighlighting},getTopHeader,getScrollTop,updateUrlHashForHeader:function updateUrlHashForHeader(headingsArray){let scrollTop=getScrollTop(),topHeader=getTopHeader(headingsArray,scrollTop),isPageBottomMode=getIsPageBottomMode();if(topHeader&&!(scrollTop<5)||isPageBottomMode){if(topHeader&&!isPageBottomMode){let newHash=`#${topHeader.id}`;window.location.hash!==newHash&&window.history.pushState(null,null,newHash)}}else"#"===window.location.hash||""===window.location.hash||window.history.pushState(null,null,"#")}}}var default_options_default={tocSelector:".js-toc",tocElement:null,contentSelector:".js-toc-content",contentElement:null,headingSelector:"h1, h2, h3",ignoreSelector:".js-toc-ignore",hasInnerContainers:!1,linkClass:"toc-link",extraLinkClasses:"",activeLinkClass:"is-active-link",listClass:"toc-list",extraListClasses:"",isCollapsedClass:"is-collapsed",collapsibleClass:"is-collapsible",listItemClass:"toc-list-item",activeListItemClass:"is-active-li",collapseDepth:0,scrollSmooth:!0,scrollSmoothDuration:420,scrollSmoothOffset:0,scrollEndCallback:function(e2){},headingsOffset:1,enableUrlHashUpdateOnScroll:!1,scrollHandlerType:"auto",scrollHandlerTimeout:50,throttleTimeout:50,positionFixedSelector:null,positionFixedClass:"is-position-fixed",fixedSidebarOffset:"auto",includeHtml:!1,includeTitleTags:!1,onClick:function(e2){},orderedList:!0,scrollContainer:null,skipRendering:!1,headingLabelCallback:!1,ignoreHiddenElements:!1,headingObjectCallback:null,basePath:"",disableTocScrollSync:!1,tocScrollingWrapper:null,tocScrollOffset:30,bottomModeThreshold:30};function parseContent(options){let reduce=[].reduce;function getLastItem(array2){return array2[array2.length-1]}function getHeadingLevel(heading){return+heading.nodeName.toUpperCase().replace("H","")}function getHeadingObject(heading){if(!function isHTMLElement(maybeElement){try{return maybeElement instanceof window.HTMLElement||maybeElement instanceof window.parent.HTMLElement}catch{return maybeElement instanceof window.HTMLElement}}(heading))return heading;if(options.ignoreHiddenElements&&(!heading.offsetHeight||!heading.offsetParent))return null;let headingLabel=heading.getAttribute("data-heading-label")||(options.headingLabelCallback?String(options.headingLabelCallback(heading.innerText)):(heading.innerText||heading.textContent).trim()),obj={id:heading.id,children:[],nodeName:heading.nodeName,headingLevel:getHeadingLevel(heading),textContent:headingLabel};return options.includeHtml&&(obj.childNodes=heading.childNodes),options.headingObjectCallback?options.headingObjectCallback(obj,heading):obj}return{nestHeadingsArray:function nestHeadingsArray(headingsArray){return reduce.call(headingsArray,(function(prev,curr){let currentHeading=getHeadingObject(curr);return currentHeading&&function addNode(node,nest){let obj=getHeadingObject(node),level=obj.headingLevel,array2=nest,lastItem=getLastItem(array2),counter=level-(lastItem?lastItem.headingLevel:0);for(;counter>0&&(lastItem=getLastItem(array2),!lastItem||level!==lastItem.headingLevel);)lastItem&&void 0!==lastItem.children&&(array2=lastItem.children),counter--;return level>=options.collapseDepth&&(obj.isCollapsed=!0),array2.push(obj),array2}(currentHeading,prev.nest),prev}),{nest:[]})},selectHeadings:function selectHeadings(contentElement,headingSelector){let selectors=headingSelector;options.ignoreSelector&&(selectors=headingSelector.split(",").map((function(selector){return`${selector.trim()}:not(${options.ignoreSelector})`})));try{return contentElement.querySelectorAll(selectors)}catch{return console.warn(`Headers not found with selector: ${selectors}`),null}}}}function initSmoothScrolling(options){var duration=options.duration,offset=options.offset;if(!(typeof window>"u"||typeof location>"u")){var pageUrl=location.hash?stripHash(location.href):location.href;!function delegatedLinkHijacking(){document.body.addEventListener("click",(function onClick(e2){!function isInPageLink(n2){return"a"===n2.tagName.toLowerCase()&&(n2.hash.length>0||"#"===n2.href.charAt(n2.href.length-1))&&(stripHash(n2.href)===pageUrl||stripHash(n2.href)+"#"===pageUrl)}(e2.target)||e2.target.className.indexOf("no-smooth-scroll")>-1||"#"===e2.target.href.charAt(e2.target.href.length-2)&&"!"===e2.target.href.charAt(e2.target.href.length-1)||-1===e2.target.className.indexOf(options.linkClass)||function jump(target,options){var timeStart,timeElapsed,start=window.pageYOffset,opt={duration:options.duration,offset:options.offset||0,callback:options.callback,easing:options.easing||easeInOutQuad},tgt=document.querySelector('[id="'+decodeURI(target).split("#").join("")+'"]')||document.querySelector('[id="'+target.split("#").join("")+'"]'),distance="string"==typeof target?opt.offset+(target?tgt&&tgt.getBoundingClientRect().top||0:-(document.documentElement.scrollTop||document.body.scrollTop)):target,duration="function"==typeof opt.duration?opt.duration(distance):opt.duration;function loop(time){timeElapsed=time-timeStart,window.scrollTo(0,opt.easing(timeElapsed,start,distance,duration)),timeElapsed{_buildHtml.updateToc(_headingsArray,e2),!_options.disableTocScrollSync&&!isClick&&function updateTocScroll(options){let toc=options.tocScrollingWrapper||options.tocElement||document.querySelector(options.tocSelector);if(toc&&toc.scrollHeight>toc.clientHeight){let activeItem=toc.querySelector(`.${options.activeListItemClass}`);if(activeItem){let scrollAmount=activeItem.offsetTop-options.tocScrollOffset;toc.scrollTop=scrollAmount>0?scrollAmount:0}}}(_options),_options.enableUrlHashUpdateOnScroll&&hasInitialized&&_buildHtml.getCurrentlyHighlighting()&&_buildHtml.updateUrlHashForHeader(_headingsArray);let isTop=0===e2?.target?.scrollingElement?.scrollTop;(e2&&(0===e2.eventPhase||null===e2.currentTarget)||isTop)&&(_buildHtml.updateToc(_headingsArray),_options.scrollEndCallback?.(e2))}),scrollHandlerTimeout,_options.scrollHandlerType),hasInitialized||(_scrollListener(),hasInitialized=!0),window.onhashchange=window.onscrollend=e2=>{_scrollListener(e2)},_options.scrollContainer&&document.querySelector(_options.scrollContainer)?(document.querySelector(_options.scrollContainer).addEventListener("scroll",_scrollListener,!1),document.querySelector(_options.scrollContainer).addEventListener("resize",_scrollListener,!1)):(document.addEventListener("scroll",_scrollListener,!1),document.addEventListener("resize",_scrollListener,!1));let timeout=null;clickListener=throttle((event=>{isClick=!0,_options.scrollSmooth&&_buildHtml.disableTocAnimation(event),_buildHtml.updateToc(_headingsArray,event),timeout&&clearTimeout(timeout),timeout=setTimeout((()=>{_buildHtml.enableTocAnimation()}),_options.scrollSmoothDuration),setTimeout((()=>{isClick=!1}),_options.scrollSmoothDuration+100)}),_options.throttleTimeout),_options.scrollContainer&&document.querySelector(_options.scrollContainer)?document.querySelector(_options.scrollContainer).addEventListener("click",clickListener,!1):document.addEventListener("click",clickListener,!1)}function destroy(){let tocElement=getTocElement(_options);null!==tocElement&&(_options.skipRendering||tocElement&&(tocElement.innerHTML=""),_options.scrollContainer&&document.querySelector(_options.scrollContainer)?(document.querySelector(_options.scrollContainer).removeEventListener("scroll",_scrollListener,!1),document.querySelector(_options.scrollContainer).removeEventListener("resize",_scrollListener,!1),_buildHtml&&document.querySelector(_options.scrollContainer).removeEventListener("click",clickListener,!1)):(document.removeEventListener("scroll",_scrollListener,!1),document.removeEventListener("resize",_scrollListener,!1),_buildHtml&&document.removeEventListener("click",clickListener,!1)))}var hasOwnProp=Object.prototype.hasOwnProperty;function throttle(fn,threshold,scope){let last,deferTimer;return threshold||(threshold=250),function(...args){let context=scope||this,now=+new Date;last&&now{last=now,fn.apply(context,args)}),threshold)):(last=now,fn.apply(context,args))}}function debounce(func,wait){let timeout;return(...args)=>{clearTimeout(timeout),timeout=setTimeout((()=>func.apply(this,args)),wait)}}function getTocElement(options){try{return options.tocElement||document.querySelector(options.tocSelector)}catch{return console.warn(`TOC element not found: ${options.tocSelector}`),null}}var tocbot_default={destroy,init,refresh:function refresh(customOptions){destroy(),init(customOptions||_options)}},Aside=theming.I4.aside((()=>({width:"10rem","@media (max-width: 768px)":{display:"none"}}))),Nav=theming.I4.nav((({theme})=>({position:"fixed",bottom:0,top:0,width:"10rem",paddingTop:"4rem",paddingBottom:"2rem",overflowY:"auto",fontFamily:theme.typography.fonts.base,fontSize:theme.typography.size.s2,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitOverflowScrolling:"touch","& *":{boxSizing:"border-box"},"& > .toc-wrapper > .toc-list":{paddingLeft:0,borderLeft:`solid 2px ${theme.color.mediumlight}`,".toc-list":{paddingLeft:0,borderLeft:`solid 2px ${theme.color.mediumlight}`,".toc-list":{paddingLeft:0,borderLeft:`solid 2px ${theme.color.mediumlight}`}}},"& .toc-list-item":{position:"relative",listStyleType:"none",marginLeft:20,paddingTop:3,paddingBottom:3},"& .toc-list-item::before":{content:'""',position:"absolute",height:"100%",top:0,left:0,transform:"translateX(calc(-2px - 20px))",borderLeft:`solid 2px ${theme.color.mediumdark}`,opacity:0,transition:"opacity 0.2s"},"& .toc-list-item.is-active-li::before":{opacity:1},"& .toc-list-item > a":{color:theme.color.defaultText,textDecoration:"none"},"& .toc-list-item.is-active-li > a":{fontWeight:600,color:theme.color.secondary,textDecoration:"none"}}))),Heading=theming.I4.p((({theme})=>({fontWeight:600,fontSize:"0.875em",color:theme.textColor,textTransform:"uppercase",marginBottom:10}))),Title2=({headingId,title})=>"string"!=typeof title&&title?react.createElement("div",{id:headingId},title):react.createElement(Heading,{as:"h2",id:headingId,className:title?"":"sb-sr-only"},title||"Table of contents"),TableOfContents=({title,disable,headingSelector,contentsSelector,ignoreSelector,unsafeTocbotOptions,channel,className})=>{(0,react.useEffect)((()=>{if(disable)return()=>{};let configuration={tocSelector:".toc-wrapper",contentSelector:contentsSelector??".sbdocs-content",headingSelector:headingSelector??"h3",ignoreSelector:ignoreSelector??".docs-story *, .skip-toc",headingsOffset:40,scrollSmoothOffset:-40,orderedList:!1,onClick:e2=>{if(e2.preventDefault(),e2.currentTarget instanceof HTMLAnchorElement){let[,headerId]=e2.currentTarget.href.split("#");headerId&&channel.emit(external_STORYBOOK_MODULE_CORE_EVENTS_.NAVIGATE_URL,`#${headerId}`)}},...unsafeTocbotOptions},timeout=setTimeout((()=>tocbot_default.init(configuration)),100);return()=>{clearTimeout(timeout),tocbot_default.destroy()}}),[channel,disable,ignoreSelector,contentsSelector,headingSelector,unsafeTocbotOptions]);let headingId=(0,react.useId)();return react.createElement(Aside,{className},disable?null:react.createElement(Nav,{"aria-labelledby":headingId},react.createElement(Title2,{headingId,title}),react.createElement("div",{className:"toc-wrapper"})))};function t(){return t=Object.assign?Object.assign.bind():function(e2){for(var t2=1;t2(e2[t2.toLowerCase()]=t2,e2)),{class:"className",for:"htmlFor"}),o={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},a=["style","script"],c=["src","href","data","formAction","srcDoc","action"],s=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,d=/mailto:/i,u=/\n{2,}$/,p=/^(\s*>[\s\S]*?)(?=\n\n|$)/,f=/^ *> ?/gm,h=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,m=/^ {2,}\n/,g=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,y=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,k=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,x=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,b=/^(?:\n *)*\n/,v=/\r\n?/g,C=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,$=/^\[\^([^\]]+)]/,S=/\f/g,w=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,E=/^\s*?\[(x|\s)\]/,z=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,L=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,A=/^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/,O=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,T=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,B=/^)/,M=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,R=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,I=/^\{.*\}$/,D=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,U=/^<([^ >]+@[^ >]+)>/,N=/^<([^ >]+:\/[^ >]+)>/,j=/-([a-z])?/gi,H=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,P=/^\[([^\]]*)\]:\s+]+)>?\s*("([^"]*)")?/,_=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,F=/^\[([^\]]*)\] ?\[([^\]]*)\]/,W=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,G=/\t/g,Z=/(^ *\||\| *$)/g,q=/^ *:-+: *$/,Q=/^ *:-+ *$/,V=/^ *-+: *$/,X="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)",J=new RegExp(`^([*_])\\1${X}\\1\\1(?!\\1)`),K=new RegExp(`^([*_])${X}\\1(?!\\1)`),Y=new RegExp(`^(==)${X}\\1`),ee=new RegExp(`^(~~)${X}\\1`),te=/^\\([^0-9A-Za-z\s])/,ne=/\\([^0-9A-Za-z\s])/g,re=/^([\s\S](?:(?! |[0-9]\.)[^=*_~\-\n<`\\\[!])*)/,ie=/^\n+/,le=/^([ \t]*)/,oe=/\\([^\\])/g,ae=/(?:^|\n)( *)$/,ce="(?:\\d+\\.)",se="(?:[*+-])";function de(e2){return"( *)("+(1===e2?ce:se)+") +"}var ue=de(1),pe=de(2);function fe(e2){return new RegExp("^"+(1===e2?ue:pe))}var he=fe(1),me=fe(2);function ge(e2){return new RegExp("^"+(1===e2?ue:pe)+"[^\\n]*(?:\\n(?!\\1"+(1===e2?ce:se)+" )[^\\n]*)*(\\n|$)","gm")}var ye=ge(1),ke=ge(2);function xe(e2){let t2=1===e2?ce:se;return new RegExp("^( *)("+t2+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t2+" (?!"+t2+" ))\\n*|\\s*\\n*$)")}var be=xe(1),ve=xe(2);function Ce(e2,t2){let n2=1===t2,i2=n2?be:ve,l2=n2?ye:ke,o2=n2?he:me;return{match:Me((function(e3,t3){let n3=ae.exec(t3.prevCapture);return n3&&(t3.list||!t3.inline&&!t3.simple)?i2.exec(e3=n3[1]+e3):null})),order:1,parse(e3,t3,r2){let i3=n2?+e3[2]:void 0,a2=e3[0].replace(u,"\n").match(l2),c2=!1;return{items:a2.map((function(e4,n3){let i4=o2.exec(e4)[0].length,l3=new RegExp("^ {1,"+i4+"}","gm"),s2=e4.replace(l3,"").replace(o2,""),d2=n3===a2.length-1,u2=-1!==s2.indexOf("\n\n")||d2&&c2;c2=u2;let h2,p2=r2.inline,f2=r2.list;r2.list=!0,u2?(r2.inline=!1,h2=ze(s2)+"\n\n"):(r2.inline=!0,h2=ze(s2));let m2=t3(h2,r2);return r2.inline=p2,r2.list=f2,m2})),ordered:n2,start:i3}},render:(t3,n3,i3)=>e2(t3.ordered?"ol":"ul",{key:i3.key,start:t3.type===r_orderedList?t3.start:void 0},t3.items.map((function(t4,r2){return e2("li",{key:r2},n3(t4,i3))})))}}var $e=new RegExp("^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*?(?:\\s+['\"]([\\s\\S]*?)['\"])?\\s*\\)"),Se=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,we=[p,y,k,z,A,L,H,be,ve],Ee=[...we,/^[^\n]+(?: \n|\n{2,})/,O,B,R];function ze(e2){let t2=e2.length;for(;t2>0&&e2[t2-1]<=" ";)t2--;return e2.slice(0,t2)}function Le(e2){return e2.replace(/[ÀÁÂÃÄÅàáâãä忯]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function Ae(e2){return V.test(e2)?"right":q.test(e2)?"center":Q.test(e2)?"left":null}function Oe(e2,t2,n2,r2){let i2=n2.inTable;n2.inTable=!0;let l2=[[]],o2="";function a2(){if(!o2)return;let e3=l2[l2.length-1];e3.push.apply(e3,t2(o2,n2)),o2=""}return e2.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach(((e3,t3,n3)=>{"|"===e3.trim()&&(a2(),r2)?0!==t3&&t3!==n3.length-1&&l2.push([]):o2+=e3})),a2(),n2.inTable=i2,l2}function Te(e2,t2,n2){n2.inline=!0;let i2=e2[2]?e2[2].replace(Z,"").split("|").map(Ae):[],l2=e2[3]?function(e3,t3,n3){return e3.trim().split("\n").map((function(e4){return Oe(e4,t3,n3,!0)}))}(e2[3],t2,n2):[],o2=Oe(e2[1],t2,n2,!!l2.length);return n2.inline=!1,l2.length?{align:i2,cells:l2,header:o2,type:r_table}:{children:o2,type:r_paragraph}}function Be(e2,t2){return null==e2.align[t2]?{}:{textAlign:e2.align[t2]}}function Me(e2){return e2.inline=1,e2}function Re(e2){return Me((function(t2,n2){return n2.inline?e2.exec(t2):null}))}function Ie(e2){return Me((function(t2,n2){return n2.inline||n2.simple?e2.exec(t2):null}))}function De(e2){return function(t2,n2){return n2.inline||n2.simple?null:e2.exec(t2)}}function Ue(e2){return Me((function(t2){return e2.exec(t2)}))}function Ne(e2,t2){if(t2.inline||t2.simple)return null;let n2="";e2.split("\n").every((e3=>(e3+="\n",!we.some((t3=>t3.test(e3)))&&(n2+=e3,!!e3.trim()))));let r2=ze(n2);return""==r2?null:[n2,,r2]}var je=/(javascript|vbscript|data(?!:image)):/i;function He(e2){try{let t2=decodeURIComponent(e2).replace(/[^A-Za-z0-9/:]/g,"");if(je.test(t2))return null}catch{return null}return e2}function Pe(e2){return e2.replace(oe,"$1")}function _e(e2,t2,n2){let r2=n2.inline||!1,i2=n2.simple||!1;n2.inline=!0,n2.simple=!0;let l2=e2(t2,n2);return n2.inline=r2,n2.simple=i2,l2}function Fe(e2,t2,n2){let r2=n2.inline||!1,i2=n2.simple||!1;n2.inline=!1,n2.simple=!0;let l2=e2(t2,n2);return n2.inline=r2,n2.simple=i2,l2}function We(e2,t2,n2){let r2=n2.inline||!1;n2.inline=!1;let i2=e2(t2,n2);return n2.inline=r2,i2}var Ge=(e2,t2,n2)=>({children:_e(t2,e2[2],n2)});function Ze(){return{}}function qe(){return null}function Qe(...e2){return e2.filter(Boolean).join(" ")}function Ve(e2,t2,n2){let r2=e2,i2=t2.split(".");for(;i2.length&&(r2=r2[i2[0]],void 0!==r2);)i2.shift();return r2||n2}var index_modern_default=t2=>{let{children:r2="",options:i2}=t2,l2=function(e2,t3){if(null==e2)return{};var n2,r3,i3={},l3=Object.keys(e2);for(r3=0;r3=0||(i3[n2]=e2[n2]);return i3}(t2,n);return react.cloneElement(function Xe(n2="",i2={}){function u2(e2,n3,...r2){let l2=Ve(i2.overrides,`${e2}.props`,{});return i2.createElement(function(e3,t2){let n4=Ve(t2,e3);return n4?"function"==typeof n4||"object"==typeof n4&&"render"in n4?n4:Ve(t2,`${e3}.component`,e3):e3}(e2,i2.overrides),t({},n3,l2,{className:Qe(n3?.className,l2.className)||void 0}),...r2)}function Z2(e2){e2=e2.replace(w,"");let t2=!1;i2.forceInline?t2=!0:i2.forceBlock||(t2=!1===W.test(e2));let n3=ae2(oe2(t2?e2:`${ze(e2).replace(ie,"")}\n\n`,{inline:t2}));for(;"string"==typeof n3[n3.length-1]&&!n3[n3.length-1].trim();)n3.pop();if(null===i2.wrapper)return n3;let l2,r2=i2.wrapper||(t2?"span":"div");if(n3.length>1||i2.forceWrapper)l2=n3;else{if(1===n3.length)return l2=n3[0],"string"==typeof l2?u2("span",{key:"outer"},l2):l2;l2=null}return i2.createElement(r2,{key:"outer"},l2)}function q2(e2,t2){let n3=t2.match(s);return n3?n3.reduce((function(t3,n4){let r2=n4.indexOf("=");if(-1!==r2){let o2=(e3=n4.slice(0,r2),-1!==e3.indexOf("-")&&null===e3.match(M)&&(e3=e3.replace(j,(function(e4,t4){return t4.toUpperCase()}))),e3).trim(),a2=function(e3){let t4=e3[0];return('"'===t4||"'"===t4)&&e3.length>=2&&e3[e3.length-1]===t4?e3.slice(1,-1):e3}(n4.slice(r2+1).trim()),s2=l[o2]||o2;if("ref"===s2)return t3;let d2=t3[s2]=function(e3,t4,n5,r3){return"style"===t4?function(e4){let t5=[],n6="",r4=!1,i3=!1,l2="";if(!e4)return t5;for(let o4=0;o40){let r5=e5.slice(0,n7).trim(),i4=e5.slice(n7+1).trim();t5.push([r5,i4])}}n6=""}}let o3=n6.trim();if(o3){let e5=o3.indexOf(":");if(e5>0){let n7=o3.slice(0,e5).trim(),r5=o3.slice(e5+1).trim();t5.push([n7,r5])}}return t5}(n5).reduce((function(t5,[n6,i3]){return t5[n6.replace(/(-[a-z])/g,(e4=>e4[1].toUpperCase()))]=r3(i3,e3,n6),t5}),{}):-1!==c.indexOf(t4)?r3(n5,e3,t4):(n5.match(I)&&(n5=n5.slice(1,n5.length-1)),"true"===n5||"false"!==n5&&n5)}(e2,o2,a2,i2.sanitizer);"string"==typeof d2&&(O.test(d2)||R.test(d2))&&(t3[s2]=Z2(d2.trim()))}else"style"!==n4&&(t3[l[n4]||n4]=!0);var e3;return t3}),{}):null}i2.overrides=i2.overrides||{},i2.sanitizer=i2.sanitizer||He,i2.slugify=i2.slugify||Le,i2.namedCodesToUnicode=i2.namedCodesToUnicode?t({},o,i2.namedCodesToUnicode):o,i2.createElement=i2.createElement||react.createElement;let Q2=[],V2={},X2={[r_blockQuote]:{match:De(p),order:1,parse(e2,t2,n3){let[,r2,i3]=e2[0].replace(f,"").match(h);return{alert:r2,children:t2(i3,n3)}},render(e2,t2,n3){let l2={key:n3.key};return e2.alert&&(l2.className="markdown-alert-"+i2.slugify(e2.alert.toLowerCase(),Le),e2.children.unshift({attrs:{},children:[{type:r_text,text:e2.alert}],noInnerParse:!0,type:r_htmlBlock,tag:"header"})),u2("blockquote",l2,t2(e2.children,n3))}},[r_breakLine]:{match:Ue(m),order:1,parse:Ze,render:(e2,t2,n3)=>u2("br",{key:n3.key})},[r_breakThematic]:{match:De(g),order:1,parse:Ze,render:(e2,t2,n3)=>u2("hr",{key:n3.key})},[r_codeBlock]:{match:De(k),order:0,parse:e2=>({lang:void 0,text:ze(e2[0].replace(/^ {4}/gm,"")).replace(ne,"$1")}),render:(e2,n3,r2)=>u2("pre",{key:r2.key},u2("code",t({},e2.attrs,{className:e2.lang?`lang-${e2.lang}`:""}),e2.text))},[r_codeFenced]:{match:De(y),order:0,parse:e2=>({attrs:q2("code",e2[3]||""),lang:e2[2]||void 0,text:e2[4],type:r_codeBlock})},[r_codeInline]:{match:Ie(x),order:3,parse:e2=>({text:e2[2].replace(ne,"$1")}),render:(e2,t2,n3)=>u2("code",{key:n3.key},e2.text)},[r_footnote]:{match:De(C),order:0,parse:e2=>(Q2.push({footnote:e2[2],identifier:e2[1]}),{}),render:qe},[r_footnoteReference]:{match:Re($),order:1,parse:e2=>({target:`#${i2.slugify(e2[1],Le)}`,text:e2[1]}),render:(e2,t2,n3)=>u2("a",{key:n3.key,href:i2.sanitizer(e2.target,"a","href")},u2("sup",{key:n3.key},e2.text))},[r_gfmTask]:{match:Re(E),order:1,parse:e2=>({completed:"x"===e2[1].toLowerCase()}),render:(e2,t2,n3)=>u2("input",{checked:e2.completed,key:n3.key,readOnly:!0,type:"checkbox"})},[r_heading]:{match:De(i2.enforceAtxHeadings?L:z),order:1,parse:(e2,t2,n3)=>({children:_e(t2,e2[2],n3),id:i2.slugify(e2[2],Le),level:e2[1].length}),render:(e2,t2,n3)=>u2(`h${e2.level}`,{id:e2.id,key:n3.key},t2(e2.children,n3))},[r_headingSetext]:{match:De(A),order:0,parse:(e2,t2,n3)=>({children:_e(t2,e2[1],n3),level:"="===e2[2]?1:2,type:r_heading})},[r_htmlBlock]:{match:Ue(O),order:1,parse(e2,t2,n3){let[,r2]=e2[3].match(le),i3=new RegExp(`^${r2}`,"gm"),l2=e2[3].replace(i3,""),o2=(c2=l2,Ee.some((e3=>e3.test(c2)))?We:_e);var c2;let s2=e2[1].toLowerCase(),d2=-1!==a.indexOf(s2),u3=(d2?s2:e2[1]).trim(),p2={attrs:q2(u3,e2[2]),noInnerParse:d2,tag:u3};return n3.inAnchor=n3.inAnchor||"a"===s2,d2?p2.text=e2[3]:p2.children=o2(t2,l2,n3),n3.inAnchor=!1,p2},render:(e2,n3,r2)=>u2(e2.tag,t({key:r2.key},e2.attrs),e2.text||(e2.children?n3(e2.children,r2):""))},[r_htmlSelfClosing]:{match:Ue(R),order:1,parse(e2){let t2=e2[1].trim();return{attrs:q2(t2,e2[2]||""),tag:t2}},render:(e2,n3,r2)=>u2(e2.tag,t({},e2.attrs,{key:r2.key}))},[r_htmlComment]:{match:Ue(B),order:1,parse:()=>({}),render:qe},[r_image]:{match:Ie(Se),order:1,parse:e2=>({alt:e2[1],target:Pe(e2[2]),title:e2[3]}),render:(e2,t2,n3)=>u2("img",{key:n3.key,alt:e2.alt||void 0,title:e2.title||void 0,src:i2.sanitizer(e2.target,"img","src")})},[r_link]:{match:Re($e),order:3,parse:(e2,t2,n3)=>({children:Fe(t2,e2[1],n3),target:Pe(e2[2]),title:e2[3]}),render:(e2,t2,n3)=>u2("a",{key:n3.key,href:i2.sanitizer(e2.target,"a","href"),title:e2.title},t2(e2.children,n3))},[r_linkAngleBraceStyleDetector]:{match:Re(N),order:0,parse:e2=>({children:[{text:e2[1],type:r_text}],target:e2[1],type:r_link})},[r_linkBareUrlDetector]:{match:Me(((e2,t2)=>t2.inAnchor||i2.disableAutoLink?null:Re(D)(e2,t2))),order:0,parse:e2=>({children:[{text:e2[1],type:r_text}],target:e2[1],title:void 0,type:r_link})},[r_linkMailtoDetector]:{match:Re(U),order:0,parse(e2){let t2=e2[1],n3=e2[1];return d.test(n3)||(n3="mailto:"+n3),{children:[{text:t2.replace("mailto:",""),type:r_text}],target:n3,type:r_link}}},[r_orderedList]:Ce(u2,1),[r_unorderedList]:Ce(u2,2),[r_newlineCoalescer]:{match:De(b),order:3,parse:Ze,render:()=>"\n"},[r_paragraph]:{match:Me(Ne),order:3,parse:Ge,render:(e2,t2,n3)=>u2("p",{key:n3.key},t2(e2.children,n3))},[r_ref]:{match:Re(P),order:0,parse:e2=>(V2[e2[1]]={target:e2[2],title:e2[4]},{}),render:qe},[r_refImage]:{match:Ie(_),order:0,parse:e2=>({alt:e2[1]||void 0,ref:e2[2]}),render:(e2,t2,n3)=>V2[e2.ref]?u2("img",{key:n3.key,alt:e2.alt,src:i2.sanitizer(V2[e2.ref].target,"img","src"),title:V2[e2.ref].title}):null},[r_refLink]:{match:Re(F),order:0,parse:(e2,t2,n3)=>({children:t2(e2[1],n3),fallbackChildren:e2[0],ref:e2[2]}),render:(e2,t2,n3)=>V2[e2.ref]?u2("a",{key:n3.key,href:i2.sanitizer(V2[e2.ref].target,"a","href"),title:V2[e2.ref].title},t2(e2.children,n3)):u2("span",{key:n3.key},e2.fallbackChildren)},[r_table]:{match:De(H),order:1,parse:Te,render(e2,t2,n3){let r2=e2;return u2("table",{key:n3.key},u2("thead",null,u2("tr",null,r2.header.map((function(e3,i3){return u2("th",{key:i3,style:Be(r2,i3)},t2(e3,n3))})))),u2("tbody",null,r2.cells.map((function(e3,i3){return u2("tr",{key:i3},e3.map((function(e4,i4){return u2("td",{key:i4,style:Be(r2,i4)},t2(e4,n3))})))}))))}},[r_text]:{match:Ue(re),order:4,parse:e2=>({text:e2[0].replace(T,((e3,t2)=>i2.namedCodesToUnicode[t2]?i2.namedCodesToUnicode[t2]:e3))}),render:e2=>e2.text},[r_textBolded]:{match:Ie(J),order:2,parse:(e2,t2,n3)=>({children:t2(e2[2],n3)}),render:(e2,t2,n3)=>u2("strong",{key:n3.key},t2(e2.children,n3))},[r_textEmphasized]:{match:Ie(K),order:3,parse:(e2,t2,n3)=>({children:t2(e2[2],n3)}),render:(e2,t2,n3)=>u2("em",{key:n3.key},t2(e2.children,n3))},[r_textEscaped]:{match:Ie(te),order:1,parse:e2=>({text:e2[1],type:r_text})},[r_textMarked]:{match:Ie(Y),order:3,parse:Ge,render:(e2,t2,n3)=>u2("mark",{key:n3.key},t2(e2.children,n3))},[r_textStrikethroughed]:{match:Ie(ee),order:3,parse:Ge,render:(e2,t2,n3)=>u2("del",{key:n3.key},t2(e2.children,n3))}};!0===i2.disableParsingRawHTML&&(delete X2[r_htmlBlock],delete X2[r_htmlSelfClosing]);let oe2=function(e2){let t2=Object.keys(e2);function n3(r2,i3){let l2,o2,a2=[],c2="",s2="";for(i3.prevCapture=i3.prevCapture||"";r2;){let d2=0;for(;d2l2(n3,r2,i3)),n3,r2,i3):l2(n3,r2,i3)}}(X2,i2.renderRule),function e2(t2,n3={}){if(Array.isArray(t2)){let r2=n3.key,i3=[],l2=!1;for(let r3=0;r3({lineHeight:"18px",alignItems:"center",marginBottom:8,display:"inline-block",position:"relative",whiteSpace:"nowrap",background:theme.boolean.background,borderRadius:"3em",padding:1,'&[aria-disabled="true"]':{opacity:.5,input:{cursor:"not-allowed"}},input:{appearance:"none",width:"100%",height:"100%",position:"absolute",left:0,top:0,margin:0,padding:0,border:"none",background:"transparent",cursor:"pointer",borderRadius:"3em","&:focus":{outline:"none",boxShadow:`${theme.color.secondary} 0 0 0 1px inset !important`},"@media (forced-colors: active)":{"&:focus":{outline:"1px solid highlight"}}},span:{textAlign:"center",fontSize:theme.typography.size.s1,fontWeight:theme.typography.weight.bold,lineHeight:"1",cursor:"pointer",display:"inline-block",padding:"7px 15px",transition:"all 100ms ease-out",userSelect:"none",borderRadius:"3em",color:curriedTransparentize$1(.5,theme.color.defaultText),background:"transparent","&:hover":{boxShadow:`${curriedOpacify$1(.3,theme.appBorderColor)} 0 0 0 1px inset`},"&:active":{boxShadow:`${curriedOpacify$1(.05,theme.appBorderColor)} 0 0 0 2px inset`,color:curriedOpacify$1(1,theme.appBorderColor)},"&:first-of-type":{paddingRight:8},"&:last-of-type":{paddingLeft:8}},"input:checked ~ span:last-of-type, input:not(:checked) ~ span:first-of-type":{background:theme.boolean.selectedBackground,boxShadow:"light"===theme.base?`${curriedOpacify$1(.1,theme.appBorderColor)} 0 0 2px`:`${theme.appBorderColor} 0 0 0 1px`,color:theme.color.defaultText,padding:"7px 15px","@media (forced-colors: active)":{textDecoration:"underline"}}}))),FormInput=(0,theming.I4)(components.lV.Input)((({readOnly})=>({opacity:readOnly?.5:1}))),FlexSpaced=theming.I4.div((({theme})=>({flex:1,display:"flex",input:{marginLeft:10,flex:1,height:32,"&::-webkit-calendar-picker-indicator":{opacity:.5,height:12,filter:"light"===theme.base?void 0:"invert(1)"}},"input:first-of-type":{marginLeft:0,flexGrow:4},"input:last-of-type":{flexGrow:3}}))),Wrapper4=theming.I4.label({display:"flex"}),FormInput2=(0,theming.I4)(components.lV.Input)((({readOnly})=>({opacity:readOnly?.5:1}))),selectedKey=(value2,options)=>{let entry=options&&Object.entries(options).find((([_key,val])=>val===value2));return entry?entry[0]:void 0},selectedKeys=(value2,options)=>value2&&options?Object.entries(options).filter((entry=>value2.includes(entry[1]))).map((entry=>entry[0])):[],selectedValues=(keys,options)=>keys&&options&&keys.map((key=>options[key])),Wrapper5=theming.I4.div((({isInline})=>isInline?{display:"flex",flexWrap:"wrap",alignItems:"flex-start",label:{display:"inline-flex",marginRight:15}}:{label:{display:"flex"}}),(props=>{if("true"===props["aria-readonly"])return{input:{cursor:"not-allowed"}}})),Text=theming.I4.span({"[aria-readonly=true] &":{opacity:.5}}),Label3=theming.I4.label({lineHeight:"20px",alignItems:"center",marginBottom:8,"&:last-child":{marginBottom:0},input:{margin:0,marginRight:6}}),CheckboxControl=({name,options,value:value2,onChange,isInline,argType})=>{if(!options)return external_STORYBOOK_MODULE_CLIENT_LOGGER_.logger.warn(`Checkbox with no options: ${name}`),react.createElement(react.Fragment,null,"-");let initial=selectedKeys(value2||[],options),[selected,setSelected]=(0,react.useState)(initial),readonly=!!argType?.table?.readonly,handleChange=e2=>{let option=e2.target.value,updated=[...selected];updated.includes(option)?updated.splice(updated.indexOf(option),1):updated.push(option),onChange(selectedValues(updated,options)),setSelected(updated)};(0,react.useEffect)((()=>{setSelected(selectedKeys(value2||[],options))}),[value2]);let controlId=(0,chunk_SPFYY5GD.ZA)(name);return react.createElement(Wrapper5,{"aria-readonly":readonly,isInline},Object.keys(options).map(((key,index)=>{let id=`${controlId}-${index}`;return react.createElement(Label3,{key:id,htmlFor:id},react.createElement("input",{type:"checkbox",disabled:readonly,id,name:id,value:key,onChange:handleChange,checked:selected?.includes(key)}),react.createElement(Text,null,key))})))},Wrapper6=theming.I4.div((({isInline})=>isInline?{display:"flex",flexWrap:"wrap",alignItems:"flex-start",label:{display:"inline-flex",marginRight:15}}:{label:{display:"flex"}}),(props=>{if("true"===props["aria-readonly"])return{input:{cursor:"not-allowed"}}})),Text2=theming.I4.span({"[aria-readonly=true] &":{opacity:.5}}),Label4=theming.I4.label({lineHeight:"20px",alignItems:"center",marginBottom:8,"&:last-child":{marginBottom:0},input:{margin:0,marginRight:6}}),RadioControl=({name,options,value:value2,onChange,isInline,argType})=>{if(!options)return external_STORYBOOK_MODULE_CLIENT_LOGGER_.logger.warn(`Radio with no options: ${name}`),react.createElement(react.Fragment,null,"-");let selection=selectedKey(value2,options),controlId=(0,chunk_SPFYY5GD.ZA)(name),readonly=!!argType?.table?.readonly;return react.createElement(Wrapper6,{"aria-readonly":readonly,isInline},Object.keys(options).map(((key,index)=>{let id=`${controlId}-${index}`;return react.createElement(Label4,{key:id,htmlFor:id},react.createElement("input",{type:"radio",id,name:controlId,disabled:readonly,value:key,onChange:e2=>onChange(options[e2.currentTarget.value]),checked:key===selection}),react.createElement(Text2,null,key))})))},OptionsSelect=theming.I4.select({appearance:"none",border:"0 none",boxSizing:"inherit",display:" block",margin:" 0",background:"transparent",padding:0,fontSize:"inherit",position:"relative"},(({theme})=>({boxSizing:"border-box",position:"relative",padding:"6px 10px",width:"100%",color:theme.input.color||"inherit",background:theme.input.background,borderRadius:theme.input.borderRadius,boxShadow:`${theme.input.border} 0 0 0 1px inset`,fontSize:theme.typography.size.s2-1,lineHeight:"20px","&:focus":{boxShadow:`${theme.color.secondary} 0 0 0 1px inset`,outline:"none"},"&[disabled]":{cursor:"not-allowed",opacity:.5},"::placeholder":{color:theme.textMutedColor},"&[multiple]":{overflow:"auto",padding:0,option:{display:"block",padding:"6px 10px",marginLeft:1,marginRight:1}}}))),SelectWrapper=theming.I4.span((({theme})=>({display:"inline-block",lineHeight:"normal",overflow:"hidden",position:"relative",verticalAlign:"top",width:"100%",svg:{position:"absolute",zIndex:1,pointerEvents:"none",height:"12px",marginTop:"-6px",right:"12px",top:"50%",fill:theme.textMutedColor,path:{fill:theme.textMutedColor}}}))),SingleSelect=({name,value:value2,options,onChange,argType})=>{let selection=selectedKey(value2,options)||"Choose option...",controlId=(0,chunk_SPFYY5GD.ZA)(name),readonly=!!argType?.table?.readonly;return react.createElement(SelectWrapper,null,react.createElement(dist.abt,null),react.createElement(OptionsSelect,{disabled:readonly,id:controlId,value:selection,onChange:e2=>{onChange(options[e2.currentTarget.value])}},react.createElement("option",{key:"no-selection",disabled:!0},"Choose option..."),Object.keys(options).map((key=>react.createElement("option",{key,value:key},key)))))},MultiSelect=({name,value:value2,options,onChange,argType})=>{let selection=selectedKeys(value2,options),controlId=(0,chunk_SPFYY5GD.ZA)(name),readonly=!!argType?.table?.readonly;return react.createElement(SelectWrapper,null,react.createElement(OptionsSelect,{disabled:readonly,id:controlId,multiple:!0,value:selection,onChange:e2=>{let selection2=Array.from(e2.currentTarget.options).filter((option=>option.selected)).map((option=>option.value));onChange(selectedValues(selection2,options))}},Object.keys(options).map((key=>react.createElement("option",{key,value:key},key)))))},SelectControl=props=>{let{name,options}=props;return options?props.isMulti?react.createElement(MultiSelect,{...props}):react.createElement(SingleSelect,{...props}):(external_STORYBOOK_MODULE_CLIENT_LOGGER_.logger.warn(`Select with no options: ${name}`),react.createElement(react.Fragment,null,"-"))},normalizeOptions=(options,labels)=>Array.isArray(options)?options.reduce(((acc,item)=>(acc[labels?.[item]||String(item)]=item,acc)),{}):options,Controls={check:CheckboxControl,"inline-check":CheckboxControl,radio:RadioControl,"inline-radio":RadioControl,select:SelectControl,"multi-select":SelectControl},OptionsControl=props=>{let{type="select",labels,argType}=props,normalized={...props,argType,options:argType?normalizeOptions(argType.options,labels):{},isInline:type.includes("inline"),isMulti:type.includes("multi")},Control=Controls[type];if(Control)return react.createElement(Control,{...normalized});throw new Error(`Unknown options type: ${type}`)},Container=theming.I4.div((({theme})=>({position:"relative",":hover":{"& > .rejt-accordion-button::after":{background:theme.color.secondary},"& > .rejt-accordion-region > :is(.rejt-plus-menu, .rejt-minus-menu)":{opacity:1}}}))),Trigger=theming.I4.button((({theme})=>({padding:0,background:"transparent",border:"none",marginRight:"3px",lineHeight:"22px",color:theme.color.secondary,"::after":{content:'""',position:"absolute",top:0,display:"block",width:"100%",marginLeft:"-1rem",height:"22px",background:"transparent",borderRadius:4,transition:"background 0.2s",opacity:.1,paddingRight:"20px"},"::before":{content:'""',position:"absolute"},'&[aria-expanded="true"]::before':{left:-10,top:10,borderTop:"3px solid rgba(153,153,153,0.6)",borderLeft:"3px solid transparent",borderRight:"3px solid transparent"},'&[aria-expanded="false"]::before':{left:-8,top:8,borderTop:"3px solid transparent",borderBottom:"3px solid transparent",borderLeft:"3px solid rgba(153,153,153,0.6)"}}))),Region=theming.I4.div({display:"inline"});function JsonNodeAccordion({children,name,collapsed,keyPath,deep,...props}){let accordionKey=`${keyPath.at(-1)??"root"}-${name}-${deep}`,ids={trigger:`${accordionKey}-trigger`,region:`${accordionKey}-region`},containerTag=keyPath.length>0?"li":"div";return react.createElement(Container,{as:containerTag},react.createElement(Trigger,{type:"button","aria-expanded":!collapsed,id:ids.trigger,"aria-controls":ids.region,className:"rejt-accordion-button",...props},name," :"),react.createElement(Region,{role:"region",id:ids.region,"aria-labelledby":ids.trigger,className:"rejt-accordion-region"},children))}function getObjectType(obj){return null===obj||"object"!=typeof obj||Array.isArray(obj)||"function"!=typeof obj[Symbol.iterator]?Object.prototype.toString.call(obj).slice(8,-1):"Iterable"}function isComponentWillChange(oldValue,newValue){let oldType=getObjectType(oldValue),newType=getObjectType(newValue);return("Function"===oldType||"Function"===newType)&&newType!==oldType}var JsonAddValue=class extends react.Component{constructor(props){super(props),this.state={inputRefKey:null,inputRefValue:null},this.refInputValue=this.refInputValue.bind(this),this.refInputKey=this.refInputKey.bind(this),this.onKeydown=this.onKeydown.bind(this),this.onSubmit=this.onSubmit.bind(this)}componentDidMount(){let{inputRefKey,inputRefValue}=this.state,{onlyValue}=this.props;inputRefKey&&"function"==typeof inputRefKey.focus&&inputRefKey.focus(),onlyValue&&inputRefValue&&"function"==typeof inputRefValue.focus&&inputRefValue.focus()}onKeydown(event){if(event.altKey||event.ctrlKey||event.metaKey||event.shiftKey||event.repeat)return;let{inputRefKey,inputRefValue}=this.state,{addButtonElement,handleCancel}=this.props;[inputRefKey,inputRefValue,addButtonElement].some((elm=>elm===event.target))&&(("Enter"===event.code||"Enter"===event.key)&&(event.preventDefault(),this.onSubmit()),("Escape"===event.code||"Escape"===event.key)&&(event.preventDefault(),handleCancel()))}onSubmit(){let{handleAdd,onlyValue,onSubmitValueParser,keyPath,deep}=this.props,{inputRefKey,inputRefValue}=this.state,result={};if(!onlyValue){if(!inputRefKey.value)return;result.key=inputRefKey.value}result.newValue=onSubmitValueParser(!1,keyPath,deep,result.key,inputRefValue.value),handleAdd(result)}refInputKey(node){this.state.inputRefKey=node}refInputValue(node){this.state.inputRefValue=node}render(){let{handleCancel,onlyValue,addButtonElement,cancelButtonElement,inputElementGenerator,keyPath,deep}=this.props,addButtonElementLayout=addButtonElement&&(0,react.cloneElement)(addButtonElement,{onClick:this.onSubmit}),cancelButtonElementLayout=cancelButtonElement&&(0,react.cloneElement)(cancelButtonElement,{onClick:handleCancel}),inputElementValue=inputElementGenerator("value",keyPath,deep),inputElementValueLayout=(0,react.cloneElement)(inputElementValue,{placeholder:"Value",ref:this.refInputValue,onKeyDown:this.onKeydown}),inputElementKeyLayout=null;if(!onlyValue){let inputElementKey=inputElementGenerator("key",keyPath,deep);inputElementKeyLayout=(0,react.cloneElement)(inputElementKey,{placeholder:"Key",ref:this.refInputKey,onKeyDown:this.onKeydown})}return react.createElement("span",{className:"rejt-add-value-node"},inputElementKeyLayout,inputElementValueLayout,addButtonElementLayout,cancelButtonElementLayout)}};JsonAddValue.defaultProps={onlyValue:!1,addButtonElement:react.createElement("button",null,"+"),cancelButtonElement:react.createElement("button",null,"c")};var JsonArray=class extends react.Component{constructor(props){super(props);let keyPath=[...props.keyPath||[],props.name];this.state={data:props.data,name:props.name,keyPath:keyPath??[],deep:props.deep??0,nextDeep:(props.deep??0)+1,collapsed:props.isCollapsed(keyPath,props.deep??0,props.data),addFormVisible:!1},this.handleCollapseMode=this.handleCollapseMode.bind(this),this.handleRemoveItem=this.handleRemoveItem.bind(this),this.handleAddMode=this.handleAddMode.bind(this),this.handleAddValueAdd=this.handleAddValueAdd.bind(this),this.handleAddValueCancel=this.handleAddValueCancel.bind(this),this.handleEditValue=this.handleEditValue.bind(this),this.onChildUpdate=this.onChildUpdate.bind(this),this.renderCollapsed=this.renderCollapsed.bind(this),this.renderNotCollapsed=this.renderNotCollapsed.bind(this)}static getDerivedStateFromProps(props,state){return props.data!==state.data?{data:props.data}:null}onChildUpdate(childKey,childData){let{data,keyPath=[]}=this.state;data[childKey]=childData,this.setState({data});let{onUpdate}=this.props;onUpdate(keyPath[keyPath.length-1],data)}handleAddMode(){this.setState({addFormVisible:!0})}handleCollapseMode(){this.setState((state=>({collapsed:!state.collapsed})))}handleRemoveItem(index){return()=>{let{beforeRemoveAction,logger:logger4}=this.props,{data,keyPath,nextDeep:deep}=this.state,oldValue=data[index];(beforeRemoveAction||Promise.resolve.bind(Promise))(index,keyPath,deep,oldValue).then((()=>{let deltaUpdateResult={keyPath,deep,key:index,oldValue,type:"REMOVE_DELTA_TYPE"};data.splice(index,1),this.setState({data});let{onUpdate,onDeltaUpdate}=this.props;onUpdate(keyPath[keyPath.length-1],data),onDeltaUpdate(deltaUpdateResult)})).catch(logger4.error)}}handleAddValueAdd({key,newValue}){let{data,keyPath=[],nextDeep:deep}=this.state,{beforeAddAction,logger:logger4}=this.props;(beforeAddAction||Promise.resolve.bind(Promise))(key,keyPath,deep,newValue).then((()=>{data[key]=newValue,this.setState({data}),this.handleAddValueCancel();let{onUpdate,onDeltaUpdate}=this.props;onUpdate(keyPath[keyPath.length-1],data),onDeltaUpdate({type:"ADD_DELTA_TYPE",keyPath,deep,key,newValue})})).catch(logger4.error)}handleAddValueCancel(){this.setState({addFormVisible:!1})}handleEditValue({key,value:value2}){return new Promise(((resolve,reject)=>{let{beforeUpdateAction}=this.props,{data,keyPath,nextDeep:deep}=this.state,oldValue=data[key];(beforeUpdateAction||Promise.resolve.bind(Promise))(key,keyPath,deep,oldValue,value2).then((()=>{data[key]=value2,this.setState({data});let{onUpdate,onDeltaUpdate}=this.props;onUpdate(keyPath[keyPath.length-1],data),onDeltaUpdate({type:"UPDATE_DELTA_TYPE",keyPath,deep,key,newValue:value2,oldValue}),resolve(void 0)})).catch(reject)}))}renderCollapsed(){let{name,data,keyPath,deep}=this.state,{handleRemove,readOnly,getStyle,dataType,minusMenuElement}=this.props,{minus,collapsed}=getStyle(name,data,keyPath,deep,dataType),isReadOnly=readOnly(name,data,keyPath,deep,dataType),removeItemButton=minusMenuElement&&(0,react.cloneElement)(minusMenuElement,{onClick:handleRemove,className:"rejt-minus-menu",style:minus,"aria-label":`remove the array '${String(name)}'`});return react.createElement(react.Fragment,null,react.createElement("span",{style:collapsed},"[...] ",data.length," ",1===data.length?"item":"items"),!isReadOnly&&removeItemButton)}renderNotCollapsed(){let{name,data,keyPath,deep,addFormVisible,nextDeep}=this.state,{isCollapsed,handleRemove,onDeltaUpdate,readOnly,getStyle,dataType,addButtonElement,cancelButtonElement,inputElementGenerator,textareaElementGenerator,minusMenuElement,plusMenuElement,beforeRemoveAction,beforeAddAction,beforeUpdateAction,logger:logger4,onSubmitValueParser}=this.props,{minus,plus,delimiter,ul,addForm}=getStyle(name,data,keyPath,deep,dataType),isReadOnly=readOnly(name,data,keyPath,deep,dataType),addItemButton=plusMenuElement&&(0,react.cloneElement)(plusMenuElement,{onClick:this.handleAddMode,className:"rejt-plus-menu",style:plus,"aria-label":`add a new item to the '${String(name)}' array`}),removeItemButton=minusMenuElement&&(0,react.cloneElement)(minusMenuElement,{onClick:handleRemove,className:"rejt-minus-menu",style:minus,"aria-label":`remove the array '${String(name)}'`});return react.createElement(react.Fragment,null,react.createElement("span",{className:"rejt-not-collapsed-delimiter",style:delimiter},"["),!addFormVisible&&addItemButton,react.createElement("ul",{className:"rejt-not-collapsed-list",style:ul},data.map(((item,index)=>react.createElement(JsonNode,{key:index,name:index.toString(),data:item,keyPath,deep:nextDeep,isCollapsed,handleRemove:this.handleRemoveItem(index),handleUpdateValue:this.handleEditValue,onUpdate:this.onChildUpdate,onDeltaUpdate,readOnly,getStyle,addButtonElement,cancelButtonElement,inputElementGenerator,textareaElementGenerator,minusMenuElement,plusMenuElement,beforeRemoveAction,beforeAddAction,beforeUpdateAction,logger:logger4,onSubmitValueParser})))),!isReadOnly&&addFormVisible&&react.createElement("div",{className:"rejt-add-form",style:addForm},react.createElement(JsonAddValue,{handleAdd:this.handleAddValueAdd,handleCancel:this.handleAddValueCancel,onlyValue:!0,addButtonElement,cancelButtonElement,inputElementGenerator,keyPath,deep,onSubmitValueParser})),react.createElement("span",{className:"rejt-not-collapsed-delimiter",style:delimiter},"]"),!isReadOnly&&removeItemButton)}render(){let{name,collapsed,keyPath,deep}=this.state,value2=collapsed?this.renderCollapsed():this.renderNotCollapsed();return react.createElement(JsonNodeAccordion,{name,collapsed,deep,keyPath,onClick:this.handleCollapseMode},value2)}};JsonArray.defaultProps={keyPath:[],deep:0,minusMenuElement:react.createElement("span",null," - "),plusMenuElement:react.createElement("span",null," + ")};var JsonFunctionValue=class extends react.Component{constructor(props){super(props);let keyPath=[...props.keyPath||[],props.name];this.state={value:props.value,name:props.name,keyPath:keyPath??[],deep:props.deep??0,editEnabled:!1,inputRef:null},this.handleEditMode=this.handleEditMode.bind(this),this.refInput=this.refInput.bind(this),this.handleCancelEdit=this.handleCancelEdit.bind(this),this.handleEdit=this.handleEdit.bind(this),this.onKeydown=this.onKeydown.bind(this)}static getDerivedStateFromProps(props,state){return props.value!==state.value?{value:props.value}:null}componentDidUpdate(){let{editEnabled,inputRef,name,value:value2,keyPath,deep}=this.state,{readOnly,dataType}=this.props,readOnlyResult=readOnly(name,value2,keyPath,deep,dataType);editEnabled&&!readOnlyResult&&"function"==typeof inputRef.focus&&inputRef.focus()}onKeydown(event){let{inputRef}=this.state;event.altKey||event.ctrlKey||event.metaKey||event.shiftKey||event.repeat||inputRef!==event.target||(("Enter"===event.code||"Enter"===event.key)&&(event.preventDefault(),this.handleEdit()),("Escape"===event.code||"Escape"===event.key)&&(event.preventDefault(),this.handleCancelEdit()))}handleEdit(){let{handleUpdateValue,originalValue,logger:logger4,onSubmitValueParser,keyPath}=this.props,{inputRef,name,deep}=this.state;if(!inputRef)return;let newValue=onSubmitValueParser(!0,keyPath,deep,name,inputRef.value),result={value:newValue,key:name};(handleUpdateValue||Promise.resolve.bind(Promise))(result).then((()=>{isComponentWillChange(originalValue,newValue)||this.handleCancelEdit()})).catch(logger4.error)}handleEditMode(){this.setState({editEnabled:!0})}refInput(node){this.state.inputRef=node}handleCancelEdit(){this.setState({editEnabled:!1})}render(){let{name,value:value2,editEnabled,keyPath,deep}=this.state,{handleRemove,originalValue,readOnly,dataType,getStyle,textareaElementGenerator,minusMenuElement,keyPath:comeFromKeyPath=[]}=this.props,style=getStyle(name,originalValue,keyPath,deep,dataType),result=null,minusElement=null,resultOnlyResult=readOnly(name,originalValue,keyPath,deep,dataType);if(editEnabled&&!resultOnlyResult){let textareaElement=textareaElementGenerator("value",comeFromKeyPath,deep,name,originalValue,dataType),textareaElementLayout=(0,react.cloneElement)(textareaElement,{ref:this.refInput,defaultValue:value2,onKeyDown:this.onKeydown});result=react.createElement("span",{className:"rejt-edit-form",style:style.editForm},textareaElementLayout),minusElement=null}else{result=react.createElement("span",{className:"rejt-value",style:style.value,onClick:resultOnlyResult?void 0:this.handleEditMode},value2);let parentPropertyName=comeFromKeyPath.at(-1),minusMenuLayout=minusMenuElement&&(0,react.cloneElement)(minusMenuElement,{onClick:handleRemove,className:"rejt-minus-menu",style:style.minus,"aria-label":`remove the function '${String(name)}'${String(parentPropertyName)?` from '${String(parentPropertyName)}'`:""}`});minusElement=resultOnlyResult?null:minusMenuLayout}return react.createElement("li",{className:"rejt-value-node",style:style.li},react.createElement("span",{className:"rejt-name",style:style.name},name," :"," "),result,minusElement)}};JsonFunctionValue.defaultProps={keyPath:[],deep:0,handleUpdateValue:()=>{},cancelButtonElement:react.createElement("button",null,"c"),minusMenuElement:react.createElement("span",null," - ")};var JsonNode=class extends react.Component{constructor(props){super(props),this.state={data:props.data,name:props.name,keyPath:props.keyPath??[],deep:props.deep??0}}static getDerivedStateFromProps(props,state){return props.data!==state.data?{data:props.data}:null}render(){let{data,name,keyPath,deep}=this.state,{isCollapsed,handleRemove,handleUpdateValue,onUpdate,onDeltaUpdate,readOnly,getStyle,addButtonElement,cancelButtonElement,inputElementGenerator,textareaElementGenerator,minusMenuElement,plusMenuElement,beforeRemoveAction,beforeAddAction,beforeUpdateAction,logger:logger4,onSubmitValueParser}=this.props,readOnlyTrue=()=>!0,dataType=getObjectType(data);switch(dataType){case"Error":return react.createElement(JsonObject,{data,name,isCollapsed,keyPath,deep,handleRemove,onUpdate,onDeltaUpdate,readOnly:readOnlyTrue,dataType,getStyle,addButtonElement,cancelButtonElement,inputElementGenerator,textareaElementGenerator,minusMenuElement,plusMenuElement,beforeRemoveAction,beforeAddAction,beforeUpdateAction,logger:logger4,onSubmitValueParser});case"Object":return react.createElement(JsonObject,{data,name,isCollapsed,keyPath,deep,handleRemove,onUpdate,onDeltaUpdate,readOnly,dataType,getStyle,addButtonElement,cancelButtonElement,inputElementGenerator,textareaElementGenerator,minusMenuElement,plusMenuElement,beforeRemoveAction,beforeAddAction,beforeUpdateAction,logger:logger4,onSubmitValueParser});case"Array":return react.createElement(JsonArray,{data,name,isCollapsed,keyPath,deep,handleRemove,onUpdate,onDeltaUpdate,readOnly,dataType,getStyle,addButtonElement,cancelButtonElement,inputElementGenerator,textareaElementGenerator,minusMenuElement,plusMenuElement,beforeRemoveAction,beforeAddAction,beforeUpdateAction,logger:logger4,onSubmitValueParser});case"String":return react.createElement(JsonValue,{name,value:`"${data}"`,originalValue:data,keyPath,deep,handleRemove,handleUpdateValue,readOnly,dataType,getStyle,cancelButtonElement,inputElementGenerator,minusMenuElement,logger:logger4,onSubmitValueParser});case"Number":return react.createElement(JsonValue,{name,value:data,originalValue:data,keyPath,deep,handleRemove,handleUpdateValue,readOnly,dataType,getStyle,cancelButtonElement,inputElementGenerator,minusMenuElement,logger:logger4,onSubmitValueParser});case"Boolean":return react.createElement(JsonValue,{name,value:data?"true":"false",originalValue:data,keyPath,deep,handleRemove,handleUpdateValue,readOnly,dataType,getStyle,cancelButtonElement,inputElementGenerator,minusMenuElement,logger:logger4,onSubmitValueParser});case"Date":return react.createElement(JsonValue,{name,value:data.toISOString(),originalValue:data,keyPath,deep,handleRemove,handleUpdateValue,readOnly:readOnlyTrue,dataType,getStyle,cancelButtonElement,inputElementGenerator,minusMenuElement,logger:logger4,onSubmitValueParser});case"Null":return react.createElement(JsonValue,{name,value:"null",originalValue:"null",keyPath,deep,handleRemove,handleUpdateValue,readOnly,dataType,getStyle,cancelButtonElement,inputElementGenerator,minusMenuElement,logger:logger4,onSubmitValueParser});case"Undefined":return react.createElement(JsonValue,{name,value:"undefined",originalValue:"undefined",keyPath,deep,handleRemove,handleUpdateValue,readOnly,dataType,getStyle,cancelButtonElement,inputElementGenerator,minusMenuElement,logger:logger4,onSubmitValueParser});case"Function":return react.createElement(JsonFunctionValue,{name,value:data.toString(),originalValue:data,keyPath,deep,handleRemove,handleUpdateValue,readOnly,dataType,getStyle,cancelButtonElement,textareaElementGenerator,minusMenuElement,logger:logger4,onSubmitValueParser});case"Symbol":return react.createElement(JsonValue,{name,value:data.toString(),originalValue:data,keyPath,deep,handleRemove,handleUpdateValue,readOnly:readOnlyTrue,dataType,getStyle,cancelButtonElement,inputElementGenerator,minusMenuElement,logger:logger4,onSubmitValueParser});default:return null}}};JsonNode.defaultProps={keyPath:[],deep:0};var JsonObject=class extends react.Component{constructor(props){super(props);let keyPath=-1===props.deep?[]:[...props.keyPath||[],props.name];this.state={name:props.name,data:props.data,keyPath:keyPath??[],deep:props.deep??0,nextDeep:(props.deep??0)+1,collapsed:props.isCollapsed(keyPath,props.deep??0,props.data),addFormVisible:!1},this.handleCollapseMode=this.handleCollapseMode.bind(this),this.handleRemoveValue=this.handleRemoveValue.bind(this),this.handleAddMode=this.handleAddMode.bind(this),this.handleAddValueAdd=this.handleAddValueAdd.bind(this),this.handleAddValueCancel=this.handleAddValueCancel.bind(this),this.handleEditValue=this.handleEditValue.bind(this),this.onChildUpdate=this.onChildUpdate.bind(this),this.renderCollapsed=this.renderCollapsed.bind(this),this.renderNotCollapsed=this.renderNotCollapsed.bind(this)}static getDerivedStateFromProps(props,state){return props.data!==state.data?{data:props.data}:null}onChildUpdate(childKey,childData){let{data,keyPath=[]}=this.state;data[childKey]=childData,this.setState({data});let{onUpdate}=this.props;onUpdate(keyPath[keyPath.length-1],data)}handleAddMode(){this.setState({addFormVisible:!0})}handleAddValueCancel(){this.setState({addFormVisible:!1})}handleAddValueAdd({key,newValue}){let{data,keyPath=[],nextDeep:deep}=this.state,{beforeAddAction,logger:logger4}=this.props;(beforeAddAction||Promise.resolve.bind(Promise))(key,keyPath,deep,newValue).then((()=>{data[key]=newValue,this.setState({data}),this.handleAddValueCancel();let{onUpdate,onDeltaUpdate}=this.props;onUpdate(keyPath[keyPath.length-1],data),onDeltaUpdate({type:"ADD_DELTA_TYPE",keyPath,deep,key,newValue})})).catch(logger4.error)}handleRemoveValue(key){return()=>{let{beforeRemoveAction,logger:logger4}=this.props,{data,keyPath=[],nextDeep:deep}=this.state,oldValue=data[key];(beforeRemoveAction||Promise.resolve.bind(Promise))(key,keyPath,deep,oldValue).then((()=>{let deltaUpdateResult={keyPath,deep,key,oldValue,type:"REMOVE_DELTA_TYPE"};delete data[key],this.setState({data});let{onUpdate,onDeltaUpdate}=this.props;onUpdate(keyPath[keyPath.length-1],data),onDeltaUpdate(deltaUpdateResult)})).catch(logger4.error)}}handleCollapseMode(){this.setState((state=>({collapsed:!state.collapsed})))}handleEditValue({key,value:value2}){return new Promise(((resolve,reject)=>{let{beforeUpdateAction}=this.props,{data,keyPath=[],nextDeep:deep}=this.state,oldValue=data[key];(beforeUpdateAction||Promise.resolve.bind(Promise))(key,keyPath,deep,oldValue,value2).then((()=>{data[key]=value2,this.setState({data});let{onUpdate,onDeltaUpdate}=this.props;onUpdate(keyPath[keyPath.length-1],data),onDeltaUpdate({type:"UPDATE_DELTA_TYPE",keyPath,deep,key,newValue:value2,oldValue}),resolve()})).catch(reject)}))}renderCollapsed(){let{name,keyPath,deep,data}=this.state,{handleRemove,readOnly,dataType,getStyle,minusMenuElement}=this.props,{minus,collapsed}=getStyle(name,data,keyPath,deep,dataType),keyList=Object.getOwnPropertyNames(data),isReadOnly=readOnly(name,data,keyPath,deep,dataType),removeItemButton=minusMenuElement&&(0,react.cloneElement)(minusMenuElement,{onClick:handleRemove,className:"rejt-minus-menu",style:minus,"aria-label":`remove the object '${String(name)}'`});return react.createElement(react.Fragment,null,react.createElement("span",{style:collapsed},"{...}"," ",keyList.length," ",1===keyList.length?"key":"keys"),!isReadOnly&&removeItemButton)}renderNotCollapsed(){let{name,data,keyPath,deep,nextDeep,addFormVisible}=this.state,{isCollapsed,handleRemove,onDeltaUpdate,readOnly,getStyle,dataType,addButtonElement,cancelButtonElement,inputElementGenerator,textareaElementGenerator,minusMenuElement,plusMenuElement,beforeRemoveAction,beforeAddAction,beforeUpdateAction,logger:logger4,onSubmitValueParser}=this.props,{minus,plus,addForm,ul,delimiter}=getStyle(name,data,keyPath,deep,dataType),keyList=Object.getOwnPropertyNames(data),isReadOnly=readOnly(name,data,keyPath,deep,dataType),addItemButton=plusMenuElement&&(0,react.cloneElement)(plusMenuElement,{onClick:this.handleAddMode,className:"rejt-plus-menu",style:plus,"aria-label":`add a new property to the object '${String(name)}'`}),removeItemButton=minusMenuElement&&(0,react.cloneElement)(minusMenuElement,{onClick:handleRemove,className:"rejt-minus-menu",style:minus,"aria-label":`remove the object '${String(name)}'`}),list=keyList.map((key=>react.createElement(JsonNode,{key,name:key,data:data[key],keyPath,deep:nextDeep,isCollapsed,handleRemove:this.handleRemoveValue(key),handleUpdateValue:this.handleEditValue,onUpdate:this.onChildUpdate,onDeltaUpdate,readOnly,getStyle,addButtonElement,cancelButtonElement,inputElementGenerator,textareaElementGenerator,minusMenuElement,plusMenuElement,beforeRemoveAction,beforeAddAction,beforeUpdateAction,logger:logger4,onSubmitValueParser})));return react.createElement(react.Fragment,null,react.createElement("span",{className:"rejt-not-collapsed-delimiter",style:delimiter},"{"),!isReadOnly&&addItemButton,react.createElement("ul",{className:"rejt-not-collapsed-list",style:ul},list),!isReadOnly&&addFormVisible&&react.createElement("div",{className:"rejt-add-form",style:addForm},react.createElement(JsonAddValue,{handleAdd:this.handleAddValueAdd,handleCancel:this.handleAddValueCancel,addButtonElement,cancelButtonElement,inputElementGenerator,keyPath,deep,onSubmitValueParser})),react.createElement("span",{className:"rejt-not-collapsed-delimiter",style:delimiter},"}"),!isReadOnly&&removeItemButton)}render(){let{name,collapsed,keyPath,deep=0}=this.state,value2=collapsed?this.renderCollapsed():this.renderNotCollapsed();return react.createElement(JsonNodeAccordion,{name,collapsed,deep,keyPath,onClick:this.handleCollapseMode},value2)}};JsonObject.defaultProps={keyPath:[],deep:0,minusMenuElement:react.createElement("span",null," - "),plusMenuElement:react.createElement("span",null," + ")};var JsonValue=class extends react.Component{constructor(props){super(props);let keyPath=[...props.keyPath||[],props.name];this.state={value:props.value,name:props.name,keyPath:keyPath??[],deep:props.deep??0,editEnabled:!1,inputRef:null},this.handleEditMode=this.handleEditMode.bind(this),this.refInput=this.refInput.bind(this),this.handleCancelEdit=this.handleCancelEdit.bind(this),this.handleEdit=this.handleEdit.bind(this),this.onKeydown=this.onKeydown.bind(this)}static getDerivedStateFromProps(props,state){return props.value!==state.value?{value:props.value}:null}componentDidUpdate(){let{editEnabled,inputRef,name,value:value2,keyPath,deep}=this.state,{readOnly,dataType}=this.props,isReadOnly=readOnly(name,value2,keyPath,deep,dataType);editEnabled&&!isReadOnly&&"function"==typeof inputRef.focus&&inputRef.focus()}onKeydown(event){let{inputRef}=this.state;event.altKey||event.ctrlKey||event.metaKey||event.shiftKey||event.repeat||inputRef!==event.target||(("Enter"===event.code||"Enter"===event.key)&&(event.preventDefault(),this.handleEdit()),("Escape"===event.code||"Escape"===event.key)&&(event.preventDefault(),this.handleCancelEdit()))}handleEdit(){let{handleUpdateValue,originalValue,logger:logger4,onSubmitValueParser,keyPath}=this.props,{inputRef,name,deep}=this.state;if(!inputRef)return;let newValue=onSubmitValueParser(!0,keyPath,deep,name,inputRef.value),result={value:newValue,key:name};(handleUpdateValue||Promise.resolve.bind(Promise))(result).then((()=>{isComponentWillChange(originalValue,newValue)||this.handleCancelEdit()})).catch(logger4.error)}handleEditMode(){this.setState({editEnabled:!0})}refInput(node){this.state.inputRef=node}handleCancelEdit(){this.setState({editEnabled:!1})}render(){let{name,value:value2,editEnabled,keyPath,deep}=this.state,{handleRemove,originalValue,readOnly,dataType,getStyle,inputElementGenerator,minusMenuElement,keyPath:comeFromKeyPath}=this.props,style=getStyle(name,originalValue,keyPath,deep,dataType),isReadOnly=readOnly(name,originalValue,keyPath,deep,dataType),isEditing=editEnabled&&!isReadOnly,inputElement=inputElementGenerator("value",comeFromKeyPath,deep,name,originalValue,dataType),inputElementLayout=(0,react.cloneElement)(inputElement,{ref:this.refInput,defaultValue:JSON.stringify(originalValue),onKeyDown:this.onKeydown}),parentPropertyName=keyPath.at(-2),minusMenuLayout=minusMenuElement&&(0,react.cloneElement)(minusMenuElement,{onClick:handleRemove,className:"rejt-minus-menu",style:style.minus,"aria-label":`remove the property '${String(name)}' with value '${String(originalValue)}'${String(parentPropertyName)?` from '${String(parentPropertyName)}'`:""}`});return react.createElement("li",{className:"rejt-value-node",style:style.li},react.createElement("span",{className:"rejt-name",style:style.name},name," : "),isEditing?react.createElement("span",{className:"rejt-edit-form",style:style.editForm},inputElementLayout):react.createElement("span",{className:"rejt-value",style:style.value,onClick:isReadOnly?void 0:this.handleEditMode},String(value2)),!isReadOnly&&!isEditing&&minusMenuLayout)}};JsonValue.defaultProps={keyPath:[],deep:0,handleUpdateValue:()=>Promise.resolve(),cancelButtonElement:react.createElement("button",null,"c"),minusMenuElement:react.createElement("span",null," - ")};var object={minus:{color:"red"},plus:{color:"green"},collapsed:{color:"grey"},delimiter:{},ul:{padding:"0px",margin:"0 0 0 25px",listStyle:"none"},name:{color:"#2287CD"},addForm:{}},array={minus:{color:"red"},plus:{color:"green"},collapsed:{color:"grey"},delimiter:{},ul:{padding:"0px",margin:"0 0 0 25px",listStyle:"none"},name:{color:"#2287CD"},addForm:{}},value={minus:{color:"red"},editForm:{},value:{color:"#7bba3d"},li:{minHeight:"22px",lineHeight:"22px",outline:"0px"},name:{color:"#2287CD"}},JsonTree=class extends react.Component{constructor(props){super(props),this.state={data:props.data,rootName:props.rootName},this.onUpdate=this.onUpdate.bind(this),this.removeRoot=this.removeRoot.bind(this)}static getDerivedStateFromProps(props,state){return props.data!==state.data||props.rootName!==state.rootName?{data:props.data,rootName:props.rootName}:null}onUpdate(key,data){this.setState({data}),this.props.onFullyUpdate?.(data)}removeRoot(){this.onUpdate(null,null)}render(){let{data,rootName}=this.state,{isCollapsed,onDeltaUpdate,readOnly,getStyle,addButtonElement,cancelButtonElement,inputElement,textareaElement,minusMenuElement,plusMenuElement,beforeRemoveAction,beforeAddAction,beforeUpdateAction,logger:logger4,onSubmitValueParser,fallback=null}=this.props,dataType=getObjectType(data),readOnlyFunction=readOnly;"Boolean"===getObjectType(readOnly)&&(readOnlyFunction=()=>readOnly);let inputElementFunction=inputElement;inputElement&&"Function"!==getObjectType(inputElement)&&(inputElementFunction=()=>inputElement);let textareaElementFunction=textareaElement;return textareaElement&&"Function"!==getObjectType(textareaElement)&&(textareaElementFunction=()=>textareaElement),"Object"===dataType||"Array"===dataType?react.createElement("div",{className:"rejt-tree"},react.createElement(JsonNode,{data,name:rootName||"root",deep:-1,isCollapsed:isCollapsed??(()=>!1),onUpdate:this.onUpdate,onDeltaUpdate:onDeltaUpdate??(()=>{}),readOnly:readOnlyFunction,getStyle:getStyle??(()=>({})),addButtonElement,cancelButtonElement,inputElementGenerator:inputElementFunction,textareaElementGenerator:textareaElementFunction,minusMenuElement,plusMenuElement,handleRemove:this.removeRoot,beforeRemoveAction,beforeAddAction,beforeUpdateAction,logger:logger4??{},onSubmitValueParser:onSubmitValueParser??(val=>val)})):fallback}};JsonTree.defaultProps={rootName:"root",isCollapsed:(keyPath,deep)=>-1!==deep,getStyle:(keyName,data,keyPath,deep,dataType)=>{switch(dataType){case"Object":case"Error":return object;case"Array":return array;default:return value}},readOnly:()=>!1,onFullyUpdate:()=>{},onDeltaUpdate:()=>{},beforeRemoveAction:()=>Promise.resolve(),beforeAddAction:()=>Promise.resolve(),beforeUpdateAction:()=>Promise.resolve(),logger:{error:()=>{}},onSubmitValueParser:(isEditMode,keyPath,deep,name,rawValue)=>function parse3(string){let result=string;if(0===result.indexOf("function"))return(0,eval)(`(${result})`);try{result=JSON.parse(string)}catch{}return result}(rawValue),inputElement:()=>react.createElement("input",null),textareaElement:()=>react.createElement("textarea",null),fallback:null};var{window:globalWindow2}=globalThis,Wrapper7=theming.I4.div((({theme})=>({position:"relative",display:"flex",'&[aria-readonly="true"]':{opacity:.5},".rejt-tree":{marginLeft:"1rem",fontSize:"13px",listStyleType:"none"},".rejt-value-node:hover":{"& > button":{opacity:1}},".rejt-add-form":{marginLeft:10},".rejt-add-value-node":{display:"inline-flex",alignItems:"center"},".rejt-name":{lineHeight:"22px"},".rejt-not-collapsed-delimiter":{lineHeight:"22px"},".rejt-value":{display:"inline-block",border:"1px solid transparent",borderRadius:4,margin:"1px 0",padding:"0 4px",cursor:"text",color:theme.color.defaultText},".rejt-value-node:hover > .rejt-value":{background:theme.color.lighter,borderColor:theme.appBorderColor}}))),ButtonInline=theming.I4.button((({theme,primary})=>({border:0,height:20,margin:1,borderRadius:4,background:primary?theme.color.secondary:"transparent",color:primary?theme.color.lightest:theme.color.dark,fontWeight:primary?"bold":"normal",cursor:"pointer"}))),ActionButton=theming.I4.button((({theme})=>({background:"none",border:0,display:"inline-flex",verticalAlign:"middle",padding:3,marginLeft:5,color:theme.textMutedColor,opacity:0,transition:"opacity 0.2s",cursor:"pointer",position:"relative",svg:{width:9,height:9},":disabled":{cursor:"not-allowed"},":hover, :focus-visible":{opacity:1},"&:hover:not(:disabled), &:focus-visible:not(:disabled)":{"&.rejt-plus-menu":{color:theme.color.ancillary},"&.rejt-minus-menu":{color:theme.color.negative}}}))),Input=theming.I4.input((({theme,placeholder})=>({outline:0,margin:placeholder?1:"1px 0",padding:"3px 4px",color:theme.color.defaultText,background:theme.background.app,border:`1px solid ${theme.appBorderColor}`,borderRadius:4,lineHeight:"14px",width:"Key"===placeholder?80:120,"&:focus":{border:`1px solid ${theme.color.secondary}`}}))),RawButton=(0,theming.I4)(components.K0)((({theme})=>({position:"absolute",zIndex:2,top:2,right:2,height:21,padding:"0 3px",background:theme.background.bar,border:`1px solid ${theme.appBorderColor}`,borderRadius:3,color:theme.textMutedColor,fontSize:"9px",fontWeight:"bold",textDecoration:"none",span:{marginLeft:3,marginTop:1}}))),RawInput=(0,theming.I4)(components.lV.Textarea)((({theme})=>({flex:1,padding:"7px 6px",fontFamily:theme.typography.fonts.mono,fontSize:"12px",lineHeight:"18px","&::placeholder":{fontFamily:theme.typography.fonts.base,fontSize:"13px"},"&:placeholder-shown":{padding:"7px 10px"}}))),ENTER_EVENT={bubbles:!0,cancelable:!0,key:"Enter",code:"Enter",keyCode:13},dispatchEnterKey=event=>{event.currentTarget.dispatchEvent(new globalWindow2.KeyboardEvent("keydown",ENTER_EVENT))},selectValue=event=>{event.currentTarget.select()},getCustomStyleFunction=theme=>()=>({name:{color:theme.color.secondary},collapsed:{color:theme.color.dark},ul:{listStyle:"none",margin:"0 0 0 1rem",padding:0},li:{outline:0}}),ObjectControl=({name,value:value2,onChange,argType})=>{let theme=(0,theming.DP)(),data=(0,react.useMemo)((()=>value2&&(0,chunk_SPFYY5GD.mg)(value2)),[value2]),hasData=null!=data,[showRaw,setShowRaw]=(0,react.useState)(!hasData),[parseError,setParseError]=(0,react.useState)(null),readonly=!!argType?.table?.readonly,updateRaw=(0,react.useCallback)((raw=>{try{raw&&onChange(JSON.parse(raw)),setParseError(null)}catch(e2){setParseError(e2)}}),[onChange]),[forceVisible,setForceVisible]=(0,react.useState)(!1),onForceVisible=(0,react.useCallback)((()=>{onChange({}),setForceVisible(!0)}),[setForceVisible]),htmlElRef=(0,react.useRef)(null);if((0,react.useEffect)((()=>{forceVisible&&htmlElRef.current&&htmlElRef.current.select()}),[forceVisible]),!hasData)return react.createElement(components.$n,{disabled:readonly,id:(0,chunk_SPFYY5GD.Yq)(name),onClick:onForceVisible},"Set object");let rawJSONForm=react.createElement(RawInput,{ref:htmlElRef,id:(0,chunk_SPFYY5GD.ZA)(name),name,defaultValue:null===value2?"":JSON.stringify(value2,null,2),onBlur:event=>updateRaw(event.target.value),placeholder:"Edit JSON string...",autoFocus:forceVisible,valid:parseError?"error":void 0,readOnly:readonly}),isObjectOrArray=Array.isArray(value2)||"object"==typeof value2&&value2?.constructor===Object;return react.createElement(Wrapper7,{"aria-readonly":readonly},isObjectOrArray&&react.createElement(RawButton,{role:"switch","aria-checked":showRaw,"aria-label":`Edit the ${name} properties in text format`,onClick:e2=>{e2.preventDefault(),setShowRaw((isRaw=>!isRaw))}},showRaw?react.createElement(dist.dbI,null):react.createElement(dist.bMW,null),react.createElement("span",null,"RAW")),showRaw?rawJSONForm:react.createElement(JsonTree,{readOnly:readonly||!isObjectOrArray,isCollapsed:isObjectOrArray?void 0:()=>!0,data,rootName:name,onFullyUpdate:onChange,getStyle:getCustomStyleFunction(theme),cancelButtonElement:react.createElement(ButtonInline,{type:"button"},"Cancel"),addButtonElement:react.createElement(ButtonInline,{type:"submit",primary:!0},"Save"),plusMenuElement:react.createElement(ActionButton,{type:"button"},react.createElement(dist.REV,null)),minusMenuElement:react.createElement(ActionButton,{type:"button"},react.createElement(dist.Qpb,null)),inputElement:(_2,__,___,key)=>key?react.createElement(Input,{onFocus:selectValue,onBlur:dispatchEnterKey}):react.createElement(Input,null),fallback:rawJSONForm}))},RangeInput=theming.I4.input((({theme,min,max,value:value2,disabled})=>({"&":{width:"100%",backgroundColor:"transparent",appearance:"none"},"&::-webkit-slider-runnable-track":{background:"light"===theme.base?`linear-gradient(to right, \n ${theme.color.green} 0%, ${theme.color.green} ${(value2-min)/(max-min)*100}%, \n ${curriedDarken$1(.02,theme.input.background)} ${(value2-min)/(max-min)*100}%, \n ${curriedDarken$1(.02,theme.input.background)} 100%)`:`linear-gradient(to right, \n ${theme.color.green} 0%, ${theme.color.green} ${(value2-min)/(max-min)*100}%, \n ${curriedLighten$1(.02,theme.input.background)} ${(value2-min)/(max-min)*100}%, \n ${curriedLighten$1(.02,theme.input.background)} 100%)`,boxShadow:`${theme.appBorderColor} 0 0 0 1px inset`,borderRadius:6,width:"100%",height:6,cursor:disabled?"not-allowed":"pointer"},"&::-webkit-slider-thumb":{marginTop:"-6px",width:16,height:16,border:`1px solid ${rgba(theme.appBorderColor,.2)}`,borderRadius:"50px",boxShadow:`0 1px 3px 0px ${rgba(theme.appBorderColor,.2)}`,cursor:disabled?"not-allowed":"grab",appearance:"none",background:`${theme.input.background}`,transition:"all 150ms ease-out","&:hover":{background:`${curriedDarken$1(.05,theme.input.background)}`,transform:"scale3d(1.1, 1.1, 1.1) translateY(-1px)",transition:"all 50ms ease-out"},"&:active":{background:`${theme.input.background}`,transform:"scale3d(1, 1, 1) translateY(0px)",cursor:disabled?"not-allowed":"grab"}},"&:focus":{outline:"none","&::-webkit-slider-runnable-track":{borderColor:rgba(theme.color.secondary,.4)},"&::-webkit-slider-thumb":{borderColor:theme.color.secondary,boxShadow:`0 0px 5px 0px ${theme.color.secondary}`}},"&::-moz-range-track":{background:"light"===theme.base?`linear-gradient(to right, \n ${theme.color.green} 0%, ${theme.color.green} ${(value2-min)/(max-min)*100}%, \n ${curriedDarken$1(.02,theme.input.background)} ${(value2-min)/(max-min)*100}%, \n ${curriedDarken$1(.02,theme.input.background)} 100%)`:`linear-gradient(to right, \n ${theme.color.green} 0%, ${theme.color.green} ${(value2-min)/(max-min)*100}%, \n ${curriedLighten$1(.02,theme.input.background)} ${(value2-min)/(max-min)*100}%, \n ${curriedLighten$1(.02,theme.input.background)} 100%)`,boxShadow:`${theme.appBorderColor} 0 0 0 1px inset`,borderRadius:6,width:"100%",height:6,cursor:disabled?"not-allowed":"pointer",outline:"none"},"&::-moz-range-thumb":{width:16,height:16,border:`1px solid ${rgba(theme.appBorderColor,.2)}`,borderRadius:"50px",boxShadow:`0 1px 3px 0px ${rgba(theme.appBorderColor,.2)}`,cursor:disabled?"not-allowed":"grap",background:`${theme.input.background}`,transition:"all 150ms ease-out","&:hover":{background:`${curriedDarken$1(.05,theme.input.background)}`,transform:"scale3d(1.1, 1.1, 1.1) translateY(-1px)",transition:"all 50ms ease-out"},"&:active":{background:`${theme.input.background}`,transform:"scale3d(1, 1, 1) translateY(0px)",cursor:"grabbing"}},"&::-ms-track":{background:"light"===theme.base?`linear-gradient(to right, \n ${theme.color.green} 0%, ${theme.color.green} ${(value2-min)/(max-min)*100}%, \n ${curriedDarken$1(.02,theme.input.background)} ${(value2-min)/(max-min)*100}%, \n ${curriedDarken$1(.02,theme.input.background)} 100%)`:`linear-gradient(to right, \n ${theme.color.green} 0%, ${theme.color.green} ${(value2-min)/(max-min)*100}%, \n ${curriedLighten$1(.02,theme.input.background)} ${(value2-min)/(max-min)*100}%, \n ${curriedLighten$1(.02,theme.input.background)} 100%)`,boxShadow:`${theme.appBorderColor} 0 0 0 1px inset`,color:"transparent",width:"100%",height:"6px",cursor:"pointer"},"&::-ms-fill-lower":{borderRadius:6},"&::-ms-fill-upper":{borderRadius:6},"&::-ms-thumb":{width:16,height:16,background:`${theme.input.background}`,border:`1px solid ${rgba(theme.appBorderColor,.2)}`,borderRadius:50,cursor:"grab",marginTop:0},"@supports (-ms-ime-align:auto)":{"input[type=range]":{margin:"0"}}}))),RangeLabel=theming.I4.span({paddingLeft:5,paddingRight:5,fontSize:12,whiteSpace:"nowrap",fontFeatureSettings:"tnum",fontVariantNumeric:"tabular-nums","[aria-readonly=true] &":{opacity:.5}}),RangeCurrentAndMaxLabel=(0,theming.I4)(RangeLabel)((({numberOFDecimalsPlaces,max})=>({width:`${numberOFDecimalsPlaces+2*max.toString().length+3}ch`,textAlign:"right",flexShrink:0}))),RangeWrapper=theming.I4.div({display:"flex",alignItems:"center",width:"100%"});var Wrapper8=theming.I4.label({display:"flex"}),MaxLength=theming.I4.div((({isMaxed})=>({marginLeft:"0.75rem",paddingTop:"0.35rem",color:isMaxed?"red":void 0}))),FileInput=(0,theming.I4)(components.lV.Input)({padding:10});var LazyColorControl=(0,react.lazy)((()=>__webpack_require__.e(357).then(__webpack_require__.bind(__webpack_require__,"./node_modules/@storybook/addon-docs/dist/Color-AVL7NMMY.mjs")))),Controls2={array:ObjectControl,object:ObjectControl,boolean:({name,value:value2,onChange,onBlur,onFocus,argType})=>{let onSetFalse=(0,react.useCallback)((()=>onChange(!1)),[onChange]),readonly=!!argType?.table?.readonly;if(void 0===value2)return react.createElement(components.$n,{variant:"outline",size:"medium",id:(0,chunk_SPFYY5GD.Yq)(name),onClick:onSetFalse,disabled:readonly},"Set boolean");let controlId=(0,chunk_SPFYY5GD.ZA)(name),parsedValue="string"==typeof value2?(value2=>"true"===value2)(value2):value2;return react.createElement(Label2,{"aria-disabled":readonly,htmlFor:controlId,"aria-label":name},react.createElement("input",{id:controlId,type:"checkbox",onChange:e2=>onChange(e2.target.checked),checked:parsedValue,role:"switch",disabled:readonly,name,onBlur,onFocus}),react.createElement("span",{"aria-hidden":"true"},"False"),react.createElement("span",{"aria-hidden":"true"},"True"))},color:props=>react.createElement(react.Suspense,{fallback:react.createElement("div",null)},react.createElement(LazyColorControl,{...props})),date:({name,value:value2,onChange,onFocus,onBlur,argType})=>{let[valid,setValid]=(0,react.useState)(!0),dateRef=(0,react.useRef)(),timeRef=(0,react.useRef)(),readonly=!!argType?.table?.readonly;(0,react.useEffect)((()=>{!1!==valid&&(dateRef&&dateRef.current&&(dateRef.current.value=value2?(value2=>{let date=new Date(value2);return`${`000${date.getFullYear()}`.slice(-4)}-${`0${date.getMonth()+1}`.slice(-2)}-${`0${date.getDate()}`.slice(-2)}`})(value2):""),timeRef&&timeRef.current&&(timeRef.current.value=value2?(value2=>{let date=new Date(value2);return`${`0${date.getHours()}`.slice(-2)}:${`0${date.getMinutes()}`.slice(-2)}`})(value2):""))}),[value2]);let controlId=(0,chunk_SPFYY5GD.ZA)(name);return react.createElement(FlexSpaced,null,react.createElement(FormInput,{type:"date",max:"9999-12-31",ref:dateRef,id:`${controlId}-date`,name:`${controlId}-date`,readOnly:readonly,onChange:e2=>{if(!e2.target.value)return onChange();let parsed=(value2=>{let[year,month,day]=value2.split("-"),result=new Date;return result.setFullYear(parseInt(year,10),parseInt(month,10)-1,parseInt(day,10)),result})(e2.target.value),result=new Date(value2??"");result.setFullYear(parsed.getFullYear(),parsed.getMonth(),parsed.getDate());let time=result.getTime();time&&onChange(time),setValid(!!time)},onFocus,onBlur}),react.createElement(FormInput,{type:"time",id:`${controlId}-time`,name:`${controlId}-time`,ref:timeRef,onChange:e2=>{if(!e2.target.value)return onChange();let parsed=(value2=>{let[hours,minutes]=value2.split(":"),result=new Date;return result.setHours(parseInt(hours,10)),result.setMinutes(parseInt(minutes,10)),result})(e2.target.value),result=new Date(value2??"");result.setHours(parsed.getHours()),result.setMinutes(parsed.getMinutes());let time=result.getTime();time&&onChange(time),setValid(!!time)},readOnly:readonly,onFocus,onBlur}),valid?null:react.createElement("div",null,"invalid"))},number:({name,value:value2,onChange,min,max,step,onBlur,onFocus,argType})=>{let[inputValue,setInputValue]=(0,react.useState)("number"==typeof value2?value2:""),[forceVisible,setForceVisible]=(0,react.useState)(!1),[parseError,setParseError]=(0,react.useState)(null),readonly=!!argType?.table?.readonly,handleChange=(0,react.useCallback)((event=>{setInputValue(event.target.value);let result=parseFloat(event.target.value);Number.isNaN(result)?setParseError(new Error(`'${event.target.value}' is not a number`)):(onChange(result),setParseError(null))}),[onChange,setParseError]),onForceVisible=(0,react.useCallback)((()=>{setInputValue("0"),onChange(0),setForceVisible(!0)}),[setForceVisible]),htmlElRef=(0,react.useRef)(null);return(0,react.useEffect)((()=>{forceVisible&&htmlElRef.current&&htmlElRef.current.select()}),[forceVisible]),(0,react.useEffect)((()=>{let newInputValue="number"==typeof value2?value2:"";inputValue!==newInputValue&&setInputValue(newInputValue)}),[value2]),void 0===value2?react.createElement(components.$n,{variant:"outline",size:"medium",id:(0,chunk_SPFYY5GD.Yq)(name),onClick:onForceVisible,disabled:readonly},"Set number"):react.createElement(Wrapper4,null,react.createElement(FormInput2,{ref:htmlElRef,id:(0,chunk_SPFYY5GD.ZA)(name),type:"number",onChange:handleChange,size:"flex",placeholder:"Edit number...",value:inputValue,valid:parseError?"error":void 0,autoFocus:forceVisible,readOnly:readonly,name,min,max,step,onFocus,onBlur}))},check:OptionsControl,"inline-check":OptionsControl,radio:OptionsControl,"inline-radio":OptionsControl,select:OptionsControl,"multi-select":OptionsControl,range:({name,value:value2,onChange,min=0,max=100,step=1,onBlur,onFocus,argType})=>{let hasValue=void 0!==value2,numberOFDecimalsPlaces=(0,react.useMemo)((()=>function getNumberOfDecimalPlaces(number){let match=number.toString().match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return match?Math.max(0,(match[1]?match[1].length:0)-(match[2]?+match[2]:0)):0}(step)),[step]),readonly=!!argType?.table?.readonly;return react.createElement(RangeWrapper,{"aria-readonly":readonly},react.createElement(RangeLabel,null,min),react.createElement(RangeInput,{id:(0,chunk_SPFYY5GD.ZA)(name),type:"range",disabled:readonly,onChange:event=>{onChange((value2=>{let result=parseFloat(value2);return Number.isNaN(result)?void 0:result})(event.target.value))},name,min,max,step,onFocus,onBlur,value:value2??min}),react.createElement(RangeCurrentAndMaxLabel,{numberOFDecimalsPlaces,max},hasValue?value2.toFixed(numberOFDecimalsPlaces):"--"," / ",max))},text:({name,value:value2,onChange,onFocus,onBlur,maxLength,argType})=>{let readonly=!!argType?.table?.readonly,[forceVisible,setForceVisible]=(0,react.useState)(!1),onForceVisible=(0,react.useCallback)((()=>{onChange(""),setForceVisible(!0)}),[setForceVisible]);if(void 0===value2)return react.createElement(components.$n,{variant:"outline",size:"medium",disabled:readonly,id:(0,chunk_SPFYY5GD.Yq)(name),onClick:onForceVisible},"Set string");let isValid="string"==typeof value2;return react.createElement(Wrapper8,null,react.createElement(components.lV.Textarea,{id:(0,chunk_SPFYY5GD.ZA)(name),maxLength,onChange:event=>{onChange(event.target.value)},disabled:readonly,size:"flex",placeholder:"Edit string...",autoFocus:forceVisible,valid:isValid?void 0:"error",name,value:isValid?value2:"",onFocus,onBlur}),maxLength&&react.createElement(MaxLength,{isMaxed:value2?.length===maxLength},value2?.length??0," / ",maxLength))},file:({onChange,name,accept="image/*",value:value2,argType})=>{let inputElement=(0,react.useRef)(null),readonly=argType?.control?.readOnly;return(0,react.useEffect)((()=>{null==value2&&inputElement.current&&(inputElement.current.value="")}),[value2,name]),react.createElement(FileInput,{ref:inputElement,id:(0,chunk_SPFYY5GD.ZA)(name),type:"file",name,multiple:!0,disabled:readonly,onChange:function handleFileChange(e2){if(!e2.target.files)return;let fileUrls=Array.from(e2.target.files).map((file=>URL.createObjectURL(file)));onChange(fileUrls),function revokeOldUrls(urls){urls.forEach((url=>{url.startsWith("blob:")&&URL.revokeObjectURL(url)}))}(value2||[])},accept,size:"flex"})}},NoControl=()=>react.createElement(react.Fragment,null,"-"),ArgControl=({row,arg,updateArgs,isHovered})=>{let{key,control}=row,[isFocused,setFocused]=(0,react.useState)(!1),[boxedValue,setBoxedValue]=(0,react.useState)({value:arg});(0,react.useEffect)((()=>{isFocused||setBoxedValue({value:arg})}),[isFocused,arg]);let onChange=(0,react.useCallback)((argVal=>(setBoxedValue({value:argVal}),updateArgs({[key]:argVal}),argVal)),[updateArgs,key]),onBlur=(0,react.useCallback)((()=>setFocused(!1)),[]),onFocus=(0,react.useCallback)((()=>setFocused(!0)),[]);if(!control||control.disable){return isHovered&&(!0!==control?.disable&&"function"!==row?.type?.name)?react.createElement(components.N_,{href:"https://storybook.js.org/docs/essentials/controls?ref=ui",target:"_blank",withArrow:!0},"Setup controls"):react.createElement(NoControl,null)}let props={name:key,argType:row,value:boxedValue.value,onChange,onBlur,onFocus},Control=Controls2[control.type]||NoControl;return react.createElement(Control,{...props,...control,controlType:control.type})},Table=theming.I4.table((({theme})=>({"&&":{borderCollapse:"collapse",borderSpacing:0,border:"none",tr:{border:"none !important",background:"none"},"td, th":{padding:0,border:"none",width:"auto!important"},marginTop:0,marginBottom:0,"th:first-of-type, td:first-of-type":{paddingLeft:0},"th:last-of-type, td:last-of-type":{paddingRight:0},td:{paddingTop:0,paddingBottom:4,"&:not(:first-of-type)":{paddingLeft:10,paddingRight:0}},tbody:{boxShadow:"none",border:"none"},code:(0,components.zb)({theme}),div:{span:{fontWeight:"bold"}},"& code":{margin:0,display:"inline-block",fontSize:theme.typography.size.s1}}}))),ArgJsDoc=({tags})=>{let params=(tags.params||[]).filter((x2=>x2.description)),hasDisplayableParams=0!==params.length,hasDisplayableDeprecated=null!=tags.deprecated,hasDisplayableReturns=null!=tags.returns&&null!=tags.returns.description;return hasDisplayableParams||hasDisplayableReturns||hasDisplayableDeprecated?react.createElement(react.Fragment,null,react.createElement(Table,null,react.createElement("tbody",null,hasDisplayableDeprecated&&react.createElement("tr",{key:"deprecated"},react.createElement("td",{colSpan:2},react.createElement("strong",null,"Deprecated"),": ",tags.deprecated?.toString())),hasDisplayableParams&¶ms.map((x2=>react.createElement("tr",{key:x2.name},react.createElement("td",null,react.createElement("code",null,x2.name)),react.createElement("td",null,x2.description)))),hasDisplayableReturns&&react.createElement("tr",{key:"returns"},react.createElement("td",null,react.createElement("code",null,"Returns")),react.createElement("td",null,tags.returns?.description))))):null},import_memoizerific=(0,chunk_QUZPS4B6.f1)(require_memoizerific()),Summary=theming.I4.div((({isExpanded})=>({display:"flex",flexDirection:isExpanded?"column":"row",flexWrap:"wrap",alignItems:"flex-start",marginBottom:"-4px",minWidth:100}))),Text3=theming.I4.span(components.zb,(({theme,simple=!1})=>({flex:"0 0 auto",fontFamily:theme.typography.fonts.mono,fontSize:theme.typography.size.s1,wordBreak:"break-word",whiteSpace:"normal",maxWidth:"100%",margin:0,marginRight:"4px",marginBottom:"4px",paddingTop:"2px",paddingBottom:"2px",lineHeight:"13px",...simple&&{background:"transparent",border:"0 none",paddingLeft:0}}))),ExpandButton=theming.I4.button((({theme})=>({fontFamily:theme.typography.fonts.mono,color:theme.color.secondary,marginBottom:"4px",background:"none",border:"none"}))),Expandable=theming.I4.div(components.zb,(({theme})=>({fontFamily:theme.typography.fonts.mono,color:theme.color.secondary,fontSize:theme.typography.size.s1,margin:0,whiteSpace:"nowrap",display:"flex",alignItems:"center"}))),Detail=theming.I4.div((({theme,width})=>({width,minWidth:200,maxWidth:800,padding:15,fontFamily:theme.typography.fonts.mono,fontSize:theme.typography.size.s1,boxSizing:"content-box","& code":{padding:"0 !important"}}))),ChevronUpIcon=(0,theming.I4)(dist.tN5)({marginLeft:4}),ChevronDownIcon=(0,theming.I4)(dist.abt)({marginLeft:4}),EmptyArg=()=>react.createElement("span",null,"-"),ArgText=({text,simple})=>react.createElement(Text3,{simple},text),calculateDetailWidth=(0,import_memoizerific.default)(1e3)((detail=>{let lines=detail.split(/\r?\n/);return`${Math.max(...lines.map((x2=>x2.length)))}ch`})),renderSummaryItems=(summaryItems,isExpanded=!0)=>{let items=summaryItems;return isExpanded||(items=summaryItems.slice(0,8)),items.map((item=>react.createElement(ArgText,{key:item,text:""===item?'""':item})))},ArgSummary=({value:value2,initialExpandedArgs})=>{let{summary,detail}=value2,[isOpen,setIsOpen]=(0,react.useState)(!1),[isExpanded,setIsExpanded]=(0,react.useState)(initialExpandedArgs||!1);if(null==summary)return null;let summaryAsString="function"==typeof summary.toString?summary.toString():summary;if(null==detail){if(/[(){}[\]<>]/.test(summaryAsString))return react.createElement(ArgText,{text:summaryAsString});let summaryItems=(summary=>{if(!summary)return[summary];let summaryItems=summary.split("|").map((value2=>value2.trim()));return(0,chunk_SPFYY5GD.sb)(summaryItems)})(summaryAsString),itemsCount=summaryItems.length;return itemsCount>8?react.createElement(Summary,{isExpanded},renderSummaryItems(summaryItems,isExpanded),react.createElement(ExpandButton,{onClick:()=>setIsExpanded(!isExpanded)},isExpanded?"Show less...":`Show ${itemsCount-8} more...`)):react.createElement(Summary,null,renderSummaryItems(summaryItems))}return react.createElement(components.o4,{closeOnOutsideClick:!0,placement:"bottom",visible:isOpen,onVisibleChange:isVisible=>{setIsOpen(isVisible)},tooltip:react.createElement(Detail,{width:calculateDetailWidth(detail)},react.createElement(components.bF,{language:"jsx",format:!1},detail))},react.createElement(Expandable,{className:"sbdocs-expandable"},react.createElement("span",null,summaryAsString),isOpen?react.createElement(ChevronUpIcon,null):react.createElement(ChevronDownIcon,null)))},ArgValue=({value:value2,initialExpandedArgs})=>null==value2?react.createElement(EmptyArg,null):react.createElement(ArgSummary,{value:value2,initialExpandedArgs}),Name=theming.I4.span({fontWeight:"bold"}),Required=theming.I4.span((({theme})=>({color:theme.color.negative,fontFamily:theme.typography.fonts.mono,cursor:"help"}))),Description=theming.I4.div((({theme})=>({"&&":{p:{margin:"0 0 10px 0"},a:{color:theme.color.secondary}},code:{...(0,components.zb)({theme}),fontSize:12,fontFamily:theme.typography.fonts.mono},"& code":{margin:0,display:"inline-block"},"& pre > code":{whiteSpace:"pre-wrap"}}))),Type=theming.I4.div((({theme,hasDescription})=>({color:"light"===theme.base?curriedTransparentize$1(.1,theme.color.defaultText):curriedTransparentize$1(.2,theme.color.defaultText),marginTop:hasDescription?4:0}))),TypeWithJsDoc=theming.I4.div((({theme,hasDescription})=>({color:"light"===theme.base?curriedTransparentize$1(.1,theme.color.defaultText):curriedTransparentize$1(.2,theme.color.defaultText),marginTop:hasDescription?12:0,marginBottom:12}))),StyledTd=theming.I4.td((({expandable})=>({paddingLeft:expandable?"40px !important":"20px !important"}))),ArgRow=props=>{let[isHovered,setIsHovered]=(0,react.useState)(!1),{row,updateArgs,compact,expandable,initialExpandedArgs}=props,{name,description}=row,table=row.table||{},type=table.type||(value2=row.type)&&{summary:"string"==typeof value2?value2:value2.name},defaultValue=table.defaultValue||row.defaultValue,required=row.type?.required,hasDescription=null!=description&&""!==description;var value2;return react.createElement("tr",{onMouseEnter:()=>setIsHovered(!0),onMouseLeave:()=>setIsHovered(!1)},react.createElement(StyledTd,{expandable:expandable??!1},react.createElement(Name,null,name),required?react.createElement(Required,{title:"Required"},"*"):null),compact?null:react.createElement("td",null,hasDescription&&react.createElement(Description,null,react.createElement(index_modern_default,null,description)),null!=table.jsDocTags?react.createElement(react.Fragment,null,react.createElement(TypeWithJsDoc,{hasDescription},react.createElement(ArgValue,{value:type,initialExpandedArgs})),react.createElement(ArgJsDoc,{tags:table.jsDocTags})):react.createElement(Type,{hasDescription},react.createElement(ArgValue,{value:type,initialExpandedArgs}))),compact?null:react.createElement("td",null,react.createElement(ArgValue,{value:defaultValue,initialExpandedArgs})),updateArgs?react.createElement("td",null,react.createElement(ArgControl,{...props,isHovered})):null)},Wrapper9=theming.I4.div((({inAddonPanel,theme})=>({height:inAddonPanel?"100%":"auto",display:"flex",border:inAddonPanel?"none":`1px solid ${theme.appBorderColor}`,borderRadius:inAddonPanel?0:theme.appBorderRadius,padding:inAddonPanel?0:40,alignItems:"center",justifyContent:"center",flexDirection:"column",gap:15,background:theme.background.content}))),Links=theming.I4.div((({theme})=>({display:"flex",fontSize:theme.typography.size.s2-1,gap:25}))),Empty=({inAddonPanel})=>{let[isLoading,setIsLoading]=(0,react.useState)(!0);return(0,react.useEffect)((()=>{let load=setTimeout((()=>{setIsLoading(!1)}),100);return()=>clearTimeout(load)}),[]),isLoading?null:react.createElement(Wrapper9,{inAddonPanel},react.createElement(components.Q2,{title:inAddonPanel?"Interactive story playground":"Args table with interactive controls couldn't be auto-generated",description:react.createElement(react.Fragment,null,"Controls give you an easy to use interface to test your components. Set your story args and you'll see controls appearing here automatically."),footer:react.createElement(Links,null,inAddonPanel&&react.createElement(react.Fragment,null,react.createElement(components.N_,{href:"https://storybook.js.org/docs/essentials/controls?ref=ui",target:"_blank",withArrow:!0},react.createElement(dist.pyG,null)," Read docs")),!inAddonPanel&&react.createElement(components.N_,{href:"https://storybook.js.org/docs/essentials/controls?ref=ui",target:"_blank",withArrow:!0},react.createElement(dist.pyG,null)," Learn how to set that up"))}))},ExpanderIconDown=(0,theming.I4)(dist.D3D)((({theme})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:"light"===theme.base?curriedTransparentize$1(.25,theme.color.defaultText):curriedTransparentize$1(.3,theme.color.defaultText),border:"none",display:"inline-block"}))),ExpanderIconRight=(0,theming.I4)(dist.vKP)((({theme})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:"light"===theme.base?curriedTransparentize$1(.25,theme.color.defaultText):curriedTransparentize$1(.3,theme.color.defaultText),border:"none",display:"inline-block"}))),FlexWrapper=theming.I4.span((({theme})=>({display:"flex",lineHeight:"20px",alignItems:"center"}))),Section=theming.I4.td((({theme})=>({position:"relative",letterSpacing:"0.35em",textTransform:"uppercase",fontWeight:theme.typography.weight.bold,fontSize:theme.typography.size.s1-1,color:"light"===theme.base?curriedTransparentize$1(.4,theme.color.defaultText):curriedTransparentize$1(.6,theme.color.defaultText),background:`${theme.background.app} !important`,"& ~ td":{background:`${theme.background.app} !important`}}))),Subsection=theming.I4.td((({theme})=>({position:"relative",fontWeight:theme.typography.weight.bold,fontSize:theme.typography.size.s2-1,background:theme.background.app}))),StyledTd2=theming.I4.td({position:"relative"}),StyledTr=theming.I4.tr((({theme})=>({"&:hover > td":{backgroundColor:`${curriedLighten$1(.005,theme.background.app)} !important`,boxShadow:`${theme.color.mediumlight} 0 - 1px 0 0 inset`,cursor:"row-resize"}}))),ClickIntercept=theming.I4.button({background:"none",border:"none",padding:"0",font:"inherit",position:"absolute",top:0,bottom:0,left:0,right:0,height:"100%",width:"100%",color:"transparent",cursor:"row-resize !important"}),SectionRow=({level="section",label,children,initialExpanded=!0,colSpan=3})=>{let[expanded,setExpanded]=(0,react.useState)(initialExpanded),Level="subsection"===level?Subsection:Section,itemCount=children?.length||0,caption="subsection"===level?`${itemCount} item${1!==itemCount?"s":""}`:"",helperText=`${expanded?"Hide":"Show"} ${"subsection"===level?itemCount:label} item${1!==itemCount?"s":""}`;return react.createElement(react.Fragment,null,react.createElement(StyledTr,{title:helperText},react.createElement(Level,{colSpan:1},react.createElement(ClickIntercept,{onClick:e2=>setExpanded(!expanded),tabIndex:0},helperText),react.createElement(FlexWrapper,null,expanded?react.createElement(ExpanderIconDown,null):react.createElement(ExpanderIconRight,null),label)),react.createElement(StyledTd2,{colSpan:colSpan-1},react.createElement(ClickIntercept,{onClick:e2=>setExpanded(!expanded),tabIndex:-1,style:{outline:"none"}},helperText),expanded?null:caption)),expanded?children:null)},TableWrapper=theming.I4.div((({theme})=>({width:"100%",borderSpacing:0,color:theme.color.defaultText}))),Row=theming.I4.div((({theme})=>({display:"flex",borderBottom:`1px solid ${theme.appBorderColor}`,"&:last-child":{borderBottom:0}}))),Column=theming.I4.div((({position,theme})=>{let baseStyles={display:"flex",flexDirection:"column",gap:5,padding:"10px 15px",alignItems:"flex-start"};switch(position){case"first":return{...baseStyles,width:"25%",paddingLeft:20};case"second":return{...baseStyles,width:"35%"};case"third":return{...baseStyles,width:"15%"};case"last":return{...baseStyles,width:"25%",paddingRight:20}}})),SkeletonText=theming.I4.div((({theme,width,height})=>({animation:`${theme.animation.glow} 1.5s ease-in-out infinite`,background:theme.appBorderColor,width:width||"100%",height:height||16,borderRadius:3}))),Skeleton=()=>react.createElement(TableWrapper,null,react.createElement(Row,null,react.createElement(Column,{position:"first"},react.createElement(SkeletonText,{width:"60%"})),react.createElement(Column,{position:"second"},react.createElement(SkeletonText,{width:"30%"})),react.createElement(Column,{position:"third"},react.createElement(SkeletonText,{width:"60%"})),react.createElement(Column,{position:"last"},react.createElement(SkeletonText,{width:"60%"}))),react.createElement(Row,null,react.createElement(Column,{position:"first"},react.createElement(SkeletonText,{width:"60%"})),react.createElement(Column,{position:"second"},react.createElement(SkeletonText,{width:"80%"}),react.createElement(SkeletonText,{width:"30%"})),react.createElement(Column,{position:"third"},react.createElement(SkeletonText,{width:"60%"})),react.createElement(Column,{position:"last"},react.createElement(SkeletonText,{width:"60%"}))),react.createElement(Row,null,react.createElement(Column,{position:"first"},react.createElement(SkeletonText,{width:"60%"})),react.createElement(Column,{position:"second"},react.createElement(SkeletonText,{width:"80%"}),react.createElement(SkeletonText,{width:"30%"})),react.createElement(Column,{position:"third"},react.createElement(SkeletonText,{width:"60%"})),react.createElement(Column,{position:"last"},react.createElement(SkeletonText,{width:"60%"}))),react.createElement(Row,null,react.createElement(Column,{position:"first"},react.createElement(SkeletonText,{width:"60%"})),react.createElement(Column,{position:"second"},react.createElement(SkeletonText,{width:"80%"}),react.createElement(SkeletonText,{width:"30%"})),react.createElement(Column,{position:"third"},react.createElement(SkeletonText,{width:"60%"})),react.createElement(Column,{position:"last"},react.createElement(SkeletonText,{width:"60%"})))),TableWrapper2=theming.I4.table((({theme,compact,inAddonPanel})=>({"&&":{borderSpacing:0,color:theme.color.defaultText,"td, th":{padding:0,border:"none",verticalAlign:"top",textOverflow:"ellipsis"},fontSize:theme.typography.size.s2-1,lineHeight:"20px",textAlign:"left",width:"100%",marginTop:inAddonPanel?0:25,marginBottom:inAddonPanel?0:40,"thead th:first-of-type, td:first-of-type":{width:"25%"},"th:first-of-type, td:first-of-type":{paddingLeft:20},"th:nth-of-type(2), td:nth-of-type(2)":{...compact?null:{width:"35%"}},"td:nth-of-type(3)":{...compact?null:{width:"15%"}},"th:last-of-type, td:last-of-type":{paddingRight:20,...compact?null:{width:"25%"}},th:{color:"light"===theme.base?curriedTransparentize$1(.25,theme.color.defaultText):curriedTransparentize$1(.45,theme.color.defaultText),paddingTop:10,paddingBottom:10,paddingLeft:15,paddingRight:15},td:{paddingTop:"10px",paddingBottom:"10px","&:not(:first-of-type)":{paddingLeft:15,paddingRight:15},"&:last-of-type":{paddingRight:20}},marginLeft:inAddonPanel?0:1,marginRight:inAddonPanel?0:1,tbody:{...inAddonPanel?null:{filter:"light"===theme.base?"drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.10))":"drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.20))"},"> tr > *":{background:theme.background.content,borderTop:`1px solid ${theme.appBorderColor}`},...inAddonPanel?null:{"> tr:first-of-type > *":{borderBlockStart:`1px solid ${theme.appBorderColor}`},"> tr:last-of-type > *":{borderBlockEnd:`1px solid ${theme.appBorderColor}`},"> tr > *:first-of-type":{borderInlineStart:`1px solid ${theme.appBorderColor}`},"> tr > *:last-of-type":{borderInlineEnd:`1px solid ${theme.appBorderColor}`},"> tr:first-of-type > td:first-of-type":{borderTopLeftRadius:theme.appBorderRadius},"> tr:first-of-type > td:last-of-type":{borderTopRightRadius:theme.appBorderRadius},"> tr:last-of-type > td:first-of-type":{borderBottomLeftRadius:theme.appBorderRadius},"> tr:last-of-type > td:last-of-type":{borderBottomRightRadius:theme.appBorderRadius}}}}}))),TablePositionWrapper=theming.I4.div({position:"relative"}),ButtonPositionWrapper=theming.I4.div({position:"absolute",right:8,top:6}),sortFns={alpha:(a2,b2)=>(a2.name??"").localeCompare(b2.name??""),requiredFirst:(a2,b2)=>+!!b2.type?.required-+!!a2.type?.required||(a2.name??"").localeCompare(b2.name??""),none:null},ArgsTable=props=>{let{updateArgs,resetArgs,compact,inAddonPanel,initialExpandedArgs,sort="none",isLoading}=props;if("error"in props){let{error}=props;return react.createElement(EmptyBlock,null,error," ",react.createElement(components.N_,{href:"http://storybook.js.org/docs/?ref=ui",target:"_blank",withArrow:!0},react.createElement(dist.pyG,null)," Read the docs"))}if(isLoading)return react.createElement(Skeleton,null);let{rows,args,globals}="rows"in props?props:{rows:void 0,args:void 0,globals:void 0},groups=((rows,sort)=>{let sections={ungrouped:[],ungroupedSubsections:{},sections:{}};if(!rows)return sections;Object.entries(rows).forEach((([key,row])=>{let{category,subcategory}=row?.table||{};if(category){let section=sections.sections[category]||{ungrouped:[],subsections:{}};if(subcategory){let subsection=section.subsections[subcategory]||[];subsection.push({key,...row}),section.subsections[subcategory]=subsection}else section.ungrouped.push({key,...row});sections.sections[category]=section}else if(subcategory){let subsection=sections.ungroupedSubsections[subcategory]||[];subsection.push({key,...row}),sections.ungroupedSubsections[subcategory]=subsection}else sections.ungrouped.push({key,...row})}));let sortFn=sortFns[sort],sortSubsection=record=>sortFn?Object.keys(record).reduce(((acc,cur)=>({...acc,[cur]:record[cur].sort(sortFn)})),{}):record;return{ungrouped:sortFn?sections.ungrouped.sort(sortFn):sections.ungrouped,ungroupedSubsections:sortSubsection(sections.ungroupedSubsections),sections:Object.keys(sections.sections).reduce(((acc,cur)=>({...acc,[cur]:{ungrouped:sortFn?sections.sections[cur].ungrouped.sort(sortFn):sections.sections[cur].ungrouped,subsections:sortSubsection(sections.sections[cur].subsections)}})),{})}})((0,chunk_SPFYY5GD.fN)(rows||{},(row=>!row?.table?.disable&&((row,args,globals)=>{try{return(0,csf.hX)(row,args,globals)}catch(err){return external_STORYBOOK_MODULE_CLIENT_LOGGER_.once.warn(err.message),!1}})(row,args||{},globals||{}))),sort),hasNoUngrouped=0===groups.ungrouped.length,hasNoSections=0===Object.entries(groups.sections).length,hasNoUngroupedSubsections=0===Object.entries(groups.ungroupedSubsections).length;if(hasNoUngrouped&&hasNoSections&&hasNoUngroupedSubsections)return react.createElement(Empty,{inAddonPanel});let colSpan=1;updateArgs&&(colSpan+=1),compact||(colSpan+=2);let expandable=Object.keys(groups.sections).length>0,common={updateArgs,compact,inAddonPanel,initialExpandedArgs};return react.createElement(components.dL,null,react.createElement(TablePositionWrapper,null,updateArgs&&!isLoading&&resetArgs&&react.createElement(ButtonPositionWrapper,null,react.createElement(components.K0,{onClick:()=>resetArgs(),"aria-label":"Reset controls",title:"Reset controls"},react.createElement(dist.ejX,null))),react.createElement(TableWrapper2,{compact,inAddonPanel,className:"docblock-argstable sb-unstyled"},react.createElement("thead",{className:"docblock-argstable-head"},react.createElement("tr",null,react.createElement("th",null,react.createElement("span",null,"Name")),compact?null:react.createElement("th",null,react.createElement("span",null,"Description")),compact?null:react.createElement("th",null,react.createElement("span",null,"Default")),updateArgs?react.createElement("th",null,react.createElement("span",null,"Control")):null)),react.createElement("tbody",{className:"docblock-argstable-body"},groups.ungrouped.map((row=>react.createElement(ArgRow,{key:row.key,row,arg:args&&args[row.key],...common}))),Object.entries(groups.ungroupedSubsections).map((([subcategory,subsection])=>react.createElement(SectionRow,{key:subcategory,label:subcategory,level:"subsection",colSpan},subsection.map((row=>react.createElement(ArgRow,{key:row.key,row,arg:args&&args[row.key],expandable,...common})))))),Object.entries(groups.sections).map((([category,section])=>react.createElement(SectionRow,{key:category,label:category,level:"section",colSpan},section.ungrouped.map((row=>react.createElement(ArgRow,{key:row.key,row,arg:args&&args[row.key],...common}))),Object.entries(section.subsections).map((([subcategory,subsection])=>react.createElement(SectionRow,{key:subcategory,label:subcategory,level:"subsection",colSpan},subsection.map((row=>react.createElement(ArgRow,{key:row.key,row,arg:args&&args[row.key],expandable,...common})))))))))))))},anchorBlockIdFromId=storyId=>`anchor--${storyId}`,Anchor=({storyId,children})=>react.createElement("div",{id:anchorBlockIdFromId(storyId),className:"sb-anchor"},children);globalThis&&void 0===globalThis.__DOCS_CONTEXT__&&(globalThis.__DOCS_CONTEXT__=(0,react.createContext)(null),globalThis.__DOCS_CONTEXT__.displayName="DocsContext");var DocsContext=globalThis?globalThis.__DOCS_CONTEXT__:(0,react.createContext)(null),useOf=(moduleExportOrType,validTypes)=>(0,react.useContext)(DocsContext).resolveOf(moduleExportOrType,validTypes),getComponentName=component=>{if(component)return"string"==typeof component?component.includes("-")?component.split("-").map((part=>part.charAt(0).toUpperCase()+part.slice(1))).join(""):component:component.__docgenInfo&&component.__docgenInfo.displayName?component.__docgenInfo.displayName:component.name};function extractComponentArgTypes(component,parameters){let{extractArgTypes}=parameters.docs||{};if(!extractArgTypes)throw new Error("Args unsupported. See Args documentation for your framework.");return extractArgTypes(component)}var ArgTypes=props=>{let{of}=props;if("of"in props&&void 0===of)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let resolved=useOf(of||"meta"),{argTypes,parameters,component,subcomponents}=function getArgTypesFromResolved(resolved){if("component"===resolved.type){let{component:component2,projectAnnotations:{parameters:parameters2}}=resolved;return{argTypes:extractComponentArgTypes(component2,parameters2),parameters:parameters2,component:component2}}if("meta"===resolved.type){let{preparedMeta:{argTypes:argTypes2,parameters:parameters2,component:component2,subcomponents:subcomponents2}}=resolved;return{argTypes:argTypes2,parameters:parameters2,component:component2,subcomponents:subcomponents2}}let{story:{argTypes,parameters,component,subcomponents}}=resolved;return{argTypes,parameters,component,subcomponents}}(resolved),argTypesParameters=parameters?.docs?.argTypes||{},include=props.include??argTypesParameters.include,exclude=props.exclude??argTypesParameters.exclude,sort=props.sort??argTypesParameters.sort,filteredArgTypes=(0,external_STORYBOOK_MODULE_PREVIEW_API_.filterArgTypes)(argTypes,include,exclude);if(!(subcomponents&&Object.keys(subcomponents||{}).length>0))return react.createElement(ArgsTable,{rows:filteredArgTypes,sort});let mainComponentName=getComponentName(component)||"Main",subcomponentTabs=Object.fromEntries(Object.entries(subcomponents||{}).map((([key,comp])=>[key,{rows:(0,external_STORYBOOK_MODULE_PREVIEW_API_.filterArgTypes)(extractComponentArgTypes(comp,parameters),include,exclude),sort}]))),tabs={[mainComponentName]:{rows:filteredArgTypes,sort},...subcomponentTabs};return react.createElement(TabbedArgsTable,{tabs,sort})},__create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__commonJS2=(cb,mod)=>function(){return mod||(0,cb[__getOwnPropNames(cb)[0]])((mod={exports:{}}).exports,mod),mod.exports},__toESM2=(mod,isNodeMode,target)=>(target=null!=mod?__create(__getProtoOf(mod)):{},((to,from,except,desc)=>{if(from&&"object"==typeof from||"function"==typeof from)for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to})(!isNodeMode&&mod&&mod.__esModule?target:__defProp(target,"default",{value:mod,enumerable:!0}),mod)),eventProperties=["bubbles","cancelBubble","cancelable","composed","currentTarget","defaultPrevented","eventPhase","isTrusted","returnValue","srcElement","target","timeStamp","type"],customEventSpecificProperties=["detail"];var require_es_object_atoms=__commonJS2({"node_modules/.pnpm/es-object-atoms@1.1.1/node_modules/es-object-atoms/index.js"(exports,module){module.exports=Object}}),require_es_errors=__commonJS2({"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.js"(exports,module){module.exports=Error}}),require_eval=__commonJS2({"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.js"(exports,module){module.exports=EvalError}}),require_range=__commonJS2({"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.js"(exports,module){module.exports=RangeError}}),require_ref=__commonJS2({"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.js"(exports,module){module.exports=ReferenceError}}),require_syntax=__commonJS2({"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.js"(exports,module){module.exports=SyntaxError}}),require_type=__commonJS2({"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.js"(exports,module){module.exports=TypeError}}),require_uri=__commonJS2({"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.js"(exports,module){module.exports=URIError}}),require_abs=__commonJS2({"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/abs.js"(exports,module){module.exports=Math.abs}}),require_floor=__commonJS2({"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/floor.js"(exports,module){module.exports=Math.floor}}),require_max=__commonJS2({"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/max.js"(exports,module){module.exports=Math.max}}),require_min=__commonJS2({"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/min.js"(exports,module){module.exports=Math.min}}),require_pow=__commonJS2({"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/pow.js"(exports,module){module.exports=Math.pow}}),require_round=__commonJS2({"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/round.js"(exports,module){module.exports=Math.round}}),require_isNaN=__commonJS2({"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/isNaN.js"(exports,module){module.exports=Number.isNaN||function(a2){return a2!=a2}}}),require_sign=__commonJS2({"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/sign.js"(exports,module){var $isNaN=require_isNaN();module.exports=function(number){return $isNaN(number)||0===number?number:number<0?-1:1}}}),require_gOPD=__commonJS2({"node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/gOPD.js"(exports,module){module.exports=Object.getOwnPropertyDescriptor}}),require_gopd=__commonJS2({"node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/index.js"(exports,module){var $gOPD=require_gOPD();if($gOPD)try{$gOPD([],"length")}catch{$gOPD=null}module.exports=$gOPD}}),require_es_define_property=__commonJS2({"node_modules/.pnpm/es-define-property@1.0.1/node_modules/es-define-property/index.js"(exports,module){var $defineProperty=Object.defineProperty||!1;if($defineProperty)try{$defineProperty({},"a",{value:1})}catch{$defineProperty=!1}module.exports=$defineProperty}}),require_shams=__commonJS2({"node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/shams.js"(exports,module){module.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var obj={},sym=Symbol("test"),symObj=Object(sym);if("string"==typeof sym||"[object Symbol]"!==Object.prototype.toString.call(sym)||"[object Symbol]"!==Object.prototype.toString.call(symObj))return!1;for(var _2 in obj[sym]=42,obj)return!1;if("function"==typeof Object.keys&&0!==Object.keys(obj).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(obj).length)return!1;var syms=Object.getOwnPropertySymbols(obj);if(1!==syms.length||syms[0]!==sym||!Object.prototype.propertyIsEnumerable.call(obj,sym))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var descriptor=Object.getOwnPropertyDescriptor(obj,sym);if(42!==descriptor.value||!0!==descriptor.enumerable)return!1}return!0}}}),require_has_symbols=__commonJS2({"node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/index.js"(exports,module){var origSymbol=typeof Symbol<"u"&&Symbol,hasSymbolSham=require_shams();module.exports=function(){return"function"==typeof origSymbol&&"function"==typeof Symbol&&"symbol"==typeof origSymbol("foo")&&"symbol"==typeof Symbol("bar")&&hasSymbolSham()}}}),require_Reflect_getPrototypeOf=__commonJS2({"node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Reflect.getPrototypeOf.js"(exports,module){module.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null}}),require_Object_getPrototypeOf=__commonJS2({"node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Object.getPrototypeOf.js"(exports,module){var $Object=require_es_object_atoms();module.exports=$Object.getPrototypeOf||null}}),require_implementation=__commonJS2({"node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js"(exports,module){var toStr=Object.prototype.toString,max=Math.max,concatty=function(a2,b2){for(var arr=[],i2=0;i2"u"||!getProto?undefined:getProto(Uint8Array),INTRINSICS={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?undefined:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?undefined:ArrayBuffer,"%ArrayIteratorPrototype%":hasSymbols&&getProto?getProto([][Symbol.iterator]()):undefined,"%AsyncFromSyncIteratorPrototype%":undefined,"%AsyncFunction%":needsEval,"%AsyncGenerator%":needsEval,"%AsyncGeneratorFunction%":needsEval,"%AsyncIteratorPrototype%":needsEval,"%Atomics%":typeof Atomics>"u"?undefined:Atomics,"%BigInt%":typeof BigInt>"u"?undefined:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?undefined:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?undefined:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?undefined:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":$Error,"%eval%":eval,"%EvalError%":$EvalError,"%Float16Array%":typeof Float16Array>"u"?undefined:Float16Array,"%Float32Array%":typeof Float32Array>"u"?undefined:Float32Array,"%Float64Array%":typeof Float64Array>"u"?undefined:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?undefined:FinalizationRegistry,"%Function%":$Function,"%GeneratorFunction%":needsEval,"%Int8Array%":typeof Int8Array>"u"?undefined:Int8Array,"%Int16Array%":typeof Int16Array>"u"?undefined:Int16Array,"%Int32Array%":typeof Int32Array>"u"?undefined:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":hasSymbols&&getProto?getProto(getProto([][Symbol.iterator]())):undefined,"%JSON%":"object"==typeof JSON?JSON:undefined,"%Map%":typeof Map>"u"?undefined:Map,"%MapIteratorPrototype%":typeof Map>"u"||!hasSymbols||!getProto?undefined:getProto((new Map)[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":$Object,"%Object.getOwnPropertyDescriptor%":$gOPD,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?undefined:Promise,"%Proxy%":typeof Proxy>"u"?undefined:Proxy,"%RangeError%":$RangeError,"%ReferenceError%":$ReferenceError,"%Reflect%":typeof Reflect>"u"?undefined:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?undefined:Set,"%SetIteratorPrototype%":typeof Set>"u"||!hasSymbols||!getProto?undefined:getProto((new Set)[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?undefined:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":hasSymbols&&getProto?getProto(""[Symbol.iterator]()):undefined,"%Symbol%":hasSymbols?Symbol:undefined,"%SyntaxError%":$SyntaxError,"%ThrowTypeError%":ThrowTypeError,"%TypedArray%":TypedArray,"%TypeError%":$TypeError,"%Uint8Array%":typeof Uint8Array>"u"?undefined:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?undefined:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?undefined:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?undefined:Uint32Array,"%URIError%":$URIError,"%WeakMap%":typeof WeakMap>"u"?undefined:WeakMap,"%WeakRef%":typeof WeakRef>"u"?undefined:WeakRef,"%WeakSet%":typeof WeakSet>"u"?undefined:WeakSet,"%Function.prototype.call%":$call,"%Function.prototype.apply%":$apply,"%Object.defineProperty%":$defineProperty,"%Object.getPrototypeOf%":$ObjectGPO,"%Math.abs%":abs,"%Math.floor%":floor,"%Math.max%":max,"%Math.min%":min,"%Math.pow%":pow,"%Math.round%":round,"%Math.sign%":sign,"%Reflect.getPrototypeOf%":$ReflectGPO};if(getProto)try{null.error}catch(e2){errorProto=getProto(getProto(e2)),INTRINSICS["%Error.prototype%"]=errorProto}var errorProto,doEval=function doEval2(name){var value2;if("%AsyncFunction%"===name)value2=getEvalledConstructor("async function () {}");else if("%GeneratorFunction%"===name)value2=getEvalledConstructor("function* () {}");else if("%AsyncGeneratorFunction%"===name)value2=getEvalledConstructor("async function* () {}");else if("%AsyncGenerator%"===name){var fn=doEval2("%AsyncGeneratorFunction%");fn&&(value2=fn.prototype)}else if("%AsyncIteratorPrototype%"===name){var gen=doEval2("%AsyncGenerator%");gen&&getProto&&(value2=getProto(gen.prototype))}return INTRINSICS[name]=value2,value2},LEGACY_ALIASES={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},bind=require_function_bind(),hasOwn=require_hasown(),$concat=bind.call($call,Array.prototype.concat),$spliceApply=bind.call($apply,Array.prototype.splice),$replace=bind.call($call,String.prototype.replace),$strSlice=bind.call($call,String.prototype.slice),$exec=bind.call($call,RegExp.prototype.exec),rePropName2=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,reEscapeChar2=/\\(\\)?/g,getBaseIntrinsic=function(name,allowMissing){var alias,intrinsicName=name;if(hasOwn(LEGACY_ALIASES,intrinsicName)&&(intrinsicName="%"+(alias=LEGACY_ALIASES[intrinsicName])[0]+"%"),hasOwn(INTRINSICS,intrinsicName)){var value2=INTRINSICS[intrinsicName];if(value2===needsEval&&(value2=doEval(intrinsicName)),typeof value2>"u"&&!allowMissing)throw new $TypeError("intrinsic "+name+" exists, but is not available. Please file an issue!");return{alias,name:intrinsicName,value:value2}}throw new $SyntaxError("intrinsic "+name+" does not exist!")};module.exports=function(name,allowMissing){if("string"!=typeof name||0===name.length)throw new $TypeError("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof allowMissing)throw new $TypeError('"allowMissing" argument must be a boolean');if(null===$exec(/^%?[^%]*%?$/,name))throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var parts=function(string){var first=$strSlice(string,0,1),last=$strSlice(string,-1);if("%"===first&&"%"!==last)throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");if("%"===last&&"%"!==first)throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");var result=[];return $replace(string,rePropName2,(function(match,number,quote,subString){result[result.length]=quote?$replace(subString,reEscapeChar2,"$1"):number||match})),result}(name),intrinsicBaseName=parts.length>0?parts[0]:"",intrinsic=getBaseIntrinsic("%"+intrinsicBaseName+"%",allowMissing),intrinsicRealName=intrinsic.name,value2=intrinsic.value,skipFurtherCaching=!1,alias=intrinsic.alias;alias&&(intrinsicBaseName=alias[0],$spliceApply(parts,$concat([0,1],alias)));for(var i2=1,isOwn=!0;i2=parts.length){var desc=$gOPD(value2,part);value2=(isOwn=!!desc)&&"get"in desc&&!("originalValue"in desc.get)?desc.get:value2[part]}else isOwn=hasOwn(value2,part),value2=value2[part];isOwn&&!skipFurtherCaching&&(INTRINSICS[intrinsicRealName]=value2)}}return value2}}}),require_call_bound=__commonJS2({"node_modules/.pnpm/call-bound@1.0.4/node_modules/call-bound/index.js"(exports,module){var GetIntrinsic=require_get_intrinsic(),callBindBasic=require_call_bind_apply_helpers(),$indexOf=callBindBasic([GetIntrinsic("%String.prototype.indexOf%")]);module.exports=function(name,allowMissing){var intrinsic=GetIntrinsic(name,!!allowMissing);return"function"==typeof intrinsic&&$indexOf(name,".prototype.")>-1?callBindBasic([intrinsic]):intrinsic}}}),require_shams2=__commonJS2({"node_modules/.pnpm/has-tostringtag@1.0.2/node_modules/has-tostringtag/shams.js"(exports,module){var hasSymbols=require_shams();module.exports=function(){return hasSymbols()&&!!Symbol.toStringTag}}}),require_is_regex=__commonJS2({"node_modules/.pnpm/is-regex@1.2.1/node_modules/is-regex/index.js"(exports,module){var fn,$exec,isRegexMarker,throwRegexMarker,badStringifier,$toString,callBound=require_call_bound(),hasToStringTag=require_shams2()(),hasOwn=require_hasown(),gOPD=require_gopd();hasToStringTag?($exec=callBound("RegExp.prototype.exec"),isRegexMarker={},badStringifier={toString:throwRegexMarker=function(){throw isRegexMarker},valueOf:throwRegexMarker},"symbol"==typeof Symbol.toPrimitive&&(badStringifier[Symbol.toPrimitive]=throwRegexMarker),fn=function(value2){if(!value2||"object"!=typeof value2)return!1;var descriptor=gOPD(value2,"lastIndex");if(!(descriptor&&hasOwn(descriptor,"value")))return!1;try{$exec(value2,badStringifier)}catch(e2){return e2===isRegexMarker}}):($toString=callBound("Object.prototype.toString"),fn=function(value2){return!(!value2||"object"!=typeof value2&&"function"!=typeof value2)&&"[object RegExp]"===$toString(value2)}),module.exports=fn}}),require_is_function=__commonJS2({"node_modules/.pnpm/is-function@1.0.2/node_modules/is-function/index.js"(exports,module){module.exports=function isFunction3(fn){if(!fn)return!1;var string=toString2.call(fn);return"[object Function]"===string||"function"==typeof fn&&"[object RegExp]"!==string||typeof window<"u"&&(fn===window.setTimeout||fn===window.alert||fn===window.confirm||fn===window.prompt)};var toString2=Object.prototype.toString}}),require_safe_regex_test=__commonJS2({"node_modules/.pnpm/safe-regex-test@1.1.0/node_modules/safe-regex-test/index.js"(exports,module){var callBound=require_call_bound(),isRegex=require_is_regex(),$exec=callBound("RegExp.prototype.exec"),$TypeError=require_type();module.exports=function(regex2){if(!isRegex(regex2))throw new $TypeError("`regex` must be a RegExp");return function(s2){return null!==$exec(regex2,s2)}}}}),require_is_symbol=__commonJS2({"node_modules/.pnpm/is-symbol@1.1.1/node_modules/is-symbol/index.js"(exports,module){var $symToStr,isSymString,isSymbolObject,callBound=require_call_bound(),$toString=callBound("Object.prototype.toString"),hasSymbols=require_has_symbols()(),safeRegexTest=require_safe_regex_test();hasSymbols?($symToStr=callBound("Symbol.prototype.toString"),isSymString=safeRegexTest(/^Symbol\(.*\)$/),isSymbolObject=function(value2){return"symbol"==typeof value2.valueOf()&&isSymString($symToStr(value2))},module.exports=function(value2){if("symbol"==typeof value2)return!0;if(!value2||"object"!=typeof value2||"[object Symbol]"!==$toString(value2))return!1;try{return isSymbolObject(value2)}catch{return!1}}):module.exports=function(value2){return!1}}}),import_is_regex=__toESM2(require_is_regex()),import_is_function=__toESM2(require_is_function()),import_is_symbol=__toESM2(require_is_symbol());var freeGlobal_default="object"==typeof __webpack_require__.g&&__webpack_require__.g&&__webpack_require__.g.Object===Object&&__webpack_require__.g,freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root_default=freeGlobal_default||freeSelf||Function("return this")(),Symbol_default=root_default.Symbol,objectProto=Object.prototype,blocks_hasOwnProperty=objectProto.hasOwnProperty,nativeObjectToString=objectProto.toString,symToStringTag=Symbol_default?Symbol_default.toStringTag:void 0;var getRawTag_default=function getRawTag(value2){var isOwn=blocks_hasOwnProperty.call(value2,symToStringTag),tag=value2[symToStringTag];try{value2[symToStringTag]=void 0;var unmasked=!0}catch{}var result=nativeObjectToString.call(value2);return unmasked&&(isOwn?value2[symToStringTag]=tag:delete value2[symToStringTag]),result},nativeObjectToString2=Object.prototype.toString;var objectToString_default=function objectToString(value2){return nativeObjectToString2.call(value2)},symToStringTag2=Symbol_default?Symbol_default.toStringTag:void 0;var baseGetTag_default=function baseGetTag(value2){return null==value2?void 0===value2?"[object Undefined]":"[object Null]":symToStringTag2&&symToStringTag2 in Object(value2)?getRawTag_default(value2):objectToString_default(value2)},symbolProto=Symbol_default?Symbol_default.prototype:void 0;symbolProto&&symbolProto.toString;var isObject_default=function isObject2(value2){var type=typeof value2;return null!=value2&&("object"==type||"function"==type)};var uid,isFunction_default=function isFunction(value2){if(!isObject_default(value2))return!1;var tag=baseGetTag_default(value2);return"[object Function]"==tag||"[object GeneratorFunction]"==tag||"[object AsyncFunction]"==tag||"[object Proxy]"==tag},coreJsData_default=root_default["__core-js_shared__"],maskSrcKey=(uid=/[^.]+$/.exec(coreJsData_default&&coreJsData_default.keys&&coreJsData_default.keys.IE_PROTO||""))?"Symbol(src)_1."+uid:"";var isMasked_default=function isMasked(func){return!!maskSrcKey&&maskSrcKey in func},funcToString=Function.prototype.toString;var toSource_default=function toSource(func){if(null!=func){try{return funcToString.call(func)}catch{}try{return func+""}catch{}}return""},reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto2=Function.prototype,objectProto3=Object.prototype,funcToString2=funcProto2.toString,hasOwnProperty2=objectProto3.hasOwnProperty,reIsNative=RegExp("^"+funcToString2.call(hasOwnProperty2).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var baseIsNative_default=function baseIsNative(value2){return!(!isObject_default(value2)||isMasked_default(value2))&&(isFunction_default(value2)?reIsNative:reIsHostCtor).test(toSource_default(value2))};var getValue_default=function getValue(object2,key){return object2?.[key]};var getNative_default=function getNative(object2,key){var value2=getValue_default(object2,key);return baseIsNative_default(value2)?value2:void 0};var eq_default=function eq(value2,other){return value2===other||value2!=value2&&other!=other},nativeCreate_default=getNative_default(Object,"create");var hashClear_default=function hashClear(){this.__data__=nativeCreate_default?nativeCreate_default(null):{},this.size=0};var hashDelete_default=function hashDelete(key){var result=this.has(key)&&delete this.__data__[key];return this.size-=result?1:0,result},hasOwnProperty3=Object.prototype.hasOwnProperty;var hashGet_default=function hashGet(key){var data=this.__data__;if(nativeCreate_default){var result=data[key];return"__lodash_hash_undefined__"===result?void 0:result}return hasOwnProperty3.call(data,key)?data[key]:void 0},hasOwnProperty4=Object.prototype.hasOwnProperty;var hashHas_default=function hashHas(key){var data=this.__data__;return nativeCreate_default?void 0!==data[key]:hasOwnProperty4.call(data,key)};var hashSet_default=function hashSet(key,value2){var data=this.__data__;return this.size+=this.has(key)?0:1,data[key]=nativeCreate_default&&void 0===value2?"__lodash_hash_undefined__":value2,this};function Hash(entries){var index=-1,length=null==entries?0:entries.length;for(this.clear();++index-1};var listCacheSet_default=function listCacheSet(key,value2){var data=this.__data__,index=assocIndexOf_default(data,key);return index<0?(++this.size,data.push([key,value2])):data[index][1]=value2,this};function ListCache(entries){var index=-1,length=null==entries?0:entries.length;for(this.clear();++indexvoid 0!==event[value2])).reduce(((acc,value2)=>(acc[value2]=event[value2],acc)),{});if(event instanceof CustomEvent)for(let value2 of customEventSpecificProperties.filter((value22=>void 0!==event[value22])))rebuildEvent[value2]=event[value2];return rebuildEvent}(result),wasMutated=!0),result=Object.keys(result).reduce(((acc,key)=>{try{result[key]&&result[key].toJSON,acc[key]=result[key]}catch{wasMutated=!0}return acc}),{}),wasMutated?result:data}var defaultOptions={maxDepth:10,space:void 0,allowRegExp:!0,allowDate:!0,allowError:!0,allowUndefined:!0,allowSymbol:!0},stringify=(data,options={})=>{let mergedOptions={...defaultOptions,...options};return JSON.stringify(convertUnconventionalData(data),function(options){let objects,map,stack,keys;return function(key,value2){try{if(""===key)return keys=[],objects=new Map([[value2,"[]"]]),map=new Map,stack=[],value2;let origin=map.get(this)||this;for(;stack.length&&origin!==stack[0];)stack.shift(),keys.pop();if("boolean"==typeof value2)return value2;if(void 0===value2)return options.allowUndefined?"_undefined_":void 0;if(null===value2)return null;if("number"==typeof value2)return value2===Number.NEGATIVE_INFINITY?"_-Infinity_":value2===Number.POSITIVE_INFINITY?"_Infinity_":Number.isNaN(value2)?"_NaN_":value2;if("bigint"==typeof value2)return`_bigint_${value2.toString()}`;if("string"==typeof value2)return dateFormat.test(value2)?options.allowDate?`_date_${value2}`:void 0:value2;if((0,import_is_regex.default)(value2))return options.allowRegExp?`_regexp_${value2.flags}|${value2.source}`:void 0;if((0,import_is_function.default)(value2))return;if((0,import_is_symbol.default)(value2)){if(!options.allowSymbol)return;let globalRegistryKey=Symbol.keyFor(value2);return void 0!==globalRegistryKey?`_gsymbol_${globalRegistryKey}`:`_symbol_${value2.toString().slice(7,-1)}`}if(stack.length>=options.maxDepth)return Array.isArray(value2)?`[Array(${value2.length})]`:"[Object]";if(value2===this)return`_duplicate_${JSON.stringify(keys)}`;if(value2 instanceof Error&&options.allowError)return{__isConvertedError__:!0,errorProperties:{...value2.cause?{cause:value2.cause}:{},...value2,name:value2.name,message:value2.message,stack:value2.stack,"_constructor-name_":value2.constructor.name}};if(value2?.constructor?.name&&"Object"!==value2.constructor.name&&!Array.isArray(value2)){let found2=objects.get(value2);if(!found2){let plainObject={__isClassInstance__:!0,__className__:value2.constructor.name,...Object.getOwnPropertyNames(value2).reduce(((acc,prop)=>{try{acc[prop]=value2[prop]}catch{}return acc}),{})};return keys.push(key),stack.unshift(plainObject),objects.set(value2,JSON.stringify(keys)),value2!==plainObject&&map.set(value2,plainObject),plainObject}return`_duplicate_${found2}`}let found=objects.get(value2);if(!found){let converted=Array.isArray(value2)?value2:convertUnconventionalData(value2);return keys.push(key),stack.unshift(converted),objects.set(value2,JSON.stringify(keys)),value2!==converted&&map.set(value2,converted),converted}return`_duplicate_${found}`}catch{return}}}(mergedOptions),options.space)};function argsHash(args){return stringify(args,{maxDepth:50})}var SourceContext=(0,react.createContext)({sources:{}}),SourceContainer=({children,channel})=>{let[sources,setSources]=(0,react.useState)({});return(0,react.useEffect)((()=>{let handleSnippetRendered=(idOrEvent,inputSource=null,inputFormat=!1)=>{let{id,args,source,format:format3}="string"==typeof idOrEvent?{id:idOrEvent,source:inputSource,format:inputFormat}:idOrEvent,hash=args?argsHash(args):"--unknown--";setSources((current=>({...current,[id]:{...current[id],[hash]:{code:source||"",format:format3}}})))};return channel.on(docs_tools.Op,handleSnippetRendered),()=>channel.off(docs_tools.Op,handleSnippetRendered)}),[]),react.createElement(SourceContext.Provider,{value:{sources}},children)};var useCode=({snippet,storyContext,typeFromProps,transformFromProps})=>{let parameters=storyContext.parameters??{},{__isArgsStory:isArgsStory}=parameters,sourceParameters=parameters.docs?.source||{},type=typeFromProps||sourceParameters.type||docs_tools.Y1.AUTO,code=type===docs_tools.Y1.DYNAMIC||type===docs_tools.Y1.AUTO&&snippet&&isArgsStory?snippet:sourceParameters.originalSource||"",transformer=transformFromProps??sourceParameters.transform,transformedCode=transformer?function useTransformCode(source,transform,storyContext){let[transformedCode,setTransformedCode]=(0,react.useState)("Transforming..."),transformed=transform?transform?.(source,storyContext):source;return(0,react.useEffect)((()=>{!async function getTransformedCode(){let transformResult=await transformed;transformResult!==transformedCode&&setTransformedCode(transformResult)}()})),"object"==typeof transformed&&"function"==typeof transformed.then?transformedCode:transformed}(code,transformer,storyContext):code;return void 0!==sourceParameters.code?sourceParameters.code:transformedCode},useSourceProps=(props,docsContext,sourceContext)=>{let{of}=props,story=(0,react.useMemo)((()=>{if(of)return docsContext.resolveOf(of,["story"]).story;try{return docsContext.storyById()}catch{}}),[docsContext,of]),storyContext=story?docsContext.getStoryContext(story):{},argsForSource=props.__forceInitialArgs?storyContext.initialArgs:storyContext.unmappedArgs,source=story?((storyId,args,sourceContext)=>{let{sources}=sourceContext,sourceMap=sources?.[storyId];return sourceMap?.[argsHash(args)]||sourceMap?.["--unknown--"]||{code:""}})(story.id,argsForSource,sourceContext):null,transformedCode=useCode({snippet:source?source.code:"",storyContext:{...storyContext,args:argsForSource},typeFromProps:props.type,transformFromProps:props.transform});if("of"in props&&void 0===of)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let sourceParameters=story?.parameters?.docs?.source||{},format3=props.format,language=props.language??sourceParameters.language??"jsx",dark=props.dark??sourceParameters.dark??!1;return props.code||story?props.code?{code:props.code,format:format3,language,dark}:(format3=source?.format??!0,{code:transformedCode,format:format3,language,dark}):{error:"Oh no! The source is not available."}};function useStory(storyId,context){let stories=function useStories(storyIds,context){let[storiesById,setStories]=(0,react.useState)({});return(0,react.useEffect)((()=>{Promise.all(storyIds.map((async storyId=>{let story=await context.loadStory(storyId);setStories((current=>current[storyId]===story?current:{...current,[storyId]:story}))})))})),storyIds.map((storyId=>{if(storiesById[storyId])return storiesById[storyId];try{return context.storyById(storyId)}catch{return}}))}([storyId],context);return stories&&stories[0]}var Story2=(props={__forceInitialArgs:!1,__primary:!1})=>{let context=(0,react.useContext)(DocsContext),storyId=((props,context)=>{let{of,meta}=props;if("of"in props&&void 0===of)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");return meta&&context.referenceMeta(meta,!1),context.resolveOf(of||"story",["story"]).story.id})(props,context),story=useStory(storyId,context);if(!story)return react.createElement(StorySkeleton,null);let storyProps=((props,story,context)=>{let{parameters={}}=story||{},{docs={}}=parameters,storyParameters=docs.story||{};if(docs.disable)return null;if(props.inline??storyParameters.inline)return{story,inline:!0,height:props.height??storyParameters.height,autoplay:props.autoplay??storyParameters.autoplay??!1,forceInitialArgs:!!props.__forceInitialArgs,primary:!!props.__primary,renderStoryToElement:context.renderStoryToElement};return{story,inline:!1,height:props.height??storyParameters.height??storyParameters.iframeHeight??"100px",primary:!!props.__primary}})(props,story,context);return storyProps?react.createElement(Story,{...storyProps}):null},Canvas=props=>{let docsContext=(0,react.useContext)(DocsContext),sourceContext=(0,react.useContext)(SourceContext),{of,source}=props;if("of"in props&&void 0===of)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let{story}=useOf(of||"story",["story"]),sourceProps=useSourceProps({...source,...of&&{of}},docsContext,sourceContext),layout=props.layout??story.parameters.layout??story.parameters.docs?.canvas?.layout??"padded",withToolbar=props.withToolbar??story.parameters.docs?.canvas?.withToolbar??!1,additionalActions=props.additionalActions??story.parameters.docs?.canvas?.additionalActions,sourceState=props.sourceState??story.parameters.docs?.canvas?.sourceState??"hidden",className=props.className??story.parameters.docs?.canvas?.className,inline=props.story?.inline??story.parameters?.docs?.story?.inline??!1;return react.createElement(Preview,{withSource:"none"===sourceState?void 0:sourceProps,isExpanded:"shown"===sourceState,withToolbar,additionalActions,className,layout,inline},react.createElement(Story2,{of:of||story.moduleExport,meta:props.meta,...props.story}))},useArgsIfDefined=(story,context)=>{let storyContext=story?context.getStoryContext(story):{args:{}},{id:storyId}=story||{id:"none"},[args,setArgs]=(0,react.useState)(storyContext.args);(0,react.useEffect)((()=>{let onArgsUpdated=changed=>{changed.storyId===storyId&&setArgs(changed.args)};return context.channel.on(external_STORYBOOK_MODULE_CORE_EVENTS_.STORY_ARGS_UPDATED,onArgsUpdated),()=>context.channel.off(external_STORYBOOK_MODULE_CORE_EVENTS_.STORY_ARGS_UPDATED,onArgsUpdated)}),[storyId,context.channel]);let updateArgs=(0,react.useCallback)((updatedArgs=>context.channel.emit(external_STORYBOOK_MODULE_CORE_EVENTS_.UPDATE_STORY_ARGS,{storyId,updatedArgs})),[storyId,context.channel]),resetArgs=(0,react.useCallback)((argNames=>context.channel.emit(external_STORYBOOK_MODULE_CORE_EVENTS_.RESET_STORY_ARGS,{storyId,argNames})),[storyId,context.channel]);return story&&[args,updateArgs,resetArgs]};function extractComponentArgTypes2(component,parameters){let{extractArgTypes}=parameters.docs||{};if(!extractArgTypes)throw new Error("Args unsupported. See Args documentation for your framework.");return extractArgTypes(component)}var Controls3=props=>{let{of}=props;if("of"in props&&void 0===of)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let context=(0,react.useContext)(DocsContext),{story}=context.resolveOf(of||"story",["story"]),{parameters,argTypes,component,subcomponents}=story,controlsParameters=parameters.docs?.controls||{},include=props.include??controlsParameters.include,exclude=props.exclude??controlsParameters.exclude,sort=props.sort??controlsParameters.sort,[args,updateArgs,resetArgs]=((story,context)=>{let result=useArgsIfDefined(story,context);if(!result)throw new Error("No result when story was defined");return result})(story,context),[globals]=((story,context)=>{let storyContext=context.getStoryContext(story),[globals,setGlobals]=(0,react.useState)(storyContext.globals);return(0,react.useEffect)((()=>{let onGlobalsUpdated=changed=>{setGlobals(changed.globals)};return context.channel.on(external_STORYBOOK_MODULE_CORE_EVENTS_.GLOBALS_UPDATED,onGlobalsUpdated),()=>context.channel.off(external_STORYBOOK_MODULE_CORE_EVENTS_.GLOBALS_UPDATED,onGlobalsUpdated)}),[context.channel]),[globals]})(story,context),filteredArgTypes=(0,external_STORYBOOK_MODULE_PREVIEW_API_.filterArgTypes)(argTypes,include,exclude);if(!(subcomponents&&Object.keys(subcomponents||{}).length>0))return Object.keys(filteredArgTypes).length>0||Object.keys(args).length>0?react.createElement(ArgsTable,{rows:filteredArgTypes,sort,args,globals,updateArgs,resetArgs}):null;let mainComponentName=getComponentName(component)||"Story",subcomponentTabs=Object.fromEntries(Object.entries(subcomponents||{}).map((([key,comp])=>[key,{rows:(0,external_STORYBOOK_MODULE_PREVIEW_API_.filterArgTypes)(extractComponentArgTypes2(comp,parameters),include,exclude),sort}]))),tabs={[mainComponentName]:{rows:filteredArgTypes,sort},...subcomponentTabs};return react.createElement(TabbedArgsTable,{tabs,sort,args,globals,updateArgs,resetArgs})},{document:document2}=globalThis,CodeOrSourceMdx=({className,children,...rest})=>{if("string"!=typeof className&&("string"!=typeof children||!children.match(/[\n\r]/g)))return react.createElement(components.Cy,null,children);let language=className&&className.split("-");return react.createElement(Source,{language:language&&language[1]||"text",format:!1,code:children,...rest})};function blocks_navigate(context,url){context.channel.emit(external_STORYBOOK_MODULE_CORE_EVENTS_.NAVIGATE_URL,url)}var DescriptionType2,A2=components.dK.a,AnchorInPage=({hash,children})=>{let context=(0,react.useContext)(DocsContext);return react.createElement(A2,{href:hash,target:"_self",onClick:event=>{let id=hash.substring(1);document2.getElementById(id)&&blocks_navigate(context,hash)}},children)},AnchorMdx=props=>{let{href,target,children,...rest}=props,context=(0,react.useContext)(DocsContext);return!href||"_blank"===target||/^https?:\/\//.test(href)?react.createElement(A2,{...props}):href.startsWith("#")?react.createElement(AnchorInPage,{hash:href},children):react.createElement(A2,{href,onClick:event=>{0===event.button&&!event.altKey&&!event.ctrlKey&&!event.metaKey&&!event.shiftKey&&(event.preventDefault(),blocks_navigate(context,event.currentTarget.getAttribute("href")||""))},target,...rest},children)},SUPPORTED_MDX_HEADERS=["h1","h2","h3","h4","h5","h6"],OcticonHeaders=SUPPORTED_MDX_HEADERS.reduce(((acc,headerType)=>({...acc,[headerType]:(0,theming.I4)(headerType)({"& svg":{position:"relative",top:"-0.1em",visibility:"hidden"},"&:hover svg":{visibility:"visible"}})})),{}),OcticonAnchor=theming.I4.a((()=>({float:"left",lineHeight:"inherit",paddingRight:"10px",marginLeft:"-24px",color:"inherit"}))),HeaderWithOcticonAnchor=({as,id,children,...rest})=>{let context=(0,react.useContext)(DocsContext),OcticonHeader=OcticonHeaders[as],hash=`#${id}`;return react.createElement(OcticonHeader,{id,...rest},react.createElement(OcticonAnchor,{"aria-hidden":"true",href:hash,tabIndex:-1,target:"_self",onClick:event=>{document2.getElementById(id)&&blocks_navigate(context,hash)}},react.createElement(dist.qYV,null)),children)},HeaderMdx=props=>{let{as,id,children,...rest}=props;if(id)return react.createElement(HeaderWithOcticonAnchor,{as,id,...rest},children);let Component4=as,{as:omittedAs,...withoutAs}=props;return react.createElement(Component4,{...(0,components.mc)(withoutAs,as)})},HeadersMdx=SUPPORTED_MDX_HEADERS.reduce(((acc,headerType)=>({...acc,[headerType]:props=>react.createElement(HeaderMdx,{as:headerType,...props})})),{}),Markdown=props=>{if(!props.children)return null;if("string"!=typeof props.children)throw new Error(dedent`The Markdown block only accepts children as a single string, but children were of type: '${typeof props.children}' + This is often caused by not wrapping the child in a template string. + + This is invalid: + + # Some heading + A paragraph + + + Instead do: + + {\` + # Some heading + A paragraph + \`} + + `);return react.createElement(index_modern_default,{...props,options:{forceBlock:!0,overrides:{code:CodeOrSourceMdx,a:AnchorMdx,...HeadersMdx,...props?.options?.overrides},...props?.options}})},DescriptionType=((DescriptionType2=DescriptionType||{}).INFO="info",DescriptionType2.NOTES="notes",DescriptionType2.DOCGEN="docgen",DescriptionType2.AUTO="auto",DescriptionType2),DescriptionContainer=props=>{let{of}=props;if("of"in props&&void 0===of)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let markdown=(resolvedOf=>{switch(resolvedOf.type){case"story":return resolvedOf.story.parameters.docs?.description?.story||null;case"meta":{let{parameters,component}=resolvedOf.preparedMeta,metaDescription=parameters.docs?.description?.component;return metaDescription||parameters.docs?.extractComponentDescription?.(component,{component,parameters})||null}case"component":{let{component,projectAnnotations:{parameters}}=resolvedOf;return parameters?.docs?.extractComponentDescription?.(component,{component,parameters})||null}default:throw new Error(`Unrecognized module type resolved from 'useOf', got: ${resolvedOf.type}`)}})(useOf(of||"meta"));return markdown?react.createElement(Markdown,null,markdown):null},{document:document3,window:globalWindow3}=globalThis,DocsContainer=({context,theme,children})=>{let toc;try{toc=context.resolveOf("meta",["meta"]).preparedMeta.parameters?.docs?.toc}catch{toc=context?.projectAnnotations?.parameters?.docs?.toc}return(0,react.useEffect)((()=>{let url;try{if(url=new URL(globalWindow3.parent.location.toString()),url.hash){let element=document3.getElementById(decodeURIComponent(url.hash.substring(1)));element&&setTimeout((()=>{!function scrollToElement(element,block="start"){element.scrollIntoView({behavior:"smooth",block,inline:"nearest"})}(element)}),200)}}catch{}})),react.createElement(DocsContext.Provider,{value:context},react.createElement(SourceContainer,{channel:context.channel},react.createElement(theming.NP,{theme:(0,theming.D8)(theme)},react.createElement(DocsPageWrapper,{toc:toc?react.createElement(TableOfContents,{className:"sbdocs sbdocs-toc--custom",channel:context.channel,...toc}):null},children))))},regex=/[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g,own=Object.hasOwnProperty;var slugs=new class{constructor(){this.occurrences,this.reset()}slug(value2,maintainCase){let self2=this,result=function slug(value2,maintainCase){return"string"!=typeof value2?"":(maintainCase||(value2=value2.toLowerCase()),value2.replace(regex,"").replace(/ /g,"-"))}(value2,!0===maintainCase),originalSlug=result;for(;own.call(self2.occurrences,result);)self2.occurrences[originalSlug]++,result=originalSlug+"-"+self2.occurrences[originalSlug];return self2.occurrences[result]=0,result}reset(){this.occurrences=Object.create(null)}},Subheading=({children,disableAnchor})=>{if(disableAnchor||"string"!=typeof children)return react.createElement(components.H3,null,children);let tagID=slugs.slug(children.toLowerCase());return react.createElement(HeaderMdx,{as:"h3",id:tagID},children)},DocsStory=({of,expanded=!0,withToolbar:withToolbarProp=!1,__forceInitialArgs=!1,__primary=!1})=>{let{story}=useOf(of||"story",["story"]),withToolbar=story.parameters.docs?.canvas?.withToolbar??withToolbarProp;return react.createElement(Anchor,{storyId:story.id},expanded&&react.createElement(react.Fragment,null,react.createElement(Subheading,null,story.name),react.createElement(DescriptionContainer,{of})),react.createElement(Canvas,{of,withToolbar,story:{__forceInitialArgs,__primary},source:{__forceInitialArgs}}))},Primary=props=>{let{of}=props;if("of"in props&&void 0===of)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let{csfFile}=useOf(of||"meta",["meta"]),primaryStory=(0,react.useContext)(DocsContext).componentStoriesFromCSFFile(csfFile)[0];return primaryStory?react.createElement(DocsStory,{of:primaryStory.moduleExport,expanded:!1,__primary:!0,withToolbar:!0}):null},StyledHeading=(0,theming.I4)((({children,disableAnchor,...props})=>{if(disableAnchor||"string"!=typeof children)return react.createElement(components.H2,null,children);let tagID=slugs.slug(children.toLowerCase());return react.createElement(HeaderMdx,{as:"h2",id:tagID,...props},children)}))((({theme})=>({fontSize:theme.typography.size.s2-1+"px",fontWeight:theme.typography.weight.bold,lineHeight:"16px",letterSpacing:"0.35em",textTransform:"uppercase",color:theme.textMutedColor,border:0,marginBottom:"12px","&:first-of-type":{marginTop:"56px"}}))),Stories=({title="Stories",includePrimary=!0})=>{let{componentStories,projectAnnotations,getStoryContext}=(0,react.useContext)(DocsContext),stories=componentStories(),{stories:{filter}={filter:void 0}}=projectAnnotations.parameters?.docs||{};return filter&&(stories=stories.filter((story=>filter(story,getStoryContext(story))))),stories.some((story=>story.tags?.includes("autodocs")))&&(stories=stories.filter((story=>story.tags?.includes("autodocs")&&!story.usesMount))),includePrimary||(stories=stories.slice(1)),stories&&0!==stories.length?react.createElement(react.Fragment,null,"string"==typeof title?react.createElement(StyledHeading,null,title):title,stories.map((story=>story&&react.createElement(DocsStory,{key:story.id,of:story.moduleExport,expanded:!0,__forceInitialArgs:!0})))):null},Subtitle2=props=>{let preparedMeta,{of,children}=props;if("of"in props&&void 0===of)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");try{preparedMeta=useOf(of||"meta",["meta"]).preparedMeta}catch(error){if(children&&!error.message.includes("did you forget to use ?"))throw error}let{componentSubtitle,docs}=preparedMeta?.parameters||{};componentSubtitle&&(0,external_STORYBOOK_MODULE_CLIENT_LOGGER_.deprecate)("Using 'parameters.componentSubtitle' property to subtitle stories is deprecated. See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#subtitle-block-and-parameterscomponentsubtitle");let content=children||docs?.subtitle||componentSubtitle;return content?react.createElement(Subtitle,{className:"sbdocs-subtitle sb-unstyled"},content):null},STORY_KIND_PATH_SEPARATOR=/\s*\/\s*/,Title3=props=>{let preparedMeta,{children,of}=props;if("of"in props&&void 0===of)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");try{preparedMeta=useOf(of||"meta",["meta"]).preparedMeta}catch(error){if(children&&error instanceof Error&&!error.message.includes("did you forget to use ?"))throw error}let content=children||(title=>{let groups=title.trim().split(STORY_KIND_PATH_SEPARATOR);return groups?.[groups?.length-1]||title})(preparedMeta?.title||"");return content?react.createElement(Title,{className:"sbdocs-title sb-unstyled"},content):null},DocsPage=()=>{let resolvedOf=useOf("meta",["meta"]),{stories}=resolvedOf.csfFile,isSingleStory=1===Object.keys(stories).length;return react.createElement(react.Fragment,null,react.createElement(Title3,null),react.createElement(Subtitle2,null),react.createElement(DescriptionContainer,{of:"meta"}),isSingleStory?react.createElement(DescriptionContainer,{of:"story"}):null,react.createElement(Primary,null),react.createElement(Controls3,null),isSingleStory?null:react.createElement(Stories,null))};function Docs({context,docsParameter}){let Container2=docsParameter.container||DocsContainer,Page=docsParameter.page||DocsPage;return react.createElement(Container2,{context,theme:docsParameter.theme},react.createElement(Page,null))}var ExternalDocsContext=class extends external_STORYBOOK_MODULE_PREVIEW_API_.DocsContext{constructor(channel,store,renderStoryToElement,processMetaExports){super(channel,store,renderStoryToElement,[]),this.channel=channel,this.store=store,this.renderStoryToElement=renderStoryToElement,this.processMetaExports=processMetaExports,this.referenceMeta=(metaExports,attach)=>{let csfFile=this.processMetaExports(metaExports);this.referenceCSFFile(csfFile),super.referenceMeta(metaExports,attach)}}},ConstantMap=class{constructor(prefix){this.prefix=prefix,this.entries=new Map}get(key){return this.entries.has(key)||this.entries.set(key,`${this.prefix}${this.entries.size}`),this.entries.get(key)}};external_STORYBOOK_MODULE_PREVIEW_API_.Preview},"./node_modules/@storybook/addon-docs/dist/chunk-QUZPS4B6.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{P$:()=>__commonJS,f1:()=>__toESM,ki:()=>__require});var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__require=__webpack_require__("./node_modules/@storybook/addon-docs/dist sync recursive"),__commonJS=(cb,mod)=>function(){return mod||(0,cb[__getOwnPropNames(cb)[0]])((mod={exports:{}}).exports,mod),mod.exports},__toESM=(mod,isNodeMode,target)=>(target=null!=mod?__create(__getProtoOf(mod)):{},((to,from,except,desc)=>{if(from&&"object"==typeof from||"function"==typeof from)for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to})(!isNodeMode&&mod&&mod.__esModule?target:__defProp(target,"default",{value:mod,enumerable:!0}),mod))},"./node_modules/@storybook/addon-docs/dist/chunk-SPFYY5GD.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function debounce(func,debounceMs,{signal,edges}={}){let pendingThis,pendingArgs=null,leading=null!=edges&&edges.includes("leading"),trailing=null==edges||edges.includes("trailing"),invoke=()=>{null!==pendingArgs&&(func.apply(pendingThis,pendingArgs),pendingThis=void 0,pendingArgs=null)},timeoutId=null,schedule=()=>{null!=timeoutId&&clearTimeout(timeoutId),timeoutId=setTimeout((()=>{timeoutId=null,trailing&&invoke(),cancel()}),debounceMs)},cancelTimer=()=>{null!==timeoutId&&(clearTimeout(timeoutId),timeoutId=null)},cancel=()=>{cancelTimer(),pendingThis=void 0,pendingArgs=null},debounced=function(...args){if(signal?.aborted)return;pendingThis=this,pendingArgs=args;let isFirstCall=null==timeoutId;schedule(),leading&&isFirstCall&&invoke()};return debounced.schedule=schedule,debounced.cancel=cancel,debounced.flush=()=>{cancelTimer(),invoke()},signal?.addEventListener("abort",cancel,{once:!0}),debounced}function debounce2(func,debounceMs=0,options={}){"object"!=typeof options&&(options={});let{signal,leading=!1,trailing=!0,maxWait}=options,edges=Array(2);leading&&(edges[0]="leading"),trailing&&(edges[1]="trailing");let result,pendingAt=null,_debounced=debounce((function(...args){result=func.apply(this,args),pendingAt=null}),debounceMs,{signal,edges}),debounced=function(...args){if(null!=maxWait)if(null===pendingAt)pendingAt=Date.now();else if(Date.now()-pendingAt>=maxWait)return result=func.apply(this,args),pendingAt=Date.now(),_debounced.cancel(),_debounced.schedule(),result;return _debounced.apply(this,args),result};return debounced.cancel=_debounced.cancel,debounced.flush=()=>(_debounced.flush(),result),debounced}function isSymbol(value){return"symbol"==typeof value||value instanceof Symbol}function toFinite(value){return value?(value=function toNumber(value){return isSymbol(value)?NaN:Number(value)}(value))===1/0||value===-1/0?(value<0?-1:1)*Number.MAX_VALUE:value==value?value:0:0===value?value:0}function isTypedArray(x){return ArrayBuffer.isView(x)&&!(x instanceof DataView)}function getSymbols(object){return Object.getOwnPropertySymbols(object).filter((symbol=>Object.prototype.propertyIsEnumerable.call(object,symbol)))}__webpack_require__.d(__webpack_exports__,{Yq:()=>getControlSetterButtonId,ZA:()=>getControlId,fN:()=>pickBy,mg:()=>cloneDeep,sb:()=>uniq2,sg:()=>debounce2});var regexpTag="[object RegExp]",stringTag="[object String]",numberTag="[object Number]",booleanTag="[object Boolean]",argumentsTag="[object Arguments]",symbolTag="[object Symbol]",dateTag="[object Date]",mapTag="[object Map]",setTag="[object Set]",arrayTag="[object Array]",arrayBufferTag="[object ArrayBuffer]",objectTag="[object Object]",dataViewTag="[object DataView]",uint8ArrayTag="[object Uint8Array]",uint8ClampedArrayTag="[object Uint8ClampedArray]",uint16ArrayTag="[object Uint16Array]",uint32ArrayTag="[object Uint32Array]",int8ArrayTag="[object Int8Array]",int16ArrayTag="[object Int16Array]",int32ArrayTag="[object Int32Array]",float32ArrayTag="[object Float32Array]",float64ArrayTag="[object Float64Array]";function cloneDeepWithImpl(valueToClone,keyToClone,objectToClone,stack=new Map,cloneValue=void 0){let cloned=cloneValue?.(valueToClone,keyToClone,objectToClone,stack);if(null!=cloned)return cloned;if(function isPrimitive(value){return null==value||"object"!=typeof value&&"function"!=typeof value}(valueToClone))return valueToClone;if(stack.has(valueToClone))return stack.get(valueToClone);if(Array.isArray(valueToClone)){let result=new Array(valueToClone.length);stack.set(valueToClone,result);for(let i=0;i=0}(value.length)}function cloneDeepWith2(obj,cloneValue){return function cloneDeepWith(obj,cloneValue){return cloneDeepWithImpl(obj,void 0,obj,new Map,cloneValue)}(obj,((value,key,object,stack)=>{let cloned=cloneValue?.(value,key,object,stack);if(null!=cloned)return cloned;if("object"==typeof obj)switch(Object.prototype.toString.call(obj)){case numberTag:case stringTag:case booleanTag:{let result=new obj.constructor(obj?.valueOf());return copyProperties(result,obj),result}case argumentsTag:{let result={};return copyProperties(result,obj),result.length=obj.length,result[Symbol.iterator]=obj[Symbol.iterator],result}default:return}}))}function cloneDeep(obj){return cloneDeepWith2(obj)}function uniq2(arr){return isArrayLike(arr)?function uniq(arr){return Array.from(new Set(arr))}(Array.from(arr)):[]}function times(n,getValue){if((n=function toInteger(value){let finite=toFinite(value),remainder=finite%1;return remainder?finite-remainder:finite}(n))<1||!Number.isSafeInteger(n))return[];let result=new Array(n);for(let i=0;i`${index}`)),filteredKeys=new Set(indices);return function isBuffer(x){return typeof Buffer<"u"&&Buffer.isBuffer(x)}(object)&&(filteredKeys.add("offset"),filteredKeys.add("parent")),function isTypedArray2(x){return isTypedArray(x)}(object)&&(filteredKeys.add("buffer"),filteredKeys.add("byteLength"),filteredKeys.add("byteOffset")),[...indices,...keysInImpl(object).filter((key=>!filteredKeys.has(key)))]}(object):function isPrototype(value){let constructor=value?.constructor;return value===("function"==typeof constructor?constructor.prototype:Object.prototype)}(object)?function prototypeKeysIn(object){return keysInImpl(object).filter((key=>"constructor"!==key))}(object):keysInImpl(object);default:return keysInImpl(Object(object))}}function keysInImpl(object){let result=[];for(let key in object)result.push(key);return result}function getSymbolsIn(object){let result=[];for(;object;)result.push(...getSymbols(object)),object=Object.getPrototypeOf(object);return result}function pickBy(obj,shouldPick){if(null==obj)return{};let result={};if(null==shouldPick)return obj;let keys=isArrayLike(obj)?function range(start,end,step=1){if(null==end&&(end=start,start=0),!Number.isInteger(step)||0===step)throw new Error("The step value must be a non-zero integer.");let length=Math.max(Math.ceil((end-start)/step),0),result=new Array(length);for(let i=0;i`control-${value.replace(/\s+/g,"-")}`,getControlSetterButtonId=value=>`set-${value.replace(/\s+/g,"-")}`},"./node_modules/@storybook/addon-docs/dist/preview.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{parameters:()=>parameters});var excludeTags=Object.entries(globalThis.TAGS_OPTIONS??{}).reduce(((acc,entry)=>{let[tag,option]=entry;return option.excludeFromDocsStories&&(acc[tag]=!0),acc}),{}),parameters={docs:{renderer:async()=>{let{DocsRenderer}=await Promise.all([__webpack_require__.e(735),__webpack_require__.e(161)]).then(__webpack_require__.bind(__webpack_require__,"./node_modules/@storybook/addon-docs/dist/DocsRenderer-PQXLIZUC.mjs"));return new DocsRenderer},stories:{filter:story=>0===(story.tags||[]).filter((tag=>excludeTags[tag])).length&&!story.parameters.docs?.disable}}}},"./node_modules/@storybook/addon-docs/node_modules/@storybook/icons/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{D3D:()=>ChevronDownIcon,LoD:()=>ZoomOutIcon,PU:()=>ZoomIcon,QDE:()=>MarkupIcon,Qpb:()=>SubtractIcon,REV:()=>AddIcon,abt:()=>ChevronSmallDownIcon,bMW:()=>EyeIcon,dbI:()=>EyeCloseIcon,ejX:()=>UndoIcon,pyG:()=>DocumentIcon,qYV:()=>LinkIcon,tN5:()=>ChevronSmallUpIcon,vKP:()=>ChevronRightIcon,wV5:()=>ZoomResetIcon});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),ZoomIcon=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((({color="currentColor",size=14,...props},forwardedRef)=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg",{width:size,height:size,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:forwardedRef,...props},react__WEBPACK_IMPORTED_MODULE_0__.createElement("path",{d:"M6 3.5a.5.5 0 01.5.5v1.5H8a.5.5 0 010 1H6.5V8a.5.5 0 01-1 0V6.5H4a.5.5 0 010-1h1.5V4a.5.5 0 01.5-.5z",fill:color}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.544 10.206a5.5 5.5 0 11.662-.662.5.5 0 01.148.102l3 3a.5.5 0 01-.708.708l-3-3a.5.5 0 01-.102-.148zM10.5 6a4.5 4.5 0 11-9 0 4.5 4.5 0 019 0z",fill:color})))),ZoomOutIcon=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((({color="currentColor",size=14,...props},forwardedRef)=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg",{width:size,height:size,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:forwardedRef,...props},react__WEBPACK_IMPORTED_MODULE_0__.createElement("path",{d:"M4 5.5a.5.5 0 000 1h4a.5.5 0 000-1H4z",fill:color}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 11.5c1.35 0 2.587-.487 3.544-1.294a.5.5 0 00.102.148l3 3a.5.5 0 00.708-.708l-3-3a.5.5 0 00-.148-.102A5.5 5.5 0 106 11.5zm0-1a4.5 4.5 0 100-9 4.5 4.5 0 000 9z",fill:color})))),ZoomResetIcon=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((({color="currentColor",size=14,...props},forwardedRef)=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg",{width:size,height:size,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:forwardedRef,...props},react__WEBPACK_IMPORTED_MODULE_0__.createElement("path",{d:"M1.5 2.837V1.5a.5.5 0 00-1 0V4a.5.5 0 00.5.5h2.5a.5.5 0 000-1H2.258a4.5 4.5 0 11-.496 4.016.5.5 0 10-.942.337 5.502 5.502 0 008.724 2.353.5.5 0 00.102.148l3 3a.5.5 0 00.708-.708l-3-3a.5.5 0 00-.148-.102A5.5 5.5 0 101.5 2.837z",fill:color})))),EyeIcon=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((({color="currentColor",size=14,...props},forwardedRef)=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg",{width:size,height:size,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:forwardedRef,...props},react__WEBPACK_IMPORTED_MODULE_0__.createElement("path",{d:"M7 9.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5z",fill:color}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14 7l-.21.293C13.669 7.465 10.739 11.5 7 11.5S.332 7.465.21 7.293L0 7l.21-.293C.331 6.536 3.261 2.5 7 2.5s6.668 4.036 6.79 4.207L14 7zM2.896 5.302A12.725 12.725 0 001.245 7c.296.37.874 1.04 1.65 1.698C4.043 9.67 5.482 10.5 7 10.5c1.518 0 2.958-.83 4.104-1.802A12.72 12.72 0 0012.755 7c-.297-.37-.875-1.04-1.65-1.698C9.957 4.33 8.517 3.5 7 3.5c-1.519 0-2.958.83-4.104 1.802z",fill:color})))),EyeCloseIcon=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((({color="currentColor",size=14,...props},forwardedRef)=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg",{width:size,height:size,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:forwardedRef,...props},react__WEBPACK_IMPORTED_MODULE_0__.createElement("path",{d:"M1.854 1.146a.5.5 0 10-.708.708l11 11a.5.5 0 00.708-.708l-11-11zM11.104 8.698c-.177.15-.362.298-.553.439l.714.714a13.25 13.25 0 002.526-2.558L14 7l-.21-.293C13.669 6.536 10.739 2.5 7 2.5c-.89 0-1.735.229-2.506.58l.764.763A4.859 4.859 0 017 3.5c1.518 0 2.958.83 4.104 1.802A12.724 12.724 0 0112.755 7a12.72 12.72 0 01-1.65 1.698zM.21 6.707c.069-.096 1.03-1.42 2.525-2.558l.714.714c-.191.141-.376.288-.553.439A12.725 12.725 0 001.245 7c.296.37.874 1.04 1.65 1.698C4.043 9.67 5.482 10.5 7 10.5a4.86 4.86 0 001.742-.344l.764.764c-.772.351-1.616.58-2.506.58C3.262 11.5.332 7.465.21 7.293L0 7l.21-.293z",fill:color}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("path",{d:"M4.5 7c0-.322.061-.63.172-.914l3.242 3.242A2.5 2.5 0 014.5 7zM9.328 7.914L6.086 4.672a2.5 2.5 0 013.241 3.241z",fill:color})))),DocumentIcon=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((({color="currentColor",size=14,...props},forwardedRef)=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg",{width:size,height:size,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:forwardedRef,...props},react__WEBPACK_IMPORTED_MODULE_0__.createElement("path",{d:"M4 5.5a.5.5 0 01.5-.5h5a.5.5 0 010 1h-5a.5.5 0 01-.5-.5zM4.5 7.5a.5.5 0 000 1h5a.5.5 0 000-1h-5zM4 10.5a.5.5 0 01.5-.5h5a.5.5 0 010 1h-5a.5.5 0 01-.5-.5z",fill:color}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.5 0a.5.5 0 00-.5.5v13a.5.5 0 00.5.5h11a.5.5 0 00.5-.5V3.207a.5.5 0 00-.146-.353L10.146.146A.5.5 0 009.793 0H1.5zM2 1h7.5v2a.5.5 0 00.5.5h2V13H2V1z",fill:color})))),MarkupIcon=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((({color="currentColor",size=14,...props},forwardedRef)=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg",{width:size,height:size,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:forwardedRef,...props},react__WEBPACK_IMPORTED_MODULE_0__.createElement("path",{d:"M8.982 1.632a.5.5 0 00-.964-.263l-3 11a.5.5 0 10.964.263l3-11zM3.32 3.616a.5.5 0 01.064.704L1.151 7l2.233 2.68a.5.5 0 11-.768.64l-2.5-3a.5.5 0 010-.64l2.5-3a.5.5 0 01.704-.064zM10.68 3.616a.5.5 0 00-.064.704L12.849 7l-2.233 2.68a.5.5 0 00.768.64l2.5-3a.5.5 0 000-.64l-2.5-3a.5.5 0 00-.704-.064z",fill:color})))),AddIcon=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((({color="currentColor",size=14,...props},forwardedRef)=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg",{width:size,height:size,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:forwardedRef,...props},react__WEBPACK_IMPORTED_MODULE_0__.createElement("path",{d:"M7 3a.5.5 0 01.5.5v3h3a.5.5 0 010 1h-3v3a.5.5 0 01-1 0v-3h-3a.5.5 0 010-1h3v-3A.5.5 0 017 3z",fill:color}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 14A7 7 0 107 0a7 7 0 000 14zm0-1A6 6 0 107 1a6 6 0 000 12z",fill:color})))),SubtractIcon=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((({color="currentColor",size=14,...props},forwardedRef)=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg",{width:size,height:size,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:forwardedRef,...props},react__WEBPACK_IMPORTED_MODULE_0__.createElement("path",{d:"M3.5 6.5a.5.5 0 000 1h7a.5.5 0 000-1h-7z",fill:color}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14 7A7 7 0 110 7a7 7 0 0114 0zm-1 0A6 6 0 111 7a6 6 0 0112 0z",fill:color})))),LinkIcon=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((({color="currentColor",size=14,...props},forwardedRef)=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg",{width:size,height:size,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:forwardedRef,...props},react__WEBPACK_IMPORTED_MODULE_0__.createElement("path",{d:"M11.841 2.159a2.25 2.25 0 00-3.182 0l-2.5 2.5a2.25 2.25 0 000 3.182.5.5 0 01-.707.707 3.25 3.25 0 010-4.596l2.5-2.5a3.25 3.25 0 014.596 4.596l-2.063 2.063a4.27 4.27 0 00-.094-1.32l1.45-1.45a2.25 2.25 0 000-3.182z",fill:color}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("path",{d:"M3.61 7.21c-.1-.434-.132-.88-.095-1.321L1.452 7.952a3.25 3.25 0 104.596 4.596l2.5-2.5a3.25 3.25 0 000-4.596.5.5 0 00-.707.707 2.25 2.25 0 010 3.182l-2.5 2.5A2.25 2.25 0 112.159 8.66l1.45-1.45z",fill:color})))),ChevronDownIcon=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((({color="currentColor",size=14,...props},forwardedRef)=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg",{width:size,height:size,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:forwardedRef,...props},react__WEBPACK_IMPORTED_MODULE_0__.createElement("path",{d:"M1.146 4.604l5.5 5.5a.5.5 0 00.708 0l5.5-5.5a.5.5 0 00-.708-.708L7 9.043 1.854 3.896a.5.5 0 10-.708.708z",fill:color})))),ChevronRightIcon=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((({color="currentColor",size=14,...props},forwardedRef)=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg",{width:size,height:size,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:forwardedRef,...props},react__WEBPACK_IMPORTED_MODULE_0__.createElement("path",{d:"M11.104 7.354l-5.5 5.5a.5.5 0 01-.708-.708L10.043 7 4.896 1.854a.5.5 0 11.708-.708l5.5 5.5a.5.5 0 010 .708z",fill:color})))),ChevronSmallUpIcon=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((({color="currentColor",size=14,...props},forwardedRef)=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg",{width:size,height:size,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:forwardedRef,...props},react__WEBPACK_IMPORTED_MODULE_0__.createElement("path",{d:"M3.854 9.104a.5.5 0 11-.708-.708l3.5-3.5a.5.5 0 01.708 0l3.5 3.5a.5.5 0 01-.708.708L7 5.957 3.854 9.104z",fill:color})))),ChevronSmallDownIcon=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((({color="currentColor",size=14,...props},forwardedRef)=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg",{width:size,height:size,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:forwardedRef,...props},react__WEBPACK_IMPORTED_MODULE_0__.createElement("path",{d:"M3.854 4.896a.5.5 0 10-.708.708l3.5 3.5a.5.5 0 00.708 0l3.5-3.5a.5.5 0 00-.708-.708L7 8.043 3.854 4.896z",fill:color})))),UndoIcon=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((({color="currentColor",size=14,...props},forwardedRef)=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg",{width:size,height:size,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:forwardedRef,...props},react__WEBPACK_IMPORTED_MODULE_0__.createElement("path",{d:"M1.146 3.854a.5.5 0 010-.708l2-2a.5.5 0 11.708.708L2.707 3h6.295A4 4 0 019 11H3a.5.5 0 010-1h6a3 3 0 100-6H2.707l1.147 1.146a.5.5 0 11-.708.708l-2-2z",fill:color}))))},"./node_modules/@storybook/addon-links/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{q9:()=>withLinks});var external_STORYBOOK_MODULE_CORE_EVENTS_=__webpack_require__("storybook/internal/core-events"),external_STORYBOOK_MODULE_GLOBAL_=__webpack_require__("@storybook/global"),external_STORYBOOK_MODULE_PREVIEW_API_=__webpack_require__("storybook/preview-api"),__defProp=Object.defineProperty,{document:chunk_DAF6YNFB_document,HTMLElement}=external_STORYBOOK_MODULE_GLOBAL_.global;var chunk_DAF6YNFB_navigate=params=>external_STORYBOOK_MODULE_PREVIEW_API_.addons.getChannel().emit(external_STORYBOOK_MODULE_CORE_EVENTS_.SELECT_STORY,params),linksListener=e=>{let{target}=e;if(!(target instanceof HTMLElement))return;let element=target,{sbKind:kind,sbStory:story}=element.dataset;(kind||story)&&(e.preventDefault(),chunk_DAF6YNFB_navigate({kind,story}))},hasListener=!1,off=()=>{hasListener&&(hasListener=!1,chunk_DAF6YNFB_document.removeEventListener("click",linksListener))},withLinks=(0,external_STORYBOOK_MODULE_PREVIEW_API_.makeDecorator)({name:"withLinks",parameterName:"links",wrapper:(getStory,context)=>(hasListener||(hasListener=!0,chunk_DAF6YNFB_document.addEventListener("click",linksListener)),external_STORYBOOK_MODULE_PREVIEW_API_.addons.getChannel().once(external_STORYBOOK_MODULE_CORE_EVENTS_.STORY_CHANGED,off),getStory(context))}),preview_exports={};((target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})})(preview_exports,{decorators:()=>decorators});var decorators=[withLinks]},"./node_modules/@storybook/addon-links/dist/preview.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{decorators:()=>decorators});var storybook_internal_core_events__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("storybook/internal/core-events"),_storybook_global__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("@storybook/global"),storybook_preview_api__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("storybook/preview-api"),{document,HTMLElement}=_storybook_global__WEBPACK_IMPORTED_MODULE_1__.global,linksListener=e=>{let{target}=e;if(!(target instanceof HTMLElement))return;let element=target,{sbKind:kind,sbStory:story}=element.dataset;var params;(kind||story)&&(e.preventDefault(),params={kind,story},storybook_preview_api__WEBPACK_IMPORTED_MODULE_2__.addons.getChannel().emit(storybook_internal_core_events__WEBPACK_IMPORTED_MODULE_0__.SELECT_STORY,params))},hasListener=!1,off=()=>{hasListener&&(hasListener=!1,document.removeEventListener("click",linksListener))},decorators=[(0,storybook_preview_api__WEBPACK_IMPORTED_MODULE_2__.makeDecorator)({name:"withLinks",parameterName:"links",wrapper:(getStory,context)=>(hasListener||(hasListener=!0,document.addEventListener("click",linksListener)),storybook_preview_api__WEBPACK_IMPORTED_MODULE_2__.addons.getChannel().once(storybook_internal_core_events__WEBPACK_IMPORTED_MODULE_0__.STORY_CHANGED,off),getStory(context))})]},"./node_modules/@storybook/builder-webpack5/node_modules/css-loader/dist/runtime/api.js":module=>{"use strict";module.exports=function(cssWithMappingToString){var list=[];return list.toString=function toString(){return this.map((function(item){var content="",needLayer=void 0!==item[5];return item[4]&&(content+="@supports (".concat(item[4],") {")),item[2]&&(content+="@media ".concat(item[2]," {")),needLayer&&(content+="@layer".concat(item[5].length>0?" ".concat(item[5]):""," {")),content+=cssWithMappingToString(item),needLayer&&(content+="}"),item[2]&&(content+="}"),item[4]&&(content+="}"),content})).join("")},list.i=function i(modules,media,dedupe,supports,layer){"string"==typeof modules&&(modules=[[null,modules,void 0]]);var alreadyImportedModules={};if(dedupe)for(var k=0;k0?" ".concat(item[5]):""," {").concat(item[1],"}")),item[5]=layer),media&&(item[2]?(item[1]="@media ".concat(item[2]," {").concat(item[1],"}"),item[2]=media):item[2]=media),supports&&(item[4]?(item[1]="@supports (".concat(item[4],") {").concat(item[1],"}"),item[4]=supports):item[4]="".concat(supports)),list.push(item))}},list}},"./node_modules/@storybook/builder-webpack5/node_modules/css-loader/dist/runtime/sourceMaps.js":module=>{"use strict";module.exports=function(item){var content=item[1],cssMapping=item[3];if(!cssMapping)return content;if("function"==typeof btoa){var base64=btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping)))),data="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64),sourceMapping="/*# ".concat(data," */");return[content].concat([sourceMapping]).join("\n")}return[content].join("\n")}},"./node_modules/@storybook/builder-webpack5/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js":module=>{"use strict";var stylesInDOM=[];function getIndexByIdentifier(identifier){for(var result=-1,i=0;i{"use strict";var memo={};module.exports=function insertBySelector(insert,style){var target=function getTarget(target){if(void 0===memo[target]){var styleTarget=document.querySelector(target);if(window.HTMLIFrameElement&&styleTarget instanceof window.HTMLIFrameElement)try{styleTarget=styleTarget.contentDocument.head}catch(e){styleTarget=null}memo[target]=styleTarget}return memo[target]}(insert);if(!target)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");target.appendChild(style)}},"./node_modules/@storybook/builder-webpack5/node_modules/style-loader/dist/runtime/insertStyleElement.js":module=>{"use strict";module.exports=function insertStyleElement(options){var element=document.createElement("style");return options.setAttributes(element,options.attributes),options.insert(element,options.options),element}},"./node_modules/@storybook/builder-webpack5/node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js":(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";module.exports=function setAttributesWithoutAttributes(styleElement){var nonce=__webpack_require__.nc;nonce&&styleElement.setAttribute("nonce",nonce)}},"./node_modules/@storybook/builder-webpack5/node_modules/style-loader/dist/runtime/styleDomAPI.js":module=>{"use strict";module.exports=function domAPI(options){if("undefined"==typeof document)return{update:function update(){},remove:function remove(){}};var styleElement=options.insertStyleElement(options);return{update:function update(obj){!function apply(styleElement,options,obj){var css="";obj.supports&&(css+="@supports (".concat(obj.supports,") {")),obj.media&&(css+="@media ".concat(obj.media," {"));var needLayer=void 0!==obj.layer;needLayer&&(css+="@layer".concat(obj.layer.length>0?" ".concat(obj.layer):""," {")),css+=obj.css,needLayer&&(css+="}"),obj.media&&(css+="}"),obj.supports&&(css+="}");var sourceMap=obj.sourceMap;sourceMap&&"undefined"!=typeof btoa&&(css+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))))," */")),options.styleTagTransform(css,styleElement,options.options)}(styleElement,options,obj)},remove:function remove(){!function removeStyleElement(styleElement){if(null===styleElement.parentNode)return!1;styleElement.parentNode.removeChild(styleElement)}(styleElement)}}}},"./node_modules/@storybook/builder-webpack5/node_modules/style-loader/dist/runtime/styleTagTransform.js":module=>{"use strict";module.exports=function styleTagTransform(css,styleElement){if(styleElement.styleSheet)styleElement.styleSheet.cssText=css;else{for(;styleElement.firstChild;)styleElement.removeChild(styleElement.firstChild);styleElement.appendChild(document.createTextNode(css))}}},"./node_modules/@storybook/react/dist/chunk-6BNVLEVL.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{HA:()=>reactElementToJsxString,Jz:()=>isForwardRef,Rf:()=>isMemo});var _chunk_XP5HYGXS_mjs__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@storybook/react/dist/chunk-XP5HYGXS.mjs"),react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/index.js"),require_dist=(0,_chunk_XP5HYGXS_mjs__WEBPACK_IMPORTED_MODULE_0__.P$)({"../../node_modules/@base2/pretty-print-object/dist/index.js"(exports){var __assign=exports&&exports.__assign||function(){return __assign=Object.assign||function(t){for(var s,i=1,n=arguments.length;icomponent.$$typeof===Symbol.for("react.memo"),isForwardRef=component=>component.$$typeof===Symbol.for("react.forward_ref");function isObject(o){return"[object Object]"===Object.prototype.toString.call(o)}var import_pretty_print_object=(0,_chunk_XP5HYGXS_mjs__WEBPACK_IMPORTED_MODULE_0__.f1)(require_dist()),import_react_is=(0,_chunk_XP5HYGXS_mjs__WEBPACK_IMPORTED_MODULE_0__.f1)(require_react_is()),spacer=function(times,tabStop){return 0===times?"":new Array(times*tabStop).fill(" ").join("")};function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e0?previousNodes.length-1:0),previousNode=previousNodes[previousNodes.length-1];return!previousNode||"string"!==currentNode.type&&"number"!==currentNode.type||"string"!==previousNode.type&&"number"!==previousNode.type?(previousNode&&nodes.push(previousNode),nodes.push(currentNode)):nodes.push(createStringTreeNode(String(previousNode.value)+String(currentNode.value))),nodes};var formatOneChildren=function(inline,lvl,options){return function(element){return function(element,formattedElement,inline,lvl,options){var tabStop=options.tabStop;return"string"===element.type?formattedElement.split("\n").map((function(line,offset){return 0===offset?line:"".concat(spacer(lvl,tabStop)).concat(line)})).join("\n"):formattedElement}(element,formatTreeNode(element,inline,lvl,options),0,lvl,options)}},isInlineAttributeTooLong=function(attributes,inlineAttributeString,lvl,tabStop,maxInlineAttributesLineLength){return maxInlineAttributesLineLength?spacer(lvl,tabStop).length+inlineAttributeString.length>maxInlineAttributesLineLength:attributes.length>1},formatReactElementNode=function(node,inline,lvl,options){var type=node.type,_node$displayName=node.displayName,displayName=void 0===_node$displayName?"":_node$displayName,childrens=node.childrens,_node$props=node.props,props=void 0===_node$props?{}:_node$props,_node$defaultProps=node.defaultProps,defaultProps=void 0===_node$defaultProps?{}:_node$defaultProps;if("ReactElement"!==type)throw new Error('The "formatReactElementNode" function could only format node of type "ReactElement". Given: '.concat(type));var filterProps3=options.filterProps,maxInlineAttributesLineLength=options.maxInlineAttributesLineLength,showDefaultProps=options.showDefaultProps,sortProps=options.sortProps,tabStop=options.tabStop,out="<".concat(displayName),outInlineAttr=out,outMultilineAttr=out,containsMultilineAttr=!1,visibleAttributeNames=[],propFilter=function createPropFilter(props,filter){return Array.isArray(filter)?function(key){return-1===filter.indexOf(key)}:function(key){return filter(props[key],key)}}(props,filterProps3);Object.keys(props).filter(propFilter).filter(function(defaultProps,props){return function(propName){var haveDefaultValue=Object.keys(defaultProps).includes(propName);return!haveDefaultValue||haveDefaultValue&&defaultProps[propName]!==props[propName]}}(defaultProps,props)).forEach((function(propName){return visibleAttributeNames.push(propName)})),Object.keys(defaultProps).filter(propFilter).filter((function(){return showDefaultProps})).filter((function(defaultPropName){return!visibleAttributeNames.includes(defaultPropName)})).forEach((function(defaultPropName){return visibleAttributeNames.push(defaultPropName)}));var shouldSortUserProps,attributes=(shouldSortUserProps=sortProps,function(props){var haveKeyProp=props.includes("key"),haveRefProp=props.includes("ref"),userPropsOnly=props.filter((function(oneProp){return!["key","ref"].includes(oneProp)})),sortedProps=_toConsumableArray(shouldSortUserProps?userPropsOnly.sort():userPropsOnly);return haveRefProp&&sortedProps.unshift("ref"),haveKeyProp&&sortedProps.unshift("key"),sortedProps})(visibleAttributeNames);if(attributes.forEach((function(attributeName){var _formatProp=function(name,hasValue,value,hasDefaultValue,defaultValue,inline,lvl,options){if(!hasValue&&!hasDefaultValue)throw new Error('The prop "'.concat(name,'" has no value and no default: could not be formatted'));var usedValue=hasValue?value:defaultValue,useBooleanShorthandSyntax=options.useBooleanShorthandSyntax,tabStop=options.tabStop,formattedPropValue=formatPropValue(usedValue,inline,lvl,options),attributeFormattedInline=" ",attributeFormattedMultiline="\n".concat(spacer(lvl+1,tabStop)),isMultilineAttribute=formattedPropValue.includes("\n");return useBooleanShorthandSyntax&&"{false}"===formattedPropValue&&!hasDefaultValue?(attributeFormattedInline="",attributeFormattedMultiline=""):useBooleanShorthandSyntax&&"{true}"===formattedPropValue?(attributeFormattedInline+="".concat(name),attributeFormattedMultiline+="".concat(name)):(attributeFormattedInline+="".concat(name,"=").concat(formattedPropValue),attributeFormattedMultiline+="".concat(name,"=").concat(formattedPropValue)),{attributeFormattedInline,attributeFormattedMultiline,isMultilineAttribute}}(attributeName,Object.keys(props).includes(attributeName),props[attributeName],Object.keys(defaultProps).includes(attributeName),defaultProps[attributeName],inline,lvl,options),attributeFormattedInline=_formatProp.attributeFormattedInline,attributeFormattedMultiline=_formatProp.attributeFormattedMultiline;_formatProp.isMultilineAttribute&&(containsMultilineAttr=!0),outInlineAttr+=attributeFormattedInline,outMultilineAttr+=attributeFormattedMultiline})),outMultilineAttr+="\n".concat(spacer(lvl,tabStop)),out=function(attributes,inlineAttributeString,containsMultilineAttr,inline,lvl,tabStop,maxInlineAttributesLineLength){return(isInlineAttributeTooLong(attributes,inlineAttributeString,lvl,tabStop,maxInlineAttributesLineLength)||containsMultilineAttr)&&!inline}(attributes,outInlineAttr,containsMultilineAttr,inline,lvl,tabStop,maxInlineAttributesLineLength)?outMultilineAttr:outInlineAttr,childrens&&childrens.length>0){var newLvl=lvl+1;out+=">",inline||(out+="\n",out+=spacer(newLvl,tabStop)),out+=childrens.reduce(mergeSiblingPlainStringChildrenReducer,[]).map(formatOneChildren(inline,newLvl,options)).join(inline?"":"\n".concat(spacer(newLvl,tabStop))),inline||(out+="\n",out+=spacer(newLvl-1,tabStop)),out+="")}else isInlineAttributeTooLong(attributes,outInlineAttr,lvl,tabStop,maxInlineAttributesLineLength)||(out+=" "),out+="/>";return out},jsxStopChars=["<",">","{","}"],escape2=function(s){return function(s){return jsxStopChars.some((function(jsxStopChar){return s.includes(jsxStopChar)}))}(s)?"{`".concat(s,"`}"):s},formatTreeNode=function(node,inline,lvl,options){if("number"===node.type)return String(node.value);if("string"===node.type)return node.value?"".concat((s=escape2(String(node.value)),(result=s).endsWith(" ")&&(result=result.replace(/^(.*?)(\s+)$/,"$1{'$2'}")),result.startsWith(" ")&&(result=result.replace(/^(\s+)(.*)$/,"{'$1'}$2")),result)):"";var s,result;if("ReactElement"===node.type)return formatReactElementNode(node,inline,lvl,options);if("ReactFragment"===node.type)return function(node,inline,lvl,options){var displayName,type=node.type,key=node.key,childrens=node.childrens;if("ReactFragment"!==type)throw new Error('The "formatReactFragmentNode" function could only format node of type "ReactFragment". Given: '.concat(type));return displayName=options.useFragmentShortSyntax?0===node.childrens.length||node.key?"React.Fragment":"":"React.Fragment",formatReactElementNode(function(displayName,key,childrens){var props={};return key&&(props={key}),{type:"ReactElement",displayName,props,defaultProps:{},childrens}}(displayName,key,childrens),inline,lvl,options)}(node,inline,lvl,options);throw new TypeError('Unknow format type "'.concat(node.type,'"'))},reactElementToJsxString=function(element){var _ref=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},_ref$filterProps=_ref.filterProps,filterProps3=void 0===_ref$filterProps?[]:_ref$filterProps,_ref$showDefaultProps=_ref.showDefaultProps,showDefaultProps=void 0===_ref$showDefaultProps||_ref$showDefaultProps,_ref$showFunctions=_ref.showFunctions,showFunctions=void 0!==_ref$showFunctions&&_ref$showFunctions,functionValue=_ref.functionValue,_ref$tabStop=_ref.tabStop,tabStop=void 0===_ref$tabStop?2:_ref$tabStop,_ref$useBooleanShorth=_ref.useBooleanShorthandSyntax,useBooleanShorthandSyntax=void 0===_ref$useBooleanShorth||_ref$useBooleanShorth,_ref$useFragmentShort=_ref.useFragmentShortSyntax,useFragmentShortSyntax=void 0===_ref$useFragmentShort||_ref$useFragmentShort,_ref$sortProps=_ref.sortProps,sortProps=void 0===_ref$sortProps||_ref$sortProps,maxInlineAttributesLineLength=_ref.maxInlineAttributesLineLength,displayName=_ref.displayName;if(!element)throw new Error("react-element-to-jsx-string: Expected a ReactElement");var options={filterProps:filterProps3,showDefaultProps,showFunctions,functionValue,tabStop,useBooleanShorthandSyntax,useFragmentShortSyntax,sortProps,maxInlineAttributesLineLength,displayName};return function(node,options){return formatTreeNode(node,!1,0,options)}(_parseReactElement(element,options),options)}},"./node_modules/@storybook/react/dist/chunk-XLZBPYSH.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{t:()=>applyDecorators});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),storybook_preview_api__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("storybook/preview-api"),applyDecorators=(storyFn,decorators)=>(0,storybook_preview_api__WEBPACK_IMPORTED_MODULE_1__.defaultDecorateStory)((context=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(storyFn,context)),decorators)},"./node_modules/@storybook/react/dist/chunk-XP5HYGXS.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{E:()=>__esm,P$:()=>__commonJS,VA:()=>__export,Yp:()=>__toCommonJS,f1:()=>__toESM});var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__esm=(fn,res)=>function(){return fn&&(res=(0,fn[__getOwnPropNames(fn)[0]])(fn=0)),res},__commonJS=(cb,mod)=>function(){return mod||(0,cb[__getOwnPropNames(cb)[0]])((mod={exports:{}}).exports,mod),mod.exports},__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&"object"==typeof from||"function"==typeof from)for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toESM=(mod,isNodeMode,target)=>(target=null!=mod?__create(__getProtoOf(mod)):{},__copyProps(!isNodeMode&&mod&&mod.__esModule?target:__defProp(target,"default",{value:mod,enumerable:!0}),mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod)},"./node_modules/@storybook/react/dist/entry-preview-argtypes.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{argTypesEnhancers:()=>argTypesEnhancers,parameters:()=>parameters});var chunk_6BNVLEVL=__webpack_require__("./node_modules/@storybook/react/dist/chunk-6BNVLEVL.mjs"),chunk_XP5HYGXS=__webpack_require__("./node_modules/@storybook/react/dist/chunk-XP5HYGXS.mjs"),docs_tools=__webpack_require__("./node_modules/storybook/dist/docs-tools/index.js"),require_estraverse=(0,chunk_XP5HYGXS.P$)({"../../node_modules/estraverse/estraverse.js"(exports){!function clone(exports2){var Syntax,VisitorOption,VisitorKeys,BREAK,SKIP,REMOVE;function deepCopy(obj){var key,val,ret={};for(key in obj)obj.hasOwnProperty(key)&&(val=obj[key],ret[key]="object"==typeof val&&null!==val?deepCopy(val):val);return ret}function Reference(parent,key){this.parent=parent,this.key=key}function Element(node,path,wrap,ref2){this.node=node,this.path=path,this.wrap=wrap,this.ref=ref2}function Controller(){}function isNode(node){return null!=node&&("object"==typeof node&&"string"==typeof node.type)}function isProperty(nodeType,key){return(nodeType===Syntax.ObjectExpression||nodeType===Syntax.ObjectPattern)&&"properties"===key}function candidateExistsInLeaveList(leavelist,candidate){for(var i=leavelist.length-1;i>=0;--i)if(leavelist[i].node===candidate)return!0;return!1}function traverse(root,visitor){return(new Controller).traverse(root,visitor)}function extendCommentRange(comment,tokens){var target;return target=function upperBound(array,func){var diff,len,i,current2;for(len=array.length,i=0;len;)func(array[current2=i+(diff=len>>>1)])?len=diff:(i=current2+1,len-=diff+1);return i}(tokens,(function(token){return token.range[0]>comment.range[0]})),comment.extendedRange=[comment.range[0],comment.range[1]],target!==tokens.length&&(comment.extendedRange[1]=tokens[target].range[0]),(target-=1)>=0&&(comment.extendedRange[0]=tokens[target].range[1]),comment}return Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",PrivateIdentifier:"PrivateIdentifier",Program:"Program",Property:"Property",PropertyDefinition:"PropertyDefinition",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},VisitorKeys={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},VisitorOption={Break:BREAK={},Skip:SKIP={},Remove:REMOVE={}},Reference.prototype.replace=function(node){this.parent[this.key]=node},Reference.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)},Controller.prototype.path=function(){var i,iz,j,jz,result;function addToPath(result2,path2){if(Array.isArray(path2))for(j=0,jz=path2.length;j=0;)if(candidate=node[key=candidates[current2]])if(Array.isArray(candidate)){for(current22=candidate.length;(current22-=1)>=0;)if(candidate[current22]&&!candidateExistsInLeaveList(leavelist,candidate[current22])){if(isProperty(nodeType,candidates[current2]))element=new Element(candidate[current22],[key,current22],"Property",null);else{if(!isNode(candidate[current22]))continue;element=new Element(candidate[current22],[key,current22],null,null)}worklist.push(element)}}else if(isNode(candidate)){if(candidateExistsInLeaveList(leavelist,candidate))continue;worklist.push(new Element(candidate,key,null,null))}}}else if(element=leavelist.pop(),ret=this.__execute(visitor.leave,element),this.__state===BREAK||ret===BREAK)return},Controller.prototype.replace=function(root,visitor){var worklist,leavelist,node,nodeType,target,element,current2,current22,candidates,candidate,sentinel,outer,key;function removeElem(element2){var i,key2,nextElem,parent;if(element2.ref.remove())for(key2=element2.ref.key,parent=element2.ref.parent,i=worklist.length;i--;)if((nextElem=worklist[i]).ref&&nextElem.ref.parent===parent){if(nextElem.ref.key=0;)if(candidate=node[key=candidates[current2]])if(Array.isArray(candidate)){for(current22=candidate.length;(current22-=1)>=0;)if(candidate[current22]){if(isProperty(nodeType,candidates[current2]))element=new Element(candidate[current22],[key,current22],"Property",new Reference(candidate,current22));else{if(!isNode(candidate[current22]))continue;element=new Element(candidate[current22],[key,current22],null,new Reference(candidate,current22))}worklist.push(element)}}else isNode(candidate)&&worklist.push(new Element(candidate,key,null,new Reference(node,key)))}}else if(element=leavelist.pop(),void 0!==(target=this.__execute(visitor.leave,element))&&target!==BREAK&&target!==SKIP&&target!==REMOVE&&element.ref.replace(target),(this.__state===REMOVE||target===REMOVE)&&removeElem(element),this.__state===BREAK||target===BREAK)return outer.root;return outer.root},exports2.Syntax=Syntax,exports2.traverse=traverse,exports2.replace=function replace(root,visitor){return(new Controller).replace(root,visitor)},exports2.attachComments=function attachComments(tree,providedComments,tokens){var comment,len,i,cursor,comments=[];if(!tree.range)throw new Error("attachComments needs range information");if(!tokens.length){if(providedComments.length){for(i=0,len=providedComments.length;inode.range[0]);)comment2.extendedRange[1]===node.range[0]?(node.leadingComments||(node.leadingComments=[]),node.leadingComments.push(comment2),comments.splice(cursor,1)):cursor+=1;return cursor===comments.length?VisitorOption.Break:comments[cursor].extendedRange[0]>node.range[1]?VisitorOption.Skip:void 0}}),cursor=0,traverse(tree,{leave:function(node){for(var comment2;cursornode.range[1]?VisitorOption.Skip:void 0}}),tree},exports2.VisitorKeys=VisitorKeys,exports2.VisitorOption=VisitorOption,exports2.Controller=Controller,exports2.cloneEnvironment=function(){return clone({})},exports2}(exports)}}),require_ast=(0,chunk_XP5HYGXS.P$)({"../../node_modules/esutils/lib/ast.js"(exports,module){!function(){function isStatement(node){if(null==node)return!1;switch(node.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return!0}return!1}function trailingStatement(node){switch(node.type){case"IfStatement":return null!=node.alternate?node.alternate:node.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return node.body}return null}module.exports={isExpression:function isExpression(node){if(null==node)return!1;switch(node.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return!0}return!1},isStatement,isIterationStatement:function isIterationStatement(node){if(null==node)return!1;switch(node.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return!0}return!1},isSourceElement:function isSourceElement(node){return isStatement(node)||null!=node&&"FunctionDeclaration"===node.type},isProblematicIfStatement:function isProblematicIfStatement(node){var current2;if("IfStatement"!==node.type||null==node.alternate)return!1;current2=node.consequent;do{if("IfStatement"===current2.type&&null==current2.alternate)return!0;current2=trailingStatement(current2)}while(current2);return!1},trailingStatement}}()}}),require_code=(0,chunk_XP5HYGXS.P$)({"../../node_modules/esutils/lib/code.js"(exports,module){!function(){var ES6Regex,ES5Regex,NON_ASCII_WHITESPACES,IDENTIFIER_START,IDENTIFIER_PART,ch;function fromCodePoint(cp){return cp<=65535?String.fromCharCode(cp):String.fromCharCode(Math.floor((cp-65536)/1024)+55296)+String.fromCharCode((cp-65536)%1024+56320)}for(ES5Regex={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,NonAsciiIdentifierPart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/},ES6Regex={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},NON_ASCII_WHITESPACES=[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],IDENTIFIER_START=new Array(128),ch=0;ch<128;++ch)IDENTIFIER_START[ch]=ch>=97&&ch<=122||ch>=65&&ch<=90||36===ch||95===ch;for(IDENTIFIER_PART=new Array(128),ch=0;ch<128;++ch)IDENTIFIER_PART[ch]=ch>=97&&ch<=122||ch>=65&&ch<=90||ch>=48&&ch<=57||36===ch||95===ch;module.exports={isDecimalDigit:function isDecimalDigit2(ch2){return 48<=ch2&&ch2<=57},isHexDigit:function isHexDigit2(ch2){return 48<=ch2&&ch2<=57||97<=ch2&&ch2<=102||65<=ch2&&ch2<=70},isOctalDigit:function isOctalDigit2(ch2){return ch2>=48&&ch2<=55},isWhiteSpace:function isWhiteSpace(ch2){return 32===ch2||9===ch2||11===ch2||12===ch2||160===ch2||ch2>=5760&&NON_ASCII_WHITESPACES.indexOf(ch2)>=0},isLineTerminator:function isLineTerminator(ch2){return 10===ch2||13===ch2||8232===ch2||8233===ch2},isIdentifierStartES5:function isIdentifierStartES5(ch2){return ch2<128?IDENTIFIER_START[ch2]:ES5Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch2))},isIdentifierPartES5:function isIdentifierPartES5(ch2){return ch2<128?IDENTIFIER_PART[ch2]:ES5Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch2))},isIdentifierStartES6:function isIdentifierStartES6(ch2){return ch2<128?IDENTIFIER_START[ch2]:ES6Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch2))},isIdentifierPartES6:function isIdentifierPartES6(ch2){return ch2<128?IDENTIFIER_PART[ch2]:ES6Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch2))}}}()}}),require_keyword=(0,chunk_XP5HYGXS.P$)({"../../node_modules/esutils/lib/keyword.js"(exports,module){!function(){var code=require_code();function isKeywordES5(id,strict){return!(!strict&&"yield"===id)&&isKeywordES6(id,strict)}function isKeywordES6(id,strict){if(strict&&function isStrictModeReservedWordES6(id){switch(id){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return!0;default:return!1}}(id))return!0;switch(id.length){case 2:return"if"===id||"in"===id||"do"===id;case 3:return"var"===id||"for"===id||"new"===id||"try"===id;case 4:return"this"===id||"else"===id||"case"===id||"void"===id||"with"===id||"enum"===id;case 5:return"while"===id||"break"===id||"catch"===id||"throw"===id||"const"===id||"yield"===id||"class"===id||"super"===id;case 6:return"return"===id||"typeof"===id||"delete"===id||"switch"===id||"export"===id||"import"===id;case 7:return"default"===id||"finally"===id||"extends"===id;case 8:return"function"===id||"continue"===id||"debugger"===id;case 10:return"instanceof"===id;default:return!1}}function isReservedWordES5(id,strict){return"null"===id||"true"===id||"false"===id||isKeywordES5(id,strict)}function isReservedWordES6(id,strict){return"null"===id||"true"===id||"false"===id||isKeywordES6(id,strict)}function isIdentifierNameES5(id){var i,iz,ch;if(0===id.length||(ch=id.charCodeAt(0),!code.isIdentifierStartES5(ch)))return!1;for(i=1,iz=id.length;i=iz||!(56320<=(lowCh=id.charCodeAt(i))&&lowCh<=57343))return!1;ch=1024*(ch-55296)+(lowCh-56320)+65536}if(!check(ch))return!1;check=code.isIdentifierPartES6}return!0}module.exports={isKeywordES5,isKeywordES6,isReservedWordES5,isReservedWordES6,isRestrictedWord:function isRestrictedWord(id){return"eval"===id||"arguments"===id},isIdentifierNameES5,isIdentifierNameES6,isIdentifierES5:function isIdentifierES5(id,strict){return isIdentifierNameES5(id)&&!isReservedWordES5(id,strict)},isIdentifierES6:function isIdentifierES6(id,strict){return isIdentifierNameES6(id)&&!isReservedWordES6(id,strict)}}}()}}),require_utils=(0,chunk_XP5HYGXS.P$)({"../../node_modules/esutils/lib/utils.js"(exports){exports.ast=require_ast(),exports.code=require_code(),exports.keyword=require_keyword()}}),require_base64=(0,chunk_XP5HYGXS.P$)({"../../node_modules/escodegen/node_modules/source-map/lib/base64.js"(exports){var intToCharMap="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");exports.encode=function(number){if(0<=number&&number>>=5)>0&&(digit|=32),encoded+=base64.encode(digit)}while(vlq>0);return encoded},exports.decode=function(aStr,aIndex,aOutParam){var continuation,digit,strLen=aStr.length,result=0,shift=0;do{if(aIndex>=strLen)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(digit=base64.decode(aStr.charCodeAt(aIndex++))))throw new Error("Invalid base64 digit: "+aStr.charAt(aIndex-1));continuation=!!(32&digit),result+=(digit&=31)<>1;return 1&~aValue?shifted:-shifted}(result),aOutParam.rest=aIndex}}}),require_util=(0,chunk_XP5HYGXS.P$)({"../../node_modules/escodegen/node_modules/source-map/lib/util.js"(exports){exports.getArg=function getArg(aArgs,aName,aDefaultValue){if(aName in aArgs)return aArgs[aName];if(3===arguments.length)return aDefaultValue;throw new Error('"'+aName+'" is a required argument.')};var urlRegexp=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,dataUrlRegexp=/^data:.+\,.+$/;function urlParse(aUrl){var match=aUrl.match(urlRegexp);return match?{scheme:match[1],auth:match[2],host:match[3],port:match[4],path:match[5]}:null}function urlGenerate(aParsedUrl){var url="";return aParsedUrl.scheme&&(url+=aParsedUrl.scheme+":"),url+="//",aParsedUrl.auth&&(url+=aParsedUrl.auth+"@"),aParsedUrl.host&&(url+=aParsedUrl.host),aParsedUrl.port&&(url+=":"+aParsedUrl.port),aParsedUrl.path&&(url+=aParsedUrl.path),url}function normalize(aPath){var path=aPath,url=urlParse(aPath);if(url){if(!url.path)return aPath;path=url.path}for(var part,isAbsolute=exports.isAbsolute(path),parts=path.split(/\/+/),up=0,i=parts.length-1;i>=0;i--)"."===(part=parts[i])?parts.splice(i,1):".."===part?up++:up>0&&(""===part?(parts.splice(i+1,up),up=0):(parts.splice(i,2),up--));return""===(path=parts.join("/"))&&(path=isAbsolute?"/":"."),url?(url.path=path,urlGenerate(url)):path}function join(aRoot,aPath){""===aRoot&&(aRoot="."),""===aPath&&(aPath=".");var aPathUrl=urlParse(aPath),aRootUrl=urlParse(aRoot);if(aRootUrl&&(aRoot=aRootUrl.path||"/"),aPathUrl&&!aPathUrl.scheme)return aRootUrl&&(aPathUrl.scheme=aRootUrl.scheme),urlGenerate(aPathUrl);if(aPathUrl||aPath.match(dataUrlRegexp))return aPath;if(aRootUrl&&!aRootUrl.host&&!aRootUrl.path)return aRootUrl.host=aPath,urlGenerate(aRootUrl);var joined="/"===aPath.charAt(0)?aPath:normalize(aRoot.replace(/\/+$/,"")+"/"+aPath);return aRootUrl?(aRootUrl.path=joined,urlGenerate(aRootUrl)):joined}exports.urlParse=urlParse,exports.urlGenerate=urlGenerate,exports.normalize=normalize,exports.join=join,exports.isAbsolute=function(aPath){return"/"===aPath.charAt(0)||urlRegexp.test(aPath)},exports.relative=function relative(aRoot,aPath){""===aRoot&&(aRoot="."),aRoot=aRoot.replace(/\/$/,"");for(var level=0;0!==aPath.indexOf(aRoot+"/");){var index=aRoot.lastIndexOf("/");if(index<0||(aRoot=aRoot.slice(0,index)).match(/^([^\/]+:\/)?\/*$/))return aPath;++level}return Array(level+1).join("../")+aPath.substr(aRoot.length+1)};var supportsNullProto=!("__proto__"in Object.create(null));function identity(s){return s}function isProtoString(s){if(!s)return!1;var length=s.length;if(length<9||95!==s.charCodeAt(length-1)||95!==s.charCodeAt(length-2)||111!==s.charCodeAt(length-3)||116!==s.charCodeAt(length-4)||111!==s.charCodeAt(length-5)||114!==s.charCodeAt(length-6)||112!==s.charCodeAt(length-7)||95!==s.charCodeAt(length-8)||95!==s.charCodeAt(length-9))return!1;for(var i=length-10;i>=0;i--)if(36!==s.charCodeAt(i))return!1;return!0}function strcmp(aStr1,aStr2){return aStr1===aStr2?0:null===aStr1?1:null===aStr2?-1:aStr1>aStr2?1:-1}exports.toSetString=supportsNullProto?identity:function toSetString(aStr){return isProtoString(aStr)?"$"+aStr:aStr},exports.fromSetString=supportsNullProto?identity:function fromSetString(aStr){return isProtoString(aStr)?aStr.slice(1):aStr},exports.compareByOriginalPositions=function compareByOriginalPositions(mappingA,mappingB,onlyCompareOriginal){var cmp=strcmp(mappingA.source,mappingB.source);return 0!==cmp||0!==(cmp=mappingA.originalLine-mappingB.originalLine)||(0!==(cmp=mappingA.originalColumn-mappingB.originalColumn)||onlyCompareOriginal)||0!==(cmp=mappingA.generatedColumn-mappingB.generatedColumn)||0!==(cmp=mappingA.generatedLine-mappingB.generatedLine)?cmp:strcmp(mappingA.name,mappingB.name)},exports.compareByGeneratedPositionsDeflated=function compareByGeneratedPositionsDeflated(mappingA,mappingB,onlyCompareGenerated){var cmp=mappingA.generatedLine-mappingB.generatedLine;return 0!==cmp||(0!==(cmp=mappingA.generatedColumn-mappingB.generatedColumn)||onlyCompareGenerated)||0!==(cmp=strcmp(mappingA.source,mappingB.source))||0!==(cmp=mappingA.originalLine-mappingB.originalLine)||0!==(cmp=mappingA.originalColumn-mappingB.originalColumn)?cmp:strcmp(mappingA.name,mappingB.name)},exports.compareByGeneratedPositionsInflated=function compareByGeneratedPositionsInflated(mappingA,mappingB){var cmp=mappingA.generatedLine-mappingB.generatedLine;return 0!==cmp||0!==(cmp=mappingA.generatedColumn-mappingB.generatedColumn)||0!==(cmp=strcmp(mappingA.source,mappingB.source))||0!==(cmp=mappingA.originalLine-mappingB.originalLine)||0!==(cmp=mappingA.originalColumn-mappingB.originalColumn)?cmp:strcmp(mappingA.name,mappingB.name)},exports.parseSourceMapInput=function parseSourceMapInput(str){return JSON.parse(str.replace(/^\)]}'[^\n]*\n/,""))},exports.computeSourceURL=function computeSourceURL(sourceRoot,sourceURL,sourceMapURL){if(sourceURL=sourceURL||"",sourceRoot&&("/"!==sourceRoot[sourceRoot.length-1]&&"/"!==sourceURL[0]&&(sourceRoot+="/"),sourceURL=sourceRoot+sourceURL),sourceMapURL){var parsed=urlParse(sourceMapURL);if(!parsed)throw new Error("sourceMapURL could not be parsed");if(parsed.path){var index=parsed.path.lastIndexOf("/");index>=0&&(parsed.path=parsed.path.substring(0,index+1))}sourceURL=join(urlGenerate(parsed),sourceURL)}return normalize(sourceURL)}}}),require_array_set=(0,chunk_XP5HYGXS.P$)({"../../node_modules/escodegen/node_modules/source-map/lib/array-set.js"(exports){var util=require_util(),has2=Object.prototype.hasOwnProperty,hasNativeMap=typeof Map<"u";function ArraySet(){this._array=[],this._set=hasNativeMap?new Map:Object.create(null)}ArraySet.fromArray=function(aArray,aAllowDuplicates){for(var set=new ArraySet,i=0,len=aArray.length;i=0)return idx}else{var sStr=util.toSetString(aStr);if(has2.call(this._set,sStr))return this._set[sStr]}throw new Error('"'+aStr+'" is not in the set.')},ArraySet.prototype.at=function(aIdx){if(aIdx>=0&&aIdxlineA||lineB==lineA&&columnB>=columnA||util.compareByGeneratedPositionsInflated(mappingA,mappingB)<=0}(this._last,aMapping)?(this._sorted=!1,this._array.push(aMapping)):(this._last=aMapping,this._array.push(aMapping))},MappingList.prototype.toArray=function(){return this._sorted||(this._array.sort(util.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},exports.MappingList=MappingList}}),require_source_map_generator=(0,chunk_XP5HYGXS.P$)({"../../node_modules/escodegen/node_modules/source-map/lib/source-map-generator.js"(exports){var base64VLQ=require_base64_vlq(),util=require_util(),ArraySet=require_array_set().ArraySet,MappingList=require_mapping_list().MappingList;function SourceMapGenerator(aArgs){aArgs||(aArgs={}),this._file=util.getArg(aArgs,"file",null),this._sourceRoot=util.getArg(aArgs,"sourceRoot",null),this._skipValidation=util.getArg(aArgs,"skipValidation",!1),this._sources=new ArraySet,this._names=new ArraySet,this._mappings=new MappingList,this._sourcesContents=null}SourceMapGenerator.prototype._version=3,SourceMapGenerator.fromSourceMap=function(aSourceMapConsumer){var sourceRoot=aSourceMapConsumer.sourceRoot,generator=new SourceMapGenerator({file:aSourceMapConsumer.file,sourceRoot});return aSourceMapConsumer.eachMapping((function(mapping){var newMapping={generated:{line:mapping.generatedLine,column:mapping.generatedColumn}};null!=mapping.source&&(newMapping.source=mapping.source,null!=sourceRoot&&(newMapping.source=util.relative(sourceRoot,newMapping.source)),newMapping.original={line:mapping.originalLine,column:mapping.originalColumn},null!=mapping.name&&(newMapping.name=mapping.name)),generator.addMapping(newMapping)})),aSourceMapConsumer.sources.forEach((function(sourceFile){var sourceRelative=sourceFile;null!==sourceRoot&&(sourceRelative=util.relative(sourceRoot,sourceFile)),generator._sources.has(sourceRelative)||generator._sources.add(sourceRelative);var content=aSourceMapConsumer.sourceContentFor(sourceFile);null!=content&&generator.setSourceContent(sourceFile,content)})),generator},SourceMapGenerator.prototype.addMapping=function(aArgs){var generated=util.getArg(aArgs,"generated"),original=util.getArg(aArgs,"original",null),source=util.getArg(aArgs,"source",null),name=util.getArg(aArgs,"name",null);this._skipValidation||this._validateMapping(generated,original,source,name),null!=source&&(source=String(source),this._sources.has(source)||this._sources.add(source)),null!=name&&(name=String(name),this._names.has(name)||this._names.add(name)),this._mappings.add({generatedLine:generated.line,generatedColumn:generated.column,originalLine:null!=original&&original.line,originalColumn:null!=original&&original.column,source,name})},SourceMapGenerator.prototype.setSourceContent=function(aSourceFile,aSourceContent){var source=aSourceFile;null!=this._sourceRoot&&(source=util.relative(this._sourceRoot,source)),null!=aSourceContent?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[util.toSetString(source)]=aSourceContent):this._sourcesContents&&(delete this._sourcesContents[util.toSetString(source)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},SourceMapGenerator.prototype.applySourceMap=function(aSourceMapConsumer,aSourceFile,aSourceMapPath){var sourceFile=aSourceFile;if(null==aSourceFile){if(null==aSourceMapConsumer.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');sourceFile=aSourceMapConsumer.file}var sourceRoot=this._sourceRoot;null!=sourceRoot&&(sourceFile=util.relative(sourceRoot,sourceFile));var newSources=new ArraySet,newNames=new ArraySet;this._mappings.unsortedForEach((function(mapping){if(mapping.source===sourceFile&&null!=mapping.originalLine){var original=aSourceMapConsumer.originalPositionFor({line:mapping.originalLine,column:mapping.originalColumn});null!=original.source&&(mapping.source=original.source,null!=aSourceMapPath&&(mapping.source=util.join(aSourceMapPath,mapping.source)),null!=sourceRoot&&(mapping.source=util.relative(sourceRoot,mapping.source)),mapping.originalLine=original.line,mapping.originalColumn=original.column,null!=original.name&&(mapping.name=original.name))}var source=mapping.source;null!=source&&!newSources.has(source)&&newSources.add(source);var name=mapping.name;null!=name&&!newNames.has(name)&&newNames.add(name)}),this),this._sources=newSources,this._names=newNames,aSourceMapConsumer.sources.forEach((function(sourceFile2){var content=aSourceMapConsumer.sourceContentFor(sourceFile2);null!=content&&(null!=aSourceMapPath&&(sourceFile2=util.join(aSourceMapPath,sourceFile2)),null!=sourceRoot&&(sourceFile2=util.relative(sourceRoot,sourceFile2)),this.setSourceContent(sourceFile2,content))}),this)},SourceMapGenerator.prototype._validateMapping=function(aGenerated,aOriginal,aSource,aName){if(aOriginal&&"number"!=typeof aOriginal.line&&"number"!=typeof aOriginal.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(aGenerated&&"line"in aGenerated&&"column"in aGenerated&&aGenerated.line>0&&aGenerated.column>=0)||aOriginal||aSource||aName){if(aGenerated&&"line"in aGenerated&&"column"in aGenerated&&aOriginal&&"line"in aOriginal&&"column"in aOriginal&&aGenerated.line>0&&aGenerated.column>=0&&aOriginal.line>0&&aOriginal.column>=0&&aSource)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:aGenerated,source:aSource,original:aOriginal,name:aName}))}},SourceMapGenerator.prototype._serializeMappings=function(){for(var next,mapping,nameIdx,sourceIdx,previousGeneratedColumn=0,previousGeneratedLine=1,previousOriginalColumn=0,previousOriginalLine=0,previousName=0,previousSource=0,result="",mappings=this._mappings.toArray(),i=0,len=mappings.length;i0){if(!util.compareByGeneratedPositionsInflated(mapping,mappings[i-1]))continue;next+=","}next+=base64VLQ.encode(mapping.generatedColumn-previousGeneratedColumn),previousGeneratedColumn=mapping.generatedColumn,null!=mapping.source&&(sourceIdx=this._sources.indexOf(mapping.source),next+=base64VLQ.encode(sourceIdx-previousSource),previousSource=sourceIdx,next+=base64VLQ.encode(mapping.originalLine-1-previousOriginalLine),previousOriginalLine=mapping.originalLine-1,next+=base64VLQ.encode(mapping.originalColumn-previousOriginalColumn),previousOriginalColumn=mapping.originalColumn,null!=mapping.name&&(nameIdx=this._names.indexOf(mapping.name),next+=base64VLQ.encode(nameIdx-previousName),previousName=nameIdx)),result+=next}return result},SourceMapGenerator.prototype._generateSourcesContent=function(aSources,aSourceRoot){return aSources.map((function(source){if(!this._sourcesContents)return null;null!=aSourceRoot&&(source=util.relative(aSourceRoot,source));var key=util.toSetString(source);return Object.prototype.hasOwnProperty.call(this._sourcesContents,key)?this._sourcesContents[key]:null}),this)},SourceMapGenerator.prototype.toJSON=function(){var map={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(map.file=this._file),null!=this._sourceRoot&&(map.sourceRoot=this._sourceRoot),this._sourcesContents&&(map.sourcesContent=this._generateSourcesContent(map.sources,map.sourceRoot)),map},SourceMapGenerator.prototype.toString=function(){return JSON.stringify(this.toJSON())},exports.SourceMapGenerator=SourceMapGenerator}}),require_binary_search=(0,chunk_XP5HYGXS.P$)({"../../node_modules/escodegen/node_modules/source-map/lib/binary-search.js"(exports){function recursiveSearch(aLow,aHigh,aNeedle,aHaystack,aCompare,aBias){var mid=Math.floor((aHigh-aLow)/2)+aLow,cmp=aCompare(aNeedle,aHaystack[mid],!0);return 0===cmp?mid:cmp>0?aHigh-mid>1?recursiveSearch(mid,aHigh,aNeedle,aHaystack,aCompare,aBias):aBias==exports.LEAST_UPPER_BOUND?aHigh1?recursiveSearch(aLow,mid,aNeedle,aHaystack,aCompare,aBias):aBias==exports.LEAST_UPPER_BOUND?mid:aLow<0?-1:aLow}exports.GREATEST_LOWER_BOUND=1,exports.LEAST_UPPER_BOUND=2,exports.search=function(aNeedle,aHaystack,aCompare,aBias){if(0===aHaystack.length)return-1;var index=recursiveSearch(-1,aHaystack.length,aNeedle,aHaystack,aCompare,aBias||exports.GREATEST_LOWER_BOUND);if(index<0)return-1;for(;index-1>=0&&0===aCompare(aHaystack[index],aHaystack[index-1],!0);)--index;return index}}}),require_quick_sort=(0,chunk_XP5HYGXS.P$)({"../../node_modules/escodegen/node_modules/source-map/lib/quick-sort.js"(exports){function swap(ary,x,y){var temp=ary[x];ary[x]=ary[y],ary[y]=temp}function doQuickSort(ary,comparator,p,r){if(p=0){var mapping=this._originalMappings[index];if(void 0===aArgs.column)for(var originalLine=mapping.originalLine;mapping&&mapping.originalLine===originalLine;)mappings.push({line:util.getArg(mapping,"generatedLine",null),column:util.getArg(mapping,"generatedColumn",null),lastColumn:util.getArg(mapping,"lastGeneratedColumn",null)}),mapping=this._originalMappings[++index];else for(var originalColumn=mapping.originalColumn;mapping&&mapping.originalLine===line&&mapping.originalColumn==originalColumn;)mappings.push({line:util.getArg(mapping,"generatedLine",null),column:util.getArg(mapping,"generatedColumn",null),lastColumn:util.getArg(mapping,"lastGeneratedColumn",null)}),mapping=this._originalMappings[++index]}return mappings},exports.SourceMapConsumer=SourceMapConsumer,BasicSourceMapConsumer.prototype=Object.create(SourceMapConsumer.prototype),BasicSourceMapConsumer.prototype.consumer=SourceMapConsumer,BasicSourceMapConsumer.prototype._findSourceIndex=function(aSource){var i,relativeSource=aSource;if(null!=this.sourceRoot&&(relativeSource=util.relative(this.sourceRoot,relativeSource)),this._sources.has(relativeSource))return this._sources.indexOf(relativeSource);for(i=0;i1&&(mapping.source=previousSource+segment[1],previousSource+=segment[1],mapping.originalLine=previousOriginalLine+segment[2],previousOriginalLine=mapping.originalLine,mapping.originalLine+=1,mapping.originalColumn=previousOriginalColumn+segment[3],previousOriginalColumn=mapping.originalColumn,segment.length>4&&(mapping.name=previousName+segment[4],previousName+=segment[4])),generatedMappings.push(mapping),"number"==typeof mapping.originalLine&&originalMappings.push(mapping)}quickSort(generatedMappings,util.compareByGeneratedPositionsDeflated),this.__generatedMappings=generatedMappings,quickSort(originalMappings,util.compareByOriginalPositions),this.__originalMappings=originalMappings},BasicSourceMapConsumer.prototype._findMapping=function(aNeedle,aMappings,aLineName,aColumnName,aComparator,aBias){if(aNeedle[aLineName]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+aNeedle[aLineName]);if(aNeedle[aColumnName]<0)throw new TypeError("Column must be greater than or equal to 0, got "+aNeedle[aColumnName]);return binarySearch.search(aNeedle,aMappings,aComparator,aBias)},BasicSourceMapConsumer.prototype.computeColumnSpans=function(){for(var index=0;index=0){var mapping=this._generatedMappings[index];if(mapping.generatedLine===needle.generatedLine){var source=util.getArg(mapping,"source",null);null!==source&&(source=this._sources.at(source),source=util.computeSourceURL(this.sourceRoot,source,this._sourceMapURL));var name=util.getArg(mapping,"name",null);return null!==name&&(name=this._names.at(name)),{source,line:util.getArg(mapping,"originalLine",null),column:util.getArg(mapping,"originalColumn",null),name}}}return{source:null,line:null,column:null,name:null}},BasicSourceMapConsumer.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some((function(sc){return null==sc})))},BasicSourceMapConsumer.prototype.sourceContentFor=function(aSource,nullOnMissing){if(!this.sourcesContent)return null;var index=this._findSourceIndex(aSource);if(index>=0)return this.sourcesContent[index];var url,relativeSource=aSource;if(null!=this.sourceRoot&&(relativeSource=util.relative(this.sourceRoot,relativeSource)),null!=this.sourceRoot&&(url=util.urlParse(this.sourceRoot))){var fileUriAbsPath=relativeSource.replace(/^file:\/\//,"");if("file"==url.scheme&&this._sources.has(fileUriAbsPath))return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)];if((!url.path||"/"==url.path)&&this._sources.has("/"+relativeSource))return this.sourcesContent[this._sources.indexOf("/"+relativeSource)]}if(nullOnMissing)return null;throw new Error('"'+relativeSource+'" is not in the SourceMap.')},BasicSourceMapConsumer.prototype.generatedPositionFor=function(aArgs){var source=util.getArg(aArgs,"source");if((source=this._findSourceIndex(source))<0)return{line:null,column:null,lastColumn:null};var needle={source,originalLine:util.getArg(aArgs,"line"),originalColumn:util.getArg(aArgs,"column")},index=this._findMapping(needle,this._originalMappings,"originalLine","originalColumn",util.compareByOriginalPositions,util.getArg(aArgs,"bias",SourceMapConsumer.GREATEST_LOWER_BOUND));if(index>=0){var mapping=this._originalMappings[index];if(mapping.source===needle.source)return{line:util.getArg(mapping,"generatedLine",null),column:util.getArg(mapping,"generatedColumn",null),lastColumn:util.getArg(mapping,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},exports.BasicSourceMapConsumer=BasicSourceMapConsumer,IndexedSourceMapConsumer.prototype=Object.create(SourceMapConsumer.prototype),IndexedSourceMapConsumer.prototype.constructor=SourceMapConsumer,IndexedSourceMapConsumer.prototype._version=3,Object.defineProperty(IndexedSourceMapConsumer.prototype,"sources",{get:function(){for(var sources=[],i=0;i=0;i--)this.prepend(aChunk[i]);else{if(!aChunk[isSourceNode]&&"string"!=typeof aChunk)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+aChunk);this.children.unshift(aChunk)}return this},SourceNode.prototype.walk=function(aFn){for(var chunk,i=0,len=this.children.length;i0){for(newChildren=[],i=0;i=6.0"},maintainers:[{name:"Yusuke Suzuki",email:"utatane.tea@gmail.com",web:"http://github.com/Constellation"}],repository:{type:"git",url:"http://github.com/estools/escodegen.git"},dependencies:{estraverse:"^5.2.0",esutils:"^2.0.2",esprima:"^4.0.1"},optionalDependencies:{"source-map":"~0.6.1"},devDependencies:{acorn:"^8.0.4",bluebird:"^3.4.7","bower-registry-client":"^1.0.0",chai:"^4.2.0","chai-exclude":"^2.0.2","commonjs-everywhere":"^0.9.7",gulp:"^4.0.2","gulp-eslint":"^6.0.0","gulp-mocha":"^7.0.2",minimist:"^1.2.5",optionator:"^0.9.1",semver:"^7.3.4"},license:"BSD-2-Clause",scripts:{test:"gulp travis","unit-test":"gulp test",lint:"gulp lint",release:"node tools/release.js","build-min":"./node_modules/.bin/cjsify -ma path: tools/entry-point.js > escodegen.browser.min.js",build:"./node_modules/.bin/cjsify -a path: tools/entry-point.js > escodegen.browser.js"}}}}),require_escodegen=(0,chunk_XP5HYGXS.P$)({"../../node_modules/escodegen/escodegen.js"(exports){!function(){var Syntax,Precedence,BinaryPrecedence,SourceNode,estraverse,esutils,base2,indent,json,renumber,hexadecimal,quotes,escapeless,newline,space,parentheses,semicolons,safeConcatenation,directive,extra,parse5,sourceMap,sourceCode,preserveBlankLines,FORMAT_MINIFY,FORMAT_DEFAULTS;function isStatement(node){return CodeGenerator.Statement.hasOwnProperty(node.type)}estraverse=require_estraverse(),esutils=require_utils(),Syntax=estraverse.Syntax,BinaryPrecedence={"??":(Precedence={Sequence:0,Yield:1,Assignment:1,Conditional:2,ArrowFunction:2,Coalesce:3,LogicalOR:4,LogicalAND:5,BitwiseOR:6,BitwiseXOR:7,BitwiseAND:8,Equality:9,Relational:10,BitwiseSHIFT:11,Additive:12,Multiplicative:13,Exponentiation:14,Await:15,Unary:15,Postfix:16,OptionalChaining:17,Call:18,New:19,TaggedTemplate:20,Member:21,Primary:22}).Coalesce,"||":Precedence.LogicalOR,"&&":Precedence.LogicalAND,"|":Precedence.BitwiseOR,"^":Precedence.BitwiseXOR,"&":Precedence.BitwiseAND,"==":Precedence.Equality,"!=":Precedence.Equality,"===":Precedence.Equality,"!==":Precedence.Equality,is:Precedence.Equality,isnt:Precedence.Equality,"<":Precedence.Relational,">":Precedence.Relational,"<=":Precedence.Relational,">=":Precedence.Relational,in:Precedence.Relational,instanceof:Precedence.Relational,"<<":Precedence.BitwiseSHIFT,">>":Precedence.BitwiseSHIFT,">>>":Precedence.BitwiseSHIFT,"+":Precedence.Additive,"-":Precedence.Additive,"*":Precedence.Multiplicative,"%":Precedence.Multiplicative,"/":Precedence.Multiplicative,"**":Precedence.Exponentiation};function stringRepeat(str,num){var result="";for(num|=0;num>0;num>>>=1,str+=str)1&num&&(result+=str);return result}function endsWithLineTerminator(str){var len=str.length;return len&&esutils.code.isLineTerminator(str.charCodeAt(len-1))}function merge(target,override){var key;for(key in override)override.hasOwnProperty(key)&&(target[key]=override[key]);return target}function updateDeeply(target,override){var key,val;function isHashObject(target2){return"object"==typeof target2&&target2 instanceof Object&&!(target2 instanceof RegExp)}for(key in override)override.hasOwnProperty(key)&&(isHashObject(val=override[key])?isHashObject(target[key])?updateDeeply(target[key],val):target[key]=updateDeeply({},val):target[key]=val);return target}function escapeRegExpCharacter(ch,previousIsBackslash){return 8232==(-2&ch)?(previousIsBackslash?"u":"\\u")+(8232===ch?"2028":"2029"):10===ch||13===ch?(previousIsBackslash?"":"\\")+(10===ch?"n":"r"):String.fromCharCode(ch)}function escapeAllowedCharacter(code,next){var hex;return 8===code?"\\b":12===code?"\\f":9===code?"\\t":(hex=code.toString(16).toUpperCase(),json||code>255?"\\u"+"0000".slice(hex.length)+hex:0!==code||esutils.code.isDecimalDigit(next)?11===code?"\\x0B":"\\x"+"00".slice(hex.length)+hex:"\\0")}function escapeDisallowedCharacter(code){if(92===code)return"\\\\";if(10===code)return"\\n";if(13===code)return"\\r";if(8232===code)return"\\u2028";if(8233===code)return"\\u2029";throw new Error("Incorrectly classified character")}function flattenToString(arr){var i,iz,elem,result="";for(i=0,iz=arr.length;ij&&(spaces=j)}for(typeof specialBase<"u"?(previousBase=base2,"*"===array[1][spaces]&&(specialBase+=" "),base2=specialBase):(1&spaces&&--spaces,previousBase=base2),i=1,len=array.length;i0){if(save=result,preserveBlankLines){for(result=[],extRange=(comment=stmt.leadingComments[0]).extendedRange,range=comment.range,(count=((prefix=sourceCode.substring(extRange[0],range[0])).match(/\n/g)||[]).length)>0?(result.push(stringRepeat("\n",count)),result.push(addIndent(generateComment(comment)))):(result.push(prefix),result.push(generateComment(comment))),prevRange=range,i=1,len=stmt.leadingComments.length;i0?(result.push(stringRepeat("\n",count)),result.push(addIndent(generateComment(comment)))):(result.push(prefix),result.push(generateComment(comment)));else for(tailingToStatement=!endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString()),specialBase=stringRepeat(" ",function calculateSpaces(str){var i;for(i=str.length-1;i>=0&&!esutils.code.isLineTerminator(str.charCodeAt(i));--i);return str.length-1-i}(toSourceNodeWhenNeeded([base2,result,indent]).toString())),i=0,len=stmt.trailingComments.length;i")),node.expression?(result.push(space),"{"===(expr=this.generateExpression(node.body,Precedence.Assignment,7)).toString().charAt(0)&&(expr=["(",expr,")"]),result.push(expr)):result.push(this.maybeBlock(node.body,9)),result},CodeGenerator.prototype.generateIterationForStatement=function(operator,stmt,flags){var result=["for"+(stmt.await?noEmptySpace()+"await":"")+space+"("],that=this;return withIndent((function(){stmt.left.type===Syntax.VariableDeclaration?withIndent((function(){result.push(stmt.left.kind+noEmptySpace()),result.push(that.generateStatement(stmt.left.declarations[0],0))})):result.push(that.generateExpression(stmt.left,Precedence.Call,7)),result=join(result,operator),result=[join(result,that.generateExpression(stmt.right,Precedence.Assignment,7)),")"]})),result.push(this.maybeBlock(stmt.body,flags)),result},CodeGenerator.prototype.generatePropertyKey=function(expr,computed){var result=[];return computed&&result.push("["),result.push(this.generateExpression(expr,Precedence.Assignment,7)),computed&&result.push("]"),result},CodeGenerator.prototype.generateAssignment=function(left,right,operator,precedence,flags){return Precedence.Assignment2&&("\n"===(content=sourceCode.substring(range[0]+1,range[1]-1))[0]&&(result=["{"]),result.push(content))),bodyFlags=1,8&flags&&(bodyFlags|=16),i=0,iz=stmt.body.length;i0&&!stmt.body[i-1].trailingComments&&!stmt.body[i].leadingComments&&generateBlankLines(stmt.body[i-1].range[1],stmt.body[i].range[0],result)),i===iz-1&&(bodyFlags|=32),fragment=stmt.body[i].leadingComments&&preserveBlankLines?that.generateStatement(stmt.body[i],bodyFlags):addIndent(that.generateStatement(stmt.body[i],bodyFlags)),result.push(fragment),endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString())||preserveBlankLines&&i1?withIndent(block):block(),result.push(this.semicolon(flags)),result},ThrowStatement:function(stmt,flags){return[join("throw",this.generateExpression(stmt.argument,Precedence.Sequence,7)),this.semicolon(flags)]},TryStatement:function(stmt,flags){var result,i,iz,guardedHandlers;if(result=["try",this.maybeBlock(stmt.block,1)],result=this.maybeBlockSuffix(stmt.block,result),stmt.handlers)for(i=0,iz=stmt.handlers.length;i0?"\n":""],bodyFlags=17,i=0;i0&&!stmt.body[i-1].trailingComments&&!stmt.body[i].leadingComments&&generateBlankLines(stmt.body[i-1].range[1],stmt.body[i].range[0],result)),fragment=addIndent(this.generateStatement(stmt.body[i],bodyFlags)),result.push(fragment),i+10){for(result.push("("),i=0,iz=length;i=2&&48===fragment.charCodeAt(0))&&result.push(" ")),result.push(expr.optional?"?.":"."),result.push(generateIdentifier(expr.property))),parenthesize(result,Precedence.Member,precedence)},MetaProperty:function(expr,precedence,flags){var result;return(result=[]).push("string"==typeof expr.meta?expr.meta:generateIdentifier(expr.meta)),result.push("."),result.push("string"==typeof expr.property?expr.property:generateIdentifier(expr.property)),parenthesize(result,Precedence.Member,precedence)},UnaryExpression:function(expr,precedence,flags){var result,fragment,rightCharCode,leftSource,leftCharCode;return fragment=this.generateExpression(expr.argument,Precedence.Unary,7),""===space?result=join(expr.operator,fragment):(result=[expr.operator],expr.operator.length>2?result=join(result,fragment):(leftCharCode=(leftSource=toSourceNodeWhenNeeded(result).toString()).charCodeAt(leftSource.length-1),rightCharCode=fragment.toString().charCodeAt(0),((43===leftCharCode||45===leftCharCode)&&leftCharCode===rightCharCode||esutils.code.isIdentifierPartES5(leftCharCode)&&esutils.code.isIdentifierPartES5(rightCharCode))&&result.push(noEmptySpace()),result.push(fragment))),parenthesize(result,Precedence.Unary,precedence)},YieldExpression:function(expr,precedence,flags){var result;return result=expr.delegate?"yield*":"yield",expr.argument&&(result=join(result,this.generateExpression(expr.argument,Precedence.Yield,7))),parenthesize(result,Precedence.Yield,precedence)},AwaitExpression:function(expr,precedence,flags){return parenthesize(join(expr.all?"await*":"await",this.generateExpression(expr.argument,Precedence.Await,7)),Precedence.Await,precedence)},UpdateExpression:function(expr,precedence,flags){return expr.prefix?parenthesize([expr.operator,this.generateExpression(expr.argument,Precedence.Unary,7)],Precedence.Unary,precedence):parenthesize([this.generateExpression(expr.argument,Precedence.Postfix,7),expr.operator],Precedence.Postfix,precedence)},FunctionExpression:function(expr,precedence,flags){var result=[generateAsyncPrefix(expr,!0),"function"];return expr.id?(result.push(generateStarSuffix(expr)||noEmptySpace()),result.push(generateIdentifier(expr.id))):result.push(generateStarSuffix(expr)||space),result.push(this.generateFunctionBody(expr)),result},ArrayPattern:function(expr,precedence,flags){return this.ArrayExpression(expr,precedence,flags,!0)},ArrayExpression:function(expr,precedence,flags,isPattern){var result,multiline,that=this;return expr.elements.length?(multiline=!isPattern&&expr.elements.length>1,result=["[",multiline?newline:""],withIndent((function(indent2){var i,iz;for(i=0,iz=expr.elements.length;i1,withIndent((function(){fragment=that.generateExpression(expr.properties[0],Precedence.Sequence,7)})),multiline||function hasLineTerminator(str){return/[\r\n]/g.test(str)}(toSourceNodeWhenNeeded(fragment).toString())?(withIndent((function(indent2){var i,iz;if(result=["{",newline,indent2,fragment],multiline)for(result.push(","+newline),i=1,iz=expr.properties.length;i126))){result+=escapeAllowedCharacter(code,str.charCodeAt(i+1));continue}}result+=String.fromCharCode(code)}if(quote=(single=!("double"===quotes||"auto"===quotes&&doubleQuotes0&&(exponent=+temp.slice(pos+1),temp=temp.slice(0,pos)),point>=0&&(exponent-=temp.length-point-1,temp=+(temp.slice(0,point)+temp.slice(point+1))+""),pos=0;48===temp.charCodeAt(temp.length+pos-1);)--pos;return 0!==pos&&(exponent-=pos,temp=temp.slice(0,pos)),0!==exponent&&(temp+="e"+exponent),(temp.length1e12&&Math.floor(value)===value&&(temp="0x"+value.toString(16)).length0||extra.moz.comprehensionExpressionStartsWithAssignment?result=join(result,fragment):result.push(fragment)})),expr.filter&&(result=join(result,"if"+space),fragment=this.generateExpression(expr.filter,Precedence.Sequence,7),result=join(result,["(",fragment,")"])),extra.moz.comprehensionExpressionStartsWithAssignment||(fragment=this.generateExpression(expr.body,Precedence.Assignment,7),result=join(result,fragment)),result.push(expr.type===Syntax.GeneratorExpression?")":"]"),result},ComprehensionBlock:function(expr,precedence,flags){var fragment;return fragment=join(fragment=expr.left.type===Syntax.VariableDeclaration?[expr.left.kind,noEmptySpace(),this.generateStatement(expr.left.declarations[0],0)]:this.generateExpression(expr.left,Precedence.Call,7),expr.of?"of":"in"),fragment=join(fragment,this.generateExpression(expr.right,Precedence.Sequence,7)),["for"+space+"(",fragment,")"]},SpreadElement:function(expr,precedence,flags){return["...",this.generateExpression(expr.argument,Precedence.Assignment,7)]},TaggedTemplateExpression:function(expr,precedence,flags){var itemFlags=3;return 2&flags||(itemFlags=1),parenthesize([this.generateExpression(expr.tag,Precedence.Call,itemFlags),this.generateExpression(expr.quasi,Precedence.Primary,4)],Precedence.TaggedTemplate,precedence)},TemplateElement:function(expr,precedence,flags){return expr.value.raw},TemplateLiteral:function(expr,precedence,flags){var result,i,iz;for(result=["`"],i=0,iz=expr.quasis.length;icode)return!1;if((pos+=set[i+1])>=code)return!0}}function isIdentifierStart(code,astral){return code<65?36===code:code<91||(code<97?95===code:code<123||(code<=65535?code>=170&&nonASCIIidentifierStart.test(String.fromCharCode(code)):!1!==astral&&isInAstralSet(code,astralIdentifierStartCodes)))}function isIdentifierChar(code,astral){return code<48?36===code:code<58||!(code<65)&&(code<91||(code<97?95===code:code<123||(code<=65535?code>=170&&nonASCIIidentifier.test(String.fromCharCode(code)):!1!==astral&&(isInAstralSet(code,astralIdentifierStartCodes)||isInAstralSet(code,astralIdentifierCodes)))))}function binop(name,prec){return new TokenType(name,{beforeExpr:!0,binop:prec})}function kw(name,options){return void 0===options&&(options={}),options.keyword=name,keywords$1[name]=new TokenType(name,options)}function isNewLine(code,ecma2019String){return 10===code||13===code||!ecma2019String&&(8232===code||8233===code)}function has(obj,propName){return chunk_JQQVJC7C_hasOwnProperty.call(obj,propName)}function wordsRegexp(words){return new RegExp("^(?:"+words.replace(/ /g,"|")+")$")}function getLineInfo(input,offset2){for(var line=1,cur=0;;){lineBreakG.lastIndex=cur;var match=lineBreakG.exec(input);if(!(match&&match.index=2015&&(options.ecmaVersion-=2009),null==options.allowReserved&&(options.allowReserved=options.ecmaVersion<5),isArray(options.onToken)){var tokens=options.onToken;options.onToken=function(token){return tokens.push(token)}}return isArray(options.onComment)&&(options.onComment=function pushComment(options,array){return function(block,text,start,end,startLoc,endLoc){var comment={type:block?"Block":"Line",value:text,start,end};options.locations&&(comment.loc=new SourceLocation(this,startLoc,endLoc)),options.ranges&&(comment.range=[start,end]),array.push(comment)}}(options,options.onComment)),options}function functionFlags(async,generator){return SCOPE_FUNCTION|(async?SCOPE_ASYNC:0)|(generator?SCOPE_GENERATOR:0)}function DestructuringErrors(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1}function finishNodeAt(node,type,pos,loc){return node.type=type,node.end=pos,this.options.locations&&(node.loc.end=loc),this.options.ranges&&(node.range[1]=pos),node}function buildUnicodeData(ecmaVersion){var d=data[ecmaVersion]={binary:wordsRegexp(unicodeBinaryProperties[ecmaVersion]+" "+unicodeGeneralCategoryValues),nonBinary:{General_Category:wordsRegexp(unicodeGeneralCategoryValues),Script:wordsRegexp(unicodeScriptValues[ecmaVersion])}};d.nonBinary.Script_Extensions=d.nonBinary.Script,d.nonBinary.gc=d.nonBinary.General_Category,d.nonBinary.sc=d.nonBinary.Script,d.nonBinary.scx=d.nonBinary.Script_Extensions}function codePointToString(ch){return ch<=65535?String.fromCharCode(ch):(ch-=65536,String.fromCharCode(55296+(ch>>10),56320+(1023&ch)))}function isSyntaxCharacter(ch){return 36===ch||ch>=40&&ch<=43||46===ch||63===ch||ch>=91&&ch<=94||ch>=123&&ch<=125}function isControlLetter(ch){return ch>=65&&ch<=90||ch>=97&&ch<=122}function isUnicodePropertyNameCharacter(ch){return isControlLetter(ch)||95===ch}function isUnicodePropertyValueCharacter(ch){return isUnicodePropertyNameCharacter(ch)||isDecimalDigit(ch)}function isDecimalDigit(ch){return ch>=48&&ch<=57}function isHexDigit(ch){return ch>=48&&ch<=57||ch>=65&&ch<=70||ch>=97&&ch<=102}function hexToInt(ch){return ch>=65&&ch<=70?ch-65+10:ch>=97&&ch<=102?ch-97+10:ch-48}function isOctalDigit(ch){return ch>=48&&ch<=55}function stringToBigInt(str){return"function"!=typeof BigInt?null:BigInt(str.replace(/_/g,""))}function codePointToString$1(code){return code<=65535?String.fromCharCode(code):(code-=65536,String.fromCharCode(55296+(code>>10),56320+(1023&code)))}function parse3(input,options){return Parser.parse(input,options)}function parseExpressionAt2(input,pos,options){return Parser.parseExpressionAt(input,pos,options)}function tokenizer2(input,options){return Parser.tokenizer(input,options)}(0,chunk_XP5HYGXS.VA)(acorn_exports,{Node:()=>Node,Parser:()=>Parser,Position:()=>Position,SourceLocation:()=>SourceLocation,TokContext:()=>TokContext,Token:()=>Token,TokenType:()=>TokenType,defaultOptions:()=>defaultOptions,getLineInfo:()=>getLineInfo,isIdentifierChar:()=>isIdentifierChar,isIdentifierStart:()=>isIdentifierStart,isNewLine:()=>isNewLine,keywordTypes:()=>keywords$1,lineBreak:()=>lineBreak,lineBreakG:()=>lineBreakG,nonASCIIwhitespace:()=>nonASCIIwhitespace,parse:()=>parse3,parseExpressionAt:()=>parseExpressionAt2,tokContexts:()=>types$1,tokTypes:()=>types,tokenizer:()=>tokenizer2,version:()=>version});var reservedWords,ecma5AndLessKeywords,keywords,keywordRelationalOperator,nonASCIIidentifierStartChars,nonASCIIidentifierChars,nonASCIIidentifierStart,nonASCIIidentifier,astralIdentifierStartCodes,astralIdentifierCodes,TokenType,beforeExpr,startsExpr,keywords$1,types,lineBreak,lineBreakG,nonASCIIwhitespace,skipWhiteSpace,ref,chunk_JQQVJC7C_hasOwnProperty,chunk_JQQVJC7C_toString,isArray,Position,SourceLocation,defaultOptions,SCOPE_FUNCTION,SCOPE_VAR,SCOPE_ASYNC,SCOPE_GENERATOR,Parser,prototypeAccessors,pp,literal,pp$1,loopLabel,switchLabel,empty,FUNC_STATEMENT,FUNC_HANGING_STATEMENT,pp$2,pp$3,empty$1,pp$4,pp$5,Scope,Node,pp$6,TokContext,types$1,pp$7,ecma9BinaryProperties,ecma10BinaryProperties,unicodeBinaryProperties,unicodeGeneralCategoryValues,ecma9ScriptValues,ecma10ScriptValues,unicodeScriptValues,data,pp$8,RegExpValidationState,Token,pp$9,INVALID_TEMPLATE_ESCAPE_ERROR,version,init_acorn=(0,chunk_XP5HYGXS.E)({"../../node_modules/acorn/dist/acorn.mjs"(){reservedWords={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},keywords={5:ecma5AndLessKeywords="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this","5module":ecma5AndLessKeywords+" export import",6:ecma5AndLessKeywords+" const class extends export import super"},keywordRelationalOperator=/^in(stanceof)?$/,nonASCIIidentifierStartChars="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࢠ-ࢴࢶ-ࣇऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-鿼ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞿꟂ-ꟊꟵ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",nonASCIIidentifierChars="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࣓-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿᫀᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷹᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",nonASCIIidentifierStart=new RegExp("["+nonASCIIidentifierStartChars+"]"),nonASCIIidentifier=new RegExp("["+nonASCIIidentifierStartChars+nonASCIIidentifierChars+"]"),nonASCIIidentifierStartChars=nonASCIIidentifierChars=null,astralIdentifierStartCodes=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,107,20,28,22,13,52,76,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,230,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,190,0,80,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8952,286,50,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,2357,44,11,6,17,0,370,43,1301,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42717,35,4148,12,221,3,5761,15,7472,3104,541,1507,4938],astralIdentifierCodes=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,154,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,135,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,262,6,10,9,419,13,1495,6,110,6,6,9,4759,9,787719,239],beforeExpr={beforeExpr:!0},keywords$1={},types={num:new(TokenType=function(label,conf){void 0===conf&&(conf={}),this.label=label,this.keyword=conf.keyword,this.beforeExpr=!!conf.beforeExpr,this.startsExpr=!!conf.startsExpr,this.isLoop=!!conf.isLoop,this.isAssign=!!conf.isAssign,this.prefix=!!conf.prefix,this.postfix=!!conf.postfix,this.binop=conf.binop||null,this.updateContext=null})("num",startsExpr={startsExpr:!0}),regexp:new TokenType("regexp",startsExpr),string:new TokenType("string",startsExpr),name:new TokenType("name",startsExpr),eof:new TokenType("eof"),bracketL:new TokenType("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new TokenType("]"),braceL:new TokenType("{",{beforeExpr:!0,startsExpr:!0}),braceR:new TokenType("}"),parenL:new TokenType("(",{beforeExpr:!0,startsExpr:!0}),parenR:new TokenType(")"),comma:new TokenType(",",beforeExpr),semi:new TokenType(";",beforeExpr),colon:new TokenType(":",beforeExpr),dot:new TokenType("."),question:new TokenType("?",beforeExpr),questionDot:new TokenType("?."),arrow:new TokenType("=>",beforeExpr),template:new TokenType("template"),invalidTemplate:new TokenType("invalidTemplate"),ellipsis:new TokenType("...",beforeExpr),backQuote:new TokenType("`",startsExpr),dollarBraceL:new TokenType("${",{beforeExpr:!0,startsExpr:!0}),eq:new TokenType("=",{beforeExpr:!0,isAssign:!0}),assign:new TokenType("_=",{beforeExpr:!0,isAssign:!0}),incDec:new TokenType("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new TokenType("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:binop("||",1),logicalAND:binop("&&",2),bitwiseOR:binop("|",3),bitwiseXOR:binop("^",4),bitwiseAND:binop("&",5),equality:binop("==/!=/===/!==",6),relational:binop("/<=/>=",7),bitShift:binop("<>/>>>",8),plusMin:new TokenType("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:binop("%",10),star:binop("*",10),slash:binop("/",10),starstar:new TokenType("**",{beforeExpr:!0}),coalesce:binop("??",1),_break:kw("break"),_case:kw("case",beforeExpr),_catch:kw("catch"),_continue:kw("continue"),_debugger:kw("debugger"),_default:kw("default",beforeExpr),_do:kw("do",{isLoop:!0,beforeExpr:!0}),_else:kw("else",beforeExpr),_finally:kw("finally"),_for:kw("for",{isLoop:!0}),_function:kw("function",startsExpr),_if:kw("if"),_return:kw("return",beforeExpr),_switch:kw("switch"),_throw:kw("throw",beforeExpr),_try:kw("try"),_var:kw("var"),_const:kw("const"),_while:kw("while",{isLoop:!0}),_with:kw("with"),_new:kw("new",{beforeExpr:!0,startsExpr:!0}),_this:kw("this",startsExpr),_super:kw("super",startsExpr),_class:kw("class",startsExpr),_extends:kw("extends",beforeExpr),_export:kw("export"),_import:kw("import",startsExpr),_null:kw("null",startsExpr),_true:kw("true",startsExpr),_false:kw("false",startsExpr),_in:kw("in",{beforeExpr:!0,binop:7}),_instanceof:kw("instanceof",{beforeExpr:!0,binop:7}),_typeof:kw("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:kw("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:kw("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},lineBreak=/\r\n?|\n|\u2028|\u2029/,lineBreakG=new RegExp(lineBreak.source,"g"),nonASCIIwhitespace=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,skipWhiteSpace=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,ref=Object.prototype,chunk_JQQVJC7C_hasOwnProperty=ref.hasOwnProperty,chunk_JQQVJC7C_toString=ref.toString,isArray=Array.isArray||function(obj){return"[object Array]"===chunk_JQQVJC7C_toString.call(obj)},(Position=function(line,col){this.line=line,this.column=col}).prototype.offset=function(n){return new Position(this.line,this.column+n)},SourceLocation=function(p,start,end){this.start=start,this.end=end,null!==p.sourceFile&&(this.source=p.sourceFile)},defaultOptions={ecmaVersion:10,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:!1,allowHashBang:!1,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},SCOPE_VAR=1|(SCOPE_FUNCTION=2),SCOPE_ASYNC=4,SCOPE_GENERATOR=8,prototypeAccessors={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0}},(Parser=function(options,input,startPos){this.options=options=getOptions(options),this.sourceFile=options.sourceFile,this.keywords=wordsRegexp(keywords[options.ecmaVersion>=6?6:"module"===options.sourceType?"5module":5]);var reserved="";if(!0!==options.allowReserved){for(var v=options.ecmaVersion;!(reserved=reservedWords[v]);v--);"module"===options.sourceType&&(reserved+=" await")}this.reservedWords=wordsRegexp(reserved);var reservedStrict=(reserved?reserved+" ":"")+reservedWords.strict;this.reservedWordsStrict=wordsRegexp(reservedStrict),this.reservedWordsStrictBind=wordsRegexp(reservedStrict+" "+reservedWords.strictBind),this.input=String(input),this.containsEsc=!1,startPos?(this.pos=startPos,this.lineStart=this.input.lastIndexOf("\n",startPos-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(lineBreak).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=types.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===options.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports={},0===this.pos&&options.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(1),this.regexpState=null}).prototype.parse=function(){var node=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(node)},prototypeAccessors.inFunction.get=function(){return(this.currentVarScope().flags&SCOPE_FUNCTION)>0},prototypeAccessors.inGenerator.get=function(){return(this.currentVarScope().flags&SCOPE_GENERATOR)>0},prototypeAccessors.inAsync.get=function(){return(this.currentVarScope().flags&SCOPE_ASYNC)>0},prototypeAccessors.allowSuper.get=function(){return(64&this.currentThisScope().flags)>0},prototypeAccessors.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},prototypeAccessors.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},Parser.prototype.inNonArrowFunction=function(){return(this.currentThisScope().flags&SCOPE_FUNCTION)>0},Parser.extend=function(){for(var plugins=[],len=arguments.length;len--;)plugins[len]=arguments[len];for(var cls=this,i=0;i=,?^&]/.test(next)||"!"===next&&"="===this.input.charAt(end+1))}start+=match[0].length,skipWhiteSpace.lastIndex=start,start+=skipWhiteSpace.exec(this.input)[0].length,";"===this.input[start]&&start++}},pp.eat=function(type){return this.type===type&&(this.next(),!0)},pp.isContextual=function(name){return this.type===types.name&&this.value===name&&!this.containsEsc},pp.eatContextual=function(name){return!!this.isContextual(name)&&(this.next(),!0)},pp.expectContextual=function(name){this.eatContextual(name)||this.unexpected()},pp.canInsertSemicolon=function(){return this.type===types.eof||this.type===types.braceR||lineBreak.test(this.input.slice(this.lastTokEnd,this.start))},pp.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},pp.semicolon=function(){!this.eat(types.semi)&&!this.insertSemicolon()&&this.unexpected()},pp.afterTrailingComma=function(tokType,notNext){if(this.type===tokType)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),notNext||this.next(),!0},pp.expect=function(type){this.eat(type)||this.unexpected()},pp.unexpected=function(pos){this.raise(pos??this.start,"Unexpected token")},pp.checkPatternErrors=function(refDestructuringErrors,isAssign){if(refDestructuringErrors){refDestructuringErrors.trailingComma>-1&&this.raiseRecoverable(refDestructuringErrors.trailingComma,"Comma is not permitted after the rest element");var parens=isAssign?refDestructuringErrors.parenthesizedAssign:refDestructuringErrors.parenthesizedBind;parens>-1&&this.raiseRecoverable(parens,"Parenthesized pattern")}},pp.checkExpressionErrors=function(refDestructuringErrors,andThrow){if(!refDestructuringErrors)return!1;var shorthandAssign=refDestructuringErrors.shorthandAssign,doubleProto=refDestructuringErrors.doubleProto;if(!andThrow)return shorthandAssign>=0||doubleProto>=0;shorthandAssign>=0&&this.raise(shorthandAssign,"Shorthand property assignments are valid only in destructuring patterns"),doubleProto>=0&&this.raiseRecoverable(doubleProto,"Redefinition of __proto__ property")},pp.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos=6&&this.unexpected(),this.parseFunctionStatement(node,!1,!context);case types._class:return context&&this.unexpected(),this.parseClass(node,!0);case types._if:return this.parseIfStatement(node);case types._return:return this.parseReturnStatement(node);case types._switch:return this.parseSwitchStatement(node);case types._throw:return this.parseThrowStatement(node);case types._try:return this.parseTryStatement(node);case types._const:case types._var:return kind=kind||this.value,context&&"var"!==kind&&this.unexpected(),this.parseVarStatement(node,kind);case types._while:return this.parseWhileStatement(node);case types._with:return this.parseWithStatement(node);case types.braceL:return this.parseBlock(!0,node);case types.semi:return this.parseEmptyStatement(node);case types._export:case types._import:if(this.options.ecmaVersion>10&&starttype===types._import){skipWhiteSpace.lastIndex=this.pos;var skip=skipWhiteSpace.exec(this.input),next=this.pos+skip[0].length,nextCh=this.input.charCodeAt(next);if(40===nextCh||46===nextCh)return this.parseExpressionStatement(node,this.parseExpression())}return this.options.allowImportExportEverywhere||(topLevel||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),starttype===types._import?this.parseImport(node):this.parseExport(node,exports);default:if(this.isAsyncFunction())return context&&this.unexpected(),this.next(),this.parseFunctionStatement(node,!0,!context);var maybeName=this.value,expr=this.parseExpression();return starttype===types.name&&"Identifier"===expr.type&&this.eat(types.colon)?this.parseLabeledStatement(node,maybeName,expr,context):this.parseExpressionStatement(node,expr)}},pp$1.parseBreakContinueStatement=function(node,keyword){var isBreak="break"===keyword;this.next(),this.eat(types.semi)||this.insertSemicolon()?node.label=null:this.type!==types.name?this.unexpected():(node.label=this.parseIdent(),this.semicolon());for(var i=0;i=6?this.eat(types.semi):this.semicolon(),this.finishNode(node,"DoWhileStatement")},pp$1.parseForStatement=function(node){this.next();var awaitAt=this.options.ecmaVersion>=9&&(this.inAsync||!this.inFunction&&this.options.allowAwaitOutsideFunction)&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(loopLabel),this.enterScope(0),this.expect(types.parenL),this.type===types.semi)return awaitAt>-1&&this.unexpected(awaitAt),this.parseFor(node,null);var isLet=this.isLet();if(this.type===types._var||this.type===types._const||isLet){var init$1=this.startNode(),kind=isLet?"let":this.value;return this.next(),this.parseVar(init$1,!0,kind),this.finishNode(init$1,"VariableDeclaration"),(this.type===types._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===init$1.declarations.length?(this.options.ecmaVersion>=9&&(this.type===types._in?awaitAt>-1&&this.unexpected(awaitAt):node.await=awaitAt>-1),this.parseForIn(node,init$1)):(awaitAt>-1&&this.unexpected(awaitAt),this.parseFor(node,init$1))}var refDestructuringErrors=new DestructuringErrors,init=this.parseExpression(!0,refDestructuringErrors);return this.type===types._in||this.options.ecmaVersion>=6&&this.isContextual("of")?(this.options.ecmaVersion>=9&&(this.type===types._in?awaitAt>-1&&this.unexpected(awaitAt):node.await=awaitAt>-1),this.toAssignable(init,!1,refDestructuringErrors),this.checkLVal(init),this.parseForIn(node,init)):(this.checkExpressionErrors(refDestructuringErrors,!0),awaitAt>-1&&this.unexpected(awaitAt),this.parseFor(node,init))},pp$1.parseFunctionStatement=function(node,isAsync,declarationPosition){return this.next(),this.parseFunction(node,FUNC_STATEMENT|(declarationPosition?0:FUNC_HANGING_STATEMENT),!1,isAsync)},pp$1.parseIfStatement=function(node){return this.next(),node.test=this.parseParenExpression(),node.consequent=this.parseStatement("if"),node.alternate=this.eat(types._else)?this.parseStatement("if"):null,this.finishNode(node,"IfStatement")},pp$1.parseReturnStatement=function(node){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(types.semi)||this.insertSemicolon()?node.argument=null:(node.argument=this.parseExpression(),this.semicolon()),this.finishNode(node,"ReturnStatement")},pp$1.parseSwitchStatement=function(node){this.next(),node.discriminant=this.parseParenExpression(),node.cases=[],this.expect(types.braceL),this.labels.push(switchLabel),this.enterScope(0);for(var cur,sawDefault=!1;this.type!==types.braceR;)if(this.type===types._case||this.type===types._default){var isCase=this.type===types._case;cur&&this.finishNode(cur,"SwitchCase"),node.cases.push(cur=this.startNode()),cur.consequent=[],this.next(),isCase?cur.test=this.parseExpression():(sawDefault&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),sawDefault=!0,cur.test=null),this.expect(types.colon)}else cur||this.unexpected(),cur.consequent.push(this.parseStatement(null));return this.exitScope(),cur&&this.finishNode(cur,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(node,"SwitchStatement")},pp$1.parseThrowStatement=function(node){return this.next(),lineBreak.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),node.argument=this.parseExpression(),this.semicolon(),this.finishNode(node,"ThrowStatement")},empty=[],pp$1.parseTryStatement=function(node){if(this.next(),node.block=this.parseBlock(),node.handler=null,this.type===types._catch){var clause=this.startNode();if(this.next(),this.eat(types.parenL)){clause.param=this.parseBindingAtom();var simple2="Identifier"===clause.param.type;this.enterScope(simple2?32:0),this.checkLVal(clause.param,simple2?4:2),this.expect(types.parenR)}else this.options.ecmaVersion<10&&this.unexpected(),clause.param=null,this.enterScope(0);clause.body=this.parseBlock(!1),this.exitScope(),node.handler=this.finishNode(clause,"CatchClause")}return node.finalizer=this.eat(types._finally)?this.parseBlock():null,!node.handler&&!node.finalizer&&this.raise(node.start,"Missing catch or finally clause"),this.finishNode(node,"TryStatement")},pp$1.parseVarStatement=function(node,kind){return this.next(),this.parseVar(node,!1,kind),this.semicolon(),this.finishNode(node,"VariableDeclaration")},pp$1.parseWhileStatement=function(node){return this.next(),node.test=this.parseParenExpression(),this.labels.push(loopLabel),node.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(node,"WhileStatement")},pp$1.parseWithStatement=function(node){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),node.object=this.parseParenExpression(),node.body=this.parseStatement("with"),this.finishNode(node,"WithStatement")},pp$1.parseEmptyStatement=function(node){return this.next(),this.finishNode(node,"EmptyStatement")},pp$1.parseLabeledStatement=function(node,maybeName,expr,context){for(var i$1=0,list=this.labels;i$1=0;i--){var label$1=this.labels[i];if(label$1.statementStart!==node.start)break;label$1.statementStart=this.start,label$1.kind=kind}return this.labels.push({name:maybeName,kind,statementStart:this.start}),node.body=this.parseStatement(context?-1===context.indexOf("label")?context+"label":context:"label"),this.labels.pop(),node.label=expr,this.finishNode(node,"LabeledStatement")},pp$1.parseExpressionStatement=function(node,expr){return node.expression=expr,this.semicolon(),this.finishNode(node,"ExpressionStatement")},pp$1.parseBlock=function(createNewLexicalScope,node,exitStrict){for(void 0===createNewLexicalScope&&(createNewLexicalScope=!0),void 0===node&&(node=this.startNode()),node.body=[],this.expect(types.braceL),createNewLexicalScope&&this.enterScope(0);this.type!==types.braceR;){var stmt=this.parseStatement(null);node.body.push(stmt)}return exitStrict&&(this.strict=!1),this.next(),createNewLexicalScope&&this.exitScope(),this.finishNode(node,"BlockStatement")},pp$1.parseFor=function(node,init){return node.init=init,this.expect(types.semi),node.test=this.type===types.semi?null:this.parseExpression(),this.expect(types.semi),node.update=this.type===types.parenR?null:this.parseExpression(),this.expect(types.parenR),node.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(node,"ForStatement")},pp$1.parseForIn=function(node,init){var isForIn=this.type===types._in;return this.next(),"VariableDeclaration"===init.type&&null!=init.declarations[0].init&&(!isForIn||this.options.ecmaVersion<8||this.strict||"var"!==init.kind||"Identifier"!==init.declarations[0].id.type)?this.raise(init.start,(isForIn?"for-in":"for-of")+" loop variable declaration may not have an initializer"):"AssignmentPattern"===init.type&&this.raise(init.start,"Invalid left-hand side in for-loop"),node.left=init,node.right=isForIn?this.parseExpression():this.parseMaybeAssign(),this.expect(types.parenR),node.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(node,isForIn?"ForInStatement":"ForOfStatement")},pp$1.parseVar=function(node,isFor,kind){for(node.declarations=[],node.kind=kind;;){var decl=this.startNode();if(this.parseVarId(decl,kind),this.eat(types.eq)?decl.init=this.parseMaybeAssign(isFor):"const"!==kind||this.type===types._in||this.options.ecmaVersion>=6&&this.isContextual("of")?"Identifier"===decl.id.type||isFor&&(this.type===types._in||this.isContextual("of"))?decl.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),node.declarations.push(this.finishNode(decl,"VariableDeclarator")),!this.eat(types.comma))break}return node},pp$1.parseVarId=function(decl,kind){decl.id=this.parseBindingAtom(),this.checkLVal(decl.id,"var"===kind?1:2,!1)},FUNC_STATEMENT=1,FUNC_HANGING_STATEMENT=2,pp$1.parseFunction=function(node,statement,allowExpressionBody,isAsync){this.initFunction(node),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!isAsync)&&(this.type===types.star&&statement&FUNC_HANGING_STATEMENT&&this.unexpected(),node.generator=this.eat(types.star)),this.options.ecmaVersion>=8&&(node.async=!!isAsync),statement&FUNC_STATEMENT&&(node.id=4&statement&&this.type!==types.name?null:this.parseIdent(),node.id&&!(statement&FUNC_HANGING_STATEMENT)&&this.checkLVal(node.id,this.strict||node.generator||node.async?this.treatFunctionsAsVar?1:2:3));var oldYieldPos=this.yieldPos,oldAwaitPos=this.awaitPos,oldAwaitIdentPos=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(functionFlags(node.async,node.generator)),statement&FUNC_STATEMENT||(node.id=this.type===types.name?this.parseIdent():null),this.parseFunctionParams(node),this.parseFunctionBody(node,allowExpressionBody,!1),this.yieldPos=oldYieldPos,this.awaitPos=oldAwaitPos,this.awaitIdentPos=oldAwaitIdentPos,this.finishNode(node,statement&FUNC_STATEMENT?"FunctionDeclaration":"FunctionExpression")},pp$1.parseFunctionParams=function(node){this.expect(types.parenL),node.params=this.parseBindingList(types.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},pp$1.parseClass=function(node,isStatement){this.next();var oldStrict=this.strict;this.strict=!0,this.parseClassId(node,isStatement),this.parseClassSuper(node);var classBody=this.startNode(),hadConstructor=!1;for(classBody.body=[],this.expect(types.braceL);this.type!==types.braceR;){var element=this.parseClassElement(null!==node.superClass);element&&(classBody.body.push(element),"MethodDefinition"===element.type&&"constructor"===element.kind&&(hadConstructor&&this.raise(element.start,"Duplicate constructor in the same class"),hadConstructor=!0))}return this.strict=oldStrict,this.next(),node.body=this.finishNode(classBody,"ClassBody"),this.finishNode(node,isStatement?"ClassDeclaration":"ClassExpression")},pp$1.parseClassElement=function(constructorAllowsSuper){var this$1$1=this;if(this.eat(types.semi))return null;var method=this.startNode(),tryContextual=function(k,noLineBreak){void 0===noLineBreak&&(noLineBreak=!1);var start=this$1$1.start,startLoc=this$1$1.startLoc;return!!this$1$1.eatContextual(k)&&(!(this$1$1.type===types.parenL||noLineBreak&&this$1$1.canInsertSemicolon())||(method.key&&this$1$1.unexpected(),method.computed=!1,method.key=this$1$1.startNodeAt(start,startLoc),method.key.name=k,this$1$1.finishNode(method.key,"Identifier"),!1))};method.kind="method",method.static=tryContextual("static");var isGenerator=this.eat(types.star),isAsync=!1;isGenerator||(this.options.ecmaVersion>=8&&tryContextual("async",!0)?(isAsync=!0,isGenerator=this.options.ecmaVersion>=9&&this.eat(types.star)):tryContextual("get")?method.kind="get":tryContextual("set")&&(method.kind="set")),method.key||this.parsePropertyName(method);var key=method.key,allowsDirectSuper=!1;return method.computed||method.static||!("Identifier"===key.type&&"constructor"===key.name||"Literal"===key.type&&"constructor"===key.value)?method.static&&"Identifier"===key.type&&"prototype"===key.name&&this.raise(key.start,"Classes may not have a static property named prototype"):("method"!==method.kind&&this.raise(key.start,"Constructor can't have get/set modifier"),isGenerator&&this.raise(key.start,"Constructor can't be a generator"),isAsync&&this.raise(key.start,"Constructor can't be an async method"),method.kind="constructor",allowsDirectSuper=constructorAllowsSuper),this.parseClassMethod(method,isGenerator,isAsync,allowsDirectSuper),"get"===method.kind&&0!==method.value.params.length&&this.raiseRecoverable(method.value.start,"getter should have no params"),"set"===method.kind&&1!==method.value.params.length&&this.raiseRecoverable(method.value.start,"setter should have exactly one param"),"set"===method.kind&&"RestElement"===method.value.params[0].type&&this.raiseRecoverable(method.value.params[0].start,"Setter cannot use rest params"),method},pp$1.parseClassMethod=function(method,isGenerator,isAsync,allowsDirectSuper){return method.value=this.parseMethod(isGenerator,isAsync,allowsDirectSuper),this.finishNode(method,"MethodDefinition")},pp$1.parseClassId=function(node,isStatement){this.type===types.name?(node.id=this.parseIdent(),isStatement&&this.checkLVal(node.id,2,!1)):(!0===isStatement&&this.unexpected(),node.id=null)},pp$1.parseClassSuper=function(node){node.superClass=this.eat(types._extends)?this.parseExprSubscripts():null},pp$1.parseExport=function(node,exports){if(this.next(),this.eat(types.star))return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(node.exported=this.parseIdent(!0),this.checkExport(exports,node.exported.name,this.lastTokStart)):node.exported=null),this.expectContextual("from"),this.type!==types.string&&this.unexpected(),node.source=this.parseExprAtom(),this.semicolon(),this.finishNode(node,"ExportAllDeclaration");if(this.eat(types._default)){var isAsync;if(this.checkExport(exports,"default",this.lastTokStart),this.type===types._function||(isAsync=this.isAsyncFunction())){var fNode=this.startNode();this.next(),isAsync&&this.next(),node.declaration=this.parseFunction(fNode,4|FUNC_STATEMENT,!1,isAsync)}else if(this.type===types._class){var cNode=this.startNode();node.declaration=this.parseClass(cNode,"nullableID")}else node.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(node,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())node.declaration=this.parseStatement(null),"VariableDeclaration"===node.declaration.type?this.checkVariableExport(exports,node.declaration.declarations):this.checkExport(exports,node.declaration.id.name,node.declaration.id.start),node.specifiers=[],node.source=null;else{if(node.declaration=null,node.specifiers=this.parseExportSpecifiers(exports),this.eatContextual("from"))this.type!==types.string&&this.unexpected(),node.source=this.parseExprAtom();else{for(var i=0,list=node.specifiers;i=6&&node)switch(node.type){case"Identifier":this.inAsync&&"await"===node.name&&this.raise(node.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"RestElement":break;case"ObjectExpression":node.type="ObjectPattern",refDestructuringErrors&&this.checkPatternErrors(refDestructuringErrors,!0);for(var i=0,list=node.properties;i=8&&!containsEsc&&"async"===id.name&&!this.canInsertSemicolon()&&this.eat(types._function))return this.parseFunction(this.startNodeAt(startPos,startLoc),0,!1,!0);if(canBeArrow&&!this.canInsertSemicolon()){if(this.eat(types.arrow))return this.parseArrowExpression(this.startNodeAt(startPos,startLoc),[id],!1);if(this.options.ecmaVersion>=8&&"async"===id.name&&this.type===types.name&&!containsEsc)return id=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(types.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(startPos,startLoc),[id],!0)}return id;case types.regexp:var value=this.value;return(node=this.parseLiteral(value.value)).regex={pattern:value.pattern,flags:value.flags},node;case types.num:case types.string:return this.parseLiteral(this.value);case types._null:case types._true:case types._false:return(node=this.startNode()).value=this.type===types._null?null:this.type===types._true,node.raw=this.type.keyword,this.next(),this.finishNode(node,"Literal");case types.parenL:var start=this.start,expr=this.parseParenAndDistinguishExpression(canBeArrow);return refDestructuringErrors&&(refDestructuringErrors.parenthesizedAssign<0&&!this.isSimpleAssignTarget(expr)&&(refDestructuringErrors.parenthesizedAssign=start),refDestructuringErrors.parenthesizedBind<0&&(refDestructuringErrors.parenthesizedBind=start)),expr;case types.bracketL:return node=this.startNode(),this.next(),node.elements=this.parseExprList(types.bracketR,!0,!0,refDestructuringErrors),this.finishNode(node,"ArrayExpression");case types.braceL:return this.parseObj(!1,refDestructuringErrors);case types._function:return node=this.startNode(),this.next(),this.parseFunction(node,0);case types._class:return this.parseClass(this.startNode(),!1);case types._new:return this.parseNew();case types.backQuote:return this.parseTemplate();case types._import:return this.options.ecmaVersion>=11?this.parseExprImport():this.unexpected();default:this.unexpected()}},pp$3.parseExprImport=function(){var node=this.startNode();this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import");var meta=this.parseIdent(!0);switch(this.type){case types.parenL:return this.parseDynamicImport(node);case types.dot:return node.meta=meta,this.parseImportMeta(node);default:this.unexpected()}},pp$3.parseDynamicImport=function(node){if(this.next(),node.source=this.parseMaybeAssign(),!this.eat(types.parenR)){var errorPos=this.start;this.eat(types.comma)&&this.eat(types.parenR)?this.raiseRecoverable(errorPos,"Trailing comma is not allowed in import()"):this.unexpected(errorPos)}return this.finishNode(node,"ImportExpression")},pp$3.parseImportMeta=function(node){this.next();var containsEsc=this.containsEsc;return node.property=this.parseIdent(!0),"meta"!==node.property.name&&this.raiseRecoverable(node.property.start,"The only valid meta property for import is 'import.meta'"),containsEsc&&this.raiseRecoverable(node.start,"'import.meta' must not contain escaped characters"),"module"!==this.options.sourceType&&this.raiseRecoverable(node.start,"Cannot use 'import.meta' outside a module"),this.finishNode(node,"MetaProperty")},pp$3.parseLiteral=function(value){var node=this.startNode();return node.value=value,node.raw=this.input.slice(this.start,this.end),110===node.raw.charCodeAt(node.raw.length-1)&&(node.bigint=node.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(node,"Literal")},pp$3.parseParenExpression=function(){this.expect(types.parenL);var val=this.parseExpression();return this.expect(types.parenR),val},pp$3.parseParenAndDistinguishExpression=function(canBeArrow){var val,startPos=this.start,startLoc=this.startLoc,allowTrailingComma=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var spreadStart,innerStartPos=this.start,innerStartLoc=this.startLoc,exprList=[],first=!0,lastIsComma=!1,refDestructuringErrors=new DestructuringErrors,oldYieldPos=this.yieldPos,oldAwaitPos=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==types.parenR;){if(first?first=!1:this.expect(types.comma),allowTrailingComma&&this.afterTrailingComma(types.parenR,!0)){lastIsComma=!0;break}if(this.type===types.ellipsis){spreadStart=this.start,exprList.push(this.parseParenItem(this.parseRestBinding())),this.type===types.comma&&this.raise(this.start,"Comma is not permitted after the rest element");break}exprList.push(this.parseMaybeAssign(!1,refDestructuringErrors,this.parseParenItem))}var innerEndPos=this.start,innerEndLoc=this.startLoc;if(this.expect(types.parenR),canBeArrow&&!this.canInsertSemicolon()&&this.eat(types.arrow))return this.checkPatternErrors(refDestructuringErrors,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=oldYieldPos,this.awaitPos=oldAwaitPos,this.parseParenArrowList(startPos,startLoc,exprList);(!exprList.length||lastIsComma)&&this.unexpected(this.lastTokStart),spreadStart&&this.unexpected(spreadStart),this.checkExpressionErrors(refDestructuringErrors,!0),this.yieldPos=oldYieldPos||this.yieldPos,this.awaitPos=oldAwaitPos||this.awaitPos,exprList.length>1?((val=this.startNodeAt(innerStartPos,innerStartLoc)).expressions=exprList,this.finishNodeAt(val,"SequenceExpression",innerEndPos,innerEndLoc)):val=exprList[0]}else val=this.parseParenExpression();if(this.options.preserveParens){var par=this.startNodeAt(startPos,startLoc);return par.expression=val,this.finishNode(par,"ParenthesizedExpression")}return val},pp$3.parseParenItem=function(item){return item},pp$3.parseParenArrowList=function(startPos,startLoc,exprList){return this.parseArrowExpression(this.startNodeAt(startPos,startLoc),exprList)},empty$1=[],pp$3.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var node=this.startNode(),meta=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(types.dot)){node.meta=meta;var containsEsc=this.containsEsc;return node.property=this.parseIdent(!0),"target"!==node.property.name&&this.raiseRecoverable(node.property.start,"The only valid meta property for new is 'new.target'"),containsEsc&&this.raiseRecoverable(node.start,"'new.target' must not contain escaped characters"),this.inNonArrowFunction()||this.raiseRecoverable(node.start,"'new.target' can only be used in functions"),this.finishNode(node,"MetaProperty")}var startPos=this.start,startLoc=this.startLoc,isImport=this.type===types._import;return node.callee=this.parseSubscripts(this.parseExprAtom(),startPos,startLoc,!0),isImport&&"ImportExpression"===node.callee.type&&this.raise(startPos,"Cannot use new with import()"),this.eat(types.parenL)?node.arguments=this.parseExprList(types.parenR,this.options.ecmaVersion>=8,!1):node.arguments=empty$1,this.finishNode(node,"NewExpression")},pp$3.parseTemplateElement=function(ref2){var isTagged=ref2.isTagged,elem=this.startNode();return this.type===types.invalidTemplate?(isTagged||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),elem.value={raw:this.value,cooked:null}):elem.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),elem.tail=this.type===types.backQuote,this.finishNode(elem,"TemplateElement")},pp$3.parseTemplate=function(ref2){void 0===ref2&&(ref2={});var isTagged=ref2.isTagged;void 0===isTagged&&(isTagged=!1);var node=this.startNode();this.next(),node.expressions=[];var curElt=this.parseTemplateElement({isTagged});for(node.quasis=[curElt];!curElt.tail;)this.type===types.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(types.dollarBraceL),node.expressions.push(this.parseExpression()),this.expect(types.braceR),node.quasis.push(curElt=this.parseTemplateElement({isTagged}));return this.next(),this.finishNode(node,"TemplateLiteral")},pp$3.isAsyncProp=function(prop){return!prop.computed&&"Identifier"===prop.key.type&&"async"===prop.key.name&&(this.type===types.name||this.type===types.num||this.type===types.string||this.type===types.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===types.star)&&!lineBreak.test(this.input.slice(this.lastTokEnd,this.start))},pp$3.parseObj=function(isPattern,refDestructuringErrors){var node=this.startNode(),first=!0,propHash={};for(node.properties=[],this.next();!this.eat(types.braceR);){if(first)first=!1;else if(this.expect(types.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(types.braceR))break;var prop=this.parseProperty(isPattern,refDestructuringErrors);isPattern||this.checkPropClash(prop,propHash,refDestructuringErrors),node.properties.push(prop)}return this.finishNode(node,isPattern?"ObjectPattern":"ObjectExpression")},pp$3.parseProperty=function(isPattern,refDestructuringErrors){var isGenerator,isAsync,startPos,startLoc,prop=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(types.ellipsis))return isPattern?(prop.argument=this.parseIdent(!1),this.type===types.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.finishNode(prop,"RestElement")):(this.type===types.parenL&&refDestructuringErrors&&(refDestructuringErrors.parenthesizedAssign<0&&(refDestructuringErrors.parenthesizedAssign=this.start),refDestructuringErrors.parenthesizedBind<0&&(refDestructuringErrors.parenthesizedBind=this.start)),prop.argument=this.parseMaybeAssign(!1,refDestructuringErrors),this.type===types.comma&&refDestructuringErrors&&refDestructuringErrors.trailingComma<0&&(refDestructuringErrors.trailingComma=this.start),this.finishNode(prop,"SpreadElement"));this.options.ecmaVersion>=6&&(prop.method=!1,prop.shorthand=!1,(isPattern||refDestructuringErrors)&&(startPos=this.start,startLoc=this.startLoc),isPattern||(isGenerator=this.eat(types.star)));var containsEsc=this.containsEsc;return this.parsePropertyName(prop),!isPattern&&!containsEsc&&this.options.ecmaVersion>=8&&!isGenerator&&this.isAsyncProp(prop)?(isAsync=!0,isGenerator=this.options.ecmaVersion>=9&&this.eat(types.star),this.parsePropertyName(prop,refDestructuringErrors)):isAsync=!1,this.parsePropertyValue(prop,isPattern,isGenerator,isAsync,startPos,startLoc,refDestructuringErrors,containsEsc),this.finishNode(prop,"Property")},pp$3.parsePropertyValue=function(prop,isPattern,isGenerator,isAsync,startPos,startLoc,refDestructuringErrors,containsEsc){if((isGenerator||isAsync)&&this.type===types.colon&&this.unexpected(),this.eat(types.colon))prop.value=isPattern?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,refDestructuringErrors),prop.kind="init";else if(this.options.ecmaVersion>=6&&this.type===types.parenL)isPattern&&this.unexpected(),prop.kind="init",prop.method=!0,prop.value=this.parseMethod(isGenerator,isAsync);else if(isPattern||containsEsc||!(this.options.ecmaVersion>=5)||prop.computed||"Identifier"!==prop.key.type||"get"!==prop.key.name&&"set"!==prop.key.name||this.type===types.comma||this.type===types.braceR||this.type===types.eq)this.options.ecmaVersion>=6&&!prop.computed&&"Identifier"===prop.key.type?((isGenerator||isAsync)&&this.unexpected(),this.checkUnreserved(prop.key),"await"===prop.key.name&&!this.awaitIdentPos&&(this.awaitIdentPos=startPos),prop.kind="init",isPattern?prop.value=this.parseMaybeDefault(startPos,startLoc,prop.key):this.type===types.eq&&refDestructuringErrors?(refDestructuringErrors.shorthandAssign<0&&(refDestructuringErrors.shorthandAssign=this.start),prop.value=this.parseMaybeDefault(startPos,startLoc,prop.key)):prop.value=prop.key,prop.shorthand=!0):this.unexpected();else{(isGenerator||isAsync)&&this.unexpected(),prop.kind=prop.key.name,this.parsePropertyName(prop),prop.value=this.parseMethod(!1);var paramCount="get"===prop.kind?0:1;if(prop.value.params.length!==paramCount){var start=prop.value.start;"get"===prop.kind?this.raiseRecoverable(start,"getter should have no params"):this.raiseRecoverable(start,"setter should have exactly one param")}else"set"===prop.kind&&"RestElement"===prop.value.params[0].type&&this.raiseRecoverable(prop.value.params[0].start,"Setter cannot use rest params")}},pp$3.parsePropertyName=function(prop){if(this.options.ecmaVersion>=6){if(this.eat(types.bracketL))return prop.computed=!0,prop.key=this.parseMaybeAssign(),this.expect(types.bracketR),prop.key;prop.computed=!1}return prop.key=this.type===types.num||this.type===types.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved)},pp$3.initFunction=function(node){node.id=null,this.options.ecmaVersion>=6&&(node.generator=node.expression=!1),this.options.ecmaVersion>=8&&(node.async=!1)},pp$3.parseMethod=function(isGenerator,isAsync,allowDirectSuper){var node=this.startNode(),oldYieldPos=this.yieldPos,oldAwaitPos=this.awaitPos,oldAwaitIdentPos=this.awaitIdentPos;return this.initFunction(node),this.options.ecmaVersion>=6&&(node.generator=isGenerator),this.options.ecmaVersion>=8&&(node.async=!!isAsync),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(64|functionFlags(isAsync,node.generator)|(allowDirectSuper?128:0)),this.expect(types.parenL),node.params=this.parseBindingList(types.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(node,!1,!0),this.yieldPos=oldYieldPos,this.awaitPos=oldAwaitPos,this.awaitIdentPos=oldAwaitIdentPos,this.finishNode(node,"FunctionExpression")},pp$3.parseArrowExpression=function(node,params,isAsync){var oldYieldPos=this.yieldPos,oldAwaitPos=this.awaitPos,oldAwaitIdentPos=this.awaitIdentPos;return this.enterScope(16|functionFlags(isAsync,!1)),this.initFunction(node),this.options.ecmaVersion>=8&&(node.async=!!isAsync),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,node.params=this.toAssignableList(params,!0),this.parseFunctionBody(node,!0,!1),this.yieldPos=oldYieldPos,this.awaitPos=oldAwaitPos,this.awaitIdentPos=oldAwaitIdentPos,this.finishNode(node,"ArrowFunctionExpression")},pp$3.parseFunctionBody=function(node,isArrowFunction,isMethod){var isExpression=isArrowFunction&&this.type!==types.braceL,oldStrict=this.strict,useStrict=!1;if(isExpression)node.body=this.parseMaybeAssign(),node.expression=!0,this.checkParams(node,!1);else{var nonSimple=this.options.ecmaVersion>=7&&!this.isSimpleParamList(node.params);(!oldStrict||nonSimple)&&((useStrict=this.strictDirective(this.end))&&nonSimple&&this.raiseRecoverable(node.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var oldLabels=this.labels;this.labels=[],useStrict&&(this.strict=!0),this.checkParams(node,!oldStrict&&!useStrict&&!isArrowFunction&&!isMethod&&this.isSimpleParamList(node.params)),this.strict&&node.id&&this.checkLVal(node.id,5),node.body=this.parseBlock(!1,void 0,useStrict&&!oldStrict),node.expression=!1,this.adaptDirectivePrologue(node.body.body),this.labels=oldLabels}this.exitScope()},pp$3.isSimpleParamList=function(params){for(var i=0,list=params;i-1||scope.functions.indexOf(name)>-1||scope.var.indexOf(name)>-1,scope.lexical.push(name),this.inModule&&1&scope.flags&&delete this.undefinedExports[name]}else if(4===bindingType){this.currentScope().lexical.push(name)}else if(3===bindingType){var scope$2=this.currentScope();redeclared=this.treatFunctionsAsVar?scope$2.lexical.indexOf(name)>-1:scope$2.lexical.indexOf(name)>-1||scope$2.var.indexOf(name)>-1,scope$2.functions.push(name)}else for(var i=this.scopeStack.length-1;i>=0;--i){var scope$3=this.scopeStack[i];if(scope$3.lexical.indexOf(name)>-1&&!(32&scope$3.flags&&scope$3.lexical[0]===name)||!this.treatFunctionsAsVarInScope(scope$3)&&scope$3.functions.indexOf(name)>-1){redeclared=!0;break}if(scope$3.var.push(name),this.inModule&&1&scope$3.flags&&delete this.undefinedExports[name],scope$3.flags&SCOPE_VAR)break}redeclared&&this.raiseRecoverable(pos,"Identifier '"+name+"' has already been declared")},pp$5.checkLocalExport=function(id){-1===this.scopeStack[0].lexical.indexOf(id.name)&&-1===this.scopeStack[0].var.indexOf(id.name)&&(this.undefinedExports[id.name]=id)},pp$5.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},pp$5.currentVarScope=function(){for(var i=this.scopeStack.length-1;;i--){var scope=this.scopeStack[i];if(scope.flags&SCOPE_VAR)return scope}},pp$5.currentThisScope=function(){for(var i=this.scopeStack.length-1;;i--){var scope=this.scopeStack[i];if(scope.flags&SCOPE_VAR&&!(16&scope.flags))return scope}},Node=function(parser,pos,loc){this.type="",this.start=pos,this.end=0,parser.options.locations&&(this.loc=new SourceLocation(parser,loc)),parser.options.directSourceFile&&(this.sourceFile=parser.options.directSourceFile),parser.options.ranges&&(this.range=[pos,0])},(pp$6=Parser.prototype).startNode=function(){return new Node(this,this.start,this.startLoc)},pp$6.startNodeAt=function(pos,loc){return new Node(this,pos,loc)},pp$6.finishNode=function(node,type){return finishNodeAt.call(this,node,type,this.lastTokEnd,this.lastTokEndLoc)},pp$6.finishNodeAt=function(node,type,pos,loc){return finishNodeAt.call(this,node,type,pos,loc)},types$1={b_stat:new(TokContext=function(token,isExpr,preserveSpace,override,generator){this.token=token,this.isExpr=!!isExpr,this.preserveSpace=!!preserveSpace,this.override=override,this.generator=!!generator})("{",!1),b_expr:new TokContext("{",!0),b_tmpl:new TokContext("${",!1),p_stat:new TokContext("(",!1),p_expr:new TokContext("(",!0),q_tmpl:new TokContext("`",!0,!0,(function(p){return p.tryReadTemplateToken()})),f_stat:new TokContext("function",!1),f_expr:new TokContext("function",!0),f_expr_gen:new TokContext("function",!0,!1,null,!0),f_gen:new TokContext("function",!1,!1,null,!0)},(pp$7=Parser.prototype).initialContext=function(){return[types$1.b_stat]},pp$7.braceIsBlock=function(prevType){var parent=this.curContext();return parent===types$1.f_expr||parent===types$1.f_stat||(prevType!==types.colon||parent!==types$1.b_stat&&parent!==types$1.b_expr?prevType===types._return||prevType===types.name&&this.exprAllowed?lineBreak.test(this.input.slice(this.lastTokEnd,this.start)):prevType===types._else||prevType===types.semi||prevType===types.eof||prevType===types.parenR||prevType===types.arrow||(prevType===types.braceL?parent===types$1.b_stat:prevType!==types._var&&prevType!==types._const&&prevType!==types.name&&!this.exprAllowed):!parent.isExpr)},pp$7.inGeneratorContext=function(){for(var i=this.context.length-1;i>=1;i--){var context=this.context[i];if("function"===context.token)return context.generator}return!1},pp$7.updateContext=function(prevType){var update,type=this.type;type.keyword&&prevType===types.dot?this.exprAllowed=!1:(update=type.updateContext)?update.call(this,prevType):this.exprAllowed=type.beforeExpr},types.parenR.updateContext=types.braceR.updateContext=function(){if(1!==this.context.length){var out=this.context.pop();out===types$1.b_stat&&"function"===this.curContext().token&&(out=this.context.pop()),this.exprAllowed=!out.isExpr}else this.exprAllowed=!0},types.braceL.updateContext=function(prevType){this.context.push(this.braceIsBlock(prevType)?types$1.b_stat:types$1.b_expr),this.exprAllowed=!0},types.dollarBraceL.updateContext=function(){this.context.push(types$1.b_tmpl),this.exprAllowed=!0},types.parenL.updateContext=function(prevType){var statementParens=prevType===types._if||prevType===types._for||prevType===types._with||prevType===types._while;this.context.push(statementParens?types$1.p_stat:types$1.p_expr),this.exprAllowed=!0},types.incDec.updateContext=function(){},types._function.updateContext=types._class.updateContext=function(prevType){!prevType.beforeExpr||prevType===types.semi||prevType===types._else||prevType===types._return&&lineBreak.test(this.input.slice(this.lastTokEnd,this.start))||(prevType===types.colon||prevType===types.braceL)&&this.curContext()===types$1.b_stat?this.context.push(types$1.f_stat):this.context.push(types$1.f_expr),this.exprAllowed=!1},types.backQuote.updateContext=function(){this.curContext()===types$1.q_tmpl?this.context.pop():this.context.push(types$1.q_tmpl),this.exprAllowed=!1},types.star.updateContext=function(prevType){if(prevType===types._function){var index=this.context.length-1;this.context[index]===types$1.f_expr?this.context[index]=types$1.f_expr_gen:this.context[index]=types$1.f_gen}this.exprAllowed=!0},types.name.updateContext=function(prevType){var allowed=!1;this.options.ecmaVersion>=6&&prevType!==types.dot&&("of"===this.value&&!this.exprAllowed||"yield"===this.value&&this.inGeneratorContext())&&(allowed=!0),this.exprAllowed=allowed},unicodeBinaryProperties={9:ecma9BinaryProperties="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",10:ecma10BinaryProperties=ecma9BinaryProperties+" Extended_Pictographic",11:ecma10BinaryProperties},unicodeGeneralCategoryValues="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",unicodeScriptValues={9:ecma9ScriptValues="Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",10:ecma10ScriptValues=ecma9ScriptValues+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",11:ecma10ScriptValues+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho"},data={},buildUnicodeData(9),buildUnicodeData(10),buildUnicodeData(11),pp$8=Parser.prototype,(RegExpValidationState=function(parser){this.parser=parser,this.validFlags="gim"+(parser.options.ecmaVersion>=6?"uy":"")+(parser.options.ecmaVersion>=9?"s":""),this.unicodeProperties=data[parser.options.ecmaVersion>=11?11:parser.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]}).prototype.reset=function(start,pattern,flags){var unicode=-1!==flags.indexOf("u");this.start=0|start,this.source=pattern+"",this.flags=flags,this.switchU=unicode&&this.parser.options.ecmaVersion>=6,this.switchN=unicode&&this.parser.options.ecmaVersion>=9},RegExpValidationState.prototype.raise=function(message){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+message)},RegExpValidationState.prototype.at=function(i,forceU){void 0===forceU&&(forceU=!1);var s=this.source,l=s.length;if(i>=l)return-1;var c=s.charCodeAt(i);if(!forceU&&!this.switchU||c<=55295||c>=57344||i+1>=l)return c;var next=s.charCodeAt(i+1);return next>=56320&&next<=57343?(c<<10)+next-56613888:c},RegExpValidationState.prototype.nextIndex=function(i,forceU){void 0===forceU&&(forceU=!1);var s=this.source,l=s.length;if(i>=l)return l;var next,c=s.charCodeAt(i);return!forceU&&!this.switchU||c<=55295||c>=57344||i+1>=l||(next=s.charCodeAt(i+1))<56320||next>57343?i+1:i+2},RegExpValidationState.prototype.current=function(forceU){return void 0===forceU&&(forceU=!1),this.at(this.pos,forceU)},RegExpValidationState.prototype.lookahead=function(forceU){return void 0===forceU&&(forceU=!1),this.at(this.nextIndex(this.pos,forceU),forceU)},RegExpValidationState.prototype.advance=function(forceU){void 0===forceU&&(forceU=!1),this.pos=this.nextIndex(this.pos,forceU)},RegExpValidationState.prototype.eat=function(ch,forceU){return void 0===forceU&&(forceU=!1),this.current(forceU)===ch&&(this.advance(forceU),!0)},pp$8.validateRegExpFlags=function(state){for(var validFlags=state.validFlags,flags=state.flags,i=0;i-1&&this.raise(state.start,"Duplicate regular expression flag")}},pp$8.validateRegExpPattern=function(state){this.regexp_pattern(state),!state.switchN&&this.options.ecmaVersion>=9&&state.groupNames.length>0&&(state.switchN=!0,this.regexp_pattern(state))},pp$8.regexp_pattern=function(state){state.pos=0,state.lastIntValue=0,state.lastStringValue="",state.lastAssertionIsQuantifiable=!1,state.numCapturingParens=0,state.maxBackReference=0,state.groupNames.length=0,state.backReferenceNames.length=0,this.regexp_disjunction(state),state.pos!==state.source.length&&(state.eat(41)&&state.raise("Unmatched ')'"),(state.eat(93)||state.eat(125))&&state.raise("Lone quantifier brackets")),state.maxBackReference>state.numCapturingParens&&state.raise("Invalid escape");for(var i=0,list=state.backReferenceNames;i=9&&(lookbehind=state.eat(60)),state.eat(61)||state.eat(33))return this.regexp_disjunction(state),state.eat(41)||state.raise("Unterminated group"),state.lastAssertionIsQuantifiable=!lookbehind,!0}return state.pos=start,!1},pp$8.regexp_eatQuantifier=function(state,noError){return void 0===noError&&(noError=!1),!!this.regexp_eatQuantifierPrefix(state,noError)&&(state.eat(63),!0)},pp$8.regexp_eatQuantifierPrefix=function(state,noError){return state.eat(42)||state.eat(43)||state.eat(63)||this.regexp_eatBracedQuantifier(state,noError)},pp$8.regexp_eatBracedQuantifier=function(state,noError){var start=state.pos;if(state.eat(123)){var min=0,max=-1;if(this.regexp_eatDecimalDigits(state)&&(min=state.lastIntValue,state.eat(44)&&this.regexp_eatDecimalDigits(state)&&(max=state.lastIntValue),state.eat(125)))return-1!==max&&max=9?this.regexp_groupSpecifier(state):63===state.current()&&state.raise("Invalid group"),this.regexp_disjunction(state),state.eat(41))return state.numCapturingParens+=1,!0;state.raise("Unterminated group")}return!1},pp$8.regexp_eatExtendedAtom=function(state){return state.eat(46)||this.regexp_eatReverseSolidusAtomEscape(state)||this.regexp_eatCharacterClass(state)||this.regexp_eatUncapturingGroup(state)||this.regexp_eatCapturingGroup(state)||this.regexp_eatInvalidBracedQuantifier(state)||this.regexp_eatExtendedPatternCharacter(state)},pp$8.regexp_eatInvalidBracedQuantifier=function(state){return this.regexp_eatBracedQuantifier(state,!0)&&state.raise("Nothing to repeat"),!1},pp$8.regexp_eatSyntaxCharacter=function(state){var ch=state.current();return!!isSyntaxCharacter(ch)&&(state.lastIntValue=ch,state.advance(),!0)},pp$8.regexp_eatPatternCharacters=function(state){for(var start=state.pos,ch=0;-1!==(ch=state.current())&&!isSyntaxCharacter(ch);)state.advance();return state.pos!==start},pp$8.regexp_eatExtendedPatternCharacter=function(state){var ch=state.current();return!(-1===ch||36===ch||ch>=40&&ch<=43||46===ch||63===ch||91===ch||94===ch||124===ch)&&(state.advance(),!0)},pp$8.regexp_groupSpecifier=function(state){if(state.eat(63)){if(this.regexp_eatGroupName(state))return-1!==state.groupNames.indexOf(state.lastStringValue)&&state.raise("Duplicate capture group name"),void state.groupNames.push(state.lastStringValue);state.raise("Invalid group")}},pp$8.regexp_eatGroupName=function(state){if(state.lastStringValue="",state.eat(60)){if(this.regexp_eatRegExpIdentifierName(state)&&state.eat(62))return!0;state.raise("Invalid capture group name")}return!1},pp$8.regexp_eatRegExpIdentifierName=function(state){if(state.lastStringValue="",this.regexp_eatRegExpIdentifierStart(state)){for(state.lastStringValue+=codePointToString(state.lastIntValue);this.regexp_eatRegExpIdentifierPart(state);)state.lastStringValue+=codePointToString(state.lastIntValue);return!0}return!1},pp$8.regexp_eatRegExpIdentifierStart=function(state){var start=state.pos,forceU=this.options.ecmaVersion>=11,ch=state.current(forceU);return state.advance(forceU),92===ch&&this.regexp_eatRegExpUnicodeEscapeSequence(state,forceU)&&(ch=state.lastIntValue),function isRegExpIdentifierStart(ch){return isIdentifierStart(ch,!0)||36===ch||95===ch}(ch)?(state.lastIntValue=ch,!0):(state.pos=start,!1)},pp$8.regexp_eatRegExpIdentifierPart=function(state){var start=state.pos,forceU=this.options.ecmaVersion>=11,ch=state.current(forceU);return state.advance(forceU),92===ch&&this.regexp_eatRegExpUnicodeEscapeSequence(state,forceU)&&(ch=state.lastIntValue),function isRegExpIdentifierPart(ch){return isIdentifierChar(ch,!0)||36===ch||95===ch||8204===ch||8205===ch}(ch)?(state.lastIntValue=ch,!0):(state.pos=start,!1)},pp$8.regexp_eatAtomEscape=function(state){return!!(this.regexp_eatBackReference(state)||this.regexp_eatCharacterClassEscape(state)||this.regexp_eatCharacterEscape(state)||state.switchN&&this.regexp_eatKGroupName(state))||(state.switchU&&(99===state.current()&&state.raise("Invalid unicode escape"),state.raise("Invalid escape")),!1)},pp$8.regexp_eatBackReference=function(state){var start=state.pos;if(this.regexp_eatDecimalEscape(state)){var n=state.lastIntValue;if(state.switchU)return n>state.maxBackReference&&(state.maxBackReference=n),!0;if(n<=state.numCapturingParens)return!0;state.pos=start}return!1},pp$8.regexp_eatKGroupName=function(state){if(state.eat(107)){if(this.regexp_eatGroupName(state))return state.backReferenceNames.push(state.lastStringValue),!0;state.raise("Invalid named reference")}return!1},pp$8.regexp_eatCharacterEscape=function(state){return this.regexp_eatControlEscape(state)||this.regexp_eatCControlLetter(state)||this.regexp_eatZero(state)||this.regexp_eatHexEscapeSequence(state)||this.regexp_eatRegExpUnicodeEscapeSequence(state,!1)||!state.switchU&&this.regexp_eatLegacyOctalEscapeSequence(state)||this.regexp_eatIdentityEscape(state)},pp$8.regexp_eatCControlLetter=function(state){var start=state.pos;if(state.eat(99)){if(this.regexp_eatControlLetter(state))return!0;state.pos=start}return!1},pp$8.regexp_eatZero=function(state){return 48===state.current()&&!isDecimalDigit(state.lookahead())&&(state.lastIntValue=0,state.advance(),!0)},pp$8.regexp_eatControlEscape=function(state){var ch=state.current();return 116===ch?(state.lastIntValue=9,state.advance(),!0):110===ch?(state.lastIntValue=10,state.advance(),!0):118===ch?(state.lastIntValue=11,state.advance(),!0):102===ch?(state.lastIntValue=12,state.advance(),!0):114===ch&&(state.lastIntValue=13,state.advance(),!0)},pp$8.regexp_eatControlLetter=function(state){var ch=state.current();return!!isControlLetter(ch)&&(state.lastIntValue=ch%32,state.advance(),!0)},pp$8.regexp_eatRegExpUnicodeEscapeSequence=function(state,forceU){void 0===forceU&&(forceU=!1);var start=state.pos,switchU=forceU||state.switchU;if(state.eat(117)){if(this.regexp_eatFixedHexDigits(state,4)){var lead=state.lastIntValue;if(switchU&&lead>=55296&&lead<=56319){var leadSurrogateEnd=state.pos;if(state.eat(92)&&state.eat(117)&&this.regexp_eatFixedHexDigits(state,4)){var trail=state.lastIntValue;if(trail>=56320&&trail<=57343)return state.lastIntValue=1024*(lead-55296)+(trail-56320)+65536,!0}state.pos=leadSurrogateEnd,state.lastIntValue=lead}return!0}if(switchU&&state.eat(123)&&this.regexp_eatHexDigits(state)&&state.eat(125)&&function isValidUnicode(ch){return ch>=0&&ch<=1114111}(state.lastIntValue))return!0;switchU&&state.raise("Invalid unicode escape"),state.pos=start}return!1},pp$8.regexp_eatIdentityEscape=function(state){if(state.switchU)return!!this.regexp_eatSyntaxCharacter(state)||!!state.eat(47)&&(state.lastIntValue=47,!0);var ch=state.current();return!(99===ch||state.switchN&&107===ch)&&(state.lastIntValue=ch,state.advance(),!0)},pp$8.regexp_eatDecimalEscape=function(state){state.lastIntValue=0;var ch=state.current();if(ch>=49&&ch<=57){do{state.lastIntValue=10*state.lastIntValue+(ch-48),state.advance()}while((ch=state.current())>=48&&ch<=57);return!0}return!1},pp$8.regexp_eatCharacterClassEscape=function(state){var ch=state.current();if(function isCharacterClassEscape(ch){return 100===ch||68===ch||115===ch||83===ch||119===ch||87===ch}(ch))return state.lastIntValue=-1,state.advance(),!0;if(state.switchU&&this.options.ecmaVersion>=9&&(80===ch||112===ch)){if(state.lastIntValue=-1,state.advance(),state.eat(123)&&this.regexp_eatUnicodePropertyValueExpression(state)&&state.eat(125))return!0;state.raise("Invalid property name")}return!1},pp$8.regexp_eatUnicodePropertyValueExpression=function(state){var start=state.pos;if(this.regexp_eatUnicodePropertyName(state)&&state.eat(61)){var name=state.lastStringValue;if(this.regexp_eatUnicodePropertyValue(state)){var value=state.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(state,name,value),!0}}if(state.pos=start,this.regexp_eatLoneUnicodePropertyNameOrValue(state)){var nameOrValue=state.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(state,nameOrValue),!0}return!1},pp$8.regexp_validateUnicodePropertyNameAndValue=function(state,name,value){has(state.unicodeProperties.nonBinary,name)||state.raise("Invalid property name"),state.unicodeProperties.nonBinary[name].test(value)||state.raise("Invalid property value")},pp$8.regexp_validateUnicodePropertyNameOrValue=function(state,nameOrValue){state.unicodeProperties.binary.test(nameOrValue)||state.raise("Invalid property name")},pp$8.regexp_eatUnicodePropertyName=function(state){var ch=0;for(state.lastStringValue="";isUnicodePropertyNameCharacter(ch=state.current());)state.lastStringValue+=codePointToString(ch),state.advance();return""!==state.lastStringValue},pp$8.regexp_eatUnicodePropertyValue=function(state){var ch=0;for(state.lastStringValue="";isUnicodePropertyValueCharacter(ch=state.current());)state.lastStringValue+=codePointToString(ch),state.advance();return""!==state.lastStringValue},pp$8.regexp_eatLoneUnicodePropertyNameOrValue=function(state){return this.regexp_eatUnicodePropertyValue(state)},pp$8.regexp_eatCharacterClass=function(state){if(state.eat(91)){if(state.eat(94),this.regexp_classRanges(state),state.eat(93))return!0;state.raise("Unterminated character class")}return!1},pp$8.regexp_classRanges=function(state){for(;this.regexp_eatClassAtom(state);){var left=state.lastIntValue;if(state.eat(45)&&this.regexp_eatClassAtom(state)){var right=state.lastIntValue;state.switchU&&(-1===left||-1===right)&&state.raise("Invalid character class"),-1!==left&&-1!==right&&left>right&&state.raise("Range out of order in character class")}}},pp$8.regexp_eatClassAtom=function(state){var start=state.pos;if(state.eat(92)){if(this.regexp_eatClassEscape(state))return!0;if(state.switchU){var ch$1=state.current();(99===ch$1||isOctalDigit(ch$1))&&state.raise("Invalid class escape"),state.raise("Invalid escape")}state.pos=start}var ch=state.current();return 93!==ch&&(state.lastIntValue=ch,state.advance(),!0)},pp$8.regexp_eatClassEscape=function(state){var start=state.pos;if(state.eat(98))return state.lastIntValue=8,!0;if(state.switchU&&state.eat(45))return state.lastIntValue=45,!0;if(!state.switchU&&state.eat(99)){if(this.regexp_eatClassControlLetter(state))return!0;state.pos=start}return this.regexp_eatCharacterClassEscape(state)||this.regexp_eatCharacterEscape(state)},pp$8.regexp_eatClassControlLetter=function(state){var ch=state.current();return!(!isDecimalDigit(ch)&&95!==ch)&&(state.lastIntValue=ch%32,state.advance(),!0)},pp$8.regexp_eatHexEscapeSequence=function(state){var start=state.pos;if(state.eat(120)){if(this.regexp_eatFixedHexDigits(state,2))return!0;state.switchU&&state.raise("Invalid escape"),state.pos=start}return!1},pp$8.regexp_eatDecimalDigits=function(state){var start=state.pos,ch=0;for(state.lastIntValue=0;isDecimalDigit(ch=state.current());)state.lastIntValue=10*state.lastIntValue+(ch-48),state.advance();return state.pos!==start},pp$8.regexp_eatHexDigits=function(state){var start=state.pos,ch=0;for(state.lastIntValue=0;isHexDigit(ch=state.current());)state.lastIntValue=16*state.lastIntValue+hexToInt(ch),state.advance();return state.pos!==start},pp$8.regexp_eatLegacyOctalEscapeSequence=function(state){if(this.regexp_eatOctalDigit(state)){var n1=state.lastIntValue;if(this.regexp_eatOctalDigit(state)){var n2=state.lastIntValue;n1<=3&&this.regexp_eatOctalDigit(state)?state.lastIntValue=64*n1+8*n2+state.lastIntValue:state.lastIntValue=8*n1+n2}else state.lastIntValue=n1;return!0}return!1},pp$8.regexp_eatOctalDigit=function(state){var ch=state.current();return isOctalDigit(ch)?(state.lastIntValue=ch-48,state.advance(),!0):(state.lastIntValue=0,!1)},pp$8.regexp_eatFixedHexDigits=function(state,length){var start=state.pos;state.lastIntValue=0;for(var i=0;i=this.input.length?this.finishToken(types.eof):curContext.override?curContext.override(this):void this.readToken(this.fullCharCodeAtPos())},pp$9.readToken=function(code){return isIdentifierStart(code,this.options.ecmaVersion>=6)||92===code?this.readWord():this.getTokenFromCode(code)},pp$9.fullCharCodeAtPos=function(){var code=this.input.charCodeAt(this.pos);return code<=55295||code>=57344?code:(code<<10)+this.input.charCodeAt(this.pos+1)-56613888},pp$9.skipBlockComment=function(){var startLoc=this.options.onComment&&this.curPosition(),start=this.pos,end=this.input.indexOf("*/",this.pos+=2);if(-1===end&&this.raise(this.pos-2,"Unterminated comment"),this.pos=end+2,this.options.locations){lineBreakG.lastIndex=start;for(var match;(match=lineBreakG.exec(this.input))&&match.index8&&ch<14||ch>=5760&&nonASCIIwhitespace.test(String.fromCharCode(ch))))break loop;++this.pos}}},pp$9.finishToken=function(type,val){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var prevType=this.type;this.type=type,this.value=val,this.updateContext(prevType)},pp$9.readToken_dot=function(){var next=this.input.charCodeAt(this.pos+1);if(next>=48&&next<=57)return this.readNumber(!0);var next2=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===next&&46===next2?(this.pos+=3,this.finishToken(types.ellipsis)):(++this.pos,this.finishToken(types.dot))},pp$9.readToken_slash=function(){var next=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===next?this.finishOp(types.assign,2):this.finishOp(types.slash,1)},pp$9.readToken_mult_modulo_exp=function(code){var next=this.input.charCodeAt(this.pos+1),size=1,tokentype=42===code?types.star:types.modulo;return this.options.ecmaVersion>=7&&42===code&&42===next&&(++size,tokentype=types.starstar,next=this.input.charCodeAt(this.pos+2)),61===next?this.finishOp(types.assign,size+1):this.finishOp(tokentype,size)},pp$9.readToken_pipe_amp=function(code){var next=this.input.charCodeAt(this.pos+1);if(next===code){if(this.options.ecmaVersion>=12)if(61===this.input.charCodeAt(this.pos+2))return this.finishOp(types.assign,3);return this.finishOp(124===code?types.logicalOR:types.logicalAND,2)}return 61===next?this.finishOp(types.assign,2):this.finishOp(124===code?types.bitwiseOR:types.bitwiseAND,1)},pp$9.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(types.assign,2):this.finishOp(types.bitwiseXOR,1)},pp$9.readToken_plus_min=function(code){var next=this.input.charCodeAt(this.pos+1);return next===code?45!==next||this.inModule||62!==this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!lineBreak.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(types.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===next?this.finishOp(types.assign,2):this.finishOp(types.plusMin,1)},pp$9.readToken_lt_gt=function(code){var next=this.input.charCodeAt(this.pos+1),size=1;return next===code?(size=62===code&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+size)?this.finishOp(types.assign,size+1):this.finishOp(types.bitShift,size)):33!==next||60!==code||this.inModule||45!==this.input.charCodeAt(this.pos+2)||45!==this.input.charCodeAt(this.pos+3)?(61===next&&(size=2),this.finishOp(types.relational,size)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},pp$9.readToken_eq_excl=function(code){var next=this.input.charCodeAt(this.pos+1);return 61===next?this.finishOp(types.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===code&&62===next&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(types.arrow)):this.finishOp(61===code?types.eq:types.prefix,1)},pp$9.readToken_question=function(){var ecmaVersion=this.options.ecmaVersion;if(ecmaVersion>=11){var next=this.input.charCodeAt(this.pos+1);if(46===next){var next2=this.input.charCodeAt(this.pos+2);if(next2<48||next2>57)return this.finishOp(types.questionDot,2)}if(63===next){if(ecmaVersion>=12)if(61===this.input.charCodeAt(this.pos+2))return this.finishOp(types.assign,3);return this.finishOp(types.coalesce,2)}}return this.finishOp(types.question,1)},pp$9.getTokenFromCode=function(code){switch(code){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(types.parenL);case 41:return++this.pos,this.finishToken(types.parenR);case 59:return++this.pos,this.finishToken(types.semi);case 44:return++this.pos,this.finishToken(types.comma);case 91:return++this.pos,this.finishToken(types.bracketL);case 93:return++this.pos,this.finishToken(types.bracketR);case 123:return++this.pos,this.finishToken(types.braceL);case 125:return++this.pos,this.finishToken(types.braceR);case 58:return++this.pos,this.finishToken(types.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(types.backQuote);case 48:var next=this.input.charCodeAt(this.pos+1);if(120===next||88===next)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===next||79===next)return this.readRadixNumber(8);if(98===next||66===next)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(code);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(code);case 124:case 38:return this.readToken_pipe_amp(code);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(code);case 60:case 62:return this.readToken_lt_gt(code);case 61:case 33:return this.readToken_eq_excl(code);case 63:return this.readToken_question();case 126:return this.finishOp(types.prefix,1)}this.raise(this.pos,"Unexpected character '"+codePointToString$1(code)+"'")},pp$9.finishOp=function(type,size){var str=this.input.slice(this.pos,this.pos+size);return this.pos+=size,this.finishToken(type,str)},pp$9.readRegexp=function(){for(var escaped,inClass,start=this.pos;;){this.pos>=this.input.length&&this.raise(start,"Unterminated regular expression");var ch=this.input.charAt(this.pos);if(lineBreak.test(ch)&&this.raise(start,"Unterminated regular expression"),escaped)escaped=!1;else{if("["===ch)inClass=!0;else if("]"===ch&&inClass)inClass=!1;else if("/"===ch&&!inClass)break;escaped="\\"===ch}++this.pos}var pattern=this.input.slice(start,this.pos);++this.pos;var flagsStart=this.pos,flags=this.readWord1();this.containsEsc&&this.unexpected(flagsStart);var state=this.regexpState||(this.regexpState=new RegExpValidationState(this));state.reset(start,pattern,flags),this.validateRegExpFlags(state),this.validateRegExpPattern(state);var value=null;try{value=new RegExp(pattern,flags)}catch{}return this.finishToken(types.regexp,{pattern,flags,value})},pp$9.readInt=function(radix,len,maybeLegacyOctalNumericLiteral){for(var allowSeparators=this.options.ecmaVersion>=12&&void 0===len,isLegacyOctalNumericLiteral=maybeLegacyOctalNumericLiteral&&48===this.input.charCodeAt(this.pos),start=this.pos,total=0,lastCode=0,i=0,e=len??1/0;i=97?code-97+10:code>=65?code-65+10:code>=48&&code<=57?code-48:1/0)>=radix)break;lastCode=code,total=total*radix+val}}return allowSeparators&&95===lastCode&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===start||null!=len&&this.pos-start!==len?null:total},pp$9.readRadixNumber=function(radix){var start=this.pos;this.pos+=2;var val=this.readInt(radix);return null==val&&this.raise(this.start+2,"Expected number in radix "+radix),this.options.ecmaVersion>=11&&110===this.input.charCodeAt(this.pos)?(val=stringToBigInt(this.input.slice(start,this.pos)),++this.pos):isIdentifierStart(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(types.num,val)},pp$9.readNumber=function(startsWithDot){var start=this.pos;!startsWithDot&&null===this.readInt(10,void 0,!0)&&this.raise(start,"Invalid number");var octal=this.pos-start>=2&&48===this.input.charCodeAt(start);octal&&this.strict&&this.raise(start,"Invalid number");var next=this.input.charCodeAt(this.pos);if(!octal&&!startsWithDot&&this.options.ecmaVersion>=11&&110===next){var val$1=stringToBigInt(this.input.slice(start,this.pos));return++this.pos,isIdentifierStart(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(types.num,val$1)}octal&&/[89]/.test(this.input.slice(start,this.pos))&&(octal=!1),46===next&&!octal&&(++this.pos,this.readInt(10),next=this.input.charCodeAt(this.pos)),(69===next||101===next)&&!octal&&((43===(next=this.input.charCodeAt(++this.pos))||45===next)&&++this.pos,null===this.readInt(10)&&this.raise(start,"Invalid number")),isIdentifierStart(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var val=function stringToNumber(str,isLegacyOctalNumericLiteral){return isLegacyOctalNumericLiteral?parseInt(str,8):parseFloat(str.replace(/_/g,""))}(this.input.slice(start,this.pos),octal);return this.finishToken(types.num,val)},pp$9.readCodePoint=function(){var code;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var codePos=++this.pos;code=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,code>1114111&&this.invalidStringToken(codePos,"Code point out of bounds")}else code=this.readHexChar(4);return code},pp$9.readString=function(quote){for(var out="",chunkStart=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var ch=this.input.charCodeAt(this.pos);if(ch===quote)break;92===ch?(out+=this.input.slice(chunkStart,this.pos),out+=this.readEscapedChar(!1),chunkStart=this.pos):(isNewLine(ch,this.options.ecmaVersion>=10)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return out+=this.input.slice(chunkStart,this.pos++),this.finishToken(types.string,out)},INVALID_TEMPLATE_ESCAPE_ERROR={},pp$9.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(err){if(err!==INVALID_TEMPLATE_ESCAPE_ERROR)throw err;this.readInvalidTemplateToken()}this.inTemplateElement=!1},pp$9.invalidStringToken=function(position,message){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw INVALID_TEMPLATE_ESCAPE_ERROR;this.raise(position,message)},pp$9.readTmplToken=function(){for(var out="",chunkStart=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var ch=this.input.charCodeAt(this.pos);if(96===ch||36===ch&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==types.template&&this.type!==types.invalidTemplate?(out+=this.input.slice(chunkStart,this.pos),this.finishToken(types.template,out)):36===ch?(this.pos+=2,this.finishToken(types.dollarBraceL)):(++this.pos,this.finishToken(types.backQuote));if(92===ch)out+=this.input.slice(chunkStart,this.pos),out+=this.readEscapedChar(!0),chunkStart=this.pos;else if(isNewLine(ch)){switch(out+=this.input.slice(chunkStart,this.pos),++this.pos,ch){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:out+="\n";break;default:out+=String.fromCharCode(ch)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),chunkStart=this.pos}else++this.pos}},pp$9.readInvalidTemplateToken=function(){for(;this.pos=48&&ch<=55){var octalStr=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],octal=parseInt(octalStr,8);return octal>255&&(octalStr=octalStr.slice(0,-1),octal=parseInt(octalStr,8)),this.pos+=octalStr.length-1,ch=this.input.charCodeAt(this.pos),("0"!==octalStr||56===ch||57===ch)&&(this.strict||inTemplate)&&this.invalidStringToken(this.pos-1-octalStr.length,inTemplate?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(octal)}return isNewLine(ch)?"":String.fromCharCode(ch)}},pp$9.readHexChar=function(len){var codePos=this.pos,n=this.readInt(16,len);return null===n&&this.invalidStringToken(codePos,"Bad character escape sequence"),n},pp$9.readWord1=function(){this.containsEsc=!1;for(var word="",first=!0,chunkStart=this.pos,astral=this.options.ecmaVersion>=6;this.pos",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}}}),require_acorn_jsx=(0,chunk_XP5HYGXS.P$)({"../../node_modules/acorn-jsx/index.js"(exports,module){var XHTMLEntities=require_xhtml(),hexNumber=/^[\da-fA-F]+$/,decimalNumber=/^\d+$/,acornJsxMap=new WeakMap;function getJsxTokens(acorn){acorn=acorn.Parser.acorn||acorn;let acornJsx=acornJsxMap.get(acorn);if(!acornJsx){let tt=acorn.tokTypes,TokContext3=acorn.TokContext,TokenType3=acorn.TokenType,tc_oTag=new TokContext3("...",!0,!0),tokContexts={tc_oTag,tc_cTag,tc_expr},tokTypes={jsxName:new TokenType3("jsxName"),jsxText:new TokenType3("jsxText",{beforeExpr:!0}),jsxTagStart:new TokenType3("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new TokenType3("jsxTagEnd")};tokTypes.jsxTagStart.updateContext=function(){this.context.push(tc_expr),this.context.push(tc_oTag),this.exprAllowed=!1},tokTypes.jsxTagEnd.updateContext=function(prevType){let out=this.context.pop();out===tc_oTag&&prevType===tt.slash||out===tc_cTag?(this.context.pop(),this.exprAllowed=this.curContext()===tc_expr):this.exprAllowed=!0},acornJsx={tokContexts,tokTypes},acornJsxMap.set(acorn,acornJsx)}return acornJsx}function getQualifiedJSXName(object){return object?"JSXIdentifier"===object.type?object.name:"JSXNamespacedName"===object.type?object.namespace.name+":"+object.name.name:"JSXMemberExpression"===object.type?getQualifiedJSXName(object.object)+"."+getQualifiedJSXName(object.property):void 0:object}module.exports=function(options){return options=options||{},function(Parser3){return function plugin(options,Parser3){let acorn=Parser3.acorn||(init_acorn(),(0,chunk_XP5HYGXS.Yp)(acorn_exports)),acornJsx=getJsxTokens(acorn),tt=acorn.tokTypes,tok=acornJsx.tokTypes,tokContexts=acorn.tokContexts,tc_oTag=acornJsx.tokContexts.tc_oTag,tc_cTag=acornJsx.tokContexts.tc_cTag,tc_expr=acornJsx.tokContexts.tc_expr,isNewLine2=acorn.isNewLine,isIdentifierStart2=acorn.isIdentifierStart,isIdentifierChar2=acorn.isIdentifierChar;return class extends Parser3{static get acornJsx(){return acornJsx}jsx_readToken(){let out="",chunkStart=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated JSX contents");let ch=this.input.charCodeAt(this.pos);switch(ch){case 60:case 123:return this.pos===this.start?60===ch&&this.exprAllowed?(++this.pos,this.finishToken(tok.jsxTagStart)):this.getTokenFromCode(ch):(out+=this.input.slice(chunkStart,this.pos),this.finishToken(tok.jsxText,out));case 38:out+=this.input.slice(chunkStart,this.pos),out+=this.jsx_readEntity(),chunkStart=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(62===ch?">":"}")+'` or `{"'+this.input[this.pos]+'"}`?');default:isNewLine2(ch)?(out+=this.input.slice(chunkStart,this.pos),out+=this.jsx_readNewLine(!0),chunkStart=this.pos):++this.pos}}}jsx_readNewLine(normalizeCRLF){let out,ch=this.input.charCodeAt(this.pos);return++this.pos,13===ch&&10===this.input.charCodeAt(this.pos)?(++this.pos,out=normalizeCRLF?"\n":"\r\n"):out=String.fromCharCode(ch),this.options.locations&&(++this.curLine,this.lineStart=this.pos),out}jsx_readString(quote){let out="",chunkStart=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let ch=this.input.charCodeAt(this.pos);if(ch===quote)break;38===ch?(out+=this.input.slice(chunkStart,this.pos),out+=this.jsx_readEntity(),chunkStart=this.pos):isNewLine2(ch)?(out+=this.input.slice(chunkStart,this.pos),out+=this.jsx_readNewLine(!1),chunkStart=this.pos):++this.pos}return out+=this.input.slice(chunkStart,this.pos++),this.finishToken(tt.string,out)}jsx_readEntity(){let entity,str="",count=0,ch=this.input[this.pos];"&"!==ch&&this.raise(this.pos,"Entity must start with an ampersand");let startPos=++this.pos;for(;this.pos")}let fragmentOrElement=openingElement.name?"Element":"Fragment";return node["opening"+fragmentOrElement]=openingElement,node["closing"+fragmentOrElement]=closingElement,node.children=children,this.type===tt.relational&&"<"===this.value&&this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(node,"JSX"+fragmentOrElement)}jsx_parseText(){let node=this.parseLiteral(this.value);return node.type="JSXText",node}jsx_parseElement(){let startPos=this.start,startLoc=this.startLoc;return this.next(),this.jsx_parseElementAt(startPos,startLoc)}parseExprAtom(refShortHandDefaultPos){return this.type===tok.jsxText?this.jsx_parseText():this.type===tok.jsxTagStart?this.jsx_parseElement():super.parseExprAtom(refShortHandDefaultPos)}readToken(code){let context=this.curContext();if(context===tc_expr)return this.jsx_readToken();if(context===tc_oTag||context===tc_cTag){if(isIdentifierStart2(code))return this.jsx_readWord();if(62==code)return++this.pos,this.finishToken(tok.jsxTagEnd);if((34===code||39===code)&&context==tc_oTag)return this.jsx_readString(code)}return 60===code&&this.exprAllowed&&33!==this.input.charCodeAt(this.pos+1)?(++this.pos,this.finishToken(tok.jsxTagStart)):super.readToken(code)}updateContext(prevType){if(this.type==tt.braceL){var curContext=this.curContext();curContext==tc_oTag?this.context.push(tokContexts.b_expr):curContext==tc_expr?this.context.push(tokContexts.b_tmpl):super.updateContext(prevType),this.exprAllowed=!0}else{if(this.type!==tt.slash||prevType!==tok.jsxTagStart)return super.updateContext(prevType);this.context.length-=2,this.context.push(tc_cTag),this.exprAllowed=!1}}}}({allowNamespaces:!1!==options.allowNamespaces,allowNamespacedObjects:!!options.allowNamespacedObjects},Parser3)}},Object.defineProperty(module.exports,"tokTypes",{get:function(){return getJsxTokens((init_acorn(),(0,chunk_XP5HYGXS.Yp)(acorn_exports))).tokTypes},configurable:!0,enumerable:!0})}}),require_html_tags=(0,chunk_XP5HYGXS.P$)({"../../node_modules/html-tags/html-tags.json"(exports,module){module.exports=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","search","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"]}}),require_html_tags2=(0,chunk_XP5HYGXS.P$)({"../../node_modules/html-tags/index.js"(exports,module){module.exports=require_html_tags()}});(0,chunk_XP5HYGXS.VA)({},{argTypesEnhancers:()=>argTypesEnhancers,parameters:()=>parameters});var import_escodegen=(0,chunk_XP5HYGXS.f1)(require_escodegen());var BASIC_OPTIONS={format:{indent:{style:" "},semicolons:!1}},COMPACT_OPTIONS={...BASIC_OPTIONS,format:{newline:""}},PRETTY_OPTIONS={...BASIC_OPTIONS};function generateCode(ast,compact=!1){return(0,import_escodegen.generate)(ast,compact?COMPACT_OPTIONS:PRETTY_OPTIONS)}function generateObjectCode(ast,compact=!1){return compact?function generateCompactObjectCode(ast){let result=generateCode(ast,!0);return result.endsWith(" }")||(result=`${result.slice(0,-1)} }`),result}(ast):generateCode(ast)}function generateArrayCode(ast,compact=!1){return compact?function generateCompactArrayCode(ast){let result=generateCode(ast,!0);return result.startsWith("[ ")&&(result=result.replace("[ ","[")),result}(ast):function generateMultilineArrayCode(ast){let result=generateCode(ast);return result.endsWith(" }]")&&(result=function dedent(templ){for(var values=[],_i=1;_i{}},acornParser=Parser.extend((0,import_acorn_jsx.default)());function extractIdentifierName(identifierNode){return null!=identifierNode?identifierNode.name:null}function filterAncestors(ancestors){return ancestors.filter((x=>"ObjectExpression"===x.type||"ArrayExpression"===x.type))}function calculateNodeDepth(node){let depths=[];return function ancestor(node,visitors,baseVisitor,state,override){var ancestors=[];baseVisitor||(baseVisitor=base),function c(node2,st,override2){var type=override2||node2.type,found=visitors[type],isNew=node2!==ancestors[ancestors.length-1];isNew&&ancestors.push(node2),baseVisitor[type](node2,st,c),found&&found(node2,st||ancestors,ancestors),isNew&&ancestors.pop()}(node,state,override)}(node,{ObjectExpression(_,ancestors){depths.push(filterAncestors(ancestors).length)},ArrayExpression(_,ancestors){depths.push(filterAncestors(ancestors).length)}},ACORN_WALK_VISITORS),Math.max(...depths)}function parseObject(objectNode){return{inferredType:{type:"Object",depth:calculateNodeDepth(objectNode)},ast:objectNode}}function parseExpression(expression){switch(expression.type){case"Identifier":return function parseIdentifier(identifierNode){return{inferredType:{type:"Identifier",identifier:extractIdentifierName(identifierNode)},ast:identifierNode}}(expression);case"Literal":return function parseLiteral(literalNode){return{inferredType:{type:"Literal"},ast:literalNode}}(expression);case"FunctionExpression":case"ArrowFunctionExpression":return function parseFunction(funcNode){let innerJsxElementNode;simple(funcNode.body,{JSXElement(node){innerJsxElementNode=node}},ACORN_WALK_VISITORS);let inferredType={type:null!=innerJsxElementNode?"Element":"Function",params:funcNode.params,hasParams:0!==funcNode.params.length},identifierName=extractIdentifierName(funcNode.id);return null!=identifierName&&(inferredType.identifier=identifierName),{inferredType,ast:funcNode}}(expression);case"ClassExpression":return function parseClass(classNode){let innerJsxElementNode;return simple(classNode.body,{JSXElement(node){innerJsxElementNode=node}},ACORN_WALK_VISITORS),{inferredType:{type:null!=innerJsxElementNode?"Element":"Class",identifier:extractIdentifierName(classNode.id)},ast:classNode}}(expression);case"JSXElement":return function parseJsxElement(jsxElementNode){let inferredType={type:"Element"},identifierName=extractIdentifierName(jsxElementNode.openingElement.name);return null!=identifierName&&(inferredType.identifier=identifierName),{inferredType,ast:jsxElementNode}}(expression);case"CallExpression":return function parseCall(callNode){return"shape"===extractIdentifierName("MemberExpression"===callNode.callee.type?callNode.callee.property:callNode.callee)?parseObject(callNode.arguments[0]):null}(expression);case"ObjectExpression":return parseObject(expression);case"ArrayExpression":return function parseArray(arrayNode){return{inferredType:{type:"Array",depth:calculateNodeDepth(arrayNode)},ast:arrayNode}}(expression);default:return null}}function parse4(value){let ast=acornParser.parse(`(${value})`,{ecmaVersion:2020}),parsingResult={inferredType:{type:"Unknown"},ast};if(null!=ast.body[0]){let rootNode=ast.body[0];switch(rootNode.type){case"ExpressionStatement":{let expressionResult=parseExpression(rootNode.expression);null!=expressionResult&&(parsingResult=expressionResult);break}}}return parsingResult}function inspectValue(value){try{return{...parse4(value)}}catch{}return{inferredType:{type:"Unknown"}}}var import_html_tags=(0,chunk_XP5HYGXS.f1)(require_html_tags2());function isHtmlTag(tagName){return import_html_tags.default.includes(tagName.toLowerCase())}function generateArray({inferredType,ast}){let{depth}=inferredType;if(depth<=2){let compactArray=generateArrayCode(ast,!0);if(!(0,docs_tools.Sy)(compactArray))return(0,docs_tools.Ux)(compactArray)}return(0,docs_tools.Ux)("array",generateArrayCode(ast))}function generateObject({inferredType,ast}){let{depth}=inferredType;if(1===depth){let compactObject=generateObjectCode(ast,!0);if(!(0,docs_tools.Sy)(compactObject))return(0,docs_tools.Ux)(compactObject)}return(0,docs_tools.Ux)("object",generateObjectCode(ast))}function getPrettyFuncIdentifier(identifier,hasArguments){return hasArguments?`${identifier}( ... )`:`${identifier}()`}function getPrettyElementIdentifier(identifier){return`<${identifier} />`}function getPrettyIdentifier(inferredType){let{type,identifier}=inferredType;switch(type){case"Function":return getPrettyFuncIdentifier(identifier,inferredType.hasParams);case"Element":return getPrettyElementIdentifier(identifier);default:return identifier}}function createDefaultValue(defaultValue){try{let inspectionResult=inspectValue(defaultValue);switch(inspectionResult.inferredType.type){case"Object":return generateObject(inspectionResult);case"Function":return function generateFunc({inferredType,ast}){let{identifier}=inferredType;if(null!=identifier)return(0,docs_tools.Ux)(getPrettyIdentifier(inferredType),generateCode(ast));let prettyCaption=generateCode(ast,!0);return(0,docs_tools.Sy)(prettyCaption)?(0,docs_tools.Ux)("func",generateCode(ast)):(0,docs_tools.Ux)(prettyCaption)}(inspectionResult);case"Element":return function generateElement(defaultValue,inspectionResult){let{inferredType}=inspectionResult,{identifier}=inferredType;if(null!=identifier&&!isHtmlTag(identifier)){let prettyIdentifier=getPrettyIdentifier(inferredType);return(0,docs_tools.Ux)(prettyIdentifier,defaultValue)}return(0,docs_tools.Sy)(defaultValue)?(0,docs_tools.Ux)("element",defaultValue):(0,docs_tools.Ux)(defaultValue)}(defaultValue,inspectionResult);case"Array":return generateArray(inspectionResult);default:return null}}catch(e){console.error(e)}return null}function isFunction(value){return"function"==typeof value}var reactElementToJSXString=chunk_6BNVLEVL.HA;function isReactElement(element){return null!=element.$$typeof}function extractFunctionName(func,propName){let{name}=func;return""!==name&&"anonymous"!==name&&name!==propName?name:null}function generateReactObject(rawDefaultProp){let{type}=rawDefaultProp,{displayName}=type,jsx2=reactElementToJSXString(rawDefaultProp,{});if(null!=displayName){let prettyIdentifier=getPrettyElementIdentifier(displayName);return(0,docs_tools.Ux)(prettyIdentifier,jsx2)}if(function isString(value){return"string"==typeof value||value instanceof String}(type)&&isHtmlTag(type)){let jsxSummary=reactElementToJSXString(rawDefaultProp,{tabStop:0}).replace(/\r?\n|\r/g,"");if(!(0,docs_tools.Sy)(jsxSummary))return(0,docs_tools.Ux)(jsxSummary)}return(0,docs_tools.Ux)("element",jsx2)}var DEFAULT_TYPE_RESOLVERS={string:rawDefaultProp=>(0,docs_tools.Ux)(JSON.stringify(rawDefaultProp)),object:rawDefaultProp=>{if(isReactElement(rawDefaultProp)&&null!=rawDefaultProp.type)return generateReactObject(rawDefaultProp);if(function isPlainObject(object){if("object"!=typeof object||null==object)return!1;if(null===Object.getPrototypeOf(object))return!0;if("[object Object]"!==Object.prototype.toString.call(object)){let tag=object[Symbol.toStringTag];return!(null==tag||!Object.getOwnPropertyDescriptor(object,Symbol.toStringTag)?.writable)&&object.toString()===`[object ${tag}]`}let proto=object;for(;null!==Object.getPrototypeOf(proto);)proto=Object.getPrototypeOf(proto);return Object.getPrototypeOf(object)===proto}(rawDefaultProp)){return generateObject(inspectValue(JSON.stringify(rawDefaultProp)))}if(Array.isArray(rawDefaultProp)){return generateArray(inspectValue(JSON.stringify(rawDefaultProp)))}return(0,docs_tools.Ux)("object")},function:(rawDefaultProp,propDef)=>{let inspectionResult,isElement=!1;if(isFunction(rawDefaultProp.render))isElement=!0;else if(null!=rawDefaultProp.prototype&&isFunction(rawDefaultProp.prototype.render))isElement=!0;else{let innerElement;try{inspectionResult=inspectValue(rawDefaultProp.toString());let{hasParams,params}=inspectionResult.inferredType;hasParams?1===params.length&&"ObjectPattern"===params[0].type&&(innerElement=rawDefaultProp({})):innerElement=rawDefaultProp(),null!=innerElement&&isReactElement(innerElement)&&(isElement=!0)}catch{}}let funcName=extractFunctionName(rawDefaultProp,propDef.name);if(null!=funcName){if(isElement)return(0,docs_tools.Ux)(getPrettyElementIdentifier(funcName));null!=inspectionResult&&(inspectionResult=inspectValue(rawDefaultProp.toString()));let{hasParams}=inspectionResult.inferredType;return(0,docs_tools.Ux)(getPrettyFuncIdentifier(funcName,hasParams))}return(0,docs_tools.Ux)(isElement?"element":"func")},default:rawDefaultProp=>(0,docs_tools.Ux)(rawDefaultProp.toString())};function createDefaultValueFromRawDefaultProp(rawDefaultProp,propDef,typeResolvers=DEFAULT_TYPE_RESOLVERS){try{switch(typeof rawDefaultProp){case"string":return typeResolvers.string(rawDefaultProp,propDef);case"object":return typeResolvers.object(rawDefaultProp,propDef);case"function":return typeResolvers.function(rawDefaultProp,propDef);default:return typeResolvers.default(rawDefaultProp,propDef)}}catch(e){console.error(e)}return null}function generateFuncSignature(params,returns){let hasParams=null!=params,hasReturns=null!=returns;if(!hasParams&&!hasReturns)return"";let funcParts=[];if(hasParams){let funcParams=params.map((x=>{let prettyName=x.getPrettyName(),typeName=x.getTypeName();return null!=typeName?`${prettyName}: ${typeName}`:prettyName}));funcParts.push(`(${funcParams.join(", ")})`)}else funcParts.push("()");return hasReturns&&funcParts.push(`=> ${returns.getTypeName()}`),funcParts.join(" ")}function generateShortFuncSignature(params,returns){let hasParams=null!=params,hasReturns=null!=returns;if(!hasParams&&!hasReturns)return"";let funcParts=[];return hasParams?funcParts.push("( ... )"):funcParts.push("()"),hasReturns&&funcParts.push(`=> ${returns.getTypeName()}`),funcParts.join(" ")}function createTypeDef({name,short,compact,full,inferredType}){return{name,short,compact,full:full??short,inferredType}}function cleanPropTypes(value){return value.replace(/PropTypes./g,"").replace(/.isRequired/g,"")}function splitIntoLines(value){return value.split(/\r?\n/)}function prettyObject(ast,compact=!1){return cleanPropTypes(generateObjectCode(ast,compact))}function prettyArray(ast,compact=!1){return cleanPropTypes(generateCode(ast,compact))}function generateTypeFromString(value,originalTypeName){let short,compact,full,{inferredType,ast}=inspectValue(value),{type}=inferredType;switch(type){case"Identifier":case"Literal":short=value,compact=value;break;case"Object":{let{depth}=inferredType;short="object",compact=1===depth?prettyObject(ast,!0):null,full=prettyObject(ast);break}case"Element":{let{identifier}=inferredType;short=null==identifier||isHtmlTag(identifier)?"element":identifier,compact=1===splitIntoLines(value).length?value:null,full=value;break}case"Array":{let{depth}=inferredType;short="array",compact=depth<=2?prettyArray(ast,!0):null,full=prettyArray(ast);break}default:short=function getCaptionForInspectionType(type){switch(type){case"Object":return"object";case"Array":return"array";case"Class":return"class";case"Function":return"func";case"Element":return"element";default:return"custom"}}(type),compact=1===splitIntoLines(value).length?value:null,full=value}return createTypeDef({name:originalTypeName,short,compact,full,inferredType:type})}function objectOf(of){return`objectOf(${of})`}function generateEnum(type){if(Array.isArray(type.value)){let values=type.value.reduce(((acc,v)=>{let{short,compact,full}=function generateEnumValue({value,computed}){return computed?generateTypeFromString(value,"enumvalue"):createTypeDef({name:"enumvalue",short:value,compact:value})}(v);return acc.short.push(short),acc.compact.push(compact),acc.full.push(full),acc}),{short:[],compact:[],full:[]});return createTypeDef({name:"enum",short:values.short.join(" | "),compact:values.compact.every((x=>null!=x))?values.compact.join(" | "):null,full:values.full.join(" | ")})}return createTypeDef({name:"enum",short:type.value,compact:type.value})}function braceAfter(of){return`${of}[]`}function braceAround(of){return`[${of}]`}function createArrayOfObjectTypeDef(short,compact,full){return createTypeDef({name:"arrayOf",short:braceAfter(short),compact:null!=compact?braceAround(compact):null,full:full&&braceAround(full)})}function generateType(type,extractedProp){try{switch(type.name){case"custom":return function generateCustom({raw}){return null!=raw?generateTypeFromString(raw,"custom"):createTypeDef({name:"custom",short:"custom",compact:"custom"})}(type);case"func":return function generateFunc2(extractedProp){let{jsDocTags}=extractedProp;return null==jsDocTags||null==jsDocTags.params&&null==jsDocTags.returns?createTypeDef({name:"func",short:"func",compact:"func"}):createTypeDef({name:"func",short:generateShortFuncSignature(jsDocTags.params,jsDocTags.returns),compact:null,full:generateFuncSignature(jsDocTags.params,jsDocTags.returns)})}(extractedProp);case"shape":return function generateShape(type,extractedProp){let fields=Object.keys(type.value).map((key=>`${key}: ${generateType(type.value[key],extractedProp).full}`)).join(", "),{inferredType,ast}=inspectValue(`{ ${fields} }`),{depth}=inferredType;return createTypeDef({name:"shape",short:"object",compact:1===depth&&ast?prettyObject(ast,!0):null,full:ast?prettyObject(ast):null})}(type,extractedProp);case"instanceOf":return createTypeDef({name:"instanceOf",short:type.value,compact:type.value});case"objectOf":return function generateObjectOf(type,extractedProp){let{short,compact,full}=generateType(type.value,extractedProp);return createTypeDef({name:"objectOf",short:objectOf(short),compact:null!=compact?objectOf(compact):null,full:full&&objectOf(full)})}(type,extractedProp);case"union":return function generateUnion(type,extractedProp){if(Array.isArray(type.value)){let values=type.value.reduce(((acc,v)=>{let{short,compact,full}=generateType(v,extractedProp);return acc.short.push(short),acc.compact.push(compact),acc.full.push(full),acc}),{short:[],compact:[],full:[]});return createTypeDef({name:"union",short:values.short.join(" | "),compact:values.compact.every((x=>null!=x))?values.compact.join(" | "):null,full:values.full.join(" | ")})}return createTypeDef({name:"union",short:type.value,compact:null})}(type,extractedProp);case"enum":return generateEnum(type);case"arrayOf":return function generateArray2(type,extractedProp){let{name,short,compact,full,inferredType}=generateType(type.value,extractedProp);if("custom"===name){if("Object"===inferredType)return createArrayOfObjectTypeDef(short,compact,full)}else if("shape"===name)return createArrayOfObjectTypeDef(short,compact,full);return createTypeDef({name:"arrayOf",short:braceAfter(short),compact:braceAfter(short)})}(type,extractedProp);default:return createTypeDef({name:type.name,short:type.name,compact:type.name})}}catch(e){console.error(e)}return createTypeDef({name:"unknown",short:"unknown",compact:"unknown"})}var rawDefaultPropTypeResolvers=function createTypeResolvers(customResolvers={}){return{...DEFAULT_TYPE_RESOLVERS,...customResolvers}}({function:(rawDefaultProp,{name,type})=>{let isElement="element"===type?.summary||"elementType"===type?.summary,funcName=extractFunctionName(rawDefaultProp,name);if(null!=funcName){if(isElement)return(0,docs_tools.Ux)(getPrettyElementIdentifier(funcName));let{hasParams}=inspectValue(rawDefaultProp.toString()).inferredType;return(0,docs_tools.Ux)(getPrettyFuncIdentifier(funcName,hasParams))}return(0,docs_tools.Ux)(isElement?"element":"func")}});function enhancePropTypesProp(extractedProp,rawDefaultProp){let{propDef}=extractedProp,newtype=function createType(extractedProp){let{type}=extractedProp.docgenInfo;if(null==type)return null;try{switch(type.name){case"custom":case"shape":case"instanceOf":case"objectOf":case"union":case"enum":case"arrayOf":{let{short,compact,full}=generateType(type,extractedProp);return null==compact||(0,docs_tools.i3)(compact)?full?(0,docs_tools.Ux)(short,full):(0,docs_tools.Ux)(short):(0,docs_tools.Ux)(compact)}case"func":{let detail,{short,full}=generateType(type,extractedProp),summary=short;return full&&full.length<150?summary=full:full&&(detail=function toMultilineSignature(signature){return signature.replace(/,/g,",\r\n")}(full)),(0,docs_tools.Ux)(summary,detail)}default:return null}}catch(e){console.error(e)}return null}(extractedProp);null!=newtype&&(propDef.type=newtype);let{defaultValue}=extractedProp.docgenInfo;if(null!=defaultValue&&null!=defaultValue.value){let newDefaultValue=createDefaultValue(defaultValue.value);null!=newDefaultValue&&(propDef.defaultValue=newDefaultValue)}else if(null!=rawDefaultProp){let newDefaultValue=createDefaultValueFromRawDefaultProp(rawDefaultProp,propDef,rawDefaultPropTypeResolvers);null!=newDefaultValue&&(propDef.defaultValue=newDefaultValue)}return propDef}function enhancePropTypesProps(extractedProps,component){let rawDefaultProps=null!=component.defaultProps?component.defaultProps:{};return function keepOriginalDefinitionOrder(extractedProps,component){let{propTypes}=component;return null!=propTypes?Object.keys(propTypes).map((x=>extractedProps.find((y=>y.name===x)))).filter(Boolean):extractedProps}(extractedProps.map((x=>enhancePropTypesProp(x,rawDefaultProps[x.propDef.name]))),component)}function enhanceTypeScriptProps(extractedProps){return extractedProps.map((prop=>function enhanceTypeScriptProp(extractedProp,rawDefaultProp){let{propDef}=extractedProp,{defaultValue}=extractedProp.docgenInfo;if(null!=defaultValue&&null!=defaultValue.value){let newDefaultValue=createDefaultValue(defaultValue.value);null!=newDefaultValue&&(propDef.defaultValue=newDefaultValue)}else if(null!=rawDefaultProp){let newDefaultValue=createDefaultValueFromRawDefaultProp(rawDefaultProp,propDef);null!=newDefaultValue&&(propDef.defaultValue=newDefaultValue)}return propDef}(prop)))}function getPropDefs(component,section){let processedComponent=component;!(0,docs_tools.TQ)(component)&&!component.propTypes&&(0,chunk_6BNVLEVL.Rf)(component)&&(processedComponent=component.type);let extractedProps=(0,docs_tools.p6)(processedComponent,section);if(0===extractedProps.length)return[];switch(extractedProps[0].typeSystem){case docs_tools.YF.JAVASCRIPT:return enhancePropTypesProps(extractedProps,component);case docs_tools.YF.TYPESCRIPT:return enhanceTypeScriptProps(extractedProps);default:return extractedProps.map((x=>x.propDef))}}var parameters={docs:{extractArgTypes:component=>{if(component){let{rows}=(component=>({rows:getPropDefs(component,"props")}))(component);if(rows)return rows.reduce(((acc,row)=>{let{name,description,type,sbType,defaultValue:defaultSummary,jsDocTags,required}=row;return acc[name]={name,description,type:{required,...sbType},table:{type:type??void 0,jsDocTags,defaultValue:defaultSummary??void 0}},acc}),{})}return null},extractComponentDescription:docs_tools.rl}},argTypesEnhancers=[docs_tools.C2]},"./node_modules/@storybook/react/dist/entry-preview-docs.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{applyDecorators:()=>applyDecorators2,decorators:()=>decorators,parameters:()=>parameters});var chunk_XLZBPYSH=__webpack_require__("./node_modules/@storybook/react/dist/chunk-XLZBPYSH.mjs"),chunk_6BNVLEVL=__webpack_require__("./node_modules/@storybook/react/dist/chunk-6BNVLEVL.mjs"),chunk_XP5HYGXS=__webpack_require__("./node_modules/@storybook/react/dist/chunk-XP5HYGXS.mjs"),react=__webpack_require__("./node_modules/react/index.js"),external_STORYBOOK_MODULE_CLIENT_LOGGER_=__webpack_require__("storybook/internal/client-logger"),docs_tools=__webpack_require__("./node_modules/storybook/dist/docs-tools/index.js"),external_STORYBOOK_MODULE_PREVIEW_API_=__webpack_require__("storybook/preview-api");(0,chunk_XP5HYGXS.VA)({},{applyDecorators:()=>applyDecorators2,decorators:()=>decorators,parameters:()=>parameters});var reactElementToJSXString=chunk_6BNVLEVL.HA,toPascalCase=str=>str.charAt(0).toUpperCase()+str.slice(1);function simplifyNodeForStringify(node){if((0,react.isValidElement)(node)){let props=Object.keys(node.props).reduce(((acc,cur)=>(acc[cur]=simplifyNodeForStringify(node.props[cur]),acc)),{});return{...node,props,_owner:null}}return Array.isArray(node)?node.map(simplifyNodeForStringify):node}var renderJsx=(code,options)=>{if(typeof code>"u")return external_STORYBOOK_MODULE_CLIENT_LOGGER_.logger.warn("Too many skip or undefined component"),null;let displayNameDefaults,renderedJSX=code,Type=renderedJSX.type;for(let i=0;i"u")return external_STORYBOOK_MODULE_CLIENT_LOGGER_.logger.warn("Cannot skip undefined element"),null;if(react.Children.count(renderedJSX)>1)return external_STORYBOOK_MODULE_CLIENT_LOGGER_.logger.warn("Trying to skip an array of elements"),null;typeof renderedJSX.props.children>"u"?(external_STORYBOOK_MODULE_CLIENT_LOGGER_.logger.warn("Not enough children to skip elements."),"function"==typeof renderedJSX.type&&""===renderedJSX.type.name&&(renderedJSX=react.createElement(Type,{...renderedJSX.props}))):renderedJSX="function"==typeof renderedJSX.props.children?renderedJSX.props.children():renderedJSX.props.children}displayNameDefaults="string"==typeof options?.displayName?{showFunctions:!0,displayName:()=>options.displayName}:{displayName:el=>{return el.type.displayName?el.type.displayName:(0,docs_tools.UO)(el.type,"displayName")?(0,docs_tools.UO)(el.type,"displayName"):el.type.render?.displayName?el.type.render.displayName:"symbol"==typeof el.type||el.type.$$typeof&&"symbol"==typeof el.type.$$typeof?((elementType=el.type).$$typeof||elementType).toString().replace(/^Symbol\((.*)\)$/,"$1").split(".").map((segment=>segment.split("_").map(toPascalCase).join(""))).join("."):el.type.name&&"_default"!==el.type.name?el.type.name:"function"==typeof el.type?"No Display Name":(0,chunk_6BNVLEVL.Jz)(el.type)?el.type.render.name:(0,chunk_6BNVLEVL.Rf)(el.type)?el.type.type.name:el.type;var elementType}};let opts={...displayNameDefaults,filterProps:(value,key)=>void 0!==value,...options};return react.Children.map(code,(c=>{let child="number"==typeof c?c.toString():c,string=("function"==typeof reactElementToJSXString?reactElementToJSXString:reactElementToJSXString.default)(simplifyNodeForStringify(child),opts);if(string.indexOf(""")>-1){let matches=string.match(/\S+=\\"([^"]*)\\"/g);matches&&matches.forEach((match=>{string=string.replace(match,match.replace(/"/g,"'"))}))}return string})).join("\n").replace(/function\s+noRefCheck\(\)\s*\{\}/g,"() => {}")},defaultOpts={skip:0,showFunctions:!1,enableBeautify:!0,showDefaultProps:!1},mdxToJsx=node=>{if(!(node=>"MDXCreateElement"===node.type?.displayName&&!!node.props?.mdxType)(node))return node;let{mdxType,originalType,children,...rest}=node.props,jsxChildren=[];return children&&(jsxChildren=(Array.isArray(children)?children:[children]).map(mdxToJsx)),(0,react.createElement)(originalType,rest,...jsxChildren)},jsxDecorator=(storyFn,context)=>{let jsx=(0,external_STORYBOOK_MODULE_PREVIEW_API_.useRef)(void 0),story=storyFn(),skip=(context=>{let sourceParams=context?.parameters.docs?.source,isArgsStory=context?.parameters.__isArgsStory;return sourceParams?.type!==docs_tools.Y1.DYNAMIC&&(!isArgsStory||sourceParams?.code||sourceParams?.type===docs_tools.Y1.CODE)})(context),options={...defaultOpts,...context?.parameters.jsx||{}},storyJsx=context.originalStoryFn(context.args,context);return(0,external_STORYBOOK_MODULE_PREVIEW_API_.useEffect)((()=>{if(skip)return;let sourceJsx=mdxToJsx(storyJsx),rendered=renderJsx(sourceJsx,options);rendered&&jsx.current!==rendered&&((0,external_STORYBOOK_MODULE_PREVIEW_API_.emitTransformCode)(rendered,context),jsx.current=rendered)})),story},applyDecorators2=(storyFn,decorators2)=>{let jsxIndex=decorators2.findIndex((d=>d.originalFn===jsxDecorator)),reorderedDecorators=-1===jsxIndex?decorators2:[...decorators2.splice(jsxIndex,1),...decorators2];return(0,chunk_XLZBPYSH.t)(storyFn,reorderedDecorators)},decorators=[jsxDecorator],parameters={docs:{story:{inline:!0}}}},"./node_modules/@storybook/react/dist/entry-preview.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{applyDecorators:()=>chunk_XLZBPYSH.t,beforeAll:()=>beforeAll,decorators:()=>decorators,mount:()=>mount,parameters:()=>parameters,render:()=>render,renderToCanvas:()=>renderToCanvas});var chunk_XLZBPYSH=__webpack_require__("./node_modules/@storybook/react/dist/chunk-XLZBPYSH.mjs"),chunk_XP5HYGXS=__webpack_require__("./node_modules/@storybook/react/dist/chunk-XP5HYGXS.mjs"),react=__webpack_require__("./node_modules/react/index.js"),react_namespaceObject=__webpack_require__.t(react,2),external_STORYBOOK_MODULE_GLOBAL_=__webpack_require__("@storybook/global"),require_constants=(0,chunk_XP5HYGXS.P$)({"../../node_modules/semver/internal/constants.js"(exports,module){var MAX_SAFE_INTEGER=Number.MAX_SAFE_INTEGER||9007199254740991;module.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}}),require_debug=(0,chunk_XP5HYGXS.P$)({"../../node_modules/semver/internal/debug.js"(exports,module){var debug="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...args)=>console.error("SEMVER",...args):()=>{};module.exports=debug}}),require_re=(0,chunk_XP5HYGXS.P$)({"../../node_modules/semver/internal/re.js"(exports,module){var{MAX_SAFE_COMPONENT_LENGTH,MAX_SAFE_BUILD_LENGTH,MAX_LENGTH}=require_constants(),debug=require_debug(),re=(exports=module.exports={}).re=[],safeRe=exports.safeRe=[],src=exports.src=[],safeSrc=exports.safeSrc=[],t=exports.t={},R=0,safeRegexReplacements=[["\\s",1],["\\d",MAX_LENGTH],["[a-zA-Z0-9-]",MAX_SAFE_BUILD_LENGTH]],createToken=(name,value,isGlobal)=>{let safe=(value=>{for(let[token,max]of safeRegexReplacements)value=value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);return value})(value),index=R++;debug(name,index,value),t[name]=index,src[index]=value,safeSrc[index]=safe,re[index]=new RegExp(value,isGlobal?"g":void 0),safeRe[index]=new RegExp(safe,isGlobal?"g":void 0)};createToken("NUMERICIDENTIFIER","0|[1-9]\\d*"),createToken("NUMERICIDENTIFIERLOOSE","\\d+"),createToken("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),createToken("MAINVERSION",`(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`),createToken("MAINVERSIONLOOSE",`(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`),createToken("PRERELEASEIDENTIFIER",`(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIER]})`),createToken("PRERELEASEIDENTIFIERLOOSE",`(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIERLOOSE]})`),createToken("PRERELEASE",`(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`),createToken("PRERELEASELOOSE",`(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`),createToken("BUILDIDENTIFIER","[a-zA-Z0-9-]+"),createToken("BUILD",`(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`),createToken("FULLPLAIN",`v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`),createToken("FULL",`^${src[t.FULLPLAIN]}$`),createToken("LOOSEPLAIN",`[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`),createToken("LOOSE",`^${src[t.LOOSEPLAIN]}$`),createToken("GTLT","((?:<|>)?=?)"),createToken("XRANGEIDENTIFIERLOOSE",`${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),createToken("XRANGEIDENTIFIER",`${src[t.NUMERICIDENTIFIER]}|x|X|\\*`),createToken("XRANGEPLAIN",`[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`),createToken("XRANGEPLAINLOOSE",`[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`),createToken("XRANGE",`^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`),createToken("XRANGELOOSE",`^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`),createToken("COERCEPLAIN",`(^|[^\\d])(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`),createToken("COERCE",`${src[t.COERCEPLAIN]}(?:$|[^\\d])`),createToken("COERCEFULL",src[t.COERCEPLAIN]+`(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`),createToken("COERCERTL",src[t.COERCE],!0),createToken("COERCERTLFULL",src[t.COERCEFULL],!0),createToken("LONETILDE","(?:~>?)"),createToken("TILDETRIM",`(\\s*)${src[t.LONETILDE]}\\s+`,!0),exports.tildeTrimReplace="$1~",createToken("TILDE",`^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`),createToken("TILDELOOSE",`^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`),createToken("LONECARET","(?:\\^)"),createToken("CARETTRIM",`(\\s*)${src[t.LONECARET]}\\s+`,!0),exports.caretTrimReplace="$1^",createToken("CARET",`^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`),createToken("CARETLOOSE",`^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`),createToken("COMPARATORLOOSE",`^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`),createToken("COMPARATOR",`^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`),createToken("COMPARATORTRIM",`(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`,!0),exports.comparatorTrimReplace="$1$2$3",createToken("HYPHENRANGE",`^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`),createToken("HYPHENRANGELOOSE",`^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`),createToken("STAR","(<|>)?=?\\s*\\*"),createToken("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),createToken("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}}),require_parse_options=(0,chunk_XP5HYGXS.P$)({"../../node_modules/semver/internal/parse-options.js"(exports,module){var looseOption=Object.freeze({loose:!0}),emptyOpts=Object.freeze({});module.exports=options=>options?"object"!=typeof options?looseOption:options:emptyOpts}}),require_identifiers=(0,chunk_XP5HYGXS.P$)({"../../node_modules/semver/internal/identifiers.js"(exports,module){var numeric=/^[0-9]+$/,compareIdentifiers=(a,b)=>{let anum=numeric.test(a),bnum=numeric.test(b);return anum&&bnum&&(a=+a,b=+b),a===b?0:anum&&!bnum?-1:bnum&&!anum?1:acompareIdentifiers(b,a)}}}),require_semver=(0,chunk_XP5HYGXS.P$)({"../../node_modules/semver/classes/semver.js"(exports,module){var debug=require_debug(),{MAX_LENGTH,MAX_SAFE_INTEGER}=require_constants(),{safeRe:re,t}=require_re(),parseOptions=require_parse_options(),{compareIdentifiers}=require_identifiers();module.exports=class _SemVer{constructor(version2,options){if(options=parseOptions(options),version2 instanceof _SemVer){if(version2.loose===!!options.loose&&version2.includePrerelease===!!options.includePrerelease)return version2;version2=version2.version}else if("string"!=typeof version2)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version2}".`);if(version2.length>MAX_LENGTH)throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);debug("SemVer",version2,options),this.options=options,this.loose=!!options.loose,this.includePrerelease=!!options.includePrerelease;let m=version2.trim().match(options.loose?re[t.LOOSE]:re[t.FULL]);if(!m)throw new TypeError(`Invalid Version: ${version2}`);if(this.raw=version2,this.major=+m[1],this.minor=+m[2],this.patch=+m[3],this.major>MAX_SAFE_INTEGER||this.major<0)throw new TypeError("Invalid major version");if(this.minor>MAX_SAFE_INTEGER||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>MAX_SAFE_INTEGER||this.patch<0)throw new TypeError("Invalid patch version");m[4]?this.prerelease=m[4].split(".").map((id=>{if(/^[0-9]+$/.test(id)){let num=+id;if(num>=0&&num=0;)"number"==typeof this.prerelease[i]&&(this.prerelease[i]++,i=-2);if(-1===i){if(identifier===this.prerelease.join(".")&&!1===identifierBase)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(base)}}if(identifier){let prerelease=[identifier,base];!1===identifierBase&&(prerelease=[identifier]),0===compareIdentifiers(this.prerelease[0],identifier)?isNaN(this.prerelease[1])&&(this.prerelease=prerelease):this.prerelease=prerelease}break}default:throw new Error(`invalid increment argument: ${release}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}}}),require_parse=(0,chunk_XP5HYGXS.P$)({"../../node_modules/semver/functions/parse.js"(exports,module){var SemVer=require_semver();module.exports=(version2,options,throwErrors=!1)=>{if(version2 instanceof SemVer)return version2;try{return new SemVer(version2,options)}catch(er){if(!throwErrors)return null;throw er}}}}),require_valid=(0,chunk_XP5HYGXS.P$)({"../../node_modules/semver/functions/valid.js"(exports,module){var parse=require_parse();module.exports=(version2,options)=>{let v=parse(version2,options);return v?v.version:null}}}),require_clean=(0,chunk_XP5HYGXS.P$)({"../../node_modules/semver/functions/clean.js"(exports,module){var parse=require_parse();module.exports=(version2,options)=>{let s=parse(version2.trim().replace(/^[=v]+/,""),options);return s?s.version:null}}}),require_inc=(0,chunk_XP5HYGXS.P$)({"../../node_modules/semver/functions/inc.js"(exports,module){var SemVer=require_semver();module.exports=(version2,release,options,identifier,identifierBase)=>{"string"==typeof options&&(identifierBase=identifier,identifier=options,options=void 0);try{return new SemVer(version2 instanceof SemVer?version2.version:version2,options).inc(release,identifier,identifierBase).version}catch{return null}}}}),require_diff=(0,chunk_XP5HYGXS.P$)({"../../node_modules/semver/functions/diff.js"(exports,module){var parse=require_parse();module.exports=(version1,version2)=>{let v1=parse(version1,null,!0),v2=parse(version2,null,!0),comparison=v1.compare(v2);if(0===comparison)return null;let v1Higher=comparison>0,highVersion=v1Higher?v1:v2,lowVersion=v1Higher?v2:v1,highHasPre=!!highVersion.prerelease.length;if(lowVersion.prerelease.length&&!highHasPre){if(!lowVersion.patch&&!lowVersion.minor)return"major";if(0===lowVersion.compareMain(highVersion))return lowVersion.minor&&!lowVersion.patch?"minor":"patch"}let prefix=highHasPre?"pre":"";return v1.major!==v2.major?prefix+"major":v1.minor!==v2.minor?prefix+"minor":v1.patch!==v2.patch?prefix+"patch":"prerelease"}}}),require_major=(0,chunk_XP5HYGXS.P$)({"../../node_modules/semver/functions/major.js"(exports,module){var SemVer=require_semver();module.exports=(a,loose)=>new SemVer(a,loose).major}}),require_minor=(0,chunk_XP5HYGXS.P$)({"../../node_modules/semver/functions/minor.js"(exports,module){var SemVer=require_semver();module.exports=(a,loose)=>new SemVer(a,loose).minor}}),require_patch=(0,chunk_XP5HYGXS.P$)({"../../node_modules/semver/functions/patch.js"(exports,module){var SemVer=require_semver();module.exports=(a,loose)=>new SemVer(a,loose).patch}}),require_prerelease=(0,chunk_XP5HYGXS.P$)({"../../node_modules/semver/functions/prerelease.js"(exports,module){var parse=require_parse();module.exports=(version2,options)=>{let parsed=parse(version2,options);return parsed&&parsed.prerelease.length?parsed.prerelease:null}}}),require_compare=(0,chunk_XP5HYGXS.P$)({"../../node_modules/semver/functions/compare.js"(exports,module){var SemVer=require_semver();module.exports=(a,b,loose)=>new SemVer(a,loose).compare(new SemVer(b,loose))}}),require_rcompare=(0,chunk_XP5HYGXS.P$)({"../../node_modules/semver/functions/rcompare.js"(exports,module){var compare=require_compare();module.exports=(a,b,loose)=>compare(b,a,loose)}}),require_compare_loose=(0,chunk_XP5HYGXS.P$)({"../../node_modules/semver/functions/compare-loose.js"(exports,module){var compare=require_compare();module.exports=(a,b)=>compare(a,b,!0)}}),require_compare_build=(0,chunk_XP5HYGXS.P$)({"../../node_modules/semver/functions/compare-build.js"(exports,module){var SemVer=require_semver();module.exports=(a,b,loose)=>{let versionA=new SemVer(a,loose),versionB=new SemVer(b,loose);return versionA.compare(versionB)||versionA.compareBuild(versionB)}}}),require_sort=(0,chunk_XP5HYGXS.P$)({"../../node_modules/semver/functions/sort.js"(exports,module){var compareBuild=require_compare_build();module.exports=(list,loose)=>list.sort(((a,b)=>compareBuild(a,b,loose)))}}),require_rsort=(0,chunk_XP5HYGXS.P$)({"../../node_modules/semver/functions/rsort.js"(exports,module){var compareBuild=require_compare_build();module.exports=(list,loose)=>list.sort(((a,b)=>compareBuild(b,a,loose)))}}),require_gt=(0,chunk_XP5HYGXS.P$)({"../../node_modules/semver/functions/gt.js"(exports,module){var compare=require_compare();module.exports=(a,b,loose)=>compare(a,b,loose)>0}}),require_lt=(0,chunk_XP5HYGXS.P$)({"../../node_modules/semver/functions/lt.js"(exports,module){var compare=require_compare();module.exports=(a,b,loose)=>compare(a,b,loose)<0}}),require_eq=(0,chunk_XP5HYGXS.P$)({"../../node_modules/semver/functions/eq.js"(exports,module){var compare=require_compare();module.exports=(a,b,loose)=>0===compare(a,b,loose)}}),require_neq=(0,chunk_XP5HYGXS.P$)({"../../node_modules/semver/functions/neq.js"(exports,module){var compare=require_compare();module.exports=(a,b,loose)=>0!==compare(a,b,loose)}}),require_gte=(0,chunk_XP5HYGXS.P$)({"../../node_modules/semver/functions/gte.js"(exports,module){var compare=require_compare();module.exports=(a,b,loose)=>compare(a,b,loose)>=0}}),require_lte=(0,chunk_XP5HYGXS.P$)({"../../node_modules/semver/functions/lte.js"(exports,module){var compare=require_compare();module.exports=(a,b,loose)=>compare(a,b,loose)<=0}}),require_cmp=(0,chunk_XP5HYGXS.P$)({"../../node_modules/semver/functions/cmp.js"(exports,module){var eq=require_eq(),neq=require_neq(),gt=require_gt(),gte=require_gte(),lt=require_lt(),lte=require_lte();module.exports=(a,op,b,loose)=>{switch(op){case"===":return"object"==typeof a&&(a=a.version),"object"==typeof b&&(b=b.version),a===b;case"!==":return"object"==typeof a&&(a=a.version),"object"==typeof b&&(b=b.version),a!==b;case"":case"=":case"==":return eq(a,b,loose);case"!=":return neq(a,b,loose);case">":return gt(a,b,loose);case">=":return gte(a,b,loose);case"<":return lt(a,b,loose);case"<=":return lte(a,b,loose);default:throw new TypeError(`Invalid operator: ${op}`)}}}}),require_coerce=(0,chunk_XP5HYGXS.P$)({"../../node_modules/semver/functions/coerce.js"(exports,module){var SemVer=require_semver(),parse=require_parse(),{safeRe:re,t}=require_re();module.exports=(version2,options)=>{if(version2 instanceof SemVer)return version2;if("number"==typeof version2&&(version2=String(version2)),"string"!=typeof version2)return null;let match=null;if((options=options||{}).rtl){let next,coerceRtlRegex=options.includePrerelease?re[t.COERCERTLFULL]:re[t.COERCERTL];for(;(next=coerceRtlRegex.exec(version2))&&(!match||match.index+match[0].length!==version2.length);)(!match||next.index+next[0].length!==match.index+match[0].length)&&(match=next),coerceRtlRegex.lastIndex=next.index+next[1].length+next[2].length;coerceRtlRegex.lastIndex=-1}else match=version2.match(options.includePrerelease?re[t.COERCEFULL]:re[t.COERCE]);if(null===match)return null;let major=match[2],minor=match[3]||"0",patch=match[4]||"0",prerelease=options.includePrerelease&&match[5]?`-${match[5]}`:"",build=options.includePrerelease&&match[6]?`+${match[6]}`:"";return parse(`${major}.${minor}.${patch}${prerelease}${build}`,options)}}}),require_lrucache=(0,chunk_XP5HYGXS.P$)({"../../node_modules/semver/internal/lrucache.js"(exports,module){module.exports=class{constructor(){this.max=1e3,this.map=new Map}get(key){let value=this.map.get(key);if(void 0!==value)return this.map.delete(key),this.map.set(key,value),value}delete(key){return this.map.delete(key)}set(key,value){if(!this.delete(key)&&void 0!==value){if(this.map.size>=this.max){let firstKey=this.map.keys().next().value;this.delete(firstKey)}this.map.set(key,value)}return this}}}}),require_range=(0,chunk_XP5HYGXS.P$)({"../../node_modules/semver/classes/range.js"(exports,module){var SPACE_CHARACTERS=/\s+/g;module.exports=class _Range{constructor(range,options){if(options=parseOptions(options),range instanceof _Range)return range.loose===!!options.loose&&range.includePrerelease===!!options.includePrerelease?range:new _Range(range.raw,options);if(range instanceof Comparator)return this.raw=range.value,this.set=[[range]],this.formatted=void 0,this;if(this.options=options,this.loose=!!options.loose,this.includePrerelease=!!options.includePrerelease,this.raw=range.trim().replace(SPACE_CHARACTERS," "),this.set=this.raw.split("||").map((r=>this.parseRange(r.trim()))).filter((c=>c.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let first=this.set[0];if(this.set=this.set.filter((c=>!isNullSet(c[0]))),0===this.set.length)this.set=[first];else if(this.set.length>1)for(let c of this.set)if(1===c.length&&isAny(c[0])){this.set=[c];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let i=0;i0&&(this.formatted+="||");let comps=this.set[i];for(let k=0;k0&&(this.formatted+=" "),this.formatted+=comps[k].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(range){let memoKey=((this.options.includePrerelease&&FLAG_INCLUDE_PRERELEASE)|(this.options.loose&&FLAG_LOOSE))+":"+range,cached=cache.get(memoKey);if(cached)return cached;let loose=this.options.loose,hr=loose?re[t.HYPHENRANGELOOSE]:re[t.HYPHENRANGE];range=range.replace(hr,hyphenReplace(this.options.includePrerelease)),debug("hyphen replace",range),range=range.replace(re[t.COMPARATORTRIM],comparatorTrimReplace),debug("comparator trim",range),range=range.replace(re[t.TILDETRIM],tildeTrimReplace),debug("tilde trim",range),range=range.replace(re[t.CARETTRIM],caretTrimReplace),debug("caret trim",range);let rangeList=range.split(" ").map((comp=>parseComparator(comp,this.options))).join(" ").split(/\s+/).map((comp=>replaceGTE0(comp,this.options)));loose&&(rangeList=rangeList.filter((comp=>(debug("loose invalid filter",comp,this.options),!!comp.match(re[t.COMPARATORLOOSE]))))),debug("range list",rangeList);let rangeMap=new Map,comparators=rangeList.map((comp=>new Comparator(comp,this.options)));for(let comp of comparators){if(isNullSet(comp))return[comp];rangeMap.set(comp.value,comp)}rangeMap.size>1&&rangeMap.has("")&&rangeMap.delete("");let result=[...rangeMap.values()];return cache.set(memoKey,result),result}intersects(range,options){if(!(range instanceof _Range))throw new TypeError("a Range is required");return this.set.some((thisComparators=>isSatisfiable(thisComparators,options)&&range.set.some((rangeComparators=>isSatisfiable(rangeComparators,options)&&thisComparators.every((thisComparator=>rangeComparators.every((rangeComparator=>thisComparator.intersects(rangeComparator,options)))))))))}test(version2){if(!version2)return!1;if("string"==typeof version2)try{version2=new SemVer(version2,this.options)}catch{return!1}for(let i=0;i"<0.0.0-0"===c.value,isAny=c=>""===c.value,isSatisfiable=(comparators,options)=>{let result=!0,remainingComparators=comparators.slice(),testComparator=remainingComparators.pop();for(;result&&remainingComparators.length;)result=remainingComparators.every((otherComparator=>testComparator.intersects(otherComparator,options))),testComparator=remainingComparators.pop();return result},parseComparator=(comp,options)=>(debug("comp",comp,options),comp=replaceCarets(comp,options),debug("caret",comp),comp=replaceTildes(comp,options),debug("tildes",comp),comp=replaceXRanges(comp,options),debug("xrange",comp),comp=replaceStars(comp,options),debug("stars",comp),comp),isX=id=>!id||"x"===id.toLowerCase()||"*"===id,replaceTildes=(comp,options)=>comp.trim().split(/\s+/).map((c=>replaceTilde(c,options))).join(" "),replaceTilde=(comp,options)=>{let r=options.loose?re[t.TILDELOOSE]:re[t.TILDE];return comp.replace(r,((_,M,m,p,pr)=>{let ret;return debug("tilde",comp,_,M,m,p,pr),isX(M)?ret="":isX(m)?ret=`>=${M}.0.0 <${+M+1}.0.0-0`:isX(p)?ret=`>=${M}.${m}.0 <${M}.${+m+1}.0-0`:pr?(debug("replaceTilde pr",pr),ret=`>=${M}.${m}.${p}-${pr} <${M}.${+m+1}.0-0`):ret=`>=${M}.${m}.${p} <${M}.${+m+1}.0-0`,debug("tilde return",ret),ret}))},replaceCarets=(comp,options)=>comp.trim().split(/\s+/).map((c=>replaceCaret(c,options))).join(" "),replaceCaret=(comp,options)=>{debug("caret",comp,options);let r=options.loose?re[t.CARETLOOSE]:re[t.CARET],z=options.includePrerelease?"-0":"";return comp.replace(r,((_,M,m,p,pr)=>{let ret;return debug("caret",comp,_,M,m,p,pr),isX(M)?ret="":isX(m)?ret=`>=${M}.0.0${z} <${+M+1}.0.0-0`:isX(p)?ret="0"===M?`>=${M}.${m}.0${z} <${M}.${+m+1}.0-0`:`>=${M}.${m}.0${z} <${+M+1}.0.0-0`:pr?(debug("replaceCaret pr",pr),ret="0"===M?"0"===m?`>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p+1}-0`:`>=${M}.${m}.${p}-${pr} <${M}.${+m+1}.0-0`:`>=${M}.${m}.${p}-${pr} <${+M+1}.0.0-0`):(debug("no pr"),ret="0"===M?"0"===m?`>=${M}.${m}.${p}${z} <${M}.${m}.${+p+1}-0`:`>=${M}.${m}.${p}${z} <${M}.${+m+1}.0-0`:`>=${M}.${m}.${p} <${+M+1}.0.0-0`),debug("caret return",ret),ret}))},replaceXRanges=(comp,options)=>(debug("replaceXRanges",comp,options),comp.split(/\s+/).map((c=>replaceXRange(c,options))).join(" ")),replaceXRange=(comp,options)=>{comp=comp.trim();let r=options.loose?re[t.XRANGELOOSE]:re[t.XRANGE];return comp.replace(r,((ret,gtlt,M,m,p,pr)=>{debug("xRange",comp,ret,gtlt,M,m,p,pr);let xM=isX(M),xm=xM||isX(m),xp=xm||isX(p),anyX=xp;return"="===gtlt&&anyX&&(gtlt=""),pr=options.includePrerelease?"-0":"",xM?ret=">"===gtlt||"<"===gtlt?"<0.0.0-0":"*":gtlt&&anyX?(xm&&(m=0),p=0,">"===gtlt?(gtlt=">=",xm?(M=+M+1,m=0,p=0):(m=+m+1,p=0)):"<="===gtlt&&(gtlt="<",xm?M=+M+1:m=+m+1),"<"===gtlt&&(pr="-0"),ret=`${gtlt+M}.${m}.${p}${pr}`):xm?ret=`>=${M}.0.0${pr} <${+M+1}.0.0-0`:xp&&(ret=`>=${M}.${m}.0${pr} <${M}.${+m+1}.0-0`),debug("xRange return",ret),ret}))},replaceStars=(comp,options)=>(debug("replaceStars",comp,options),comp.trim().replace(re[t.STAR],"")),replaceGTE0=(comp,options)=>(debug("replaceGTE0",comp,options),comp.trim().replace(re[options.includePrerelease?t.GTE0PRE:t.GTE0],"")),hyphenReplace=incPr=>($0,from,fM,fm,fp,fpr,fb,to,tM,tm,tp,tpr)=>`${from=isX(fM)?"":isX(fm)?`>=${fM}.0.0${incPr?"-0":""}`:isX(fp)?`>=${fM}.${fm}.0${incPr?"-0":""}`:fpr?`>=${from}`:`>=${from}${incPr?"-0":""}`} ${to=isX(tM)?"":isX(tm)?`<${+tM+1}.0.0-0`:isX(tp)?`<${tM}.${+tm+1}.0-0`:tpr?`<=${tM}.${tm}.${tp}-${tpr}`:incPr?`<${tM}.${tm}.${+tp+1}-0`:`<=${to}`}`.trim(),testSet=(set,version2,options)=>{for(let i=0;i0){let allowed=set[i].semver;if(allowed.major===version2.major&&allowed.minor===version2.minor&&allowed.patch===version2.patch)return!0}return!1}return!0}}}),require_comparator=(0,chunk_XP5HYGXS.P$)({"../../node_modules/semver/classes/comparator.js"(exports,module){var ANY=Symbol("SemVer ANY");module.exports=class _Comparator{static get ANY(){return ANY}constructor(comp,options){if(options=parseOptions(options),comp instanceof _Comparator){if(comp.loose===!!options.loose)return comp;comp=comp.value}comp=comp.trim().split(/\s+/).join(" "),debug("comparator",comp,options),this.options=options,this.loose=!!options.loose,this.parse(comp),this.semver===ANY?this.value="":this.value=this.operator+this.semver.version,debug("comp",this)}parse(comp){let r=this.options.loose?re[t.COMPARATORLOOSE]:re[t.COMPARATOR],m=comp.match(r);if(!m)throw new TypeError(`Invalid comparator: ${comp}`);this.operator=void 0!==m[1]?m[1]:"","="===this.operator&&(this.operator=""),m[2]?this.semver=new SemVer(m[2],this.options.loose):this.semver=ANY}toString(){return this.value}test(version2){if(debug("Comparator.test",version2,this.options.loose),this.semver===ANY||version2===ANY)return!0;if("string"==typeof version2)try{version2=new SemVer(version2,this.options)}catch{return!1}return cmp(version2,this.operator,this.semver,this.options)}intersects(comp,options){if(!(comp instanceof _Comparator))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new Range(comp.value,options).test(this.value):""===comp.operator?""===comp.value||new Range(this.value,options).test(comp.semver):!((options=parseOptions(options)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===comp.value)||!options.includePrerelease&&(this.value.startsWith("<0.0.0")||comp.value.startsWith("<0.0.0")))&&!!(this.operator.startsWith(">")&&comp.operator.startsWith(">")||this.operator.startsWith("<")&&comp.operator.startsWith("<")||this.semver.version===comp.semver.version&&this.operator.includes("=")&&comp.operator.includes("=")||cmp(this.semver,"<",comp.semver,options)&&this.operator.startsWith(">")&&comp.operator.startsWith("<")||cmp(this.semver,">",comp.semver,options)&&this.operator.startsWith("<")&&comp.operator.startsWith(">"))}};var parseOptions=require_parse_options(),{safeRe:re,t}=require_re(),cmp=require_cmp(),debug=require_debug(),SemVer=require_semver(),Range=require_range()}}),require_satisfies=(0,chunk_XP5HYGXS.P$)({"../../node_modules/semver/functions/satisfies.js"(exports,module){var Range=require_range();module.exports=(version2,range,options)=>{try{range=new Range(range,options)}catch{return!1}return range.test(version2)}}}),require_to_comparators=(0,chunk_XP5HYGXS.P$)({"../../node_modules/semver/ranges/to-comparators.js"(exports,module){var Range=require_range();module.exports=(range,options)=>new Range(range,options).set.map((comp=>comp.map((c=>c.value)).join(" ").trim().split(" ")))}}),require_max_satisfying=(0,chunk_XP5HYGXS.P$)({"../../node_modules/semver/ranges/max-satisfying.js"(exports,module){var SemVer=require_semver(),Range=require_range();module.exports=(versions,range,options)=>{let max=null,maxSV=null,rangeObj=null;try{rangeObj=new Range(range,options)}catch{return null}return versions.forEach((v=>{rangeObj.test(v)&&(!max||-1===maxSV.compare(v))&&(max=v,maxSV=new SemVer(max,options))})),max}}}),require_min_satisfying=(0,chunk_XP5HYGXS.P$)({"../../node_modules/semver/ranges/min-satisfying.js"(exports,module){var SemVer=require_semver(),Range=require_range();module.exports=(versions,range,options)=>{let min=null,minSV=null,rangeObj=null;try{rangeObj=new Range(range,options)}catch{return null}return versions.forEach((v=>{rangeObj.test(v)&&(!min||1===minSV.compare(v))&&(min=v,minSV=new SemVer(min,options))})),min}}}),require_min_version=(0,chunk_XP5HYGXS.P$)({"../../node_modules/semver/ranges/min-version.js"(exports,module){var SemVer=require_semver(),Range=require_range(),gt=require_gt();module.exports=(range,loose)=>{range=new Range(range,loose);let minver=new SemVer("0.0.0");if(range.test(minver)||(minver=new SemVer("0.0.0-0"),range.test(minver)))return minver;minver=null;for(let i=0;i{let compver=new SemVer(comparator.semver.version);switch(comparator.operator){case">":0===compver.prerelease.length?compver.patch++:compver.prerelease.push(0),compver.raw=compver.format();case"":case">=":(!setMin||gt(compver,setMin))&&(setMin=compver);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${comparator.operator}`)}})),setMin&&(!minver||gt(minver,setMin))&&(minver=setMin)}return minver&&range.test(minver)?minver:null}}}),require_valid2=(0,chunk_XP5HYGXS.P$)({"../../node_modules/semver/ranges/valid.js"(exports,module){var Range=require_range();module.exports=(range,options)=>{try{return new Range(range,options).range||"*"}catch{return null}}}}),require_outside=(0,chunk_XP5HYGXS.P$)({"../../node_modules/semver/ranges/outside.js"(exports,module){var SemVer=require_semver(),Comparator=require_comparator(),{ANY}=Comparator,Range=require_range(),satisfies=require_satisfies(),gt=require_gt(),lt=require_lt(),lte=require_lte(),gte=require_gte();module.exports=(version2,range,hilo,options)=>{let gtfn,ltefn,ltfn,comp,ecomp;switch(version2=new SemVer(version2,options),range=new Range(range,options),hilo){case">":gtfn=gt,ltefn=lte,ltfn=lt,comp=">",ecomp=">=";break;case"<":gtfn=lt,ltefn=gte,ltfn=gt,comp="<",ecomp="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies(version2,range,options))return!1;for(let i=0;i{comparator.semver===ANY&&(comparator=new Comparator(">=0.0.0")),high=high||comparator,low=low||comparator,gtfn(comparator.semver,high.semver,options)?high=comparator:ltfn(comparator.semver,low.semver,options)&&(low=comparator)})),high.operator===comp||high.operator===ecomp||(!low.operator||low.operator===comp)&<efn(version2,low.semver))return!1;if(low.operator===ecomp&<fn(version2,low.semver))return!1}return!0}}}),require_gtr=(0,chunk_XP5HYGXS.P$)({"../../node_modules/semver/ranges/gtr.js"(exports,module){var outside=require_outside();module.exports=(version2,range,options)=>outside(version2,range,">",options)}}),require_ltr=(0,chunk_XP5HYGXS.P$)({"../../node_modules/semver/ranges/ltr.js"(exports,module){var outside=require_outside();module.exports=(version2,range,options)=>outside(version2,range,"<",options)}}),require_intersects=(0,chunk_XP5HYGXS.P$)({"../../node_modules/semver/ranges/intersects.js"(exports,module){var Range=require_range();module.exports=(r1,r2,options)=>(r1=new Range(r1,options),r2=new Range(r2,options),r1.intersects(r2,options))}}),require_simplify=(0,chunk_XP5HYGXS.P$)({"../../node_modules/semver/ranges/simplify.js"(exports,module){var satisfies=require_satisfies(),compare=require_compare();module.exports=(versions,range,options)=>{let set=[],first=null,prev=null,v=versions.sort(((a,b)=>compare(a,b,options)));for(let version2 of v)satisfies(version2,range,options)?(prev=version2,first||(first=version2)):(prev&&set.push([first,prev]),prev=null,first=null);first&&set.push([first,null]);let ranges=[];for(let[min,max]of set)min===max?ranges.push(min):max||min!==v[0]?max?min===v[0]?ranges.push(`<=${max}`):ranges.push(`${min} - ${max}`):ranges.push(`>=${min}`):ranges.push("*");let simplified=ranges.join(" || "),original="string"==typeof range.raw?range.raw:String(range);return simplified.length=0.0.0-0")],minimumVersion=[new Comparator(">=0.0.0")],simpleSubset=(sub,dom,options)=>{if(sub===dom)return!0;if(1===sub.length&&sub[0].semver===ANY){if(1===dom.length&&dom[0].semver===ANY)return!0;sub=options.includePrerelease?minimumVersionWithPreRelease:minimumVersion}if(1===dom.length&&dom[0].semver===ANY){if(options.includePrerelease)return!0;dom=minimumVersion}let gt,lt,gtltComp,eqSet=new Set;for(let c of sub)">"===c.operator||">="===c.operator?gt=higherGT(gt,c,options):"<"===c.operator||"<="===c.operator?lt=lowerLT(lt,c,options):eqSet.add(c.semver);if(eqSet.size>1)return null;if(gt&<){if(gtltComp=compare(gt.semver,lt.semver,options),gtltComp>0)return null;if(0===gtltComp&&(">="!==gt.operator||"<="!==lt.operator))return null}for(let eq of eqSet){if(gt&&!satisfies(eq,String(gt),options)||lt&&!satisfies(eq,String(lt),options))return null;for(let c of dom)if(!satisfies(eq,String(c),options))return!1;return!0}let higher,lower,hasDomLT,hasDomGT,needDomLTPre=!(!lt||options.includePrerelease||!lt.semver.prerelease.length)&<.semver,needDomGTPre=!(!gt||options.includePrerelease||!gt.semver.prerelease.length)&>.semver;needDomLTPre&&1===needDomLTPre.prerelease.length&&"<"===lt.operator&&0===needDomLTPre.prerelease[0]&&(needDomLTPre=!1);for(let c of dom){if(hasDomGT=hasDomGT||">"===c.operator||">="===c.operator,hasDomLT=hasDomLT||"<"===c.operator||"<="===c.operator,gt)if(needDomGTPre&&c.semver.prerelease&&c.semver.prerelease.length&&c.semver.major===needDomGTPre.major&&c.semver.minor===needDomGTPre.minor&&c.semver.patch===needDomGTPre.patch&&(needDomGTPre=!1),">"===c.operator||">="===c.operator){if(higher=higherGT(gt,c,options),higher===c&&higher!==gt)return!1}else if(">="===gt.operator&&!satisfies(gt.semver,String(c),options))return!1;if(lt)if(needDomLTPre&&c.semver.prerelease&&c.semver.prerelease.length&&c.semver.major===needDomLTPre.major&&c.semver.minor===needDomLTPre.minor&&c.semver.patch===needDomLTPre.patch&&(needDomLTPre=!1),"<"===c.operator||"<="===c.operator){if(lower=lowerLT(lt,c,options),lower===c&&lower!==lt)return!1}else if("<="===lt.operator&&!satisfies(lt.semver,String(c),options))return!1;if(!c.operator&&(lt||gt)&&0!==gtltComp)return!1}return!(gt&&hasDomLT&&!lt&&0!==gtltComp||lt&&hasDomGT&&!gt&&0!==gtltComp||needDomGTPre||needDomLTPre)},higherGT=(a,b,options)=>{if(!a)return b;let comp=compare(a.semver,b.semver,options);return comp>0?a:comp<0||">"===b.operator&&">="===a.operator?b:a},lowerLT=(a,b,options)=>{if(!a)return b;let comp=compare(a.semver,b.semver,options);return comp<0?a:comp>0||"<"===b.operator&&"<="===a.operator?b:a};module.exports=(sub,dom,options={})=>{if(sub===dom)return!0;sub=new Range(sub,options),dom=new Range(dom,options);let sawNonNull=!1;OUTER:for(let simpleSub of sub.set){for(let simpleDom of dom.set){let isSub=simpleSubset(simpleSub,simpleDom,options);if(sawNonNull=sawNonNull||null!==isSub,isSub)continue OUTER}if(sawNonNull)return!1}return!0}}}),require_semver2=(0,chunk_XP5HYGXS.P$)({"../../node_modules/semver/index.js"(exports,module){var internalRe=require_re(),constants=require_constants(),SemVer=require_semver(),identifiers=require_identifiers(),parse=require_parse(),valid=require_valid(),clean=require_clean(),inc=require_inc(),diff=require_diff(),major=require_major(),minor=require_minor(),patch=require_patch(),prerelease=require_prerelease(),compare=require_compare(),rcompare=require_rcompare(),compareLoose=require_compare_loose(),compareBuild=require_compare_build(),sort=require_sort(),rsort=require_rsort(),gt=require_gt(),lt=require_lt(),eq=require_eq(),neq=require_neq(),gte=require_gte(),lte=require_lte(),cmp=require_cmp(),coerce=require_coerce(),Comparator=require_comparator(),Range=require_range(),satisfies=require_satisfies(),toComparators=require_to_comparators(),maxSatisfying=require_max_satisfying(),minSatisfying=require_min_satisfying(),minVersion=require_min_version(),validRange=require_valid2(),outside=require_outside(),gtr=require_gtr(),ltr=require_ltr(),intersects=require_intersects(),simplifyRange=require_simplify(),subset=require_subset();module.exports={parse,valid,clean,inc,diff,major,minor,patch,prerelease,compare,rcompare,compareLoose,compareBuild,sort,rsort,gt,lt,eq,neq,gte,lte,cmp,coerce,Comparator,Range,satisfies,toComparators,maxSatisfying,minSatisfying,minVersion,validRange,outside,gtr,ltr,intersects,simplifyRange,subset,SemVer,re:internalRe.re,src:internalRe.src,tokens:internalRe.t,SEMVER_SPEC_VERSION:constants.SEMVER_SPEC_VERSION,RELEASE_TYPES:constants.RELEASE_TYPES,compareIdentifiers:identifiers.compareIdentifiers,rcompareIdentifiers:identifiers.rcompareIdentifiers}}});(0,chunk_XP5HYGXS.VA)({},{applyDecorators:()=>chunk_XLZBPYSH.t,beforeAll:()=>beforeAll,decorators:()=>decorators,mount:()=>mount,parameters:()=>parameters,render:()=>render,renderToCanvas:()=>renderToCanvas});var import_semver=(0,chunk_XP5HYGXS.f1)(require_semver2());function setReactActEnvironment(isReactActEnvironment){globalThis.IS_REACT_ACT_ENVIRONMENT=isReactActEnvironment}function getReactActEnvironment(){return globalThis.IS_REACT_ACT_ENVIRONMENT}var getAct=async({disableAct=!1}={})=>cb=>cb(),render=(args,context)=>{let{id,component:Component}=context;if(!Component)throw new Error(`Unable to render story ${id} as the component annotation is missing from the default export`);return react.createElement(Component,{...args})},{FRAMEWORK_OPTIONS}=external_STORYBOOK_MODULE_GLOBAL_.global,ErrorBoundary=class extends react.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidMount(){let{hasError}=this.state,{showMain}=this.props;hasError||showMain()}componentDidCatch(err){let{showException}=this.props;showException(err)}render(){let{hasError}=this.state,{children}=this.props;return hasError?null:children}},Wrapper=FRAMEWORK_OPTIONS?.strictMode?react.StrictMode:react.Fragment,actQueue=[],isActing=!1,processActQueue=async()=>{if(isActing||0===actQueue.length)return;isActing=!0;let actTask=actQueue.shift();actTask&&await actTask(),isActing=!1,processActQueue()};async function renderToCanvas({storyContext,unboundStoryFn,showMain,showException,forceRemount},canvasElement){let{renderElement,unmountElement}=await __webpack_require__.e(735).then(__webpack_require__.bind(__webpack_require__,"./node_modules/@storybook/react-dom-shim/dist/react-18.mjs")),Story=unboundStoryFn,content=storyContext.parameters.__isPortableStory?react.createElement(Story,{...storyContext}):react.createElement(ErrorBoundary,{key:storyContext.id,showMain,showException},react.createElement(Story,{...storyContext})),element=Wrapper?react.createElement(Wrapper,null,content):content;forceRemount&&unmountElement(canvasElement);let act=await getAct({disableAct:"docs"===storyContext.viewMode});return await new Promise((async(resolve,reject)=>{actQueue.push((async()=>{try{await act((async()=>{await renderElement(element,canvasElement,storyContext?.parameters?.react?.rootOptions)})),resolve()}catch(e){reject(e)}})),processActQueue()})),async()=>{await act((()=>{unmountElement(canvasElement)}))}}var mount=context=>async ui=>(null!=ui&&(context.originalStoryFn=()=>ui),await context.renderToCanvas(),context.canvas),decorators=[(story,context)=>{if(!context.parameters?.react?.rsc)return story();let major=import_semver.default.major(react.version),minor=import_semver.default.minor(react.version);if(major<18||18===major&&minor<3)throw new Error("React Server Components require React >= 18.3");return react.createElement(react.Suspense,null,story())}],parameters={renderer:"react"},beforeAll=async()=>{try{let{configure}=await Promise.resolve().then(__webpack_require__.t.bind(__webpack_require__,"storybook/test",23)),act=await getAct();configure({unstable_advanceTimersWrapper:cb=>act(cb),asyncWrapper:async cb=>{let previousActEnvironment=getReactActEnvironment();setReactActEnvironment(!1);try{let result=await cb();return await new Promise((resolve=>{setTimeout((()=>{resolve()}),0),function jestFakeTimersAreEnabled(){return typeof jest<"u"&&null!==jest&&(!0===setTimeout._isMockFunction||Object.prototype.hasOwnProperty.call(setTimeout,"clock"))}()&&jest.advanceTimersByTime(0)})),result}finally{setReactActEnvironment(previousActEnvironment)}},eventWrapper:cb=>{let result;return act((()=>(result=cb(),result))),result}})}catch{}}},"./node_modules/codesandbox-import-utils/lib/api/define.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";exports.b=void 0;var LZString=__webpack_require__("./node_modules/lz-string/libs/lz-string.js");exports.b=function getParameters(parameters){return function compress(input){return LZString.compressToBase64(input).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}(JSON.stringify(parameters))}},"./node_modules/keyborg/dist/esm/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Oy:()=>KEYBORG_FOCUSIN,RY:()=>KEYBORG_FOCUSOUT,SQ:()=>createKeyborg,bd:()=>disposeKeyborg,kG:()=>nativeFocus});var _canUseWeakRef="undefined"!=typeof WeakRef,WeakRefInstance=class{constructor(instance){_canUseWeakRef&&"object"==typeof instance?this._weakRef=new WeakRef(instance):this._instance=instance}deref(){var _a,_b;let instance;return this._weakRef?(instance=null==(_a=this._weakRef)?void 0:_a.deref(),instance||delete this._weakRef):(instance=this._instance,(null==(_b=null==instance?void 0:instance.isDisposed)?void 0:_b.call(instance))&&delete this._instance),instance}},KEYBORG_FOCUSIN="keyborg:focusin",KEYBORG_FOCUSOUT="keyborg:focusout";var _canOverrideNativeFocus=!1;function nativeFocus(element){const focus=element.focus;focus.__keyborgNativeFocus?focus.__keyborgNativeFocus.call(element):element.focus()}var _lastId=0,KeyborgCore=class{constructor(win,props){this._isNavigatingWithKeyboard_DO_NOT_USE=!1,this._onFocusIn=e=>{if(this._isMouseOrTouchUsedTimer)return;if(this.isNavigatingWithKeyboard)return;const details=e.detail;details.relatedTarget&&(details.isFocusedProgrammatically||void 0===details.isFocusedProgrammatically||(this.isNavigatingWithKeyboard=!0))},this._onMouseDown=e=>{0===e.buttons||0===e.clientX&&0===e.clientY&&0===e.screenX&&0===e.screenY||this._onMouseOrTouch()},this._onMouseOrTouch=()=>{const win=this._win;win&&(this._isMouseOrTouchUsedTimer&&win.clearTimeout(this._isMouseOrTouchUsedTimer),this._isMouseOrTouchUsedTimer=win.setTimeout((()=>{delete this._isMouseOrTouchUsedTimer}),1e3)),this.isNavigatingWithKeyboard=!1},this._onKeyDown=e=>{this.isNavigatingWithKeyboard?this._shouldDismissKeyboardNavigation(e)&&this._scheduleDismiss():this._shouldTriggerKeyboardNavigation(e)&&(this.isNavigatingWithKeyboard=!0)},this.id="c"+ ++_lastId,this._win=win;const doc=win.document;if(props){const triggerKeys=props.triggerKeys,dismissKeys=props.dismissKeys;(null==triggerKeys?void 0:triggerKeys.length)&&(this._triggerKeys=new Set(triggerKeys)),(null==dismissKeys?void 0:dismissKeys.length)&&(this._dismissKeys=new Set(dismissKeys))}doc.addEventListener(KEYBORG_FOCUSIN,this._onFocusIn,!0),doc.addEventListener("mousedown",this._onMouseDown,!0),win.addEventListener("keydown",this._onKeyDown,!0),doc.addEventListener("touchstart",this._onMouseOrTouch,!0),doc.addEventListener("touchend",this._onMouseOrTouch,!0),doc.addEventListener("touchcancel",this._onMouseOrTouch,!0),function setupFocusEvent(win){const kwin=win;_canOverrideNativeFocus||(_canOverrideNativeFocus=function canOverrideNativeFocus(win){const HTMLElement=win.HTMLElement,origFocus=HTMLElement.prototype.focus;let isCustomFocusCalled=!1;return HTMLElement.prototype.focus=function focus(){isCustomFocusCalled=!0},win.document.createElement("button").focus(),HTMLElement.prototype.focus=origFocus,isCustomFocusCalled}(kwin));const origFocus=kwin.HTMLElement.prototype.focus;if(origFocus.__keyborgNativeFocus)return;kwin.HTMLElement.prototype.focus=focus;const shadowTargets=new Set,focusOutHandler=e=>{const target=e.target;if(!target)return;const event=new CustomEvent(KEYBORG_FOCUSOUT,{cancelable:!0,bubbles:!0,composed:!0,detail:{originalEvent:e}});target.dispatchEvent(event)},focusInHandler=e=>{const target=e.target;if(!target)return;let node=e.composedPath()[0];const currentShadows=new Set;for(;node;)node.nodeType===Node.DOCUMENT_FRAGMENT_NODE?(currentShadows.add(node),node=node.host):node=node.parentNode;for(const shadowRootWeakRef of shadowTargets){const shadowRoot=shadowRootWeakRef.deref();shadowRoot&¤tShadows.has(shadowRoot)||(shadowTargets.delete(shadowRootWeakRef),shadowRoot&&(shadowRoot.removeEventListener("focusin",focusInHandler,!0),shadowRoot.removeEventListener("focusout",focusOutHandler,!0)))}onFocusIn(target,e.relatedTarget||void 0)},onFocusIn=(target,relatedTarget,originalEvent)=>{var _a;const shadowRoot=target.shadowRoot;if(shadowRoot){for(const shadowRootWeakRef of shadowTargets)if(shadowRootWeakRef.deref()===shadowRoot)return;return shadowRoot.addEventListener("focusin",focusInHandler,!0),shadowRoot.addEventListener("focusout",focusOutHandler,!0),void shadowTargets.add(new WeakRefInstance(shadowRoot))}const details={relatedTarget,originalEvent},event=new CustomEvent(KEYBORG_FOCUSIN,{cancelable:!0,bubbles:!0,composed:!0,detail:details});event.details=details,(_canOverrideNativeFocus||data.lastFocusedProgrammatically)&&(details.isFocusedProgrammatically=target===(null==(_a=data.lastFocusedProgrammatically)?void 0:_a.deref()),data.lastFocusedProgrammatically=void 0),target.dispatchEvent(event)},data=kwin.__keyborgData={focusInHandler,focusOutHandler,shadowTargets};function focus(){const keyborgNativeFocusEvent=kwin.__keyborgData;return keyborgNativeFocusEvent&&(keyborgNativeFocusEvent.lastFocusedProgrammatically=new WeakRefInstance(this)),origFocus.apply(this,arguments)}kwin.document.addEventListener("focusin",kwin.__keyborgData.focusInHandler,!0),kwin.document.addEventListener("focusout",kwin.__keyborgData.focusOutHandler,!0);let activeElement=kwin.document.activeElement;for(;activeElement&&activeElement.shadowRoot;)onFocusIn(activeElement),activeElement=activeElement.shadowRoot.activeElement;focus.__keyborgNativeFocus=origFocus}(win)}get isNavigatingWithKeyboard(){return this._isNavigatingWithKeyboard_DO_NOT_USE}set isNavigatingWithKeyboard(val){this._isNavigatingWithKeyboard_DO_NOT_USE!==val&&(this._isNavigatingWithKeyboard_DO_NOT_USE=val,this.update())}dispose(){const win=this._win;if(win){this._isMouseOrTouchUsedTimer&&(win.clearTimeout(this._isMouseOrTouchUsedTimer),this._isMouseOrTouchUsedTimer=void 0),this._dismissTimer&&(win.clearTimeout(this._dismissTimer),this._dismissTimer=void 0),function disposeFocusEvent(win){const kwin=win,proto=kwin.HTMLElement.prototype,origFocus=proto.focus.__keyborgNativeFocus,keyborgNativeFocusEvent=kwin.__keyborgData;if(keyborgNativeFocusEvent){kwin.document.removeEventListener("focusin",keyborgNativeFocusEvent.focusInHandler,!0),kwin.document.removeEventListener("focusout",keyborgNativeFocusEvent.focusOutHandler,!0);for(const shadowRootWeakRef of keyborgNativeFocusEvent.shadowTargets){const shadowRoot=shadowRootWeakRef.deref();shadowRoot&&(shadowRoot.removeEventListener("focusin",keyborgNativeFocusEvent.focusInHandler,!0),shadowRoot.removeEventListener("focusout",keyborgNativeFocusEvent.focusOutHandler,!0))}keyborgNativeFocusEvent.shadowTargets.clear(),delete kwin.__keyborgData}origFocus&&(proto.focus=origFocus)}(win);const doc=win.document;doc.removeEventListener(KEYBORG_FOCUSIN,this._onFocusIn,!0),doc.removeEventListener("mousedown",this._onMouseDown,!0),win.removeEventListener("keydown",this._onKeyDown,!0),doc.removeEventListener("touchstart",this._onMouseOrTouch,!0),doc.removeEventListener("touchend",this._onMouseOrTouch,!0),doc.removeEventListener("touchcancel",this._onMouseOrTouch,!0),delete this._win}}isDisposed(){return!!this._win}update(){var _a,_b;const keyborgs=null==(_b=null==(_a=this._win)?void 0:_a.__keyborg)?void 0:_b.refs;if(keyborgs)for(const id of Object.keys(keyborgs))Keyborg.update(keyborgs[id],this.isNavigatingWithKeyboard)}_shouldTriggerKeyboardNavigation(e){var _a;if("Tab"===e.key)return!0;const activeElement=null==(_a=this._win)?void 0:_a.document.activeElement,isTriggerKey=!this._triggerKeys||this._triggerKeys.has(e.keyCode),isEditable=activeElement&&("INPUT"===activeElement.tagName||"TEXTAREA"===activeElement.tagName||activeElement.isContentEditable);return isTriggerKey&&!isEditable}_shouldDismissKeyboardNavigation(e){var _a;return null==(_a=this._dismissKeys)?void 0:_a.has(e.keyCode)}_scheduleDismiss(){const win=this._win;if(win){this._dismissTimer&&(win.clearTimeout(this._dismissTimer),this._dismissTimer=void 0);const was=win.document.activeElement;this._dismissTimer=win.setTimeout((()=>{this._dismissTimer=void 0;const cur=win.document.activeElement;was&&cur&&was===cur&&(this.isNavigatingWithKeyboard=!1)}),500)}}},Keyborg=class _Keyborg{constructor(win,props){this._cb=[],this._id="k"+ ++_lastId,this._win=win;const current=win.__keyborg;current?(this._core=current.core,current.refs[this._id]=this):(this._core=new KeyborgCore(win,props),win.__keyborg={core:this._core,refs:{[this._id]:this}})}static create(win,props){return new _Keyborg(win,props)}static dispose(instance){instance.dispose()}static update(instance,isNavigatingWithKeyboard){instance._cb.forEach((callback=>callback(isNavigatingWithKeyboard)))}dispose(){var _a;const current=null==(_a=this._win)?void 0:_a.__keyborg;(null==current?void 0:current.refs[this._id])&&(delete current.refs[this._id],0===Object.keys(current.refs).length&&(current.core.dispose(),delete this._win.__keyborg)),this._cb=[],delete this._core,delete this._win}isNavigatingWithKeyboard(){var _a;return!!(null==(_a=this._core)?void 0:_a.isNavigatingWithKeyboard)}subscribe(callback){this._cb.push(callback)}unsubscribe(callback){const index=this._cb.indexOf(callback);index>=0&&this._cb.splice(index,1)}setVal(isNavigatingWithKeyboard){this._core&&(this._core.isNavigatingWithKeyboard=isNavigatingWithKeyboard)}};function createKeyborg(win,props){return Keyborg.create(win,props)}function disposeKeyborg(instance){Keyborg.dispose(instance)}},"./node_modules/lz-string/libs/lz-string.js":(module,exports,__webpack_require__)=>{var __WEBPACK_AMD_DEFINE_RESULT__,LZString=function(){var f=String.fromCharCode,keyStrBase64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",keyStrUriSafe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",baseReverseDic={};function getBaseValue(alphabet,character){if(!baseReverseDic[alphabet]){baseReverseDic[alphabet]={};for(var i=0;i>>8,buf[2*i+1]=current_value%256}return buf},decompressFromUint8Array:function(compressed){if(null==compressed)return LZString.decompress(compressed);for(var buf=new Array(compressed.length/2),i=0,TotalLen=buf.length;i>=1}else{for(value=1,i=0;i>=1}0==--context_enlargeIn&&(context_enlargeIn=Math.pow(2,context_numBits),context_numBits++),delete context_dictionaryToCreate[context_w]}else for(value=context_dictionary[context_w],i=0;i>=1;0==--context_enlargeIn&&(context_enlargeIn=Math.pow(2,context_numBits),context_numBits++),context_dictionary[context_wc]=context_dictSize++,context_w=String(context_c)}if(""!==context_w){if(Object.prototype.hasOwnProperty.call(context_dictionaryToCreate,context_w)){if(context_w.charCodeAt(0)<256){for(i=0;i>=1}else{for(value=1,i=0;i>=1}0==--context_enlargeIn&&(context_enlargeIn=Math.pow(2,context_numBits),context_numBits++),delete context_dictionaryToCreate[context_w]}else for(value=context_dictionary[context_w],i=0;i>=1;0==--context_enlargeIn&&(context_enlargeIn=Math.pow(2,context_numBits),context_numBits++)}for(value=2,i=0;i>=1;for(;;){if(context_data_val<<=1,context_data_position==bitsPerChar-1){context_data.push(getCharFromInt(context_data_val));break}context_data_position++}return context_data.join("")},decompress:function(compressed){return null==compressed?"":""==compressed?null:LZString._decompress(compressed.length,32768,(function(index){return compressed.charCodeAt(index)}))},_decompress:function(length,resetValue,getNextValue){var i,w,bits,resb,maxpower,power,c,dictionary=[],enlargeIn=4,dictSize=4,numBits=3,entry="",result=[],data={val:getNextValue(0),position:resetValue,index:1};for(i=0;i<3;i+=1)dictionary[i]=i;for(bits=0,maxpower=Math.pow(2,2),power=1;power!=maxpower;)resb=data.val&data.position,data.position>>=1,0==data.position&&(data.position=resetValue,data.val=getNextValue(data.index++)),bits|=(resb>0?1:0)*power,power<<=1;switch(bits){case 0:for(bits=0,maxpower=Math.pow(2,8),power=1;power!=maxpower;)resb=data.val&data.position,data.position>>=1,0==data.position&&(data.position=resetValue,data.val=getNextValue(data.index++)),bits|=(resb>0?1:0)*power,power<<=1;c=f(bits);break;case 1:for(bits=0,maxpower=Math.pow(2,16),power=1;power!=maxpower;)resb=data.val&data.position,data.position>>=1,0==data.position&&(data.position=resetValue,data.val=getNextValue(data.index++)),bits|=(resb>0?1:0)*power,power<<=1;c=f(bits);break;case 2:return""}for(dictionary[3]=c,w=c,result.push(c);;){if(data.index>length)return"";for(bits=0,maxpower=Math.pow(2,numBits),power=1;power!=maxpower;)resb=data.val&data.position,data.position>>=1,0==data.position&&(data.position=resetValue,data.val=getNextValue(data.index++)),bits|=(resb>0?1:0)*power,power<<=1;switch(c=bits){case 0:for(bits=0,maxpower=Math.pow(2,8),power=1;power!=maxpower;)resb=data.val&data.position,data.position>>=1,0==data.position&&(data.position=resetValue,data.val=getNextValue(data.index++)),bits|=(resb>0?1:0)*power,power<<=1;dictionary[dictSize++]=f(bits),c=dictSize-1,enlargeIn--;break;case 1:for(bits=0,maxpower=Math.pow(2,16),power=1;power!=maxpower;)resb=data.val&data.position,data.position>>=1,0==data.position&&(data.position=resetValue,data.val=getNextValue(data.index++)),bits|=(resb>0?1:0)*power,power<<=1;dictionary[dictSize++]=f(bits),c=dictSize-1,enlargeIn--;break;case 2:return result.join("")}if(0==enlargeIn&&(enlargeIn=Math.pow(2,numBits),numBits++),dictionary[c])entry=dictionary[c];else{if(c!==dictSize)return null;entry=w+w.charAt(0)}result.push(entry),dictionary[dictSize++]=w+entry.charAt(0),w=entry,0==--enlargeIn&&(enlargeIn=Math.pow(2,numBits),numBits++)}}};return LZString}();void 0===(__WEBPACK_AMD_DEFINE_RESULT__=function(){return LZString}.call(exports,__webpack_require__,exports,module))||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)},"./node_modules/react-dom/cjs/react-dom.production.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";var React=__webpack_require__("./node_modules/react/index.js");function formatProdErrorMessage(code){var url="https://react.dev/errors/"+code;if(1{"use strict";!function checkDCE(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE)}catch(err){console.error(err)}}(),module.exports=__webpack_require__("./node_modules/react-dom/cjs/react-dom.production.js")},"./node_modules/react/cjs/react-jsx-runtime.production.js":(__unused_webpack_module,exports)=>{"use strict";var REACT_ELEMENT_TYPE=Symbol.for("react.transitional.element"),REACT_FRAGMENT_TYPE=Symbol.for("react.fragment");function jsxProd(type,config,maybeKey){var key=null;if(void 0!==maybeKey&&(key=""+maybeKey),void 0!==config.key&&(key=""+config.key),"key"in config)for(var propName in maybeKey={},config)"key"!==propName&&(maybeKey[propName]=config[propName]);else maybeKey=config;return config=maybeKey.ref,{$$typeof:REACT_ELEMENT_TYPE,type,key,ref:void 0!==config?config:null,props:maybeKey}}exports.Fragment=REACT_FRAGMENT_TYPE,exports.jsx=jsxProd,exports.jsxs=jsxProd},"./node_modules/react/cjs/react.production.js":(__unused_webpack_module,exports)=>{"use strict";var REACT_ELEMENT_TYPE=Symbol.for("react.transitional.element"),REACT_PORTAL_TYPE=Symbol.for("react.portal"),REACT_FRAGMENT_TYPE=Symbol.for("react.fragment"),REACT_STRICT_MODE_TYPE=Symbol.for("react.strict_mode"),REACT_PROFILER_TYPE=Symbol.for("react.profiler"),REACT_CONSUMER_TYPE=Symbol.for("react.consumer"),REACT_CONTEXT_TYPE=Symbol.for("react.context"),REACT_FORWARD_REF_TYPE=Symbol.for("react.forward_ref"),REACT_SUSPENSE_TYPE=Symbol.for("react.suspense"),REACT_MEMO_TYPE=Symbol.for("react.memo"),REACT_LAZY_TYPE=Symbol.for("react.lazy"),REACT_ACTIVITY_TYPE=Symbol.for("react.activity"),MAYBE_ITERATOR_SYMBOL=Symbol.iterator;var ReactNoopUpdateQueue={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},assign=Object.assign,emptyObject={};function Component(props,context,updater){this.props=props,this.context=context,this.refs=emptyObject,this.updater=updater||ReactNoopUpdateQueue}function ComponentDummy(){}function PureComponent(props,context,updater){this.props=props,this.context=context,this.refs=emptyObject,this.updater=updater||ReactNoopUpdateQueue}Component.prototype.isReactComponent={},Component.prototype.setState=function(partialState,callback){if("object"!=typeof partialState&&"function"!=typeof partialState&&null!=partialState)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,partialState,callback,"setState")},Component.prototype.forceUpdate=function(callback){this.updater.enqueueForceUpdate(this,callback,"forceUpdate")},ComponentDummy.prototype=Component.prototype;var pureComponentPrototype=PureComponent.prototype=new ComponentDummy;pureComponentPrototype.constructor=PureComponent,assign(pureComponentPrototype,Component.prototype),pureComponentPrototype.isPureReactComponent=!0;var isArrayImpl=Array.isArray;function noop(){}var ReactSharedInternals={H:null,A:null,T:null,S:null},hasOwnProperty=Object.prototype.hasOwnProperty;function ReactElement(type,key,props){var refProp=props.ref;return{$$typeof:REACT_ELEMENT_TYPE,type,key,ref:void 0!==refProp?refProp:null,props}}function isValidElement(object){return"object"==typeof object&&null!==object&&object.$$typeof===REACT_ELEMENT_TYPE}var userProvidedKeyEscapeRegex=/\/+/g;function getElementKey(element,index){return"object"==typeof element&&null!==element&&null!=element.key?function escape(key){var escaperLookup={"=":"=0",":":"=2"};return"$"+key.replace(/[=:]/g,(function(match){return escaperLookup[match]}))}(""+element.key):index.toString(36)}function mapIntoArray(children,array,escapedPrefix,nameSoFar,callback){var type=typeof children;"undefined"!==type&&"boolean"!==type||(children=null);var invokeCallback=!1;if(null===children)invokeCallback=!0;else switch(type){case"bigint":case"string":case"number":invokeCallback=!0;break;case"object":switch(children.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:invokeCallback=!0;break;case REACT_LAZY_TYPE:return mapIntoArray((invokeCallback=children._init)(children._payload),array,escapedPrefix,nameSoFar,callback)}}if(invokeCallback)return callback=callback(children),invokeCallback=""===nameSoFar?"."+getElementKey(children,0):nameSoFar,isArrayImpl(callback)?(escapedPrefix="",null!=invokeCallback&&(escapedPrefix=invokeCallback.replace(userProvidedKeyEscapeRegex,"$&/")+"/"),mapIntoArray(callback,array,escapedPrefix,"",(function(c){return c}))):null!=callback&&(isValidElement(callback)&&(callback=function cloneAndReplaceKey(oldElement,newKey){return ReactElement(oldElement.type,newKey,oldElement.props)}(callback,escapedPrefix+(null==callback.key||children&&children.key===callback.key?"":(""+callback.key).replace(userProvidedKeyEscapeRegex,"$&/")+"/")+invokeCallback)),array.push(callback)),1;invokeCallback=0;var nextNamePrefix=""===nameSoFar?".":nameSoFar+":";if(isArrayImpl(children))for(var i=0;i{"use strict";module.exports=__webpack_require__("./node_modules/react/cjs/react.production.js")},"./node_modules/react/jsx-runtime.js":(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";module.exports=__webpack_require__("./node_modules/react/cjs/react-jsx-runtime.production.js")},"./node_modules/rtl-css-js/dist/esm/core.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function arrayToObject(array){return array.reduce((function(obj,_ref){var prop1=_ref[0],prop2=_ref[1];return obj[prop1]=prop2,obj[prop2]=prop1,obj}),{})}function isNumber(val){return"number"==typeof val}function includes(inclusive,inclusee){return-1!==inclusive.indexOf(inclusee)}function flipTransformSign(match,prefix,offset,suffix){return prefix+function flipSign(value){return 0===parseFloat(value)?value:"-"===value[0]?value.slice(1):"-"+value}(offset)+suffix}function getValuesAsList(value){return value.replace(/ +/g," ").split(" ").map((function(i){return i.trim()})).filter(Boolean).reduce((function(_ref2,item){var list=_ref2.list,state=_ref2.state,openParansCount=(item.match(/\(/g)||[]).length,closedParansCount=(item.match(/\)/g)||[]).length;return state.parensDepth>0?list[list.length-1]=list[list.length-1]+" "+item:list.push(item),state.parensDepth+=openParansCount-closedParansCount,{list,state}}),{list:[],state:{parensDepth:0}}).list}function handleQuartetValues(value){var splitValues=getValuesAsList(value);if(splitValues.length<=3||splitValues.length>4)return value;var top=splitValues[0],right=splitValues[1],bottom=splitValues[2];return[top,splitValues[3],bottom,right].join(" ")}__webpack_require__.d(__webpack_exports__,{C6:()=>convert,dG:()=>convertProperty});var propertyValueConverters={padding:function padding(_ref){var value=_ref.value;return isNumber(value)?value:handleQuartetValues(value)},textShadow:function textShadow(_ref2){var flippedShadows=function splitShadow(value){for(var shadows=[],start=0,end=0,rgba=!1;end{"use strict";function push(heap,node){var index=heap.length;heap.push(node);a:for(;0>>1,parent=heap[parentIndex];if(!(0>>1;indexcompare(left,last))rightIndexcompare(right,left)?(heap[index]=right,heap[rightIndex]=last,index=rightIndex):(heap[index]=left,heap[leftIndex]=last,index=leftIndex);else{if(!(rightIndexcompare(right,last)))break a;heap[index]=right,heap[rightIndex]=last,index=rightIndex}}}return first}function compare(a,b){var diff=a.sortIndex-b.sortIndex;return 0!==diff?diff:a.id-b.id}if(exports.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var localPerformance=performance;exports.unstable_now=function(){return localPerformance.now()}}else{var localDate=Date,initialTime=localDate.now();exports.unstable_now=function(){return localDate.now()-initialTime}}var taskQueue=[],timerQueue=[],taskIdCounter=1,currentTask=null,currentPriorityLevel=3,isPerformingWork=!1,isHostCallbackScheduled=!1,isHostTimeoutScheduled=!1,needsPaint=!1,localSetTimeout="function"==typeof setTimeout?setTimeout:null,localClearTimeout="function"==typeof clearTimeout?clearTimeout:null,localSetImmediate="undefined"!=typeof setImmediate?setImmediate:null;function advanceTimers(currentTime){for(var timer=peek(timerQueue);null!==timer;){if(null===timer.callback)pop(timerQueue);else{if(!(timer.startTime<=currentTime))break;pop(timerQueue),timer.sortIndex=timer.expirationTime,push(taskQueue,timer)}timer=peek(timerQueue)}}function handleTimeout(currentTime){if(isHostTimeoutScheduled=!1,advanceTimers(currentTime),!isHostCallbackScheduled)if(null!==peek(taskQueue))isHostCallbackScheduled=!0,isMessageLoopRunning||(isMessageLoopRunning=!0,schedulePerformWorkUntilDeadline());else{var firstTimer=peek(timerQueue);null!==firstTimer&&requestHostTimeout(handleTimeout,firstTimer.startTime-currentTime)}}var schedulePerformWorkUntilDeadline,isMessageLoopRunning=!1,taskTimeoutID=-1,frameInterval=5,startTime=-1;function shouldYieldToHost(){return!!needsPaint||!(exports.unstable_now()-startTimecurrentTime&&shouldYieldToHost());){var callback=currentTask.callback;if("function"==typeof callback){currentTask.callback=null,currentPriorityLevel=currentTask.priorityLevel;var continuationCallback=callback(currentTask.expirationTime<=currentTime);if(currentTime=exports.unstable_now(),"function"==typeof continuationCallback){currentTask.callback=continuationCallback,advanceTimers(currentTime),hasMoreWork=!0;break b}currentTask===peek(taskQueue)&&pop(taskQueue),advanceTimers(currentTime)}else pop(taskQueue);currentTask=peek(taskQueue)}if(null!==currentTask)hasMoreWork=!0;else{var firstTimer=peek(timerQueue);null!==firstTimer&&requestHostTimeout(handleTimeout,firstTimer.startTime-currentTime),hasMoreWork=!1}}break a}finally{currentTask=null,currentPriorityLevel=previousPriorityLevel,isPerformingWork=!1}hasMoreWork=void 0}}finally{hasMoreWork?schedulePerformWorkUntilDeadline():isMessageLoopRunning=!1}}}if("function"==typeof localSetImmediate)schedulePerformWorkUntilDeadline=function(){localSetImmediate(performWorkUntilDeadline)};else if("undefined"!=typeof MessageChannel){var channel=new MessageChannel,port=channel.port2;channel.port1.onmessage=performWorkUntilDeadline,schedulePerformWorkUntilDeadline=function(){port.postMessage(null)}}else schedulePerformWorkUntilDeadline=function(){localSetTimeout(performWorkUntilDeadline,0)};function requestHostTimeout(callback,ms){taskTimeoutID=localSetTimeout((function(){callback(exports.unstable_now())}),ms)}exports.unstable_IdlePriority=5,exports.unstable_ImmediatePriority=1,exports.unstable_LowPriority=4,exports.unstable_NormalPriority=3,exports.unstable_Profiling=null,exports.unstable_UserBlockingPriority=2,exports.unstable_cancelCallback=function(task){task.callback=null},exports.unstable_forceFrameRate=function(fps){0>fps||125currentTime?(priorityLevel.sortIndex=options,push(timerQueue,priorityLevel),null===peek(taskQueue)&&priorityLevel===peek(timerQueue)&&(isHostTimeoutScheduled?(localClearTimeout(taskTimeoutID),taskTimeoutID=-1):isHostTimeoutScheduled=!0,requestHostTimeout(handleTimeout,options-currentTime))):(priorityLevel.sortIndex=timeout,push(taskQueue,priorityLevel),isHostCallbackScheduled||isPerformingWork||(isHostCallbackScheduled=!0,isMessageLoopRunning||(isMessageLoopRunning=!0,schedulePerformWorkUntilDeadline()))),priorityLevel},exports.unstable_shouldYield=shouldYieldToHost,exports.unstable_wrapCallback=function(callback){var parentPriorityLevel=currentPriorityLevel;return function(){var previousPriorityLevel=currentPriorityLevel;currentPriorityLevel=parentPriorityLevel;try{return callback.apply(this,arguments)}finally{currentPriorityLevel=previousPriorityLevel}}}},"./node_modules/scheduler/index.js":(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";module.exports=__webpack_require__("./node_modules/scheduler/cjs/scheduler.production.js")},"./node_modules/storybook/dist/components/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";var react__WEBPACK_IMPORTED_MODULE_0___namespace_cache;__webpack_require__.d(__webpack_exports__,{$n:()=>Hr,Cy:()=>ci,Df:()=>H3,E7:()=>Za,GP:()=>E3,H2:()=>di,H3:()=>pi,K0:()=>So,N_:()=>Ii,Q2:()=>Yo,YV:()=>N,_:()=>x6,_j:()=>h0,aH:()=>Lw,bF:()=>nu,createCopyToClipboardFunction:()=>ii,dK:()=>qO,dL:()=>W0,jZ:()=>Pw,kR:()=>u6,lV:()=>d7,mc:()=>J,o4:()=>d6,px:()=>Uo,zb:()=>lt});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),storybook_theming__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/storybook/dist/theming/index.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/react/jsx-runtime.js"),react_dom__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/react-dom/index.js"),storybook_internal_client_logger__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("storybook/internal/client-logger"),_storybook_global__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("@storybook/global"),storybook_internal_csf__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/storybook/dist/csf/index.js"),Ep=Object.create,Pn=Object.defineProperty,Sp=Object.getOwnPropertyDescriptor,Cp=Object.getOwnPropertyNames,Mp=Object.getPrototypeOf,Ap=Object.prototype.hasOwnProperty,o=(e,t)=>Pn(e,"name",{value:t,configurable:!0}),Jr=(()=>__webpack_require__("./node_modules/storybook/dist/components sync recursive"))(),C=(e,t)=>()=>(e&&(t=e(e=0)),t),H=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Qr=(e,t)=>{for(var r in t)Pn(e,r,{get:t[r],enumerable:!0})},ge=(e,t,r)=>(r=null!=e?Ep(Mp(e)):{},((e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of Cp(t))!Ap.call(e,a)&&a!==r&&Pn(e,a,{get:()=>t[a],enumerable:!(n=Sp(t,a))||n.enumerable});return e})(!t&&e&&e.__esModule?r:Pn(r,"default",{value:e,enumerable:!0}),e));function W(){return W=Object.assign?Object.assign.bind():function(e){for(var t=1;t{o(W,"_extends")}));function H0(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var P0=C((()=>{o(H0,"_assertThisInitialized")}));function vt(e,t){return(vt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r})(e,t)}var kn=C((()=>{o(vt,"_setPrototypeOf")}));function On(e){return(On=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(e)}var O0=C((()=>{o(On,"_getPrototypeOf")})),rn=H(((q0,ca)=>{!function(e){if("object"==typeof q0&&typeof ca<"u")ca.exports=e();else if("function"==typeof define&&__webpack_require__.amdO)define([],e);else{(typeof window<"u"?window:typeof __webpack_require__.g<"u"?__webpack_require__.g:typeof self<"u"?self:this).memoizerific=e()}}((function(){return o((function n(a,i,c){function l(f,d){if(!i[f]){if(!a[f]){var m="function"==typeof Jr&&Jr;if(!d&&m)return m(f,!0);if(s)return s(f,!0);var v=new Error("Cannot find module '"+f+"'");throw v.code="MODULE_NOT_FOUND",v}var y=i[f]={exports:{}};a[f][0].call(y.exports,(function(p){return l(a[f][1][p]||p)}),y,y.exports,n,a,i,c)}return i[f].exports}o(l,"s");for(var s="function"==typeof Jr&&Jr,u=0;u=0?(this.lastItem=this.list[s],this.list[s].val):void 0},c.prototype.set=function(l,s){var u;return this.lastItem&&this.isEqual(this.lastItem.key,l)?(this.lastItem.val=s,this):(u=this.indexOf(l))>=0?(this.lastItem=this.list[u],this.list[u].val=s,this):(this.lastItem={key:l,val:s},this.list.push(this.lastItem),this.size++,this)},c.prototype.delete=function(l){var s;if(this.lastItem&&this.isEqual(this.lastItem.key,l)&&(this.lastItem=void 0),(s=this.indexOf(l))>=0)return this.size--,this.list.splice(s,1)[0]},c.prototype.has=function(l){var s;return!(!this.lastItem||!this.isEqual(this.lastItem.key,l))||(s=this.indexOf(l))>=0&&(this.lastItem=this.list[s],!0)},c.prototype.forEach=function(l,s){var u;for(u=0;u=0&&(!(v=(m=f[y]).cacheItem.get(m.arg))||!v.size);y--)m.cacheItem.delete(m.arg)}function u(f,d){return f===d||f!=f&&d!=d}a.exports=function(f){var d=new c(!1),m=[];return function(v){var y=o((function(){var h,g,E,p=d,w=arguments.length-1,b=Array(w+1),x=!0;if((y.numArgs||0===y.numArgs)&&y.numArgs!==w+1)throw new Error("Memoizerific functions should always be called with the same number of arguments");for(E=0;E0&&(b[w]={cacheItem:p,arg:arguments[w]},x?l(m,b):m.push(b),m.length>f&&s(m.shift())),y.wasMemoized=x,y.numArgs=w+1,g}),"memoizerific");return y.limit=f,y.wasMemoized=!1,y.cache=d,y.lru=m,y}},o(l,"moveToMostRecentLru"),o(s,"removeCachedResult"),o(u,"isEqual")},{"map-or-similar":1}]},{},[3])(3)}))}));function pr(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}var Fn=C((()=>{o(pr,"_objectWithoutPropertiesLoose")}));function G0(e,t){if(null==e)return{};var r,n,a=pr(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n{Fn(),o(G0,"_objectWithoutProperties")}));function nn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{o(nn,"_arrayLikeToArray")}));function X0(e){if(Array.isArray(e))return nn(e)}var Z0=C((()=>{sa(),o(X0,"_arrayWithoutHoles")}));function K0(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}var J0=C((()=>{o(K0,"_iterableToArray")}));function Q0(e,t){if(e){if("string"==typeof e)return nn(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?nn(e,t):void 0}}var ec=C((()=>{sa(),o(Q0,"_unsupportedIterableToArray")}));function tc(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var rc=C((()=>{o(tc,"_nonIterableSpread")}));function Dn(e){return X0(e)||K0(e)||Q0(e)||tc()}var nc=C((()=>{Z0(),J0(),ec(),rc(),o(Dn,"_toConsumableArray")}));function Vt(e){return(Vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var ua=C((()=>{o(Vt,"_typeof")}));function oc(e,t){if("object"!=Vt(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Vt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var ac=C((()=>{ua(),o(oc,"toPrimitive")}));function ic(e){var t=oc(e,"string");return"symbol"==Vt(t)?t:t+""}var lc=C((()=>{ua(),ac(),o(ic,"toPropertyKey")}));function _n(e,t,r){return(t=ic(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var fa=C((()=>{lc(),o(_n,"_defineProperty")}));function cc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),r.push.apply(r,n)}return r}function mr(e){for(var t=1;t=4?[e[0],e[1],e[2],e[3],"".concat(e[0],".").concat(e[1]),"".concat(e[0],".").concat(e[2]),"".concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[0]),"".concat(e[1],".").concat(e[2]),"".concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[1]),"".concat(e[2],".").concat(e[3]),"".concat(e[3],".").concat(e[0]),"".concat(e[3],".").concat(e[1]),"".concat(e[3],".").concat(e[2]),"".concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[1],".").concat(e[3]),"".concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[2],".").concat(e[3]),"".concat(e[0],".").concat(e[3],".").concat(e[1]),"".concat(e[0],".").concat(e[3],".").concat(e[2]),"".concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[1],".").concat(e[2],".").concat(e[3]),"".concat(e[1],".").concat(e[3],".").concat(e[0]),"".concat(e[1],".").concat(e[3],".").concat(e[2]),"".concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[0],".").concat(e[3]),"".concat(e[2],".").concat(e[1],".").concat(e[0]),"".concat(e[2],".").concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[3],".").concat(e[0]),"".concat(e[2],".").concat(e[3],".").concat(e[1]),"".concat(e[3],".").concat(e[0],".").concat(e[1]),"".concat(e[3],".").concat(e[0],".").concat(e[2]),"".concat(e[3],".").concat(e[1],".").concat(e[0]),"".concat(e[3],".").concat(e[1],".").concat(e[2]),"".concat(e[3],".").concat(e[2],".").concat(e[0]),"".concat(e[3],".").concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[1],".").concat(e[2],".").concat(e[3]),"".concat(e[0],".").concat(e[1],".").concat(e[3],".").concat(e[2]),"".concat(e[0],".").concat(e[2],".").concat(e[1],".").concat(e[3]),"".concat(e[0],".").concat(e[2],".").concat(e[3],".").concat(e[1]),"".concat(e[0],".").concat(e[3],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[3],".").concat(e[2],".").concat(e[1]),"".concat(e[1],".").concat(e[0],".").concat(e[2],".").concat(e[3]),"".concat(e[1],".").concat(e[0],".").concat(e[3],".").concat(e[2]),"".concat(e[1],".").concat(e[2],".").concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[2],".").concat(e[3],".").concat(e[0]),"".concat(e[1],".").concat(e[3],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[3],".").concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[0],".").concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[0],".").concat(e[3],".").concat(e[1]),"".concat(e[2],".").concat(e[1],".").concat(e[0],".").concat(e[3]),"".concat(e[2],".").concat(e[1],".").concat(e[3],".").concat(e[0]),"".concat(e[2],".").concat(e[3],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[3],".").concat(e[1],".").concat(e[0]),"".concat(e[3],".").concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[3],".").concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[3],".").concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[3],".").concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[3],".").concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[3],".").concat(e[2],".").concat(e[1],".").concat(e[0])]:void 0}function y2(e){if(0===e.length||1===e.length)return e;var t=e.join(".");return da[t]||(da[t]=b2(e)),da[t]}function R2(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;return y2(e.filter((function(i){return"token"!==i}))).reduce((function(i,c){return mr(mr({},i),r[c])}),t)}function sc(e){return e.join(" ")}function x2(e,t){var r=0;return function(n){return r+=1,n.map((function(a,i){return $t({node:a,stylesheet:e,useInlineStyles:t,key:"code-segment-".concat(r,"-").concat(i)})}))}}function $t(e){var t=e.node,r=e.stylesheet,n=e.style,a=void 0===n?{}:n,i=e.useInlineStyles,c=e.key,l=t.properties,s=t.type,u=t.tagName,f=t.value;if("text"===s)return f;if(u){var m,d=x2(r,i);if(i){var v=Object.keys(r).reduce((function(g,w){return w.split(".").forEach((function(b){g.includes(b)||g.push(b)})),g}),[]),y=l.className&&l.className.includes("token")?["token"]:[],p=l.className&&y.concat(l.className.filter((function(g){return!v.includes(g)})));m=mr(mr({},l),{},{className:sc(p)||void 0,style:R2(l.className,Object.assign({},l.style,a),r)})}else m=mr(mr({},l),{},{className:sc(l.className)});var h=d(t.children);return react__WEBPACK_IMPORTED_MODULE_0__.createElement(u,W({key:c},m),h)}}var da,uc,pa=C((()=>{en(),fa(),o(cc,"ownKeys"),o(mr,"_objectSpread"),o(b2,"powerSetPermutations"),da={},o(y2,"getClassNameCombinations"),o(R2,"createStyleObject"),o(sc,"createClassNameString"),o(x2,"createChildren"),o($t,"createElement")})),fc=C((()=>{uc=o((function(e,t){return-1!==e.listLanguages().indexOf(t)}),"default")}));function dc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),r.push.apply(r,n)}return r}function Rt(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=0;n2&&void 0!==arguments[2]?arguments[2]:[],showLineNumbers:n,wrapLongLines:s,wrapLines:t})}function p(E,R){if(n&&R&&a){var S=mc(l,R,c);E.unshift(pc(R,S))}return E}function h(E,R){var S=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return t||S.length>0?y(E,R,S):p(E,R)}o(y,"createWrappedLine"),o(p,"createUnwrappedLine"),o(h,"createLine");for(var g=o((function(){var R=f[v],S=R.children[0].value;if(C2(S)){var M=S.split("\n");M.forEach((function(L,P){var _=n&&d.length+i,D={type:"text",value:"".concat(L,"\n")};if(0===P){var T=h(f.slice(m+1,v).concat(Vn({children:[D],className:R.properties.className})),_);d.push(T)}else if(P===M.length-1){var z=f[v+1]&&f[v+1].children&&f[v+1].children[0],k={type:"text",value:"".concat(L)};if(z){var $=Vn({children:[k],className:R.properties.className});f.splice(v+1,0,$)}else{var j=h([k],_,R.properties.className);d.push(j)}}else{var G=h([D],_,R.properties.className);d.push(G)}})),m=v}v++}),"_loop");v{Y0(),nc(),fa(),pa(),fc(),E2=["language","children","style","customStyle","codeTagProps","useInlineStyles","showLineNumbers","showInlineLineNumbers","startingLineNumber","lineNumberContainerStyle","lineNumberStyle","wrapLines","wrapLongLines","lineProps","renderer","PreTag","CodeTag","code","astGenerator"],o(dc,"ownKeys"),o(Rt,"_objectSpread"),S2=/\n/g,o(C2,"getNewLines"),o(M2,"getAllLineNumbers"),o(A2,"AllLineNumbers"),o(L2,"getEmWidthOfNumber"),o(pc,"getInlineLineNumber"),o(mc,"assembleLineNumberStyles"),o(Vn,"createLineElement"),o(hc,"flattenCodeTree"),o(I2,"processLines"),o(z2,"defaultRenderer"),o(gc,"isHighlightJs"),o(T2,"getCodeTree"),o(ma,"default")})),bc=H(((Zb,wc)=>{wc.exports=P2;var H2=Object.prototype.hasOwnProperty;function P2(){for(var e={},t=0;t{Rc.exports=yc;var ha=yc.prototype;function yc(e,t,r){this.property=e,this.normal=t,r&&(this.space=r)}ha.space=null,ha.normal={},ha.property={},o(yc,"Schema")})),Sc=H(((e9,Ec)=>{var xc=bc(),k2=ga();function O2(e){for(var i,c,t=e.length,r=[],n=[],a=-1;++a{function B2(e){return e.toLowerCase()}Cc.exports=B2,o(B2,"normalize")})),va=H(((o9,Ac)=>{Ac.exports=Mc;var _e=Mc.prototype;function Mc(e,t){this.property=e,this.attribute=t}_e.space=null,_e.attribute=null,_e.property=null,_e.boolean=!1,_e.booleanish=!1,_e.overloadedBoolean=!1,_e.number=!1,_e.commaSeparated=!1,_e.spaceSeparated=!1,_e.commaOrSpaceSeparated=!1,_e.mustUseProperty=!1,_e.defined=!1,o(Mc,"Info")})),jn=H((xt=>{var N2=0;function Wt(){return Math.pow(2,++N2)}xt.boolean=Wt(),xt.booleanish=Wt(),xt.overloadedBoolean=Wt(),xt.number=Wt(),xt.spaceSeparated=Wt(),xt.commaSeparated=Wt(),xt.commaOrSpaceSeparated=Wt(),o(Wt,"increment")})),ba=H(((c9,Hc)=>{var zc=va(),Lc=jn();Hc.exports=wa,wa.prototype=new zc,wa.prototype.defined=!0;var Tc=["boolean","booleanish","overloadedBoolean","number","commaSeparated","spaceSeparated","commaOrSpaceSeparated"],F2=Tc.length;function wa(e,t,r,n){var i,a=-1;for(Ic(this,"space",n),zc.call(this,e,t);++a{var Pc=$n(),D2=ga(),_2=ba();function V2(e){var s,u,t=e.space,r=e.mustUseProperty||[],n=e.attributes||{},a=e.properties,i=e.transform,c={},l={};for(s in a)u=new _2(s,i(n,s),a[s],t),-1!==r.indexOf(s)&&(u.mustUseProperty=!0),c[s]=u,l[Pc(s)]=s,l[Pc(u.attribute)]=s;return new D2(c,l,t)}kc.exports=V2,o(V2,"create")})),Bc=H(((d9,Oc)=>{var $2=hr();function j2(e,t){return"xlink:"+t.slice(5).toLowerCase()}Oc.exports=$2({space:"xlink",transform:j2,properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),o(j2,"xlinkTransform")})),Fc=H(((m9,Nc)=>{var W2=hr();function U2(e,t){return"xml:"+t.slice(3).toLowerCase()}Nc.exports=W2({space:"xml",transform:U2,properties:{xmlLang:null,xmlBase:null,xmlSpace:null}}),o(U2,"xmlTransform")})),_c=H(((g9,Dc)=>{function q2(e,t){return t in e?e[t]:t}Dc.exports=q2,o(q2,"caseSensitiveTransform")})),ya=H(((w9,Vc)=>{var G2=_c();function Y2(e,t){return G2(e,t.toLowerCase())}Vc.exports=Y2,o(Y2,"caseInsensitiveTransform")})),jc=H(((y9,$c)=>{var X2=hr(),Z2=ya();$c.exports=X2({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Z2,properties:{xmlns:null,xmlnsXLink:null}})})),Uc=H(((R9,Wc)=>{var Ra=jn(),K2=hr(),Ie=Ra.booleanish,Ve=Ra.number,Ut=Ra.spaceSeparated;function J2(e,t){return"role"===t?t:"aria-"+t.slice(4).toLowerCase()}Wc.exports=K2({transform:J2,properties:{ariaActiveDescendant:null,ariaAtomic:Ie,ariaAutoComplete:null,ariaBusy:Ie,ariaChecked:Ie,ariaColCount:Ve,ariaColIndex:Ve,ariaColSpan:Ve,ariaControls:Ut,ariaCurrent:null,ariaDescribedBy:Ut,ariaDetails:null,ariaDisabled:Ie,ariaDropEffect:Ut,ariaErrorMessage:null,ariaExpanded:Ie,ariaFlowTo:Ut,ariaGrabbed:Ie,ariaHasPopup:null,ariaHidden:Ie,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ut,ariaLevel:Ve,ariaLive:null,ariaModal:Ie,ariaMultiLine:Ie,ariaMultiSelectable:Ie,ariaOrientation:null,ariaOwns:Ut,ariaPlaceholder:null,ariaPosInSet:Ve,ariaPressed:Ie,ariaReadOnly:Ie,ariaRelevant:null,ariaRequired:Ie,ariaRoleDescription:Ut,ariaRowCount:Ve,ariaRowIndex:Ve,ariaRowSpan:Ve,ariaSelected:Ie,ariaSetSize:Ve,ariaSort:null,ariaValueMax:Ve,ariaValueMin:Ve,ariaValueNow:Ve,ariaValueText:null,role:null}}),o(J2,"ariaTransform")})),Gc=H(((E9,qc)=>{var gr=jn(),Q2=hr(),e4=ya(),B=gr.boolean,t4=gr.overloadedBoolean,on=gr.booleanish,Y=gr.number,xe=gr.spaceSeparated,Wn=gr.commaSeparated;qc.exports=Q2({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:e4,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Wn,acceptCharset:xe,accessKey:xe,action:null,allow:null,allowFullScreen:B,allowPaymentRequest:B,allowUserMedia:B,alt:null,as:null,async:B,autoCapitalize:null,autoComplete:xe,autoFocus:B,autoPlay:B,capture:B,charSet:null,checked:B,cite:null,className:xe,cols:Y,colSpan:null,content:null,contentEditable:on,controls:B,controlsList:xe,coords:Y|Wn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:B,defer:B,dir:null,dirName:null,disabled:B,download:t4,draggable:on,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:B,formTarget:null,headers:xe,height:Y,hidden:B,high:Y,href:null,hrefLang:null,htmlFor:xe,httpEquiv:xe,id:null,imageSizes:null,imageSrcSet:Wn,inputMode:null,integrity:null,is:null,isMap:B,itemId:null,itemProp:xe,itemRef:xe,itemScope:B,itemType:xe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:B,low:Y,manifest:null,max:null,maxLength:Y,media:null,method:null,min:null,minLength:Y,multiple:B,muted:B,name:null,nonce:null,noModule:B,noValidate:B,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextMenu:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:B,optimum:Y,pattern:null,ping:xe,placeholder:null,playsInline:B,poster:null,preload:null,readOnly:B,referrerPolicy:null,rel:xe,required:B,reversed:B,rows:Y,rowSpan:Y,sandbox:xe,scope:null,scoped:B,seamless:B,selected:B,shape:null,size:Y,sizes:null,slot:null,span:Y,spellCheck:on,src:null,srcDoc:null,srcLang:null,srcSet:Wn,start:Y,step:null,style:null,tabIndex:Y,target:null,title:null,translate:null,type:null,typeMustMatch:B,useMap:null,value:on,width:Y,wrap:null,align:null,aLink:null,archive:xe,axis:null,background:null,bgColor:null,border:Y,borderColor:null,bottomMargin:Y,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:B,declare:B,event:null,face:null,frame:null,frameBorder:null,hSpace:Y,leftMargin:Y,link:null,longDesc:null,lowSrc:null,marginHeight:Y,marginWidth:Y,noResize:B,noHref:B,noShade:B,noWrap:B,object:null,profile:null,prompt:null,rev:null,rightMargin:Y,rules:null,scheme:null,scrolling:on,standby:null,summary:null,text:null,topMargin:Y,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Y,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:B,disableRemotePlayback:B,prefix:null,property:null,results:Y,security:null,unselectable:null}})})),Xc=H(((S9,Yc)=>{var r4=Sc(),n4=Bc(),o4=Fc(),a4=jc(),i4=Uc(),l4=Gc();Yc.exports=r4([o4,n4,a4,i4,l4])})),Jc=H(((C9,Kc)=>{var c4=$n(),s4=ba(),u4=va(),xa="data";Kc.exports=p4;var f4=/^data[-\w.:]+$/i,Zc=/-[a-z]/g,d4=/[A-Z]/g;function p4(e,t){var r=c4(t),n=t,a=u4;return r in e.normal?e.property[e.normal[r]]:(r.length>4&&r.slice(0,4)===xa&&f4.test(t)&&("-"===t.charAt(4)?n=m4(t):t=h4(t),a=s4),new a(n,t))}function m4(e){var t=e.slice(5).replace(Zc,v4);return xa+t.charAt(0).toUpperCase()+t.slice(1)}function h4(e){var t=e.slice(4);return Zc.test(t)?e:("-"!==(t=t.replace(d4,g4)).charAt(0)&&(t="-"+t),xa+t)}function g4(e){return"-"+e.toLowerCase()}function v4(e){return e.charAt(1).toUpperCase()}o(p4,"find"),o(m4,"datasetToProperty"),o(h4,"datasetToAttribute"),o(g4,"kebab"),o(v4,"camelcase")})),ts=H(((A9,es)=>{es.exports=w4;var Qc=/[#.]/g;function w4(e,t){for(var c,l,s,r=e||"",n=t||"div",a={},i=0;i{Ea.parse=R4,Ea.stringify=x4;var rs="",b4=" ",y4=/[ \t\n\r\f]+/g;function R4(e){var t=String(e||rs).trim();return t===rs?[]:t.split(y4)}function x4(e){return e.join(b4).trim()}o(R4,"parse"),o(x4,"stringify")})),as=H((Ca=>{Ca.parse=E4,Ca.stringify=S4;var Sa=",",os=" ",an="";function E4(e){for(var c,t=[],r=String(e||an),n=r.indexOf(Sa),a=0,i=!1;!i;)-1===n&&(n=r.length,i=!0),((c=r.slice(a,n).trim())||!i)&&t.push(c),a=n+1,n=r.indexOf(Sa,a);return t}function S4(e,t){var r=t||{},n=!1===r.padLeft?an:os,a=r.padRight?os:an;return e[e.length-1]===an&&(e=e.concat(an)),e.join(a+Sa+n).trim()}o(E4,"parse"),o(S4,"stringify")})),ds=H(((P9,fs)=>{var C4=Jc(),is=$n(),M4=ts(),ls=ns().parse,cs=as().parse;fs.exports=L4;var A4={}.hasOwnProperty;function L4(e,t,r){var n=r?P4(r):null;return function a(c,l){var d,s=M4(c,t),u=Array.prototype.slice.call(arguments,2),f=s.tagName.toLowerCase();if(s.tagName=n&&A4.call(n,f)?n[f]:f,l&&I4(l,s)&&(u.unshift(l),l=null),l)for(d in l)i(s.properties,d,l[d]);return us(s.children,u),"template"===s.tagName&&(s.content={type:"root",children:s.children},s.children=[]),s};function i(c,l,s){var u,f,d;null==s||s!=s||(f=(u=C4(e,l)).property,"string"==typeof(d=s)&&(u.spaceSeparated?d=ls(d):u.commaSeparated?d=cs(d):u.commaOrSpaceSeparated&&(d=ls(cs(d).join(" ")))),"style"===f&&"string"!=typeof s&&(d=H4(d)),"className"===f&&c.className&&(d=c.className.concat(d)),c[f]=T4(u,f,d))}}function I4(e,t){return"string"==typeof e||"length"in e||z4(t.tagName,e)}function z4(e,t){var r=t.type;return!("input"===e||!r||"string"!=typeof r)&&("object"==typeof t.children&&"length"in t.children||(r=r.toLowerCase(),"button"===e?"menu"!==r&&"submit"!==r&&"reset"!==r&&"button"!==r:"value"in t))}function us(e,t){var r,n;if("string"!=typeof t&&"number"!=typeof t)if("object"==typeof t&&"length"in t)for(r=-1,n=t.length;++r{var k4=Xc(),ps=ds()(k4,"div");ps.displayName="html",ms.exports=ps})),vs=H(((B9,gs)=>{gs.exports=hs()})),ws=H(((N9,B4)=>{B4.exports={AElig:"Æ",AMP:"&",Aacute:"Á",Acirc:"Â",Agrave:"À",Aring:"Å",Atilde:"Ã",Auml:"Ä",COPY:"©",Ccedil:"Ç",ETH:"Ð",Eacute:"É",Ecirc:"Ê",Egrave:"È",Euml:"Ë",GT:">",Iacute:"Í",Icirc:"Î",Igrave:"Ì",Iuml:"Ï",LT:"<",Ntilde:"Ñ",Oacute:"Ó",Ocirc:"Ô",Ograve:"Ò",Oslash:"Ø",Otilde:"Õ",Ouml:"Ö",QUOT:'"',REG:"®",THORN:"Þ",Uacute:"Ú",Ucirc:"Û",Ugrave:"Ù",Uuml:"Ü",Yacute:"Ý",aacute:"á",acirc:"â",acute:"´",aelig:"æ",agrave:"à",amp:"&",aring:"å",atilde:"ã",auml:"ä",brvbar:"¦",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",ecirc:"ê",egrave:"è",eth:"ð",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",iacute:"í",icirc:"î",iexcl:"¡",igrave:"ì",iquest:"¿",iuml:"ï",laquo:"«",lt:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",oacute:"ó",ocirc:"ô",ograve:"ò",ordf:"ª",ordm:"º",oslash:"ø",otilde:"õ",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',raquo:"»",reg:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",times:"×",uacute:"ú",ucirc:"û",ugrave:"ù",uml:"¨",uuml:"ü",yacute:"ý",yen:"¥",yuml:"ÿ"}})),bs=H(((F9,N4)=>{N4.exports={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"}})),Ma=H(((D9,ys)=>{function F4(e){var t="string"==typeof e?e.charCodeAt(0):e;return t>=48&&t<=57}ys.exports=F4,o(F4,"decimal")})),xs=H(((V9,Rs)=>{function D4(e){var t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}Rs.exports=D4,o(D4,"hexadecimal")})),Ss=H(((j9,Es)=>{function _4(e){var t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}Es.exports=_4,o(_4,"alphabetical")})),Ms=H(((U9,Cs)=>{var V4=Ss(),$4=Ma();function j4(e){return V4(e)||$4(e)}Cs.exports=j4,o(j4,"alphanumerical")})),Ls=H(((G9,As)=>{var Un;function U4(e){var r,t="&"+e+";";return(Un=Un||document.createElement("i")).innerHTML=t,(59!==(r=Un.textContent).charCodeAt(r.length-1)||"semi"===e)&&r!==t&&r}As.exports=U4,o(U4,"decodeEntity")})),$s=H(((X9,Vs)=>{var Is=ws(),zs=bs(),q4=Ma(),G4=xs(),ks=Ms(),Y4=Ls();Vs.exports=lm;var X4={}.hasOwnProperty,vr=String.fromCharCode,Z4=Function.prototype,Ts={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},K4=9,Hs=10,J4=12,Q4=32,Ps=38,em=59,tm=60,rm=61,nm=35,om=88,am=120,im=65533,wr="named",La="hexadecimal",Ia="decimal",za={};za[La]=16,za[Ia]=10;var qn={};qn[wr]=ks,qn[Ia]=q4,qn[La]=G4;var Os=1,Bs=2,Ns=3,Fs=4,Ds=5,Aa=6,_s=7,Et={};function lm(e,t){var n,a,r={};for(a in t||(t={}),Ts)n=t[a],r[a]=n??Ts[a];return(r.position.indent||r.position.start)&&(r.indent=r.position.indent||[],r.position=r.position.start),cm(e,r)}function cm(e,t){var b,x,E,R,S,A,M,L,P,_,D,K,T,z,k,$,F,j,O,r=t.additional,n=t.nonTerminated,a=t.text,i=t.reference,c=t.warning,l=t.textContext,s=t.referenceContext,u=t.warningContext,f=t.position,d=t.indent||[],m=e.length,v=0,y=-1,p=f.column||1,h=f.line||1,g="",w=[];for("string"==typeof r&&(r=r.charCodeAt(0)),$=G(),L=c?function Ce(fe,de){var be=G();be.column+=de,be.offset+=de,c.call(u,Et[fe],be,fe)}:Z4,v--,m++;++v65535&&(_+=vr((A-=65536)>>>10|55296),A=56320|1023&A),A=_+vr(A))):z!==wr&&L(Fs,j)),A?(he(),$=G(),v=O-1,p+=O-T+1,w.push(A),(F=G()).offset++,i&&i.call(s,A,{start:$,end:F},e.slice(T-1,O)),$=F):(R=e.slice(T-1,O),g+=R,p+=R.length,v=O-1)}else 10===S&&(h++,y++,p=0),S==S?(g+=vr(S),p++):he();return w.join("");function G(){return{line:h,column:p,offset:v+(f.offset||0)}}function he(){g&&(w.push(g),a&&a.call(l,g,{start:$,end:G()}),g="")}}function sm(e){return e>=55296&&e<=57343||e>1114111}function um(e){return e>=1&&e<=8||11===e||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||!(65535&~e)||65534==(65535&e)}Et[Os]="Named character references must be terminated by a semicolon",Et[Bs]="Numeric character references must be terminated by a semicolon",Et[Ns]="Named character references cannot be empty",Et[Fs]="Numeric character references cannot be empty",Et[Ds]="Named character references must be known",Et[Aa]="Numeric character references cannot be disallowed",Et[_s]="Numeric character references cannot be outside the permissible Unicode range",o(lm,"parseEntities"),o(cm,"parse"),o(sm,"prohibited"),o(um,"disallowed")})),Ws=H(((K9,Gn)=>{var js=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,r=0,n={},a={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:o((function p(h){return h instanceof i?new i(h.type,p(h.content),h.alias):Array.isArray(h)?h.map(p):h.replace(/&/g,"&").replace(/"u")return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(w){var p=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(w.stack)||[])[1];if(p){var h=document.getElementsByTagName("script");for(var g in h)if(h[g].src==p)return h[g]}return null}}),"currentScript"),isActive:o((function(p,h,g){for(var w="no-"+h;p;){var b=p.classList;if(b.contains(h))return!0;if(b.contains(w))return!1;p=p.parentElement}return!!g}),"isActive")},languages:{plain:n,plaintext:n,text:n,txt:n,extend:o((function(p,h){var g=a.util.clone(a.languages[p]);for(var w in h)g[w]=h[w];return g}),"extend"),insertBefore:o((function(p,h,g,w){var b=(w=w||a.languages)[p],x={};for(var E in b)if(b.hasOwnProperty(E)){if(E==h)for(var R in g)g.hasOwnProperty(R)&&(x[R]=g[R]);g.hasOwnProperty(E)||(x[E]=b[E])}var S=w[p];return w[p]=x,a.languages.DFS(a.languages,(function(A,M){M===S&&A!=p&&(this[A]=x)})),x}),"insertBefore"),DFS:o((function p(h,g,w,b){b=b||{};var x=a.util.objId;for(var E in h)if(h.hasOwnProperty(E)){g.call(h,E,h[E],w||E);var R=h[E],S=a.util.type(R);"Object"!==S||b[x(R)]?"Array"===S&&!b[x(R)]&&(b[x(R)]=!0,p(R,g,E,b)):(b[x(R)]=!0,p(R,g,null,b))}}),"DFS")},plugins:{},highlightAll:o((function(p,h){a.highlightAllUnder(document,p,h)}),"highlightAll"),highlightAllUnder:o((function(p,h,g){var w={callback:g,container:p,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};a.hooks.run("before-highlightall",w),w.elements=Array.prototype.slice.apply(w.container.querySelectorAll(w.selector)),a.hooks.run("before-all-elements-highlight",w);for(var x,b=0;x=w.elements[b++];)a.highlightElement(x,!0===h,w.callback)}),"highlightAllUnder"),highlightElement:o((function(p,h,g){var w=a.util.getLanguage(p),b=a.languages[w];a.util.setLanguage(p,w);var x=p.parentElement;x&&"pre"===x.nodeName.toLowerCase()&&a.util.setLanguage(x,w);var R={element:p,language:w,grammar:b,code:p.textContent};function S(M){R.highlightedCode=M,a.hooks.run("before-insert",R),R.element.innerHTML=R.highlightedCode,a.hooks.run("after-highlight",R),a.hooks.run("complete",R),g&&g.call(R.element)}if(o(S,"insertHighlightedCode"),a.hooks.run("before-sanity-check",R),(x=R.element.parentElement)&&"pre"===x.nodeName.toLowerCase()&&!x.hasAttribute("tabindex")&&x.setAttribute("tabindex","0"),!R.code)return a.hooks.run("complete",R),void(g&&g.call(R.element));if(a.hooks.run("before-highlight",R),R.grammar)if(h&&e.Worker){var A=new Worker(a.filename);A.onmessage=function(M){S(M.data)},A.postMessage(JSON.stringify({language:R.language,code:R.code,immediateClose:!0}))}else S(a.highlight(R.code,R.grammar,R.language));else S(a.util.encode(R.code))}),"highlightElement"),highlight:o((function(p,h,g){var w={code:p,grammar:h,language:g};if(a.hooks.run("before-tokenize",w),!w.grammar)throw new Error('The language "'+w.language+'" has no grammar.');return w.tokens=a.tokenize(w.code,w.grammar),a.hooks.run("after-tokenize",w),i.stringify(a.util.encode(w.tokens),w.language)}),"highlight"),tokenize:o((function(p,h){var g=h.rest;if(g){for(var w in g)h[w]=g[w];delete h.rest}var b=new s;return u(b,b.head,p),l(p,b,h,b.head,0),d(b)}),"tokenize"),hooks:{all:{},add:o((function(p,h){var g=a.hooks.all;g[p]=g[p]||[],g[p].push(h)}),"add"),run:o((function(p,h){var g=a.hooks.all[p];if(g&&g.length)for(var b,w=0;b=g[w++];)b(h)}),"run")},Token:i};function i(p,h,g,w){this.type=p,this.content=h,this.alias=g,this.length=0|(w||"").length}function c(p,h,g,w){p.lastIndex=h;var b=p.exec(g);if(b&&w&&b[1]){var x=b[1].length;b.index+=x,b[0]=b[0].slice(x)}return b}function l(p,h,g,w,b,x){for(var E in g)if(g.hasOwnProperty(E)&&g[E]){var R=g[E];R=Array.isArray(R)?R:[R];for(var S=0;S=x.reach);z+=T.value.length,T=T.next){var k=T.value;if(h.length>p.length)return;if(!(k instanceof i)){var F,$=1;if(P){if(!(F=c(K,z,p,L))||F.index>=p.length)break;var Ce=F.index,j=F.index+F[0].length,O=z;for(O+=T.value.length;Ce>=O;)O+=(T=T.next).value.length;if(z=O-=T.value.length,T.value instanceof i)continue;for(var G=T;G!==h.tail&&(Ox.reach&&(x.reach=be);var Me=T.prev;if(fe&&(Me=u(h,Me,fe),z+=fe.length),f(h,Me,$),T=u(h,Me,new i(E,M?a.tokenize(he,M):he,_,he)),de&&u(h,T,de),$>1){var Kr={cause:E+","+S,reach:be};l(p,h,g,T.prev,z,Kr),x&&Kr.reach>x.reach&&(x.reach=Kr.reach)}}}}}}function s(){var p={value:null,prev:null,next:null},h={value:null,prev:p,next:null};p.next=h,this.head=p,this.tail=h,this.length=0}function u(p,h,g){var w=h.next,b={value:g,prev:h,next:w};return h.next=b,w.prev=b,p.length++,b}function f(p,h,g){for(var w=h.next,b=0;b"+b.content+""}),"stringify"),o(c,"matchPattern"),o(l,"matchGrammar"),o(s,"LinkedList"),o(u,"addAfter"),o(f,"removeRange"),o(d,"toArray"),!e.document)return e.addEventListener&&(a.disableWorkerMessageHandler||e.addEventListener("message",(function(p){var h=JSON.parse(p.data),g=h.language,w=h.code,b=h.immediateClose;e.postMessage(a.highlight(w,a.languages[g],g)),b&&e.close()}),!1)),a;var m=a.util.currentScript();function v(){a.manual||a.highlightAll()}if(m&&(a.filename=m.src,m.hasAttribute("data-manual")&&(a.manual=!0)),o(v,"highlightAutomaticallyCallback"),!a.manual){var y=document.readyState;"loading"===y||"interactive"===y&&m&&m.defer?document.addEventListener("DOMContentLoaded",v):window.requestAnimationFrame?window.requestAnimationFrame(v):window.setTimeout(v,16)}return a}(typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{});typeof Gn<"u"&&Gn.exports&&(Gn.exports=js),typeof __webpack_require__.g<"u"&&(__webpack_require__.g.Prism=js)})),Ha=H(((Q9,Us)=>{function Ta(e){e.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},e.languages.markup.tag.inside["attr-value"].inside.entity=e.languages.markup.entity,e.languages.markup.doctype.inside["internal-subset"].inside=e.languages.markup,e.hooks.add("wrap",(function(t){"entity"===t.type&&(t.attributes.title=t.content.value.replace(/&/,"&"))})),Object.defineProperty(e.languages.markup.tag,"addInlined",{value:o((function(r,n){var a={};a["language-"+n]={pattern:/(^$)/i,lookbehind:!0,inside:e.languages[n]},a.cdata=/^$/i;var i={"included-cdata":{pattern://i,inside:a}};i["language-"+n]={pattern:/[\s\S]+/,inside:e.languages[n]};var c={};c[r]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,(function(){return r})),"i"),lookbehind:!0,greedy:!0,inside:i},e.languages.insertBefore("markup","cdata",c)}),"addInlined")}),Object.defineProperty(e.languages.markup.tag,"addAttribute",{value:o((function(t,r){e.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+t+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[r,"language-"+r],inside:e.languages[r]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}),"value")}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup,e.languages.xml=e.languages.extend("markup",{}),e.languages.ssml=e.languages.xml,e.languages.atom=e.languages.xml,e.languages.rss=e.languages.xml}Us.exports=Ta,Ta.displayName="markup",Ta.aliases=["html","mathml","svg","xml","ssml","atom","rss"],o(Ta,"markup")})),ka=H(((ty,qs)=>{function Pa(e){!function(t){var r=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+r.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+r.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+r.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:r,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var n=t.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(e)}qs.exports=Pa,Pa.displayName="css",Pa.aliases=[],o(Pa,"css")})),Ys=H(((ny,Gs)=>{function Oa(e){e.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}Gs.exports=Oa,Oa.displayName="clike",Oa.aliases=[],o(Oa,"clike")})),Zs=H(((ay,Xs)=>{function Ba(e){e.languages.javascript=e.languages.extend("clike",{"class-name":[e.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),e.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,e.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:e.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:e.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:e.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:e.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),e.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:e.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),e.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),e.languages.markup&&(e.languages.markup.tag.addInlined("script","javascript"),e.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),e.languages.js=e.languages.javascript}Xs.exports=Ba,Ba.displayName="javascript",Ba.aliases=["js"],o(Ba,"javascript")})),e1=H(((ly,Qs)=>{var ln="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof __webpack_require__.g?__webpack_require__.g:{},dm=Am();ln.Prism={manual:!0,disableWorkerMessageHandler:!0};var pm=vs(),mm=$s(),Ks=Ws(),hm=Ha(),gm=ka(),vm=Ys(),wm=Zs();dm();var Na={}.hasOwnProperty;function Js(){}o(Js,"Refractor"),Js.prototype=Ks;var oe=new Js;function cn(e){if("function"!=typeof e||!e.displayName)throw new Error("Expected `function` for `grammar`, got `"+e+"`");void 0===oe.languages[e.displayName]&&e(oe)}function bm(e,t){var a,i,c,l,r=oe.languages,n=e;for(a in t&&((n={})[e]=t),n)for(c=(i="string"==typeof(i=n[a])?[i]:i).length,l=-1;++l{vc(),Yn=ge(e1()),(Fa=ma(Yn.default,{})).registerLanguage=function(e,t){return Yn.default.register(t)},Fa.alias=function(e,t){return Yn.default.alias(e,t)},Xn=Fa})),r1=C((()=>{pa()})),o1=H(((py,n1)=>{function Da(e){!function(t){var r="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},a={bash:n,environment:{pattern:RegExp("\\$"+r),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+r),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};t.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+r),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:a},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:a},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:a.entity}}],environment:{pattern:RegExp("\\$?"+r),alias:"constant"},variable:a.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=t.languages.bash;for(var i=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],c=a.variable[1].inside,l=0;l{a1=ge(o1()),i1=a1.default})),u1=C((()=>{c1=ge(ka()),s1=c1.default})),d1=H(((vy,f1)=>{function _a(e){e.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:e.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},e.hooks.add("after-tokenize",o((function(r){if("graphql"===r.language){var n=r.tokens.filter((function(h){return"string"!=typeof h&&"comment"!==h.type&&"scalar"!==h.type})),a=0;for(o(i,"getToken"),o(c,"isTokenType"),o(l,"findClosingBracket"),o(s,"addAlias");a0)){var v=l(/^\{$/,/^\}$/);if(-1===v)continue;for(var y=a;y=0&&s(p,"variable-input")}}}}}function i(h){return n[a+h]}function c(h,g){g=g||0;for(var w=0;w{p1=ge(d1()),m1=p1.default})),v1=H(((yy,g1)=>{function Va(e){!function(t){function r(s,u){return RegExp(s.replace(//g,(function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source})),u)}t.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+t.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),t.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+t.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),t.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),o(r,"withId"),t.languages.insertBefore("javascript","keyword",{imports:{pattern:r(/(\bimport\b\s*)(?:(?:\s*,\s*(?:\*\s*as\s+|\{[^{}]*\}))?|\*\s*as\s+|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:t.languages.javascript},exports:{pattern:r(/(\bexport\b\s*)(?:\*(?:\s*as\s+)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:t.languages.javascript}}),t.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),t.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),t.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:r(/(\.\s*)#?/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],a=0;a{w1=ge(v1()),b1=w1.default})),x1=H(((Ey,R1)=>{function $a(e){e.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},e.languages.webmanifest=e.languages.json}R1.exports=$a,$a.displayName="json",$a.aliases=["webmanifest"],o($a,"json")})),C1=C((()=>{E1=ge(x1()),S1=E1.default})),Wa=H(((My,M1)=>{function ja(e){!function(t){var r=t.util.clone(t.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,a=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,i=/(?:\{*\.{3}(?:[^{}]|)*\})/.source;function c(u,f){return u=u.replace(//g,(function(){return n})).replace(//g,(function(){return a})).replace(//g,(function(){return i})),RegExp(u,f)}o(c,"re"),i=c(i).source,t.languages.jsx=t.languages.extend("markup",r),t.languages.jsx.tag.pattern=c(/<\/?(?:[\w.:-]+(?:+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|))?|))**\/?)?>/.source),t.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,t.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,t.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,t.languages.jsx.tag.inside.comment=r.comment,t.languages.insertBefore("inside","attr-name",{spread:{pattern:c(//.source),inside:t.languages.jsx}},t.languages.jsx.tag),t.languages.insertBefore("inside","special-attr",{script:{pattern:c(/=/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:t.languages.jsx}}},t.languages.jsx.tag);var l=o((function(u){return u?"string"==typeof u?u:"string"==typeof u.content?u.content:u.content.map(l).join(""):""}),"stringifyToken"),s=o((function(u){for(var f=[],d=0;d0&&f[f.length-1].tagName===l(m.content[0].content[1])&&f.pop():"/>"===m.content[m.content.length-1].content||f.push({tagName:l(m.content[0].content[1]),openedBraces:0}):f.length>0&&"punctuation"===m.type&&"{"===m.content?f[f.length-1].openedBraces++:f.length>0&&f[f.length-1].openedBraces>0&&"punctuation"===m.type&&"}"===m.content?f[f.length-1].openedBraces--:v=!0),(v||"string"==typeof m)&&f.length>0&&0===f[f.length-1].openedBraces){var y=l(m);d0&&("string"==typeof u[d-1]||"plain-text"===u[d-1].type)&&(y=l(u[d-1])+y,u.splice(d-1,1),d--),u[d]=new t.Token("plain-text",y,null,y)}m.content&&"string"!=typeof m.content&&s(m.content)}}),"walkTokens");t.hooks.add("after-tokenize",(function(u){"jsx"!==u.language&&"tsx"!==u.language||s(u.tokens)}))}(e)}M1.exports=ja,ja.displayName="jsx",ja.aliases=[],o(ja,"jsx")})),I1=C((()=>{A1=ge(Wa()),L1=A1.default})),T1=H(((Iy,z1)=>{function Ua(e){!function(t){var r=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(d){return d=d.replace(//g,(function(){return r})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+d+")")}o(n,"createInline");var a=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return a})),c=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;t.languages.markdown=t.languages.extend("markup",{}),t.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:t.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+c+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+c+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(a),inside:t.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+c+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(a),alias:"important",inside:t.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(d){["url","bold","italic","strike","code-snippet"].forEach((function(m){d!==m&&(t.languages.markdown[d].inside.content.inside[m]=t.languages.markdown[m])}))})),t.hooks.add("after-tokenize",(function(d){function m(v){if(v&&"string"!=typeof v)for(var y=0,p=v.length;y",quot:'"'},u=String.fromCodePoint||String.fromCharCode;function f(d){var m=d.replace(l,"");return m=m.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,(function(v,y){var p;return"#"===(y=y.toLowerCase())[0]?(p="x"===y[1]?parseInt(y.slice(2),16):Number(y.slice(1)),u(p)):s[y]||v}))}o(f,"textContent"),t.languages.md=t.languages.markdown}(e)}z1.exports=Ua,Ua.displayName="markdown",Ua.aliases=["md"],o(Ua,"markdown")})),k1=C((()=>{H1=ge(T1()),P1=H1.default})),N1=C((()=>{O1=ge(Ha()),B1=O1.default})),Ga=H(((Py,F1)=>{function qa(e){!function(t){t.languages.typescript=t.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),t.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete t.languages.typescript.parameter,delete t.languages.typescript["literal-property"];var r=t.languages.extend("typescript",{});delete r["class-name"],t.languages.typescript["class-name"].inside=r,t.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:r}}}}),t.languages.ts=t.languages.typescript}(e)}F1.exports=qa,qa.displayName="typescript",qa.aliases=["ts"],o(qa,"typescript")})),_1=H(((Oy,D1)=>{var Lm=Wa(),Im=Ga();function Ya(e){e.register(Lm),e.register(Im),function(t){var r=t.util.clone(t.languages.typescript);t.languages.tsx=t.languages.extend("jsx",r),delete t.languages.tsx.parameter,delete t.languages.tsx["literal-property"];var n=t.languages.tsx.tag;n.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+n.pattern.source+")",n.pattern.flags),n.lookbehind=!0}(e)}D1.exports=Ya,Ya.displayName="tsx",Ya.aliases=[],o(Ya,"tsx")})),j1=C((()=>{V1=ge(_1()),$1=V1.default})),q1=C((()=>{W1=ge(Ga()),U1=W1.default})),Y1=H(((Dy,G1)=>{function Xa(e){!function(t){var r=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,a="(?:"+n.source+"(?:[ \t]+"+r.source+")?|"+r.source+"(?:[ \t]+"+n.source+")?)",i=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),c=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function l(s,u){u=(u||"").replace(/m/g,"")+"m";var f=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,(function(){return a})).replace(/<>/g,(function(){return s}));return RegExp(f,u)}o(l,"createValuePattern"),t.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,(function(){return a}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,(function(){return a})).replace(/<>/g,(function(){return"(?:"+i+"|"+c+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:l(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:l(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:l(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:l(c),lookbehind:!0,greedy:!0},number:{pattern:l(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:r,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},t.languages.yml=t.languages.yaml}(e)}G1.exports=Xa,Xa.displayName="yaml",Xa.aliases=["yml"],o(Xa,"yaml")})),K1=C((()=>{X1=ge(Y1()),Z1=X1.default})),Ka=C((()=>{zm=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div((({theme:e})=>({position:"absolute",bottom:0,right:0,maxWidth:"100%",display:"flex",background:e.background.content,zIndex:1}))),(e5=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.button((({theme:e})=>({margin:0,border:"0 none",padding:"4px 10px",cursor:"pointer",display:"flex",alignItems:"center",color:e.color.defaultText,background:e.background.content,fontSize:12,lineHeight:"16px",fontFamily:e.typography.fonts.base,fontWeight:e.typography.weight.bold,borderTop:`1px solid ${e.appBorderColor}`,borderLeft:`1px solid ${e.appBorderColor}`,marginLeft:-1,borderRadius:"4px 0 0 0","&:not(:last-child)":{borderRight:`1px solid ${e.appBorderColor}`},"& + *":{borderLeft:`1px solid ${e.appBorderColor}`,borderRadius:0},"&:focus":{boxShadow:`${e.color.secondary} 0 -3px 0 0 inset`,outline:"0 none","@media (forced-colors: active)":{outline:"1px solid highlight"}}})),(({disabled:e})=>e&&{cursor:"not-allowed",opacity:.5}))).displayName="ActionButton",Za=o((({actionItems:e,...t})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(zm,{...t},e.map((({title:r,className:n,onClick:a,disabled:i},c)=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(e5,{key:c,className:n,onClick:a,disabled:!!i},r))))),"ActionBar")}));function Tm(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function Ja(...e){return t=>e.forEach((r=>Tm(r,t)))}function ct(...e){return react__WEBPACK_IMPORTED_MODULE_0__.useCallback(Ja(...e),e)}var Zn=C((()=>{o(Tm,"setRef"),o(Ja,"composeRefs"),o(ct,"useComposedRefs")}));function km(e){return react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(e)&&e.type===Pm}function Om(e,t){let r={...t};for(let n in t){let a=e[n],i=t[n];/^on[A-Z]/.test(n)?a&&i?r[n]=(...l)=>{i(...l),a(...l)}:a&&(r[n]=a):"style"===n?r[n]={...a,...i}:"className"===n&&(r[n]=[a,i].filter(Boolean).join(" "))}return{...e,...r}}function Bm(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var ti,ei,Pm,br,sn,r5=C((()=>{Zn(),(ti=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(((e,t)=>{let{children:r,...n}=e,a=react__WEBPACK_IMPORTED_MODULE_0__.Children.toArray(r),i=a.find(km);if(i){let c=i.props.children,l=a.map((s=>s===i?react__WEBPACK_IMPORTED_MODULE_0__.Children.count(c)>1?react__WEBPACK_IMPORTED_MODULE_0__.Children.only(null):react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(c)?c.props.children:null:s));return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(ei,{...n,ref:t,children:react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(c)?react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(c,void 0,l):null})}return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(ei,{...n,ref:t,children:r})}))).displayName="Slot",(ei=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(((e,t)=>{let{children:r,...n}=e;if(react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(r)){let a=Bm(r);return react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(r,{...Om(n,r.props),ref:t?Ja(t,a):a})}return react__WEBPACK_IMPORTED_MODULE_0__.Children.count(r)>1?react__WEBPACK_IMPORTED_MODULE_0__.Children.only(null):null}))).displayName="SlotClone",Pm=o((({children:e})=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment,{children:e})),"Slottable"),o(km,"isSlottable"),o(Om,"mergeProps"),o(Bm,"getElementRef")})),o5=C((()=>{r5(),br=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>{let r=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(((n,a)=>{let{asChild:i,...c}=n,l=i?ti:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(l,{...c,ref:a})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{})})),ri=C((()=>{sn=globalThis?.document?react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect:()=>{}}));function _m(e,t){return react__WEBPACK_IMPORTED_MODULE_0__.useReducer(((r,n)=>t[r][n]??r),e)}function Vm(e){let[t,r]=react__WEBPACK_IMPORTED_MODULE_0__.useState(),n=react__WEBPACK_IMPORTED_MODULE_0__.useRef({}),a=react__WEBPACK_IMPORTED_MODULE_0__.useRef(e),i=react__WEBPACK_IMPORTED_MODULE_0__.useRef("none"),c=e?"mounted":"unmounted",[l,s]=_m(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return react__WEBPACK_IMPORTED_MODULE_0__.useEffect((()=>{let u=Kn(n.current);i.current="mounted"===l?u:"none"}),[l]),sn((()=>{let u=n.current,f=a.current;if(f!==e){let m=i.current,v=Kn(u);s(e?"MOUNT":"none"===v||"none"===u?.display?"UNMOUNT":f&&m!==v?"ANIMATION_OUT":"UNMOUNT"),a.current=e}}),[e,s]),sn((()=>{if(t){let u=o((d=>{let v=Kn(n.current).includes(d.animationName);d.target===t&&v&&react_dom__WEBPACK_IMPORTED_MODULE_3__.flushSync((()=>s("ANIMATION_END")))}),"handleAnimationEnd"),f=o((d=>{d.target===t&&(i.current=Kn(n.current))}),"handleAnimationStart");return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}s("ANIMATION_END")}),[t,s]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:react__WEBPACK_IMPORTED_MODULE_0__.useCallback((u=>{u&&(n.current=getComputedStyle(u)),r(u)}),[])}}function Kn(e){return e?.animationName||"none"}function $m(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var yr,c5=C((()=>{Zn(),ri(),o(_m,"useStateMachine"),(yr=o((e=>{let{present:t,children:r}=e,n=Vm(t),a="function"==typeof r?r({present:n.isPresent}):react__WEBPACK_IMPORTED_MODULE_0__.Children.only(r),i=ct(n.ref,$m(a));return"function"==typeof r||n.isPresent?react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(a,{ref:i}):null}),"Presence")).displayName="Presence",o(Vm,"usePresence"),o(Kn,"getAnimationName"),o($m,"getElementRef")}));function s5(e,t=[]){let r=[];function n(i,c){let l=react__WEBPACK_IMPORTED_MODULE_0__.createContext(c),s=r.length;function u(d){let{scope:m,children:v,...y}=d,p=m?.[e][s]||l,h=react__WEBPACK_IMPORTED_MODULE_0__.useMemo((()=>y),Object.values(y));return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(p.Provider,{value:h,children:v})}function f(d,m){let v=m?.[e][s]||l,y=react__WEBPACK_IMPORTED_MODULE_0__.useContext(v);if(y)return y;if(void 0!==c)return c;throw new Error(`\`${d}\` must be used within \`${i}\``)}return r=[...r,c],o(u,"Provider"),o(f,"useContext2"),u.displayName=i+"Provider",[u,f]}o(n,"createContext3");let a=o((()=>{let i=r.map((c=>react__WEBPACK_IMPORTED_MODULE_0__.createContext(c)));return o((function(l){let s=l?.[e]||i;return react__WEBPACK_IMPORTED_MODULE_0__.useMemo((()=>({[`__scope${e}`]:{...l,[e]:s}})),[l,s])}),"useScope")}),"createScope");return a.scopeName=e,[n,Wm(a,...t)]}function Wm(...e){let t=e[0];if(1===e.length)return t;let r=o((()=>{let n=e.map((a=>({useScope:a(),scopeName:a.scopeName})));return o((function(i){let c=n.reduce(((l,{useScope:s,scopeName:u})=>({...l,...s(i)[`__scope${u}`]})),{});return react__WEBPACK_IMPORTED_MODULE_0__.useMemo((()=>({[`__scope${t.scopeName}`]:c})),[c])}),"useComposedScopes")}),"createScope");return r.scopeName=t.scopeName,r}var u5=C((()=>{o(s5,"createContextScope"),o(Wm,"composeContextScopes")}));function St(e){let t=react__WEBPACK_IMPORTED_MODULE_0__.useRef(e);return react__WEBPACK_IMPORTED_MODULE_0__.useEffect((()=>{t.current=e})),react__WEBPACK_IMPORTED_MODULE_0__.useMemo((()=>(...r)=>t.current?.(...r)),[])}var f5=C((()=>{o(St,"useCallbackRef")}));function d5(e){let t=react__WEBPACK_IMPORTED_MODULE_0__.useContext(Um);return e||t||"ltr"}var Um,p5=C((()=>{Um=react__WEBPACK_IMPORTED_MODULE_0__.createContext(void 0),o(d5,"useDirection")}));function m5(e,[t,r]){return Math.min(r,Math.max(t,e))}var h5=C((()=>{o(m5,"clamp")}));function Ct(e,t,{checkForDefaultPrevented:r=!0}={}){return o((function(a){if(e?.(a),!1===r||!a.defaultPrevented)return t?.(a)}),"handleEvent")}var g5=C((()=>{o(Ct,"composeEventHandlers")}));function qm(e,t){return react__WEBPACK_IMPORTED_MODULE_0__.useReducer(((r,n)=>t[r][n]??r),e)}function eo(e){return e?parseInt(e,10):0}function I5(e,t){let r=e/t;return isNaN(r)?0:r}function to(e){let t=I5(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function nh(e,t,r,n="ltr"){let a=to(r),c=t||a/2,l=a-c,s=r.scrollbar.paddingStart+c,u=r.scrollbar.size-r.scrollbar.paddingEnd-l,f=r.content-r.viewport;return z5([s,u],"ltr"===n?[0,f]:[-1*f,0])(e)}function v5(e,t,r="ltr"){let n=to(t),a=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-a,c=t.content-t.viewport,l=i-n,u=m5(e,"ltr"===r?[0,c]:[-1*c,0]);return z5([0,c],[0,l])(u)}function z5(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function T5(e,t){return e>0&&e()=>window.clearTimeout(n.current)),[]),react__WEBPACK_IMPORTED_MODULE_0__.useCallback((()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)}),[r,t])}function xr(e,t){let r=St(t);sn((()=>{let n=0;if(e){let a=new ResizeObserver((()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)}));return a.observe(e),()=>{window.cancelAnimationFrame(n),a.unobserve(e)}}}),[e,r])}function ah(e,t){let{asChild:r,children:n}=e;if(!r)return"function"==typeof t?t(n):t;let a=react__WEBPACK_IMPORTED_MODULE_0__.Children.only(n);return react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(a,{children:"function"==typeof t?t(a.props.children):t})}var ni,b5,zR,Xm,$e,y5,R5,x5,ot,E5,Zm,Km,S5,oi,Jm,Qm,eh,C5,M5,Qn,A5,th,ai,L5,rh,oh,H5,P5,k5,O5,B5,ch,sh,F5,D5,Er,N5=C((()=>{o5(),c5(),u5(),Zn(),f5(),p5(),ri(),h5(),g5(),o(qm,"useStateMachine"),ni="ScrollArea",[b5,zR]=s5(ni),[Xm,$e]=b5(ni),(y5=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(((e,t)=>{let{__scopeScrollArea:r,type:n="hover",dir:a,scrollHideDelay:i=600,...c}=e,[l,s]=react__WEBPACK_IMPORTED_MODULE_0__.useState(null),[u,f]=react__WEBPACK_IMPORTED_MODULE_0__.useState(null),[d,m]=react__WEBPACK_IMPORTED_MODULE_0__.useState(null),[v,y]=react__WEBPACK_IMPORTED_MODULE_0__.useState(null),[p,h]=react__WEBPACK_IMPORTED_MODULE_0__.useState(null),[g,w]=react__WEBPACK_IMPORTED_MODULE_0__.useState(0),[b,x]=react__WEBPACK_IMPORTED_MODULE_0__.useState(0),[E,R]=react__WEBPACK_IMPORTED_MODULE_0__.useState(!1),[S,A]=react__WEBPACK_IMPORTED_MODULE_0__.useState(!1),M=ct(t,(P=>s(P))),L=d5(a);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(Xm,{scope:r,type:n,dir:L,scrollHideDelay:i,scrollArea:l,viewport:u,onViewportChange:f,content:d,onContentChange:m,scrollbarX:v,onScrollbarXChange:y,scrollbarXEnabled:E,onScrollbarXEnabledChange:R,scrollbarY:p,onScrollbarYChange:h,scrollbarYEnabled:S,onScrollbarYEnabledChange:A,onCornerWidthChange:w,onCornerHeightChange:x,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(br.div,{dir:L,...c,ref:M,style:{position:"relative","--radix-scroll-area-corner-width":g+"px","--radix-scroll-area-corner-height":b+"px",...e.style}})})}))).displayName=ni,R5="ScrollAreaViewport",(x5=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(((e,t)=>{let{__scopeScrollArea:r,children:n,asChild:a,nonce:i,...c}=e,l=$e(R5,r),u=ct(t,react__WEBPACK_IMPORTED_MODULE_0__.useRef(null),l.onViewportChange);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("style",{dangerouslySetInnerHTML:{__html:"\n[data-radix-scroll-area-viewport] {\n scrollbar-width: none;\n -ms-overflow-style: none;\n -webkit-overflow-scrolling: touch;\n}\n[data-radix-scroll-area-viewport]::-webkit-scrollbar {\n display: none;\n}\n:where([data-radix-scroll-area-viewport]) {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n}\n:where([data-radix-scroll-area-content]) {\n flex-grow: 1;\n}\n"},nonce:i}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(br.div,{"data-radix-scroll-area-viewport":"",...c,asChild:a,ref:u,style:{overflowX:l.scrollbarXEnabled?"scroll":"hidden",overflowY:l.scrollbarYEnabled?"scroll":"hidden",...e.style},children:ah({asChild:a,children:n},(f=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div",{"data-radix-scroll-area-content":"",ref:l.onContentChange,style:{minWidth:l.scrollbarXEnabled?"fit-content":void 0},children:f})))})]})}))).displayName=R5,ot="ScrollAreaScrollbar",(E5=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(((e,t)=>{let{forceMount:r,...n}=e,a=$e(ot,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:c}=a,l="horizontal"===e.orientation;return react__WEBPACK_IMPORTED_MODULE_0__.useEffect((()=>(l?i(!0):c(!0),()=>{l?i(!1):c(!1)})),[l,i,c]),"hover"===a.type?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(Zm,{...n,ref:t,forceMount:r}):"scroll"===a.type?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(Km,{...n,ref:t,forceMount:r}):"auto"===a.type?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(S5,{...n,ref:t,forceMount:r}):"always"===a.type?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(oi,{...n,ref:t}):null}))).displayName=ot,Zm=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(((e,t)=>{let{forceMount:r,...n}=e,a=$e(ot,e.__scopeScrollArea),[i,c]=react__WEBPACK_IMPORTED_MODULE_0__.useState(!1);return react__WEBPACK_IMPORTED_MODULE_0__.useEffect((()=>{let l=a.scrollArea,s=0;if(l){let u=o((()=>{window.clearTimeout(s),c(!0)}),"handlePointerEnter"),f=o((()=>{s=window.setTimeout((()=>c(!1)),a.scrollHideDelay)}),"handlePointerLeave");return l.addEventListener("pointerenter",u),l.addEventListener("pointerleave",f),()=>{window.clearTimeout(s),l.removeEventListener("pointerenter",u),l.removeEventListener("pointerleave",f)}}}),[a.scrollArea,a.scrollHideDelay]),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(yr,{present:r||i,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(S5,{"data-state":i?"visible":"hidden",...n,ref:t})})})),Km=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(((e,t)=>{let{forceMount:r,...n}=e,a=$e(ot,e.__scopeScrollArea),i="horizontal"===e.orientation,c=ro((()=>s("SCROLL_END")),100),[l,s]=qm("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return react__WEBPACK_IMPORTED_MODULE_0__.useEffect((()=>{if("idle"===l){let u=window.setTimeout((()=>s("HIDE")),a.scrollHideDelay);return()=>window.clearTimeout(u)}}),[l,a.scrollHideDelay,s]),react__WEBPACK_IMPORTED_MODULE_0__.useEffect((()=>{let u=a.viewport,f=i?"scrollLeft":"scrollTop";if(u){let d=u[f],m=o((()=>{let v=u[f];d!==v&&(s("SCROLL"),c()),d=v}),"handleScroll");return u.addEventListener("scroll",m),()=>u.removeEventListener("scroll",m)}}),[a.viewport,i,s,c]),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(yr,{present:r||"hidden"!==l,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(oi,{"data-state":"hidden"===l?"hidden":"visible",...n,ref:t,onPointerEnter:Ct(e.onPointerEnter,(()=>s("POINTER_ENTER"))),onPointerLeave:Ct(e.onPointerLeave,(()=>s("POINTER_LEAVE")))})})})),S5=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(((e,t)=>{let r=$e(ot,e.__scopeScrollArea),{forceMount:n,...a}=e,[i,c]=react__WEBPACK_IMPORTED_MODULE_0__.useState(!1),l="horizontal"===e.orientation,s=ro((()=>{if(r.viewport){let u=r.viewport.offsetWidth{let{orientation:r="vertical",...n}=e,a=$e(ot,e.__scopeScrollArea),i=react__WEBPACK_IMPORTED_MODULE_0__.useRef(null),c=react__WEBPACK_IMPORTED_MODULE_0__.useRef(0),[l,s]=react__WEBPACK_IMPORTED_MODULE_0__.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=I5(l.viewport,l.content),f={...n,sizes:l,onSizesChange:s,hasThumb:u>0&&u<1,onThumbChange:o((m=>i.current=m),"onThumbChange"),onThumbPointerUp:o((()=>c.current=0),"onThumbPointerUp"),onThumbPointerDown:o((m=>c.current=m),"onThumbPointerDown")};function d(m,v){return nh(m,c.current,l,v)}return o(d,"getScrollPosition"),"horizontal"===r?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(Jm,{...f,ref:t,onThumbPositionChange:o((()=>{if(a.viewport&&i.current){let v=v5(a.viewport.scrollLeft,l,a.dir);i.current.style.transform=`translate3d(${v}px, 0, 0)`}}),"onThumbPositionChange"),onWheelScroll:o((m=>{a.viewport&&(a.viewport.scrollLeft=m)}),"onWheelScroll"),onDragScroll:o((m=>{a.viewport&&(a.viewport.scrollLeft=d(m,a.dir))}),"onDragScroll")}):"vertical"===r?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(Qm,{...f,ref:t,onThumbPositionChange:o((()=>{if(a.viewport&&i.current){let v=v5(a.viewport.scrollTop,l);i.current.style.transform=`translate3d(0, ${v}px, 0)`}}),"onThumbPositionChange"),onWheelScroll:o((m=>{a.viewport&&(a.viewport.scrollTop=m)}),"onWheelScroll"),onDragScroll:o((m=>{a.viewport&&(a.viewport.scrollTop=d(m))}),"onDragScroll")}):null})),Jm=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(((e,t)=>{let{sizes:r,onSizesChange:n,...a}=e,i=$e(ot,e.__scopeScrollArea),[c,l]=react__WEBPACK_IMPORTED_MODULE_0__.useState(),s=react__WEBPACK_IMPORTED_MODULE_0__.useRef(null),u=ct(t,s,i.onScrollbarXChange);return react__WEBPACK_IMPORTED_MODULE_0__.useEffect((()=>{s.current&&l(getComputedStyle(s.current))}),[s]),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(M5,{"data-orientation":"horizontal",...a,ref:u,sizes:r,style:{bottom:0,left:"rtl"===i.dir?"var(--radix-scroll-area-corner-width)":0,right:"ltr"===i.dir?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":to(r)+"px",...e.style},onThumbPointerDown:o((f=>e.onThumbPointerDown(f.x)),"onThumbPointerDown"),onDragScroll:o((f=>e.onDragScroll(f.x)),"onDragScroll"),onWheelScroll:o(((f,d)=>{if(i.viewport){let m=i.viewport.scrollLeft+f.deltaX;e.onWheelScroll(m),T5(m,d)&&f.preventDefault()}}),"onWheelScroll"),onResize:o((()=>{s.current&&i.viewport&&c&&n({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:s.current.clientWidth,paddingStart:eo(c.paddingLeft),paddingEnd:eo(c.paddingRight)}})}),"onResize")})})),Qm=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(((e,t)=>{let{sizes:r,onSizesChange:n,...a}=e,i=$e(ot,e.__scopeScrollArea),[c,l]=react__WEBPACK_IMPORTED_MODULE_0__.useState(),s=react__WEBPACK_IMPORTED_MODULE_0__.useRef(null),u=ct(t,s,i.onScrollbarYChange);return react__WEBPACK_IMPORTED_MODULE_0__.useEffect((()=>{s.current&&l(getComputedStyle(s.current))}),[s]),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(M5,{"data-orientation":"vertical",...a,ref:u,sizes:r,style:{top:0,right:"ltr"===i.dir?0:void 0,left:"rtl"===i.dir?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":to(r)+"px",...e.style},onThumbPointerDown:o((f=>e.onThumbPointerDown(f.y)),"onThumbPointerDown"),onDragScroll:o((f=>e.onDragScroll(f.y)),"onDragScroll"),onWheelScroll:o(((f,d)=>{if(i.viewport){let m=i.viewport.scrollTop+f.deltaY;e.onWheelScroll(m),T5(m,d)&&f.preventDefault()}}),"onWheelScroll"),onResize:o((()=>{s.current&&i.viewport&&c&&n({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:s.current.clientHeight,paddingStart:eo(c.paddingTop),paddingEnd:eo(c.paddingBottom)}})}),"onResize")})})),[eh,C5]=b5(ot),M5=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(((e,t)=>{let{__scopeScrollArea:r,sizes:n,hasThumb:a,onThumbChange:i,onThumbPointerUp:c,onThumbPointerDown:l,onThumbPositionChange:s,onDragScroll:u,onWheelScroll:f,onResize:d,...m}=e,v=$e(ot,r),[y,p]=react__WEBPACK_IMPORTED_MODULE_0__.useState(null),h=ct(t,(M=>p(M))),g=react__WEBPACK_IMPORTED_MODULE_0__.useRef(null),w=react__WEBPACK_IMPORTED_MODULE_0__.useRef(""),b=v.viewport,x=n.content-n.viewport,E=St(f),R=St(s),S=ro(d,10);function A(M){if(g.current){let L=M.clientX-g.current.left,P=M.clientY-g.current.top;u({x:L,y:P})}}return o(A,"handleDragScroll"),react__WEBPACK_IMPORTED_MODULE_0__.useEffect((()=>{let M=o((L=>{let P=L.target;y?.contains(P)&&E(L,x)}),"handleWheel");return document.addEventListener("wheel",M,{passive:!1}),()=>document.removeEventListener("wheel",M,{passive:!1})}),[b,y,x,E]),react__WEBPACK_IMPORTED_MODULE_0__.useEffect(R,[n,R]),xr(y,S),xr(v.content,S),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(eh,{scope:r,scrollbar:y,hasThumb:a,onThumbChange:St(i),onThumbPointerUp:St(c),onThumbPositionChange:R,onThumbPointerDown:St(l),children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(br.div,{...m,ref:h,style:{position:"absolute",...m.style},onPointerDown:Ct(e.onPointerDown,(M=>{0===M.button&&(M.target.setPointerCapture(M.pointerId),g.current=y.getBoundingClientRect(),w.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",v.viewport&&(v.viewport.style.scrollBehavior="auto"),A(M))})),onPointerMove:Ct(e.onPointerMove,A),onPointerUp:Ct(e.onPointerUp,(M=>{let L=M.target;L.hasPointerCapture(M.pointerId)&&L.releasePointerCapture(M.pointerId),document.body.style.webkitUserSelect=w.current,v.viewport&&(v.viewport.style.scrollBehavior=""),g.current=null}))})})})),Qn="ScrollAreaThumb",A5=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(((e,t)=>{let{forceMount:r,...n}=e,a=C5(Qn,e.__scopeScrollArea);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(yr,{present:r||a.hasThumb,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(th,{ref:t,...n})})})),th=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(((e,t)=>{let{__scopeScrollArea:r,style:n,...a}=e,i=$e(Qn,r),c=C5(Qn,r),{onThumbPositionChange:l}=c,s=ct(t,(d=>c.onThumbChange(d))),u=react__WEBPACK_IMPORTED_MODULE_0__.useRef(),f=ro((()=>{u.current&&(u.current(),u.current=void 0)}),100);return react__WEBPACK_IMPORTED_MODULE_0__.useEffect((()=>{let d=i.viewport;if(d){let m=o((()=>{if(f(),!u.current){let v=oh(d,l);u.current=v,l()}}),"handleScroll");return l(),d.addEventListener("scroll",m),()=>d.removeEventListener("scroll",m)}}),[i.viewport,f,l]),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(br.div,{"data-state":c.hasThumb?"visible":"hidden",...a,ref:s,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:Ct(e.onPointerDownCapture,(d=>{let v=d.target.getBoundingClientRect(),y=d.clientX-v.left,p=d.clientY-v.top;c.onThumbPointerDown({x:y,y:p})})),onPointerUp:Ct(e.onPointerUp,c.onThumbPointerUp)})})),A5.displayName=Qn,ai="ScrollAreaCorner",(L5=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(((e,t)=>{let r=$e(ai,e.__scopeScrollArea),n=!(!r.scrollbarX||!r.scrollbarY);return"scroll"!==r.type&&n?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(rh,{...e,ref:t}):null}))).displayName=ai,rh=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(((e,t)=>{let{__scopeScrollArea:r,...n}=e,a=$e(ai,r),[i,c]=react__WEBPACK_IMPORTED_MODULE_0__.useState(0),[l,s]=react__WEBPACK_IMPORTED_MODULE_0__.useState(0),u=!(!i||!l);return xr(a.scrollbarX,(()=>{let f=a.scrollbarX?.offsetHeight||0;a.onCornerHeightChange(f),s(f)})),xr(a.scrollbarY,(()=>{let f=a.scrollbarY?.offsetWidth||0;a.onCornerWidthChange(f),c(f)})),u?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(br.div,{...n,ref:t,style:{width:i,height:l,position:"absolute",right:"ltr"===a.dir?0:void 0,left:"rtl"===a.dir?0:void 0,bottom:0,...e.style}}):null})),o(eo,"toInt"),o(I5,"getThumbRatio"),o(to,"getThumbSize"),o(nh,"getScrollPositionFromPointer"),o(v5,"getThumbOffsetFromScroll"),o(z5,"linearScale"),o(T5,"isScrollingWithinScrollbarBounds"),oh=o(((e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return o((function a(){let i={left:e.scrollLeft,top:e.scrollTop},c=r.left!==i.left,l=r.top!==i.top;(c||l)&&t(),r=i,n=window.requestAnimationFrame(a)}),"loop")(),()=>window.cancelAnimationFrame(n)}),"addUnlinkedScrollListener"),o(ro,"useDebounceCallback"),o(xr,"useResizeObserver"),o(ah,"getSubtree"),H5=y5,P5=x5,k5=E5,O5=A5,B5=L5})),oo=C((()=>{N5(),ch=(0,storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4)(H5)((({scrollbarsize:e,offset:t})=>({width:"100%",height:"100%",overflow:"hidden","--scrollbar-size":`${e+t}px`,"--radix-scroll-area-thumb-width":`${e}px`}))),sh=(0,storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4)(P5)({width:"100%",height:"100%"}),F5=(0,storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4)(k5)((({offset:e,horizontal:t,vertical:r})=>({display:"flex",userSelect:"none",touchAction:"none",background:"transparent",transition:"all 0.2s ease-out",borderRadius:"var(--scrollbar-size)",zIndex:1,'&[data-orientation="vertical"]':{width:"var(--scrollbar-size)",paddingRight:e,marginTop:e,marginBottom:"true"===t&&"true"===r?0:e},'&[data-orientation="horizontal"]':{flexDirection:"column",height:"var(--scrollbar-size)",paddingBottom:e,marginLeft:e,marginRight:"true"===t&&"true"===r?0:e}}))),D5=(0,storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4)(O5)((({theme:e})=>({flex:1,background:e.textMutedColor,opacity:.5,borderRadius:"var(--scrollbar-size)",position:"relative",transition:"opacity 0.2s ease-out","&:hover":{opacity:.8},"::before":{content:'""',position:"absolute",top:"50%",left:"50%",transform:"translate(-50%,-50%)",width:"100%",height:"100%"}}))),(Er=(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)((({children:e,horizontal:t=!1,vertical:r=!1,offset:n=2,scrollbarSize:a=6,className:i},c)=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(ch,{scrollbarsize:a,offset:n,className:i},react__WEBPACK_IMPORTED_MODULE_0__.createElement(sh,{ref:c},e),t&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(F5,{orientation:"horizontal",offset:n,horizontal:t.toString(),vertical:r.toString()},react__WEBPACK_IMPORTED_MODULE_0__.createElement(D5,null)),r&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(F5,{orientation:"vertical",offset:n,horizontal:t.toString(),vertical:r.toString()},react__WEBPACK_IMPORTED_MODULE_0__.createElement(D5,null)),t&&r&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(B5,null))))).displayName="ScrollArea"})),li={};function ii(){return ao.navigator?.clipboard?async e=>{try{await(ao.top?.navigator.clipboard.writeText(e))}catch{await ao.navigator.clipboard.writeText(e)}}:async e=>{let t=un.createElement("TEXTAREA"),r=un.activeElement;t.value=e,un.body.appendChild(t),t.select(),un.execCommand("copy"),un.body.removeChild(t),r.focus()}}Qr(li,{SyntaxHighlighter:()=>dn,createCopyToClipboardFunction:()=>ii,default:()=>Eh,supportedLanguages:()=>$5});var V5,un,ao,$5,mh,hh,gh,vh,wh,bh,yh,j5,Rh,xh,dn,Eh,pn=C((()=>{V5=ge(rn(),1),r1(),l1(),u1(),h1(),y1(),C1(),I1(),k1(),N1(),j1(),q1(),K1(),t1(),Ka(),oo(),({document:un,window:ao}=_storybook_global__WEBPACK_IMPORTED_MODULE_5__.global),$5={jsextra:b1,jsx:L1,json:S1,yml:Z1,md:P1,bash:i1,css:s1,html:B1,tsx:$1,typescript:U1,graphql:m1},Object.entries($5).forEach((([e,t])=>{Xn.registerLanguage(e,t)})),mh=(0,V5.default)(2)((e=>Object.entries(e.code||{}).reduce(((t,[r,n])=>({...t,[`* .${r}`]:n})),{}))),hh=ii(),o(ii,"createCopyToClipboardFunction"),gh=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div((({theme:e})=>({position:"relative",overflow:"hidden",color:e.color.defaultText})),(({theme:e,bordered:t})=>t?{border:`1px solid ${e.appBorderColor}`,borderRadius:e.borderRadius,background:e.background.content}:{}),(({showLineNumbers:e})=>e?{".react-syntax-highlighter-line-number::before":{content:"attr(data-line-number)"}}:{})),vh=o((({children:e,className:t})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(Er,{horizontal:!0,vertical:!0,className:t},e)),"UnstyledScroller"),wh=(0,storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4)(vh)({position:"relative"},(({theme:e})=>mh(e))),bh=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.pre((({theme:e,padded:t})=>({display:"flex",justifyContent:"flex-start",margin:0,padding:t?e.layoutMargin:0}))),yh=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div((({theme:e})=>({flex:1,paddingLeft:2,paddingRight:e.layoutMargin,opacity:1,fontFamily:e.typography.fonts.mono}))),j5=o((e=>{let t=[...e.children],r=t[0],n=r.children[0].value,a={...r,children:[],properties:{...r.properties,"data-line-number":n,style:{...r.properties.style,userSelect:"auto"}}};return t[0]=a,{...e,children:t}}),"processLineNumber"),Rh=o((({rows:e,stylesheet:t,useInlineStyles:r})=>e.map(((n,a)=>$t({node:j5(n),stylesheet:t,useInlineStyles:r,key:`code-segement${a}`})))),"defaultRenderer"),xh=o(((e,t)=>t?e?({rows:r,...n})=>e({rows:r.map((a=>j5(a))),...n}):Rh:e),"wrapRenderer"),(dn=o((({children:e,language:t="jsx",copyable:r=!1,bordered:n=!1,padded:a=!1,format:i=!0,formatter:c,className:l,showLineNumbers:s=!1,...u})=>{if("string"!=typeof e||!e.trim())return null;let[f,d]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)("");(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{c?c(i,e).then(d):d(e.trim())}),[e,i,c]);let[m,v]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),y=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((h=>{h.preventDefault(),hh(f).then((()=>{v(!0),ao.setTimeout((()=>v(!1)),1500)})).catch(storybook_internal_client_logger__WEBPACK_IMPORTED_MODULE_4__.logger.error)}),[f]),p=xh(u.renderer,s);return react__WEBPACK_IMPORTED_MODULE_0__.createElement(gh,{bordered:n,padded:a,showLineNumbers:s,className:l},react__WEBPACK_IMPORTED_MODULE_0__.createElement(wh,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement(Xn,{padded:a||n,language:t,showLineNumbers:s,showInlineLineNumbers:s,useInlineStyles:!1,PreTag:bh,CodeTag:yh,lineNumberContainerStyle:{},...u,renderer:p},f)),r?react__WEBPACK_IMPORTED_MODULE_0__.createElement(Za,{actionItems:[{title:m?"Copied":"Copy",onClick:y}]}):null)}),"SyntaxHighlighter")).registerLanguage=(...e)=>Xn.registerLanguage(...e),Eh=dn}));function K5(e){for(var t=[],r=1;r{o(K5,"dedent")})),eu={};Qr(eu,{formatter:()=>ig});var Q5,ig,Il,zl,te,se,ae,ne,To,It,dt,er,jf,Ho,Nr,Wf,Tl,Po,Uf,tu=C((()=>{Q5=ge(rn(),1),J5(),ig=(0,Q5.default)(2)((async(e,t)=>!1===e?t:K5(t)))})),$f=C((()=>{Il=o((function(t){return t.reduce((function(r,n){var a=n[0],i=n[1];return r[a]=i,r}),{})}),"fromEntries"),zl=typeof window<"u"&&window.document&&window.document.createElement?react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect:react__WEBPACK_IMPORTED_MODULE_0__.useEffect})),Be=C((()=>{To="auto",dt="start",er="end",jf="clippingParents",Ho="viewport",Nr="popper",Wf="reference",Tl=(It=[te="top",se="bottom",ae="right",ne="left"]).reduce((function(e,t){return e.concat([t+"-"+dt,t+"-"+er])}),[]),Po=[].concat(It,[To]).reduce((function(e,t){return e.concat([t,t+"-"+dt,t+"-"+er])}),[]),Uf=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"]}));function pe(e){return e?(e.nodeName||"").toLowerCase():null}var zt=C((()=>{o(pe,"getNodeName")}));function Z(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}var et=C((()=>{o(Z,"getWindow")}));function qe(e){return e instanceof Z(e).Element||e instanceof Element}function ue(e){return e instanceof Z(e).HTMLElement||e instanceof HTMLElement}function Fr(e){return!(typeof ShadowRoot>"u")&&(e instanceof Z(e).ShadowRoot||e instanceof ShadowRoot)}var Ne=C((()=>{et(),o(qe,"isElement"),o(ue,"isHTMLElement"),o(Fr,"isShadowRoot")}));function x7(e){var t=e.state;Object.keys(t.elements).forEach((function(r){var n=t.styles[r]||{},a=t.attributes[r]||{},i=t.elements[r];!ue(i)||!pe(i)||(Object.assign(i.style,n),Object.keys(a).forEach((function(c){var l=a[c];!1===l?i.removeAttribute(c):i.setAttribute(c,!0===l?"":l)})))}))}function E7(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach((function(n){var a=t.elements[n],i=t.attributes[n]||{},l=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:r[n]).reduce((function(s,u){return s[u]="",s}),{});!ue(a)||!pe(a)||(Object.assign(a.style,l),Object.keys(i).forEach((function(s){a.removeAttribute(s)})))}))}}var qf,Gf=C((()=>{zt(),Ne(),o(x7,"applyStyles"),o(E7,"effect"),qf={name:"applyStyles",enabled:!0,phase:"write",fn:x7,effect:E7,requires:["computeStyles"]}}));function me(e){return e.split("-")[0]}var tt,tr,pt,Tt=C((()=>{o(me,"getBasePlacement")})),Ht=C((()=>{tt=Math.max,tr=Math.min,pt=Math.round}));function Dr(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}var Hl=C((()=>{o(Dr,"getUAString")}));function yn(){return!/^((?!chrome|android).)*safari/i.test(Dr())}var Pl=C((()=>{Hl(),o(yn,"isLayoutViewport")}));function Ge(e,t,r){void 0===t&&(t=!1),void 0===r&&(r=!1);var n=e.getBoundingClientRect(),a=1,i=1;t&&ue(e)&&(a=e.offsetWidth>0&&pt(n.width)/e.offsetWidth||1,i=e.offsetHeight>0&&pt(n.height)/e.offsetHeight||1);var l=(qe(e)?Z(e):window).visualViewport,s=!yn()&&r,u=(n.left+(s&&l?l.offsetLeft:0))/a,f=(n.top+(s&&l?l.offsetTop:0))/i,d=n.width/a,m=n.height/i;return{width:d,height:m,top:f,right:u+d,bottom:f+m,left:u,x:u,y:f}}var _r=C((()=>{Ne(),Ht(),et(),Pl(),o(Ge,"getBoundingClientRect")}));function rr(e){var t=Ge(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}var ko=C((()=>{_r(),o(rr,"getLayoutRect")}));function Rn(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&Fr(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}var kl=C((()=>{Ne(),o(Rn,"contains")}));function Se(e){return Z(e).getComputedStyle(e)}var Vr=C((()=>{et(),o(Se,"getComputedStyle")}));function Ol(e){return["table","td","th"].indexOf(pe(e))>=0}var Yf=C((()=>{zt(),o(Ol,"isTableElement")}));function we(e){return((qe(e)?e.ownerDocument:e.document)||window.document).documentElement}var mt=C((()=>{Ne(),o(we,"getDocumentElement")}));function ht(e){return"html"===pe(e)?e:e.assignedSlot||e.parentNode||(Fr(e)?e.host:null)||we(e)}var xn=C((()=>{zt(),mt(),Ne(),o(ht,"getParentNode")}));function Xf(e){return ue(e)&&"fixed"!==Se(e).position?e.offsetParent:null}function S7(e){var t=/firefox/i.test(Dr());if(/Trident/i.test(Dr())&&ue(e)&&"fixed"===Se(e).position)return null;var a=ht(e);for(Fr(a)&&(a=a.host);ue(a)&&["html","body"].indexOf(pe(a))<0;){var i=Se(a);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||t&&"filter"===i.willChange||t&&i.filter&&"none"!==i.filter)return a;a=a.parentNode}return null}function rt(e){for(var t=Z(e),r=Xf(e);r&&Ol(r)&&"static"===Se(r).position;)r=Xf(r);return r&&("html"===pe(r)||"body"===pe(r)&&"static"===Se(r).position)?t:r||S7(e)||t}var $r=C((()=>{et(),zt(),Vr(),Ne(),Yf(),xn(),Hl(),o(Xf,"getTrueOffsetParent"),o(S7,"getContainingBlock"),o(rt,"getOffsetParent")}));function nr(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}var Oo=C((()=>{o(nr,"getMainAxisFromPlacement")}));function or(e,t,r){return tt(e,tr(t,r))}function Zf(e,t,r){var n=or(e,t,r);return n>r?r:n}var Bl=C((()=>{Ht(),o(or,"within"),o(Zf,"withinMaxClamp")}));function En(){return{top:0,right:0,bottom:0,left:0}}var Nl=C((()=>{o(En,"getFreshSideObject")}));function Sn(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}var Fl=C((()=>{Nl(),o(Sn,"mergePaddingObject")}));function Cn(e,t){return t.reduce((function(r,n){return r[n]=e,r}),{})}var Dl=C((()=>{o(Cn,"expandToHashMap")}));function M7(e){var t,r=e.state,n=e.name,a=e.options,i=r.elements.arrow,c=r.modifiersData.popperOffsets,l=me(r.placement),s=nr(l),f=[ne,ae].indexOf(l)>=0?"height":"width";if(i&&c){var d=C7(a.padding,r),m=rr(i),v="y"===s?te:ne,y="y"===s?se:ae,p=r.rects.reference[f]+r.rects.reference[s]-c[s]-r.rects.popper[f],h=c[s]-r.rects.reference[s],g=rt(i),w=g?"y"===s?g.clientHeight||0:g.clientWidth||0:0,b=p/2-h/2,x=d[v],E=w-m[f]-d[y],R=w/2-m[f]/2+b,S=or(x,R,E),A=s;r.modifiersData[n]=((t={})[A]=S,t.centerOffset=S-R,t)}}function A7(e){var t=e.state,n=e.options.element,a=void 0===n?"[data-popper-arrow]":n;null!=a&&("string"==typeof a&&!(a=t.elements.popper.querySelector(a))||Rn(t.elements.popper,a)&&(t.elements.arrow=a))}var C7,Kf,Jf=C((()=>{Tt(),ko(),kl(),$r(),Oo(),Bl(),Fl(),Dl(),Be(),C7=o((function(t,r){return Sn("number"!=typeof(t="function"==typeof t?t(Object.assign({},r.rects,{placement:r.placement})):t)?t:Cn(t,It))}),"toPaddingObject"),o(M7,"arrow"),o(A7,"effect"),Kf={name:"arrow",enabled:!0,phase:"main",fn:M7,effect:A7,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]}}));function Ye(e){return e.split("-")[1]}var jr=C((()=>{o(Ye,"getVariation")}));function I7(e,t){var r=e.x,n=e.y,a=t.devicePixelRatio||1;return{x:pt(r*a)/a||0,y:pt(n*a)/a||0}}function Qf(e){var t,r=e.popper,n=e.popperRect,a=e.placement,i=e.variation,c=e.offsets,l=e.position,s=e.gpuAcceleration,u=e.adaptive,f=e.roundOffsets,d=e.isFixed,m=c.x,v=void 0===m?0:m,y=c.y,p=void 0===y?0:y,h="function"==typeof f?f({x:v,y:p}):{x:v,y:p};v=h.x,p=h.y;var g=c.hasOwnProperty("x"),w=c.hasOwnProperty("y"),b=ne,x=te,E=window;if(u){var R=rt(r),S="clientHeight",A="clientWidth";if(R===Z(r)&&("static"!==Se(R=we(r)).position&&"absolute"===l&&(S="scrollHeight",A="scrollWidth")),a===te||(a===ne||a===ae)&&i===er)x=se,p-=(d&&R===E&&E.visualViewport?E.visualViewport.height:R[S])-n.height,p*=s?1:-1;if(a===ne||(a===te||a===se)&&i===er)b=ae,v-=(d&&R===E&&E.visualViewport?E.visualViewport.width:R[A])-n.width,v*=s?1:-1}var D,P=Object.assign({position:l},u&&L7),_=!0===f?I7({x:v,y:p},Z(r)):{x:v,y:p};return v=_.x,p=_.y,s?Object.assign({},P,((D={})[x]=w?"0":"",D[b]=g?"0":"",D.transform=(E.devicePixelRatio||1)<=1?"translate("+v+"px, "+p+"px)":"translate3d("+v+"px, "+p+"px, 0)",D)):Object.assign({},P,((t={})[x]=w?p+"px":"",t[b]=g?v+"px":"",t.transform="",t))}function z7(e){var t=e.state,r=e.options,n=r.gpuAcceleration,a=void 0===n||n,i=r.adaptive,c=void 0===i||i,l=r.roundOffsets,s=void 0===l||l,u={placement:me(t.placement),variation:Ye(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:a,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Qf(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:c,roundOffsets:s})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Qf(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var L7,ed,td=C((()=>{Be(),$r(),et(),mt(),Vr(),Tt(),jr(),Ht(),L7={top:"auto",right:"auto",bottom:"auto",left:"auto"},o(I7,"roundOffsetsByDPR"),o(Qf,"mapToStyles"),o(z7,"computeStyles"),ed={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:z7,data:{}}}));function T7(e){var t=e.state,r=e.instance,n=e.options,a=n.scroll,i=void 0===a||a,c=n.resize,l=void 0===c||c,s=Z(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach((function(f){f.addEventListener("scroll",r.update,Bo)})),l&&s.addEventListener("resize",r.update,Bo),function(){i&&u.forEach((function(f){f.removeEventListener("scroll",r.update,Bo)})),l&&s.removeEventListener("resize",r.update,Bo)}}var Bo,rd,nd=C((()=>{et(),Bo={passive:!0},o(T7,"effect"),rd={name:"eventListeners",enabled:!0,phase:"write",fn:o((function(){}),"fn"),effect:T7,data:{}}}));function Wr(e){return e.replace(/left|right|bottom|top/g,(function(t){return H7[t]}))}var H7,od=C((()=>{H7={left:"right",right:"left",bottom:"top",top:"bottom"},o(Wr,"getOppositePlacement")}));function No(e){return e.replace(/start|end/g,(function(t){return P7[t]}))}var P7,ad=C((()=>{P7={start:"end",end:"start"},o(No,"getOppositeVariationPlacement")}));function ar(e){var t=Z(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}var Fo=C((()=>{et(),o(ar,"getWindowScroll")}));function ir(e){return Ge(we(e)).left+ar(e).scrollLeft}var Do=C((()=>{_r(),mt(),Fo(),o(ir,"getWindowScrollBarX")}));function _l(e,t){var r=Z(e),n=we(e),a=r.visualViewport,i=n.clientWidth,c=n.clientHeight,l=0,s=0;if(a){i=a.width,c=a.height;var u=yn();(u||!u&&"fixed"===t)&&(l=a.offsetLeft,s=a.offsetTop)}return{width:i,height:c,x:l+ir(e),y:s}}var id=C((()=>{et(),mt(),Do(),Pl(),o(_l,"getViewportRect")}));function Vl(e){var t,r=we(e),n=ar(e),a=null==(t=e.ownerDocument)?void 0:t.body,i=tt(r.scrollWidth,r.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),c=tt(r.scrollHeight,r.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),l=-n.scrollLeft+ir(e),s=-n.scrollTop;return"rtl"===Se(a||r).direction&&(l+=tt(r.clientWidth,a?a.clientWidth:0)-i),{width:i,height:c,x:l,y:s}}var ld=C((()=>{mt(),Vr(),Do(),Fo(),Ht(),o(Vl,"getDocumentRect")}));function lr(e){var t=Se(e),r=t.overflow,n=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+a+n)}var _o=C((()=>{Vr(),o(lr,"isScrollParent")}));function Vo(e){return["html","body","#document"].indexOf(pe(e))>=0?e.ownerDocument.body:ue(e)&&lr(e)?e:Vo(ht(e))}var cd=C((()=>{xn(),_o(),zt(),Ne(),o(Vo,"getScrollParent")}));function Pt(e,t){var r;void 0===t&&(t=[]);var n=Vo(e),a=n===(null==(r=e.ownerDocument)?void 0:r.body),i=Z(n),c=a?[i].concat(i.visualViewport||[],lr(n)?n:[]):n,l=t.concat(c);return a?l:l.concat(Pt(ht(c)))}var $l=C((()=>{cd(),xn(),et(),_o(),o(Pt,"listScrollParents")}));function Ur(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}var jl=C((()=>{o(Ur,"rectToClientRect")}));function k7(e,t){var r=Ge(e,!1,"fixed"===t);return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function sd(e,t,r){return t===Ho?Ur(_l(e,r)):qe(t)?k7(t,r):Ur(Vl(we(e)))}function O7(e){var t=Pt(ht(e)),n=["absolute","fixed"].indexOf(Se(e).position)>=0&&ue(e)?rt(e):e;return qe(n)?t.filter((function(a){return qe(a)&&Rn(a,n)&&"body"!==pe(a)})):[]}function Wl(e,t,r,n){var a="clippingParents"===t?O7(e):[].concat(t),i=[].concat(a,[r]),c=i[0],l=i.reduce((function(s,u){var f=sd(e,u,n);return s.top=tt(f.top,s.top),s.right=tr(f.right,s.right),s.bottom=tr(f.bottom,s.bottom),s.left=tt(f.left,s.left),s}),sd(e,c,n));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}var ud=C((()=>{Be(),id(),ld(),$l(),$r(),mt(),Vr(),Ne(),_r(),xn(),kl(),zt(),jl(),Ht(),o(k7,"getInnerBoundingClientRect"),o(sd,"getClientRectFromMixedType"),o(O7,"getClippingParents"),o(Wl,"getClippingRect")}));function Mn(e){var s,t=e.reference,r=e.element,n=e.placement,a=n?me(n):null,i=n?Ye(n):null,c=t.x+t.width/2-r.width/2,l=t.y+t.height/2-r.height/2;switch(a){case te:s={x:c,y:t.y-r.height};break;case se:s={x:c,y:t.y+t.height};break;case ae:s={x:t.x+t.width,y:l};break;case ne:s={x:t.x-r.width,y:l};break;default:s={x:t.x,y:t.y}}var u=a?nr(a):null;if(null!=u){var f="y"===u?"height":"width";switch(i){case dt:s[u]=s[u]-(t[f]/2-r[f]/2);break;case er:s[u]=s[u]+(t[f]/2-r[f]/2)}}return s}var Ul=C((()=>{Tt(),jr(),Oo(),Be(),o(Mn,"computeOffsets")}));function nt(e,t){void 0===t&&(t={});var r=t,n=r.placement,a=void 0===n?e.placement:n,i=r.strategy,c=void 0===i?e.strategy:i,l=r.boundary,s=void 0===l?jf:l,u=r.rootBoundary,f=void 0===u?Ho:u,d=r.elementContext,m=void 0===d?Nr:d,v=r.altBoundary,y=void 0!==v&&v,p=r.padding,h=void 0===p?0:p,g=Sn("number"!=typeof h?h:Cn(h,It)),w=m===Nr?Wf:Nr,b=e.rects.popper,x=e.elements[y?w:m],E=Wl(qe(x)?x:x.contextElement||we(e.elements.popper),s,f,c),R=Ge(e.elements.reference),S=Mn({reference:R,element:b,strategy:"absolute",placement:a}),A=Ur(Object.assign({},b,S)),M=m===Nr?A:R,L={top:E.top-M.top+g.top,bottom:M.bottom-E.bottom+g.bottom,left:E.left-M.left+g.left,right:M.right-E.right+g.right},P=e.modifiersData.offset;if(m===Nr&&P){var _=P[a];Object.keys(L).forEach((function(D){var K=[ae,se].indexOf(D)>=0?1:-1,T=[te,se].indexOf(D)>=0?"y":"x";L[D]+=_[T]*K}))}return L}var An=C((()=>{ud(),mt(),_r(),Ul(),jl(),Be(),Ne(),Fl(),Dl(),o(nt,"detectOverflow")}));function ql(e,t){void 0===t&&(t={});var r=t,n=r.placement,a=r.boundary,i=r.rootBoundary,c=r.padding,l=r.flipVariations,s=r.allowedAutoPlacements,u=void 0===s?Po:s,f=Ye(n),d=f?l?Tl:Tl.filter((function(y){return Ye(y)===f})):It,m=d.filter((function(y){return u.indexOf(y)>=0}));0===m.length&&(m=d);var v=m.reduce((function(y,p){return y[p]=nt(e,{placement:p,boundary:a,rootBoundary:i,padding:c})[me(p)],y}),{});return Object.keys(v).sort((function(y,p){return v[y]-v[p]}))}var fd=C((()=>{jr(),Be(),An(),Tt(),o(ql,"computeAutoPlacement")}));function B7(e){if(me(e)===To)return[];var t=Wr(e);return[No(e),t,No(t)]}function N7(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var a=r.mainAxis,i=void 0===a||a,c=r.altAxis,l=void 0===c||c,s=r.fallbackPlacements,u=r.padding,f=r.boundary,d=r.rootBoundary,m=r.altBoundary,v=r.flipVariations,y=void 0===v||v,p=r.allowedAutoPlacements,h=t.options.placement,g=me(h),b=s||(g===h||!y?[Wr(h)]:B7(h)),x=[h].concat(b).reduce((function(he,fe){return he.concat(me(fe)===To?ql(t,{placement:fe,boundary:f,rootBoundary:d,padding:u,flipVariations:y,allowedAutoPlacements:p}):fe)}),[]),E=t.rects.reference,R=t.rects.popper,S=new Map,A=!0,M=x[0],L=0;L=0,T=K?"width":"height",z=nt(t,{placement:P,boundary:f,rootBoundary:d,altBoundary:m,padding:u}),k=K?D?ae:ne:D?se:te;E[T]>R[T]&&(k=Wr(k));var $=Wr(k),F=[];if(i&&F.push(z[_]<=0),l&&F.push(z[k]<=0,z[$]<=0),F.every((function(he){return he}))){M=P,A=!1;break}S.set(P,F)}if(A)for(var j=y?3:1,O=o((function(fe){var de=x.find((function(be){var Me=S.get(be);if(Me)return Me.slice(0,fe).every((function(Nt){return Nt}))}));if(de)return M=de,"break"}),"_loop"),G=j;G>0;G--){if("break"===O(G))break}t.placement!==M&&(t.modifiersData[n]._skip=!0,t.placement=M,t.reset=!0)}}var dd,pd=C((()=>{od(),Tt(),ad(),An(),fd(),Be(),jr(),o(B7,"getExpandedFallbackPlacements"),o(N7,"flip"),dd={name:"flip",enabled:!0,phase:"main",fn:N7,requiresIfExists:["offset"],data:{_skip:!1}}}));function md(e,t,r){return void 0===r&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function hd(e){return[te,ae,se,ne].some((function(t){return e[t]>=0}))}function F7(e){var t=e.state,r=e.name,n=t.rects.reference,a=t.rects.popper,i=t.modifiersData.preventOverflow,c=nt(t,{elementContext:"reference"}),l=nt(t,{altBoundary:!0}),s=md(c,n),u=md(l,a,i),f=hd(s),d=hd(u);t.modifiersData[r]={referenceClippingOffsets:s,popperEscapeOffsets:u,isReferenceHidden:f,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":d})}var gd,vd=C((()=>{Be(),An(),o(md,"getSideOffsets"),o(hd,"isAnySideFullyClipped"),o(F7,"hide"),gd={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:F7}}));function D7(e,t,r){var n=me(e),a=[ne,te].indexOf(n)>=0?-1:1,i="function"==typeof r?r(Object.assign({},t,{placement:e})):r,c=i[0],l=i[1];return c=c||0,l=(l||0)*a,[ne,ae].indexOf(n)>=0?{x:l,y:c}:{x:c,y:l}}function _7(e){var t=e.state,r=e.options,n=e.name,a=r.offset,i=void 0===a?[0,0]:a,c=Po.reduce((function(f,d){return f[d]=D7(d,t.rects,i),f}),{}),l=c[t.placement],s=l.x,u=l.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=s,t.modifiersData.popperOffsets.y+=u),t.modifiersData[n]=c}var wd,bd=C((()=>{Tt(),Be(),o(D7,"distanceAndSkiddingToXY"),o(_7,"offset"),wd={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:_7}}));function V7(e){var t=e.state,r=e.name;t.modifiersData[r]=Mn({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var yd,Rd=C((()=>{Ul(),o(V7,"popperOffsets"),yd={name:"popperOffsets",enabled:!0,phase:"read",fn:V7,data:{}}}));function Gl(e){return"x"===e?"y":"x"}var xd=C((()=>{o(Gl,"getAltAxis")}));function $7(e){var t=e.state,r=e.options,n=e.name,a=r.mainAxis,i=void 0===a||a,c=r.altAxis,l=void 0!==c&&c,s=r.boundary,u=r.rootBoundary,f=r.altBoundary,d=r.padding,m=r.tether,v=void 0===m||m,y=r.tetherOffset,p=void 0===y?0:y,h=nt(t,{boundary:s,rootBoundary:u,padding:d,altBoundary:f}),g=me(t.placement),w=Ye(t.placement),b=!w,x=nr(g),E=Gl(x),R=t.modifiersData.popperOffsets,S=t.rects.reference,A=t.rects.popper,M="function"==typeof p?p(Object.assign({},t.rects,{placement:t.placement})):p,L="number"==typeof M?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),P=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,_={x:0,y:0};if(R){if(i){var D,K="y"===x?te:ne,T="y"===x?se:ae,z="y"===x?"height":"width",k=R[x],$=k+h[K],F=k-h[T],j=v?-A[z]/2:0,O=w===dt?S[z]:A[z],G=w===dt?-A[z]:-S[z],Ce=t.elements.arrow,he=v&&Ce?rr(Ce):{width:0,height:0},fe=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},de=fe[K],be=fe[T],Me=or(0,S[z],he[z]),Nt=b?S[z]/2-j-Me-de-L.mainAxis:O-Me-de-L.mainAxis,Kr=b?-S[z]/2+j+Me+be+L.mainAxis:G+Me+be+L.mainAxis,Ko=t.elements.arrow&&rt(t.elements.arrow),wp=Ko?"y"===x?Ko.clientTop||0:Ko.clientLeft||0:0,E0=null!=(D=P?.[x])?D:0,yp=k+Kr-E0,S0=or(v?tr($,k+Nt-E0-wp):$,k,v?tt(F,yp):F);R[x]=S0,_[x]=S0-k}if(l){var C0,Rp="x"===x?te:ne,xp="x"===x?se:ae,Ft=R[E],Hn="y"===E?"height":"width",M0=Ft+h[Rp],A0=Ft-h[xp],Jo=-1!==[te,ne].indexOf(g),L0=null!=(C0=P?.[E])?C0:0,I0=Jo?M0:Ft-S[Hn]-A[Hn]-L0+L.altAxis,z0=Jo?Ft+S[Hn]+A[Hn]-L0-L.altAxis:A0,T0=v&&Jo?Zf(I0,Ft,z0):or(v?I0:M0,Ft,v?z0:A0);R[E]=T0,_[E]=T0-Ft}t.modifiersData[n]=_}}var Ed,Sd=C((()=>{Be(),Tt(),Oo(),xd(),Bl(),ko(),$r(),An(),jr(),Nl(),Ht(),o($7,"preventOverflow"),Ed={name:"preventOverflow",enabled:!0,phase:"main",fn:$7,requiresIfExists:["offset"]}})),Yl=C((()=>{}));function Xl(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}var Cd=C((()=>{o(Xl,"getHTMLElementScroll")}));function Zl(e){return e!==Z(e)&&ue(e)?Xl(e):ar(e)}var Md=C((()=>{Fo(),et(),Ne(),Cd(),o(Zl,"getNodeScroll")}));function j7(e){var t=e.getBoundingClientRect(),r=pt(t.width)/e.offsetWidth||1,n=pt(t.height)/e.offsetHeight||1;return 1!==r||1!==n}function Kl(e,t,r){void 0===r&&(r=!1);var n=ue(t),a=ue(t)&&j7(t),i=we(t),c=Ge(e,a,r),l={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(n||!n&&!r)&&(("body"!==pe(t)||lr(i))&&(l=Zl(t)),ue(t)?((s=Ge(t,!0)).x+=t.clientLeft,s.y+=t.clientTop):i&&(s.x=ir(i))),{x:c.left+l.scrollLeft-s.x,y:c.top+l.scrollTop-s.y,width:c.width,height:c.height}}var Ad=C((()=>{_r(),Md(),zt(),Ne(),Do(),mt(),_o(),Ht(),o(j7,"isElementScaled"),o(Kl,"getCompositeRect")}));function W7(e){var t=new Map,r=new Set,n=[];function a(i){r.add(i.name),[].concat(i.requires||[],i.requiresIfExists||[]).forEach((function(l){if(!r.has(l)){var s=t.get(l);s&&a(s)}})),n.push(i)}return e.forEach((function(i){t.set(i.name,i)})),o(a,"sort"),e.forEach((function(i){r.has(i.name)||a(i)})),n}function Jl(e){var t=W7(e);return Uf.reduce((function(r,n){return r.concat(t.filter((function(a){return a.phase===n})))}),[])}var Ld=C((()=>{Be(),o(W7,"order"),o(Jl,"orderModifiers")}));function Ql(e){var t;return function(){return t||(t=new Promise((function(r){Promise.resolve().then((function(){t=void 0,r(e())}))}))),t}}var Id=C((()=>{o(Ql,"debounce")}));function e0(e){var t=e.reduce((function(r,n){var a=r[n.name];return r[n.name]=a?Object.assign({},a,n,{options:Object.assign({},a.options,n.options),data:Object.assign({},a.data,n.data)}):n,r}),{});return Object.keys(t).map((function(r){return t[r]}))}var zd=C((()=>{o(e0,"mergeByName")}));function Hd(){for(var e=arguments.length,t=new Array(e),r=0;r{Ad(),ko(),$l(),$r(),Ld(),Id(),zd(),Ne(),Td={placement:"bottom",modifiers:[],strategy:"absolute"},o(Hd,"areValidElements"),o(Pd,"popperGenerator")})),Od=C((()=>{kd(),nd(),Rd(),td(),Gf(),bd(),pd(),Sd(),Jf(),vd(),Yl(),t0=Pd({defaultModifiers:[rd,yd,ed,qf,wd,dd,Ed,Kf,gd]})})),Bd=C((()=>{Be(),Yl(),Od()})),Fd=H(((VP,Nd)=>{var q7=typeof Element<"u",G7="function"==typeof Map,Y7="function"==typeof Set,X7="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function $o(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;var r,n,a,i;if(Array.isArray(e)){if((r=e.length)!=t.length)return!1;for(n=r;0!==n--;)if(!$o(e[n],t[n]))return!1;return!0}if(G7&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i=e.entries();!(n=i.next()).done;)if(!t.has(n.value[0]))return!1;for(i=e.entries();!(n=i.next()).done;)if(!$o(n.value[1],t.get(n.value[0])))return!1;return!0}if(Y7&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i=e.entries();!(n=i.next()).done;)if(!t.has(n.value[0]))return!1;return!0}if(X7&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if((r=e.length)!=t.length)return!1;for(n=r;0!==n--;)if(e[n]!==t[n])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&"function"==typeof e.valueOf&&"function"==typeof t.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&"function"==typeof e.toString&&"function"==typeof t.toString)return e.toString()===t.toString();if((r=(a=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(n=r;0!==n--;)if(!Object.prototype.hasOwnProperty.call(t,a[n]))return!1;if(q7&&e instanceof Element)return!1;for(n=r;0!==n--;)if(("_owner"!==a[n]&&"__v"!==a[n]&&"__o"!==a[n]||!e.$$typeof)&&!$o(e[a[n]],t[a[n]]))return!1;return!0}return e!=e&&t!=t}o($o,"equal"),Nd.exports=o((function(t,r){try{return $o(t,r)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}}),"isEqual")})),Vd=C((()=>{Bd(),_d=ge(Fd()),$f(),Z7=[],r0=o((function(t,r,n){void 0===n&&(n={});var a=react__WEBPACK_IMPORTED_MODULE_0__.useRef(null),i={onFirstUpdate:n.onFirstUpdate,placement:n.placement||"bottom",strategy:n.strategy||"absolute",modifiers:n.modifiers||Z7},c=react__WEBPACK_IMPORTED_MODULE_0__.useState({styles:{popper:{position:i.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),l=c[0],s=c[1],u=react__WEBPACK_IMPORTED_MODULE_0__.useMemo((function(){return{name:"updateState",enabled:!0,phase:"write",fn:o((function(v){var y=v.state,p=Object.keys(y.elements);react_dom__WEBPACK_IMPORTED_MODULE_3__.flushSync((function(){s({styles:Il(p.map((function(h){return[h,y.styles[h]||{}]}))),attributes:Il(p.map((function(h){return[h,y.attributes[h]]})))})}))}),"fn"),requires:["computeStyles"]}}),[]),f=react__WEBPACK_IMPORTED_MODULE_0__.useMemo((function(){var m={onFirstUpdate:i.onFirstUpdate,placement:i.placement,strategy:i.strategy,modifiers:[].concat(i.modifiers,[u,{name:"applyStyles",enabled:!1}])};return(0,_d.default)(a.current,m)?a.current||m:(a.current=m,m)}),[i.onFirstUpdate,i.placement,i.strategy,i.modifiers,u]),d=react__WEBPACK_IMPORTED_MODULE_0__.useRef();return zl((function(){d.current&&d.current.setOptions(f)}),[f]),zl((function(){if(null!=t&&null!=r){var v=(n.createPopper||t0)(t,r,f);return d.current=v,function(){v.destroy(),d.current=null}}}),[t,r,n.createPopper]),{state:d.current?d.current.state:null,styles:l.styles,attributes:l.attributes,update:d.current?d.current.update:null,forceUpdate:d.current?d.current.forceUpdate:null}}),"usePopper")})),$d=C((()=>{Vd()}));function Ud(e){var t=react__WEBPACK_IMPORTED_MODULE_0__.useRef(e);return t.current=e,react__WEBPACK_IMPORTED_MODULE_0__.useCallback((function(){return t.current}),[])}function J7(e){var t=e.initial,r=e.value,n=e.onChange,a=void 0===n?K7:n;if(void 0===t&&void 0===r)throw new TypeError('Either "value" or "initial" variable must be set. Now both are undefined');var i=react__WEBPACK_IMPORTED_MODULE_0__.useState(t),c=i[0],l=i[1],s=Ud(c),u=react__WEBPACK_IMPORTED_MODULE_0__.useCallback((function(d){var m=s(),v="function"==typeof d?d(m):d;"function"==typeof v.persist&&v.persist(),l(v),"function"==typeof a&&a(v)}),[s,a]),f=void 0!==r;return[f?r:c,f?a:u]}function qd(e,t){return void 0===e&&(e=0),void 0===t&&(t=0),function(){return{width:0,height:0,top:t,right:e,bottom:t,left:e,x:0,y:0,toJSON:o((function(){return null}),"toJSON")}}}function Gd(e,t){var r,n,a;void 0===e&&(e={}),void 0===t&&(t={});var i=Object.keys(Wd).reduce((function(T,z){var k;return W({},T,((k={})[z]=void 0!==T[z]?T[z]:Wd[z],k))}),e),c=react__WEBPACK_IMPORTED_MODULE_0__.useMemo((function(){return[{name:"offset",options:{offset:i.offset}}]}),Array.isArray(i.offset)?i.offset:[]),l=W({},t,{placement:t.placement||i.placement,modifiers:t.modifiers||c}),s=react__WEBPACK_IMPORTED_MODULE_0__.useState(null),u=s[0],f=s[1],d=react__WEBPACK_IMPORTED_MODULE_0__.useState(null),m=d[0],v=d[1],y=J7({initial:i.defaultVisible,value:i.visible,onChange:i.onVisibleChange}),p=y[0],h=y[1],g=react__WEBPACK_IMPORTED_MODULE_0__.useRef();react__WEBPACK_IMPORTED_MODULE_0__.useEffect((function(){return function(){return clearTimeout(g.current)}}),[]);var w=r0(i.followCursor?jd:u,m,l),b=w.styles,x=w.attributes,E=pr(w,Q7),R=E.update,S=Ud({visible:p,triggerRef:u,tooltipRef:m,finalConfig:i}),A=react__WEBPACK_IMPORTED_MODULE_0__.useCallback((function(T){return Array.isArray(i.trigger)?i.trigger.includes(T):i.trigger===T}),Array.isArray(i.trigger)?i.trigger:[i.trigger]),M=react__WEBPACK_IMPORTED_MODULE_0__.useCallback((function(){clearTimeout(g.current),g.current=window.setTimeout((function(){return h(!1)}),i.delayHide)}),[i.delayHide,h]),L=react__WEBPACK_IMPORTED_MODULE_0__.useCallback((function(){clearTimeout(g.current),g.current=window.setTimeout((function(){return h(!0)}),i.delayShow)}),[i.delayShow,h]),P=react__WEBPACK_IMPORTED_MODULE_0__.useCallback((function(){S().visible?M():L()}),[S,M,L]);react__WEBPACK_IMPORTED_MODULE_0__.useEffect((function(){if(S().finalConfig.closeOnOutsideClick){var T=o((function(k){var $,F=S(),j=F.tooltipRef,O=F.triggerRef,G=(null==k.composedPath||null==($=k.composedPath())?void 0:$[0])||k.target;G instanceof Node&&null!=j&&null!=O&&!j.contains(G)&&!O.contains(G)&&M()}),"handleClickOutside");return document.addEventListener("mousedown",T),function(){return document.removeEventListener("mousedown",T)}}}),[S,M]),react__WEBPACK_IMPORTED_MODULE_0__.useEffect((function(){if(null!=u&&A("click"))return u.addEventListener("click",P),function(){return u.removeEventListener("click",P)}}),[u,A,P]),react__WEBPACK_IMPORTED_MODULE_0__.useEffect((function(){if(null!=u&&A("double-click"))return u.addEventListener("dblclick",P),function(){return u.removeEventListener("dblclick",P)}}),[u,A,P]),react__WEBPACK_IMPORTED_MODULE_0__.useEffect((function(){if(null!=u&&A("right-click")){var T=o((function(k){k.preventDefault(),P()}),"preventDefaultAndToggle");return u.addEventListener("contextmenu",T),function(){return u.removeEventListener("contextmenu",T)}}}),[u,A,P]),react__WEBPACK_IMPORTED_MODULE_0__.useEffect((function(){if(null!=u&&A("focus"))return u.addEventListener("focus",L),u.addEventListener("blur",M),function(){u.removeEventListener("focus",L),u.removeEventListener("blur",M)}}),[u,A,L,M]),react__WEBPACK_IMPORTED_MODULE_0__.useEffect((function(){if(null!=u&&A("hover"))return u.addEventListener("mouseenter",L),u.addEventListener("mouseleave",M),function(){u.removeEventListener("mouseenter",L),u.removeEventListener("mouseleave",M)}}),[u,A,L,M]),react__WEBPACK_IMPORTED_MODULE_0__.useEffect((function(){if(null!=m&&A("hover")&&S().finalConfig.interactive)return m.addEventListener("mouseenter",L),m.addEventListener("mouseleave",M),function(){m.removeEventListener("mouseenter",L),m.removeEventListener("mouseleave",M)}}),[m,A,L,M,S]);var _=null==E||null==(r=E.state)||null==(n=r.modifiersData)||null==(a=n.hide)?void 0:a.isReferenceHidden;react__WEBPACK_IMPORTED_MODULE_0__.useEffect((function(){i.closeOnTriggerHidden&&_&&M()}),[i.closeOnTriggerHidden,M,_]),react__WEBPACK_IMPORTED_MODULE_0__.useEffect((function(){if(i.followCursor&&null!=u)return o(T,"setMousePosition"),u.addEventListener("mousemove",T),function(){return u.removeEventListener("mousemove",T)};function T(z){var k=z.clientX,$=z.clientY;jd.getBoundingClientRect=qd(k,$),R?.()}}),[i.followCursor,u,R]),react__WEBPACK_IMPORTED_MODULE_0__.useEffect((function(){if(null!=m&&null!=R&&null!=i.mutationObserverOptions){var T=new MutationObserver(R);return T.observe(m,i.mutationObserverOptions),function(){return T.disconnect()}}}),[i.mutationObserverOptions,m,R]);var D=o((function(z){return void 0===z&&(z={}),W({},z,{style:W({},z.style,b.popper)},x.popper,{"data-popper-interactive":i.interactive})}),"getTooltipProps"),K=o((function(z){return void 0===z&&(z={}),W({},z,x.arrow,{style:W({},z.style,b.arrow),"data-popper-arrow":!0})}),"getArrowProps");return W({getArrowProps:K,getTooltipProps:D,setTooltipRef:v,setTriggerRef:f,tooltipRef:m,triggerRef:u,visible:p},E)}var K7,Q7,jd,Wd,Xd,Xe,e6,t6,o0,Yd=C((()=>{Fn(),en(),$d(),o(Ud,"useGetLatest"),K7=o((function(){}),"noop"),o(J7,"useControlledState"),o(qd,"generateBoundingClientRect"),Q7=["styles","attributes"],jd={getBoundingClientRect:qd()},Wd={closeOnOutsideClick:!0,closeOnTriggerHidden:!1,defaultVisible:!1,delayHide:0,delayShow:0,followCursor:!1,interactive:!1,mutationObserverOptions:{attributes:!0,childList:!0,subtree:!0},offset:[0,6],trigger:"hover"},o(Gd,"usePopperTooltip")})),Kd=C((()=>{Xd=ge(rn(),1),Xe=(0,Xd.default)(1e3)(((e,t,r,n=0)=>t.split("-")[0]===e?r:n)),e6=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div({position:"absolute",borderStyle:"solid"},(({placement:e})=>{let t=0,r=0;switch(!0){case e.startsWith("left")||e.startsWith("right"):r=8;break;case e.startsWith("top")||e.startsWith("bottom"):t=8}return{transform:`translate3d(${t}px, ${r}px, 0px)`}}),(({theme:e,color:t,placement:r})=>({bottom:`${Xe("top",r,"-8px","auto")}`,top:`${Xe("bottom",r,"-8px","auto")}`,right:`${Xe("left",r,"-8px","auto")}`,left:`${Xe("right",r,"-8px","auto")}`,borderBottomWidth:`${Xe("top",r,"0",8)}px`,borderTopWidth:`${Xe("bottom",r,"0",8)}px`,borderRightWidth:`${Xe("left",r,"0",8)}px`,borderLeftWidth:`${Xe("right",r,"0",8)}px`,borderTopColor:Xe("top",r,e.color[t]||t||"light"===e.base?(0,storybook_theming__WEBPACK_IMPORTED_MODULE_1__.a)(e.background.app):e.background.app,"transparent"),borderBottomColor:Xe("bottom",r,e.color[t]||t||"light"===e.base?(0,storybook_theming__WEBPACK_IMPORTED_MODULE_1__.a)(e.background.app):e.background.app,"transparent"),borderLeftColor:Xe("left",r,e.color[t]||t||"light"===e.base?(0,storybook_theming__WEBPACK_IMPORTED_MODULE_1__.a)(e.background.app):e.background.app,"transparent"),borderRightColor:Xe("right",r,e.color[t]||t||"light"===e.base?(0,storybook_theming__WEBPACK_IMPORTED_MODULE_1__.a)(e.background.app):e.background.app,"transparent")}))),t6=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div((({hidden:e})=>({display:e?"none":"inline-block",zIndex:2147483647,colorScheme:"light dark"})),(({theme:e,color:t,hasChrome:r})=>r?{background:t&&e.color[t]||t||"light"===e.base?(0,storybook_theming__WEBPACK_IMPORTED_MODULE_1__.a)(e.background.app):e.background.app,filter:"\n drop-shadow(0px 5px 5px rgba(0,0,0,0.05))\n drop-shadow(0 1px 3px rgba(0,0,0,0.1))\n ",borderRadius:e.appBorderRadius+2,fontSize:e.typography.size.s1}:{})),(o0=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((({placement:e="top",hasChrome:t=!0,children:r,arrowProps:n={},tooltipRef:a,color:i,withArrows:c,...l},s)=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(t6,{"data-testid":"tooltip",hasChrome:t,ref:s,...l,color:i},t&&c&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(e6,{placement:e,...n,color:i}),r)))).displayName="Tooltip"})),i0={};Qr(i0,{WithToolTipState:()=>a0,WithTooltip:()=>a0,WithTooltipPure:()=>Qd});var jo,l6,c6,Qd,a0,Wo=C((()=>{Yd(),Kd(),({document:jo}=_storybook_global__WEBPACK_IMPORTED_MODULE_5__.global),l6=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div` + display: inline-block; + cursor: ${e=>"hover"===e.trigger||e.trigger?.includes("hover")?"default":"pointer"}; +`,c6=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.g` + cursor: ${e=>"hover"===e.trigger||e.trigger?.includes("hover")?"default":"pointer"}; +`,Qd=o((({svg:e=!1,trigger:t="click",closeOnOutsideClick:r=!1,placement:n="top",modifiers:a=[{name:"preventOverflow",options:{padding:8}},{name:"offset",options:{offset:[8,8]}},{name:"arrow",options:{padding:8}}],hasChrome:i=!0,defaultVisible:c=!1,withArrows:l,offset:s,tooltip:u,children:f,closeOnTriggerHidden:d,mutationObserverOptions:m,delayHide:v=("hover"===t?200:0),visible:y,interactive:p,delayShow:h=("hover"===t?400:0),strategy:g,followCursor:w,onVisibleChange:b,...x})=>{let E=e?c6:l6,{getArrowProps:R,getTooltipProps:S,setTooltipRef:A,setTriggerRef:M,visible:L,state:P}=Gd({trigger:t,placement:n,defaultVisible:c,delayHide:v,interactive:p,closeOnOutsideClick:r,closeOnTriggerHidden:d,onVisibleChange:b,delayShow:h,followCursor:w,mutationObserverOptions:m,visible:y,offset:s},{modifiers:a,strategy:g}),_=L?react__WEBPACK_IMPORTED_MODULE_0__.createElement(o0,{placement:P?.placement,ref:A,hasChrome:i,arrowProps:R(),withArrows:l,...S()},"function"==typeof u?u({onHide:o((()=>b(!1)),"onHide")}):u):null;return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement(E,{trigger:t,ref:M,...x},f),L&&react_dom__WEBPACK_IMPORTED_MODULE_3__.createPortal(_,jo.body))}),"WithTooltipPure"),a0=o((({startOpen:e=!1,onVisibleChange:t,...r})=>{let[n,a]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(e),i=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((c=>{t&&!1===t(c)||a(c)}),[t]);return(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{let c=o((()=>i(!1)),"hide");jo.addEventListener("keydown",c,!1);let l=Array.from(jo.getElementsByTagName("iframe")),s=[];return l.forEach((u=>{let f=o((()=>{try{u.contentWindow.document&&(u.contentWindow.document.addEventListener("click",c),s.push((()=>{try{u.contentWindow.document.removeEventListener("click",c)}catch{}})))}catch{}}),"bind");f(),u.addEventListener("load",f),s.push((()=>{u.removeEventListener("load",f)}))})),()=>{jo.removeEventListener("keydown",c),s.forEach((u=>{u()}))}})),react__WEBPACK_IMPORTED_MODULE_0__.createElement(Qd,{...r,visible:n,onVisibleChange:i})}),"WithToolTipState")})),J=o((({...e},t)=>{let r=[e.class,e.className];return delete e.class,e.className=["sbdocs",`sbdocs-${t}`,...r].filter(Boolean).join(" "),e}),"nameSpaceClassNames");function k0(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,vt(e,t)}function B0(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch{return"function"==typeof e}}function Qo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Qo=o((function(){return!!e}),"_isNativeReflectConstruct"))()}function N0(e,t,r){if(Qo())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var a=new(e.bind.apply(e,n));return r&&vt(a,r.prototype),a}function Bn(e){var t="function"==typeof Map?new Map:void 0;return Bn=o((function(n){if(null===n||!B0(n))return n;if("function"!=typeof n)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(n))return t.get(n);t.set(n,a)}function a(){return N0(n,arguments,On(this).constructor)}return o(a,"Wrapper"),a.prototype=Object.create(n.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),vt(a,n)}),"_wrapNativeSuper"),Bn(e)}en(),P0(),kn(),o(k0,"_inheritsLoose"),O0(),kn(),o(B0,"_isNativeFunction"),o(Qo,"_isNativeReflectConstruct"),kn(),o(N0,"_construct"),o(Bn,"_wrapNativeSuper");var Ip={1:"Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }).\n\n",2:"Passed invalid arguments to hsla, please pass multiple numbers e.g. hsla(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75, alpha: 0.7 }).\n\n",3:"Passed an incorrect argument to a color function, please pass a string representation of a color.\n\n",4:"Couldn't generate valid rgb string from %s, it returned %s.\n\n",5:"Couldn't parse the color string. Please provide the color as a string in hex, rgb, rgba, hsl or hsla notation.\n\n",6:"Passed invalid arguments to rgb, please pass multiple numbers e.g. rgb(255, 205, 100) or an object e.g. rgb({ red: 255, green: 205, blue: 100 }).\n\n",7:"Passed invalid arguments to rgba, please pass multiple numbers e.g. rgb(255, 205, 100, 0.75) or an object e.g. rgb({ red: 255, green: 205, blue: 100, alpha: 0.75 }).\n\n",8:"Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object.\n\n",9:"Please provide a number of steps to the modularScale helper.\n\n",10:"Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\n\n",11:'Invalid value passed as base to modularScale, expected number or em string but got "%s"\n\n',12:'Expected a string ending in "px" or a number passed as the first argument to %s(), got "%s" instead.\n\n',13:'Expected a string ending in "px" or a number passed as the second argument to %s(), got "%s" instead.\n\n',14:'Passed invalid pixel value ("%s") to %s(), please pass a value like "12px" or 12.\n\n',15:'Passed invalid base value ("%s") to %s(), please pass a value like "12px" or 12.\n\n',16:"You must provide a template to this method.\n\n",17:"You passed an unsupported selector state to this method.\n\n",18:"minScreen and maxScreen must be provided as stringified numbers with the same units.\n\n",19:"fromSize and toSize must be provided as stringified numbers with the same units.\n\n",20:"expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\n\n",21:"expects the objects in the first argument array to have the properties `prop`, `fromSize`, and `toSize`.\n\n",22:"expects the first argument object to have the properties `prop`, `fromSize`, and `toSize`.\n\n",23:"fontFace expects a name of a font-family.\n\n",24:"fontFace expects either the path to the font file(s) or a name of a local copy.\n\n",25:"fontFace expects localFonts to be an array.\n\n",26:"fontFace expects fileFormats to be an array.\n\n",27:"radialGradient requries at least 2 color-stops to properly render.\n\n",28:"Please supply a filename to retinaImage() as the first argument.\n\n",29:"Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\n\n",30:"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",31:"The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation\n\n",32:"To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s')\n\n",33:"The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation\n\n",34:"borderRadius expects a radius value as a string or number as the second argument.\n\n",35:'borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.\n\n',36:"Property must be a string value.\n\n",37:"Syntax Error at %s.\n\n",38:"Formula contains a function that needs parentheses at %s.\n\n",39:"Formula is missing closing parenthesis at %s.\n\n",40:"Formula has too many closing parentheses at %s.\n\n",41:"All values in a formula must have the same unit or be unitless.\n\n",42:"Please provide a number of steps to the modularScale helper.\n\n",43:"Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\n\n",44:"Invalid value passed as base to modularScale, expected number or em/rem string but got %s.\n\n",45:"Passed invalid argument to hslToColorString, please pass a HslColor or HslaColor object.\n\n",46:"Passed invalid argument to rgbToColorString, please pass a RgbColor or RgbaColor object.\n\n",47:"minScreen and maxScreen must be provided as stringified numbers with the same units.\n\n",48:"fromSize and toSize must be provided as stringified numbers with the same units.\n\n",49:"Expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\n\n",50:"Expects the objects in the first argument array to have the properties prop, fromSize, and toSize.\n\n",51:"Expects the first argument object to have the properties prop, fromSize, and toSize.\n\n",52:"fontFace expects either the path to the font file(s) or a name of a local copy.\n\n",53:"fontFace expects localFonts to be an array.\n\n",54:"fontFace expects fileFormats to be an array.\n\n",55:"fontFace expects a name of a font-family.\n\n",56:"linearGradient requries at least 2 color-stops to properly render.\n\n",57:"radialGradient requries at least 2 color-stops to properly render.\n\n",58:"Please supply a filename to retinaImage() as the first argument.\n\n",59:"Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\n\n",60:"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",61:"Property must be a string value.\n\n",62:"borderRadius expects a radius value as a string or number as the second argument.\n\n",63:'borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.\n\n',64:"The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation.\n\n",65:"To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s').\n\n",66:"The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation.\n\n",67:"You must provide a template to this method.\n\n",68:"You passed an unsupported selector state to this method.\n\n",69:'Expected a string ending in "px" or a number passed as the first argument to %s(), got %s instead.\n\n',70:'Expected a string ending in "px" or a number passed as the second argument to %s(), got %s instead.\n\n',71:'Passed invalid pixel value %s to %s(), please pass a value like "12px" or 12.\n\n',72:'Passed invalid base value %s to %s(), please pass a value like "12px" or 12.\n\n',73:"Please provide a valid CSS variable.\n\n",74:"CSS variable not found and no default was provided.\n\n",75:"important requires a valid style object, got a %s instead.\n\n",76:"fromSize and toSize must be provided as stringified numbers with the same units as minScreen and maxScreen.\n\n",77:'remToPx expects a value in "rem" but you provided it in "%s".\n\n',78:'base must be set in "px" or "%" but you set it in "%s".\n'};function zp(){for(var e=arguments.length,t=new Array(e),r=0;r1?a-1:0),c=1;c=0&&a<1?(l=i,s=c):a>=1&&a<2?(l=c,s=i):a>=2&&a<3?(s=i,u=c):a>=3&&a<4?(s=c,u=i):a>=4&&a<5?(l=c,u=i):a>=5&&a<6&&(l=i,u=c);var f=r-i/2;return n(l+f,s+f,u+f)}o(ea,"colorToInt"),o(Pp,"convertToInt"),o(tn,"hslToRgb");var _0={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};function kp(e){if("string"!=typeof e)return e;var t=e.toLowerCase();return _0[t]?"#"+_0[t]:e}o(kp,"nameToHex");var Op=/^#[a-fA-F0-9]{6}$/,Bp=/^#[a-fA-F0-9]{8}$/,Np=/^#[a-fA-F0-9]{3}$/,Fp=/^#[a-fA-F0-9]{4}$/,ta=/^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i,Dp=/^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i,_p=/^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,Vp=/^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;function fr(e){if("string"!=typeof e)throw new Ae(3);var t=kp(e);if(t.match(Op))return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16)};if(t.match(Bp)){var r=parseFloat((parseInt(""+t[7]+t[8],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16),alpha:r}}if(t.match(Np))return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16)};if(t.match(Fp)){var n=parseFloat((parseInt(""+t[4]+t[4],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16),alpha:n}}var a=ta.exec(t);if(a)return{red:parseInt(""+a[1],10),green:parseInt(""+a[2],10),blue:parseInt(""+a[3],10)};var i=Dp.exec(t.substring(0,50));if(i)return{red:parseInt(""+i[1],10),green:parseInt(""+i[2],10),blue:parseInt(""+i[3],10),alpha:parseFloat(""+i[4])>1?parseFloat(""+i[4])/100:parseFloat(""+i[4])};var c=_p.exec(t);if(c){var f="rgb("+tn(parseInt(""+c[1],10),parseInt(""+c[2],10)/100,parseInt(""+c[3],10)/100)+")",d=ta.exec(f);if(!d)throw new Ae(4,t,f);return{red:parseInt(""+d[1],10),green:parseInt(""+d[2],10),blue:parseInt(""+d[3],10)}}var m=Vp.exec(t.substring(0,50));if(m){var h="rgb("+tn(parseInt(""+m[1],10),parseInt(""+m[2],10)/100,parseInt(""+m[3],10)/100)+")",g=ta.exec(h);if(!g)throw new Ae(4,t,h);return{red:parseInt(""+g[1],10),green:parseInt(""+g[2],10),blue:parseInt(""+g[3],10),alpha:parseFloat(""+m[4])>1?parseFloat(""+m[4])/100:parseFloat(""+m[4])}}throw new Ae(5)}function $p(e){var t=e.red/255,r=e.green/255,n=e.blue/255,a=Math.max(t,r,n),i=Math.min(t,r,n),c=(a+i)/2;if(a===i)return void 0!==e.alpha?{hue:0,saturation:0,lightness:c,alpha:e.alpha}:{hue:0,saturation:0,lightness:c};var l,s=a-i,u=c>.5?s/(2-a-i):s/(a+i);switch(a){case t:l=(r-n)/s+(r=1?Nn(e,t,r):"rgba("+tn(e,t,r)+","+n+")";if("object"==typeof e&&void 0===t&&void 0===r&&void 0===n)return e.alpha>=1?Nn(e.hue,e.saturation,e.lightness):"rgba("+tn(e.hue,e.saturation,e.lightness)+","+e.alpha+")";throw new Ae(2)}function oa(e,t,r){if("number"==typeof e&&"number"==typeof t&&"number"==typeof r)return na("#"+Dt(e)+Dt(t)+Dt(r));if("object"==typeof e&&void 0===t&&void 0===r)return na("#"+Dt(e.red)+Dt(e.green)+Dt(e.blue));throw new Ae(6)}function _t(e,t,r,n){if("string"==typeof e&&"number"==typeof t){var a=fr(e);return"rgba("+a.red+","+a.green+","+a.blue+","+t+")"}if("number"==typeof e&&"number"==typeof t&&"number"==typeof r&&"number"==typeof n)return n>=1?oa(e,t,r):"rgba("+e+","+t+","+r+","+n+")";if("object"==typeof e&&void 0===t&&void 0===r&&void 0===n)return e.alpha>=1?oa(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")";throw new Ae(7)}o(Dt,"numberToHex"),o(ra,"colorToHex"),o(Wp,"convertToHex"),o(Nn,"hslToHex"),o(Up,"hsl"),o(qp,"hsla"),o(oa,"rgb"),o(_t,"rgba");var Gp=o((function(t){return"number"==typeof t.red&&"number"==typeof t.green&&"number"==typeof t.blue&&("number"!=typeof t.alpha||typeof t.alpha>"u")}),"isRgb"),Yp=o((function(t){return"number"==typeof t.red&&"number"==typeof t.green&&"number"==typeof t.blue&&"number"==typeof t.alpha}),"isRgba"),Xp=o((function(t){return"number"==typeof t.hue&&"number"==typeof t.saturation&&"number"==typeof t.lightness&&("number"!=typeof t.alpha||typeof t.alpha>"u")}),"isHsl"),Zp=o((function(t){return"number"==typeof t.hue&&"number"==typeof t.saturation&&"number"==typeof t.lightness&&"number"==typeof t.alpha}),"isHsla");function bt(e){if("object"!=typeof e)throw new Ae(8);if(Yp(e))return _t(e);if(Gp(e))return oa(e);if(Zp(e))return qp(e);if(Xp(e))return Up(e);throw new Ae(8)}function $0(e,t,r){return o((function(){var a=r.concat(Array.prototype.slice.call(arguments));return a.length>=t?e.apply(this,a):$0(e,t,a)}),"fn")}function ke(e){return $0(e,e.length,[])}function Kp(e,t){if("transparent"===t)return t;var r=wt(t);return bt(W({},r,{hue:r.hue+parseFloat(e)}))}o(bt,"toColorString"),o($0,"curried"),o(ke,"curry"),o(Kp,"adjustHue");ke(Kp);function dr(e,t,r){return Math.max(e,Math.min(t,r))}function Jp(e,t){if("transparent"===t)return t;var r=wt(t);return bt(W({},r,{lightness:dr(0,1,r.lightness-parseFloat(e))}))}o(dr,"guard"),o(Jp,"darken");var yt=ke(Jp);function e2(e,t){if("transparent"===t)return t;var r=wt(t);return bt(W({},r,{saturation:dr(0,1,r.saturation-parseFloat(e))}))}o(e2,"desaturate");ke(e2);function t2(e,t){if("transparent"===t)return t;var r=wt(t);return bt(W({},r,{lightness:dr(0,1,r.lightness+parseFloat(e))}))}o(t2,"lighten");var aa=ke(t2);function n2(e,t,r){if("transparent"===t)return r;if("transparent"===r)return t;if(0===e)return r;var n=fr(t),a=W({},n,{alpha:"number"==typeof n.alpha?n.alpha:1}),i=fr(r),c=W({},i,{alpha:"number"==typeof i.alpha?i.alpha:1}),l=a.alpha-c.alpha,s=2*parseFloat(e)-1,d=((s*l===-1?s:s+l)/(1+s*l)+1)/2,m=1-d;return _t({red:Math.floor(a.red*d+c.red*m),green:Math.floor(a.green*d+c.green*m),blue:Math.floor(a.blue*d+c.blue*m),alpha:a.alpha*parseFloat(e)+c.alpha*(1-parseFloat(e))})}o(n2,"mix");var j0=ke(n2);function a2(e,t){if("transparent"===t)return t;var r=fr(t);return _t(W({},r,{alpha:dr(0,1,(100*("number"==typeof r.alpha?r.alpha:1)+100*parseFloat(e))/100)}))}o(a2,"opacify");ke(a2);function i2(e,t){if("transparent"===t)return t;var r=wt(t);return bt(W({},r,{saturation:dr(0,1,r.saturation+parseFloat(e))}))}o(i2,"saturate");ke(i2);function l2(e,t){return"transparent"===t?t:bt(W({},wt(t),{hue:parseFloat(e)}))}o(l2,"setHue");ke(l2);function c2(e,t){return"transparent"===t?t:bt(W({},wt(t),{lightness:parseFloat(e)}))}o(c2,"setLightness");ke(c2);function s2(e,t){return"transparent"===t?t:bt(W({},wt(t),{saturation:parseFloat(e)}))}o(s2,"setSaturation");ke(s2);function u2(e,t){return"transparent"===t?t:j0(parseFloat(e),"rgb(0, 0, 0)",t)}o(u2,"shade");ke(u2);function f2(e,t){return"transparent"===t?t:j0(parseFloat(e),"rgb(255, 255, 255)",t)}o(f2,"tint");ke(f2);function d2(e,t){if("transparent"===t)return t;var r=fr(t);return _t(W({},r,{alpha:dr(0,1,+(100*("number"==typeof r.alpha?r.alpha:1)-100*parseFloat(e)).toFixed(2)/100)}))}o(d2,"transparentize");var ye=ke(d2),De=o((({theme:e})=>({margin:"20px 0 8px",padding:0,cursor:"text",position:"relative",color:e.color.defaultText,"&:first-of-type":{marginTop:0,paddingTop:0},"&:hover a.anchor":{textDecoration:"none"},"& tt, & code":{fontSize:"inherit"}})),"headerCommon"),lt=o((({theme:e})=>({lineHeight:1,margin:"0 2px",padding:"3px 5px",whiteSpace:"nowrap",borderRadius:3,fontSize:e.typography.size.s2-1,border:"light"===e.base?`1px solid ${e.color.mediumlight}`:`1px solid ${e.color.darker}`,color:"light"===e.base?ye(.1,e.color.defaultText):ye(.3,e.color.defaultText),backgroundColor:"light"===e.base?e.color.lighter:e.color.border})),"codeCommon"),N=o((({theme:e})=>({fontFamily:e.typography.fonts.base,fontSize:e.typography.size.s3,margin:0,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitOverflowScrolling:"touch"})),"withReset"),Le={margin:"16px 0"},W0=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div(N),U0=o((({href:e="",...t})=>{let n=/^\//.test(e)?`./?path=${e}`:e,i=/^#.*/.test(e)?"_self":"_top";return react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:n,target:i,...t})}),"Link"),ia=(0,storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4)(U0)(N,(({theme:e})=>({fontSize:"inherit",lineHeight:"24px",color:e.color.secondary,textDecoration:"none","&.absent":{color:"#cc0000"},"&.anchor":{display:"block",paddingLeft:30,marginLeft:-30,cursor:"pointer",position:"absolute",top:0,left:0,bottom:0}}))),la=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.blockquote(N,Le,(({theme:e})=>({borderLeft:`4px solid ${e.color.medium}`,padding:"0 15px",color:e.color.dark,"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}})));pn();var W5=o((e=>"string"==typeof e),"isReactChildString"),Ch=/[\n\r]/g,Mh=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.code((({theme:e})=>({fontFamily:e.typography.fonts.mono,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",display:"inline-block",paddingLeft:2,paddingRight:2,verticalAlign:"baseline",color:"inherit"})),lt),Ah=(0,storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4)(dn)((({theme:e})=>({fontFamily:e.typography.fonts.mono,fontSize:e.typography.size.s2-1+"px",lineHeight:"19px",margin:"25px 0 40px",borderRadius:e.appBorderRadius,boxShadow:"light"===e.base?"rgba(0, 0, 0, 0.10) 0 1px 3px 0":"rgba(0, 0, 0, 0.20) 0 2px 5px 0","pre.prismjs":{padding:20,background:"inherit"}}))),ci=o((({className:e,children:t,...r})=>{let n=(e||"").match(/lang-(\S+)/),a=react__WEBPACK_IMPORTED_MODULE_0__.Children.toArray(t);return a.filter(W5).some((c=>c.match(Ch)))?react__WEBPACK_IMPORTED_MODULE_0__.createElement(Ah,{bordered:!0,copyable:!0,language:n?.[1]??"text",format:!1,...r},t):react__WEBPACK_IMPORTED_MODULE_0__.createElement(Mh,{...r,className:e},a)}),"Code"),si=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.dl(N,Le,{padding:0,"& dt":{fontSize:"14px",fontWeight:"bold",fontStyle:"italic",padding:0,margin:"16px 0 4px"},"& dt:first-of-type":{padding:0},"& dt > :first-of-type":{marginTop:0},"& dt > :last-child":{marginBottom:0},"& dd":{margin:"0 0 16px",padding:"0 15px"},"& dd > :first-of-type":{marginTop:0},"& dd > :last-child":{marginBottom:0}}),ui=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div(N),fi=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.h1(N,De,(({theme:e})=>({fontSize:`${e.typography.size.l1}px`,fontWeight:e.typography.weight.bold}))),di=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.h2(N,De,(({theme:e})=>({fontSize:`${e.typography.size.m2}px`,paddingBottom:4,borderBottom:`1px solid ${e.appBorderColor}`}))),pi=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.h3(N,De,(({theme:e})=>({fontSize:`${e.typography.size.m1}px`}))),mi=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.h4(N,De,(({theme:e})=>({fontSize:`${e.typography.size.s3}px`}))),hi=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.h5(N,De,(({theme:e})=>({fontSize:`${e.typography.size.s2}px`}))),gi=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.h6(N,De,(({theme:e})=>({fontSize:`${e.typography.size.s2}px`,color:e.color.dark}))),vi=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.hr((({theme:e})=>({border:"0 none",borderTop:`1px solid ${e.appBorderColor}`,height:4,padding:0}))),wi=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.img({maxWidth:"100%"}),bi=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.li(N,(({theme:e})=>({fontSize:e.typography.size.s2,color:e.color.defaultText,lineHeight:"24px","& + li":{marginTop:".25em"},"& ul, & ol":{marginTop:".25em",marginBottom:0},"& code":lt({theme:e})}))),yi=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.ol(N,Le,{paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},{listStyle:"decimal"}),Ri=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.p(N,Le,(({theme:e})=>({fontSize:e.typography.size.s2,lineHeight:"24px",color:e.color.defaultText,"& code":lt({theme:e})}))),xi=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.pre(N,Le,(({theme:e})=>({fontFamily:e.typography.fonts.mono,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",lineHeight:"18px",padding:"11px 1rem",whiteSpace:"pre-wrap",color:"inherit",borderRadius:3,margin:"1rem 0","&:not(.prismjs)":{background:"transparent",border:"none",borderRadius:0,padding:0,margin:0},"& pre, &.prismjs":{padding:15,margin:0,whiteSpace:"pre-wrap",color:"inherit",fontSize:"13px",lineHeight:"19px",code:{color:"inherit",fontSize:"inherit"}},"& code":{whiteSpace:"pre"},"& code, & tt":{border:"none"}}))),Ei=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.span(N,(({theme:e})=>({"&.frame":{display:"block",overflow:"hidden","& > span":{border:`1px solid ${e.color.medium}`,display:"block",float:"left",overflow:"hidden",margin:"13px 0 0",padding:7,width:"auto"},"& span img":{display:"block",float:"left"},"& span span":{clear:"both",color:e.color.darkest,display:"block",padding:"5px 0 0"}},"&.align-center":{display:"block",overflow:"hidden",clear:"both","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"center"},"& span img":{margin:"0 auto",textAlign:"center"}},"&.align-right":{display:"block",overflow:"hidden",clear:"both","& > span":{display:"block",overflow:"hidden",margin:"13px 0 0",textAlign:"right"},"& span img":{margin:0,textAlign:"right"}},"&.float-left":{display:"block",marginRight:13,overflow:"hidden",float:"left","& span":{margin:"13px 0 0"}},"&.float-right":{display:"block",marginLeft:13,overflow:"hidden",float:"right","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"right"}}}))),Si=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.title(lt),Ci=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.table(N,Le,(({theme:e})=>({fontSize:e.typography.size.s2,lineHeight:"24px",padding:0,borderCollapse:"collapse","& tr":{borderTop:`1px solid ${e.appBorderColor}`,backgroundColor:e.appContentBg,margin:0,padding:0},"& tr:nth-of-type(2n)":{backgroundColor:"dark"===e.base?e.color.darker:e.color.lighter},"& tr th":{fontWeight:"bold",color:e.color.defaultText,border:`1px solid ${e.appBorderColor}`,margin:0,padding:"6px 13px"},"& tr td":{border:`1px solid ${e.appBorderColor}`,color:e.color.defaultText,margin:0,padding:"6px 13px"},"& tr th :first-of-type, & tr td :first-of-type":{marginTop:0},"& tr th :last-child, & tr td :last-child":{marginBottom:0}}))),Mi=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.ul(N,Le,{paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},{listStyle:"disc"}),Ai={h1:o((e=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(fi,{...J(e,"h1")})),"h1"),h2:o((e=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(di,{...J(e,"h2")})),"h2"),h3:o((e=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(pi,{...J(e,"h3")})),"h3"),h4:o((e=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(mi,{...J(e,"h4")})),"h4"),h5:o((e=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(hi,{...J(e,"h5")})),"h5"),h6:o((e=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(gi,{...J(e,"h6")})),"h6"),pre:o((e=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(xi,{...J(e,"pre")})),"pre"),a:o((e=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(ia,{...J(e,"a")})),"a"),hr:o((e=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(vi,{...J(e,"hr")})),"hr"),dl:o((e=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(si,{...J(e,"dl")})),"dl"),blockquote:o((e=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(la,{...J(e,"blockquote")})),"blockquote"),table:o((e=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(Ci,{...J(e,"table")})),"table"),img:o((e=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(wi,{...J(e,"img")})),"img"),div:o((e=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(ui,{...J(e,"div")})),"div"),span:o((e=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(Ei,{...J(e,"span")})),"span"),li:o((e=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(bi,{...J(e,"li")})),"li"),ul:o((e=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(Mi,{...J(e,"ul")})),"ul"),ol:o((e=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(yi,{...J(e,"ol")})),"ol"),p:o((e=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(Ri,{...J(e,"p")})),"p"),code:o((e=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(ci,{...J(e,"code")})),"code"),tt:o((e=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(Si,{...J(e,"tt")})),"tt"),resetwrapper:o((e=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(W0,{...J(e,"resetwrapper")})),"resetwrapper")},G5=(storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div((({theme:e,compact:t})=>({display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:e.typography.size.s1,fontWeight:e.typography.weight.bold,lineHeight:"12px",minWidth:20,borderRadius:20,padding:t?"4px 7px":"4px 10px"})),{svg:{height:12,width:12,marginRight:4,marginTop:-2,path:{fill:"currentColor"}}},(({theme:e,status:t})=>{switch(t){case"critical":return{color:e.color.critical,background:e.background.critical};case"negative":return{color:e.color.negativeText,background:e.background.negative,boxShadow:"light"===e.base?`inset 0 0 0 1px ${ye(.9,e.color.negativeText)}`:"none"};case"warning":return{color:e.color.warningText,background:e.background.warning,boxShadow:"light"===e.base?`inset 0 0 0 1px ${ye(.9,e.color.warningText)}`:"none"};case"neutral":return{color:e.textMutedColor,background:"light"===e.base?e.background.app:e.barBg,boxShadow:`inset 0 0 0 1px ${ye(.8,e.textMutedColor)}`};case"positive":return{color:e.color.positiveText,background:e.background.positive,boxShadow:"light"===e.base?`inset 0 0 0 1px ${ye(.9,e.color.positiveText)}`:"none"};case"active":return{color:e.color.secondary,background:e.background.hoverable,boxShadow:`inset 0 0 0 1px ${ye(.9,e.color.secondary)}`};default:return{}}})),react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((({color:e="currentColor",size:t=14,...r},n)=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg",{width:t,height:t,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,...r},react__WEBPACK_IMPORTED_MODULE_0__.createElement("path",{d:"M10.139 8.725l1.36-1.323a.568.568 0 00.151-.54.534.534 0 00-.377-.396l-2.705-.708 2.22-4.976a.568.568 0 00-.15-.666.497.497 0 00-.648.008L5.464 4.05l.708.71 2.848-2.47-1.64 3.677.697.697 2.164.567-.81.787.708.708zM2.523 6.6a.566.566 0 00-.177.544.534.534 0 00.382.41l2.782.721-1.494 5.013a.563.563 0 00.217.627.496.496 0 00.629-.06l3.843-3.736-.708-.707-2.51 2.44 1.137-3.814-.685-.685-2.125-.55.844-.731-.71-.71L2.524 6.6zM1.854 1.146a.5.5 0 10-.708.708l11 11a.5.5 0 00.708-.708l-11-11z",fill:e}))))),Y5=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((({color:e="currentColor",size:t=14,...r},n)=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg",{width:t,height:t,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,...r},react__WEBPACK_IMPORTED_MODULE_0__.createElement("path",{d:"M1.854 1.146a.5.5 0 10-.708.708L6.293 7l-5.147 5.146a.5.5 0 00.708.708L7 7.707l5.146 5.147a.5.5 0 00.708-.708L7.707 7l5.147-5.146a.5.5 0 00-.708-.708L7 6.293 1.854 1.146z",fill:e})))),X5=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((({color:e="currentColor",size:t=14,...r},n)=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg",{width:t,height:t,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,...r},react__WEBPACK_IMPORTED_MODULE_0__.createElement("path",{d:"M11.104 7.354l-5.5 5.5a.5.5 0 01-.708-.708L10.043 7 4.896 1.854a.5.5 0 11.708-.708l5.5 5.5a.5.5 0 010 .708z",fill:e})))),eg=o((e=>!(0!==e.button||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)),"isPlainLeftClick"),tg=o(((e,t)=>{eg(e)&&(e.preventDefault(),t(e))}),"cancelled"),rg=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.span((({withArrow:e})=>e?{"> svg:last-of-type":{height:"0.7em",width:"0.7em",marginRight:0,marginLeft:"0.25em",bottom:"auto",verticalAlign:"inherit"}}:{}),(({containsIcon:e})=>e?{svg:{height:"1em",width:"1em",verticalAlign:"middle",position:"relative",bottom:0,marginRight:0}}:{})),ng=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.a((({theme:e})=>({display:"inline-block",transition:"all 150ms ease-out",textDecoration:"none",color:e.color.secondary,"&:hover, &:focus":{cursor:"pointer",color:yt(.07,e.color.secondary),"svg path:not([fill])":{fill:yt(.07,e.color.secondary)}},"&:active":{color:yt(.1,e.color.secondary),"svg path:not([fill])":{fill:yt(.1,e.color.secondary)}},svg:{display:"inline-block",height:"1em",width:"1em",verticalAlign:"text-top",position:"relative",bottom:"-0.125em",marginRight:"0.4em","& path":{fill:e.color.secondary}}})),(({theme:e,secondary:t,tertiary:r})=>{let n;return t&&(n=[e.textMutedColor,e.color.dark,e.color.darker]),r&&(n=[e.color.dark,e.color.darkest,e.textMutedColor]),n?{color:n[0],"svg path:not([fill])":{fill:n[0]},"&:hover":{color:n[1],"svg path:not([fill])":{fill:n[1]}},"&:active":{color:n[2],"svg path:not([fill])":{fill:n[2]}}}:{}}),(({nochrome:e})=>e?{color:"inherit","&:hover, &:active":{color:"inherit",textDecoration:"underline"}}:{}),(({theme:e,inverse:t})=>t?{color:e.color.lightest,":not([fill])":{fill:e.color.lightest},"&:hover":{color:e.color.lighter,"svg path:not([fill])":{fill:e.color.lighter}},"&:active":{color:e.color.light,"svg path:not([fill])":{fill:e.color.light}}}:{}),(({isButton:e})=>e?{border:0,borderRadius:0,background:"none",padding:0,fontSize:"inherit"}:{})),Ii=o((({cancel:e=!0,children:t,onClick:r,withArrow:n=!1,containsIcon:a=!1,className:i,style:c,...l})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(ng,{...l,onClick:r&&e?s=>tg(s,r):r,className:i},react__WEBPACK_IMPORTED_MODULE_0__.createElement(rg,{withArrow:n,containsIcon:a},t,n&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(X5,null)))),"Link"),Gt=(storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div((({theme:e})=>({fontSize:`${e.typography.size.s2}px`,lineHeight:"1.6",h1:{fontSize:`${e.typography.size.l1}px`,fontWeight:e.typography.weight.bold},h2:{fontSize:`${e.typography.size.m2}px`,borderBottom:`1px solid ${e.appBorderColor}`},h3:{fontSize:`${e.typography.size.m1}px`},h4:{fontSize:`${e.typography.size.s3}px`},h5:{fontSize:`${e.typography.size.s2}px`},h6:{fontSize:`${e.typography.size.s2}px`,color:e.color.dark},"pre:not(.prismjs)":{background:"transparent",border:"none",borderRadius:0,padding:0,margin:0},"pre pre, pre.prismjs":{padding:15,margin:0,whiteSpace:"pre-wrap",color:"inherit",fontSize:"13px",lineHeight:"19px"},"pre pre code, pre.prismjs code":{color:"inherit",fontSize:"inherit"},"pre code":{margin:0,padding:0,whiteSpace:"pre",border:"none",background:"transparent"},"pre code, pre tt":{backgroundColor:"transparent",border:"none"},"body > *:first-of-type":{marginTop:"0 !important"},"body > *:last-child":{marginBottom:"0 !important"},a:{color:e.color.secondary,textDecoration:"none"},"a.absent":{color:"#cc0000"},"a.anchor":{display:"block",paddingLeft:30,marginLeft:-30,cursor:"pointer",position:"absolute",top:0,left:0,bottom:0},"h1, h2, h3, h4, h5, h6":{margin:"20px 0 10px",padding:0,cursor:"text",position:"relative","&:first-of-type":{marginTop:0,paddingTop:0},"&:hover a.anchor":{textDecoration:"none"},"& tt, & code":{fontSize:"inherit"}},"h1:first-of-type + h2":{marginTop:0,paddingTop:0},"p, blockquote, ul, ol, dl, li, table, pre":{margin:"15px 0"},hr:{border:"0 none",borderTop:`1px solid ${e.appBorderColor}`,height:4,padding:0},"body > h1:first-of-type, body > h2:first-of-type, body > h3:first-of-type, body > h4:first-of-type, body > h5:first-of-type, body > h6:first-of-type":{marginTop:0,paddingTop:0},"body > h1:first-of-type + h2":{marginTop:0,paddingTop:0},"a:first-of-type h1, a:first-of-type h2, a:first-of-type h3, a:first-of-type h4, a:first-of-type h5, a:first-of-type h6":{marginTop:0,paddingTop:0},"h1 p, h2 p, h3 p, h4 p, h5 p, h6 p":{marginTop:0},"li p.first":{display:"inline-block"},"ul, ol":{paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},dl:{padding:0},"dl dt":{fontSize:"14px",fontWeight:"bold",fontStyle:"italic",margin:"0 0 15px",padding:"0 15px","&:first-of-type":{padding:0},"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}},blockquote:{borderLeft:`4px solid ${e.color.medium}`,padding:"0 15px",color:e.color.dark,"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}},table:{padding:0,borderCollapse:"collapse","& tr":{borderTop:`1px solid ${e.appBorderColor}`,backgroundColor:"white",margin:0,padding:0,"& th":{fontWeight:"bold",border:`1px solid ${e.appBorderColor}`,textAlign:"left",margin:0,padding:"6px 13px"},"& td":{border:`1px solid ${e.appBorderColor}`,textAlign:"left",margin:0,padding:"6px 13px"},"&:nth-of-type(2n)":{backgroundColor:e.color.lighter},"& th :first-of-type, & td :first-of-type":{marginTop:0},"& th :last-child, & td :last-child":{marginBottom:0}}},img:{maxWidth:"100%"},"span.frame":{display:"block",overflow:"hidden","& > span":{border:`1px solid ${e.color.medium}`,display:"block",float:"left",overflow:"hidden",margin:"13px 0 0",padding:7,width:"auto"},"& span img":{display:"block",float:"left"},"& span span":{clear:"both",color:e.color.darkest,display:"block",padding:"5px 0 0"}},"span.align-center":{display:"block",overflow:"hidden",clear:"both","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"center"},"& span img":{margin:"0 auto",textAlign:"center"}},"span.align-right":{display:"block",overflow:"hidden",clear:"both","& > span":{display:"block",overflow:"hidden",margin:"13px 0 0",textAlign:"right"},"& span img":{margin:0,textAlign:"right"}},"span.float-left":{display:"block",marginRight:13,overflow:"hidden",float:"left","& span":{margin:"13px 0 0"}},"span.float-right":{display:"block",marginLeft:13,overflow:"hidden",float:"right","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"right"}},"code, tt":{margin:"0 2px",padding:"0 5px",whiteSpace:"nowrap",border:`1px solid ${e.color.mediumlight}`,backgroundColor:e.color.lighter,borderRadius:3,color:"dark"===e.base?e.color.darkest:e.color.dark}}))),[]),Cr=null,cg=(0,react__WEBPACK_IMPORTED_MODULE_0__.lazy)((async()=>{let{SyntaxHighlighter:e}=await Promise.resolve().then((()=>(pn(),li)));return Gt.length>0&&(Gt.forEach((t=>{e.registerLanguage(...t)})),Gt=[]),null===Cr&&(Cr=e),{default:o((t=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(e,{...t})),"default")}})),sg=(0,react__WEBPACK_IMPORTED_MODULE_0__.lazy)((async()=>{let[{SyntaxHighlighter:e},{formatter:t}]=await Promise.all([Promise.resolve().then((()=>(pn(),li))),Promise.resolve().then((()=>(tu(),eu)))]);return Gt.length>0&&(Gt.forEach((r=>{e.registerLanguage(...r)})),Gt=[]),null===Cr&&(Cr=e),{default:o((r=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(e,{...r,formatter:t})),"default")}})),nu=o((e=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Suspense,{fallback:react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null)},!1!==e.format?react__WEBPACK_IMPORTED_MODULE_0__.createElement(sg,{...e}):react__WEBPACK_IMPORTED_MODULE_0__.createElement(cg,{...e}))),"SyntaxHighlighter");nu.registerLanguage=(...e)=>{null===Cr?Gt.push(e):Cr.registerLanguage(...e)},pn(),Ka();var Eo={};function Mr(e,t,{checkForDefaultPrevented:r=!0}={}){return o((function(a){if(e?.(a),!1===r||!a.defaultPrevented)return t?.(a)}),"handleEvent")}function ou(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function Yt(...e){return t=>{let r=!1,n=e.map((a=>{let i=ou(a,t);return!r&&"function"==typeof i&&(r=!0),i}));if(r)return()=>{for(let a=0;a{let{children:c,...l}=i,s=react__WEBPACK_IMPORTED_MODULE_0__.useMemo((()=>l),Object.values(l));return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(r.Provider,{value:s,children:c})}),"Provider");function a(i){let c=react__WEBPACK_IMPORTED_MODULE_0__.useContext(r);if(c)return c;if(void 0!==t)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return n.displayName=e+"Provider",o(a,"useContext2"),[n,a]}function cu(e,t=[]){let r=[];function n(i,c){let l=react__WEBPACK_IMPORTED_MODULE_0__.createContext(c),s=r.length;r=[...r,c];let u=o((d=>{let{scope:m,children:v,...y}=d,p=m?.[e]?.[s]||l,h=react__WEBPACK_IMPORTED_MODULE_0__.useMemo((()=>y),Object.values(y));return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(p.Provider,{value:h,children:v})}),"Provider");function f(d,m){let v=m?.[e]?.[s]||l,y=react__WEBPACK_IMPORTED_MODULE_0__.useContext(v);if(y)return y;if(void 0!==c)return c;throw new Error(`\`${d}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",o(f,"useContext2"),[u,f]}o(n,"createContext3");let a=o((()=>{let i=r.map((c=>react__WEBPACK_IMPORTED_MODULE_0__.createContext(c)));return o((function(l){let s=l?.[e]||i;return react__WEBPACK_IMPORTED_MODULE_0__.useMemo((()=>({[`__scope${e}`]:{...l,[e]:s}})),[l,s])}),"useScope")}),"createScope");return a.scopeName=e,[n,ug(a,...t)]}function ug(...e){let t=e[0];if(1===e.length)return t;let r=o((()=>{let n=e.map((a=>({useScope:a(),scopeName:a.scopeName})));return o((function(i){let c=n.reduce(((l,{useScope:s,scopeName:u})=>({...l,...s(i)[`__scope${u}`]})),{});return react__WEBPACK_IMPORTED_MODULE_0__.useMemo((()=>({[`__scope${t.scopeName}`]:c})),[c])}),"useComposedScopes")}),"createScope");return r.scopeName=t.scopeName,r}Qr(Eo,{Close:()=>gl,Content:()=>pl,Description:()=>hl,Dialog:()=>Qi,DialogClose:()=>cl,DialogContent:()=>ol,DialogDescription:()=>ll,DialogOverlay:()=>nl,DialogPortal:()=>rl,DialogTitle:()=>il,DialogTrigger:()=>el,Overlay:()=>dl,Portal:()=>fl,Root:()=>ul,Title:()=>ml,Trigger:()=>Tv,WarningProvider:()=>Av,createDialogScope:()=>yv}),o(Mr,"composeEventHandlers"),o(ou,"setRef"),o(Yt,"composeRefs"),o(Ke,"useComposedRefs"),o(lu,"createContext2"),o(cu,"createContextScope"),o(ug,"composeContextScopes");var ut=globalThis?.document?react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect:()=>{},fg=(react__WEBPACK_IMPORTED_MODULE_0___namespace_cache||(react__WEBPACK_IMPORTED_MODULE_0___namespace_cache=__webpack_require__.t(react__WEBPACK_IMPORTED_MODULE_0__,2)))[" useId ".trim().toString()]||(()=>{}),dg=0;function lo(e){let[t,r]=react__WEBPACK_IMPORTED_MODULE_0__.useState(fg());return ut((()=>{e||r((n=>n??String(dg++)))}),[e]),e||(t?`radix-${t}`:"")}o(lo,"useId");var pg=(react__WEBPACK_IMPORTED_MODULE_0___namespace_cache||(react__WEBPACK_IMPORTED_MODULE_0___namespace_cache=__webpack_require__.t(react__WEBPACK_IMPORTED_MODULE_0__,2)))[" useInsertionEffect ".trim().toString()]||ut;function uu({prop:e,defaultProp:t,onChange:r=o((()=>{}),"onChange"),caller:n}){let[a,i,c]=mg({defaultProp:t,onChange:r}),l=void 0!==e,s=l?e:a;{let f=react__WEBPACK_IMPORTED_MODULE_0__.useRef(void 0!==e);react__WEBPACK_IMPORTED_MODULE_0__.useEffect((()=>{let d=f.current;d!==l&&console.warn(`${n} is changing from ${d?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=l}),[l,n])}return[s,react__WEBPACK_IMPORTED_MODULE_0__.useCallback((f=>{if(l){let d=hg(f)?f(e):f;d!==e&&c.current?.(d)}else i(f)}),[l,e,i,c])]}function mg({defaultProp:e,onChange:t}){let[r,n]=react__WEBPACK_IMPORTED_MODULE_0__.useState(e),a=react__WEBPACK_IMPORTED_MODULE_0__.useRef(r),i=react__WEBPACK_IMPORTED_MODULE_0__.useRef(t);return pg((()=>{i.current=t}),[t]),react__WEBPACK_IMPORTED_MODULE_0__.useEffect((()=>{a.current!==r&&(i.current?.(r),a.current=r)}),[r,a]),[r,n,i]}function hg(e){return"function"==typeof e}o(uu,"useControllableState"),o(mg,"useUncontrolledState"),o(hg,"isFunction");Symbol("RADIX:SYNC_STATE");function so(e,t,{checkForDefaultPrevented:r=!0}={}){return o((function(a){if(e?.(a),!1===r||!a.defaultPrevented)return t?.(a)}),"handleEvent")}function du(e){let t=gg(e),r=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(((n,a)=>{let{children:i,...c}=n,l=react__WEBPACK_IMPORTED_MODULE_0__.Children.toArray(i),s=l.find(wg);if(s){let u=s.props.children,f=l.map((d=>d===s?react__WEBPACK_IMPORTED_MODULE_0__.Children.count(u)>1?react__WEBPACK_IMPORTED_MODULE_0__.Children.only(null):react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(u)?u.props.children:null:d));return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(t,{...c,ref:a,children:react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(u)?react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(u,void 0,f):null})}return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(t,{...c,ref:a,children:i})}));return r.displayName=`${e}.Slot`,r}function gg(e){let t=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(((r,n)=>{let{children:a,...i}=r;if(react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(a)){let c=yg(a),l=bg(i,a.props);return a.type!==react__WEBPACK_IMPORTED_MODULE_0__.Fragment&&(l.ref=n?Yt(n,c):c),react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(a,l)}return react__WEBPACK_IMPORTED_MODULE_0__.Children.count(a)>1?react__WEBPACK_IMPORTED_MODULE_0__.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}o(so,"composeEventHandlers"),o(du,"createSlot"),o(gg,"createSlotClone");var vg=Symbol("radix.slottable");function wg(e){return react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===vg}function bg(e,t){let r={...t};for(let n in t){let a=e[n],i=t[n];/^on[A-Z]/.test(n)?a&&i?r[n]=(...l)=>{i(...l),a(...l)}:a&&(r[n]=a):"style"===n?r[n]={...a,...i}:"className"===n&&(r[n]=[a,i].filter(Boolean).join(" "))}return{...e,...r}}function yg(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}o(wg,"isSlottable"),o(bg,"mergeProps"),o(yg,"getElementRef");var Oe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce(((e,t)=>{let r=du(`Primitive.${t}`),n=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(((a,i)=>{let{asChild:c,...l}=a,s=c?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(s,{...l,ref:i})}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function hu(e,t){e&&react_dom__WEBPACK_IMPORTED_MODULE_3__.flushSync((()=>e.dispatchEvent(t)))}function Mt(e){let t=react__WEBPACK_IMPORTED_MODULE_0__.useRef(e);return react__WEBPACK_IMPORTED_MODULE_0__.useEffect((()=>{t.current=e})),react__WEBPACK_IMPORTED_MODULE_0__.useMemo((()=>(...r)=>t.current?.(...r)),[])}function vu(e,t=globalThis?.document){let r=Mt(e);react__WEBPACK_IMPORTED_MODULE_0__.useEffect((()=>{let n=o((a=>{"Escape"===a.key&&r(a)}),"handleKeyDown");return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})}),[r,t])}o(hu,"dispatchDiscreteCustomEvent"),o(Mt,"useCallbackRef"),o(vu,"useEscapeKeydown");var wu,Ti="dismissableLayer.update",Ru=react__WEBPACK_IMPORTED_MODULE_0__.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Hi=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(((e,t)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:c,onDismiss:l,...s}=e,u=react__WEBPACK_IMPORTED_MODULE_0__.useContext(Ru),[f,d]=react__WEBPACK_IMPORTED_MODULE_0__.useState(null),m=f?.ownerDocument??globalThis?.document,[,v]=react__WEBPACK_IMPORTED_MODULE_0__.useState({}),y=Ke(t,(S=>d(S))),p=Array.from(u.layers),[h]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=p.indexOf(h),w=f?p.indexOf(f):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,x=w>=g,E=Lg((S=>{let A=S.target,M=[...u.branches].some((L=>L.contains(A)));!x||M||(a?.(S),c?.(S),S.defaultPrevented||l?.())}),m),R=Ig((S=>{let A=S.target;[...u.branches].some((L=>L.contains(A)))||(i?.(S),c?.(S),S.defaultPrevented||l?.())}),m);return vu((S=>{w===u.layers.size-1&&(n?.(S),!S.defaultPrevented&&l&&(S.preventDefault(),l()))}),m),react__WEBPACK_IMPORTED_MODULE_0__.useEffect((()=>{if(f)return r&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(wu=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),bu(),()=>{r&&1===u.layersWithOutsidePointerEventsDisabled.size&&(m.body.style.pointerEvents=wu)}}),[f,m,r,u]),react__WEBPACK_IMPORTED_MODULE_0__.useEffect((()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),bu())}),[f,u]),react__WEBPACK_IMPORTED_MODULE_0__.useEffect((()=>{let S=o((()=>v({})),"handleUpdate");return document.addEventListener(Ti,S),()=>document.removeEventListener(Ti,S)}),[]),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(Oe.div,{...s,ref:y,style:{pointerEvents:b?x?"auto":"none":void 0,...e.style},onFocusCapture:so(e.onFocusCapture,R.onFocusCapture),onBlurCapture:so(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:so(e.onPointerDownCapture,E.onPointerDownCapture)})}));Hi.displayName="DismissableLayer";function Lg(e,t=globalThis?.document){let r=Mt(e),n=react__WEBPACK_IMPORTED_MODULE_0__.useRef(!1),a=react__WEBPACK_IMPORTED_MODULE_0__.useRef((()=>{}));return react__WEBPACK_IMPORTED_MODULE_0__.useEffect((()=>{let i=o((l=>{if(l.target&&!n.current){let u=o((function(){xu("dismissableLayer.pointerDownOutside",r,f,{discrete:!0})}),"handleAndDispatchPointerDownOutsideEvent2");let f={originalEvent:l};"touch"===l.pointerType?(t.removeEventListener("click",a.current),a.current=u,t.addEventListener("click",a.current,{once:!0})):u()}else t.removeEventListener("click",a.current);n.current=!1}),"handlePointerDown"),c=window.setTimeout((()=>{t.addEventListener("pointerdown",i)}),0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",i),t.removeEventListener("click",a.current)}}),[t,r]),{onPointerDownCapture:o((()=>n.current=!0),"onPointerDownCapture")}}function Ig(e,t=globalThis?.document){let r=Mt(e),n=react__WEBPACK_IMPORTED_MODULE_0__.useRef(!1);return react__WEBPACK_IMPORTED_MODULE_0__.useEffect((()=>{let a=o((i=>{i.target&&!n.current&&xu("dismissableLayer.focusOutside",r,{originalEvent:i},{discrete:!1})}),"handleFocus");return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)}),[t,r]),{onFocusCapture:o((()=>n.current=!0),"onFocusCapture"),onBlurCapture:o((()=>n.current=!1),"onBlurCapture")}}function bu(){let e=new CustomEvent(Ti);document.dispatchEvent(e)}function xu(e,t,r,{discrete:n}){let a=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),n?hu(a,i):a.dispatchEvent(i)}react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(((e,t)=>{let r=react__WEBPACK_IMPORTED_MODULE_0__.useContext(Ru),n=react__WEBPACK_IMPORTED_MODULE_0__.useRef(null),a=Ke(t,n);return react__WEBPACK_IMPORTED_MODULE_0__.useEffect((()=>{let i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}}),[r.branches]),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(Oe.div,{...e,ref:a})})).displayName="DismissableLayerBranch",o(Lg,"usePointerDownOutside"),o(Ig,"useFocusOutside"),o(bu,"dispatchUpdate"),o(xu,"handleAndDispatchCustomEvent");var Pi="focusScope.autoFocusOnMount",ki="focusScope.autoFocusOnUnmount",Eu={bubbles:!1,cancelable:!0},Oi=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(((e,t)=>{let{loop:r=!1,trapped:n=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...c}=e,[l,s]=react__WEBPACK_IMPORTED_MODULE_0__.useState(null),u=Mt(a),f=Mt(i),d=react__WEBPACK_IMPORTED_MODULE_0__.useRef(null),m=Ke(t,(p=>s(p))),v=react__WEBPACK_IMPORTED_MODULE_0__.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;react__WEBPACK_IMPORTED_MODULE_0__.useEffect((()=>{if(n){let w=o((function(R){if(v.paused||!l)return;let S=R.target;l.contains(S)?d.current=S:At(d.current,{select:!0})}),"handleFocusIn2"),b=o((function(R){if(v.paused||!l)return;let S=R.relatedTarget;null!==S&&(l.contains(S)||At(d.current,{select:!0}))}),"handleFocusOut2"),x=o((function(R){if(document.activeElement===document.body)for(let A of R)A.removedNodes.length>0&&At(l)}),"handleMutations2");document.addEventListener("focusin",w),document.addEventListener("focusout",b);let E=new MutationObserver(x);return l&&E.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",b),E.disconnect()}}}),[n,l,v.paused]),react__WEBPACK_IMPORTED_MODULE_0__.useEffect((()=>{if(l){Cu.add(v);let p=document.activeElement;if(!l.contains(p)){let g=new CustomEvent(Pi,Eu);l.addEventListener(Pi,u),l.dispatchEvent(g),g.defaultPrevented||(Hg(Ng(Au(l)),{select:!0}),document.activeElement===p&&At(l))}return()=>{l.removeEventListener(Pi,u),setTimeout((()=>{let g=new CustomEvent(ki,Eu);l.addEventListener(ki,f),l.dispatchEvent(g),g.defaultPrevented||At(p??document.body,{select:!0}),l.removeEventListener(ki,f),Cu.remove(v)}),0)}}}),[l,u,f,v]);let y=react__WEBPACK_IMPORTED_MODULE_0__.useCallback((p=>{if(!r&&!n||v.paused)return;let h="Tab"===p.key&&!p.altKey&&!p.ctrlKey&&!p.metaKey,g=document.activeElement;if(h&&g){let w=p.currentTarget,[b,x]=Pg(w);b&&x?p.shiftKey||g!==x?p.shiftKey&&g===b&&(p.preventDefault(),r&&At(x,{select:!0})):(p.preventDefault(),r&&At(b,{select:!0})):g===w&&p.preventDefault()}}),[r,n,v.paused]);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(Oe.div,{tabIndex:-1,...c,ref:m,onKeyDown:y})}));function Hg(e,{select:t=!1}={}){let r=document.activeElement;for(let n of e)if(At(n,{select:t}),document.activeElement!==r)return}function Pg(e){let t=Au(e);return[Su(t,e),Su(t.reverse(),e)]}function Au(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o((n=>{let a="INPUT"===n.tagName&&"hidden"===n.type;return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}),"acceptNode")});for(;r.nextNode();)t.push(r.currentNode);return t}function Su(e,t){for(let r of e)if(!kg(r,{upTo:t}))return r}function kg(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function Og(e){return e instanceof HTMLInputElement&&"select"in e}function At(e,{select:t=!1}={}){if(e&&e.focus){let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Og(e)&&t&&e.select()}}Oi.displayName="FocusScope",o(Hg,"focusFirst"),o(Pg,"getTabbableEdges"),o(Au,"getTabbableCandidates"),o(Su,"findVisible"),o(kg,"isHidden"),o(Og,"isSelectableInput"),o(At,"focus");var Cu=Bg();function Bg(){let e=[];return{add(t){let r=e[0];t!==r&&r?.pause(),e=Mu(e,t),e.unshift(t)},remove(t){e=Mu(e,t),e[0]?.resume()}}}function Mu(e,t){let r=[...e],n=r.indexOf(t);return-1!==n&&r.splice(n,1),r}function Ng(e){return e.filter((t=>"A"!==t.tagName))}o(Bg,"createFocusScopesStack"),o(Mu,"arrayRemove"),o(Ng,"removeLinks");var Bi=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(((e,t)=>{let{container:r,...n}=e,[a,i]=react__WEBPACK_IMPORTED_MODULE_0__.useState(!1);ut((()=>i(!0)),[]);let c=r||a&&globalThis?.document?.body;return c?react_dom__WEBPACK_IMPORTED_MODULE_3__.createPortal((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(Oe.div,{...n,ref:t}),c):null}));function Vg(e,t){return react__WEBPACK_IMPORTED_MODULE_0__.useReducer(((r,n)=>t[r][n]??r),e)}Bi.displayName="Portal",o(Vg,"useStateMachine");var mn=o((e=>{let{present:t,children:r}=e,n=$g(t),a="function"==typeof r?r({present:n.isPresent}):react__WEBPACK_IMPORTED_MODULE_0__.Children.only(r),i=Ke(n.ref,jg(a));return"function"==typeof r||n.isPresent?react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(a,{ref:i}):null}),"Presence");function $g(e){let[t,r]=react__WEBPACK_IMPORTED_MODULE_0__.useState(),n=react__WEBPACK_IMPORTED_MODULE_0__.useRef(null),a=react__WEBPACK_IMPORTED_MODULE_0__.useRef(e),i=react__WEBPACK_IMPORTED_MODULE_0__.useRef("none"),c=e?"mounted":"unmounted",[l,s]=Vg(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return react__WEBPACK_IMPORTED_MODULE_0__.useEffect((()=>{let u=fo(n.current);i.current="mounted"===l?u:"none"}),[l]),ut((()=>{let u=n.current,f=a.current;if(f!==e){let m=i.current,v=fo(u);s(e?"MOUNT":"none"===v||"none"===u?.display?"UNMOUNT":f&&m!==v?"ANIMATION_OUT":"UNMOUNT"),a.current=e}}),[e,s]),ut((()=>{if(t){let u,f=t.ownerDocument.defaultView??window,d=o((v=>{let p=fo(n.current).includes(v.animationName);if(v.target===t&&p&&(s("ANIMATION_END"),!a.current)){let h=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=h)}))}}),"handleAnimationEnd"),m=o((v=>{v.target===t&&(i.current=fo(n.current))}),"handleAnimationStart");return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}s("ANIMATION_END")}),[t,s]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:react__WEBPACK_IMPORTED_MODULE_0__.useCallback((u=>{n.current=u?getComputedStyle(u):null,r(u)}),[])}}function fo(e){return e?.animationName||"none"}function jg(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}mn.displayName="Presence",o($g,"usePresence"),o(fo,"getAnimationName"),o(jg,"getElementRef");var Ni=0;function Tu(){react__WEBPACK_IMPORTED_MODULE_0__.useEffect((()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Iu()),document.body.insertAdjacentElement("beforeend",e[1]??Iu()),Ni++,()=>{1===Ni&&document.querySelectorAll("[data-radix-focus-guard]").forEach((t=>t.remove())),Ni--}}),[])}function Iu(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}o(Tu,"useFocusGuards"),o(Iu,"createFocusGuard");var He=o((function(){return He=Object.assign||o((function(t){for(var r,n=1,a=arguments.length;n"u")return Kg;var t=Jg(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}}),"getGapWidth"),Qg=gn(),Lr="data-scroll-locked",ev=o((function(e,t,r,n){var a=e.left,i=e.top,c=e.right,l=e.gap;return void 0===r&&(r="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(n,";\n padding-right: ").concat(l,"px ").concat(n,";\n }\n body[").concat(Lr,"] {\n overflow: hidden ").concat(n,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(n,";"),"margin"===r&&"\n padding-left: ".concat(a,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(c,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(l,"px ").concat(n,";\n "),"padding"===r&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),"\n }\n \n .").concat(Xt," {\n right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(Zt," {\n margin-right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(Xt," .").concat(Xt," {\n right: 0 ").concat(n,";\n }\n \n .").concat(Zt," .").concat(Zt," {\n margin-right: 0 ").concat(n,";\n }\n \n body[").concat(Lr,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(l,"px;\n }\n")}),"getStyles"),_u=o((function(){var e=parseInt(document.body.getAttribute(Lr)||"0",10);return isFinite(e)?e:0}),"getCurrentUseCounter"),tv=o((function(){react__WEBPACK_IMPORTED_MODULE_0__.useEffect((function(){return document.body.setAttribute(Lr,(_u()+1).toString()),function(){var e=_u()-1;e<=0?document.body.removeAttribute(Lr):document.body.setAttribute(Lr,e.toString())}}),[])}),"useLockAttribute"),Yi=o((function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,a=void 0===n?"margin":n;tv();var i=react__WEBPACK_IMPORTED_MODULE_0__.useMemo((function(){return Gi(a)}),[a]);return react__WEBPACK_IMPORTED_MODULE_0__.createElement(Qg,{styles:ev(i,!t,a,r?"":"!important")})}),"RemoveScrollBar"),Xi=!1;if(typeof window<"u")try{vn=Object.defineProperty({},"passive",{get:o((function(){return Xi=!0,!0}),"get")}),window.addEventListener("test",vn,vn),window.removeEventListener("test",vn,vn)}catch{Xi=!1}var vn,Kt=!!Xi&&{passive:!1},rv=o((function(e){return"TEXTAREA"===e.tagName}),"alwaysContainsScroll"),Vu=o((function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return"hidden"!==r[t]&&!(r.overflowY===r.overflowX&&!rv(e)&&"visible"===r[t])}),"elementCanBeScrolled"),nv=o((function(e){return Vu(e,"overflowY")}),"elementCouldBeVScrolled"),ov=o((function(e){return Vu(e,"overflowX")}),"elementCouldBeHScrolled"),Zi=o((function(e,t){var r=t.ownerDocument,n=t;do{if(typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host),$u(e,n)){var i=ju(e,n);if(i[1]>i[2])return!0}n=n.parentNode}while(n&&n!==r.body);return!1}),"locationCouldBeScrolled"),av=o((function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]}),"getVScrollVariables"),iv=o((function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}),"getHScrollVariables"),$u=o((function(e,t){return"v"===e?nv(t):ov(t)}),"elementCouldBeScrolled"),ju=o((function(e,t){return"v"===e?av(t):iv(t)}),"getScrollVariables"),lv=o((function(e,t){return"h"===e&&"rtl"===t?-1:1}),"getDirectionFactor"),Wu=o((function(e,t,r,n,a){var i=lv(e,window.getComputedStyle(t).direction),c=i*n,l=r.target,s=t.contains(l),u=!1,f=c>0,d=0,m=0;do{var v=ju(e,l),y=v[0],g=v[1]-v[2]-i*y;(y||g)&&$u(e,l)&&(d+=g,m+=y),l=l instanceof ShadowRoot?l.host:l.parentNode}while(!s&&l!==document.body||s&&(t.contains(l)||t===l));return(f&&(a&&Math.abs(d)<1||!a&&c>d)||!f&&(a&&Math.abs(m)<1||!a&&-c>m))&&(u=!0),u}),"handleScroll"),vo=o((function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]}),"getTouchXY"),Uu=o((function(e){return[e.deltaX,e.deltaY]}),"getDeltaXY"),qu=o((function(e){return e&&"current"in e?e.current:e}),"extractRef"),cv=o((function(e,t){return e[0]===t[0]&&e[1]===t[1]}),"deltaCompare"),sv=o((function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")}),"generateStyle"),uv=0,zr=[];function Gu(e){var t=react__WEBPACK_IMPORTED_MODULE_0__.useRef([]),r=react__WEBPACK_IMPORTED_MODULE_0__.useRef([0,0]),n=react__WEBPACK_IMPORTED_MODULE_0__.useRef(),a=react__WEBPACK_IMPORTED_MODULE_0__.useState(uv++)[0],i=react__WEBPACK_IMPORTED_MODULE_0__.useState(gn)[0],c=react__WEBPACK_IMPORTED_MODULE_0__.useRef(e);react__WEBPACK_IMPORTED_MODULE_0__.useEffect((function(){c.current=e}),[e]),react__WEBPACK_IMPORTED_MODULE_0__.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var p=Hu([e.lockRef.current],(e.shards||[]).map(qu),!0).filter(Boolean);return p.forEach((function(h){return h.classList.add("allow-interactivity-".concat(a))})),function(){document.body.classList.remove("block-interactivity-".concat(a)),p.forEach((function(h){return h.classList.remove("allow-interactivity-".concat(a))}))}}}),[e.inert,e.lockRef.current,e.shards]);var l=react__WEBPACK_IMPORTED_MODULE_0__.useCallback((function(p,h){if("touches"in p&&2===p.touches.length||"wheel"===p.type&&p.ctrlKey)return!c.current.allowPinchZoom;var E,g=vo(p),w=r.current,b="deltaX"in p?p.deltaX:w[0]-g[0],x="deltaY"in p?p.deltaY:w[1]-g[1],R=p.target,S=Math.abs(b)>Math.abs(x)?"h":"v";if("touches"in p&&"h"===S&&"range"===R.type)return!1;var A=Zi(S,R);if(!A)return!0;if(A?E=S:(E="v"===S?"h":"v",A=Zi(S,R)),!A)return!1;if(!n.current&&"changedTouches"in p&&(b||x)&&(n.current=E),!E)return!0;var M=n.current||E;return Wu(M,h,p,"h"===M?b:x,!0)}),[]),s=react__WEBPACK_IMPORTED_MODULE_0__.useCallback((function(p){var h=p;if(zr.length&&zr[zr.length-1]===i){var g="deltaY"in h?Uu(h):vo(h),w=t.current.filter((function(E){return E.name===h.type&&(E.target===h.target||h.target===E.shadowParent)&&cv(E.delta,g)}))[0];if(w&&w.should)return void(h.cancelable&&h.preventDefault());if(!w){var b=(c.current.shards||[]).map(qu).filter(Boolean).filter((function(E){return E.contains(h.target)}));(b.length>0?l(h,b[0]):!c.current.noIsolation)&&h.cancelable&&h.preventDefault()}}}),[]),u=react__WEBPACK_IMPORTED_MODULE_0__.useCallback((function(p,h,g,w){var b={name:p,delta:h,target:g,should:w,shadowParent:fv(g)};t.current.push(b),setTimeout((function(){t.current=t.current.filter((function(x){return x!==b}))}),1)}),[]),f=react__WEBPACK_IMPORTED_MODULE_0__.useCallback((function(p){r.current=vo(p),n.current=void 0}),[]),d=react__WEBPACK_IMPORTED_MODULE_0__.useCallback((function(p){u(p.type,Uu(p),p.target,l(p,e.lockRef.current))}),[]),m=react__WEBPACK_IMPORTED_MODULE_0__.useCallback((function(p){u(p.type,vo(p),p.target,l(p,e.lockRef.current))}),[]);react__WEBPACK_IMPORTED_MODULE_0__.useEffect((function(){return zr.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:m}),document.addEventListener("wheel",s,Kt),document.addEventListener("touchmove",s,Kt),document.addEventListener("touchstart",f,Kt),function(){zr=zr.filter((function(p){return p!==i})),document.removeEventListener("wheel",s,Kt),document.removeEventListener("touchmove",s,Kt),document.removeEventListener("touchstart",f,Kt)}}),[]);var v=e.removeScrollBar,y=e.inert;return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,y?react__WEBPACK_IMPORTED_MODULE_0__.createElement(i,{styles:sv(a)}):null,v?react__WEBPACK_IMPORTED_MODULE_0__.createElement(Yi,{gapMode:e.gapMode}):null)}function fv(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}o(Gu,"RemoveScrollSideCar"),o(fv,"getOutermostShadowParent");var Yu=$i(go,Gu),Xu=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((function(e,t){return react__WEBPACK_IMPORTED_MODULE_0__.createElement(hn,He({},e,{ref:t,sideCar:Yu}))}));Xu.classNames=hn.classNames;var Ki=Xu,dv=o((function(e){return typeof document>"u"?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}),"getDefaultParent"),Tr=new WeakMap,bo=new WeakMap,yo={},Ji=0,Zu=o((function(e){return e&&(e.host||Zu(e.parentNode))}),"unwrapHost"),pv=o((function(e,t){return t.map((function(r){if(e.contains(r))return r;var n=Zu(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)})).filter((function(r){return!!r}))}),"correctTargets"),mv=o((function(e,t,r,n){var a=pv(t,Array.isArray(e)?e:[e]);yo[r]||(yo[r]=new WeakMap);var i=yo[r],c=[],l=new Set,s=new Set(a),u=o((function(d){!d||l.has(d)||(l.add(d),u(d.parentNode))}),"keep");a.forEach(u);var f=o((function(d){!d||s.has(d)||Array.prototype.forEach.call(d.children,(function(m){if(l.has(m))f(m);else try{var v=m.getAttribute(n),y=null!==v&&"false"!==v,p=(Tr.get(m)||0)+1,h=(i.get(m)||0)+1;Tr.set(m,p),i.set(m,h),c.push(m),1===p&&y&&bo.set(m,!0),1===h&&m.setAttribute(r,"true"),y||m.setAttribute(n,"true")}catch(g){console.error("aria-hidden: cannot operate on ",m,g)}}))}),"deep");return f(t),l.clear(),Ji++,function(){c.forEach((function(d){var m=Tr.get(d)-1,v=i.get(d)-1;Tr.set(d,m),i.set(d,v),m||(bo.has(d)||d.removeAttribute(n),bo.delete(d)),v||d.removeAttribute(r)})),--Ji||(Tr=new WeakMap,Tr=new WeakMap,bo=new WeakMap,yo={})}}),"applyAttributeToOthers"),Ku=o((function(e,t,r){void 0===r&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),a=t||dv(e);return a?(n.push.apply(n,Array.from(a.querySelectorAll("[aria-live]"))),mv(n,a,r,"aria-hidden")):function(){return null}}),"hideOthers");function Qu(e){let t=hv(e),r=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(((n,a)=>{let{children:i,...c}=n,l=react__WEBPACK_IMPORTED_MODULE_0__.Children.toArray(i),s=l.find(vv);if(s){let u=s.props.children,f=l.map((d=>d===s?react__WEBPACK_IMPORTED_MODULE_0__.Children.count(u)>1?react__WEBPACK_IMPORTED_MODULE_0__.Children.only(null):react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(u)?u.props.children:null:d));return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(t,{...c,ref:a,children:react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(u)?react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(u,void 0,f):null})}return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(t,{...c,ref:a,children:i})}));return r.displayName=`${e}.Slot`,r}function hv(e){let t=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(((r,n)=>{let{children:a,...i}=r;if(react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(a)){let c=bv(a),l=wv(i,a.props);return a.type!==react__WEBPACK_IMPORTED_MODULE_0__.Fragment&&(l.ref=n?Yt(n,c):c),react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(a,l)}return react__WEBPACK_IMPORTED_MODULE_0__.Children.count(a)>1?react__WEBPACK_IMPORTED_MODULE_0__.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}o(Qu,"createSlot"),o(hv,"createSlotClone");var gv=Symbol("radix.slottable");function vv(e){return react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===gv}function wv(e,t){let r={...t};for(let n in t){let a=e[n],i=t[n];/^on[A-Z]/.test(n)?a&&i?r[n]=(...l)=>{i(...l),a(...l)}:a&&(r[n]=a):"style"===n?r[n]={...a,...i}:"className"===n&&(r[n]=[a,i].filter(Boolean).join(" "))}return{...e,...r}}function bv(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}o(vv,"isSlottable"),o(wv,"mergeProps"),o(bv,"getElementRef");var xo="Dialog",[rf,yv]=cu(xo),[Rv,Je]=rf(xo),Qi=o((e=>{let{__scopeDialog:t,children:r,open:n,defaultOpen:a,onOpenChange:i,modal:c=!0}=e,l=react__WEBPACK_IMPORTED_MODULE_0__.useRef(null),s=react__WEBPACK_IMPORTED_MODULE_0__.useRef(null),[u,f]=uu({prop:n,defaultProp:a??!1,onChange:i,caller:xo});return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(Rv,{scope:t,triggerRef:l,contentRef:s,contentId:lo(),titleId:lo(),descriptionId:lo(),open:u,onOpenChange:f,onOpenToggle:react__WEBPACK_IMPORTED_MODULE_0__.useCallback((()=>f((d=>!d))),[f]),modal:c,children:r})}),"Dialog");Qi.displayName=xo;var nf="DialogTrigger",el=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(((e,t)=>{let{__scopeDialog:r,...n}=e,a=Je(nf,r),i=Ke(t,a.triggerRef);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(Oe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":sl(a.open),...n,ref:i,onClick:Mr(e.onClick,a.onOpenToggle)})}));el.displayName=nf;var tl="DialogPortal",[xv,of]=rf(tl,{forceMount:void 0}),rl=o((e=>{let{__scopeDialog:t,forceMount:r,children:n,container:a}=e,i=Je(tl,t);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(xv,{scope:t,forceMount:r,children:react__WEBPACK_IMPORTED_MODULE_0__.Children.map(n,(c=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(mn,{present:r||i.open,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(Bi,{asChild:!0,container:a,children:c})})))})}),"DialogPortal");rl.displayName=tl;var Ro="DialogOverlay",nl=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(((e,t)=>{let r=of(Ro,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,i=Je(Ro,e.__scopeDialog);return i.modal?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(mn,{present:n||i.open,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(Sv,{...a,ref:t})}):null}));nl.displayName=Ro;var Ev=Qu("DialogOverlay.RemoveScroll"),Sv=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(((e,t)=>{let{__scopeDialog:r,...n}=e,a=Je(Ro,r);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(Ki,{as:Ev,allowPinchZoom:!0,shards:[a.contentRef],children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(Oe.div,{"data-state":sl(a.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})})),Jt="DialogContent",ol=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(((e,t)=>{let r=of(Jt,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,i=Je(Jt,e.__scopeDialog);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(mn,{present:n||i.open,children:i.modal?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(Cv,{...a,ref:t}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(Mv,{...a,ref:t})})}));ol.displayName=Jt;var Cv=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(((e,t)=>{let r=Je(Jt,e.__scopeDialog),n=react__WEBPACK_IMPORTED_MODULE_0__.useRef(null),a=Ke(t,r.contentRef,n);return react__WEBPACK_IMPORTED_MODULE_0__.useEffect((()=>{let i=n.current;if(i)return Ku(i)}),[]),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(af,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Mr(e.onCloseAutoFocus,(i=>{i.preventDefault(),r.triggerRef.current?.focus()})),onPointerDownOutside:Mr(e.onPointerDownOutside,(i=>{let c=i.detail.originalEvent,l=0===c.button&&!0===c.ctrlKey;(2===c.button||l)&&i.preventDefault()})),onFocusOutside:Mr(e.onFocusOutside,(i=>i.preventDefault()))})})),Mv=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(((e,t)=>{let r=Je(Jt,e.__scopeDialog),n=react__WEBPACK_IMPORTED_MODULE_0__.useRef(!1),a=react__WEBPACK_IMPORTED_MODULE_0__.useRef(!1);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(af,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o((i=>{e.onCloseAutoFocus?.(i),i.defaultPrevented||(n.current||r.triggerRef.current?.focus(),i.preventDefault()),n.current=!1,a.current=!1}),"onCloseAutoFocus"),onInteractOutside:o((i=>{e.onInteractOutside?.(i),i.defaultPrevented||(n.current=!0,"pointerdown"===i.detail.originalEvent.type&&(a.current=!0));let c=i.target;r.triggerRef.current?.contains(c)&&i.preventDefault(),"focusin"===i.detail.originalEvent.type&&a.current&&i.preventDefault()}),"onInteractOutside")})})),af=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(((e,t)=>{let{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:i,...c}=e,l=Je(Jt,r),s=react__WEBPACK_IMPORTED_MODULE_0__.useRef(null),u=Ke(t,s);return Tu(),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(Oi,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:a,onUnmountAutoFocus:i,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(Hi,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":sl(l.open),...c,ref:u,onDismiss:o((()=>l.onOpenChange(!1)),"onDismiss")})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(Lv,{titleId:l.titleId}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(zv,{contentRef:s,descriptionId:l.descriptionId})]})]})})),al="DialogTitle",il=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(((e,t)=>{let{__scopeDialog:r,...n}=e,a=Je(al,r);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(Oe.h2,{id:a.titleId,...n,ref:t})}));il.displayName=al;var lf="DialogDescription",ll=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(((e,t)=>{let{__scopeDialog:r,...n}=e,a=Je(lf,r);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(Oe.p,{id:a.descriptionId,...n,ref:t})}));ll.displayName=lf;var cf="DialogClose",cl=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(((e,t)=>{let{__scopeDialog:r,...n}=e,a=Je(cf,r);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(Oe.button,{type:"button",...n,ref:t,onClick:Mr(e.onClick,(()=>a.onOpenChange(!1)))})}));function sl(e){return e?"open":"closed"}cl.displayName=cf,o(sl,"getState");var sf="DialogTitleWarning",[Av,uf]=lu(sf,{contentName:Jt,titleName:al,docsSlug:"dialog"}),Lv=o((({titleId:e})=>{let t=uf(sf),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return react__WEBPACK_IMPORTED_MODULE_0__.useEffect((()=>{e&&(document.getElementById(e)||console.error(r))}),[r,e]),null}),"TitleWarning"),zv=o((({contentRef:e,descriptionId:t})=>{let n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${uf("DialogDescriptionWarning").contentName}}.`;return react__WEBPACK_IMPORTED_MODULE_0__.useEffect((()=>{let a=e.current?.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(n))}),[n,e,t]),null}),"DescriptionWarning"),ul=Qi,Tv=el,fl=rl,dl=nl,pl=ol,ml=il,hl=ll,gl=cl,yl={};function Hv(e){let t=Pv(e),r=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(((n,a)=>{let{children:i,...c}=n,l=react__WEBPACK_IMPORTED_MODULE_0__.Children.toArray(i),s=l.find(Ov);if(s){let u=s.props.children,f=l.map((d=>d===s?react__WEBPACK_IMPORTED_MODULE_0__.Children.count(u)>1?react__WEBPACK_IMPORTED_MODULE_0__.Children.only(null):react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(u)?u.props.children:null:d));return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(t,{...c,ref:a,children:react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(u)?react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(u,void 0,f):null})}return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(t,{...c,ref:a,children:i})}));return r.displayName=`${e}.Slot`,r}Qr(yl,{Actions:()=>Qv,CloseButton:()=>mf,Col:()=>gf,Container:()=>bl,Content:()=>Xv,Description:()=>Jv,Error:()=>e3,ErrorWrapper:()=>vf,Header:()=>Zv,Overlay:()=>wl,Row:()=>hf,Title:()=>Kv}),o(Hv,"createSlot");var df=Hv("Slot");function Pv(e){let t=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(((r,n)=>{let{children:a,...i}=r;if(react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(a)){let c=Nv(a),l=Bv(i,a.props);return a.type!==react__WEBPACK_IMPORTED_MODULE_0__.Fragment&&(l.ref=n?Yt(n,c):c),react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(a,l)}return react__WEBPACK_IMPORTED_MODULE_0__.Children.count(a)>1?react__WEBPACK_IMPORTED_MODULE_0__.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}o(Pv,"createSlotClone");var kv=Symbol("radix.slottable");function Ov(e){return react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===kv}function Bv(e,t){let r={...t};for(let n in t){let a=e[n],i=t[n];/^on[A-Z]/.test(n)?a&&i?r[n]=(...l)=>{let s=i(...l);return a(...l),s}:a&&(r[n]=a):"style"===n?r[n]={...a,...i}:"className"===n&&(r[n]=[a,i].filter(Boolean).join(" "))}return{...e,...r}}function Nv(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}o(Ov,"isSlottable"),o(Bv,"mergeProps"),o(Nv,"getElementRef");var Hr=(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)((({asChild:e=!1,animation:t="none",size:r="small",variant:n="outline",padding:a="medium",disabled:i=!1,active:c=!1,onClick:l,...s},u)=>{let f="button";e&&(f=df);let[d,m]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),v=o((y=>{l&&l(y),"none"!==t&&m(!0)}),"handleClick");return(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{let y=setTimeout((()=>{d&&m(!1)}),1e3);return()=>clearTimeout(y)}),[d]),react__WEBPACK_IMPORTED_MODULE_0__.createElement(Wv,{as:f,ref:u,variant:n,size:r,padding:a,disabled:i,active:c,animating:d,animation:t,onClick:v,...s})}));Hr.displayName="Button";var Wv=(0,storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4)("button",{shouldForwardProp:o((e=>(0,storybook_theming__WEBPACK_IMPORTED_MODULE_1__.EG)(e)),"shouldForwardProp")})((({theme:e,variant:t,size:r,disabled:n,active:a,animating:i,animation:c="none",padding:l})=>({border:0,cursor:n?"not-allowed":"pointer",display:"inline-flex",gap:"6px",alignItems:"center",justifyContent:"center",overflow:"hidden",padding:"none"===l?0:"small"===l&&"small"===r?"0 7px":"small"===l&&"medium"===r?"0 9px":"small"===r?"0 10px":"medium"===r?"0 12px":0,height:"small"===r?"28px":"32px",position:"relative",textAlign:"center",textDecoration:"none",transitionProperty:"background, box-shadow",transitionDuration:"150ms",transitionTimingFunction:"ease-out",verticalAlign:"top",whiteSpace:"nowrap",userSelect:"none",opacity:n?.5:1,margin:0,fontSize:`${e.typography.size.s1}px`,fontWeight:e.typography.weight.bold,lineHeight:"1",background:"solid"===t?e.color.secondary:"outline"===t?e.button.background:"ghost"===t&&a?e.background.hoverable:"transparent",..."ghost"===t?{".sb-bar &":{background:a?ye(.9,e.barTextColor):"transparent",color:a?e.barSelectedColor:e.barTextColor,"&:hover":{color:e.barHoverColor,background:ye(.86,e.barHoverColor)},"&:active":{color:e.barSelectedColor,background:ye(.9,e.barSelectedColor)},"&:focus":{boxShadow:`${_t(e.barHoverColor,1)} 0 0 0 1px inset`,outline:"none"}}}:{},color:"solid"===t?e.color.lightest:"outline"===t?e.input.color:"ghost"===t&&a?e.color.secondary:"ghost"===t?e.color.mediumdark:e.input.color,boxShadow:"outline"===t?`${e.button.border} 0 0 0 1px inset`:"none",borderRadius:e.input.borderRadius,flexShrink:0,"&:hover":{color:"ghost"===t?e.color.secondary:void 0,background:(()=>{let s=e.color.secondary;return"solid"===t&&(s=e.color.secondary),"outline"===t&&(s=e.button.background),"ghost"===t?ye(.86,e.color.secondary):"light"===e.base?yt(.02,s):aa(.03,s)})()},"&:active":{color:"ghost"===t?e.color.secondary:void 0,background:(()=>{let s=e.color.secondary;return"solid"===t&&(s=e.color.secondary),"outline"===t&&(s=e.button.background),"ghost"===t?e.background.hoverable:"light"===e.base?yt(.02,s):aa(.03,s)})()},"&:focus":{boxShadow:`${_t(e.color.secondary,1)} 0 0 0 1px inset`,outline:"none"},"> svg":{animation:i&&"none"!==c?`${e.animation[c]} 1000ms ease-out`:""}}))),So=(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)((({padding:e="small",variant:t="ghost",...r},n)=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(Hr,{padding:e,variant:t,ref:n,...r})));So.displayName="IconButton";var pf=(0,storybook_theming__WEBPACK_IMPORTED_MODULE_1__.i7)({from:{opacity:0},to:{opacity:1}}),Gv=(0,storybook_theming__WEBPACK_IMPORTED_MODULE_1__.i7)({from:{maxHeight:0},to:{}}),Yv=(0,storybook_theming__WEBPACK_IMPORTED_MODULE_1__.i7)({from:{opacity:0,transform:"translate(-50%, -50%) scale(0.9)"},to:{opacity:1,transform:"translate(-50%, -50%) scale(1)"}}),wl=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div({backdropFilter:"blur(24px)",position:"fixed",inset:0,width:"100%",height:"100%",zIndex:10,animation:`${pf} 200ms`}),bl=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div((({theme:e,width:t,height:r})=>({backgroundColor:e.background.bar,borderRadius:6,boxShadow:"0px 4px 67px 0px #00000040",position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:t??740,height:r??"auto",maxWidth:"calc(100% - 40px)",maxHeight:"85vh",overflow:"auto",zIndex:11,animation:`${Yv} 200ms`,"&:focus-visible":{outline:"none"}}))),mf=o((e=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(gl,{asChild:!0},react__WEBPACK_IMPORTED_MODULE_0__.createElement(So,{"aria-label":"Close",...e},react__WEBPACK_IMPORTED_MODULE_0__.createElement(Y5,null)))),"CloseButton"),Xv=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div({display:"flex",flexDirection:"column",margin:16,gap:16}),hf=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div({display:"flex",justifyContent:"space-between",gap:16}),gf=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div({display:"flex",flexDirection:"column",gap:4}),Zv=o((e=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(hf,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement(gf,{...e}),react__WEBPACK_IMPORTED_MODULE_0__.createElement(mf,null))),"Header"),Kv=(0,storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4)(ml)((({theme:e})=>({margin:0,fontSize:e.typography.size.s3,fontWeight:e.typography.weight.bold}))),Jv=(0,storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4)(hl)((({theme:e})=>({position:"relative",zIndex:1,margin:0,fontSize:e.typography.size.s2}))),Qv=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div({display:"flex",flexDirection:"row-reverse",gap:8}),vf=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div((({theme:e})=>({maxHeight:100,overflow:"auto",animation:`${Gv} 300ms, ${pf} 300ms`,backgroundColor:e.background.critical,color:e.color.lightest,fontSize:e.typography.size.s2,"& > div":{position:"relative",padding:"8px 16px"}}))),e3=o((({children:e,...t})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(vf,{...t},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,e))),"Error");function t3({children:e,width:t,height:r,onEscapeKeyDown:n,onInteractOutside:a=o((u=>u.preventDefault()),"onInteractOutside"),className:i,container:c,portalSelector:l,...s}){let u=c??(l?document.querySelector(l):null)??document.body;return react__WEBPACK_IMPORTED_MODULE_0__.createElement(ul,{...s},react__WEBPACK_IMPORTED_MODULE_0__.createElement(fl,{container:u},react__WEBPACK_IMPORTED_MODULE_0__.createElement(dl,{asChild:!0},react__WEBPACK_IMPORTED_MODULE_0__.createElement(wl,null)),react__WEBPACK_IMPORTED_MODULE_0__.createElement(pl,{asChild:!0,onInteractOutside:a,onEscapeKeyDown:n},react__WEBPACK_IMPORTED_MODULE_0__.createElement(bl,{className:i,width:t,height:r},e))))}o(t3,"BaseModal");Object.assign(t3,yl,{Dialog:Eo}),storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div((({theme:e,col:t,row:r=1})=>t?{display:"inline-block",verticalAlign:"inherit","& > *":{marginLeft:t*e.layoutMargin,verticalAlign:"inherit"},[`& > *:first-child${storybook_theming__WEBPACK_IMPORTED_MODULE_1__.v_}`]:{marginLeft:0}}:{"& > *":{marginTop:r*e.layoutMargin},[`& > *:first-child${storybook_theming__WEBPACK_IMPORTED_MODULE_1__.v_}`]:{marginTop:0}}),(({theme:e,outer:t,col:r,row:n})=>{switch(!0){case!(!t||!r):return{marginLeft:t*e.layoutMargin,marginRight:t*e.layoutMargin};case!(!t||!n):return{marginTop:t*e.layoutMargin,marginBottom:t*e.layoutMargin};default:return{}}})),storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div((({theme:e})=>({fontWeight:e.typography.weight.bold}))),storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div(),storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div((({theme:e})=>({padding:30,textAlign:"center",color:e.color.defaultText,fontSize:e.typography.size.s2-1})));function h3(e,t){var r=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),n=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);n.current=t;var a=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((function(){i()}));var i=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((function(){var c=a.current,l=n.current,s=c||(l?l instanceof Element?l:l.current:null);r.current&&r.current.element===s&&r.current.subscriber===e||(r.current&&r.current.cleanup&&r.current.cleanup(),r.current={element:s,subscriber:e,cleanup:s?e(s):void 0})}),[e]);return(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((function(){return function(){r.current&&r.current.cleanup&&(r.current.cleanup(),r.current=null)}}),[]),(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((function(c){a.current=c,i()}),[i])}function bf(e,t,r){return e[t]?e[t][0]?e[t][0][r]:e[t][r]:"contentBoxSize"===t?e.contentRect["inlineSize"===r?"width":"height"]:void 0}function Co(e){void 0===e&&(e={});var t=e.onResize,r=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(void 0);r.current=t;var n=e.round||Math.round,a=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(),i=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)({width:void 0,height:void 0}),c=i[0],l=i[1],s=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(!1);(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((function(){return s.current=!1,function(){s.current=!0}}),[]);var u=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)({width:void 0,height:void 0}),f=h3((0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((function(d){return(!a.current||a.current.box!==e.box||a.current.round!==n)&&(a.current={box:e.box,round:n,instance:new ResizeObserver((function(m){var v=m[0],y="border-box"===e.box?"borderBoxSize":"device-pixel-content-box"===e.box?"devicePixelContentBoxSize":"contentBoxSize",p=bf(v,y,"inlineSize"),h=bf(v,y,"blockSize"),g=p?n(p):void 0,w=h?n(h):void 0;if(u.current.width!==g||u.current.height!==w){var b={width:g,height:w};u.current.width=g,u.current.height=w,r.current?r.current(b):s.current||l(b)}}))}),a.current.instance.observe(d,{box:e.box}),function(){a.current&&a.current.instance.unobserve(d)}}),[e.box,n]),e.ref);return(0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)((function(){return{ref:f,width:c.width,height:c.height}}),[f,c.width,c.height])}oo(),o(h3,"useResolvedElement"),o(bf,"extractSize"),o(Co,"useResizeObserver");var R3=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div((({centered:e=!1,scale:t=1,elementHeight:r})=>({height:r||"auto",transformOrigin:e?"center top":"left top",transform:`scale(${1/t})`})));function Rf({centered:e,scale:t,children:r}){let n=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),[a,i]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(0),c=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((({height:l})=>{l&&i(l/t)}),[t]);return(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{n.current&&i(n.current.getBoundingClientRect().height)}),[t]),Co({ref:n,onResize:c}),react__WEBPACK_IMPORTED_MODULE_0__.createElement(R3,{centered:e,scale:t,elementHeight:a},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{ref:n,className:"innerZoomElementWrapper"},r))}o(Rf,"ZoomElement");var Cl=class Cl extends react__WEBPACK_IMPORTED_MODULE_0__.Component{constructor(){super(...arguments),this.iframe=null}componentDidMount(){let{iFrameRef:r}=this.props;this.iframe=r.current}shouldComponentUpdate(r){let{scale:n,active:a}=this.props;return n!==r.scale&&this.setIframeInnerZoom(r.scale),a!==r.active&&this.iframe.setAttribute("data-is-storybook",r.active?"true":"false"),r.children.props.src!==this.props.children.props.src}setIframeInnerZoom(r){try{Object.assign(this.iframe.contentDocument.body.style,{width:100*r+"%",height:100*r+"%",transform:`scale(${1/r})`,transformOrigin:"top left"})}catch{this.setIframeZoom(r)}}setIframeZoom(r){Object.assign(this.iframe.style,{width:100*r+"%",height:100*r+"%",transform:`scale(${1/r})`,transformOrigin:"top left"})}render(){let{children:r}=this.props;return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,r)}};o(Cl,"ZoomIFrame");var E3={Element:Rf,IFrame:Cl},{document:C3}=_storybook_global__WEBPACK_IMPORTED_MODULE_5__.global,M3=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.strong((({theme:e})=>({color:e.color.orange}))),A3=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.strong((({theme:e})=>({color:e.color.ancillary,textDecoration:"underline"}))),Ef=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.em((({theme:e})=>({color:e.textMutedColor}))),L3=/(Error): (.*)\n/,I3=/at (?:(.*) )?\(?(.+)\)?/,z3=/([^@]+)?(?:\/<)?@(.+)?/,T3=/([^@]+)?@(.+)?/,H3=o((({error:e})=>{if(!e)return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,"This error has no stack or message");if(!e.stack)return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,e.message||"This error has no stack or message");let t=e.stack.toString();t&&e.message&&!t.includes(e.message)&&(t=`Error: ${e.message}\n\n${t}`);let r=t.match(L3);if(!r)return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,t);let[,n,a]=r,i=t.split(/\n/).slice(1),[,...c]=i.map((l=>{let s=l.match(I3)||l.match(z3)||l.match(T3);return s?{name:(s[1]||"").replace("/<",""),location:s[2].replace(C3.location.origin,"")}:null})).filter(Boolean);return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",null,n),": ",react__WEBPACK_IMPORTED_MODULE_0__.createElement(M3,null,a),react__WEBPACK_IMPORTED_MODULE_0__.createElement("br",null),c.map(((l,s)=>l?.name?react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,{key:s}," ","at ",react__WEBPACK_IMPORTED_MODULE_0__.createElement(A3,null,l.name)," (",react__WEBPACK_IMPORTED_MODULE_0__.createElement(Ef,null,l.location),")",react__WEBPACK_IMPORTED_MODULE_0__.createElement("br",null)):react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,{key:s}," ","at ",react__WEBPACK_IMPORTED_MODULE_0__.createElement(Ef,null,l?.location),react__WEBPACK_IMPORTED_MODULE_0__.createElement("br",null)))))}),"ErrorFormatter"),O3=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.input({appearance:"none",display:"grid",placeContent:"center",width:14,height:14,flexShrink:0,margin:0,border:`1px solid ${storybook_theming__WEBPACK_IMPORTED_MODULE_1__.yW.border}`,borderRadius:2,backgroundColor:"white",transition:"background-color 0.1s","&:enabled":{cursor:"pointer"},"&:disabled":{backgroundColor:storybook_theming__WEBPACK_IMPORTED_MODULE_1__.yW.medium},"&:disabled:checked, &:disabled:indeterminate":{backgroundColor:storybook_theming__WEBPACK_IMPORTED_MODULE_1__.yW.mediumdark},"&:checked, &:indeterminate":{backgroundColor:storybook_theming__WEBPACK_IMPORTED_MODULE_1__.yW.secondary},"&:checked::before":{content:'""',width:14,height:14,background:"no-repeat center url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' d='m3 7 2.5 2.5L11 4'/%3E%3C/svg%3E\")"},"&:indeterminate::before":{content:'""',width:8,height:2,background:"white"},"&:enabled:focus-visible":{outline:`1px solid ${storybook_theming__WEBPACK_IMPORTED_MODULE_1__.yW.secondary}`,outlineOffset:1}}),Sf=o((e=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(O3,{...e,type:"checkbox"})),"Checkbox"),B3=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.label((({theme:e})=>({display:"flex",borderBottom:`1px solid ${e.appBorderColor}`,margin:"0 15px",padding:"8px 0","&:last-child":{marginBottom:"3rem"}}))),N3=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.span((({theme:e})=>({minWidth:100,fontWeight:e.typography.weight.bold,marginRight:15,display:"flex",justifyContent:"flex-start",alignItems:"center",lineHeight:"16px"}))),Mf=o((({label:e,children:t,...r})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(B3,{...r},e?react__WEBPACK_IMPORTED_MODULE_0__.createElement(N3,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",null,e)):null,t)),"Field"),Or=o((({size:e})=>{switch(e){case"100%":return{width:"100%"};case"flex":return{flex:1};default:return{display:"inline"}}}),"sizes"),Ao=o((({align:e})=>{switch(e){case"end":return{textAlign:"right"};case"center":return{textAlign:"center"};default:return{textAlign:"left"}}}),"alignment"),Lo=o((({valid:e,theme:t})=>{switch(e){case"valid":return{boxShadow:`${t.color.positive} 0 0 0 1px inset !important`};case"error":return{boxShadow:`${t.color.negative} 0 0 0 1px inset !important`};case"warn":return{boxShadow:`${t.color.warning} 0 0 0 1px inset`};default:return{}}}),"validation"),F3={appearance:"none",border:"0 none",boxSizing:"inherit",display:" block",margin:" 0",background:"transparent",padding:0,fontSize:"inherit",position:"relative"},Io=o((({theme:e})=>({...F3,transition:"box-shadow 200ms ease-out, opacity 200ms ease-out",color:e.input.color||"inherit",background:e.input.background,boxShadow:`${e.input.border} 0 0 0 1px inset`,borderRadius:e.input.borderRadius,fontSize:e.typography.size.s2-1,lineHeight:"20px",padding:"6px 10px",boxSizing:"border-box",height:32,'&[type="file"]':{height:"auto"},"&:focus":{boxShadow:`${e.color.secondary} 0 0 0 1px inset`,outline:"none","@media (forced-colors: active)":{outline:"1px solid highlight"}},"&[disabled]":{cursor:"not-allowed",opacity:.5},"&:-webkit-autofill":{WebkitBoxShadow:`0 0 0 3em ${e.color.lightest} inset`},"&::placeholder":{color:e.textMutedColor,opacity:1}})),"styles"),Af=Object.assign((0,storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4)((0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(o((function({size:t,valid:r,align:n,...a},i){return react__WEBPACK_IMPORTED_MODULE_0__.createElement("input",{...a,ref:i})}),"Input")))(Io,Or,Ao,Lo,{minHeight:32}),{displayName:"Input"}),W3=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.input({appearance:"none",display:"grid",placeContent:"center",width:16,height:16,flexShrink:0,margin:-1,border:`1px solid ${storybook_theming__WEBPACK_IMPORTED_MODULE_1__.yW.border}`,borderRadius:8,backgroundColor:"white",transition:"background-color 0.1s","&:enabled":{cursor:"pointer"},"&:disabled":{backgroundColor:storybook_theming__WEBPACK_IMPORTED_MODULE_1__.yW.medium},"&:disabled:checked":{backgroundColor:storybook_theming__WEBPACK_IMPORTED_MODULE_1__.yW.mediumdark},"&:checked":{backgroundColor:storybook_theming__WEBPACK_IMPORTED_MODULE_1__.yW.secondary,boxShadow:"inset 0 0 0 2px white"},"&:enabled:focus-visible":{outline:`1px solid ${storybook_theming__WEBPACK_IMPORTED_MODULE_1__.yW.secondary}`,outlineOffset:1}}),Lf=o((e=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(W3,{...e,type:"radio"})),"Radio");function If(){try{return!!globalThis.__vitest_browser__||!!globalThis.window?.navigator?.userAgent?.match(/StorybookTestRunner/)}catch{return!1}}o(If,"isTestEnvironment");var G3=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.select(Or,(({theme:e})=>({appearance:"none",background:"calc(100% - 12px) center no-repeat url(\"data:image/svg+xml,%3Csvg width='8' height='4' viewBox='0 0 8 4' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.30303 0.196815C1.13566 0.0294472 0.864304 0.0294472 0.696937 0.196815C0.529569 0.364182 0.529569 0.635539 0.696937 0.802906L3.69694 3.80291C3.8643 3.97027 4.13566 3.97027 4.30303 3.80291L7.30303 0.802906C7.4704 0.635539 7.4704 0.364182 7.30303 0.196815C7.13566 0.0294473 6.8643 0.0294473 6.69694 0.196815L3.99998 2.89377L1.30303 0.196815Z' fill='%2373828C'/%3E%3C/svg%3E%0A\")",backgroundSize:10,padding:"6px 30px 6px 10px","@supports (appearance: base-select)":{appearance:"base-select",background:e.input.background,padding:"6px 10px"},transition:"box-shadow 200ms ease-out, opacity 200ms ease-out",color:e.input.color||"inherit",boxShadow:`${e.input.border} 0 0 0 1px inset`,borderRadius:e.input.borderRadius,fontSize:e.typography.size.s2-1,lineHeight:"20px",boxSizing:"border-box",border:"none",cursor:"pointer","& > button":{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",gap:8,"& > svg":{width:14,height:14,color:e.color.mediumdark}},"&:has(option:not([hidden]):checked)":{color:e.color.defaultText},"&:focus-visible, &:focus-within":{outline:"none",boxShadow:`${e.color.secondary} 0 0 0 1px inset`},"&::picker-icon":{display:"none"},"&::picker(select)":{appearance:"base-select",border:"1px solid #e4e4e7",padding:4,marginTop:4,background:"light"===e.base?(0,storybook_theming__WEBPACK_IMPORTED_MODULE_1__.a)(e.background.app):e.background.app,filter:"\n drop-shadow(0 5px 5px rgba(0,0,0,0.05))\n drop-shadow(0 0 3px rgba(0,0,0,0.1))\n ",borderRadius:e.appBorderRadius+2,fontSize:e.typography.size.s1,cursor:"default",transition:"opacity 100ms ease-in-out, transform 100ms ease-in-out",transformOrigin:"top",transform:"translateY(0)",opacity:1,"@starting-style":{transform:"translateY(-0.25rem) scale(0.95)",opacity:0}},"& optgroup label":{display:"block",padding:"3px 6px"},"& option":{lineHeight:"18px",padding:"7px 10px",borderRadius:4,outline:"none",cursor:"pointer",color:e.color.defaultText,"&::checkmark":{display:"none"},"&:hover, &:focus-visible":{backgroundColor:e.background.hoverable},"&:checked":{color:e.color.secondary,fontWeight:e.typography.weight.bold},"&:disabled":{backgroundColor:"transparent",cursor:"default",color:e.color.defaultText}}}))),zf=o((({children:e,...t})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(G3,{...t},!If()&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("button",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("selectedcontent",null),react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("path",{d:"m6 9 6 6 6-6"}))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("optgroup",null,e))),"Select");en(),Fn();var Tf=react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect,Hf=o((function(t){var r=react__WEBPACK_IMPORTED_MODULE_0__.useRef(t);return Tf((function(){r.current=t})),r}),"useLatest"),kf=o((function(t,r){"function"!=typeof t?t.current=r:t(r)}),"updateRef"),Of=o((function(t,r){var n=react__WEBPACK_IMPORTED_MODULE_0__.useRef();return react__WEBPACK_IMPORTED_MODULE_0__.useCallback((function(a){t.current=a,n.current&&kf(n.current,null),n.current=r,r&&kf(r,a)}),[r])}),"useComposedRef"),Bf={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},Nf=o((function(t){Object.keys(Bf).forEach((function(r){t.style.setProperty(r,Bf[r],"important")}))}),"forceHiddenStyles"),Ee=null,Ff=o((function(t,r){var n=t.scrollHeight;return"border-box"===r.sizingStyle.boxSizing?n+r.borderSize:n-r.paddingSize}),"getHeight");function K3(e,t,r,n){void 0===r&&(r=1),void 0===n&&(n=1/0),Ee||((Ee=document.createElement("textarea")).setAttribute("tabindex","-1"),Ee.setAttribute("aria-hidden","true"),Nf(Ee)),null===Ee.parentNode&&document.body.appendChild(Ee);var a=e.paddingSize,i=e.borderSize,c=e.sizingStyle,l=c.boxSizing;Object.keys(c).forEach((function(m){var v=m;Ee.style[v]=c[v]})),Nf(Ee),Ee.value=t;var s=Ff(Ee,e);Ee.value=t,s=Ff(Ee,e),Ee.value="x";var u=Ee.scrollHeight-a,f=u*r;"border-box"===l&&(f=f+a+i),s=Math.max(f,s);var d=u*n;return"border-box"===l&&(d=d+a+i),[s=Math.min(d,s),u]}o(K3,"calculateNodeHeight");var Df=o((function(){}),"noop"),J3=o((function(t,r){return t.reduce((function(n,a){return n[a]=r[a],n}),{})}),"pick"),Q3=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],e7=!!document.documentElement.currentStyle,r7=o((function(t){var r=window.getComputedStyle(t);if(null===r)return null;var n=J3(Q3,r),a=n.boxSizing;return""===a?null:(e7&&"border-box"===a&&(n.width=parseFloat(n.width)+parseFloat(n.borderRightWidth)+parseFloat(n.borderLeftWidth)+parseFloat(n.paddingRight)+parseFloat(n.paddingLeft)+"px"),{sizingStyle:n,paddingSize:parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),borderSize:parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth)})}),"getSizingData");function Ll(e,t,r){var n=Hf(r);react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect((function(){var a=o((function(c){return n.current(c)}),"handler");if(e)return e.addEventListener(t,a),function(){return e.removeEventListener(t,a)}}),[])}o(Ll,"useListener");var n7=o((function(t,r){Ll(document.body,"reset",(function(n){t.current.form===n.target&&r(n)}))}),"useFormResetListener"),o7=o((function(t){Ll(window,"resize",t)}),"useWindowResizeListener"),a7=o((function(t){Ll(document.fonts,"loadingdone",t)}),"useFontsLoadedListener"),i7=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],l7=o((function(t,r){var n=t.cacheMeasurements,a=t.maxRows,i=t.minRows,c=t.onChange,l=void 0===c?Df:c,s=t.onHeightChange,u=void 0===s?Df:s,f=pr(t,i7),d=void 0!==f.value,m=react__WEBPACK_IMPORTED_MODULE_0__.useRef(null),v=Of(m,r),y=react__WEBPACK_IMPORTED_MODULE_0__.useRef(0),p=react__WEBPACK_IMPORTED_MODULE_0__.useRef(),h=o((function(){var b=m.current,x=n&&p.current?p.current:r7(b);if(x){p.current=x;var E=K3(x,b.value||b.placeholder||"x",i,a),R=E[0],S=E[1];y.current!==R&&(y.current=R,b.style.setProperty("height",R+"px","important"),u(R,{rowHeight:S}))}}),"resizeTextarea"),g=o((function(b){d||h(),l(b)}),"handleChange");return react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect(h),n7(m,(function(){if(!d){var w=m.current.value;requestAnimationFrame((function(){var b=m.current;b&&w!==b.value&&h()}))}})),o7(h),a7(h),react__WEBPACK_IMPORTED_MODULE_0__.createElement("textarea",W({},f,{onChange:g,ref:v}))}),"TextareaAutosize"),_f=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(l7),Vf=Object.assign((0,storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4)((0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(o((function({size:t,valid:r,align:n,...a},i){return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_f,{...a,ref:i})}),"Textarea")))(Io,Or,Ao,Lo,(({height:e=400})=>({overflow:"visible",maxHeight:e}))),{displayName:"Textarea"}),d7=Object.assign(storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.form({boxSizing:"border-box",width:"100%"}),{Field:Mf,Input:Af,Select:zf,Textarea:Vf,Button:Hr,Checkbox:Sf,Radio:Lf}),s6=(0,react__WEBPACK_IMPORTED_MODULE_0__.lazy)((()=>Promise.resolve().then((()=>(Wo(),i0))).then((e=>({default:e.WithTooltip}))))),u6=o((e=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Suspense,{fallback:react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null)},react__WEBPACK_IMPORTED_MODULE_0__.createElement(s6,{...e}))),"WithTooltip"),f6=(0,react__WEBPACK_IMPORTED_MODULE_0__.lazy)((()=>Promise.resolve().then((()=>(Wo(),i0))).then((e=>({default:e.WithTooltipPure}))))),d6=o((e=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Suspense,{fallback:react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null)},react__WEBPACK_IMPORTED_MODULE_0__.createElement(f6,{...e}))),"WithTooltipPure"),R6=(storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div((({theme:e})=>({fontWeight:e.typography.weight.bold}))),storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.span(),storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div((({theme:e})=>({marginTop:8,textAlign:"center","> *":{margin:"0 8px",fontWeight:e.typography.weight.bold}}))),storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div((({theme:e})=>({color:e.color.defaultText,lineHeight:"18px"}))),storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div({padding:15,width:280,boxSizing:"border-box"}),storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div((({theme:e})=>({padding:"2px 6px",lineHeight:"16px",fontSize:10,fontWeight:e.typography.weight.bold,color:e.color.lightest,boxShadow:"0 0 5px 0 rgba(0, 0, 0, 0.3)",borderRadius:4,whiteSpace:"nowrap",pointerEvents:"none",zIndex:-1,background:"light"===e.base?"rgba(60, 60, 60, 0.9)":"rgba(0, 0, 0, 0.95)",margin:6})))),x6=o((({note:e,...t})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(R6,{...t},e)),"TooltipNote"),rp=ge(rn(),1),E6=(0,storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4)((({active:e,loading:t,disabled:r,...n})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",{...n})))((({theme:e})=>({color:e.color.defaultText,fontWeight:e.typography.weight.regular})),(({active:e,theme:t})=>e?{color:t.color.secondary,fontWeight:t.typography.weight.bold}:{}),(({loading:e,theme:t})=>e?{display:"inline-block",flex:"none",...t.animation.inlineGlow}:{}),(({disabled:e,theme:t})=>e?{color:t.textMutedColor}:{})),S6=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.span({display:"flex","& svg":{height:12,width:12,margin:"3px 0",verticalAlign:"top"},"& path":{fill:"inherit"}}),C6=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.span({flex:1,textAlign:"left",display:"flex",flexDirection:"column"},(({isIndented:e})=>e?{marginLeft:24}:{})),M6=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.span((({theme:e})=>({fontSize:"11px",lineHeight:"14px"})),(({active:e,theme:t})=>e?{color:t.color.secondary}:{}),(({theme:e,disabled:t})=>t?{color:e.textMutedColor}:{})),A6=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.span((({active:e,theme:t})=>e?{color:t.color.secondary}:{}),(()=>({display:"flex",maxWidth:14}))),L6=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div((({theme:e})=>({width:"100%",border:"none",borderRadius:e.appBorderRadius,background:"none",fontSize:e.typography.size.s1,transition:"all 150ms ease-out",color:e.color.dark,textDecoration:"none",justifyContent:"space-between",lineHeight:"18px",padding:"7px 10px",display:"flex",alignItems:"center","& > * + *":{paddingLeft:10}})),(({theme:e,href:t,onClick:r})=>(t||r)&&{cursor:"pointer","&:hover":{background:e.background.hoverable},"&:hover svg":{opacity:1}}),(({theme:e,as:t})=>"label"===t&&{"&:has(input:not(:disabled))":{cursor:"pointer","&:hover":{background:e.background.hoverable}}}),(({disabled:e})=>e&&{cursor:"not-allowed"})),I6=(0,rp.default)(100)((({onClick:e,input:t,href:r,LinkWrapper:n})=>({...e&&{as:"button",onClick:e},...t&&{as:"label"},...r&&{as:"a",href:r,...n&&{as:n,to:r}}}))),l0=o((e=>{let{loading:t=!1,title:r=react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",null,"Loading state"),center:n=null,right:a=null,active:i=!1,disabled:c=!1,isIndented:l=!1,href:s,onClick:u,icon:f,input:d,LinkWrapper:m,...v}=e,y={active:i,disabled:c},p=I6(e),h=f||d;return react__WEBPACK_IMPORTED_MODULE_0__.createElement(L6,{...v,...y,...p},react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,h&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(A6,{...y},h),r||n?react__WEBPACK_IMPORTED_MODULE_0__.createElement(C6,{isIndented:l&&!h},r&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(E6,{...y,loading:t},r),n&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(M6,{...y},n)):null,a&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(S6,{...y},a)))}),"ListItem"),P6=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div({minWidth:180,overflow:"hidden",overflowY:"auto",maxHeight:504},(({theme:e})=>({borderRadius:e.appBorderRadius+2})),(({theme:e})=>"dark"===e.base?{background:e.background.content}:{})),k6=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div((({theme:e})=>({padding:4,"& + &":{borderTop:`1px solid ${e.appBorderColor}`}}))),O6=o((({id:e,onClick:t,...r})=>{let{active:n,disabled:a,title:i,href:c}=r,l=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((s=>t?.(s,{id:e,active:n,disabled:a,title:i,href:c})),[t,e,n,a,i,c]);return react__WEBPACK_IMPORTED_MODULE_0__.createElement(l0,{id:`list-item-${e}`,...r,...t&&{onClick:l}})}),"Item"),c0=o((({links:e,LinkWrapper:t,...r})=>{let n=Array.isArray(e[0])?e:[e],a=n.some((i=>i.some((c=>"icon"in c&&c.icon||"input"in c&&c.input))));return react__WEBPACK_IMPORTED_MODULE_0__.createElement(P6,{...r},n.filter((i=>i.length)).map(((i,c)=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(k6,{key:i.map((l=>l.id)).join(`~${c}~`)},i.map((l=>"content"in l?react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,{key:l.id},l.content):react__WEBPACK_IMPORTED_MODULE_0__.createElement(O6,{key:l.id,isIndented:a,LinkWrapper:t,...l})))))))}),"TooltipLinkList");oo();var s0=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div({display:"flex",whiteSpace:"nowrap",flexBasis:"auto",marginLeft:3,marginRight:10},(({scrollable:e})=>e?{flexShrink:0}:{}),(({left:e})=>e?{"& > *":{marginLeft:4}}:{}),(({right:e})=>e?{gap:6}:{}));s0.displayName="Side";var N6=o((({children:e,className:t,scrollable:r})=>r?react__WEBPACK_IMPORTED_MODULE_0__.createElement(Er,{vertical:!1,className:t},e):react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:t},e)),"UnstyledBar"),f0=(0,storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4)(N6)((({backgroundColor:e,theme:t,scrollable:r=!0})=>({color:t.barTextColor,width:"100%",minHeight:40,flexShrink:0,scrollbarColor:`${t.barTextColor} ${e||t.barBg}`,scrollbarWidth:"thin",overflow:r?"auto":"hidden",overflowY:"hidden"})),(({theme:e,border:t=!1})=>t?{boxShadow:`${e.appBorderColor} 0 -1px 0 0 inset`,background:e.barBg}:{}));f0.displayName="Bar";var F6=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div((({bgColor:e})=>({display:"flex",justifyContent:"space-between",position:"relative",flexWrap:"nowrap",flexShrink:0,height:40,backgroundColor:e||""}))),Uo=o((({children:e,backgroundColor:t,className:r,...n})=>{let[a,i]=react__WEBPACK_IMPORTED_MODULE_0__.Children.toArray(e);return react__WEBPACK_IMPORTED_MODULE_0__.createElement(f0,{backgroundColor:t,className:`sb-bar ${r}`,...n},react__WEBPACK_IMPORTED_MODULE_0__.createElement(F6,{bgColor:t},react__WEBPACK_IMPORTED_MODULE_0__.createElement(s0,{scrollable:n.scrollable,left:!0},a),i?react__WEBPACK_IMPORTED_MODULE_0__.createElement(s0,{right:!0},i):null))}),"FlexBar");Uo.displayName="FlexBar";var $6=o((e=>"string"==typeof e.props.href),"isLink"),j6=o((e=>"string"!=typeof e.props.href),"isButton");function W6({children:e,...t},r){let n={props:t,ref:r};if($6(n))return react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{ref:n.ref,...n.props},e);if(j6(n))return react__WEBPACK_IMPORTED_MODULE_0__.createElement("button",{ref:n.ref,type:"button",...n.props},e);throw new Error("invalid props")}o(W6,"ForwardRefFunction");var ap=(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(W6);ap.displayName="ButtonOrLink";var cr=(0,storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4)(ap,{shouldForwardProp:storybook_theming__WEBPACK_IMPORTED_MODULE_1__.EG})({whiteSpace:"normal",display:"inline-flex",overflow:"hidden",verticalAlign:"top",justifyContent:"center",alignItems:"center",textAlign:"center",textDecoration:"none","&:empty":{display:"none"},"&[hidden]":{display:"none"}},(({theme:e})=>({padding:"0 15px",transition:"color 0.2s linear, border-bottom-color 0.2s linear",height:40,lineHeight:"12px",cursor:"pointer",background:"transparent",border:"0 solid transparent",borderTop:"3px solid transparent",borderBottom:"3px solid transparent",fontWeight:"bold",fontSize:13,"&:focus":{outline:"0 none",borderBottomColor:e.barSelectedColor}})),(({active:e,textColor:t,theme:r})=>e?{color:t||r.barSelectedColor,borderBottomColor:r.barSelectedColor}:{color:t||r.barTextColor,borderBottomColor:"transparent","&:hover":{color:r.barHoverColor}}));cr.displayName="TabButton";var U6=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div((({theme:e})=>({height:"100%",display:"flex",padding:30,alignItems:"center",justifyContent:"center",flexDirection:"column",gap:15,background:e.background.content}))),q6=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div({display:"flex",flexDirection:"column",gap:4,maxWidth:415}),G6=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div((({theme:e})=>({fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s2-1,textAlign:"center",color:e.textColor}))),Y6=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div((({theme:e})=>({fontWeight:e.typography.weight.regular,fontSize:e.typography.size.s2-1,textAlign:"center",color:e.textMutedColor}))),Yo=o((({title:e,description:t,footer:r})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(U6,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement(q6,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement(G6,null,e),t&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(Y6,null,t)),r)),"EmptyTabContent"),d0=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div((({active:e})=>e?{display:"block"}:{display:"none"})),ip=o((e=>react__WEBPACK_IMPORTED_MODULE_0__.Children.toArray(e).map((({props:{title:t,id:r,color:n,children:a}})=>{let i=Array.isArray(a)?a[0]:a;return{title:t,id:r,...n?{color:n}:{},render:"function"==typeof i?i:({active:l})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(d0,{active:l,role:"tabpanel"},i)}}))),"childrenToList");Wo();var ew=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.span((({theme:e,isActive:t})=>({display:"inline-block",width:0,height:0,marginLeft:8,color:t?e.color.secondary:e.color.mediumdark,borderRight:"3px solid transparent",borderLeft:"3px solid transparent",borderTop:"3px solid",transition:"transform .1s ease-out"}))),tw=(0,storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4)(cr)((({active:e,theme:t,preActive:r})=>`\n color: ${r||e?t.barSelectedColor:t.barTextColor};\n .addon-collapsible-icon {\n color: ${r||e?t.barSelectedColor:t.barTextColor};\n }\n &:hover {\n color: ${t.barHoverColor};\n .addon-collapsible-icon {\n color: ${t.barHoverColor};\n }\n }\n `));function sp(e){let t=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(),r=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(),n=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(new Map),{width:a=1}=Co({ref:t}),[i,c]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(e),[l,s]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]),u=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(e),f=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((({menuName:m,actions:v})=>{let y=l.some((({active:g})=>g)),[p,h]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1);return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement(a0,{interactive:!0,visible:p,onVisibleChange:h,placement:"bottom",delayHide:100,tooltip:react__WEBPACK_IMPORTED_MODULE_0__.createElement(c0,{links:l.map((({title:g,id:w,color:b,active:x})=>({id:w,title:g,color:b,active:x,onClick:o((E=>{E.preventDefault(),v.onSelect(w)}),"onClick")})))})},react__WEBPACK_IMPORTED_MODULE_0__.createElement(tw,{id:"addons-menu-button",ref:r,active:y,preActive:p,style:{visibility:l.length?"visible":"hidden"},"aria-hidden":!l.length,className:"tabbutton",type:"button",role:"tab"},m,react__WEBPACK_IMPORTED_MODULE_0__.createElement(ew,{className:"addon-collapsible-icon",isActive:y||p}))),l.map((({title:g,id:w,color:b},x)=>{let E=`index-${x}`;return react__WEBPACK_IMPORTED_MODULE_0__.createElement(cr,{id:`tabbutton-${(0,storybook_internal_csf__WEBPACK_IMPORTED_MODULE_6__.aj)(w)??E}`,style:{visibility:"hidden"},"aria-hidden":!0,tabIndex:-1,ref:R=>{n.current.set(w,R)},className:"tabbutton",type:"button",key:w,textColor:b,role:"tab"},g)})))}),[l]),d=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((()=>{if(!t.current||!r.current)return;let{x:m,width:v}=t.current.getBoundingClientRect(),{width:y}=r.current.getBoundingClientRect(),p=l.length?m+v-y:m+v,h=[],g=0,w=e.filter((b=>{let{id:x}=b,E=n.current.get(x),{width:R=0}=E?.getBoundingClientRect()||{},S=m+g+R>p;return(!S||!E)&&h.push(b),g+=R,S}));(h.length!==i.length||u.current!==e)&&(c(h),s(w),u.current=e)}),[l.length,e,i]);return(0,react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect)(d,[d,a]),{tabRefs:n,addonsRef:r,tabBarRef:t,visibleList:i,invisibleList:l,AddonTab:f}}o(sp,"useList");var iw=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div((({theme:e,bordered:t})=>t?{backgroundClip:"padding-box",border:`1px solid ${e.appBorderColor}`,borderRadius:e.appBorderRadius,overflow:"hidden",boxSizing:"border-box"}:{}),(({absolute:e})=>e?{width:"100%",height:"100%",boxSizing:"border-box",display:"flex",flexDirection:"column"}:{display:"block"})),v0=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div({overflow:"hidden","&:first-of-type":{marginLeft:-3},whiteSpace:"nowrap",flexGrow:1});v0.displayName="TabBar";var lw=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div({display:"block",position:"relative",container:"tab-content / inline-size"},(({theme:e})=>({fontSize:e.typography.size.s2-1,background:e.background.content})),(({bordered:e,theme:t})=>e?{borderRadius:`0 0 ${t.appBorderRadius-1}px ${t.appBorderRadius-1}px`}:{}),(({absolute:e,bordered:t})=>e?{height:`calc(100% - ${t?42:40}px)`,position:"absolute",left:0+(t?1:0),right:0+(t?1:0),bottom:0+(t?1:0),top:40+(t?1:0),overflow:"auto","& > *:first-child/* emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason */":{position:"absolute",left:0+(t?1:0),right:0+(t?1:0),bottom:0+(t?1:0),top:0+(t?1:0),height:`calc(100% - ${t?2:0}px)`,overflow:"auto"}}:{})),b0=class b0 extends react__WEBPACK_IMPORTED_MODULE_0__.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,r){console.error("Error rendering addon panel"),console.error(t),console.error(r.componentStack)}render(){return this.state.hasError&&this.props.active?react__WEBPACK_IMPORTED_MODULE_0__.createElement(Yo,{title:"This addon has errors",description:"Check your browser logs and addon code to pinpoint what went wrong. This issue was not caused by Storybook."}):this.props.children}};o(b0,"TabErrorBoundary");var m0=b0,w0=(0,react__WEBPACK_IMPORTED_MODULE_0__.memo)((({children:e,selected:t=null,actions:r,absolute:n=!1,bordered:a=!1,tools:i=null,backgroundColor:c,id:l=null,menuName:s="Tabs",emptyState:u,showToolsWhenEmpty:f})=>{let d=(0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)((()=>ip(e).map(((g,w)=>({...g,active:t?g.id===t:0===w})))),[e,t]),{visibleList:m,tabBarRef:v,tabRefs:y,AddonTab:p}=sp(d),h=u??react__WEBPACK_IMPORTED_MODULE_0__.createElement(Yo,{title:"Nothing found"});return f||0!==d.length?react__WEBPACK_IMPORTED_MODULE_0__.createElement(iw,{absolute:n,bordered:a,id:l},react__WEBPACK_IMPORTED_MODULE_0__.createElement(Uo,{scrollable:!1,border:!0,backgroundColor:c},react__WEBPACK_IMPORTED_MODULE_0__.createElement(v0,{style:{whiteSpace:"normal"},ref:v,role:"tablist"},m.map((({title:g,id:w,active:b,color:x},E)=>{let R=`index-${E}`;return react__WEBPACK_IMPORTED_MODULE_0__.createElement(cr,{id:`tabbutton-${(0,storybook_internal_csf__WEBPACK_IMPORTED_MODULE_6__.aj)(w)??R}`,ref:S=>{y.current.set(w,S)},className:"tabbutton "+(b?"tabbutton-active":""),type:"button",key:w,active:b,textColor:x,onClick:S=>{S.preventDefault(),r.onSelect(w)},role:"tab"},"function"==typeof g?react__WEBPACK_IMPORTED_MODULE_0__.createElement("title",null):g)})),react__WEBPACK_IMPORTED_MODULE_0__.createElement(p,{menuName:s,actions:r})),i),react__WEBPACK_IMPORTED_MODULE_0__.createElement(lw,{id:"panel-tab-content",bordered:a,absolute:n},d.length?d.map((({id:g,active:w,render:b})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(m0,{key:g,active:w},react__WEBPACK_IMPORTED_MODULE_0__.createElement(b,{active:w},null)))):h)):h}));w0.displayName="Tabs";var Zo=class Zo extends react__WEBPACK_IMPORTED_MODULE_0__.Component{constructor(r){super(r),this.handlers={onSelect:o((r=>this.setState({selected:r})),"onSelect")},this.state={selected:r.initial}}render(){let{bordered:r=!1,absolute:n=!1,children:a,backgroundColor:i,menuName:c}=this.props,{selected:l}=this.state;return react__WEBPACK_IMPORTED_MODULE_0__.createElement(w0,{bordered:r,absolute:n,selected:l,backgroundColor:i,menuName:c,actions:this.handlers},a)}};o(Zo,"TabsState"),Zo.defaultProps={children:[],initial:null,absolute:!1,bordered:!1,backgroundColor:"",menuName:void 0};var h0=Zo,y0=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.span((({theme:e})=>({width:1,height:20,background:e.appBorderColor,marginLeft:2,marginRight:2})),(({force:e})=>e?{}:{"& + &":{display:"none"}}));y0.displayName="Separator";var dp=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.i7` + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +`,xw=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div((({size:e=32})=>({borderRadius:"50%",cursor:"progress",display:"inline-block",overflow:"hidden",position:"absolute",transition:"all 200ms ease-out",verticalAlign:"top",top:"50%",left:"50%",marginTop:-e/2,marginLeft:-e/2,height:e,width:e,zIndex:4,borderWidth:2,borderStyle:"solid",borderColor:"rgba(97, 97, 97, 0.29)",borderTopColor:"rgb(100,100,100)",animation:`${dp} 0.7s linear infinite`,mixBlendMode:"difference"}))),pp=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div({position:"absolute",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"}),Ew=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div((({theme:e})=>({position:"relative",width:"80%",marginBottom:"0.75rem",maxWidth:300,height:5,borderRadius:5,background:ye(.8,e.color.secondary),overflow:"hidden",cursor:"progress"}))),Sw=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div((({theme:e})=>({position:"absolute",top:0,left:0,height:"100%",background:e.color.secondary}))),mp=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div((({theme:e})=>({minHeight:"2em",fontSize:`${e.typography.size.s1}px`,color:e.textMutedColor}))),Cw=(0,storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4)(G5)((({theme:e})=>({width:20,height:20,marginBottom:"0.5rem",color:e.textMutedColor}))),Mw=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.i7` + from { content: "..." } + 33% { content: "." } + 66% { content: ".." } + to { content: "..." } +`,Aw=storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.span({"&::after":{content:"'...'",animation:`${Mw} 1s linear infinite`,animationDelay:"1s",display:"inline-block",width:"1em",height:"auto"}}),Lw=o((({progress:e,error:t,size:r,...n})=>{if(t)return react__WEBPACK_IMPORTED_MODULE_0__.createElement(pp,{"aria-label":t.toString(),"aria-live":"polite",role:"status",...n},react__WEBPACK_IMPORTED_MODULE_0__.createElement(Cw,null),react__WEBPACK_IMPORTED_MODULE_0__.createElement(mp,null,t.message));if(e){let{value:a,modules:i}=e,{message:c}=e;return i&&(c+=` ${i.complete} / ${i.total} modules`),react__WEBPACK_IMPORTED_MODULE_0__.createElement(pp,{"aria-label":"Content is loading...","aria-live":"polite","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":100*a,"aria-valuetext":c,role:"progressbar",...n},react__WEBPACK_IMPORTED_MODULE_0__.createElement(Ew,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement(Sw,{style:{width:100*a+"%"}})),react__WEBPACK_IMPORTED_MODULE_0__.createElement(mp,null,c,a<1&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(Aw,{key:c})))}return react__WEBPACK_IMPORTED_MODULE_0__.createElement(xw,{"aria-label":"Content is loading...","aria-live":"polite",role:"status",size:r,...n})}),"Loader"),zw=(0,storybook_theming__WEBPACK_IMPORTED_MODULE_1__.i7)({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}});storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.div((({size:e})=>({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",minWidth:e,minHeight:e}))),storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.svg((({size:e,width:t})=>({position:"absolute",width:`${e}px!important`,height:`${e}px!important`,transform:"rotate(-90deg)",circle:{r:(e-Math.ceil(t))/2,cx:e/2,cy:e/2,opacity:.15,fill:"transparent",stroke:"currentColor",strokeWidth:t,strokeLinecap:"round",strokeDasharray:Math.PI*(e-Math.ceil(t))}})),(({progress:e})=>e&&{circle:{opacity:.75}}),(({spinner:e})=>e&&{animation:`${zw} 1s linear infinite`,circle:{opacity:.25}}));function Hw(e){let t={},r=e.split("&");for(let n=0;n{let[n,a]=e.split("?"),i=a?{...Hw(a),...r,id:t}:{...r,id:t};return`${n}?${Object.entries(i).map((c=>`${c[0]}=${c[1]}`)).join("&")}`}),"getStoryHref"),qO=(storybook_theming__WEBPACK_IMPORTED_MODULE_1__.I4.pre` + line-height: 18px; + padding: 11px 1rem; + white-space: pre-wrap; + background: rgba(0, 0, 0, 0.05); + color: ${storybook_theming__WEBPACK_IMPORTED_MODULE_1__.yW.darkest}; + border-radius: 3px; + margin: 1rem 0; + width: 100%; + display: block; + overflow: hidden; + font-family: ${storybook_theming__WEBPACK_IMPORTED_MODULE_1__.Il.fonts.mono}; + font-size: ${storybook_theming__WEBPACK_IMPORTED_MODULE_1__.Il.size.s2-1}px; +`,Ai),Vw={};Object.keys(Ai).forEach((e=>{Vw[e]=(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(((t,r)=>(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(e,{...t,ref:r})))}))},"./node_modules/storybook/dist/csf/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{F3:()=>uc,K_:()=>rc,hX:()=>csf_Xr,bU:()=>oc,aj:()=>csf_jn,bE:()=>cc,Lr:()=>lc});var external_STORYBOOK_MODULE_GLOBAL_=__webpack_require__("@storybook/global"),external_STORYBOOK_MODULE_CHANNELS_=__webpack_require__("storybook/internal/channels"),external_STORYBOOK_MODULE_CLIENT_LOGGER_=__webpack_require__("storybook/internal/client-logger"),external_STORYBOOK_MODULE_CORE_EVENTS_=__webpack_require__("storybook/internal/core-events"),external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_=__webpack_require__("storybook/internal/preview-errors"),external_STORYBOOK_MODULE_PREVIEW_API_=__webpack_require__("storybook/preview-api"),external_STORYBOOK_MODULE_TEST_=__webpack_require__("storybook/test"),lr=Object.defineProperty,i=(e,t)=>lr(e,"name",{value:t,configurable:!0}),mr=Object.entries({reset:[0,0],bold:[1,22,""],dim:[2,22,""],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]});function Ge(e){return String(e)}function Ft(e=!1){let t=typeof process<"u"?process:void 0,n=t?.env||{},r=t?.argv||[];return!("NO_COLOR"in n||r.includes("--no-color"))&&("FORCE_COLOR"in n||r.includes("--color")||"win32"===t?.platform||e&&"dumb"!==n.TERM||"CI"in n)||typeof window<"u"&&!!window.chrome}function jt(e=!1){let t=Ft(e),n=i(((c,a,u,m)=>{let p="",l=0;do{p+=c.substring(l,m)+u,l=m+a.length,m=c.indexOf(a,l)}while(~m);return p+c.substring(l)}),"i"),r=i(((c,a,u=c)=>{let m=i((p=>{let l=String(p),b=l.indexOf(a,c.length);return~b?c+n(l,a,u,b)+a:c+l+a}),"o");return m.open=c,m.close=a,m}),"g"),o={isColorSupported:t},s=i((c=>`[${c}m`),"d");for(let[c,a]of mr)o[c]=t?r(s(a[0]),s(a[1]),a[2]):Ge;return o}i(Ge,"a"),Ge.open="",Ge.close="",i(Ft,"C"),i(jt,"p");var v=jt();function Xt(e,t){return t.forEach((function(n){n&&"string"!=typeof n&&!Array.isArray(n)&&Object.keys(n).forEach((function(r){if("default"!==r&&!(r in e)){var o=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,o.get?o:{enumerable:!0,get:i((function(){return n[r]}),"get")})}}))})),Object.freeze(e)}function pr(e,t){let n=Object.keys(e),r=null===t?n:n.sort(t);if(Object.getOwnPropertySymbols)for(let o of Object.getOwnPropertySymbols(e))Object.getOwnPropertyDescriptor(e,o).enumerable&&r.push(o);return r}function Ee(e,t,n,r,o,s,c=": "){let a="",u=0,m=e.next();if(!m.done){a+=t.spacingOuter;let p=n+t.indent;for(;!m.done;){if(a+=p,u++===t.maxWidth){a+="…";break}a+=s(m.value[0],t,p,r,o)+c+s(m.value[1],t,p,r,o),m=e.next(),m.done?t.min||(a+=","):a+=`,${t.spacingInner}`}a+=t.spacingOuter+n}return a}function Qe(e,t,n,r,o,s){let c="",a=0,u=e.next();if(!u.done){c+=t.spacingOuter;let m=n+t.indent;for(;!u.done;){if(c+=m,a++===t.maxWidth){c+="…";break}c+=s(u.value,t,m,r,o),u=e.next(),u.done?t.min||(c+=","):c+=`,${t.spacingInner}`}c+=t.spacingOuter+n}return c}function Ae(e,t,n,r,o,s){let c="";e=e instanceof ArrayBuffer?new DataView(e):e;let a=i((m=>m instanceof DataView),"isDataView"),u=a(e)?e.byteLength:e.length;if(u>0){c+=t.spacingOuter;let m=n+t.indent;for(let p=0;p0){c+=t.spacingOuter;let u=n+t.indent;for(let m=0;m{let c=e.toString();if("ArrayContaining"===c||"ArrayNotContaining"===c)return++r>t.maxDepth?`[${c}]`:`${c+" "}[${Ae(e.sample,t,n,r,o,s)}]`;if("ObjectContaining"===c||"ObjectNotContaining"===c)return++r>t.maxDepth?`[${c}]`:`${c+" "}{${ve(e.sample,t,n,r,o,s)}}`;if("StringMatching"===c||"StringNotMatching"===c||"StringContaining"===c||"StringNotContaining"===c)return c+" "+s(e.sample,t,n,r,o);if("function"!=typeof e.toAsymmetricMatcher)throw new TypeError(`Asymmetric matcher ${e.constructor.name} does not implement toAsymmetricMatcher()`);return e.toAsymmetricMatcher()}),"serialize$5"),dr=i((e=>e&&e.$$typeof===gr),"test$5"),yr={serialize:hr,test:dr},Zt=new Set(["DOMStringMap","NamedNodeMap"]),Sr=/^(?:HTML\w*Collection|NodeList)$/;function Er(e){return Zt.has(e)||Sr.test(e)}i(Er,"testName");var _r=i((e=>e&&e.constructor&&!!e.constructor.name&&Er(e.constructor.name)),"test$4");function Tr(e){return"NamedNodeMap"===e.constructor.name}i(Tr,"isNamedNodeMap");var Cr=i(((e,t,n,r,o,s)=>{let c=e.constructor.name;return++r>t.maxDepth?`[${c}]`:(t.min?"":c+" ")+(Zt.has(c)?`{${ve(Tr(e)?[...e].reduce(((a,u)=>(a[u.name]=u.value,a)),{}):{...e},t,n,r,o,s)}}`:`[${Ae([...e],t,n,r,o,s)}]`)}),"serialize$4"),Or={serialize:Cr,test:_r};function Qt(e){return e.replaceAll("<","<").replaceAll(">",">")}function et(e,t,n,r,o,s,c){let a=r+n.indent,u=n.colors;return e.map((m=>{let p=t[m],l=c(p,n,a,o,s);return"string"!=typeof p&&(l.includes("\n")&&(l=n.spacingOuter+a+l+n.spacingOuter+r),l=`{${l}}`),`${n.spacingInner+r+u.prop.open+m+u.prop.close}=${u.value.open}${l}${u.value.close}`})).join("")}function tt(e,t,n,r,o,s){return e.map((c=>t.spacingOuter+n+("string"==typeof c?vt(c,t):s(c,t,n,r,o)))).join("")}function vt(e,t){let n=t.colors.content;return n.open+Qt(e)+n.close}function $r(e,t){let n=t.colors.comment;return`${n.open}\x3c!--${Qt(e)}--\x3e${n.close}`}function nt(e,t,n,r,o){let s=r.colors.tag;return`${s.open}<${e}${t&&s.close+t+r.spacingOuter+o+s.open}${n?`>${s.close}${n}${r.spacingOuter}${o}${s.open}${s.close}`}function rt(e,t){let n=t.colors.tag;return`${n.open}<${e}${n.close} …${n.open} />${n.close}`}i(Qt,"escapeHTML"),i(et,"printProps"),i(tt,"printChildren"),i(vt,"printText"),i($r,"printComment"),i(nt,"printElement"),i(rt,"printElementAsLeaf");var Rr=/^(?:(?:HTML|SVG)\w*)?Element$/;function Ar(e){try{return"function"==typeof e.hasAttribute&&e.hasAttribute("is")}catch{return!1}}function Pr(e){let t=e.constructor.name,{nodeType:n,tagName:r}=e,o="string"==typeof r&&r.includes("-")||Ar(e);return 1===n&&(Rr.test(t)||o)||3===n&&"Text"===t||8===n&&"Comment"===t||11===n&&"DocumentFragment"===t}i(Ar,"testHasAttribute"),i(Pr,"testNode");var Nr=i((e=>{var t;return(null==e||null===(t=e.constructor)||void 0===t?void 0:t.name)&&Pr(e)}),"test$3");function Ir(e){return 3===e.nodeType}function Mr(e){return 8===e.nodeType}function He(e){return 11===e.nodeType}i(Ir,"nodeIsText"),i(Mr,"nodeIsComment"),i(He,"nodeIsFragment");var Lr=i(((e,t,n,r,o,s)=>{if(Ir(e))return vt(e.data,t);if(Mr(e))return $r(e.data,t);let c=He(e)?"DocumentFragment":e.tagName.toLowerCase();return++r>t.maxDepth?rt(c,t):nt(c,et(He(e)?[]:Array.from(e.attributes,(a=>a.name)).sort(),He(e)?{}:[...e.attributes].reduce(((a,u)=>(a[u.name]=u.value,a)),{}),t,n+t.indent,r,o,s),tt(Array.prototype.slice.call(e.childNodes||e.children),t,n+t.indent,r,o,s),t,n)}),"serialize$3"),xr={serialize:Lr,test:Nr},kt="@@__IMMUTABLE_ORDERED__@@",de=i((e=>`Immutable.${e}`),"getImmutableName"),Ne=i((e=>`[${e}]`),"printAsLeaf");function Wr(e,t,n,r,o,s,c){return++r>t.maxDepth?Ne(de(c)):`${de(c)+" "}{${Ee(e.entries(),t,n,r,o,s)}}`}function Vr(e){let t=0;return{next(){if(tt.maxDepth?Ne(c):`${c+" "}{${Ee(Vr(e),t,n,r,o,s)}}`}function Kr(e,t,n,r,o,s){let c=de("Seq");return++r>t.maxDepth?Ne(c):e["@@__IMMUTABLE_KEYED__@@"]?`${c+" "}{${e._iter||e._object?Ee(e.entries(),t,n,r,o,s):"…"}}`:`${c+" "}[${e._iter||e._array||e._collection||e._iterable?Qe(e.values(),t,n,r,o,s):"…"}]`}function Je(e,t,n,r,o,s,c){return++r>t.maxDepth?Ne(de(c)):`${de(c)+" "}[${Qe(e.values(),t,n,r,o,s)}]`}i(Wr,"printImmutableEntries"),i(Vr,"getRecordEntries"),i(qr,"printImmutableRecord"),i(Kr,"printImmutableSeq"),i(Je,"printImmutableValues");var Gr=i(((e,t,n,r,o,s)=>e["@@__IMMUTABLE_MAP__@@"]?Wr(e,t,n,r,o,s,e[kt]?"OrderedMap":"Map"):e["@@__IMMUTABLE_LIST__@@"]?Je(e,t,n,r,o,s,"List"):e["@@__IMMUTABLE_SET__@@"]?Je(e,t,n,r,o,s,e[kt]?"OrderedSet":"Set"):e["@@__IMMUTABLE_STACK__@@"]?Je(e,t,n,r,o,s,"Stack"):e["@@__IMMUTABLE_SEQ__@@"]?Kr(e,t,n,r,o,s):qr(e,t,n,r,o,s)),"serialize$2"),Hr=i((e=>e&&(!0===e["@@__IMMUTABLE_ITERABLE__@@"]||!0===e["@@__IMMUTABLE_RECORD__@@"])),"test$2"),Jr={serialize:Gr,test:Hr};function rn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}i(rn,"getDefaultExportFromCjs");var zt,Yt,Xe={exports:{}},A={};function Xr(){return zt||(zt=1,function(){function e(f){if("object"==typeof f&&null!==f){var d=f.$$typeof;switch(d){case t:switch(f=f.type){case r:case s:case o:case m:case p:case g:return f;default:switch(f=f&&f.$$typeof){case a:case u:case b:case l:case c:return f;default:return d}}case n:return d}}}i(e,"typeOf");var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),a=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),l=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),g=Symbol.for("react.view_transition"),h=Symbol.for("react.client.reference");A.ContextConsumer=c,A.ContextProvider=a,A.Element=t,A.ForwardRef=u,A.Fragment=r,A.Lazy=b,A.Memo=l,A.Portal=n,A.Profiler=s,A.StrictMode=o,A.Suspense=m,A.SuspenseList=p,A.isContextConsumer=function(f){return e(f)===c},A.isContextProvider=function(f){return e(f)===a},A.isElement=function(f){return"object"==typeof f&&null!==f&&f.$$typeof===t},A.isForwardRef=function(f){return e(f)===u},A.isFragment=function(f){return e(f)===r},A.isLazy=function(f){return e(f)===b},A.isMemo=function(f){return e(f)===l},A.isPortal=function(f){return e(f)===n},A.isProfiler=function(f){return e(f)===s},A.isStrictMode=function(f){return e(f)===o},A.isSuspense=function(f){return e(f)===m},A.isSuspenseList=function(f){return e(f)===p},A.isValidElementType=function(f){return"string"==typeof f||"function"==typeof f||f===r||f===s||f===o||f===m||f===p||"object"==typeof f&&null!==f&&(f.$$typeof===b||f.$$typeof===l||f.$$typeof===a||f.$$typeof===c||f.$$typeof===u||f.$$typeof===h||void 0!==f.getModuleId)},A.typeOf=e}()),A}function Zr(){return Yt||(Yt=1,Xe.exports=Xr()),Xe.exports}i(Xr,"requireReactIs_development$1"),i(Zr,"requireReactIs$1");var Ut,Wt,on=Zr(),vr=Xt({__proto__:null,default:rn(on)},[on]),Ze={exports:{}},w={};function eo(){return Ut||(Ut=1,function(){var O,e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),c=Symbol.for("react.context"),a=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),l=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen");function y(C){return!("string"!=typeof C&&"function"!=typeof C&&C!==n&&C!==o&&C!==r&&C!==m&&C!==p&&C!==g&&("object"!=typeof C||null===C||C.$$typeof!==b&&C.$$typeof!==l&&C.$$typeof!==s&&C.$$typeof!==c&&C.$$typeof!==u&&C.$$typeof!==O&&void 0===C.getModuleId))}function E(C){if("object"==typeof C&&null!==C){var Ke=C.$$typeof;switch(Ke){case e:var $e=C.type;switch($e){case n:case o:case r:case m:case p:return $e;default:var Dt=$e&&$e.$$typeof;switch(Dt){case a:case c:case u:case b:case l:case s:return Dt;default:return Ke}}case t:return Ke}}}O=Symbol.for("react.module.reference"),i(y,"isValidElementType"),i(E,"typeOf");var $=c,T=s,R=e,K=u,Q=n,I=b,k=l,G=t,Y=o,N=r,L=m,x=p,H=!1,F=!1;function W(C){return H||(H=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function re(C){return F||(F=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function V(C){return E(C)===c}function q(C){return E(C)===s}function se(C){return"object"==typeof C&&null!==C&&C.$$typeof===e}function J(C){return E(C)===u}function U(C){return E(C)===n}function oe(C){return E(C)===b}function he(C){return E(C)===l}function ue(C){return E(C)===t}function be(C){return E(C)===o}function Ce(C){return E(C)===r}function Oe(C){return E(C)===m}function ar(C){return E(C)===p}i(W,"isAsyncMode"),i(re,"isConcurrentMode"),i(V,"isContextConsumer"),i(q,"isContextProvider"),i(se,"isElement"),i(J,"isForwardRef"),i(U,"isFragment"),i(oe,"isLazy"),i(he,"isMemo"),i(ue,"isPortal"),i(be,"isProfiler"),i(Ce,"isStrictMode"),i(Oe,"isSuspense"),i(ar,"isSuspenseList"),w.ContextConsumer=$,w.ContextProvider=T,w.Element=R,w.ForwardRef=K,w.Fragment=Q,w.Lazy=I,w.Memo=k,w.Portal=G,w.Profiler=Y,w.StrictMode=N,w.Suspense=L,w.SuspenseList=x,w.isAsyncMode=W,w.isConcurrentMode=re,w.isContextConsumer=V,w.isContextProvider=q,w.isElement=se,w.isForwardRef=J,w.isFragment=U,w.isLazy=oe,w.isMemo=he,w.isPortal=ue,w.isProfiler=be,w.isStrictMode=Ce,w.isSuspense=Oe,w.isSuspenseList=ar,w.isValidElementType=y,w.typeOf=E}()),w}function to(){return Wt||(Wt=1,Ze.exports=eo()),Ze.exports}i(eo,"requireReactIs_development"),i(to,"requireReactIs");var sn=to(),ro=Xt({__proto__:null,default:rn(sn)},[sn]),fe=Object.fromEntries(["isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isMemo","isPortal","isProfiler","isStrictMode","isSuspense","isSuspenseList","isValidElementType"].map((e=>[e,t=>ro[e](t)||vr[e](t)])));function cn(e,t=[]){if(Array.isArray(e))for(let n of e)cn(n,t);else null!=e&&!1!==e&&""!==e&&t.push(e);return t}function Vt(e){let t=e.type;if("string"==typeof t)return t;if("function"==typeof t)return t.displayName||t.name||"Unknown";if(fe.isFragment(e))return"React.Fragment";if(fe.isSuspense(e))return"React.Suspense";if("object"==typeof t&&null!==t){if(fe.isContextProvider(e))return"Context.Provider";if(fe.isContextConsumer(e))return"Context.Consumer";if(fe.isForwardRef(e)){if(t.displayName)return t.displayName;let n=t.render.displayName||t.render.name||"";return""===n?"ForwardRef":`ForwardRef(${n})`}if(fe.isMemo(e)){let n=t.displayName||t.type.displayName||t.type.name||"";return""===n?"Memo":`Memo(${n})`}}return"UNDEFINED"}function so(e){let{props:t}=e;return Object.keys(t).filter((n=>"children"!==n&&void 0!==t[n])).sort()}i(cn,"getChildren"),i(Vt,"getType"),i(so,"getPropKeys$1");var io=i(((e,t,n,r,o,s)=>++r>t.maxDepth?rt(Vt(e),t):nt(Vt(e),et(so(e),e.props,t,n+t.indent,r,o,s),tt(cn(e.props.children),t,n+t.indent,r,o,s),t,n)),"serialize$1"),co=i((e=>null!=e&&fe.isElement(e)),"test$1"),uo={serialize:io,test:co},ao="function"==typeof Symbol&&Symbol.for?Symbol.for("react.test.json"):245830487;function lo(e){let{props:t}=e;return t?Object.keys(t).filter((n=>void 0!==t[n])).sort():[]}i(lo,"getPropKeys");var fo=i(((e,t,n,r,o,s)=>++r>t.maxDepth?rt(e.type,t):nt(e.type,e.props?et(lo(e),e.props,t,n+t.indent,r,o,s):"",e.children?tt(e.children,t,n+t.indent,r,o,s):"",t,n)),"serialize"),mo=i((e=>e&&e.$$typeof===ao),"test"),po={serialize:fo,test:mo},un=Object.prototype.toString,go=Date.prototype.toISOString,ho=Error.prototype.toString,qt=RegExp.prototype.toString;function Re(e){return"function"==typeof e.constructor&&e.constructor.name||"Object"}function yo(e){return typeof window<"u"&&e===window}i(Re,"getConstructorName"),i(yo,"isWindow");var bo=/^Symbol\((.*)\)(.*)$/,So=/\n/g,st=class st extends Error{constructor(t,n){super(t),this.stack=n,this.name=this.constructor.name}};i(st,"PrettyFormatPluginError");var Pe=st;function Eo(e){return"[object Array]"===e||"[object ArrayBuffer]"===e||"[object DataView]"===e||"[object Float32Array]"===e||"[object Float64Array]"===e||"[object Int8Array]"===e||"[object Int16Array]"===e||"[object Int32Array]"===e||"[object Uint8Array]"===e||"[object Uint8ClampedArray]"===e||"[object Uint16Array]"===e||"[object Uint32Array]"===e}function _o(e){return Object.is(e,-0)?"-0":String(e)}function To(e){return`${e}n`}function Kt(e,t){return t?`[Function ${e.name||"anonymous"}]`:"[Function]"}function Gt(e){return String(e).replace(bo,"Symbol($1)")}function Ht(e){return`[${ho.call(e)}]`}function an(e,t,n,r){if(!0===e||!1===e)return`${e}`;if(void 0===e)return"undefined";if(null===e)return"null";let o=typeof e;if("number"===o)return _o(e);if("bigint"===o)return To(e);if("string"===o)return r?`"${e.replaceAll(/"|\\/g,"\\$&")}"`:`"${e}"`;if("function"===o)return Kt(e,t);if("symbol"===o)return Gt(e);let s=un.call(e);return"[object WeakMap]"===s?"WeakMap {}":"[object WeakSet]"===s?"WeakSet {}":"[object Function]"===s||"[object GeneratorFunction]"===s?Kt(e,t):"[object Symbol]"===s?Gt(e):"[object Date]"===s?Number.isNaN(+e)?"Date { NaN }":go.call(e):"[object Error]"===s?Ht(e):"[object RegExp]"===s?n?qt.call(e).replaceAll(/[$()*+.?[\\\]^{|}]/g,"\\$&"):qt.call(e):e instanceof Error?Ht(e):null}function ln(e,t,n,r,o,s){if(o.includes(e))return"[Circular]";(o=[...o]).push(e);let c=++r>t.maxDepth,a=t.min;if(t.callToJSON&&!c&&e.toJSON&&"function"==typeof e.toJSON&&!s)return ae(e.toJSON(),t,n,r,o,!0);let u=un.call(e);return"[object Arguments]"===u?c?"[Arguments]":`${a?"":"Arguments "}[${Ae(e,t,n,r,o,ae)}]`:Eo(u)?c?`[${e.constructor.name}]`:`${a||!t.printBasicPrototype&&"Array"===e.constructor.name?"":`${e.constructor.name} `}[${Ae(e,t,n,r,o,ae)}]`:"[object Map]"===u?c?"[Map]":`Map {${Ee(e.entries(),t,n,r,o,ae," => ")}}`:"[object Set]"===u?c?"[Set]":`Set {${Qe(e.values(),t,n,r,o,ae)}}`:c||yo(e)?`[${Re(e)}]`:`${a||!t.printBasicPrototype&&"Object"===Re(e)?"":`${Re(e)} `}{${ve(e,t,n,r,o,ae)}}`}i(Eo,"isToStringedArrayType"),i(_o,"printNumber"),i(To,"printBigInt"),i(Kt,"printFunction"),i(Gt,"printSymbol"),i(Ht,"printError"),i(an,"printBasicValue"),i(ln,"printComplexValue");var Co={test:i((e=>e&&e instanceof Error),"test"),serialize(e,t,n,r,o,s){if(o.includes(e))return"[Circular]";o=[...o,e];let c=++r>t.maxDepth,{message:a,cause:u,...m}=e,p={message:a,...typeof u<"u"?{cause:u}:{},...e instanceof AggregateError?{errors:e.errors}:{},...m},l="Error"!==e.name?e.name:Re(e);return c?`[${l}]`:`${l} {${Ee(Object.entries(p).values(),t,n,r,o,s)}}`}};function Oo(e){return null!=e.serialize}function fn(e,t,n,r,o,s){let c;try{c=Oo(e)?e.serialize(t,n,r,o,s,ae):e.print(t,(a=>ae(a,n,r,o,s)),(a=>{let u=r+n.indent;return u+a.replaceAll(So,`\n${u}`)}),{edgeSpacing:n.spacingOuter,min:n.min,spacing:n.spacingInner},n.colors)}catch(a){throw new Pe(a.message,a.stack)}if("string"!=typeof c)throw new TypeError(`pretty-format: Plugin must return type "string" but instead returned "${typeof c}".`);return c}function mn(e,t){for(let n of e)try{if(n.test(t))return n}catch(r){throw new Pe(r.message,r.stack)}return null}function ae(e,t,n,r,o,s){let c=mn(t.plugins,e);if(null!==c)return fn(c,e,t,n,r,o);let a=an(e,t.printFunctionName,t.escapeRegex,t.escapeString);return null!==a?a:ln(e,t,n,r,o,s)}i(Oo,"isNewPlugin"),i(fn,"printPlugin"),i(mn,"findPlugin"),i(ae,"printer");var ot={comment:"gray",content:"reset",prop:"yellow",tag:"cyan",value:"green"},pn=Object.keys(ot),ee={callToJSON:!0,compareKeys:void 0,escapeRegex:!1,escapeString:!0,highlight:!1,indent:2,maxDepth:Number.POSITIVE_INFINITY,maxWidth:Number.POSITIVE_INFINITY,min:!1,plugins:[],printBasicPrototype:!0,printFunctionName:!0,theme:ot};function $o(e){for(let t of Object.keys(e))if(!Object.prototype.hasOwnProperty.call(ee,t))throw new Error(`pretty-format: Unknown option "${t}".`);if(e.min&&void 0!==e.indent&&0!==e.indent)throw new Error('pretty-format: Options "min" and "indent" cannot be used together.')}function wo(){return pn.reduce(((e,t)=>{let n=ot[t],r=n&&v[n];if(!r||"string"!=typeof r.close||"string"!=typeof r.open)throw new Error(`pretty-format: Option "theme" has a key "${t}" whose value "${n}" is undefined in ansi-styles.`);return e[t]=r,e}),Object.create(null))}function Ro(){return pn.reduce(((e,t)=>(e[t]={close:"",open:""},e)),Object.create(null))}function gn(e){return e?.printFunctionName??ee.printFunctionName}function hn(e){return e?.escapeRegex??ee.escapeRegex}function dn(e){return e?.escapeString??ee.escapeString}function Jt(e){return{callToJSON:e?.callToJSON??ee.callToJSON,colors:e?.highlight?wo():Ro(),compareKeys:"function"==typeof e?.compareKeys||null===e?.compareKeys?e.compareKeys:ee.compareKeys,escapeRegex:hn(e),escapeString:dn(e),indent:e?.min?"":Ao(e?.indent??ee.indent),maxDepth:e?.maxDepth??ee.maxDepth,maxWidth:e?.maxWidth??ee.maxWidth,min:e?.min??ee.min,plugins:e?.plugins??ee.plugins,printBasicPrototype:e?.printBasicPrototype??!0,printFunctionName:gn(e),spacingInner:e?.min?" ":"\n",spacingOuter:e?.min?"":"\n"}}function Ao(e){return Array.from({length:e+1}).join(" ")}function X(e,t){if(t&&($o(t),t.plugins)){let r=mn(t.plugins,e);if(null!==r)return fn(r,e,Jt(t),"",0,[])}let n=an(e,gn(t),hn(t),dn(t));return null!==n?n:ln(e,Jt(t),"",0,[])}i($o,"validateOptions"),i(wo,"getColorsHighlight"),i(Ro,"getColorsEmpty"),i(gn,"getPrintFunctionName"),i(hn,"getEscapeRegex"),i(dn,"getEscapeString"),i(Jt,"getConfig"),i(Ao,"createIndent"),i(X,"format");var _e={AsymmetricMatcher:yr,DOMCollection:Or,DOMElement:xr,Immutable:Jr,ReactElement:uo,ReactTestComponent:po,Error:Co},yn={bold:["1","22"],dim:["2","22"],italic:["3","23"],underline:["4","24"],inverse:["7","27"],hidden:["8","28"],strike:["9","29"],black:["30","39"],red:["31","39"],green:["32","39"],yellow:["33","39"],blue:["34","39"],magenta:["35","39"],cyan:["36","39"],white:["37","39"],brightblack:["30;1","39"],brightred:["31;1","39"],brightgreen:["32;1","39"],brightyellow:["33;1","39"],brightblue:["34;1","39"],brightmagenta:["35;1","39"],brightcyan:["36;1","39"],brightwhite:["37;1","39"],grey:["90","39"]},Po={special:"cyan",number:"yellow",bigint:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",symbol:"green",date:"magenta",regexp:"red"};function No(e,t){let n=yn[Po[t]]||yn[t]||"";return n?`[${n[0]}m${String(e)}[${n[1]}m`:String(e)}function bn({showHidden:e=!1,depth:t=2,colors:n=!1,customInspect:r=!0,showProxy:o=!1,maxArrayLength:s=1/0,breakLength:c=1/0,seen:a=[],truncate:u=1/0,stylize:m=String}={},p){let l={showHidden:!!e,depth:Number(t),colors:!!n,customInspect:!!r,showProxy:!!o,maxArrayLength:Number(s),breakLength:Number(c),truncate:Number(u),seen:a,inspect:p,stylize:m};return l.colors&&(l.stylize=No),l}function Io(e){return e>="\ud800"&&e<="\udbff"}function B(e,t,n="…"){e=String(e);let r=n.length,o=e.length;if(r>t&&o>r)return n;if(o>t&&o>r){let s=t-r;return s>0&&Io(e[s-1])&&(s-=1),`${e.slice(0,s)}${n}`}return e}function D(e,t,n,r=", "){n=n||t.inspect;let o=e.length;if(0===o)return"";let s=t.truncate,c="",a="",u="";for(let m=0;ms&&c.length+u.length<=s||!p&&!l&&f>s||(a=p?"":n(e[m+1],t)+(l?"":r),!p&&l&&f>s&&h+a.length>s))break;if(c+=g,!p&&!l&&h+a.length>=s){u=`…(${e.length-m-1})`;break}u=""}return`${c}${u}`}function Mo(e){return e.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)?e:JSON.stringify(e).replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'")}function ce([e,t],n){return n.truncate-=2,"string"==typeof e?e=Mo(e):"number"!=typeof e&&(e=`[${n.inspect(e,n)}]`),n.truncate-=e.length,`${e}: ${t=n.inspect(t,n)}`}function it(e,t){let n=Object.keys(e).slice(e.length);if(!e.length&&!n.length)return"[]";t.truncate-=4;let r=D(e,t);t.truncate-=r.length;let o="";return n.length&&(o=D(n.map((s=>[s,e[s]])),t,ce)),`[ ${r}${o?`, ${o}`:""} ]`}i(No,"colorise"),i(bn,"normaliseOptions"),i(Io,"isHighSurrogate"),i(B,"truncate"),i(D,"inspectList"),i(Mo,"quoteComplexKey"),i(ce,"inspectProperty"),i(it,"inspectArray");var Lo=i((e=>"function"==typeof Buffer&&e instanceof Buffer?"Buffer":e[Symbol.toStringTag]?e[Symbol.toStringTag]:e.constructor.name),"getArrayName");function te(e,t){let n=Lo(e);t.truncate-=n.length+4;let r=Object.keys(e).slice(e.length);if(!e.length&&!r.length)return`${n}[]`;let o="";for(let c=0;c[c,e[c]])),t,ce)),`${n}[ ${o}${s?`, ${s}`:""} ]`}function ct(e,t){let n=e.toJSON();if(null===n)return"Invalid Date";let r=n.split("T"),o=r[0];return t.stylize(`${o}T${B(r[1],t.truncate-o.length-1)}`,"date")}function Ie(e,t){let n=e[Symbol.toStringTag]||"Function",r=e.name;return r?t.stylize(`[${n} ${B(r,t.truncate-11)}]`,"special"):t.stylize(`[${n}]`,"special")}function xo([e,t],n){return n.truncate-=4,e=n.inspect(e,n),n.truncate-=e.length,`${e} => ${t=n.inspect(t,n)}`}function Do(e){let t=[];return e.forEach(((n,r)=>{t.push([r,n])})),t}function ut(e,t){return 0===e.size?"Map{}":(t.truncate-=7,`Map{ ${D(Do(e),t,xo)} }`)}i(te,"inspectTypedArray"),i(ct,"inspectDate"),i(Ie,"inspectFunction"),i(xo,"inspectMapEntry"),i(Do,"mapToEntries"),i(ut,"inspectMap");var Fo=Number.isNaN||(e=>e!=e);function Me(e,t){return Fo(e)?t.stylize("NaN","number"):e===1/0?t.stylize("Infinity","number"):e===-1/0?t.stylize("-Infinity","number"):0===e?t.stylize(1/e==1/0?"+0":"-0","number"):t.stylize(B(String(e),t.truncate),"number")}function Le(e,t){let n=B(e.toString(),t.truncate-1);return"…"!==n&&(n+="n"),t.stylize(n,"bigint")}function at(e,t){let n=e.toString().split("/")[2],r=t.truncate-(2+n.length),o=e.source;return t.stylize(`/${B(o,r)}/${n}`,"regexp")}function jo(e){let t=[];return e.forEach((n=>{t.push(n)})),t}function lt(e,t){return 0===e.size?"Set{}":(t.truncate-=7,`Set{ ${D(jo(e),t)} }`)}i(Me,"inspectNumber"),i(Le,"inspectBigInt"),i(at,"inspectRegExp"),i(jo,"arrayFromSet"),i(lt,"inspectSet");var Sn=new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]","g"),ko={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","'":"\\'","\\":"\\\\"};function Yo(e){return ko[e]||`\\u${`0000${e.charCodeAt(0).toString(16)}`.slice(-4)}`}function xe(e,t){return Sn.test(e)&&(e=e.replace(Sn,Yo)),t.stylize(`'${B(e,t.truncate-2)}'`,"string")}function De(e){return"description"in Symbol.prototype?e.description?`Symbol(${e.description})`:"Symbol()":e.toString()}i(Yo,"escape"),i(xe,"inspectString"),i(De,"inspectSymbol");var En=i((()=>"Promise{…}"),"getPromiseValue");try{let{getPromiseDetails:e,kPending:t,kRejected:n}=process.binding("util");Array.isArray(e(Promise.resolve()))&&(En=i(((r,o)=>{let[s,c]=e(r);return s===t?"Promise{}":`Promise${s===n?"!":""}{${o.inspect(c,o)}}`}),"getPromiseValue"))}catch{}var _n=En;function me(e,t){let n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[];if(0===n.length&&0===r.length)return"{}";if(t.truncate-=4,t.seen=t.seen||[],t.seen.includes(e))return"[Circular]";t.seen.push(e);let o=D(n.map((a=>[a,e[a]])),t,ce),s=D(r.map((a=>[a,e[a]])),t,ce);t.seen.pop();let c="";return o&&s&&(c=", "),`{ ${o}${c}${s} }`}i(me,"inspectObject");var ft=!!(typeof Symbol<"u"&&Symbol.toStringTag)&&Symbol.toStringTag;function mt(e,t){let n="";return ft&&ft in e&&(n=e[ft]),n=n||e.constructor.name,(!n||"_class"===n)&&(n=""),t.truncate-=n.length,`${n}${me(e,t)}`}function pt(e,t){return 0===e.length?"Arguments[]":(t.truncate-=13,`Arguments[ ${D(e,t)} ]`)}i(mt,"inspectClass"),i(pt,"inspectArguments");var Uo=["stack","line","column","name","message","fileName","lineNumber","columnNumber","number","description","cause"];function gt(e,t){let n=Object.getOwnPropertyNames(e).filter((c=>-1===Uo.indexOf(c))),r=e.name;t.truncate-=r.length;let o="";if("string"==typeof e.message?o=B(e.message,t.truncate):n.unshift("message"),o=o?`: ${o}`:"",t.truncate-=o.length+5,t.seen=t.seen||[],t.seen.includes(e))return"[Circular]";t.seen.push(e);let s=D(n.map((c=>[c,e[c]])),t,ce);return`${r}${o}${s?` { ${s} }`:""}`}function Wo([e,t],n){return n.truncate-=3,t?`${n.stylize(String(e),"yellow")}=${n.stylize(`"${t}"`,"string")}`:`${n.stylize(String(e),"yellow")}`}function Fe(e,t){return D(e,t,Vo,"\n")}function Vo(e,t){switch(e.nodeType){case 1:return je(e,t);case 3:return t.inspect(e.data,t);default:return t.inspect(e,t)}}function je(e,t){let n=e.getAttributeNames(),r=e.tagName.toLowerCase(),o=t.stylize(`<${r}`,"special"),s=t.stylize(">","special"),c=t.stylize(``,"special");t.truncate-=2*r.length+5;let a="";n.length>0&&(a+=" ",a+=D(n.map((p=>[p,e.getAttribute(p)])),t,Wo," ")),t.truncate-=a.length;let u=t.truncate,m=Fe(e.children,t);return m&&m.length>u&&(m=`…(${e.children.length})`),`${o}${a}${s}${m}${c}`}i(gt,"inspectObject"),i(Wo,"inspectAttribute"),i(Fe,"inspectNodeCollection"),i(Vo,"inspectNode"),i(je,"inspectHTML");var ht="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("chai/inspect"):"@@chai/inspect",dt=Symbol.for("nodejs.util.inspect.custom"),Tn=new WeakMap,Cn={},On={undefined:i(((e,t)=>t.stylize("undefined","undefined")),"undefined"),null:i(((e,t)=>t.stylize("null","null")),"null"),boolean:i(((e,t)=>t.stylize(String(e),"boolean")),"boolean"),Boolean:i(((e,t)=>t.stylize(String(e),"boolean")),"Boolean"),number:Me,Number:Me,bigint:Le,BigInt:Le,string:xe,String:xe,function:Ie,Function:Ie,symbol:De,Symbol:De,Array:it,Date:ct,Map:ut,Set:lt,RegExp:at,Promise:_n,WeakSet:i(((e,t)=>t.stylize("WeakSet{…}","special")),"WeakSet"),WeakMap:i(((e,t)=>t.stylize("WeakMap{…}","special")),"WeakMap"),Arguments:pt,Int8Array:te,Uint8Array:te,Uint8ClampedArray:te,Int16Array:te,Uint16Array:te,Int32Array:te,Uint32Array:te,Float32Array:te,Float64Array:te,Generator:i((()=>""),"Generator"),DataView:i((()=>""),"DataView"),ArrayBuffer:i((()=>""),"ArrayBuffer"),Error:gt,HTMLCollection:Fe,NodeList:Fe},Ko=i(((e,t,n)=>ht in e&&"function"==typeof e[ht]?e[ht](t):dt in e&&"function"==typeof e[dt]?e[dt](t.depth,t):"inspect"in e&&"function"==typeof e.inspect?e.inspect(t.depth,t):"constructor"in e&&Tn.has(e.constructor)?Tn.get(e.constructor)(e,t):Cn[n]?Cn[n](e,t):""),"inspectCustom"),Go=Object.prototype.toString;function ke(e,t={}){let n=bn(t,ke),{customInspect:r}=n,o=null===e?"null":typeof e;if("object"===o&&(o=Go.call(e).slice(8,-1)),o in On)return On[o](e,n);if(r&&e){let c=Ko(e,n,o);if(c)return"string"==typeof c?c:ke(c,n)}let s=!!e&&Object.getPrototypeOf(e);return s===Object.prototype||null===s?me(e,n):e&&"function"==typeof HTMLElement&&e instanceof HTMLElement?je(e,n):"constructor"in e?e.constructor!==Object?mt(e,n):me(e,n):e===Object(e)?me(e,n):n.stylize(String(e),o)}i(ke,"inspect");var{AsymmetricMatcher:Jo,DOMCollection:Xo,DOMElement:Zo,Immutable:Qo,ReactElement:vo,ReactTestComponent:es}=_e,$n=[es,vo,Zo,Xo,Qo,Jo];function pe(e,t=10,{maxLength:n,...r}={}){let s,o=n??1e4;try{s=X(e,{maxDepth:t,escapeString:!1,plugins:$n,...r})}catch{s=X(e,{callToJSON:!1,maxDepth:t,escapeString:!1,plugins:$n,...r})}return s.length>=o&&t>1?pe(e,Math.floor(Math.min(t,Number.MAX_SAFE_INTEGER)/2),{maxLength:n,...r}):s}i(pe,"stringify");var ts=/%[sdjifoOc%]/g;function wn(...e){if("string"!=typeof e[0]){let s=[];for(let c=0;c{if("%%"===s)return"%";if(n>=t)return s;switch(s){case"%s":{let c=e[n++];return"bigint"==typeof c?`${c.toString()}n`:"number"==typeof c&&0===c&&1/c<0?"-0":"object"==typeof c&&null!==c?"function"==typeof c.toString&&c.toString!==Object.prototype.toString?c.toString():Te(c,{depth:0,colors:!1}):String(c)}case"%d":{let c=e[n++];return"bigint"==typeof c?`${c.toString()}n`:Number(c).toString()}case"%i":{let c=e[n++];return"bigint"==typeof c?`${c.toString()}n`:Number.parseInt(String(c)).toString()}case"%f":return Number.parseFloat(String(e[n++])).toString();case"%o":return Te(e[n++],{showHidden:!0,showProxy:!0});case"%O":return Te(e[n++]);case"%c":return n++,"";case"%j":try{return JSON.stringify(e[n++])}catch(c){let a=c.message;if(a.includes("circular structure")||a.includes("cyclic structures")||a.includes("cyclic object"))return"[Circular]";throw c}default:return s}}));for(let s=e[n];nt.add(r);Object.getOwnPropertyNames(e).forEach(n),Object.getOwnPropertySymbols(e).forEach(n)}function bt(e){let t=new Set;return ns(e)?[]:(rs(e,t),Array.from(t))}i(wn,"format"),i(Te,"inspect"),i(Rn,"getDefaultExportFromCjs"),i(ns,"isFinalObj"),i(Be,"getType"),i(rs,"collectOwnProperties"),i(bt,"getOwnProperties");var An={forceWritable:!1};function St(e,t=An){return yt(e,new WeakMap,t)}function yt(e,t,n=An){let r,o;if(t.has(e))return t.get(e);if(Array.isArray(e)){for(o=Array.from({length:r=e.length}),t.set(e,o);r--;)o[r]=yt(e[r],t,n);return o}if("[object Object]"===Object.prototype.toString.call(e)){o=Object.create(Object.getPrototypeOf(e)),t.set(e,o);let s=bt(e);for(let c of s){let a=Object.getOwnPropertyDescriptor(e,c);if(!a)continue;let u=yt(e[c],t,n);n.forceWritable?Object.defineProperty(o,c,{enumerable:a.enumerable,configurable:!0,writable:!0,value:u}):"get"in a?Object.defineProperty(o,c,{...a,get:()=>u}):Object.defineProperty(o,c,{...a,value:u})}return o}return e}i(St,"deepClone"),i(yt,"clone");var z=-1,At=class At{0;1;constructor(t,n){this[0]=t,this[1]=n}};i(At,"Diff");var P=At;function os(e,t){if(!e||!t||e.charAt(0)!==t.charAt(0))return 0;let n=0,r=Math.min(e.length,t.length),o=r,s=0;for(;nr?e=e.substring(n-r):n0?n[r-1]:-1,c=0,a=0,u=0,m=0,o=null,t=!0)),s++;for(t&&qn(e),us(e),s=1;s=g?(b>=p.length/2||b>=l.length/2)&&(e.splice(s,0,new P(0,l.substring(0,b))),e[s-1][1]=p.substring(0,p.length-b),e[s+1][1]=l.substring(b),s++):(g>=p.length/2||g>=l.length/2)&&(e.splice(s,0,new P(0,p.substring(0,g))),e[s-1][0]=1,e[s-1][1]=l.substring(0,l.length-g),e[s+1][0]=z,e[s+1][1]=p.substring(g),s++),s++}s++}}i(os,"diff_commonPrefix"),i(Vn,"diff_commonSuffix"),i(Pn,"diff_commonOverlap_"),i(ss,"diff_cleanupSemantic");var Nn=/[^a-z0-9]/i,In=/\s/,Mn=/[\r\n]/,is=/\n\r?\n$/,cs=/^\r?\n\r?\n/;function us(e){let t=1;for(;t=m&&(m=p,c=n,a=r,u=o)}e[t-1][1]!==c&&(c?e[t-1][1]=c:(e.splice(t-1,1),t--),e[t][1]=a,u?e[t+1][1]=u:(e.splice(t+1,1),t--))}t++}}function qn(e){e.push(new P(0,""));let c,t=0,n=0,r=0,o="",s="";for(;t1?(0!==n&&0!==r&&(c=os(s,o),0!==c&&(t-n-r>0&&0===e[t-n-r-1][0]?e[t-n-r-1][1]+=s.substring(0,c):(e.splice(0,0,new P(0,s.substring(0,c))),t++),s=s.substring(c),o=o.substring(c)),c=Vn(s,o),0!==c&&(e[t][1]=s.substring(s.length-c)+e[t][1],s=s.substring(0,s.length-c),o=o.substring(0,o.length-c))),t-=n+r,e.splice(t,n+r),o.length&&(e.splice(t,0,new P(z,o)),t++),s.length&&(e.splice(t,0,new P(1,s)),t++),t++):0!==t&&0===e[t-1][0]?(e[t-1][1]+=e[t][1],e.splice(t,1)):t++,r=0,n=0,o="",s=""}""===e[e.length-1][1]&&e.pop();let a=!1;for(t=1;t{let _=0;for(;g{let _=0;for(;g<=h&&f<=d&&S(h,d);)h-=1,d-=1,_+=1;return _}),"countCommonItemsR"),o=i(((g,h,f,d,S,_,O)=>{let y=0,E=-g,$=_[y],T=$;_[y]+=n($+1,h,d+$-E+1,f,S);let R=g{let y=0,E=g,$=_[y],T=$;_[y]-=r(h,$-1,f,d+$-E-1,S);let R=g{let R=d-h,I=S-d-(f-h),k=-I-(g-1),G=g-1-I,Y=t,N=g{let R=S-f,I=S-d-(f-h),k=I-g,G=I+g,Y=t,N=g<$?g:$;for(let L=0,x=g;L<=N;L+=1,x-=2){let H=0===L||L!==g&&E[L]{let $=d-h,T=S-f,R=f-h,K=S-d,Q=K-R,I=R,k=R;if(O[0]=h-1,y[0]=f,Q%2==0){let G=(g||Q)/2,Y=(R+K)/2;for(let N=1;N<=Y;N+=1)if(I=o(N,f,S,$,_,O,I),N{if(S-d{q(J,oe,U)}),"foundSubsequence"),isCommon:i(((J,U)=>se(U,J)),"isCommon")}}let re=h,V=f;h=d,f=S,d=re,S=V}let{foundSubsequence:T,isCommon:R}=O[_?1:0];u(g,h,f,d,S,R,y,E,$);let{nChangePreceding:K,aEndPreceding:Q,bEndPreceding:I,nCommonPreceding:k,aCommonPreceding:G,bCommonPreceding:Y,nCommonFollowing:N,aCommonFollowing:L,bCommonFollowing:x,nChangeFollowing:H,aStartFollowing:F,bStartFollowing:W}=$;h{if("number"!=typeof h)throw new TypeError(`${e}: ${g} typeof ${typeof h} is not a number`);if(!Number.isSafeInteger(h))throw new RangeError(`${e}: ${g} value ${h} is not a safe integer`);if(h<0)throw new RangeError(`${e}: ${g} value ${h} is a negative integer`)}),"validateLength"),l=i(((g,h)=>{let f=typeof h;if("function"!==f)throw new TypeError(`${e}: ${g} typeof ${f} is not a function`)}),"validateCallback");function b(g,h,f,d){p("aLength",g),p("bLength",h),l("isCommon",f),l("foundSubsequence",d);let S=n(0,g,0,h,f);if(0!==S&&d(S,0,0),g!==S||h!==S){let _=S,O=S,y=r(_,g-1,O,h-1,f),E=g-y,$=h-y,T=S+y;g!==T&&h!==T&&m(0,_,E,O,$,!1,[{foundSubsequence:d,isCommon:f}],[t],[t],{aCommonFollowing:t,aCommonPreceding:t,aEndPreceding:t,aStartFollowing:t,bCommonFollowing:t,bCommonPreceding:t,bEndPreceding:t,bStartFollowing:t,nChangeFollowing:t,nChangePreceding:t,nCommonFollowing:t,nCommonPreceding:t}),0!==y&&d(y,E,$)}}return i(b,"diffSequence"),Ye}i(ls,"requireBuild");var Gn=Rn(ls());function ms(e,t){return e.replace(/\s+$/,(n=>t(n)))}function wt(e,t,n,r,o,s){return 0!==e.length?n(`${r} ${ms(e,o)}`):" "!==r?n(r):t&&0!==s.length?n(`${r} ${s}`):""}function Hn(e,t,{aColor:n,aIndicator:r,changeLineTrailingSpaceColor:o,emptyFirstOrLastLinePlaceholder:s}){return wt(e,t,n,r,o,s)}function Jn(e,t,{bColor:n,bIndicator:r,changeLineTrailingSpaceColor:o,emptyFirstOrLastLinePlaceholder:s}){return wt(e,t,n,r,o,s)}function Xn(e,t,{commonColor:n,commonIndicator:r,commonLineTrailingSpaceColor:o,emptyFirstOrLastLinePlaceholder:s}){return wt(e,t,n,r,o,s)}function xn(e,t,n,r,{patchColor:o}){return o(`@@ -${e+1},${t-e} +${n+1},${r-n} @@`)}function ps(e,t){let n=e.length,r=t.contextLines,o=r+r,s=n,c=!1,a=0,u=0;for(;u!==n;){let y=u;for(;u!==n&&0===e[u][0];)u+=1;if(y!==u)if(0===y)u>r&&(s-=u-r,c=!0);else if(u===n){let E=u-y;E>r&&(s-=E-r,c=!0)}else{let E=u-y;E>o&&(s-=E-o,a+=1)}for(;u!==n&&0!==e[u][0];)u+=1}let m=0!==a||c;0!==a?s+=a+1:c&&(s+=1);let p=s-1,l=[],b=0;m&&l.push("");let g=0,h=0,f=0,d=0,S=i((y=>{let E=l.length;l.push(Xn(y,0===E||E===p,t)),f+=1,d+=1}),"pushCommonLine"),_=i((y=>{let E=l.length;l.push(Hn(y,0===E||E===p,t)),f+=1}),"pushDeleteLine"),O=i((y=>{let E=l.length;l.push(Jn(y,0===E||E===p,t)),d+=1}),"pushInsertLine");for(u=0;u!==n;){let y=u;for(;u!==n&&0===e[u][0];)u+=1;if(y!==u)if(0===y){u>r&&(y=u-r,g=y,h=y,f=g,d=h);for(let E=y;E!==u;E+=1)S(e[E][1])}else if(u===n){let E=u-y>r?y+r:u;for(let $=y;$!==E;$+=1)S(e[$][1])}else{let E=u-y;if(E>o){let $=y+r;for(let R=y;R!==$;R+=1)S(e[R][1]);l[b]=xn(g,f,h,d,t),b=l.length,l.push("");let T=E-o;g=f+T,h=d+T,f=g,d=h;for(let R=u-r;R!==u;R+=1)S(e[R][1])}else for(let $=y;$!==u;$+=1)S(e[$][1])}for(;u!==n&&e[u][0]===z;)_(e[u][1]),u+=1;for(;u!==n&&1===e[u][0];)O(e[u][1]),u+=1}return m&&(l[b]=xn(g,f,h,d,t)),l.join("\n")}function gs(e,t){return e.map(((n,r,o)=>{let s=n[1],c=0===r||r===o.length-1;switch(n[0]){case z:return Hn(s,c,t);case 1:return Jn(s,c,t);default:return Xn(s,c,t)}})).join("\n")}i(ms,"formatTrailingSpaces"),i(wt,"printDiffLine"),i(Hn,"printDeleteLine"),i(Jn,"printInsertLine"),i(Xn,"printCommonLine"),i(xn,"createPatchMark"),i(ps,"joinAlignedDiffsNoExpand"),i(gs,"joinAlignedDiffsExpand");var Et=i((e=>e),"noColor");function ds(){return{aAnnotation:"Expected",aColor:v.green,aIndicator:"-",bAnnotation:"Received",bColor:v.red,bIndicator:"+",changeColor:v.inverse,changeLineTrailingSpaceColor:Et,commonColor:v.dim,commonIndicator:" ",commonLineTrailingSpaceColor:Et,compareKeys:void 0,contextLines:5,emptyFirstOrLastLinePlaceholder:"",expand:!1,includeChangeCounts:!1,omitAnnotationLines:!1,patchColor:v.yellow,printBasicPrototype:!1,truncateThreshold:0,truncateAnnotation:"... Diff result is truncated",truncateAnnotationColor:Et}}function ys(e){return e&&"function"==typeof e?e:void 0}function bs(e){return"number"==typeof e&&Number.isSafeInteger(e)&&e>=0?e:5}function ge(e={}){return{...ds(),...e,compareKeys:ys(e.compareKeys),contextLines:bs(e.contextLines)}}function ye(e){return 1===e.length&&0===e[0].length}function Ss(e){let t=0,n=0;return e.forEach((r=>{switch(r[0]){case z:t+=1;break;case 1:n+=1}})),{a:t,b:n}}function Es({aAnnotation:e,aColor:t,aIndicator:n,bAnnotation:r,bColor:o,bIndicator:s,includeChangeCounts:c,omitAnnotationLines:a},u){if(a)return"";let m="",p="";if(c){let g=String(u.a),h=String(u.b),f=r.length-e.length,d=" ".repeat(Math.max(0,f)),S=" ".repeat(Math.max(0,-f)),_=h.length-g.length;m=`${d} ${n} ${" ".repeat(Math.max(0,_))}${g}`,p=`${S} ${s} ${" ".repeat(Math.max(0,-_))}${h}`}let b=`${s} ${r}${p}`;return`${t(`${n} ${e}${m}`)}\n${o(b)}\n\n`}function Rt(e,t,n){return Es(n,Ss(e))+(n.expand?gs(e,n):ps(e,n))+(t?n.truncateAnnotationColor(`\n${n.truncateAnnotation}`):"")}function We(e,t,n){let r=ge(n),[o,s]=Qn(ye(e)?[]:e,ye(t)?[]:t,r);return Rt(o,s,r)}function _s(e,t,n,r,o){if(ye(e)&&ye(n)&&(e=[],n=[]),ye(t)&&ye(r)&&(t=[],r=[]),e.length!==n.length||t.length!==r.length)return We(e,t,o);let[s,c]=Qn(n,r,o),a=0,u=0;return s.forEach((m=>{switch(m[0]){case z:m[1]=e[a],a+=1;break;case 1:m[1]=t[u],u+=1;break;default:m[1]=t[u],a+=1,u+=1}})),Rt(s,c,ge(o))}function Qn(e,t,n){let r=n?.truncateThreshold??!1,o=Math.max(Math.floor(n?.truncateThreshold??0),0),s=r?Math.min(e.length,o):e.length,c=r?Math.min(t.length,o):t.length,a=s!==e.length||c!==t.length,m=[],p=0,l=0;for(Gn(s,c,i(((g,h)=>e[g]===t[h]),"isCommon"),i(((g,h,f)=>{for(;p!==h;p+=1)m.push(new P(z,e[p]));for(;l!==f;l+=1)m.push(new P(1,t[l]));for(;0!==g;g-=1,p+=1,l+=1)m.push(new P(0,t[l]))}),"foundSubsequence"));p!==s;p+=1)m.push(new P(z,e[p]));for(;l!==c;l+=1)m.push(new P(1,t[l]));return[m,a]}function Dn(e){if(void 0===e)return"undefined";if(null===e)return"null";if(Array.isArray(e))return"array";if("boolean"==typeof e)return"boolean";if("function"==typeof e)return"function";if("number"==typeof e)return"number";if("string"==typeof e)return"string";if("bigint"==typeof e)return"bigint";if("object"==typeof e){if(null!=e){if(e.constructor===RegExp)return"regexp";if(e.constructor===Map)return"map";if(e.constructor===Set)return"set";if(e.constructor===Date)return"date"}return"object"}if("symbol"==typeof e)return"symbol";throw new Error(`value of unknown type: ${e}`)}function Fn(e){return e.includes("\r\n")?"\r\n":"\n"}function Ts(e,t,n){let r=n?.truncateThreshold??!1,o=Math.max(Math.floor(n?.truncateThreshold??0),0),s=e.length,c=t.length;if(r){let g=e.includes("\n"),h=t.includes("\n"),f=Fn(e),d=Fn(t),S=g?`${e.split(f,o).join(f)}\n`:e,_=h?`${t.split(d,o).join(d)}\n`:t;s=S.length,c=_.length}let a=s!==e.length||c!==t.length,m=0,p=0,l=[];return Gn(s,c,i(((g,h)=>e[g]===t[h]),"isCommon"),i(((g,h,f)=>{m!==h&&l.push(new P(z,e.slice(m,h))),p!==f&&l.push(new P(1,t.slice(p,f))),m=h+g,p=f+g,l.push(new P(0,t.slice(f,p)))}),"foundSubsequence")),m!==s&&l.push(new P(z,e.slice(m))),p!==c&&l.push(new P(1,t.slice(p))),[l,a]}function Cs(e,t,n){return t.reduce(((r,o)=>r+(0===o[0]?o[1]:o[0]===e&&0!==o[1].length?n(o[1]):"")),"")}i(ds,"getDefaultOptions"),i(ys,"getCompareKeys"),i(bs,"getContextLines"),i(ge,"normalizeDiffOptions"),i(ye,"isEmptyString"),i(Ss,"countChanges"),i(Es,"printAnnotation"),i(Rt,"printDiffLines"),i(We,"diffLinesUnified"),i(_s,"diffLinesUnified2"),i(Qn,"diffLinesRaw"),i(Dn,"getType"),i(Fn,"getNewLineSymbol"),i(Ts,"diffStrings"),i(Cs,"concatenateRelevantDiffs");var Pt=class Pt{op;line;lines;changeColor;constructor(t,n){this.op=t,this.line=[],this.lines=[],this.changeColor=n}pushSubstring(t){this.pushDiff(new P(this.op,t))}pushLine(){this.lines.push(1!==this.line.length?new P(this.op,Cs(this.op,this.line,this.changeColor)):this.line[0][0]===this.op?this.line[0]:new P(this.op,this.line[0][1])),this.line.length=0}isLineEmpty(){return 0===this.line.length}pushDiff(t){this.line.push(t)}align(t){let n=t[1];if(n.includes("\n")){let r=n.split("\n"),o=r.length-1;r.forEach(((s,c)=>{c{if(0===a){let u=new P(n,c);this.deleteBuffer.isLineEmpty()&&this.insertBuffer.isLineEmpty()?(this.flushChangeLines(),this.pushDiffCommonLine(u)):(this.pushDiffChangeLines(u),this.flushChangeLines())}else a{switch(s[0]){case z:n.align(s);break;case 1:r.align(s);break;default:o.align(s)}})),o.getLines()}function $s(e,t){if(t){let n=e.length-1;return e.some(((r,o)=>0===r[0]&&(o!==n||"\n"!==r[1])))}return e.some((n=>0===n[0]))}function ws(e,t,n){if(e!==t&&0!==e.length&&0!==t.length){let r=e.includes("\n")||t.includes("\n"),[o,s]=vn(r?`${e}\n`:e,r?`${t}\n`:t,!0,n);if($s(o,r)){let c=ge(n);return Rt(Os(o,c.changeColor),s,c)}}return We(e.split("\n"),t.split("\n"),n)}function vn(e,t,n,r){let[o,s]=Ts(e,t,r);return n&&ss(o),[o,s]}function Ct(e,t){let{commonColor:n}=ge(t);return n(e)}i(Os,"getAlignedDiffs"),i($s,"hasCommonDiff"),i(ws,"diffStringsUnified"),i(vn,"diffStringsRaw"),i(Ct,"getCommonMessage");var{AsymmetricMatcher:Rs,DOMCollection:As,DOMElement:Ps,Immutable:Ns,ReactElement:Is,ReactTestComponent:Ms}=_e,er=[Ms,Is,Ps,As,Ns,Rs,_e.Error],Ot={maxDepth:20,plugins:er},tr={callToJSON:!1,maxDepth:8,plugins:er};function Ls(e,t,n){if(Object.is(e,t))return"";let r=Dn(e),o=r,s=!1;if("object"===r&&"function"==typeof e.asymmetricMatch){if(e.$$typeof!==Symbol.for("jest.asymmetricMatcher")||"function"!=typeof e.getExpectedType)return;o=e.getExpectedType(),s="string"===o}if(o!==Dn(t)){let d=function(O){return O.length<=f?O:`${O.slice(0,f)}...`};i(d,"truncate");let{aAnnotation:c,aColor:a,aIndicator:u,bAnnotation:m,bColor:p,bIndicator:l}=ge(n),b=$t(tr,n),g=X(e,b),h=X(t,b),f=1e5;return g=d(g),h=d(h),`${`${a(`${u} ${c}:`)} \n${g}`}\n\n${`${p(`${l} ${m}:`)} \n${h}`}`}if(!s)switch(r){case"string":return We(e.split("\n"),t.split("\n"),n);case"boolean":case"number":return xs(e,t,n);case"map":return _t(jn(e),jn(t),n);case"set":return _t(kn(e),kn(t),n);default:return _t(e,t,n)}}function xs(e,t,n){let r=X(e,Ot),o=X(t,Ot);return r===o?"":We(r.split("\n"),o.split("\n"),n)}function jn(e){return new Map(Array.from(e.entries()).sort())}function kn(e){return new Set(Array.from(e.values()).sort())}function _t(e,t,n){let r,o=!1;try{r=Bn(e,t,$t(Ot,n),n)}catch{o=!0}let s=Ct(Kn,n);if(void 0===r||r===s){r=Bn(e,t,$t(tr,n),n),r!==s&&!o&&(r=`${Ct("Compared values serialize to the same structure.\nPrinting internal object structure without calling `toJSON` instead.",n)}\n\n${r}`)}return r}function $t(e,t){let{compareKeys:n,printBasicPrototype:r,maxDepth:o}=ge(t);return{...e,compareKeys:n,printBasicPrototype:r,maxDepth:o??e.maxDepth}}function Bn(e,t,n,r){let o={...n,indent:0},s=X(e,o),c=X(t,o);if(s===c)return Ct(Kn,r);{let a=X(e,n),u=X(t,n);return _s(a.split("\n"),u.split("\n"),s.split("\n"),c.split("\n"),r)}}i(Ls,"diff"),i(xs,"comparePrimitive"),i(jn,"sortMap"),i(kn,"sortSet"),i(_t,"compareObjects"),i($t,"getFormatOptions"),i(Bn,"getObjectsDifference");function Yn(e){return"Object"===Be(e)&&"function"==typeof e.asymmetricMatch}function Un(e,t){let n=Be(e);return n===Be(t)&&("Object"===n||"Array"===n)}function nr(e,t,n){let{aAnnotation:r,bAnnotation:o}=ge(n);if("string"==typeof t&&"string"==typeof e&&t.length>0&&e.length>0&&t.length<=2e4&&e.length<=2e4&&t!==e){if(t.includes("\n")||e.includes("\n"))return ws(t,e,n);let[p]=vn(t,e,!0),l=p.some((f=>0===f[0])),b=Ds(r,o);return`${b(r)+ks(Wn(p,z,l))}\n${b(o)+js(Wn(p,1,l))}`}let s=St(t,{forceWritable:!0}),c=St(e,{forceWritable:!0}),{replacedExpected:a,replacedActual:u}=rr(c,s);return Ls(a,u,n)}function rr(e,t,n=new WeakSet,r=new WeakSet){return e instanceof Error&&t instanceof Error&&typeof e.cause<"u"&&typeof t.cause>"u"?(delete e.cause,{replacedActual:e,replacedExpected:t}):Un(e,t)?(n.has(e)||r.has(t)||(n.add(e),r.add(t),bt(t).forEach((o=>{let s=t[o],c=e[o];if(Yn(s))s.asymmetricMatch(c)&&(e[o]=s);else if(Yn(c))c.asymmetricMatch(s)&&(t[o]=c);else if(Un(c,s)){let a=rr(c,s,n,r);e[o]=a.replacedActual,t[o]=a.replacedExpected}}))),{replacedActual:e,replacedExpected:t}):{replacedActual:e,replacedExpected:t}}function Ds(...e){let t=e.reduce(((n,r)=>r.length>n?r.length:n),0);return n=>`${n}: ${" ".repeat(t-n.length)}`}i(Yn,"isAsymmetricMatcher"),i(Un,"isReplaceable"),i(nr,"printDiffOrStringify"),i(rr,"replaceAsymmetricMatcher"),i(Ds,"getLabelPrinter");var Fs="·";function or(e){return e.replace(/\s+$/gm,(t=>Fs.repeat(t.length)))}function js(e){return v.red(or(pe(e)))}function ks(e){return v.green(or(pe(e)))}function Wn(e,t,n){return e.reduce(((r,o)=>r+(0===o[0]?o[1]:o[0]===t?n?v.inverse(o[1]):o[1]:"")),"")}i(or,"replaceTrailingSpaces"),i(js,"printReceived"),i(ks,"printExpected"),i(Wn,"getCommonAndChangedSubstrings");function Ys(e){return e&&(e["@@__IMMUTABLE_ITERABLE__@@"]||e["@@__IMMUTABLE_RECORD__@@"])}i(Ys,"isImmutable");var Us=Object.getPrototypeOf({});function sr(e){return e instanceof Error?`: ${e.message}`:"string"==typeof e?`: ${e}`:""}function le(e,t=new WeakMap){if(!e||"string"==typeof e)return e;if(e instanceof Error&&"toJSON"in e&&"function"==typeof e.toJSON){let n=e.toJSON();return n&&n!==e&&"object"==typeof n&&("string"==typeof e.message&&Ve((()=>n.message??(n.message=e.message))),"string"==typeof e.stack&&Ve((()=>n.stack??(n.stack=e.stack))),"string"==typeof e.name&&Ve((()=>n.name??(n.name=e.name))),null!=e.cause&&Ve((()=>n.cause??(n.cause=le(e.cause,t))))),le(n,t)}if("function"==typeof e)return`Function<${e.name||"anonymous"}>`;if("symbol"==typeof e)return e.toString();if("object"!=typeof e)return e;if(typeof Buffer<"u"&&e instanceof Buffer)return``;if(typeof Uint8Array<"u"&&e instanceof Uint8Array)return``;if(Ys(e))return le(e.toJSON(),t);if(e instanceof Promise||e.constructor&&"AsyncFunction"===e.constructor.prototype)return"Promise";if(typeof Element<"u"&&e instanceof Element)return e.tagName;if("function"==typeof e.asymmetricMatch)return`${e.toString()} ${wn(e.sample)}`;if("function"==typeof e.toJSON)return le(e.toJSON(),t);if(t.has(e))return t.get(e);if(Array.isArray(e)){let n=new Array(e.length);return t.set(e,n),e.forEach(((r,o)=>{try{n[o]=le(r,t)}catch(s){n[o]=sr(s)}})),n}{let n=Object.create(null);t.set(e,n);let r=e;for(;r&&r!==Us;)Object.getOwnPropertyNames(r).forEach((o=>{if(!(o in n))try{n[o]=le(e[o],t)}catch(s){delete n[o],n[o]=sr(s)}})),r=Object.getPrototypeOf(r);return n}}function Ve(e){try{return e()}catch{}}function Ws(e){return e.replace(/__(vite_ssr_import|vi_import)_\d+__\./g,"")}function It(e,t,n=new WeakSet){if(!e||"object"!=typeof e)return{message:String(e)};let r=e;(r.showDiff||void 0===r.showDiff&&void 0!==r.expected&&void 0!==r.actual)&&(r.diff=nr(r.actual,r.expected,{...t,...r.diffOptions})),"expected"in r&&"string"!=typeof r.expected&&(r.expected=pe(r.expected,10)),"actual"in r&&"string"!=typeof r.actual&&(r.actual=pe(r.actual,10));try{"string"==typeof r.message&&(r.message=Ws(r.message))}catch{}try{!n.has(r)&&"object"==typeof r.cause&&(n.add(r),r.cause=It(r.cause,t,n))}catch{}try{return le(r)}catch(o){return le(new Error(`Failed to fully serialize error: ${o?.message}\nInner error message: ${r?.message}`))}}i(sr,"getUnserializableMessage"),i(le,"serializeValue"),i(Ve,"safe"),i(Ws,"normalizeErrorMessage"),i(It,"processError");var ne_CALL="storybook/instrumenter/call",ne_SYNC="storybook/instrumenter/sync",ne_START="storybook/instrumenter/start",ne_BACK="storybook/instrumenter/back",ne_GOTO="storybook/instrumenter/goto",ne_NEXT="storybook/instrumenter/next",ne_END="storybook/instrumenter/end",qe=globalThis.__STORYBOOK_ADDONS_PREVIEW,Hs=new Error("This function ran after the play function completed. Did you forget to `await` it?"),cr=i((e=>"[object Object]"===Object.prototype.toString.call(e)),"isObject"),Js=i((e=>"[object Module]"===Object.prototype.toString.call(e)),"isModule"),Xs=i((e=>{if(!cr(e)&&!Js(e))return!1;if(void 0===e.constructor)return!0;let t=e.constructor.prototype;return!!cr(t)}),"isInstrumentable"),Zs=i((e=>{try{return new e.constructor}catch{return{}}}),"construct"),Mt=i((()=>({renderPhase:"preparing",isDebugging:!1,isPlaying:!1,isLocked:!1,cursor:0,calls:[],shadowCalls:[],callRefsByResult:new Map,chainedCallIds:new Set,ancestors:[],playUntil:void 0,resolvers:{},syncTimeout:void 0})),"getInitialState"),ur=i(((e,t=!1)=>{let n=(t?e.shadowCalls:e.calls).filter((o=>o.retain));if(!n.length)return;let r=new Map(Array.from(e.callRefsByResult.entries()).filter((([,o])=>o.retain)));return{cursor:n.length,calls:n,callRefsByResult:r}}),"getRetainedState"),xt=class xt{constructor(){this.detached=!1,this.initialized=!1,this.state={},this.loadParentWindowState=i((()=>{try{this.state=external_STORYBOOK_MODULE_GLOBAL_.global.window?.parent?.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER_STATE__||{}}catch{this.detached=!0}}),"loadParentWindowState"),this.updateParentWindowState=i((()=>{try{external_STORYBOOK_MODULE_GLOBAL_.global.window.parent.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER_STATE__=this.state}catch{this.detached=!0}}),"updateParentWindowState"),this.loadParentWindowState();let t=i((({storyId:u,renderPhase:m,isPlaying:p=!0,isDebugging:l=!1})=>{let b=this.getState(u);this.setState(u,{...Mt(),...ur(b,l),renderPhase:m||b.renderPhase,shadowCalls:l?b.shadowCalls:[],chainedCallIds:l?b.chainedCallIds:new Set,playUntil:l?b.playUntil:void 0,isPlaying:p,isDebugging:l}),this.sync(u)}),"resetState"),n=i((u=>({storyId:m,playUntil:p})=>{this.getState(m).isDebugging||this.setState(m,(({calls:b})=>({calls:[],shadowCalls:b.map((g=>({...g,status:"waiting"}))),isDebugging:!0})));let l=this.getLog(m);this.setState(m,(({shadowCalls:b})=>{if(p||!l.length)return{playUntil:p};let g=b.findIndex((h=>h.id===l[0].callId));return{playUntil:b.slice(0,g).filter((h=>h.interceptable&&!h.ancestors?.length)).slice(-1)[0]?.id}})),u.emit(external_STORYBOOK_MODULE_CORE_EVENTS_.FORCE_REMOUNT,{storyId:m,isDebugging:!0})}),"start"),r=i((u=>({storyId:m})=>{let p=this.getLog(m).filter((b=>!b.ancestors?.length)),l=p.reduceRight(((b,g,h)=>b>=0||"waiting"===g.status?b:h),-1);n(u)({storyId:m,playUntil:p[l-1]?.callId})}),"back"),o=i((u=>({storyId:m,callId:p})=>{let{calls:l,shadowCalls:b,resolvers:g}=this.getState(m),h=l.find((({id:d})=>d===p)),f=b.find((({id:d})=>d===p));if(!h&&f&&Object.values(g).length>0){let d=this.getLog(m).find((S=>"waiting"===S.status))?.callId;f.id!==d&&this.setState(m,{playUntil:f.id}),Object.values(g).forEach((S=>S()))}else n(u)({storyId:m,playUntil:p})}),"goto"),s=i((u=>({storyId:m})=>{let{resolvers:p}=this.getState(m);if(Object.values(p).length>0)Object.values(p).forEach((l=>l()));else{let l=this.getLog(m).find((b=>"waiting"===b.status))?.callId;l?n(u)({storyId:m,playUntil:l}):c({storyId:m})}}),"next"),c=i((({storyId:u})=>{this.setState(u,{playUntil:void 0,isDebugging:!1}),Object.values(this.getState(u).resolvers).forEach((m=>m()))}),"end"),a=i((({storyId:u,newPhase:m})=>{let{isDebugging:p}=this.getState(u);return"preparing"===m&&p?t({storyId:u,renderPhase:m}):"playing"===m?t({storyId:u,renderPhase:m,isDebugging:p}):("played"===m?this.setState(u,{renderPhase:m,isLocked:!1,isPlaying:!1,isDebugging:!1}):"errored"===m?this.setState(u,{renderPhase:m,isLocked:!1,isPlaying:!1}):"aborted"===m?this.setState(u,{renderPhase:m,isLocked:!0,isPlaying:!1}):this.setState(u,{renderPhase:m}),void this.sync(u))}),"renderPhaseChanged");qe&&qe.ready().then((()=>{this.channel=qe.getChannel(),this.channel.on(external_STORYBOOK_MODULE_CORE_EVENTS_.FORCE_REMOUNT,t),this.channel.on(external_STORYBOOK_MODULE_CORE_EVENTS_.STORY_RENDER_PHASE_CHANGED,a),this.channel.on(external_STORYBOOK_MODULE_CORE_EVENTS_.SET_CURRENT_STORY,(()=>{this.initialized?this.cleanup():this.initialized=!0})),this.channel.on(ne_START,n(this.channel)),this.channel.on(ne_BACK,r(this.channel)),this.channel.on(ne_GOTO,o(this.channel)),this.channel.on(ne_NEXT,s(this.channel)),this.channel.on(ne_END,c)}))}getState(t){return this.state[t]||Mt()}setState(t,n){if(t){let r=this.getState(t),o="function"==typeof n?n(r):n;this.state={...this.state,[t]:{...r,...o}},this.updateParentWindowState()}}cleanup(){this.state=Object.entries(this.state).reduce(((r,[o,s])=>{let c=ur(s);return c&&(r[o]=Object.assign(Mt(),c)),r}),{});let n={controlStates:{detached:this.detached,start:!1,back:!1,goto:!1,next:!1,end:!1},logItems:[]};this.channel?.emit(ne_SYNC,n),this.updateParentWindowState()}getLog(t){let{calls:n,shadowCalls:r}=this.getState(t),o=[...r];n.forEach(((c,a)=>{o[a]=c}));let s=new Set;return o.reduceRight(((c,a)=>(a.args.forEach((u=>{u?.__callId__&&s.add(u.__callId__)})),a.path.forEach((u=>{u.__callId__&&s.add(u.__callId__)})),(a.interceptable||a.exception)&&!s.has(a.id)&&(c.unshift({callId:a.id,status:a.status,ancestors:a.ancestors}),s.add(a.id)),c)),[])}instrument(t,n,r=0){if(!Xs(t))return t;let{mutate:o=!1,path:s=[]}=n,c=n.getKeys?n.getKeys(t,r):Object.keys(t);return r+=1,c.reduce(((a,u)=>{let m=vs(t,u);if("function"==typeof m?.get){if(m.configurable){let l=i((()=>m?.get?.bind(t)?.()),"getter");Object.defineProperty(a,u,{get:i((()=>this.instrument(l(),{...n,path:s.concat(u)},r)),"get")})}return a}let p=t[u];return"function"!=typeof p?(a[u]=this.instrument(p,{...n,path:s.concat(u)},r),a):"__originalFn__"in p&&"function"==typeof p.__originalFn__?(a[u]=p,a):(a[u]=(...l)=>this.track(u,p,t,l,n),a[u].__originalFn__=p,Object.defineProperty(a[u],"name",{value:u,writable:!1}),Object.keys(p).length>0&&Object.assign(a[u],this.instrument({...p},{...n,path:s.concat(u)},r)),a)}),o?t:Zs(t))}track(t,n,r,o,s){let c=o?.[0]?.__storyId__||external_STORYBOOK_MODULE_GLOBAL_.global.__STORYBOOK_PREVIEW__?.selectionStore?.selection?.storyId,{cursor:a,ancestors:u}=this.getState(c);this.setState(c,{cursor:a+1});let m=`${u.slice(-1)[0]||c} [${a}] ${t}`,{path:p=[],intercept:l=!1,retain:b=!1}=s,g="function"==typeof l?l(t,p):l,h={id:m,cursor:a,storyId:c,ancestors:u,path:p,method:t,args:o,interceptable:g,retain:b},d=(g&&!u.length?this.intercept:this.invoke).call(this,n,r,h,s);return this.instrument(d,{...s,mutate:!0,path:[{__callId__:h.id}]})}intercept(t,n,r,o){let{chainedCallIds:s,isDebugging:c,playUntil:a}=this.getState(r.storyId),u=s.has(r.id);return!c||u||a?(a===r.id&&this.setState(r.storyId,{playUntil:void 0}),this.invoke(t,n,r,o)):new Promise((m=>{this.setState(r.storyId,(({resolvers:p})=>({isLocked:!1,resolvers:{...p,[r.id]:m}})))})).then((()=>(this.setState(r.storyId,(m=>{let{[r.id]:p,...l}=m.resolvers;return{isLocked:!0,resolvers:l}})),this.invoke(t,n,r,o))))}invoke(t,n,r,o){let{callRefsByResult:s,renderPhase:c}=this.getState(r.storyId),u=i(((l,b,g)=>{if(g.includes(l))return"[Circular]";if(g=[...g,l],b>25)return"...";if(s.has(l))return s.get(l);if(l instanceof Array)return l.map((h=>u(h,++b,g)));if(l instanceof Date)return{__date__:{value:l.toISOString()}};if(l instanceof Error){let{name:h,message:f,stack:d}=l;return{__error__:{name:h,message:f,stack:d}}}if(l instanceof RegExp){let{flags:h,source:f}=l;return{__regexp__:{flags:h,source:f}}}if(l instanceof external_STORYBOOK_MODULE_GLOBAL_.global.window?.HTMLElement){let{prefix:h,localName:f,id:d,classList:S,innerText:_}=l;return{__element__:{prefix:h,localName:f,id:d,classNames:Array.from(S),innerText:_}}}return"function"==typeof l?{__function__:{name:"getMockName"in l?l.getMockName():l.name}}:"symbol"==typeof l?{__symbol__:{description:l.description}}:"object"==typeof l&&l?.constructor?.name&&"Object"!==l?.constructor?.name?{__class__:{name:l.constructor.name}}:"[object Object]"===Object.prototype.toString.call(l)?Object.fromEntries(Object.entries(l).map((([h,f])=>[h,u(f,++b,g)]))):l}),"serializeValues"),m={...r,args:r.args.map((l=>u(l,0,[])))};r.path.forEach((l=>{l?.__callId__&&this.setState(r.storyId,(({chainedCallIds:b})=>({chainedCallIds:new Set(Array.from(b).concat(l.__callId__))})))}));let p=i((l=>{if(l instanceof Error){let{name:b,message:g,stack:h,callId:f=r.id}=l,{showDiff:d,diff:S,actual:_,expected:O}="AssertionError"===l.name?It(l):l,y={name:b,message:g,stack:h,callId:f,showDiff:d,diff:S,actual:_,expected:O};if(this.update({...m,status:"error",exception:y}),this.setState(r.storyId,(E=>({callRefsByResult:new Map([...Array.from(E.callRefsByResult.entries()),[l,{__callId__:r.id,retain:r.retain}]])}))),r.ancestors?.length)throw Object.prototype.hasOwnProperty.call(l,"callId")||Object.defineProperty(l,"callId",{value:r.id}),l}throw l}),"handleException");try{if("played"===c&&!r.retain)throw Hs;let b=(o.getArgs?o.getArgs(r,this.getState(r.storyId)):r.args).map((h=>"function"!=typeof h||ei(h)||Object.keys(h).length?h:(...f)=>{let{cursor:d,ancestors:S}=this.getState(r.storyId);this.setState(r.storyId,{cursor:0,ancestors:[...S,r.id]});let _=i((()=>this.setState(r.storyId,{cursor:d,ancestors:S})),"restore"),O=!1;try{let y=h(...f);return y instanceof Promise?(O=!0,y.finally(_)):y}finally{O||_()}})),g=t.apply(n,b);return g&&["object","function","symbol"].includes(typeof g)&&this.setState(r.storyId,(h=>({callRefsByResult:new Map([...Array.from(h.callRefsByResult.entries()),[g,{__callId__:r.id,retain:r.retain}]])}))),this.update({...m,status:g instanceof Promise?"active":"done"}),g instanceof Promise?g.then((h=>(this.update({...m,status:"done"}),h)),p):g}catch(l){return p(l)}}update(t){this.channel?.emit(ne_CALL,t),this.setState(t.storyId,(({calls:n})=>{let r=n.concat(t).reduce(((o,s)=>Object.assign(o,{[s.id]:s})),{});return{calls:Object.values(r).sort(((o,s)=>o.id.localeCompare(s.id,void 0,{numeric:!0})))}})),this.sync(t.storyId)}sync(t){let n=i((()=>{let{isLocked:r,isPlaying:o}=this.getState(t),s=this.getLog(t),c=s.filter((({ancestors:l})=>!l.length)).find((l=>"waiting"===l.status))?.callId,a=s.some((l=>"active"===l.status));if(this.detached||r||a||0===s.length){let b={controlStates:{detached:this.detached,start:!1,back:!1,goto:!1,next:!1,end:!1},logItems:s};return void this.channel?.emit(ne_SYNC,b)}let u=s.some((l=>"done"===l.status||"error"===l.status)),p={controlStates:{detached:this.detached,start:u,back:u,goto:!0,next:o,end:o},logItems:s,pausedAt:c};this.channel?.emit(ne_SYNC,p)}),"synchronize");this.setState(t,(({syncTimeout:r})=>(clearTimeout(r),{syncTimeout:setTimeout(n,0)})))}};i(xt,"Instrumenter");var Lt=xt;function Qs(e,t={}){try{let n=!1,r=!1;return external_STORYBOOK_MODULE_GLOBAL_.global.window?.location?.search?.includes("instrument=true")?n=!0:external_STORYBOOK_MODULE_GLOBAL_.global.window?.location?.search?.includes("instrument=false")&&(r=!0),external_STORYBOOK_MODULE_GLOBAL_.global.window?.parent===external_STORYBOOK_MODULE_GLOBAL_.global.window&&!n||r?e:(external_STORYBOOK_MODULE_GLOBAL_.global.window&&!external_STORYBOOK_MODULE_GLOBAL_.global.window.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER__&&(external_STORYBOOK_MODULE_GLOBAL_.global.window.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER__=new Lt),(external_STORYBOOK_MODULE_GLOBAL_.global.window?.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER__).instrument(e,t))}catch(n){return external_STORYBOOK_MODULE_CLIENT_LOGGER_.once.warn(n),e}}function vs(e,t){let n=e;for(;null!=n;){let r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function ei(e){if("function"!=typeof e)return!1;let t=Object.getOwnPropertyDescriptor(e,"prototype");return!!t&&!t.writable}i(Qs,"instrument"),i(vs,"getPropertyDescriptor"),i(ei,"isClass");var e,t,csf_Br=Object.create,csf_ce=Object.defineProperty,csf_zr=Object.getOwnPropertyDescriptor,csf_Ur=Object.getOwnPropertyNames,csf_Gr=Object.getPrototypeOf,csf_Wr=Object.prototype.hasOwnProperty,n=(e,t)=>csf_ce(e,"name",{value:t,configurable:!0}),csf_xt=(e,t)=>{for(var r in t)csf_ce(e,r,{get:t[r],enumerable:!0})},csf_Tt=(e=Ee=>{Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.isEqual=function(){var e=Object.prototype.toString,t=Object.getPrototypeOf,r=Object.getOwnPropertySymbols?function(o){return Object.keys(o).concat(Object.getOwnPropertySymbols(o))}:Object.keys;return function(o,i){return n((function s(a,p,c){var l,y,u,h=e.call(a),T=e.call(p);if(a===p)return!0;if(null==a||null==p)return!1;if(c.indexOf(a)>-1&&c.indexOf(p)>-1)return!0;if(c.push(a,p),h!=T||(l=r(a),y=r(p),l.length!=y.length||l.some((function(R){return!s(a[R],p[R],c)}))))return!1;switch(h.slice(8,-1)){case"Symbol":return a.valueOf()==p.valueOf();case"Date":case"Number":return+a==+p||+a!=+a&&+p!=+p;case"RegExp":case"Function":case"String":case"Boolean":return""+a==""+p;case"Set":case"Map":l=a.entries(),y=p.entries();do{if(!s((u=l.next()).value,y.next().value,c))return!1}while(!u.done);return!0;case"ArrayBuffer":a=new Uint8Array(a),p=new Uint8Array(p);case"DataView":a=new Uint8Array(a.buffer),p=new Uint8Array(p.buffer);case"Float32Array":case"Float64Array":case"Int8Array":case"Int16Array":case"Int32Array":case"Uint8Array":case"Uint16Array":case"Uint32Array":case"Uint8ClampedArray":case"Arguments":case"Array":if(a.length!=p.length)return!1;for(u=0;u(t||e((t={exports:{}}).exports,t),t.exports));function csf_bt(e){return e.replace(/_/g," ").replace(/-/g," ").replace(/\./g," ").replace(/([^\n])([A-Z])([a-z])/g,((t,r,o,i)=>`${r} ${o}${i}`)).replace(/([a-z])([A-Z])/g,((t,r,o)=>`${r} ${o}`)).replace(/([a-z])([0-9])/gi,((t,r,o)=>`${r} ${o}`)).replace(/([0-9])([a-z])/gi,((t,r,o)=>`${r} ${o}`)).replace(/(\s|^)(\w)/g,((t,r,o)=>`${r}${o.toUpperCase()}`)).replace(/ +/g," ").trim()}n(csf_bt,"toStartCaseStr");var Ce=((e,t,r)=>(r=null!=e?csf_Br(csf_Gr(e)):{},((e,t,r,o)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of csf_Ur(t))!csf_Wr.call(e,i)&&i!==r&&csf_ce(e,i,{get:()=>t[i],enumerable:!(o=csf_zr(t,i))||o.enumerable});return e})(!t&&e&&e.__esModule?r:csf_ce(r,"default",{value:e,enumerable:!0}),e)))(csf_Tt(),1),csf_St=n((e=>e.map((t=>typeof t<"u")).filter(Boolean).length),"count"),csf_qr=n(((e,t)=>{let{exists:r,eq:o,neq:i,truthy:s}=e;if(csf_St([r,o,i,s])>1)throw new Error(`Invalid conditional test ${JSON.stringify({exists:r,eq:o,neq:i})}`);if(typeof o<"u")return(0,Ce.isEqual)(t,o);if(typeof i<"u")return!(0,Ce.isEqual)(t,i);if(typeof r<"u"){let p=typeof t<"u";return r?p:!p}return typeof s>"u"||s?!!t:!t}),"testValue"),csf_Xr=n(((e,t,r)=>{if(!e.if)return!0;let{arg:o,global:i}=e.if;if(1!==csf_St([o,i]))throw new Error(`Invalid conditional value ${JSON.stringify({arg:o,global:i})}`);let s=o?t[o]:r[i];return csf_qr(e.if,s)}),"includeConditionalArg");function csf_At(){let e={setHandler:n((()=>{}),"setHandler"),send:n((()=>{}),"send")};return new external_STORYBOOK_MODULE_CHANNELS_.Channel({transport:e})}n(csf_At,"mockChannel");var csf_Me=class Me{constructor(){this.getChannel=n((()=>{if(!this.channel){let t=csf_At();return this.setChannel(t),t}return this.channel}),"getChannel"),this.ready=n((()=>this.promise),"ready"),this.hasChannel=n((()=>!!this.channel),"hasChannel"),this.setChannel=n((t=>{this.channel=t,this.resolve()}),"setChannel"),this.promise=new Promise((t=>{this.resolve=()=>t(this.getChannel())}))}};n(csf_Me,"AddonStore");var csf_Pe=csf_Me,csf_ke="__STORYBOOK_ADDONS_PREVIEW";function csf_Jr(){return external_STORYBOOK_MODULE_GLOBAL_.global[csf_ke]||(external_STORYBOOK_MODULE_GLOBAL_.global[csf_ke]=new csf_Pe),external_STORYBOOK_MODULE_GLOBAL_.global[csf_ke]}n(csf_Jr,"getAddonsStore");var Oe=csf_Jr(),csf_Ie=class Ie{constructor(){this.hookListsMap=void 0,this.mountedDecorators=void 0,this.prevMountedDecorators=void 0,this.currentHooks=void 0,this.nextHookIndex=void 0,this.currentPhase=void 0,this.currentEffects=void 0,this.prevEffects=void 0,this.currentDecoratorName=void 0,this.hasUpdates=void 0,this.currentContext=void 0,this.renderListener=n((t=>{t===this.currentContext?.id&&(this.triggerEffects(),this.currentContext=null,this.removeRenderListeners())}),"renderListener"),this.init()}init(){this.hookListsMap=new WeakMap,this.mountedDecorators=new Set,this.prevMountedDecorators=new Set,this.currentHooks=[],this.nextHookIndex=0,this.currentPhase="NONE",this.currentEffects=[],this.prevEffects=[],this.currentDecoratorName=null,this.hasUpdates=!1,this.currentContext=null}clean(){this.prevEffects.forEach((t=>{t.destroy&&t.destroy()})),this.init(),this.removeRenderListeners()}getNextHook(){let t=this.currentHooks[this.nextHookIndex];return this.nextHookIndex+=1,t}triggerEffects(){this.prevEffects.forEach((t=>{!this.currentEffects.includes(t)&&t.destroy&&t.destroy()})),this.currentEffects.forEach((t=>{this.prevEffects.includes(t)||(t.destroy=t.create())})),this.prevEffects=this.currentEffects,this.currentEffects=[]}addRenderListeners(){this.removeRenderListeners(),Oe.getChannel().on(external_STORYBOOK_MODULE_CORE_EVENTS_.STORY_RENDERED,this.renderListener)}removeRenderListeners(){Oe.getChannel().removeListener(external_STORYBOOK_MODULE_CORE_EVENTS_.STORY_RENDERED,this.renderListener)}};n(csf_Ie,"HooksContext");var csf_de=csf_Ie;function csf_wt(e){let t=n(((...r)=>{let{hooks:o}="function"==typeof r[0]?r[1]:r[0],i=o.currentPhase,s=o.currentHooks,a=o.nextHookIndex,p=o.currentDecoratorName;o.currentDecoratorName=e.name,o.prevMountedDecorators.has(e)?(o.currentPhase="UPDATE",o.currentHooks=o.hookListsMap.get(e)||[]):(o.currentPhase="MOUNT",o.currentHooks=[],o.hookListsMap.set(e,o.currentHooks),o.prevMountedDecorators.add(e)),o.nextHookIndex=0;let c=external_STORYBOOK_MODULE_GLOBAL_.global.STORYBOOK_HOOKS_CONTEXT;external_STORYBOOK_MODULE_GLOBAL_.global.STORYBOOK_HOOKS_CONTEXT=o;let l=e(...r);if(external_STORYBOOK_MODULE_GLOBAL_.global.STORYBOOK_HOOKS_CONTEXT=c,"UPDATE"===o.currentPhase&&null!=o.getNextHook())throw new Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");return o.currentPhase=i,o.currentHooks=s,o.nextHookIndex=a,o.currentDecoratorName=p,l}),"hookified");return t.originalFn=e,t}n(csf_wt,"hookify");var csf_Fe=0,csf_Et=n((e=>(t,r)=>{let o=e(csf_wt(t),r.map((i=>csf_wt(i))));return i=>{let{hooks:s}=i;s.prevMountedDecorators??=new Set,s.mountedDecorators=new Set([t,...r]),s.currentContext=i,s.hasUpdates=!1;let a=o(i);for(csf_Fe=1;s.hasUpdates;)if(s.hasUpdates=!1,s.currentEffects=[],a=o(i),(csf_Fe+=1)>25)throw new Error("Too many re-renders. Storybook limits the number of renders to prevent an infinite loop.");return s.addRenderListeners(),a}}),"applyHooks");function csf_ee(e){if(!e||"object"!=typeof e)return!1;let t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&"[object Object]"===Object.prototype.toString.call(e)}function U(e,t){let r={},o=Object.keys(e);for(let i=0;i{let{target:s=csf_De}=t[o]||{};r[s]=r[s]||{},r[s][o]=i})),r}n(csf_Ct,"groupArgsByTarget");var csf_vt=n(((e={})=>Object.entries(e).reduce(((t,[r,{defaultValue:o}])=>(typeof o<"u"&&(t[r]=o),t)),{})),"getValuesFromArgTypes"),csf_eo=n((e=>"string"==typeof e?{name:e}:e),"normalizeType"),csf_to=n((e=>"string"==typeof e?{type:e}:e),"normalizeControl"),csf_ro=n(((e,t)=>{let{type:r,control:o,...i}=e,s={name:t,...i};return r&&(s.type=csf_eo(r)),o?s.control=csf_to(o):!1===o&&(s.control={disable:!0}),s}),"normalizeInputType"),K=n((e=>U(e,csf_ro)),"normalizeInputTypes"),b=n((e=>Array.isArray(e)?e:e?[e]:[]),"normalizeArrays"),csf_ao=W` +CSF .story annotations deprecated; annotate story functions directly: +- StoryFn.story.name => StoryFn.storyName +- StoryFn.story.(parameters|decorators) => StoryFn.(parameters|decorators) +See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#hoisted-csf-annotations for details and codemod. +`;function csf_e(e,t,r){let o=t,i="function"==typeof t?t:null,{story:s}=o;s&&(external_STORYBOOK_MODULE_CLIENT_LOGGER_.logger.debug("deprecated story",s),(0,external_STORYBOOK_MODULE_CLIENT_LOGGER_.deprecate)(csf_ao));let a=cc(e),p="function"!=typeof o&&o.name||o.storyName||s?.name||a,c=[...b(o.decorators),...b(s?.decorators)],l={...s?.parameters,...o.parameters},y={...s?.args,...o.args},u={...s?.argTypes,...o.argTypes},h=[...b(o.loaders),...b(s?.loaders)],T=[...b(o.beforeEach),...b(s?.beforeEach)],R=[...b(o.afterEach),...b(s?.afterEach)],{render:P,play:L,tags:O=[],globals:F={}}=o;return{moduleExport:t,id:l.__id||lc(r.id,a),name:p,tags:O,decorators:c,parameters:l,args:y,argTypes:K(u),loaders:h,beforeEach:T,afterEach:R,globals:F,...P&&{render:P},...i&&{userStoryFn:i},...L&&{play:L}}}function csf_kt(e,t=e.title,r){let{id:o,argTypes:i}=e;return{id:csf_jn(o||t),...e,title:t,...i&&{argTypes:K(i)},parameters:{fileName:r,...e.parameters}}}function csf_Ot(e){return null!=e&&csf_lo(e).includes("mount")}function csf_lo(e){let t=e.toString().match(/[^(]*\(([^)]*)/);if(!t)return[];let r=csf_Pt(t[1]);if(!r.length)return[];let o=r[0];return o.startsWith("{")&&o.endsWith("}")?csf_Pt(o.slice(1,-1).replace(/\s/g,"")).map((s=>s.replace(/:.*|=.*/g,""))):[]}function csf_Pt(e){let t=[],r=[],o=0;for(let s=0;st(o,i)}function csf_$t({componentId:e,title:t,kind:r,id:o,name:i,story:s,parameters:a,initialArgs:p,argTypes:c,...l}={}){return l}function csf_He(e,t){let r={},o=n((s=>a=>{if(!r.value)throw new Error("Decorated function called without init");return r.value={...r.value,...csf_$t(a)},s(r.value)}),"bindWithContext"),i=t.reduce(((s,a)=>csf_Mt(s,a,o)),e);return s=>(r.value=s,i(s))}n(csf_e,"normalizeStory"),n(csf_kt,"normalizeComponentAnnotations"),n(csf_Ot,"mountDestructured"),n(csf_lo,"getUsedProps"),n(csf_Pt,"splitByComma"),n(csf_Mt,"decorateStory"),n(csf_$t,"sanitizeStoryContextUpdate"),n(csf_He,"defaultDecorateStory");var csf_D=n(((...e)=>{let t={},r=e.filter(Boolean),o=r.reduce(((i,s)=>(Object.entries(s).forEach((([a,p])=>{let c=i[a];Array.isArray(p)||typeof c>"u"?i[a]=p:csf_ee(p)&&csf_ee(c)?t[a]=!0:typeof p<"u"&&(i[a]=p)})),i)),{});return Object.keys(t).forEach((i=>{let s=r.filter(Boolean).map((a=>a[i])).filter((a=>typeof a<"u"));s.every((a=>csf_ee(a)))?o[i]=csf_D(...s):o[i]=s[s.length-1]})),o}),"combineParameters");function csf_Ne(e,t,r){let{moduleExport:o,id:i,name:s}=e||{},a=csf_go(e,t,r),p=n((async w=>{let d={};for(let m of[b(r.loaders),b(t.loaders),b(e.loaders)]){if(w.abortSignal.aborted)return d;let f=await Promise.all(m.map((x=>x(w))));Object.assign(d,...f)}return d}),"applyLoaders"),c=n((async w=>{let d=new Array;for(let m of[...b(r.beforeEach),...b(t.beforeEach),...b(e.beforeEach)]){if(w.abortSignal.aborted)return d;let f=await m(w);f&&d.push(f)}return d}),"applyBeforeEach"),l=n((async w=>{let d=[...b(r.afterEach),...b(t.afterEach),...b(e.afterEach)].reverse();for(let m of d){if(w.abortSignal.aborted)return;await m(w)}}),"applyAfterEach"),y=n((w=>w.originalStoryFn(w.args,w)),"undecoratedStoryFn"),{applyDecorators:u=csf_He,runStep:h}=r,T=[...b(e?.decorators),...b(t?.decorators),...b(r?.decorators)],R=e?.userStoryFn||e?.render||t.render||r.render,P=csf_Et(u)(y,T),L=n((w=>P(w)),"unboundStoryFn"),O=e?.play??t?.play,F=csf_Ot(O);if(!R&&!F)throw new external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_.NoRenderFunctionError({id:i});let A=n((w=>async()=>(await w.renderToCanvas(),w.canvas)),"defaultMount");return{storyGlobals:{},...a,moduleExport:o,id:i,name:s,story:s,originalStoryFn:R,undecoratedStoryFn:y,unboundStoryFn:L,applyLoaders:p,applyBeforeEach:c,applyAfterEach:l,playFunction:O,runStep:h,mount:e.mount??t.mount??r.mount??A,testingLibraryRender:r.testingLibraryRender,renderToCanvas:r.renderToCanvas,usesMount:F}}function csf_go(e,t,r){let i=!0===external_STORYBOOK_MODULE_GLOBAL_.global.DOCS_OPTIONS?.autodocs?["autodocs"]:[],s=uc("dev","test",...i,...r.tags??[],...t.tags??[],...e?.tags??[]),a=csf_D(r.parameters,t.parameters,e?.parameters),{argTypesEnhancers:p=[],argsEnhancers:c=[]}=r,l=csf_D(r.argTypes,t.argTypes,e?.argTypes);if(e){let O=e?.userStoryFn||e?.render||t.render||r.render;a.__isArgsStory=O&&O.length>0}let y={...r.args,...t.args,...e?.args},u={...t.globals,...e?.globals},h={componentId:t.id,title:t.title,kind:t.title,id:e?.id||t.id,name:e?.name||"__meta",story:e?.name||"__meta",component:t.component,subcomponents:t.subcomponents,tags:s,parameters:a,initialArgs:y,argTypes:l,storyGlobals:u};h.argTypes=p.reduce(((O,F)=>F({...h,argTypes:O})),h.argTypes);let T={...y};h.initialArgs=[...c].reduce(((O,F)=>({...O,...F({...h,initialArgs:O})})),T);let{name:R,story:P,...L}=h;return L}function csf_Ft(e){let{args:t}=e,r={...e,allArgs:void 0,argsByTarget:void 0};if(external_STORYBOOK_MODULE_GLOBAL_.global.FEATURES?.argTypeTargetsV7){let s=csf_Ct(e);r={...e,allArgs:e.args,argsByTarget:s,args:s[csf_De]||{}}}let o=Object.entries(r.args).reduce(((s,[a,p])=>{if(!r.argTypes[a]?.mapping)return s[a]=p,s;let c=n((l=>{let y=r.argTypes[a].mapping;return y&&l in y?y[l]:l}),"mappingFn");return s[a]=Array.isArray(p)?p.map(c):c(p),s}),{}),i=Object.entries(o).reduce(((s,[a,p])=>{let c=r.argTypes[a]||{};return csf_Xr(c,o,r.globals)&&(s[a]=p),s}),{});return{...r,unmappedArgs:t,args:i}}n(csf_Ne,"prepareStory"),n(csf_go,"preparePartialAnnotations"),n(csf_Ft,"prepareContext");var csf_je=n(((e,t,r)=>{let o=typeof e;switch(o){case"boolean":case"string":case"number":case"function":case"symbol":return{name:o}}return e?r.has(e)?(external_STORYBOOK_MODULE_CLIENT_LOGGER_.logger.warn(W` + We've detected a cycle in arg '${t}'. Args should be JSON-serializable. + + Consider using the mapping feature or fully custom args: + - Mapping: https://storybook.js.org/docs/writing-stories/args#mapping-to-complex-arg-values + - Custom args: https://storybook.js.org/docs/essentials/controls#fully-custom-args + `),{name:"other",value:"cyclic object"}):(r.add(e),Array.isArray(e)?{name:"array",value:e.length>0?csf_je(e[0],t,new Set(r)):{name:"other",value:"unknown"}}:{name:"object",value:U(e,(s=>csf_je(s,t,new Set(r))))}):{name:"object",value:{}}}),"inferType"),csf_Be=n((e=>{let{id:t,argTypes:r={},initialArgs:o={}}=e,i=U(o,((a,p)=>({name:p,type:csf_je(a,`${t}.${p}`,new Set)}))),s=U(r,((a,p)=>({name:p})));return csf_D(i,s,r)}),"inferArgTypes");csf_Be.secondPass=!0;var csf_It=n(((e,t)=>Array.isArray(t)?t.includes(e):e.match(t)),"matches"),csf_ze=n(((e,t,r)=>t||r?e&&csf_Le(e,((o,i)=>{let s=o.name||i.toString();return!(t&&!csf_It(s,t)||r&&csf_It(s,r))})):e),"filterArgTypes"),csf_bo=n(((e,t,r)=>{let{type:o,options:i}=e;if(o){if(r.color&&r.color.test(t)){let s=o.name;if("string"===s)return{control:{type:"color"}};"enum"!==s&&external_STORYBOOK_MODULE_CLIENT_LOGGER_.logger.warn(`Addon controls: Control of type color only supports string, received "${s}" instead`)}if(r.date&&r.date.test(t))return{control:{type:"date"}};switch(o.name){case"array":return{control:{type:"object"}};case"boolean":return{control:{type:"boolean"}};case"string":return{control:{type:"text"}};case"number":return{control:{type:"number"}};case"enum":{let{value:s}=o;return{control:{type:s?.length<=5?"radio":"select"},options:s}}case"function":case"symbol":return null;default:return{control:{type:i?"select":"object"}}}}}),"inferControl"),csf_me=n((e=>{let{argTypes:t,parameters:{__isArgsStory:r,controls:{include:o=null,exclude:i=null,matchers:s={}}={}}}=e;if(!r)return t;let a=csf_ze(t,o,i),p=U(a,((c,l)=>c?.type&&csf_bo(c,l.toString(),s)));return csf_D(p,a)}),"inferControls");function csf_te({argTypes:e,globalTypes:t,argTypesEnhancers:r,decorators:o,loaders:i,beforeEach:s,afterEach:a,initialGlobals:p,...c}){return{...e&&{argTypes:K(e)},...t&&{globalTypes:K(t)},decorators:b(o),loaders:b(i),beforeEach:b(s),afterEach:b(a),argTypesEnhancers:[...r||[],csf_Be,csf_me],initialGlobals:p,...c}}csf_me.secondPass=!0,n(csf_te,"normalizeProjectAnnotations");var csf_Lt=n((e=>async()=>{let t=[];for(let r of e){let o=await r();o&&t.unshift(o)}return async()=>{for(let r of t)await r()}}),"composeBeforeAllHooks");function csf_Ue(e){return async(t,r,o)=>{await e.reduceRight(((s,a)=>async()=>a(t,s,o)),(async()=>r(o)))()}}function oe(e,t){return e.map((r=>r.default?.[t]??r[t])).filter(Boolean)}function Y(e,t,r={}){return oe(e,t).reduce(((o,i)=>{let s=b(i);return r.reverseFileOrder?[...s,...o]:[...o,...s]}),[])}function ue(e,t){return Object.assign({},...oe(e,t))}function re(e,t){return oe(e,t).pop()}function csf_ne(e){let t=Y(e,"argTypesEnhancers"),r=oe(e,"runStep"),o=Y(e,"beforeAll");return{parameters:csf_D(...oe(e,"parameters")),decorators:Y(e,"decorators",{reverseFileOrder:!external_STORYBOOK_MODULE_GLOBAL_.global.FEATURES?.legacyDecoratorFileOrder}),args:ue(e,"args"),argsEnhancers:Y(e,"argsEnhancers"),argTypes:ue(e,"argTypes"),argTypesEnhancers:[...t.filter((i=>!i.secondPass)),...t.filter((i=>i.secondPass))],initialGlobals:ue(e,"initialGlobals"),globalTypes:ue(e,"globalTypes"),loaders:Y(e,"loaders"),beforeAll:csf_Lt(o),beforeEach:Y(e,"beforeEach"),afterEach:Y(e,"afterEach"),render:re(e,"render"),renderToCanvas:re(e,"renderToCanvas"),applyDecorators:re(e,"applyDecorators"),runStep:csf_Ue(r),tags:Y(e,"tags"),mount:re(e,"mount"),testingLibraryRender:re(e,"testingLibraryRender")}}function Dt(){try{return!!globalThis.__vitest_browser__||!!globalThis.window?.navigator?.userAgent?.match(/StorybookTestRunner/)}catch{return!1}}function csf_t(e=!0){if(!("document"in globalThis)||!("createElement"in globalThis.document))return()=>{};let t=document.createElement("style");t.textContent="*, *:before, *:after {\n animation: none !important;\n }",document.head.appendChild(t);let r=document.createElement("style");return r.textContent=`*, *:before, *:after {\n animation-delay: 0s !important;\n animation-direction: ${e?"reverse":"normal"} !important;\n animation-play-state: paused !important;\n transition: none !important;\n }`,document.head.appendChild(r),document.body.clientHeight,document.head.removeChild(t),()=>{r.parentNode?.removeChild(r)}}async function csf_Ht(e){if(!("document"in globalThis&&"getAnimations"in globalThis.document&&"querySelectorAll"in globalThis.document))return;let t=!1;await Promise.race([new Promise((r=>{setTimeout((()=>{let o=[globalThis.document,...csf_Nt(globalThis.document)],i=n((async()=>{if(t||e?.aborted)return;let s=o.flatMap((a=>a?.getAnimations?.()||[])).filter((a=>"running"===a.playState&&!csf_So(a)));s.length>0&&(await Promise.all(s.map((a=>a.finished))),await i())}),"checkAnimationsFinished");i().then(r)}),100)})),new Promise((r=>setTimeout((()=>{t=!0,r(void 0)}),5e3)))])}function csf_Nt(e){return[e,...e.querySelectorAll("*")].reduce(((t,r)=>("shadowRoot"in r&&r.shadowRoot&&t.push(r.shadowRoot,...csf_Nt(r.shadowRoot)),t)),[])}function csf_So(e){if(e instanceof CSSAnimation&&e.effect instanceof KeyframeEffect&&e.effect.target){let t=getComputedStyle(e.effect.target,e.effect.pseudoElement),r=t.animationName?.split(", ").indexOf(e.animationName);return"infinite"===t.animationIterationCount.split(", ")[r]}return!1}n(csf_Ue,"composeStepRunners"),n(oe,"getField"),n(Y,"getArrayField"),n(ue,"getObjectField"),n(re,"getSingletonField"),n(csf_ne,"composeConfigs"),n(Dt,"isTestEnvironment"),n(csf_t,"pauseAnimations"),n(csf_Ht,"waitForAnimations"),n(csf_Nt,"getShadowRoots"),n(csf_So,"isInfiniteAnimation");var csf_Ge=class Ge{constructor(){this.reports=[]}async addReport(t){this.reports.push(t)}};n(csf_Ge,"ReporterAPI");var csf_fe=csf_Ge,V=[];function csf_We(e,t,r,o,i){if(void 0===e)throw new Error("Expected a story but received undefined.");t.title=t.title??"ComposedStory";let R,s=csf_kt(t),a=i||e.storyName||e.story?.name||e.name||"Unnamed Story",p=csf_e(a,e,s),c=csf_te(csf_ne([o??globalThis.globalProjectAnnotations??{},r??{}])),l=csf_Ne(p,s,c),u={...csf_vt(c.globalTypes),...c.initialGlobals,...l.storyGlobals},h=new csf_fe,T=n((()=>{let A=csf_Ft({hooks:new csf_de,globals:u,args:{...l.initialArgs},viewMode:"story",reporting:h,loaded:{},abortSignal:(new AbortController).signal,step:n(((S,v)=>l.runStep(S,v,A)),"step"),canvasElement:null,canvas:{},userEvent:{},globalTypes:c.globalTypes,...l,context:null,mount:null});return A.parameters.__isPortableStory=!0,A.context=A,l.renderToCanvas&&(A.renderToCanvas=async()=>{let S=await(l.renderToCanvas?.({componentId:l.componentId,title:l.title,id:l.id,name:l.name,tags:l.tags,showMain:n((()=>{}),"showMain"),showError:n((v=>{throw new Error(`${v.title}\n${v.description}`)}),"showError"),showException:n((v=>{throw v}),"showException"),forceRemount:!0,storyContext:A,storyFn:n((()=>l.unboundStoryFn(A)),"storyFn"),unboundStoryFn:l.unboundStoryFn},A.canvasElement));S&&V.push(S)}),A.mount=l.mount(A),A}),"initializeContext"),P=n((async A=>{let S=T();return S.canvasElement??=globalThis?.document?.body,R&&(S.loaded=R.loaded),Object.assign(S,A),l.playFunction(S)}),"play"),L=n((A=>{let S=T();return Object.assign(S,A),csf_Eo(l,S)}),"run"),O=l.playFunction?P:void 0;return Object.assign(n((function(S){let v=T();return R&&(v.loaded=R.loaded),v.args={...v.initialArgs,...S},l.unboundStoryFn(v)}),"storyFn"),{id:l.id,storyName:a,load:n((async()=>{for(let S of[...V].reverse())await S();V.length=0;let A=T();A.loaded=await l.applyLoaders(A),V.push(...(await l.applyBeforeEach(A)).filter(Boolean)),R=A}),"load"),globals:u,args:l.initialArgs,parameters:l.parameters,argTypes:l.argTypes,play:O,run:L,reporting:h,tags:l.tags})}async function csf_Eo(e,t){for(let s of[...V].reverse())await s();if(V.length=0,!t.canvasElement){let s=document.createElement("div");globalThis?.document?.body?.appendChild(s),t.canvasElement=s,V.push((()=>{globalThis?.document?.body?.contains(s)&&globalThis?.document?.body?.removeChild(s)}))}if(t.loaded=await e.applyLoaders(t),t.abortSignal.aborted)return;V.push(...(await e.applyBeforeEach(t)).filter(Boolean));let i,r=e.playFunction,o=e.usesMount;o||await t.mount(),t.abortSignal.aborted||(r&&(o||(t.mount=async()=>{throw new external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_.MountMustBeDestructuredError({playFunction:r.toString()})}),await r(t)),Dt()?i=csf_t():await csf_Ht(t.abortSignal),await e.applyAfterEach(t),await(i?.()))}n(csf_We,"composeStory"),n(csf_Eo,"runStory");var csf_Ye="Invariant failed";function csf_ye(e,t){if(!e){false;var r="function"==typeof t?t():t,o=r?"".concat(csf_Ye,": ").concat(r):csf_Ye;throw new Error(o)}}n(csf_ye,"invariant");var Ke={};csf_xt(Ke,{argsEnhancers:()=>csf_Mo});var csf_Ve="storybook/actions",csf_jt=`${csf_Ve}/action-event`,csf_Bt={depth:10,clearOnStoryChange:!0,limit:50},csf_Ut=n(((e,t)=>{let r=Object.getPrototypeOf(e);return!r||t(r)?r:csf_Ut(r,t)}),"findProto"),csf_Po=n((e=>!("object"!=typeof e||!e||!csf_Ut(e,(t=>/^Synthetic(?:Base)?Event$/.test(t.constructor.name)))||"function"!=typeof e.persist)),"isReactSyntheticEvent"),csf_Oo=n((e=>{if(csf_Po(e)){let t=Object.create(e.constructor.prototype,Object.getOwnPropertyDescriptors(e));t.persist();let r=Object.getOwnPropertyDescriptor(t,"view"),o=r?.value;return"object"==typeof o&&"Window"===o?.constructor.name&&Object.defineProperty(t,"view",{...r,value:Object.create(o.constructor.prototype)}),t}return e}),"serializeArg");function csf_ie(e,t={}){let r={...csf_Bt,...t},o=n((function(...s){if(t.implicit){let T=("__STORYBOOK_PREVIEW__"in external_STORYBOOK_MODULE_GLOBAL_.global?external_STORYBOOK_MODULE_GLOBAL_.global.__STORYBOOK_PREVIEW__:void 0)?.storyRenders.find((R=>"playing"===R.phase||"rendering"===R.phase));if(T){let R=!globalThis?.FEATURES?.disallowImplicitActionsInRenderV8,P=new external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_.ImplicitActionsDuringRendering({phase:T.phase,name:e,deprecated:R});if(!R)throw P;console.warn(P)}}let a=external_STORYBOOK_MODULE_PREVIEW_API_.addons.getChannel(),p=Date.now().toString(36)+Math.random().toString(36).substring(2),l=s.map(csf_Oo),y=s.length>1?l:l[0],u={id:p,count:0,data:{name:e,args:y},options:{...r,maxDepth:5+(r.depth||3)}};a.emit(csf_jt,u)}),"actionHandler");return o.isAction=!0,o.implicit=t.implicit,o}n(csf_ie,"action");var csf_Gt=n(((e,t)=>typeof t[e]>"u"&&!(e in t)),"isInInitialArgs"),csf_Wt=n((e=>{let{initialArgs:t,argTypes:r,id:o,parameters:{actions:i}}=e;if(!i||i.disable||!i.argTypesRegex||!r)return{};let s=new RegExp(i.argTypesRegex);return Object.entries(r).filter((([p])=>!!s.test(p))).reduce(((p,[c,l])=>(csf_Gt(c,t)&&(p[c]=csf_ie(c,{implicit:!0,id:o})),p)),{})}),"inferActionsFromArgTypesRegex"),csf_Yt=n((e=>{let{initialArgs:t,argTypes:r,parameters:{actions:o}}=e;return o?.disable||!r?{}:Object.entries(r).filter((([s,a])=>!!a.action)).reduce(((s,[a,p])=>(csf_Gt(a,t)&&(s[a]=csf_ie("string"==typeof p.action?p.action:a)),s)),{})}),"addActionsFromArgTypes"),csf_Mo=[csf_Yt,csf_Wt],csf_qe={};csf_xt(csf_qe,{loaders:()=>csf_Io});var csf_Vt=!1,csf_Fo=n((e=>{let{parameters:t}=e;t?.actions?.disable||csf_Vt||((0,external_STORYBOOK_MODULE_TEST_.onMockCall)(((r,o)=>{let i=r.getMockName();"spy"!==i&&(!/^next\/.*::/.test(i)||["next/router::useRouter()","next/navigation::useRouter()","next/navigation::redirect","next/cache::","next/headers::cookies().set","next/headers::cookies().delete","next/headers::headers().set","next/headers::headers().delete"].some((s=>i.startsWith(s))))&&csf_ie(i)(o)})),csf_Vt=!0)}),"logActionsWhenMockCalled"),csf_Io=[csf_Fo],csf_Xe=n((()=>({...Ke,...csf_qe})),"default"),Z="backgrounds",csf_Kt={light:{name:"light",value:"#F8F8F8"},dark:{name:"dark",value:"#333"}},{document:N}=globalThis,csf_qt=n((()=>!!globalThis?.matchMedia&&!!globalThis.matchMedia("(prefers-reduced-motion: reduce)")?.matches),"isReduceMotionEnabled"),csf_Ze=n((e=>{(Array.isArray(e)?e:[e]).forEach(csf_o)}),"clearStyles"),csf_o=n((e=>{if(!N)return;let t=N.getElementById(e);t&&t.parentElement&&t.parentElement.removeChild(t)}),"clearStyle"),csf_Xt=n(((e,t)=>{if(!N)return;let r=N.getElementById(e);if(r)r.innerHTML!==t&&(r.innerHTML=t);else{let o=N.createElement("style");o.setAttribute("id",e),o.innerHTML=t,N.head.appendChild(o)}}),"addGridStyle"),csf_Zt=n(((e,t,r)=>{if(!N)return;let o=N.getElementById(e);if(o)o.innerHTML!==t&&(o.innerHTML=t);else{let i=N.createElement("style");i.setAttribute("id",e),i.innerHTML=t;let s="addon-backgrounds-grid"+(r?`-docs-${r}`:""),a=N.getElementById(s);a?a.parentElement?.insertBefore(i,a):N.head.appendChild(i)}}),"addBackgroundStyle"),Ho={cellSize:100,cellAmount:10,opacity:.8},csf_er="addon-backgrounds-grid",csf_No=csf_qt()?"":"transition: background-color 0.3s;",csf_tr=n(((e,t)=>{let{globals:r={},parameters:o={},viewMode:i,id:s}=t,{options:a=csf_Kt,disable:p,grid:c=Ho}=o[Z]||{},l=r[Z]||{},y="string"==typeof l?l:l?.value,u=y?a[y]:void 0,h="string"==typeof u?u:u?.value||"transparent",T="string"!=typeof l&&(l.grid||!1),R=!!u&&!p,P="docs"===i?`#anchor--${s} .docs-story`:".sb-show-main",L="docs"===i?`#anchor--${s} .docs-story`:".sb-show-main",O=void 0===o.layout||"padded"===o.layout,F="docs"===i?20:O?16:0,{cellAmount:A,cellSize:S,opacity:v,offsetX:w=F,offsetY:d=F}=c,m="docs"===i?`addon-backgrounds-docs-${s}`:"addon-backgrounds-color",f="docs"===i?s:null;(0,external_STORYBOOK_MODULE_PREVIEW_API_.useEffect)((()=>{R?csf_Zt(m,`\n ${P} {\n background: ${h} !important;\n ${csf_No}\n }`,f):csf_Ze(m)}),[P,m,f,R,h]);let x="docs"===i?`${csf_er}-docs-${s}`:`${csf_er}`;return(0,external_STORYBOOK_MODULE_PREVIEW_API_.useEffect)((()=>{if(!T)return void csf_Ze(x);let g=[`${S*A}px ${S*A}px`,`${S*A}px ${S*A}px`,`${S}px ${S}px`,`${S}px ${S}px`].join(", ");csf_Xt(x,`\n ${L} {\n background-size: ${g} !important;\n background-position: ${w}px ${d}px, ${w}px ${d}px, ${w}px ${d}px, ${w}px ${d}px !important;\n background-blend-mode: difference !important;\n background-image: linear-gradient(rgba(130, 130, 130, ${v}) 1px, transparent 1px),\n linear-gradient(90deg, rgba(130, 130, 130, ${v}) 1px, transparent 1px),\n linear-gradient(rgba(130, 130, 130, ${v/2}) 1px, transparent 1px),\n linear-gradient(90deg, rgba(130, 130, 130, ${v/2}) 1px, transparent 1px) !important;\n }\n `)}),[A,S,L,x,T,w,d,v]),e()}),"withBackgroundAndGrid"),csf_Bo=globalThis.FEATURES?.backgrounds?[csf_tr]:[],csf_zo={[Z]:{grid:{cellSize:20,opacity:.5,cellAmount:5},disable:!1}},csf_Uo={[Z]:{value:void 0,grid:!1}},csf_Je=n((()=>({decorators:csf_Bo,parameters:csf_zo,initialGlobals:csf_Uo})),"default"),{step:csf_Yo}=Qs({step:n((async(e,t,r)=>t(r)),"step")},{intercept:!0}),csf_Qe=n((()=>({parameters:{throwPlayFunctionExceptions:!1},runStep:csf_Yo})),"default"),csf_ge="storybook/highlight",csf_rr=`${csf_ge}/add`,csf_or=`${csf_ge}/remove`,csf_nr=`${csf_ge}/reset`,ir=`${csf_ge}/scroll-into-view`,csf_tt={chevronLeft:["M9.10355 10.1464C9.29882 10.3417 9.29882 10.6583 9.10355 10.8536C8.90829 11.0488 8.59171 11.0488 8.39645 10.8536L4.89645 7.35355C4.70118 7.15829 4.70118 6.84171 4.89645 6.64645L8.39645 3.14645C8.59171 2.95118 8.90829 2.95118 9.10355 3.14645C9.29882 3.34171 9.29882 3.65829 9.10355 3.85355L5.95711 7L9.10355 10.1464Z"],chevronRight:["M4.89645 10.1464C4.70118 10.3417 4.70118 10.6583 4.89645 10.8536C5.09171 11.0488 5.40829 11.0488 5.60355 10.8536L9.10355 7.35355C9.29882 7.15829 9.29882 6.84171 9.10355 6.64645L5.60355 3.14645C5.40829 2.95118 5.09171 2.95118 4.89645 3.14645C4.70118 3.34171 4.70118 3.65829 4.89645 3.85355L8.04289 7L4.89645 10.1464Z"],info:["M7 5.5a.5.5 0 01.5.5v4a.5.5 0 01-1 0V6a.5.5 0 01.5-.5zM7 4.5A.75.75 0 107 3a.75.75 0 000 1.5z","M7 14A7 7 0 107 0a7 7 0 000 14zm0-1A6 6 0 107 1a6 6 0 000 12z"],shareAlt:["M2 1.004a1 1 0 00-1 1v10a1 1 0 001 1h10a1 1 0 001-1v-4.5a.5.5 0 00-1 0v4.5H2v-10h4.5a.5.5 0 000-1H2z","M7.354 7.357L12 2.711v1.793a.5.5 0 001 0v-3a.5.5 0 00-.5-.5h-3a.5.5 0 100 1h1.793L6.646 6.65a.5.5 0 10.708.707z"]},csf_Vo="svg,path,rect,circle,line,polyline,polygon,ellipse,text".split(","),csf_M=n(((e,t={},r)=>{let o=csf_Vo.includes(e)?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e);return Object.entries(t).forEach((([i,s])=>{/[A-Z]/.test(i)?("onClick"===i&&(o.addEventListener("click",s),o.addEventListener("keydown",(a=>{("Enter"===a.key||" "===a.key)&&(a.preventDefault(),s())}))),"onMouseEnter"===i&&o.addEventListener("mouseenter",s),"onMouseLeave"===i&&o.addEventListener("mouseleave",s)):o.setAttribute(i,s)})),r?.forEach((i=>{if(null!=i&&!1!==i)try{o.appendChild(i)}catch{o.appendChild(document.createTextNode(String(i)))}})),o}),"createElement"),csf_ae=n((e=>csf_tt[e]&&csf_M("svg",{width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},csf_tt[e].map((t=>csf_M("path",{fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd",d:t}))))),"createIcon"),csf_sr=n((e=>{if("elements"in e){let{elements:o,color:i,style:s}=e;return{id:void 0,priority:0,selectors:o,styles:{outline:`2px ${s} ${i}`,outlineOffset:"2px",boxShadow:"0 0 0 6px rgba(255,255,255,0.6)"},menu:void 0}}let{menu:t,...r}=e;return{id:void 0,priority:0,styles:{outline:"2px dashed #029cfd"},...r,menu:Array.isArray(t)?t.every(Array.isArray)?t:[t]:void 0}}),"normalizeOptions"),csf_Ko=n((e=>e instanceof Function),"isFunction"),se=new Map,q=new Map,he=new Map,csf_z=n((e=>{let t=Symbol();return q.set(t,[]),se.set(t,e),{get:n((()=>se.get(t)),"get"),set:n((a=>{let p=se.get(t),c=csf_Ko(a)?a(p):a;c!==p&&(se.set(t,c),q.get(t)?.forEach((l=>{he.get(l)?.(),he.set(l,l(c))})))}),"set"),subscribe:n((a=>(q.get(t)?.push(a),()=>{let p=q.get(t);p&&q.set(t,p.filter((c=>c!==a)))})),"subscribe"),teardown:n((()=>{q.get(t)?.forEach((a=>{he.get(a)?.(),he.delete(a)})),q.delete(t),se.delete(t)}),"teardown")}}),"useStore"),csf_rt=n((e=>{let t=document.getElementById("storybook-root"),r=new Map;for(let o of e){let{priority:i=0}=o;for(let s of o.selectors){let a=[...document.querySelectorAll(`:is(${s}):not([id^="storybook-"], [id^="storybook-"] *, [class^="sb-"], [class^="sb-"] *)`),...t?.querySelectorAll(s)||[]];for(let p of a){let c=r.get(p);(!c||c.priority<=i)&&r.set(p,{...o,priority:i,selectors:Array.from(new Set((c?.selectors||[]).concat(s)))})}}}return r}),"mapElements"),ar=n((e=>Array.from(e.entries()).map((([t,{selectors:r,styles:o,hoverStyles:i,focusStyles:s,menu:a}])=>{let{top:p,left:c,width:l,height:y}=t.getBoundingClientRect(),{position:u}=getComputedStyle(t);return{element:t,selectors:r,styles:o,hoverStyles:i,focusStyles:s,menu:a,top:"fixed"===u?p:p+window.scrollY,left:"fixed"===u?c:c+window.scrollX,width:l,height:y}})).sort(((t,r)=>r.width*r.height-t.width*t.height))),"mapBoxes"),csf_ot=n(((e,t)=>{let r=e.getBoundingClientRect(),{x:o,y:i}=t;return r?.top&&r?.left&&o>=r.left&&o<=r.left+r.width&&i>=r.top&&i<=r.top+r.height}),"isOverMenu"),csf_nt=n(((e,t,r)=>{if(!t||!r)return!1;let{left:o,top:i,width:s,height:a}=e;a<28&&(i-=Math.round((28-a)/2),a=28),s<28&&(o-=Math.round((28-s)/2),s=28),"fixed"===t.style.position&&(o+=window.scrollX,i+=window.scrollY);let{x:p,y:c}=r;return p>=o&&p<=o+s&&c>=i&&c<=i+a}),"isTargeted"),csf_pr=n(((e,t,r={})=>{let{x:o,y:i}=t,{margin:s=5,topOffset:a=0,centered:p=!1}=r,{scrollX:c,scrollY:l,innerHeight:y,innerWidth:u}=window,h=Math.min("fixed"===e.style.position?i-l:i,y-e.clientHeight-s-a+l),T=p?e.clientWidth/2:0,R="fixed"===e.style.position?Math.max(Math.min(o-c,u-T-s),T+s):Math.max(Math.min(o,u-T-s+c),T+s+c);Object.assign(e.style,{...R!==o&&{left:`${R}px`},...h!==i&&{top:`${h}px`}})}),"keepInViewport"),csf_it=n((e=>{window.HTMLElement.prototype.hasOwnProperty("showPopover")&&e.showPopover()}),"showPopover"),csf_lr=n((e=>{window.HTMLElement.prototype.hasOwnProperty("showPopover")&&e.hidePopover()}),"hidePopover"),csf_cr=n((e=>({top:e.top,left:e.left,width:e.width,height:e.height,selectors:e.selectors,element:{attributes:Object.fromEntries(Array.from(e.element.attributes).map((t=>[t.name,t.value]))),localName:e.element.localName,tagName:e.element.tagName,outerHTML:e.element.outerHTML}})),"getEventDetails"),C="storybook-highlights-menu",csf_dr="storybook-highlights-root",csf_mr=n((e=>{if(globalThis.__STORYBOOK_HIGHLIGHT_INITIALIZED)return;globalThis.__STORYBOOK_HIGHLIGHT_INITIALIZED=!0;let{document:t}=globalThis,r=csf_z([]),o=csf_z(new Map),i=csf_z([]),s=csf_z(),a=csf_z(),p=csf_z([]),c=csf_z([]),l=csf_z(),y=csf_z(),u=t.getElementById(csf_dr);r.subscribe((()=>{u||(u=csf_M("div",{id:csf_dr}),t.body.appendChild(u))})),r.subscribe((d=>{let m=t.getElementById("storybook-root");if(!m)return;o.set(csf_rt(d));let f=new MutationObserver((()=>o.set(csf_rt(d))));return f.observe(m,{subtree:!0,childList:!0}),()=>{f.disconnect()}})),o.subscribe((d=>{let m=n((()=>requestAnimationFrame((()=>i.set(ar(d))))),"updateBoxes"),f=new ResizeObserver(m);f.observe(t.body),Array.from(d.keys()).forEach((g=>f.observe(g)));let x=Array.from(t.body.querySelectorAll("*")).filter((g=>{let{overflow:E,overflowX:I,overflowY:k}=window.getComputedStyle(g);return["auto","scroll"].some((H=>[E,I,k].includes(H)))}));return x.forEach((g=>g.addEventListener("scroll",m))),()=>{f.disconnect(),x.forEach((g=>g.removeEventListener("scroll",m)))}})),o.subscribe((d=>{let m=Array.from(d.keys()).filter((({style:x})=>"sticky"===x.position)),f=n((()=>requestAnimationFrame((()=>{i.set((x=>x.map((g=>{if(m.includes(g.element)){let{top:E,left:I}=g.element.getBoundingClientRect();return{...g,top:E+window.scrollY,left:I+window.scrollX}}return g}))))}))),"updateBoxes");return t.addEventListener("scroll",f),()=>t.removeEventListener("scroll",f)})),o.subscribe((d=>{p.set((m=>m.filter((({element:f})=>d.has(f)))))})),p.subscribe((d=>{d.length?(y.set((m=>d.some((f=>f.element===m?.element))?m:void 0)),l.set((m=>d.some((f=>f.element===m?.element))?m:void 0))):(y.set(void 0),l.set(void 0),s.set(void 0))}));let h=new Map(new Map);r.subscribe((d=>{d.forEach((({keyframes:m})=>{if(m){let f=h.get(m);f||(f=t.createElement("style"),f.setAttribute("data-highlight","keyframes"),h.set(m,f),t.head.appendChild(f)),f.innerHTML=m}})),h.forEach(((m,f)=>{d.some((x=>x.keyframes===f))||(m.remove(),h.delete(f))}))}));let T=new Map(new Map);i.subscribe((d=>{d.forEach((m=>{let f=T.get(m.element);if(u&&!f){let x={popover:"manual","data-highlight-dimensions":`w${m.width.toFixed(0)}h${m.height.toFixed(0)}`,"data-highlight-coordinates":`x${m.left.toFixed(0)}y${m.top.toFixed(0)}`};f=u.appendChild(csf_M("div",x,[csf_M("div")])),T.set(m.element,f)}})),T.forEach(((m,f)=>{d.some((({element:x})=>x===f))||(m.remove(),T.delete(f))}))})),i.subscribe((d=>{let m=d.filter((x=>x.menu));if(!m.length)return;let f=n((x=>{requestAnimationFrame((()=>{let g=t.getElementById(C),E={x:x.pageX,y:x.pageY};if(g&&!csf_ot(g,E)){let I=m.filter((k=>{let H=T.get(k.element);return csf_nt(k,H,E)}));s.set(I.length?E:void 0),p.set(I)}}))}),"onClick");return t.addEventListener("click",f),()=>t.removeEventListener("click",f)}));let R=n((()=>{let d=t.getElementById(C),m=a.get();!m||d&&csf_ot(d,m)||c.set((f=>{let x=i.get().filter((k=>{let H=T.get(k.element);return csf_nt(k,H,m)})),g=f.filter((k=>x.includes(k))),E=x.filter((k=>!f.includes(k))),I=f.length-g.length;return E.length||I?[...g,...E]:f}))}),"updateHovered");a.subscribe(R),i.subscribe(R);let P=n((()=>{let d=y.get(),m=d?[d]:p.get(),f=1===m.length?m[0]:l.get(),x=void 0!==s.get();i.get().forEach((g=>{let E=T.get(g.element);if(E){let I=f===g,k=x?f?I:m.includes(g):c.get()?.includes(g);Object.assign(E.style,{animation:"none",background:"transparent",border:"none",boxSizing:"border-box",outline:"none",outlineOffset:"0px",...g.styles,...k?g.hoverStyles:{},...I?g.focusStyles:{},position:"fixed"===getComputedStyle(g.element).position?"fixed":"absolute",zIndex:2147483637,top:`${g.top}px`,left:`${g.left}px`,width:`${g.width}px`,height:`${g.height}px`,margin:0,padding:0,cursor:g.menu&&k?"pointer":"default",pointerEvents:g.menu?"auto":"none",display:"flex",alignItems:"center",justifyContent:"center",overflow:"visible"}),Object.assign(E.children[0].style,{width:"100%",height:"100%",minHeight:"28px",minWidth:"28px",boxSizing:"content-box",padding:E.style.outlineWidth||"0px"}),csf_it(E)}}))}),"updateBoxStyles");i.subscribe(P),p.subscribe(P),c.subscribe(P),l.subscribe(P),y.subscribe(P);let L=n((()=>{if(!u)return;let d=t.getElementById(C);if(d)d.innerHTML="";else{let g={id:C,popover:"manual"};d=u.appendChild(csf_M("div",g)),u.appendChild(csf_M("style",{},[`\n #${C} {\n position: absolute;\n z-index: 2147483647;\n width: 300px;\n padding: 0px;\n margin: 15px 0 0 0;\n transform: translateX(-50%);\n font-family: "Nunito Sans", -apple-system, ".SFNSText-Regular", "San Francisco", BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;\n font-size: 12px;\n background: white;\n border: none;\n border-radius: 6px;\n box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.05), 0 5px 15px 0 rgba(0, 0, 0, 0.1);\n color: #2E3438;\n }\n #${C} ul {\n list-style: none;\n margin: 0;\n padding: 0;\n }\n #${C} > ul {\n max-height: 300px;\n overflow-y: auto;\n padding: 4px 0;\n }\n #${C} li {\n padding: 0 4px;\n margin: 0;\n }\n #${C} li > :not(ul) {\n display: flex;\n padding: 8px;\n margin: 0;\n align-items: center;\n gap: 8px;\n border-radius: 4px;\n }\n #${C} button {\n width: 100%;\n border: 0;\n background: transparent;\n color: inherit;\n text-align: left;\n font-family: inherit;\n font-size: inherit;\n }\n #${C} button:focus-visible {\n outline-color: #029CFD;\n }\n #${C} button:hover {\n background: rgba(2, 156, 253, 0.07);\n color: #029CFD;\n cursor: pointer;\n }\n #${C} li code {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n line-height: 16px;\n font-size: 11px;\n }\n #${C} li svg {\n flex-shrink: 0;\n margin: 1px;\n color: #73828C;\n }\n #${C} li > button:hover svg, #${C} li > button:focus-visible svg {\n color: #029CFD;\n }\n #${C} .element-list li svg {\n display: none;\n }\n #${C} li.selectable svg, #${C} li.selected svg {\n display: block;\n }\n #${C} .menu-list {\n border-top: 1px solid rgba(38, 85, 115, 0.15);\n }\n #${C} .menu-list > li:not(:last-child) {\n padding-bottom: 4px;\n margin-bottom: 4px;\n border-bottom: 1px solid rgba(38, 85, 115, 0.15);\n }\n #${C} .menu-items, #${C} .menu-items li {\n padding: 0;\n }\n #${C} .menu-item {\n display: flex;\n }\n #${C} .menu-item-content {\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n }\n `]))}let m=y.get(),f=m?[m]:p.get();if(f.length&&(d.style.position="fixed"===getComputedStyle(f[0].element).position?"fixed":"absolute",d.appendChild(csf_M("ul",{class:"element-list"},f.map((g=>{let E=f.length>1&&!!g.menu?.some((H=>H.some((X=>!X.selectors||X.selectors.some((le=>g.selectors.includes(le))))))),k=E||m;return csf_M("li",E?{class:"selectable",onClick:n((()=>y.set(g)),"onClick"),onMouseEnter:n((()=>l.set(g)),"onMouseEnter"),onMouseLeave:n((()=>l.set(void 0)),"onMouseLeave")}:m?{class:"selected",onClick:n((()=>y.set(void 0)),"onClick")}:{},[csf_M(k?"button":"div",k?{type:"button"}:{},[m?csf_ae("chevronLeft"):null,csf_M("code",{},[g.element.outerHTML]),E?csf_ae("chevronRight"):null])])}))))),y.get()||1===p.get().length){let g=y.get()||p.get()[0],E=g.menu?.filter((I=>I.some((k=>!k.selectors||k.selectors.some((H=>g.selectors.includes(H)))))));E?.length&&d.appendChild(csf_M("ul",{class:"menu-list"},E.map((I=>csf_M("li",{},[csf_M("ul",{class:"menu-items"},I.map((({id:k,title:H,description:X,iconLeft:le,iconRight:gt,clickEvent:ht})=>{let we=ht&&(()=>e.emit(ht,k,csf_cr(g)));return csf_M("li",{},[csf_M(we?"button":"div",we?{class:"menu-item",type:"button",onClick:we}:{class:"menu-item"},[le?csf_ae(le):null,csf_M("div",{class:"menu-item-content"},[csf_M(X?"strong":"span",{},[H]),X&&csf_M("span",{},[X])]),gt?csf_ae(gt):null])])})))])))))}let x=s.get();x?(Object.assign(d.style,{display:"block",left:`${"fixed"===d.style.position?x.x-window.scrollX:x.x}px`,top:`${"fixed"===d.style.position?x.y-window.scrollY:x.y}px`}),csf_it(d),requestAnimationFrame((()=>csf_pr(d,x,{topOffset:15,centered:!0})))):(csf_lr(d),Object.assign(d.style,{display:"none"}))}),"renderMenu");p.subscribe(L),y.subscribe(L);let S,O=n((d=>{let m=csf_sr(d);r.set((f=>{let x=m.id?f.filter((g=>g.id!==m.id)):f;return m.selectors?.length?[...x,m]:x}))}),"addHighlight"),F=n((d=>{d&&r.set((m=>m.filter((f=>f.id!==d))))}),"removeHighlight"),A=n((()=>{r.set([]),o.set(new Map),i.set([]),s.set(void 0),a.set(void 0),p.set([]),c.set([]),l.set(void 0),y.set(void 0)}),"resetState"),v=n(((d,m)=>{let f="scrollIntoView-highlight";clearTimeout(S),F(f);let x=t.querySelector(d);if(!x)return void console.warn(`Cannot scroll into view: ${d} not found`);x.scrollIntoView({behavior:"smooth",block:"center",...m});let g=`kf-${Math.random().toString(36).substring(2,15)}`;r.set((E=>[...E,{id:f,priority:1e3,selectors:[d],styles:{outline:"2px solid #1EA7FD",outlineOffset:"-1px",animation:`${g} 3s linear forwards`},keyframes:`@keyframes ${g} {\n 0% { outline: 2px solid #1EA7FD; }\n 20% { outline: 2px solid #1EA7FD00; }\n 40% { outline: 2px solid #1EA7FD; }\n 60% { outline: 2px solid #1EA7FD00; }\n 80% { outline: 2px solid #1EA7FD; }\n 100% { outline: 2px solid #1EA7FD00; }\n }`}])),S=setTimeout((()=>F(f)),3500)}),"scrollIntoView"),w=n((d=>{requestAnimationFrame((()=>a.set({x:d.pageX,y:d.pageY})))}),"onMouseMove");t.body.addEventListener("mousemove",w),e.on(csf_rr,O),e.on(csf_or,F),e.on(csf_nr,A),e.on(ir,v),e.on(external_STORYBOOK_MODULE_CORE_EVENTS_.STORY_RENDER_PHASE_CHANGED,(({newPhase:d})=>{"loading"===d&&A()}))}),"useHighlights");globalThis?.FEATURES?.highlight&&external_STORYBOOK_MODULE_PREVIEW_API_.addons?.ready&&external_STORYBOOK_MODULE_PREVIEW_API_.addons.ready().then(csf_mr);var csf_st=n((()=>({})),"default"),csf_fr="measureEnabled";function csf_yr(){let e=external_STORYBOOK_MODULE_GLOBAL_.global.document.documentElement,t=Math.max(e.scrollHeight,e.offsetHeight);return{width:Math.max(e.scrollWidth,e.offsetWidth),height:t}}function csf_Jo(){let e=external_STORYBOOK_MODULE_GLOBAL_.global.document.createElement("canvas");e.id="storybook-addon-measure";let t=e.getContext("2d");csf_ye(null!=t);let{width:r,height:o}=csf_yr();return csf_at(e,t,{width:r,height:o}),e.style.position="absolute",e.style.left="0",e.style.top="0",e.style.zIndex="2147483647",e.style.pointerEvents="none",external_STORYBOOK_MODULE_GLOBAL_.global.document.body.appendChild(e),{canvas:e,context:t,width:r,height:o}}function csf_at(e,t,{width:r,height:o}){e.style.width=`${r}px`,e.style.height=`${o}px`;let i=external_STORYBOOK_MODULE_GLOBAL_.global.window.devicePixelRatio;e.width=Math.floor(r*i),e.height=Math.floor(o*i),t.scale(i,i)}n(csf_yr,"getDocumentWidthAndHeight"),n(csf_Jo,"createCanvas"),n(csf_at,"setCanvasWidthAndHeight");var $={};function csf_gr(){$.canvas||($=csf_Jo())}function csf_hr(){$.context&&$.context.clearRect(0,0,$.width??0,$.height??0)}function csf_xr(e){csf_hr(),e($.context)}function csf_br(){csf_ye($.canvas,"Canvas should exist in the state."),csf_ye($.context,"Context should exist in the state."),csf_at($.canvas,$.context,{width:0,height:0});let{width:e,height:t}=csf_yr();csf_at($.canvas,$.context,{width:e,height:t}),$.width=e,$.height=t}function csf_Tr(){$.canvas&&(csf_hr(),$.canvas.parentNode?.removeChild($.canvas),$={})}n(csf_gr,"init"),n(csf_hr,"clear"),n(csf_xr,"draw"),n(csf_br,"rescale"),n(csf_Tr,"destroy");var J={margin:"#f6b26b",border:"#ffe599",padding:"#93c47d",content:"#6fa8dc",text:"#232020"};function csf_Sr(e,{x:t,y:r,w:o,h:i,r:s}){t-=o/2,r-=i/2,o<2*s&&(s=o/2),i<2*s&&(s=i/2),e.beginPath(),e.moveTo(t+s,r),e.arcTo(t+o,r,t+o,r+i,s),e.arcTo(t+o,r+i,t,r+i,s),e.arcTo(t,r+i,t,r,s),e.arcTo(t,r,t+o,r,s),e.closePath()}function csf_Qo(e,{padding:t,border:r,width:o,height:i,top:s,left:a}){let p=o-r.left-r.right-t.left-t.right,c=i-t.top-t.bottom-r.top-r.bottom,l=a+r.left+t.left,y=s+r.top+t.top;return"top"===e?l+=p/2:"right"===e?(l+=p,y+=c/2):"bottom"===e?(l+=p/2,y+=c):"left"===e?y+=c/2:"center"===e&&(l+=p/2,y+=c/2),{x:l,y}}function csf_en(e,t,{margin:r,border:o,padding:i},s,a){let p=n((h=>0),"shift"),c=0,l=0,y=a?1:.5,u=a?2*s:0;return"padding"===e?p=n((h=>i[h]*y+u),"shift"):"border"===e?p=n((h=>i[h]+o[h]*y+u),"shift"):"margin"===e&&(p=n((h=>i[h]+o[h]+r[h]*y+u),"shift")),"top"===t?l=-p("top"):"right"===t?c=p("right"):"bottom"===t?l=p("bottom"):"left"===t&&(c=-p("left")),{offsetX:c,offsetY:l}}function csf_tn(e,t){return Math.abs(e.x-t.x){let p=o&&"center"===s.position?csf_sn(e,t,s):csf_on(e,t,s,i[a-1],o);i[a]=p}))}function csf_wr(e,t,r,o){let i=r.reduce(((s,a)=>(Object.prototype.hasOwnProperty.call(s,a.position)||(s[a.position]=[]),s[a.position]?.push(a),s)),{});i.top&&csf_pe(e,t,i.top,o),i.right&&csf_pe(e,t,i.right,o),i.bottom&&csf_pe(e,t,i.bottom,o),i.left&&csf_pe(e,t,i.left,o),i.center&&csf_pe(e,t,i.center,o)}n(csf_Sr,"roundedRect"),n(csf_Qo,"positionCoordinate"),n(csf_en,"offset"),n(csf_tn,"collide"),n(csf_rn,"overlapAdjustment"),n(csf_Ar,"textWithRect"),n(csf_Rr,"configureText"),n(csf_on,"drawLabel"),n(csf_nn,"floatingOffset"),n(csf_sn,"drawFloatingLabel"),n(csf_pe,"drawStack"),n(csf_wr,"labelStacks");var csf_Te_margin="#f6b26ba8",csf_Te_border="#ffe599a8",csf_Te_padding="#93c47d8c",csf_Te_content="#6fa8dca8";function _(e){return parseInt(e.replace("px",""),10)}function Q(e){return Number.isInteger(e)?e:e.toFixed(2)}function csf_pt(e){return e.filter((t=>0!==t.text&&"0"!==t.text))}function csf_an(e){let t_top=external_STORYBOOK_MODULE_GLOBAL_.global.window.scrollY,t_bottom=external_STORYBOOK_MODULE_GLOBAL_.global.window.scrollY+external_STORYBOOK_MODULE_GLOBAL_.global.window.innerHeight,t_left=external_STORYBOOK_MODULE_GLOBAL_.global.window.scrollX,t_right=external_STORYBOOK_MODULE_GLOBAL_.global.window.scrollX+external_STORYBOOK_MODULE_GLOBAL_.global.window.innerWidth,r_top=Math.abs(t_top-e.top),r_bottom=Math.abs(t_bottom-e.bottom);return{x:Math.abs(t_left-e.left)>Math.abs(t_right-e.right)?"left":"right",y:r_top>r_bottom?"top":"bottom"}}function csf_pn(e){let t=external_STORYBOOK_MODULE_GLOBAL_.global.getComputedStyle(e),{top:r,left:o,right:i,bottom:s,width:a,height:p}=e.getBoundingClientRect(),{marginTop:c,marginBottom:l,marginLeft:y,marginRight:u,paddingTop:h,paddingBottom:T,paddingLeft:R,paddingRight:P,borderBottomWidth:L,borderTopWidth:O,borderLeftWidth:F,borderRightWidth:A}=t;r+=external_STORYBOOK_MODULE_GLOBAL_.global.window.scrollY,o+=external_STORYBOOK_MODULE_GLOBAL_.global.window.scrollX,s+=external_STORYBOOK_MODULE_GLOBAL_.global.window.scrollY,i+=external_STORYBOOK_MODULE_GLOBAL_.global.window.scrollX;let S={top:_(c),bottom:_(l),left:_(y),right:_(u)},v={top:_(h),bottom:_(T),left:_(R),right:_(P)},w={top:_(O),bottom:_(L),left:_(F),right:_(A)},d={top:r-S.top,bottom:s+S.bottom,left:o-S.left,right:i+S.right};return{margin:S,padding:v,border:w,top:r,left:o,bottom:s,right:i,width:a,height:p,extremities:d,floatingAlignment:csf_an(d)}}function csf_ln(e,{margin:t,width:r,height:o,top:i,left:s,bottom:a,right:p}){let c=o+t.bottom+t.top;return e.fillStyle=csf_Te_margin,e.fillRect(s,i-t.top,r,t.top),e.fillRect(p,i-t.top,t.right,c),e.fillRect(s,a,r,t.bottom),e.fillRect(s-t.left,i-t.top,t.left,c),csf_pt([{type:"margin",text:Q(t.top),position:"top"},{type:"margin",text:Q(t.right),position:"right"},{type:"margin",text:Q(t.bottom),position:"bottom"},{type:"margin",text:Q(t.left),position:"left"}])}function csf_cn(e,{padding:t,border:r,width:o,height:i,top:s,left:a,bottom:p,right:c}){let l=o-r.left-r.right,y=i-t.top-t.bottom-r.top-r.bottom;return e.fillStyle=csf_Te_padding,e.fillRect(a+r.left,s+r.top,l,t.top),e.fillRect(c-t.right-r.right,s+t.top+r.top,t.right,y),e.fillRect(a+r.left,p-t.bottom-r.bottom,l,t.bottom),e.fillRect(a+r.left,s+t.top+r.top,t.left,y),csf_pt([{type:"padding",text:t.top,position:"top"},{type:"padding",text:t.right,position:"right"},{type:"padding",text:t.bottom,position:"bottom"},{type:"padding",text:t.left,position:"left"}])}function csf_dn(e,{border:t,width:r,height:o,top:i,left:s,bottom:a,right:p}){let c=o-t.top-t.bottom;return e.fillStyle=csf_Te_border,e.fillRect(s,i,r,t.top),e.fillRect(s,a-t.bottom,r,t.bottom),e.fillRect(s,i+t.top,t.left,c),e.fillRect(p-t.right,i+t.top,t.right,c),csf_pt([{type:"border",text:t.top,position:"top"},{type:"border",text:t.right,position:"right"},{type:"border",text:t.bottom,position:"bottom"},{type:"border",text:t.left,position:"left"}])}function csf_mn(e,{padding:t,border:r,width:o,height:i,top:s,left:a}){let p=o-r.left-r.right-t.left-t.right,c=i-t.top-t.bottom-r.top-r.bottom;return e.fillStyle=csf_Te_content,e.fillRect(a+r.left+t.left,s+r.top+t.top,p,c),[{type:"content",position:"center",text:`${Q(p)} x ${Q(c)}`}]}function csf_un(e){return t=>{if(e&&t){let r=csf_pn(e),o=csf_ln(t,r),i=csf_cn(t,r),s=csf_dn(t,r);csf_wr(t,r,[...csf_mn(t,r),...i,...s,...o],r.width<=90||r.height<=30)}}}function csf_Cr(e){csf_xr(csf_un(e))}n(_,"pxToNumber"),n(Q,"round"),n(csf_pt,"filterZeroValues"),n(csf_an,"floatingAlignment"),n(csf_pn,"measureElement"),n(csf_ln,"drawMargin"),n(csf_cn,"drawPadding"),n(csf_dn,"drawBorder"),n(csf_mn,"drawContent"),n(csf_un,"drawBoxModel"),n(csf_Cr,"drawSelectedElement");var csf_vr=n(((e,t)=>{let r=external_STORYBOOK_MODULE_GLOBAL_.global.document.elementFromPoint(e,t),o=n((s=>{if(s&&s.shadowRoot){let a=s.shadowRoot.elementFromPoint(e,t);return s.isEqualNode(a)?s:a.shadowRoot?o(a):a}return s}),"crawlShadows");return o(r)||r}),"deepElementFromPoint"),csf_Se={x:0,y:0};function csf_Or(e,t){csf_Cr(csf_vr(e,t))}n(csf_Or,"findAndDrawElement");var csf_Mr=n(((e,t)=>{let{measureEnabled:r}=t.globals||{};return(0,external_STORYBOOK_MODULE_PREVIEW_API_.useEffect)((()=>{if(typeof globalThis.document>"u")return;let o=n((i=>{window.requestAnimationFrame((()=>{i.stopPropagation(),csf_Se.x=i.clientX,csf_Se.y=i.clientY}))}),"onPointerMove");return globalThis.document.addEventListener("pointermove",o),()=>{globalThis.document.removeEventListener("pointermove",o)}}),[]),(0,external_STORYBOOK_MODULE_PREVIEW_API_.useEffect)((()=>{let o=n((s=>{window.requestAnimationFrame((()=>{s.stopPropagation(),csf_Or(s.clientX,s.clientY)}))}),"onPointerOver"),i=n((()=>{window.requestAnimationFrame((()=>{csf_br()}))}),"onResize");return"story"===t.viewMode&&r&&(globalThis.document.addEventListener("pointerover",o),csf_gr(),globalThis.window.addEventListener("resize",i),csf_Or(csf_Se.x,csf_Se.y)),()=>{globalThis.window.removeEventListener("resize",i),csf_Tr()}}),[r,t.viewMode]),e()}),"withMeasure"),csf_gn=globalThis.FEATURES?.measure?[csf_Mr]:[],csf_hn={[csf_fr]:!1},csf_lt=n((()=>({decorators:csf_gn,initialGlobals:csf_hn})),"default"),csf_Ae="outline",csf_ct=n((e=>{(Array.isArray(e)?e:[e]).forEach(csf_xn)}),"clearStyles"),csf_xn=n((e=>{let t="string"==typeof e?e:e.join(""),r=external_STORYBOOK_MODULE_GLOBAL_.global.document.getElementById(t);r&&r.parentElement&&r.parentElement.removeChild(r)}),"clearStyle"),csf_$r=n(((e,t)=>{let r=external_STORYBOOK_MODULE_GLOBAL_.global.document.getElementById(e);if(r)r.innerHTML!==t&&(r.innerHTML=t);else{let o=external_STORYBOOK_MODULE_GLOBAL_.global.document.createElement("style");o.setAttribute("id",e),o.innerHTML=t,external_STORYBOOK_MODULE_GLOBAL_.global.document.head.appendChild(o)}}),"addOutlineStyles");function csf_dt(e){return W` + ${e} body { + outline: 1px solid #2980b9 !important; + } + + ${e} article { + outline: 1px solid #3498db !important; + } + + ${e} nav { + outline: 1px solid #0088c3 !important; + } + + ${e} aside { + outline: 1px solid #33a0ce !important; + } + + ${e} section { + outline: 1px solid #66b8da !important; + } + + ${e} header { + outline: 1px solid #99cfe7 !important; + } + + ${e} footer { + outline: 1px solid #cce7f3 !important; + } + + ${e} h1 { + outline: 1px solid #162544 !important; + } + + ${e} h2 { + outline: 1px solid #314e6e !important; + } + + ${e} h3 { + outline: 1px solid #3e5e85 !important; + } + + ${e} h4 { + outline: 1px solid #449baf !important; + } + + ${e} h5 { + outline: 1px solid #c7d1cb !important; + } + + ${e} h6 { + outline: 1px solid #4371d0 !important; + } + + ${e} main { + outline: 1px solid #2f4f90 !important; + } + + ${e} address { + outline: 1px solid #1a2c51 !important; + } + + ${e} div { + outline: 1px solid #036cdb !important; + } + + ${e} p { + outline: 1px solid #ac050b !important; + } + + ${e} hr { + outline: 1px solid #ff063f !important; + } + + ${e} pre { + outline: 1px solid #850440 !important; + } + + ${e} blockquote { + outline: 1px solid #f1b8e7 !important; + } + + ${e} ol { + outline: 1px solid #ff050c !important; + } + + ${e} ul { + outline: 1px solid #d90416 !important; + } + + ${e} li { + outline: 1px solid #d90416 !important; + } + + ${e} dl { + outline: 1px solid #fd3427 !important; + } + + ${e} dt { + outline: 1px solid #ff0043 !important; + } + + ${e} dd { + outline: 1px solid #e80174 !important; + } + + ${e} figure { + outline: 1px solid #ff00bb !important; + } + + ${e} figcaption { + outline: 1px solid #bf0032 !important; + } + + ${e} table { + outline: 1px solid #00cc99 !important; + } + + ${e} caption { + outline: 1px solid #37ffc4 !important; + } + + ${e} thead { + outline: 1px solid #98daca !important; + } + + ${e} tbody { + outline: 1px solid #64a7a0 !important; + } + + ${e} tfoot { + outline: 1px solid #22746b !important; + } + + ${e} tr { + outline: 1px solid #86c0b2 !important; + } + + ${e} th { + outline: 1px solid #a1e7d6 !important; + } + + ${e} td { + outline: 1px solid #3f5a54 !important; + } + + ${e} col { + outline: 1px solid #6c9a8f !important; + } + + ${e} colgroup { + outline: 1px solid #6c9a9d !important; + } + + ${e} button { + outline: 1px solid #da8301 !important; + } + + ${e} datalist { + outline: 1px solid #c06000 !important; + } + + ${e} fieldset { + outline: 1px solid #d95100 !important; + } + + ${e} form { + outline: 1px solid #d23600 !important; + } + + ${e} input { + outline: 1px solid #fca600 !important; + } + + ${e} keygen { + outline: 1px solid #b31e00 !important; + } + + ${e} label { + outline: 1px solid #ee8900 !important; + } + + ${e} legend { + outline: 1px solid #de6d00 !important; + } + + ${e} meter { + outline: 1px solid #e8630c !important; + } + + ${e} optgroup { + outline: 1px solid #b33600 !important; + } + + ${e} option { + outline: 1px solid #ff8a00 !important; + } + + ${e} output { + outline: 1px solid #ff9619 !important; + } + + ${e} progress { + outline: 1px solid #e57c00 !important; + } + + ${e} select { + outline: 1px solid #e26e0f !important; + } + + ${e} textarea { + outline: 1px solid #cc5400 !important; + } + + ${e} details { + outline: 1px solid #33848f !important; + } + + ${e} summary { + outline: 1px solid #60a1a6 !important; + } + + ${e} command { + outline: 1px solid #438da1 !important; + } + + ${e} menu { + outline: 1px solid #449da6 !important; + } + + ${e} del { + outline: 1px solid #bf0000 !important; + } + + ${e} ins { + outline: 1px solid #400000 !important; + } + + ${e} img { + outline: 1px solid #22746b !important; + } + + ${e} iframe { + outline: 1px solid #64a7a0 !important; + } + + ${e} embed { + outline: 1px solid #98daca !important; + } + + ${e} object { + outline: 1px solid #00cc99 !important; + } + + ${e} param { + outline: 1px solid #37ffc4 !important; + } + + ${e} video { + outline: 1px solid #6ee866 !important; + } + + ${e} audio { + outline: 1px solid #027353 !important; + } + + ${e} source { + outline: 1px solid #012426 !important; + } + + ${e} canvas { + outline: 1px solid #a2f570 !important; + } + + ${e} track { + outline: 1px solid #59a600 !important; + } + + ${e} map { + outline: 1px solid #7be500 !important; + } + + ${e} area { + outline: 1px solid #305900 !important; + } + + ${e} a { + outline: 1px solid #ff62ab !important; + } + + ${e} em { + outline: 1px solid #800b41 !important; + } + + ${e} strong { + outline: 1px solid #ff1583 !important; + } + + ${e} i { + outline: 1px solid #803156 !important; + } + + ${e} b { + outline: 1px solid #cc1169 !important; + } + + ${e} u { + outline: 1px solid #ff0430 !important; + } + + ${e} s { + outline: 1px solid #f805e3 !important; + } + + ${e} small { + outline: 1px solid #d107b2 !important; + } + + ${e} abbr { + outline: 1px solid #4a0263 !important; + } + + ${e} q { + outline: 1px solid #240018 !important; + } + + ${e} cite { + outline: 1px solid #64003c !important; + } + + ${e} dfn { + outline: 1px solid #b4005a !important; + } + + ${e} sub { + outline: 1px solid #dba0c8 !important; + } + + ${e} sup { + outline: 1px solid #cc0256 !important; + } + + ${e} time { + outline: 1px solid #d6606d !important; + } + + ${e} code { + outline: 1px solid #e04251 !important; + } + + ${e} kbd { + outline: 1px solid #5e001f !important; + } + + ${e} samp { + outline: 1px solid #9c0033 !important; + } + + ${e} var { + outline: 1px solid #d90047 !important; + } + + ${e} mark { + outline: 1px solid #ff0053 !important; + } + + ${e} bdi { + outline: 1px solid #bf3668 !important; + } + + ${e} bdo { + outline: 1px solid #6f1400 !important; + } + + ${e} ruby { + outline: 1px solid #ff7b93 !important; + } + + ${e} rt { + outline: 1px solid #ff2f54 !important; + } + + ${e} rp { + outline: 1px solid #803e49 !important; + } + + ${e} span { + outline: 1px solid #cc2643 !important; + } + + ${e} br { + outline: 1px solid #db687d !important; + } + + ${e} wbr { + outline: 1px solid #db175b !important; + }`}n(csf_dt,"outlineCSS");var csf_Fr=n(((e,t)=>{let r=t.globals||{},o=[!0,"true"].includes(r.outline),i="docs"===t.viewMode,s=(0,external_STORYBOOK_MODULE_PREVIEW_API_.useMemo)((()=>csf_dt(i?'[data-story-block="true"]':".sb-show-main")),[t]);return(0,external_STORYBOOK_MODULE_PREVIEW_API_.useEffect)((()=>{let a=i?`addon-outline-docs-${t.id}`:"addon-outline";return o?csf_$r(a,s):csf_ct(a),()=>{csf_ct(a)}}),[o,s,t]),e()}),"withOutline"),csf_An=globalThis.FEATURES?.outline?[csf_Fr]:[],csf_Rn={[csf_Ae]:!1},csf_mt=n((()=>({decorators:csf_An,initialGlobals:csf_Rn})),"default"),csf_Fn=n((({parameters:e})=>{!0===e?.test?.mockReset?(0,external_STORYBOOK_MODULE_TEST_.resetAllMocks)():!0===e?.test?.clearMocks?(0,external_STORYBOOK_MODULE_TEST_.clearAllMocks)():!1!==e?.test?.restoreMocks&&(0,external_STORYBOOK_MODULE_TEST_.restoreAllMocks)()}),"resetAllMocksLoader"),csf_ut=n(((e,t=0,r)=>{if(t>5||null==e)return e;if((0,external_STORYBOOK_MODULE_TEST_.isMockFunction)(e))return r&&e.mockName(r),e;if("function"==typeof e&&"isAction"in e&&e.isAction&&(!("implicit"in e)||!e.implicit)){let o=(0,external_STORYBOOK_MODULE_TEST_.fn)(e);return r&&o.mockName(r),o}if(Array.isArray(e)){t++;for(let o=0;o{csf_ut(e)}),"nameSpiesAndWrapActionsInSpies"),csf_Ir=!1,csf_Ln=n((async e=>{globalThis.HTMLElement&&e.canvasElement instanceof globalThis.HTMLElement&&(e.canvas=(0,external_STORYBOOK_MODULE_TEST_.within)(e.canvasElement));let t=globalThis.window?.navigator?.clipboard;if(t){e.userEvent=Qs({userEvent:external_STORYBOOK_MODULE_TEST_.uninstrumentedUserEvent.setup()},{intercept:!0,getKeys:n((o=>Object.keys(o).filter((i=>"eventWrapper"!==i))),"getKeys")}).userEvent,Object.defineProperty(globalThis.window.navigator,"clipboard",{get:n((()=>t),"get"),configurable:!0});let r=HTMLElement.prototype.focus;csf_Ir||Object.defineProperties(HTMLElement.prototype,{focus:{configurable:!0,set:n((o=>{r=o,csf_Ir=!0}),"set"),get:n((()=>r),"get")}})}}),"enhanceContext"),csf_ft=n((()=>({loaders:[csf_Fn,csf_In,csf_Ln]})),"default"),csf_Dr="viewport",csf_n={[csf_Dr]:{value:void 0,isRotated:!1}},csf_yt=n((()=>({initialGlobals:csf_n})),"default");function csf_r(){return[(csf_lt.default??csf_lt)(),(csf_Je.default??csf_Je)(),(csf_st.default??csf_st)(),(csf_mt.default??csf_mt)(),(csf_yt.default??csf_yt)(),(csf_Xe.default??csf_Xe)(),(csf_Qe.default??csf_Qe)(),(csf_ft.default??csf_ft)()]}function rc(e){return e}function oc(e){return null!=e&&"object"==typeof e&&"_tag"in e&&"Preview"===e?._tag}function csf_Nn(e,t){return{_tag:"Meta",input:e,preview:t,get composed(){throw new Error("Not implemented")},story(r={}){return csf_Hr("function"==typeof r?{render:r}:r,this)}}}function csf_Hr(e,t){let r,o=n((()=>(r||(r=csf_We(e,t.input,void 0,t.preview.composed)),r)),"compose");return{_tag:"Story",input:e,meta:t,__compose:o,get composed(){let i=o(),{args:s,argTypes:a,parameters:p,id:c,tags:l,globals:y,storyName:u}=i;return{args:s,argTypes:a,parameters:p,id:c,tags:l,name:u,globals:y}},get play(){return e.play??t.input?.play??(async()=>{})},get run(){return o().run??(async()=>{})},extend(i){return csf_Hr({...this.input,...i,args:{...this.input.args,...i.args},argTypes:csf_D(this.input.argTypes,i.argTypes),afterEach:[...b(this.input?.afterEach??[]),...b(i.afterEach??[])],beforeEach:[...b(this.input?.beforeEach??[]),...b(i.beforeEach??[])],decorators:[...b(this.input?.decorators??[]),...b(i.decorators??[])],globals:{...this.input.globals,...i.globals},loaders:[...b(this.input?.loaders??[]),...b(i.loaders??[])],parameters:csf_D(this.input.parameters,i.parameters),tags:uc(...this.input.tags??[],...i.tags??[])},this.meta)}}}n(csf_r,"getCoreAnnotations"),n((function tc(e){let t,r={_tag:"Preview",input:e,get composed(){if(t)return t;let{addons:o,...i}=e;return t=csf_te(csf_ne([...csf_r(),...o??[],i])),t},meta(o){return csf_Nn(o,this)}};return globalThis.globalProjectAnnotations=r.composed,r}),"definePreview"),n(rc,"definePreviewAddon"),n(oc,"isPreview"),n((function nc(e){return null!=e&&"object"==typeof e&&"_tag"in e&&"Meta"===e?._tag}),"isMeta"),n(csf_Nn,"defineMeta"),n((function ic(e){return null!=e&&"object"==typeof e&&"_tag"in e&&"Story"===e?._tag}),"isStory"),n(csf_Hr,"defineStory");var csf_jn=n((e=>e.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi,"-").replace(/-+/g,"-").replace(/^-+/,"").replace(/-+$/,"")),"sanitize"),csf_Nr=n(((e,t)=>{let r=csf_jn(e);if(""===r)throw new Error(`Invalid ${t} '${e}', must include alphanumeric characters`);return r}),"sanitizeSafe"),lc=n(((e,t)=>`${csf_Nr(e,"kind")}${t?`--${csf_Nr(t,"name")}`:""}`),"toId"),cc=n((e=>csf_bt(e)),"storyNameFromExport");function csf_jr(e,t){return Array.isArray(t)?t.includes(e):e.match(t)}n(csf_jr,"matches"),n((function dc(e,{includeStories:t,excludeStories:r}){return"__esModule"!==e&&(!t||csf_jr(e,t))&&(!r||!csf_jr(e,r))}),"isExportStory");var uc=n(((...e)=>{let t=e.reduce(((r,o)=>(o.startsWith("!")?r.delete(o.slice(1)):r.add(o),r)),new Set);return Array.from(t)}),"combineTags")},"./node_modules/storybook/dist/docs-tools/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{C2:()=>ya,Op:()=>ha,Sy:()=>wt,TQ:()=>at,UO:()=>pt,Ux:()=>w,Y1:()=>Tn,YF:()=>Ir,i3:()=>Ke,p6:()=>aa,rl:()=>ia});var n,s,storybook_internal_preview_errors__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("storybook/internal/preview-errors"),dr=Object.create,Ie=Object.defineProperty,Tr=Object.getOwnPropertyDescriptor,gr=Object.getOwnPropertyNames,xr=Object.getPrototypeOf,hr=Object.prototype.hasOwnProperty,r=(n,s)=>Ie(n,"name",{value:s,configurable:!0}),dt=(n=(fe,yt)=>{var n,s;n=fe,s=function(n){function s(e){return void 0!==e.text&&""!==e.text?`'${e.type}' with value '${e.text}'`:`'${e.type}'`}r(s,"tokenToString");let ne=class ne extends Error{constructor(t){super(`No parslet found for token: ${s(t)}`),this.token=t,Object.setPrototypeOf(this,ne.prototype)}getToken(){return this.token}};r(ne,"NoParsletFoundError");let a=ne,oe=class oe extends Error{constructor(t){super(`The parsing ended early. The next token was: ${s(t)}`),this.token=t,Object.setPrototypeOf(this,oe.prototype)}getToken(){return this.token}};r(oe,"EarlyEndOfParseError");let p=oe,se=class se extends Error{constructor(t,o){let i=`Unexpected type: '${t.type}'.`;void 0!==o&&(i+=` Message: ${o}`),super(i),Object.setPrototypeOf(this,se.prototype)}};r(se,"UnexpectedTypeError");let c=se;function u(e){return t=>t.startsWith(e)?{type:e,text:e}:null}function m(e){let o,t=0,i=e[0],l=!1;if("'"!==i&&'"'!==i)return null;for(;t{let t=P(e);return null==t?null:{type:"Identifier",text:t}}),"identifierRule");function S(e){return t=>{if(!t.startsWith(e))return null;let o=t[e.length];return void 0!==o&&g.test(o)?null:{type:e,text:e}}}r(S,"makeKeyWordRule");let z=r((e=>{let t=m(e);return null==t?null:{type:"StringValue",text:t}}),"stringValueRule"),Te=r((e=>e.length>0?null:{type:"EOF",text:""}),"eofRule"),ge=r((e=>{let t=de(e);return null===t?null:{type:"Number",text:t}}),"numberRule"),Rt=[Te,u("=>"),u("("),u(")"),u("{"),u("}"),u("["),u("]"),u("|"),u("&"),u("<"),u(">"),u(","),u(";"),u("*"),u("?"),u("!"),u("="),u(":"),u("..."),u("."),u("#"),u("~"),u("/"),u("@"),S("undefined"),S("null"),S("function"),S("this"),S("new"),S("module"),S("event"),S("external"),S("typeof"),S("keyof"),S("readonly"),S("import"),S("is"),S("in"),S("asserts"),ge,q,z],jt=/^\s*\n\s*/,U=class U{static create(t){let o=this.read(t);t=o.text;let i=this.read(t);return t=i.text,new U(t,void 0,o.token,i.token)}constructor(t,o,i,l){this.text="",this.text=t,this.previous=o,this.current=i,this.next=l}static read(t,o=!1){o=o||jt.test(t),t=t.trim();for(let i of Rt){let l=i(t);if(null!==l){let f=Object.assign(Object.assign({},l),{startOfLine:o});return{text:t=t.slice(f.text.length),token:f}}}throw new Error("Unexpected Token "+t)}advance(){let t=U.read(this.text);return new U(t.text,this.current,this.next,t.token)}};r(U,"Lexer");let xe=U;function J(e){if(void 0===e)throw new Error("Unexpected undefined");if("JsdocTypeKeyValue"===e.type||"JsdocTypeParameterList"===e.type||"JsdocTypeProperty"===e.type||"JsdocTypeReadonlyProperty"===e.type||"JsdocTypeObjectField"===e.type||"JsdocTypeJsdocObjectField"===e.type||"JsdocTypeIndexSignature"===e.type||"JsdocTypeMappedType"===e.type)throw new c(e);return e}function he(e){return"JsdocTypeKeyValue"===e.type?H(e):J(e)}function Ft(e){return"JsdocTypeName"===e.type?e:H(e)}function H(e){if("JsdocTypeKeyValue"!==e.type)throw new c(e);return e}function _t(e){var t;if("JsdocTypeVariadic"===e.type){if("JsdocTypeName"===(null===(t=e.element)||void 0===t?void 0:t.type))return e;throw new c(e)}if("JsdocTypeNumber"!==e.type&&"JsdocTypeName"!==e.type)throw new c(e);return e}function Je(e){return"JsdocTypeIndexSignature"===e.type||"JsdocTypeMappedType"===e.type}var y,e;r(J,"assertRootResult"),r(he,"assertPlainKeyValueOrRootResult"),r(Ft,"assertPlainKeyValueOrNameResult"),r(H,"assertPlainKeyValueResult"),r(_t,"assertNumberOrVariadicNameResult"),r(Je,"isSquaredProperty"),(e=y||(y={}))[e.ALL=0]="ALL",e[e.PARAMETER_LIST=1]="PARAMETER_LIST",e[e.OBJECT=2]="OBJECT",e[e.KEY_VALUE=3]="KEY_VALUE",e[e.INDEX_BRACKETS=4]="INDEX_BRACKETS",e[e.UNION=5]="UNION",e[e.INTERSECTION=6]="INTERSECTION",e[e.PREFIX=7]="PREFIX",e[e.INFIX=8]="INFIX",e[e.TUPLE=9]="TUPLE",e[e.SYMBOL=10]="SYMBOL",e[e.OPTIONAL=11]="OPTIONAL",e[e.NULLABLE=12]="NULLABLE",e[e.KEY_OF_TYPE_OF=13]="KEY_OF_TYPE_OF",e[e.FUNCTION=14]="FUNCTION",e[e.ARROW=15]="ARROW",e[e.ARRAY_BRACKETS=16]="ARRAY_BRACKETS",e[e.GENERIC=17]="GENERIC",e[e.NAME_PATH=18]="NAME_PATH",e[e.PARENTHESIS=19]="PARENTHESIS",e[e.SPECIAL_TYPES=20]="SPECIAL_TYPES";let Ae=class Ae{constructor(t,o,i){this.grammar=t,this._lexer="string"==typeof o?xe.create(o):o,this.baseParser=i}get lexer(){return this._lexer}parse(){let t=this.parseType(y.ALL);if("EOF"!==this.lexer.current.type)throw new p(this.lexer.current);return t}parseType(t){return J(this.parseIntermediateType(t))}parseIntermediateType(t){let o=this.tryParslets(null,t);if(null===o)throw new a(this.lexer.current);return this.parseInfixIntermediateType(o,t)}parseInfixIntermediateType(t,o){let i=this.tryParslets(t,o);for(;null!==i;)t=i,i=this.tryParslets(t,o);return t}tryParslets(t,o){for(let i of this.grammar){let l=i(this,o,t);if(null!==l)return l}return null}consume(t){return Array.isArray(t)||(t=[t]),!!t.includes(this.lexer.current.type)&&(this._lexer=this.lexer.advance(),!0)}acceptLexerState(t){this._lexer=t.lexer}};r(Ae,"Parser");let I=Ae;function Ye(e){return"EOF"===e||"|"===e||","===e||")"===e||">"===e}r(Ye,"isQuestionMarkUnknownType");let we=r(((e,t,o)=>{let i=e.lexer.current.type,l=e.lexer.next.type;return null==o&&"?"===i&&!Ye(l)||null!=o&&"?"===i?(e.consume("?"),null==o?{type:"JsdocTypeNullable",element:e.parseType(y.NULLABLE),meta:{position:"prefix"}}:{type:"JsdocTypeNullable",element:J(o),meta:{position:"suffix"}}):null}),"nullableParslet");function x(e){let t=r(((o,i,l)=>{let f=o.lexer.current.type,d=o.lexer.next.type;if(null===l){if("parsePrefix"in e&&e.accept(f,d))return e.parsePrefix(o)}else if("parseInfix"in e&&e.precedence>i&&e.accept(f,d))return e.parseInfix(o,l);return null}),"parslet");return Object.defineProperty(t,"name",{value:e.name}),t}r(x,"composeParslet");let Q=x({name:"optionalParslet",accept:r((e=>"="===e),"accept"),precedence:y.OPTIONAL,parsePrefix:r((e=>(e.consume("="),{type:"JsdocTypeOptional",element:e.parseType(y.OPTIONAL),meta:{position:"prefix"}})),"parsePrefix"),parseInfix:r(((e,t)=>(e.consume("="),{type:"JsdocTypeOptional",element:J(t),meta:{position:"suffix"}})),"parseInfix")}),Z=x({name:"numberParslet",accept:r((e=>"Number"===e),"accept"),parsePrefix:r((e=>{let t=parseFloat(e.lexer.current.text);return e.consume("Number"),{type:"JsdocTypeNumber",value:t}}),"parsePrefix")}),Vt=x({name:"parenthesisParslet",accept:r((e=>"("===e),"accept"),parsePrefix:r((e=>{if(e.consume("("),e.consume(")"))return{type:"JsdocTypeParameterList",elements:[]};let t=e.parseIntermediateType(y.ALL);if(!e.consume(")"))throw new Error("Unterminated parenthesis");return"JsdocTypeParameterList"===t.type?t:"JsdocTypeKeyValue"===t.type?{type:"JsdocTypeParameterList",elements:[t]}:{type:"JsdocTypeParenthesis",element:J(t)}}),"parsePrefix")}),Lt=x({name:"specialTypesParslet",accept:r(((e,t)=>"?"===e&&Ye(t)||"null"===e||"undefined"===e||"*"===e),"accept"),parsePrefix:r((e=>{if(e.consume("null"))return{type:"JsdocTypeNull"};if(e.consume("undefined"))return{type:"JsdocTypeUndefined"};if(e.consume("*"))return{type:"JsdocTypeAny"};if(e.consume("?"))return{type:"JsdocTypeUnknown"};throw new Error("Unacceptable token: "+e.lexer.current.text)}),"parsePrefix")}),Ut=x({name:"notNullableParslet",accept:r((e=>"!"===e),"accept"),precedence:y.NULLABLE,parsePrefix:r((e=>(e.consume("!"),{type:"JsdocTypeNotNullable",element:e.parseType(y.NULLABLE),meta:{position:"prefix"}})),"parsePrefix"),parseInfix:r(((e,t)=>(e.consume("!"),{type:"JsdocTypeNotNullable",element:J(t),meta:{position:"suffix"}})),"parseInfix")});function Bt({allowTrailingComma:e}){return x({name:"parameterListParslet",accept:r((t=>","===t),"accept"),precedence:y.PARAMETER_LIST,parseInfix:r(((t,o)=>{let i=[he(o)];t.consume(",");do{try{let l=t.parseIntermediateType(y.PARAMETER_LIST);i.push(he(l))}catch(l){if(e&&l instanceof a)break;throw l}}while(t.consume(","));if(i.length>0&&i.slice(0,-1).some((l=>"JsdocTypeVariadic"===l.type)))throw new Error("Only the last parameter may be a rest parameter");return{type:"JsdocTypeParameterList",elements:i}}),"parseInfix")})}r(Bt,"createParameterListParslet");let Ct=x({name:"genericParslet",accept:r(((e,t)=>"<"===e||"."===e&&"<"===t),"accept"),precedence:y.GENERIC,parseInfix:r(((e,t)=>{let o=e.consume(".");e.consume("<");let i=[];do{i.push(e.parseType(y.PARAMETER_LIST))}while(e.consume(","));if(!e.consume(">"))throw new Error("Unterminated generic parameter list");return{type:"JsdocTypeGeneric",left:J(t),elements:i,meta:{brackets:"angle",dot:o}}}),"parseInfix")}),Mt=x({name:"unionParslet",accept:r((e=>"|"===e),"accept"),precedence:y.UNION,parseInfix:r(((e,t)=>{e.consume("|");let o=[];do{o.push(e.parseType(y.UNION))}while(e.consume("|"));return{type:"JsdocTypeUnion",elements:[J(t),...o]}}),"parseInfix")}),Pe=[we,Q,Z,Vt,Lt,Ut,Bt({allowTrailingComma:!0}),Ct,Mt,Q];function ee({allowSquareBracketsOnAnyType:e,allowJsdocNamePaths:t,pathGrammar:o}){return r((function(l,f,d){if(null==d||f>=y.NAME_PATH)return null;let h=l.lexer.current.type,D=l.lexer.next.type;if(!("."===h&&"<"!==D||"["===h&&(e||"JsdocTypeName"===d.type)||t&&("~"===h||"#"===h)))return null;let O,ae=!1;l.consume(".")?O="property":l.consume("[")?(O="property-brackets",ae=!0):l.consume("~")?O="inner":(l.consume("#"),O="instance");let G,rt=null!==o?new I(o,l.lexer,l):l,k=rt.parseIntermediateType(y.NAME_PATH);switch(l.acceptLexerState(rt),k.type){case"JsdocTypeName":G={type:"JsdocTypeProperty",value:k.value,meta:{quote:void 0}};break;case"JsdocTypeNumber":G={type:"JsdocTypeProperty",value:k.value.toString(10),meta:{quote:void 0}};break;case"JsdocTypeStringValue":G={type:"JsdocTypeProperty",value:k.value,meta:{quote:k.meta.quote}};break;case"JsdocTypeSpecialNamePath":if("event"!==k.specialType)throw new c(k,"Type 'JsdocTypeSpecialNamePath' is only allowed with specialType 'event'");G=k;break;default:throw new c(k,"Expecting 'JsdocTypeName', 'JsdocTypeNumber', 'JsdocStringValue' or 'JsdocTypeSpecialNamePath'")}if(ae&&!l.consume("]")){let nt=l.lexer.current;throw new Error(`Unterminated square brackets. Next token is '${nt.type}' with text '${nt.text}'`)}return{type:"JsdocTypeNamePath",left:J(d),right:G,pathType:O}}),"namePathParslet")}function R({allowedAdditionalTokens:e}){return x({name:"nameParslet",accept:r((t=>"Identifier"===t||"this"===t||"new"===t||e.includes(t)),"accept"),parsePrefix:r((t=>{let{type:o,text:i}=t.lexer.current;return t.consume(o),{type:"JsdocTypeName",value:i}}),"parsePrefix")})}r(ee,"createNamePathParslet"),r(R,"createNameParslet");let Y=x({name:"stringValueParslet",accept:r((e=>"StringValue"===e),"accept"),parsePrefix:r((e=>{let t=e.lexer.current.text;return e.consume("StringValue"),{type:"JsdocTypeStringValue",value:t.slice(1,-1),meta:{quote:"'"===t[0]?"single":"double"}}}),"parsePrefix")});function te({pathGrammar:e,allowedTypes:t}){return x({name:"specialNamePathParslet",accept:r((o=>t.includes(o)),"accept"),parsePrefix:r((o=>{let i=o.lexer.current.type;if(o.consume(i),!o.consume(":"))return{type:"JsdocTypeName",value:i};let l,f=o.lexer.current;if(o.consume("StringValue"))l={type:"JsdocTypeSpecialNamePath",value:f.text.slice(1,-1),specialType:i,meta:{quote:"'"===f.text[0]?"single":"double"}};else{let D="",E=["Identifier","@","/"];for(;E.some((O=>o.consume(O)));)D+=f.text,f=o.lexer.current;l={type:"JsdocTypeSpecialNamePath",value:D,specialType:i,meta:{quote:void 0}}}let d=new I(e,o.lexer,o),h=d.parseInfixIntermediateType(l,y.ALL);return o.acceptLexerState(d),J(h)}),"parsePrefix")})}r(te,"createSpecialNamePathParslet");let We=[R({allowedAdditionalTokens:["external","module"]}),Y,Z,ee({allowSquareBracketsOnAnyType:!1,allowJsdocNamePaths:!0,pathGrammar:null})],L=[...We,te({allowedTypes:["event"],pathGrammar:We})];function be(e){let t;if("JsdocTypeParameterList"===e.type)t=e.elements;else{if("JsdocTypeParenthesis"!==e.type)throw new c(e);t=[e.element]}return t.map((o=>he(o)))}function Kt(e){let t=be(e);if(t.some((o=>"JsdocTypeKeyValue"===o.type)))throw new Error("No parameter should be named");return t}function Se({allowNamedParameters:e,allowNoReturnType:t,allowWithoutParenthesis:o,allowNewAsFunctionKeyword:i}){return x({name:"functionParslet",accept:r(((l,f)=>"function"===l||i&&"new"===l&&"("===f),"accept"),parsePrefix:r((l=>{let f=l.consume("new");l.consume("function");let d="("===l.lexer.current.type;if(!d){if(!o)throw new Error("function is missing parameter list");return{type:"JsdocTypeName",value:"function"}}let h={type:"JsdocTypeFunction",parameters:[],arrow:!1,constructor:f,parenthesis:d},D=l.parseIntermediateType(y.FUNCTION);if(void 0===e)h.parameters=Kt(D);else{if(f&&"JsdocTypeFunction"===D.type&&D.arrow)return h=D,h.constructor=!0,h;h.parameters=be(D);for(let E of h.parameters)if("JsdocTypeKeyValue"===E.type&&!e.includes(E.key))throw new Error(`only allowed named parameters are ${e.join(", ")} but got ${E.type}`)}if(l.consume(":"))h.returnType=l.parseType(y.PREFIX);else if(!t)throw new Error("function is missing return type");return h}),"parsePrefix")})}function Ee({allowPostfix:e,allowEnclosingBrackets:t}){return x({name:"variadicParslet",accept:r((o=>"..."===o),"accept"),precedence:y.PREFIX,parsePrefix:r((o=>{o.consume("...");let i=t&&o.consume("[");try{let l=o.parseType(y.PREFIX);if(i&&!o.consume("]"))throw new Error("Unterminated variadic type. Missing ']'");return{type:"JsdocTypeVariadic",element:J(l),meta:{position:"prefix",squareBrackets:i}}}catch(l){if(l instanceof a){if(i)throw new Error("Empty square brackets for variadic are not allowed.");return{type:"JsdocTypeVariadic",meta:{position:void 0,squareBrackets:!1}}}throw l}}),"parsePrefix"),parseInfix:e?(o,i)=>(o.consume("..."),{type:"JsdocTypeVariadic",element:J(i),meta:{position:"suffix",squareBrackets:!1}}):void 0})}r(be,"getParameters"),r(Kt,"getUnnamedParameters"),r(Se,"createFunctionParslet"),r(Ee,"createVariadicParslet");let Ge=x({name:"symbolParslet",accept:r((e=>"("===e),"accept"),precedence:y.SYMBOL,parseInfix:r(((e,t)=>{if("JsdocTypeName"!==t.type)throw new Error("Symbol expects a name on the left side. (Reacting on '(')");e.consume("(");let o={type:"JsdocTypeSymbol",value:t.value};if(!e.consume(")")){let i=e.parseIntermediateType(y.SYMBOL);if(o.element=_t(i),!e.consume(")"))throw new Error("Symbol does not end after value")}return o}),"parseInfix")}),Xe=x({name:"arrayBracketsParslet",precedence:y.ARRAY_BRACKETS,accept:r(((e,t)=>"["===e&&"]"===t),"accept"),parseInfix:r(((e,t)=>(e.consume("["),e.consume("]"),{type:"JsdocTypeGeneric",left:{type:"JsdocTypeName",value:"Array"},elements:[J(t)],meta:{brackets:"square",dot:!1}})),"parseInfix")});function Ne({objectFieldGrammar:e,allowKeyTypes:t}){return x({name:"objectParslet",accept:r((o=>"{"===o),"accept"),parsePrefix:r((o=>{o.consume("{");let i={type:"JsdocTypeObject",meta:{separator:"comma"},elements:[]};if(!o.consume("}")){let l,f=new I(e,o.lexer,o);for(;;){f.acceptLexerState(o);let d=f.parseIntermediateType(y.OBJECT);o.acceptLexerState(f),void 0===d&&t&&(d=o.parseIntermediateType(y.OBJECT));let h=!1;if("JsdocTypeNullable"===d.type&&(h=!0,d=d.element),"JsdocTypeNumber"===d.type||"JsdocTypeName"===d.type||"JsdocTypeStringValue"===d.type){let E;"JsdocTypeStringValue"===d.type&&(E=d.meta.quote),i.elements.push({type:"JsdocTypeObjectField",key:d.value.toString(),right:void 0,optional:h,readonly:!1,meta:{quote:E}})}else{if("JsdocTypeObjectField"!==d.type&&"JsdocTypeJsdocObjectField"!==d.type)throw new c(d);i.elements.push(d)}if(o.lexer.current.startOfLine)l="linebreak";else if(o.consume(","))l="comma";else{if(!o.consume(";"))break;l="semicolon"}if("}"===o.lexer.current.type)break}if(i.meta.separator=l??"comma",!o.consume("}"))throw new Error("Unterminated record type. Missing '}'")}return i}),"parsePrefix")})}function De({allowSquaredProperties:e,allowKeyTypes:t,allowReadonly:o,allowOptional:i}){return x({name:"objectFieldParslet",precedence:y.KEY_VALUE,accept:r((l=>":"===l),"accept"),parseInfix:r(((l,f)=>{var d;let h=!1,D=!1;i&&"JsdocTypeNullable"===f.type&&(h=!0,f=f.element),o&&"JsdocTypeReadonlyProperty"===f.type&&(D=!0,f=f.element);let E=null!==(d=l.baseParser)&&void 0!==d?d:l;if(E.acceptLexerState(l),"JsdocTypeNumber"===f.type||"JsdocTypeName"===f.type||"JsdocTypeStringValue"===f.type||Je(f)){if(Je(f)&&!e)throw new c(f);let O;E.consume(":"),"JsdocTypeStringValue"===f.type&&(O=f.meta.quote);let ae=E.parseType(y.KEY_VALUE);return l.acceptLexerState(E),{type:"JsdocTypeObjectField",key:Je(f)?f:f.value.toString(),right:ae,optional:h,readonly:D,meta:{quote:O}}}{if(!t)throw new c(f);E.consume(":");let O=E.parseType(y.KEY_VALUE);return l.acceptLexerState(E),{type:"JsdocTypeJsdocObjectField",left:J(f),right:O}}}),"parseInfix")})}function Oe({allowOptional:e,allowVariadic:t}){return x({name:"keyValueParslet",precedence:y.KEY_VALUE,accept:r((o=>":"===o),"accept"),parseInfix:r(((o,i)=>{let l=!1,f=!1;if(e&&"JsdocTypeNullable"===i.type&&(l=!0,i=i.element),t&&"JsdocTypeVariadic"===i.type&&void 0!==i.element&&(f=!0,i=i.element),"JsdocTypeName"!==i.type)throw new c(i);o.consume(":");let d=o.parseType(y.KEY_VALUE);return{type:"JsdocTypeKeyValue",key:i.value,right:d,optional:l,variadic:f}}),"parseInfix")})}r(Ne,"createObjectParslet"),r(De,"createObjectFieldParslet"),r(Oe,"createKeyValueParslet");let ze=[...Pe,Se({allowWithoutParenthesis:!0,allowNamedParameters:["this","new"],allowNoReturnType:!0,allowNewAsFunctionKeyword:!1}),Y,te({allowedTypes:["module","external","event"],pathGrammar:L}),Ee({allowEnclosingBrackets:!0,allowPostfix:!0}),R({allowedAdditionalTokens:["keyof"]}),Ge,Xe,ee({allowSquareBracketsOnAnyType:!1,allowJsdocNamePaths:!0,pathGrammar:L})],$t=[...ze,Ne({objectFieldGrammar:[R({allowedAdditionalTokens:["module","in"]}),De({allowSquaredProperties:!1,allowKeyTypes:!0,allowOptional:!1,allowReadonly:!1}),...ze],allowKeyTypes:!0}),Oe({allowOptional:!0,allowVariadic:!0})],He=x({name:"typeOfParslet",accept:r((e=>"typeof"===e),"accept"),parsePrefix:r((e=>(e.consume("typeof"),{type:"JsdocTypeTypeof",element:J(e.parseType(y.KEY_OF_TYPE_OF))})),"parsePrefix")}),qt=[R({allowedAdditionalTokens:["module","keyof","event","external","in"]}),we,Q,Y,Z,De({allowSquaredProperties:!1,allowKeyTypes:!1,allowOptional:!1,allowReadonly:!1})],Yt=[...Pe,Ne({allowKeyTypes:!1,objectFieldGrammar:qt}),R({allowedAdditionalTokens:["event","external","in"]}),He,Se({allowWithoutParenthesis:!1,allowNamedParameters:["this","new"],allowNoReturnType:!0,allowNewAsFunctionKeyword:!1}),Ee({allowEnclosingBrackets:!1,allowPostfix:!1}),R({allowedAdditionalTokens:["keyof"]}),te({allowedTypes:["module"],pathGrammar:L}),ee({allowSquareBracketsOnAnyType:!1,allowJsdocNamePaths:!0,pathGrammar:L}),Oe({allowOptional:!1,allowVariadic:!1}),Ge],Wt=x({name:"assertsParslet",accept:r((e=>"asserts"===e),"accept"),parsePrefix:r((e=>{e.consume("asserts");let t=e.parseIntermediateType(y.SYMBOL);if("JsdocTypeName"!==t.type)throw new c(t,"A typescript asserts always has to have a name on the left side.");return e.consume("is"),{type:"JsdocTypeAsserts",left:t,right:J(e.parseIntermediateType(y.INFIX))}}),"parsePrefix")});function Gt({allowQuestionMark:e}){return x({name:"tupleParslet",accept:r((t=>"["===t),"accept"),parsePrefix:r((t=>{t.consume("[");let o={type:"JsdocTypeTuple",elements:[]};if(t.consume("]"))return o;let i=t.parseIntermediateType(y.ALL);if("JsdocTypeParameterList"===i.type?"JsdocTypeKeyValue"===i.elements[0].type?o.elements=i.elements.map(H):o.elements=i.elements.map(J):"JsdocTypeKeyValue"===i.type?o.elements=[H(i)]:o.elements=[J(i)],!t.consume("]"))throw new Error("Unterminated '['");if(!e&&o.elements.some((l=>"JsdocTypeUnknown"===l.type)))throw new Error("Question mark in tuple not allowed");return o}),"parsePrefix")})}r(Gt,"createTupleParslet");let Xt=x({name:"keyOfParslet",accept:r((e=>"keyof"===e),"accept"),parsePrefix:r((e=>(e.consume("keyof"),{type:"JsdocTypeKeyof",element:J(e.parseType(y.KEY_OF_TYPE_OF))})),"parsePrefix")}),zt=x({name:"importParslet",accept:r((e=>"import"===e),"accept"),parsePrefix:r((e=>{if(e.consume("import"),!e.consume("("))throw new Error("Missing parenthesis after import keyword");let t=e.parseType(y.PREFIX);if("JsdocTypeStringValue"!==t.type)throw new Error("Only string values are allowed as paths for imports");if(!e.consume(")"))throw new Error("Missing closing parenthesis after import keyword");return{type:"JsdocTypeImport",element:t}}),"parsePrefix")}),Ht=x({name:"readonlyPropertyParslet",accept:r((e=>"readonly"===e),"accept"),parsePrefix:r((e=>(e.consume("readonly"),{type:"JsdocTypeReadonlyProperty",element:e.parseType(y.KEY_VALUE)})),"parsePrefix")}),Qt=x({name:"arrowFunctionParslet",precedence:y.ARROW,accept:r((e=>"=>"===e),"accept"),parseInfix:r(((e,t)=>(e.consume("=>"),{type:"JsdocTypeFunction",parameters:be(t).map(Ft),arrow:!0,constructor:!1,parenthesis:!0,returnType:e.parseType(y.OBJECT)})),"parseInfix")}),Zt=x({name:"intersectionParslet",accept:r((e=>"&"===e),"accept"),precedence:y.INTERSECTION,parseInfix:r(((e,t)=>{e.consume("&");let o=[];do{o.push(e.parseType(y.INTERSECTION))}while(e.consume("&"));return{type:"JsdocTypeIntersection",elements:[J(t),...o]}}),"parseInfix")}),er=x({name:"predicateParslet",precedence:y.INFIX,accept:r((e=>"is"===e),"accept"),parseInfix:r(((e,t)=>{if("JsdocTypeName"!==t.type)throw new c(t,"A typescript predicate always has to have a name on the left side.");return e.consume("is"),{type:"JsdocTypePredicate",left:t,right:J(e.parseIntermediateType(y.INFIX))}}),"parseInfix")}),tr=x({name:"objectSquareBracketPropertyParslet",accept:r((e=>"["===e),"accept"),parsePrefix:r((e=>{if(void 0===e.baseParser)throw new Error("Only allowed inside object grammar");e.consume("[");let o,t=e.lexer.current.text;if(e.consume("Identifier"),e.consume(":")){let i=e.baseParser;i.acceptLexerState(e),o={type:"JsdocTypeIndexSignature",key:t,right:i.parseType(y.INDEX_BRACKETS)},e.acceptLexerState(i)}else{if(!e.consume("in"))throw new Error("Missing ':' or 'in' inside square bracketed property.");{let i=e.baseParser;i.acceptLexerState(e),o={type:"JsdocTypeMappedType",key:t,right:i.parseType(y.ARRAY_BRACKETS)},e.acceptLexerState(i)}}if(!e.consume("]"))throw new Error("Unterminated square brackets");return o}),"parsePrefix")}),rr=[Ht,R({allowedAdditionalTokens:["module","event","keyof","event","external","in"]}),we,Q,Y,Z,De({allowSquaredProperties:!0,allowKeyTypes:!1,allowOptional:!0,allowReadonly:!0}),tr],nr=[...Pe,Ne({allowKeyTypes:!1,objectFieldGrammar:rr}),He,Xt,zt,Y,Se({allowWithoutParenthesis:!0,allowNoReturnType:!1,allowNamedParameters:["this","new","args"],allowNewAsFunctionKeyword:!0}),Gt({allowQuestionMark:!1}),Ee({allowEnclosingBrackets:!1,allowPostfix:!1}),Wt,R({allowedAdditionalTokens:["event","external","in"]}),te({allowedTypes:["module"],pathGrammar:L}),Xe,Qt,ee({allowSquareBracketsOnAnyType:!0,allowJsdocNamePaths:!1,pathGrammar:L}),Zt,er,Oe({allowVariadic:!0,allowOptional:!0})];function Qe(e,t){switch(t){case"closure":return new I(Yt,e).parse();case"jsdoc":return new I($t,e).parse();case"typescript":return new I(nr,e).parse()}}function or(e,t=["typescript","closure","jsdoc"]){let o;for(let i of t)try{return Qe(e,i)}catch(l){o=l}throw o}function W(e,t){let o=e[t.type];if(void 0===o)throw new Error(`In this set of transform rules exists no rule for type ${t.type}.`);return o(t,(i=>W(e,i)))}function N(e){throw new Error("This transform is not available. Are you trying the correct parsing mode?")}function Ze(e){let t={params:[]};for(let o of e.parameters)"JsdocTypeKeyValue"===o.type?"this"===o.key?t.this=o.right:"new"===o.key?t.new=o.right:t.params.push(o):t.params.push(o);return t}function re(e,t,o){return"prefix"===e?o+t:t+o}function j(e,t){switch(t){case"double":return`"${e}"`;case"single":return`'${e}'`;case void 0:return e}}function et(){return{JsdocTypeParenthesis:r(((e,t)=>`(${void 0!==e.element?t(e.element):""})`),"JsdocTypeParenthesis"),JsdocTypeKeyof:r(((e,t)=>`keyof ${t(e.element)}`),"JsdocTypeKeyof"),JsdocTypeFunction:r(((e,t)=>{if(e.arrow){if(void 0===e.returnType)throw new Error("Arrow function needs a return type.");let o=`(${e.parameters.map(t).join(", ")}) => ${t(e.returnType)}`;return e.constructor&&(o="new "+o),o}{let o=e.constructor?"new":"function";return e.parenthesis&&(o+=`(${e.parameters.map(t).join(", ")})`,void 0!==e.returnType&&(o+=`: ${t(e.returnType)}`)),o}}),"JsdocTypeFunction"),JsdocTypeName:r((e=>e.value),"JsdocTypeName"),JsdocTypeTuple:r(((e,t)=>`[${e.elements.map(t).join(", ")}]`),"JsdocTypeTuple"),JsdocTypeVariadic:r(((e,t)=>void 0===e.meta.position?"...":re(e.meta.position,t(e.element),"...")),"JsdocTypeVariadic"),JsdocTypeNamePath:r(((e,t)=>{let o=t(e.left),i=t(e.right);switch(e.pathType){case"inner":return`${o}~${i}`;case"instance":return`${o}#${i}`;case"property":return`${o}.${i}`;case"property-brackets":return`${o}[${i}]`}}),"JsdocTypeNamePath"),JsdocTypeStringValue:r((e=>j(e.value,e.meta.quote)),"JsdocTypeStringValue"),JsdocTypeAny:r((()=>"*"),"JsdocTypeAny"),JsdocTypeGeneric:r(((e,t)=>{if("square"===e.meta.brackets){let o=e.elements[0],i=t(o);return"JsdocTypeUnion"===o.type||"JsdocTypeIntersection"===o.type?`(${i})[]`:`${i}[]`}return`${t(e.left)}${e.meta.dot?".":""}<${e.elements.map(t).join(", ")}>`}),"JsdocTypeGeneric"),JsdocTypeImport:r(((e,t)=>`import(${t(e.element)})`),"JsdocTypeImport"),JsdocTypeObjectField:r(((e,t)=>{let o="";return e.readonly&&(o+="readonly "),"string"==typeof e.key?o+=j(e.key,e.meta.quote):o+=t(e.key),e.optional&&(o+="?"),void 0===e.right?o:o+`: ${t(e.right)}`}),"JsdocTypeObjectField"),JsdocTypeJsdocObjectField:r(((e,t)=>`${t(e.left)}: ${t(e.right)}`),"JsdocTypeJsdocObjectField"),JsdocTypeKeyValue:r(((e,t)=>{let o=e.key;return e.optional&&(o+="?"),e.variadic&&(o="..."+o),void 0===e.right?o:o+`: ${t(e.right)}`}),"JsdocTypeKeyValue"),JsdocTypeSpecialNamePath:r((e=>`${e.specialType}:${j(e.value,e.meta.quote)}`),"JsdocTypeSpecialNamePath"),JsdocTypeNotNullable:r(((e,t)=>re(e.meta.position,t(e.element),"!")),"JsdocTypeNotNullable"),JsdocTypeNull:r((()=>"null"),"JsdocTypeNull"),JsdocTypeNullable:r(((e,t)=>re(e.meta.position,t(e.element),"?")),"JsdocTypeNullable"),JsdocTypeNumber:r((e=>e.value.toString()),"JsdocTypeNumber"),JsdocTypeObject:r(((e,t)=>`{${e.elements.map(t).join(("comma"===e.meta.separator?",":";")+" ")}}`),"JsdocTypeObject"),JsdocTypeOptional:r(((e,t)=>re(e.meta.position,t(e.element),"=")),"JsdocTypeOptional"),JsdocTypeSymbol:r(((e,t)=>`${e.value}(${void 0!==e.element?t(e.element):""})`),"JsdocTypeSymbol"),JsdocTypeTypeof:r(((e,t)=>`typeof ${t(e.element)}`),"JsdocTypeTypeof"),JsdocTypeUndefined:r((()=>"undefined"),"JsdocTypeUndefined"),JsdocTypeUnion:r(((e,t)=>e.elements.map(t).join(" | ")),"JsdocTypeUnion"),JsdocTypeUnknown:r((()=>"?"),"JsdocTypeUnknown"),JsdocTypeIntersection:r(((e,t)=>e.elements.map(t).join(" & ")),"JsdocTypeIntersection"),JsdocTypeProperty:r((e=>j(e.value,e.meta.quote)),"JsdocTypeProperty"),JsdocTypePredicate:r(((e,t)=>`${t(e.left)} is ${t(e.right)}`),"JsdocTypePredicate"),JsdocTypeIndexSignature:r(((e,t)=>`[${e.key}: ${t(e.right)}]`),"JsdocTypeIndexSignature"),JsdocTypeMappedType:r(((e,t)=>`[${e.key} in ${t(e.right)}]`),"JsdocTypeMappedType"),JsdocTypeAsserts:r(((e,t)=>`asserts ${t(e.left)} is ${t(e.right)}`),"JsdocTypeAsserts")}}r(Qe,"parse"),r(or,"tryParse"),r(W,"transform"),r(N,"notAvailableTransform"),r(Ze,"extractSpecialParams"),r(re,"applyPosition"),r(j,"quote"),r(et,"stringifyRules");let sr=et();function ar(e){return W(sr,e)}r(ar,"stringify");let ir=["null","true","false","break","case","catch","class","const","continue","debugger","default","delete","do","else","export","extends","finally","for","function","if","import","in","instanceof","new","return","super","switch","this","throw","try","typeof","var","void","while","with","yield"];function F(e){let t={type:"NameExpression",name:e};return ir.includes(e)&&(t.reservedWord=!0),t}r(F,"makeName");let pr={JsdocTypeOptional:r(((e,t)=>{let o=t(e.element);return o.optional=!0,o}),"JsdocTypeOptional"),JsdocTypeNullable:r(((e,t)=>{let o=t(e.element);return o.nullable=!0,o}),"JsdocTypeNullable"),JsdocTypeNotNullable:r(((e,t)=>{let o=t(e.element);return o.nullable=!1,o}),"JsdocTypeNotNullable"),JsdocTypeVariadic:r(((e,t)=>{if(void 0===e.element)throw new Error("dots without value are not allowed in catharsis mode");let o=t(e.element);return o.repeatable=!0,o}),"JsdocTypeVariadic"),JsdocTypeAny:r((()=>({type:"AllLiteral"})),"JsdocTypeAny"),JsdocTypeNull:r((()=>({type:"NullLiteral"})),"JsdocTypeNull"),JsdocTypeStringValue:r((e=>F(j(e.value,e.meta.quote))),"JsdocTypeStringValue"),JsdocTypeUndefined:r((()=>({type:"UndefinedLiteral"})),"JsdocTypeUndefined"),JsdocTypeUnknown:r((()=>({type:"UnknownLiteral"})),"JsdocTypeUnknown"),JsdocTypeFunction:r(((e,t)=>{let o=Ze(e),i={type:"FunctionType",params:o.params.map(t)};return void 0!==o.this&&(i.this=t(o.this)),void 0!==o.new&&(i.new=t(o.new)),void 0!==e.returnType&&(i.result=t(e.returnType)),i}),"JsdocTypeFunction"),JsdocTypeGeneric:r(((e,t)=>({type:"TypeApplication",applications:e.elements.map((o=>t(o))),expression:t(e.left)})),"JsdocTypeGeneric"),JsdocTypeSpecialNamePath:r((e=>F(e.specialType+":"+j(e.value,e.meta.quote))),"JsdocTypeSpecialNamePath"),JsdocTypeName:r((e=>"function"!==e.value?F(e.value):{type:"FunctionType",params:[]}),"JsdocTypeName"),JsdocTypeNumber:r((e=>F(e.value.toString())),"JsdocTypeNumber"),JsdocTypeObject:r(((e,t)=>{let o={type:"RecordType",fields:[]};for(let i of e.elements)"JsdocTypeObjectField"!==i.type&&"JsdocTypeJsdocObjectField"!==i.type?o.fields.push({type:"FieldType",key:t(i),value:void 0}):o.fields.push(t(i));return o}),"JsdocTypeObject"),JsdocTypeObjectField:r(((e,t)=>{if("string"!=typeof e.key)throw new Error("Index signatures and mapped types are not supported");return{type:"FieldType",key:F(j(e.key,e.meta.quote)),value:void 0===e.right?void 0:t(e.right)}}),"JsdocTypeObjectField"),JsdocTypeJsdocObjectField:r(((e,t)=>({type:"FieldType",key:t(e.left),value:t(e.right)})),"JsdocTypeJsdocObjectField"),JsdocTypeUnion:r(((e,t)=>({type:"TypeUnion",elements:e.elements.map((o=>t(o)))})),"JsdocTypeUnion"),JsdocTypeKeyValue:r(((e,t)=>({type:"FieldType",key:F(e.key),value:void 0===e.right?void 0:t(e.right)})),"JsdocTypeKeyValue"),JsdocTypeNamePath:r(((e,t)=>{let i,o=t(e.left);i="JsdocTypeSpecialNamePath"===e.right.type?t(e.right).name:j(e.right.value,e.right.meta.quote);let l="inner"===e.pathType?"~":"instance"===e.pathType?"#":".";return F(`${o.name}${l}${i}`)}),"JsdocTypeNamePath"),JsdocTypeSymbol:r((e=>{let t="",o=e.element,i=!1;return"JsdocTypeVariadic"===o?.type&&("prefix"===o.meta.position?t="...":i=!0,o=o.element),"JsdocTypeName"===o?.type?t+=o.value:"JsdocTypeNumber"===o?.type&&(t+=o.value.toString()),i&&(t+="..."),F(`${e.value}(${t})`)}),"JsdocTypeSymbol"),JsdocTypeParenthesis:r(((e,t)=>t(J(e.element))),"JsdocTypeParenthesis"),JsdocTypeMappedType:N,JsdocTypeIndexSignature:N,JsdocTypeImport:N,JsdocTypeKeyof:N,JsdocTypeTuple:N,JsdocTypeTypeof:N,JsdocTypeIntersection:N,JsdocTypeProperty:N,JsdocTypePredicate:N,JsdocTypeAsserts:N};function cr(e){return W(pr,e)}function V(e){switch(e){case void 0:return"none";case"single":return"single";case"double":return"double"}}function lr(e){switch(e){case"inner":return"INNER_MEMBER";case"instance":return"INSTANCE_MEMBER";case"property":case"property-brackets":return"MEMBER"}}function ve(e,t){return 2===t.length?{type:e,left:t[0],right:t[1]}:{type:e,left:t[0],right:ve(e,t.slice(1))}}r(cr,"catharsisTransform"),r(V,"getQuoteStyle"),r(lr,"getMemberType"),r(ve,"nestResults");let ur={JsdocTypeOptional:r(((e,t)=>({type:"OPTIONAL",value:t(e.element),meta:{syntax:"prefix"===e.meta.position?"PREFIX_EQUAL_SIGN":"SUFFIX_EQUALS_SIGN"}})),"JsdocTypeOptional"),JsdocTypeNullable:r(((e,t)=>({type:"NULLABLE",value:t(e.element),meta:{syntax:"prefix"===e.meta.position?"PREFIX_QUESTION_MARK":"SUFFIX_QUESTION_MARK"}})),"JsdocTypeNullable"),JsdocTypeNotNullable:r(((e,t)=>({type:"NOT_NULLABLE",value:t(e.element),meta:{syntax:"prefix"===e.meta.position?"PREFIX_BANG":"SUFFIX_BANG"}})),"JsdocTypeNotNullable"),JsdocTypeVariadic:r(((e,t)=>{let o={type:"VARIADIC",meta:{syntax:"prefix"===e.meta.position?"PREFIX_DOTS":"suffix"===e.meta.position?"SUFFIX_DOTS":"ONLY_DOTS"}};return void 0!==e.element&&(o.value=t(e.element)),o}),"JsdocTypeVariadic"),JsdocTypeName:r((e=>({type:"NAME",name:e.value})),"JsdocTypeName"),JsdocTypeTypeof:r(((e,t)=>({type:"TYPE_QUERY",name:t(e.element)})),"JsdocTypeTypeof"),JsdocTypeTuple:r(((e,t)=>({type:"TUPLE",entries:e.elements.map(t)})),"JsdocTypeTuple"),JsdocTypeKeyof:r(((e,t)=>({type:"KEY_QUERY",value:t(e.element)})),"JsdocTypeKeyof"),JsdocTypeImport:r((e=>({type:"IMPORT",path:{type:"STRING_VALUE",quoteStyle:V(e.element.meta.quote),string:e.element.value}})),"JsdocTypeImport"),JsdocTypeUndefined:r((()=>({type:"NAME",name:"undefined"})),"JsdocTypeUndefined"),JsdocTypeAny:r((()=>({type:"ANY"})),"JsdocTypeAny"),JsdocTypeFunction:r(((e,t)=>{let o=Ze(e),i={type:e.arrow?"ARROW":"FUNCTION",params:o.params.map((l=>{if("JsdocTypeKeyValue"===l.type){if(void 0===l.right)throw new Error("Function parameter without ':' is not expected to be 'KEY_VALUE'");return{type:"NAMED_PARAMETER",name:l.key,typeName:t(l.right)}}return t(l)})),new:null,returns:null};return void 0!==o.this?i.this=t(o.this):e.arrow||(i.this=null),void 0!==o.new&&(i.new=t(o.new)),void 0!==e.returnType&&(i.returns=t(e.returnType)),i}),"JsdocTypeFunction"),JsdocTypeGeneric:r(((e,t)=>{let o={type:"GENERIC",subject:t(e.left),objects:e.elements.map(t),meta:{syntax:"square"===e.meta.brackets?"SQUARE_BRACKET":e.meta.dot?"ANGLE_BRACKET_WITH_DOT":"ANGLE_BRACKET"}};return"square"===e.meta.brackets&&"JsdocTypeFunction"===e.elements[0].type&&!e.elements[0].parenthesis&&(o.objects[0]={type:"NAME",name:"function"}),o}),"JsdocTypeGeneric"),JsdocTypeObjectField:r(((e,t)=>{if("string"!=typeof e.key)throw new Error("Index signatures and mapped types are not supported");if(void 0===e.right)return{type:"RECORD_ENTRY",key:e.key,quoteStyle:V(e.meta.quote),value:null,readonly:!1};let o=t(e.right);return e.optional&&(o={type:"OPTIONAL",value:o,meta:{syntax:"SUFFIX_KEY_QUESTION_MARK"}}),{type:"RECORD_ENTRY",key:e.key.toString(),quoteStyle:V(e.meta.quote),value:o,readonly:!1}}),"JsdocTypeObjectField"),JsdocTypeJsdocObjectField:r((()=>{throw new Error("Keys may not be typed in jsdoctypeparser.")}),"JsdocTypeJsdocObjectField"),JsdocTypeKeyValue:r(((e,t)=>{if(void 0===e.right)return{type:"RECORD_ENTRY",key:e.key,quoteStyle:"none",value:null,readonly:!1};let o=t(e.right);return e.optional&&(o={type:"OPTIONAL",value:o,meta:{syntax:"SUFFIX_KEY_QUESTION_MARK"}}),{type:"RECORD_ENTRY",key:e.key,quoteStyle:"none",value:o,readonly:!1}}),"JsdocTypeKeyValue"),JsdocTypeObject:r(((e,t)=>{let o=[];for(let i of e.elements)("JsdocTypeObjectField"===i.type||"JsdocTypeJsdocObjectField"===i.type)&&o.push(t(i));return{type:"RECORD",entries:o}}),"JsdocTypeObject"),JsdocTypeSpecialNamePath:r((e=>{if("module"!==e.specialType)throw new Error(`jsdoctypeparser does not support type ${e.specialType} at this point.`);return{type:"MODULE",value:{type:"FILE_PATH",quoteStyle:V(e.meta.quote),path:e.value}}}),"JsdocTypeSpecialNamePath"),JsdocTypeNamePath:r(((e,t)=>{let i,l,o=!1;"JsdocTypeSpecialNamePath"===e.right.type&&"event"===e.right.specialType?(o=!0,i=e.right.value,l=V(e.right.meta.quote)):(i=e.right.value,l=V(e.right.meta.quote));let f={type:lr(e.pathType),owner:t(e.left),name:i,quoteStyle:l,hasEventPrefix:o};if("MODULE"===f.owner.type){let d=f.owner;return f.owner=f.owner.value,d.value=f,d}return f}),"JsdocTypeNamePath"),JsdocTypeUnion:r(((e,t)=>ve("UNION",e.elements.map(t))),"JsdocTypeUnion"),JsdocTypeParenthesis:r(((e,t)=>({type:"PARENTHESIS",value:t(J(e.element))})),"JsdocTypeParenthesis"),JsdocTypeNull:r((()=>({type:"NAME",name:"null"})),"JsdocTypeNull"),JsdocTypeUnknown:r((()=>({type:"UNKNOWN"})),"JsdocTypeUnknown"),JsdocTypeStringValue:r((e=>({type:"STRING_VALUE",quoteStyle:V(e.meta.quote),string:e.value})),"JsdocTypeStringValue"),JsdocTypeIntersection:r(((e,t)=>ve("INTERSECTION",e.elements.map(t))),"JsdocTypeIntersection"),JsdocTypeNumber:r((e=>({type:"NUMBER_VALUE",number:e.value.toString()})),"JsdocTypeNumber"),JsdocTypeSymbol:N,JsdocTypeProperty:N,JsdocTypePredicate:N,JsdocTypeMappedType:N,JsdocTypeIndexSignature:N,JsdocTypeAsserts:N};function mr(e){return W(ur,e)}function fr(){return{JsdocTypeIntersection:r(((e,t)=>({type:"JsdocTypeIntersection",elements:e.elements.map(t)})),"JsdocTypeIntersection"),JsdocTypeGeneric:r(((e,t)=>({type:"JsdocTypeGeneric",left:t(e.left),elements:e.elements.map(t),meta:{dot:e.meta.dot,brackets:e.meta.brackets}})),"JsdocTypeGeneric"),JsdocTypeNullable:r((e=>e),"JsdocTypeNullable"),JsdocTypeUnion:r(((e,t)=>({type:"JsdocTypeUnion",elements:e.elements.map(t)})),"JsdocTypeUnion"),JsdocTypeUnknown:r((e=>e),"JsdocTypeUnknown"),JsdocTypeUndefined:r((e=>e),"JsdocTypeUndefined"),JsdocTypeTypeof:r(((e,t)=>({type:"JsdocTypeTypeof",element:t(e.element)})),"JsdocTypeTypeof"),JsdocTypeSymbol:r(((e,t)=>{let o={type:"JsdocTypeSymbol",value:e.value};return void 0!==e.element&&(o.element=t(e.element)),o}),"JsdocTypeSymbol"),JsdocTypeOptional:r(((e,t)=>({type:"JsdocTypeOptional",element:t(e.element),meta:{position:e.meta.position}})),"JsdocTypeOptional"),JsdocTypeObject:r(((e,t)=>({type:"JsdocTypeObject",meta:{separator:"comma"},elements:e.elements.map(t)})),"JsdocTypeObject"),JsdocTypeNumber:r((e=>e),"JsdocTypeNumber"),JsdocTypeNull:r((e=>e),"JsdocTypeNull"),JsdocTypeNotNullable:r(((e,t)=>({type:"JsdocTypeNotNullable",element:t(e.element),meta:{position:e.meta.position}})),"JsdocTypeNotNullable"),JsdocTypeSpecialNamePath:r((e=>e),"JsdocTypeSpecialNamePath"),JsdocTypeObjectField:r(((e,t)=>({type:"JsdocTypeObjectField",key:e.key,right:void 0===e.right?void 0:t(e.right),optional:e.optional,readonly:e.readonly,meta:e.meta})),"JsdocTypeObjectField"),JsdocTypeJsdocObjectField:r(((e,t)=>({type:"JsdocTypeJsdocObjectField",left:t(e.left),right:t(e.right)})),"JsdocTypeJsdocObjectField"),JsdocTypeKeyValue:r(((e,t)=>({type:"JsdocTypeKeyValue",key:e.key,right:void 0===e.right?void 0:t(e.right),optional:e.optional,variadic:e.variadic})),"JsdocTypeKeyValue"),JsdocTypeImport:r(((e,t)=>({type:"JsdocTypeImport",element:t(e.element)})),"JsdocTypeImport"),JsdocTypeAny:r((e=>e),"JsdocTypeAny"),JsdocTypeStringValue:r((e=>e),"JsdocTypeStringValue"),JsdocTypeNamePath:r((e=>e),"JsdocTypeNamePath"),JsdocTypeVariadic:r(((e,t)=>{let o={type:"JsdocTypeVariadic",meta:{position:e.meta.position,squareBrackets:e.meta.squareBrackets}};return void 0!==e.element&&(o.element=t(e.element)),o}),"JsdocTypeVariadic"),JsdocTypeTuple:r(((e,t)=>({type:"JsdocTypeTuple",elements:e.elements.map(t)})),"JsdocTypeTuple"),JsdocTypeName:r((e=>e),"JsdocTypeName"),JsdocTypeFunction:r(((e,t)=>{let o={type:"JsdocTypeFunction",arrow:e.arrow,parameters:e.parameters.map(t),constructor:e.constructor,parenthesis:e.parenthesis};return void 0!==e.returnType&&(o.returnType=t(e.returnType)),o}),"JsdocTypeFunction"),JsdocTypeKeyof:r(((e,t)=>({type:"JsdocTypeKeyof",element:t(e.element)})),"JsdocTypeKeyof"),JsdocTypeParenthesis:r(((e,t)=>({type:"JsdocTypeParenthesis",element:t(e.element)})),"JsdocTypeParenthesis"),JsdocTypeProperty:r((e=>e),"JsdocTypeProperty"),JsdocTypePredicate:r(((e,t)=>({type:"JsdocTypePredicate",left:t(e.left),right:t(e.right)})),"JsdocTypePredicate"),JsdocTypeIndexSignature:r(((e,t)=>({type:"JsdocTypeIndexSignature",key:e.key,right:t(e.right)})),"JsdocTypeIndexSignature"),JsdocTypeMappedType:r(((e,t)=>({type:"JsdocTypeMappedType",key:e.key,right:t(e.right)})),"JsdocTypeMappedType"),JsdocTypeAsserts:r(((e,t)=>({type:"JsdocTypeAsserts",left:t(e.left),right:t(e.right)})),"JsdocTypeAsserts")}}r(mr,"jtpTransform"),r(fr,"identityTransformRules");let tt={JsdocTypeAny:[],JsdocTypeFunction:["parameters","returnType"],JsdocTypeGeneric:["left","elements"],JsdocTypeImport:[],JsdocTypeIndexSignature:["right"],JsdocTypeIntersection:["elements"],JsdocTypeKeyof:["element"],JsdocTypeKeyValue:["right"],JsdocTypeMappedType:["right"],JsdocTypeName:[],JsdocTypeNamePath:["left","right"],JsdocTypeNotNullable:["element"],JsdocTypeNull:[],JsdocTypeNullable:["element"],JsdocTypeNumber:[],JsdocTypeObject:["elements"],JsdocTypeObjectField:["right"],JsdocTypeJsdocObjectField:["left","right"],JsdocTypeOptional:["element"],JsdocTypeParenthesis:["element"],JsdocTypeSpecialNamePath:[],JsdocTypeStringValue:[],JsdocTypeSymbol:["element"],JsdocTypeTuple:["elements"],JsdocTypeTypeof:["element"],JsdocTypeUndefined:[],JsdocTypeUnion:["elements"],JsdocTypeUnknown:[],JsdocTypeVariadic:["element"],JsdocTypeProperty:[],JsdocTypePredicate:["left","right"],JsdocTypeAsserts:["left","right"]};function ke(e,t,o,i,l){i?.(e,t,o);let f=tt[e.type];for(let d of f){let h=e[d];if(void 0!==h)if(Array.isArray(h))for(let D of h)ke(D,e,d,i,l);else ke(h,e,d,i,l)}l?.(e,t,o)}function yr(e,t,o){ke(e,void 0,void 0,t,o)}r(ke,"_traverse"),r(yr,"traverse"),n.catharsisTransform=cr,n.identityTransformRules=fr,n.jtpTransform=mr,n.parse=Qe,n.stringify=ar,n.stringifyRules=et,n.transform=W,n.traverse=yr,n.tryParse=or,n.visitorKeys=tt},"object"==typeof fe&&typeof yt<"u"?s(fe):"function"==typeof define&&__webpack_require__.amdO?define(["exports"],s):s((n=typeof globalThis<"u"?globalThis:n||self).jtpp={})},()=>(s||n((s={exports:{}}).exports,s),s.exports)),Sr=r((n=>"literal"===n.name),"isLiteral"),Er=r((n=>n.value.replace(/['|"]/g,"")),"toEnumOption"),Nr=r((n=>{switch(n.type){case"function":return{name:"function"};case"object":let s={};return n.signature.properties.forEach((a=>{s[a.key]=B(a.value)})),{name:"object",value:s};default:throw new storybook_internal_preview_errors__WEBPACK_IMPORTED_MODULE_0__.UnknownArgTypesError({type:n,language:"Flow"})}}),"convertSig"),B=r((n=>{let{name:s,raw:a}=n,p={};switch(typeof a<"u"&&(p.raw=a),n.name){case"literal":return{...p,name:"other",value:n.value};case"string":case"number":case"symbol":case"boolean":return{...p,name:s};case"Array":return{...p,name:"array",value:n.elements.map(B)};case"signature":return{...p,...Nr(n)};case"union":return n.elements?.every(Sr)?{...p,name:"enum",value:n.elements?.map(Er)}:{...p,name:s,value:n.elements?.map(B)};case"intersection":return{...p,name:s,value:n.elements?.map(B)};default:return{...p,name:"other",value:s}}}),"convert");function X(n){if(!n||"object"!=typeof n)return!1;let s=Object.getPrototypeOf(n);return(null===s||s===Object.prototype||null===Object.getPrototypeOf(s))&&"[object Object]"===Object.prototype.toString.call(n)}function Re(n,s){let a={},p=Object.keys(n);for(let c=0;cn.replace(ot,"")),"trimQuotes"),Or=r((n=>ot.test(n)),"includesQuotes"),ie=r((n=>{let s=Dr(n);return Or(n)||Number.isNaN(Number(s))?s:Number(s)}),"parseLiteral"),vr=/^\(.*\) => /,C=r((n=>{let{name:s,raw:a,computed:p,value:c}=n,u={};switch(typeof a<"u"&&(u.raw=a),s){case"enum":{let T=p?c:c.map((g=>ie(g.value)));return{...u,name:s,value:T}}case"string":case"number":case"symbol":case"object":return{...u,name:s};case"func":return{...u,name:"function"};case"bool":case"boolean":return{...u,name:"boolean"};case"arrayOf":case"array":return{...u,name:"array",value:c&&C(c)};case"objectOf":return{...u,name:s,value:C(c)};case"shape":case"exact":let m=Re(c,(T=>C(T)));return{...u,name:"object",value:m};case"union":return{...u,name:"union",value:c.map((T=>C(T)))};default:{if(s?.indexOf("|")>0)try{let P=s.split("|").map((b=>JSON.parse(b)));return{...u,name:"enum",value:P}}catch{}let T=c?`${s}(${c})`:s,g=vr.test(s)?"function":"other";return{...u,name:g,value:T}}}}),"convert"),Ar=r((n=>{switch(n.type){case"function":return{name:"function"};case"object":let s={};return n.signature.properties.forEach((a=>{s[a.key]=M(a.value)})),{name:"object",value:s};default:throw new storybook_internal_preview_errors__WEBPACK_IMPORTED_MODULE_0__.UnknownArgTypesError({type:n,language:"Typescript"})}}),"convertSig"),M=r((n=>{let{name:s,raw:a}=n,p={};switch(typeof a<"u"&&(p.raw=a),n.name){case"string":case"number":case"symbol":case"boolean":return{...p,name:s};case"Array":return{...p,name:"array",value:n.elements.map(M)};case"signature":return{...p,...Ar(n)};case"union":let c;return c=n.elements?.every((u=>"literal"===u.name))?{...p,name:"enum",value:n.elements?.map((u=>ie(u.value)))}:{...p,name:s,value:n.elements?.map(M)},c;case"intersection":return{...p,name:s,value:n.elements?.map(M)};default:return{...p,name:"other",value:s}}}),"convert"),pe=r((n=>{let{type:s,tsType:a,flowType:p}=n;try{if(null!=s)return C(s);if(null!=a)return M(a);if(null!=p)return B(p)}catch(c){console.error(c)}return null}),"convert"),Ir=(c=>(c.JAVASCRIPT="JavaScript",c.FLOW="Flow",c.TYPESCRIPT="TypeScript",c.UNKNOWN="Unknown",c))(Ir||{}),Rr=["null","undefined"];function K(n){return Rr.some((s=>s===n))}r(K,"isDefaultValueBlacklisted");var v,st=r((n=>{if(!n)return"";if("string"==typeof n)return n;throw new Error(`Description: expected string, got: ${JSON.stringify(n)}`)}),"str");function at(n){return!!n.__docgenInfo}function it(n){return null!=n&&Object.keys(n).length>0}function pt(n,s){return at(n)?n.__docgenInfo[s]:null}function ct(n){return at(n)?st(n.__docgenInfo.description):""}function je(n){return/^\s+$/.test(n)}function lt(n){let s=n.match(/\r+$/);return null==s?["",n]:[n.slice(-s[0].length),n.slice(0,-s[0].length)]}function A(n){let s=n.match(/^\s+/);return null==s?["",n]:[n.slice(0,s[0].length),n.slice(s[0].length)]}function ut(n){return n.split(/\n/)}function mt(n={}){return Object.assign({tag:"",name:"",type:"",optional:!1,description:"",problems:[],source:[]},n)}function Fe(n={}){return Object.assign({start:"",delimiter:"",postDelimiter:"",tag:"",postTag:"",name:"",postName:"",type:"",postType:"",description:"",end:"",lineEnd:""},n)}r(at,"hasDocgen"),r(it,"isValidDocgenSection"),r(pt,"getDocgenSection"),r(ct,"getDocgenDescription"),function(n){n.start="/**",n.nostart="/***",n.delim="*",n.end="*/"}(v=v||(v={})),r(je,"isSpace"),r(lt,"splitCR"),r(A,"splitSpace"),r(ut,"splitLines"),r(mt,"seedSpec"),r(Fe,"seedTokens");var jr=/^@\S+/;function _e({fence:n="```"}={}){let s=Fr(n),a=r(((p,c)=>s(p)?!c:c),"toggleFence");return r((function(c){let u=[[]],m=!1;for(let T of c)jr.test(T.tokens.description)&&!m?u.push([T]):u[u.length-1].push(T),m=a(T.tokens.description,m);return u}),"parseBlock")}function Fr(n){return"string"==typeof n?s=>s.split(n).length%2==0:n}function Ve({startLine:n=0,markers:s=v}={}){let a=null,p=n;return r((function(u){let m=u,T=Fe();if([T.lineEnd,m]=lt(m),[T.start,m]=A(m),null===a&&m.startsWith(s.start)&&!m.startsWith(s.nostart)&&(a=[],T.delimiter=m.slice(0,s.start.length),m=m.slice(s.start.length),[T.postDelimiter,m]=A(m)),null===a)return p++,null;let g=m.trimRight().endsWith(s.end);if(""===T.delimiter&&m.startsWith(s.delim)&&!m.startsWith(s.end)&&(T.delimiter=s.delim,m=m.slice(s.delim.length),[T.postDelimiter,m]=A(m)),g){let P=m.trimRight();T.end=m.slice(P.length-s.end.length),m=P.slice(0,-s.end.length)}if(T.description=m,a.push({number:p,source:u,tokens:T}),p++,g){let P=a.slice();return a=null,P}return null}),"parseSource")}function Le({tokenizers:n}){return r((function(a){var p;let c=mt({source:a});for(let u of n)if(c=u(c),null!==(p=c.problems[c.problems.length-1])&&void 0!==p&&p.critical)break;return c}),"parseSpec")}function ce(){return n=>{let{tokens:s}=n.source[0],a=s.description.match(/\s*(@(\S+))(\s*)/);return null===a?(n.problems.push({code:"spec:tag:prefix",message:'tag should start with "@" symbol',line:n.source[0].number,critical:!0}),n):(s.tag=a[1],s.postTag=a[3],s.description=s.description.slice(a[0].length),n.tag=a[2],n)}}function le(n="compact"){let s=Vr(n);return a=>{let p=0,c=[];for(let[T,{tokens:g}]of a.source.entries()){let P="";if(0===T&&"{"!==g.description[0])return a;for(let b of g.description)if("{"===b&&p++,"}"===b&&p--,P+=b,0===p)break;if(c.push([g,P]),0===p)break}if(0!==p)return a.problems.push({code:"spec:type:unpaired-curlies",message:"unpaired curlies",line:a.source[0].number,critical:!0}),a;let u=[],m=c[0][0].postDelimiter.length;for(let[T,[g,P]]of c.entries())g.type=P,T>0&&(g.type=g.postDelimiter.slice(m)+P,g.postDelimiter=g.postDelimiter.slice(0,m)),[g.postType,g.description]=A(g.description.slice(P.length)),u.push(g.type);return u[0]=u[0].slice(1),u[u.length-1]=u[u.length-1].slice(0,-1),a.type=s(u),a}}r(_e,"getParser"),r(Fr,"getFencer"),r(Ve,"getParser"),r(Le,"getParser"),r(ce,"tagTokenizer"),r(le,"typeTokenizer");var _r=r((n=>n.trim()),"trim");function Vr(n){return"compact"===n?s=>s.map(_r).join(""):"preserve"===n?s=>s.join("\n"):n}r(Vr,"getJoiner");var Lr=r((n=>n&&n.startsWith('"')&&n.endsWith('"')),"isQuoted");function ue(){let n=r(((s,{tokens:a},p)=>""===a.type?s:p),"typeEnd");return s=>{let{tokens:a}=s.source[s.source.reduce(n,0)],p=a.description.trimLeft(),c=p.split('"');if(c.length>1&&""===c[0]&&c.length%2==1)return s.name=c[1],a.name=`"${c[1]}"`,[a.postName,a.description]=A(p.slice(a.name.length)),s;let g,u=0,m="",T=!1;for(let b of p){if(0===u&&je(b))break;"["===b&&u++,"]"===b&&u--,m+=b}if(0!==u)return s.problems.push({code:"spec:name:unpaired-brackets",message:"unpaired brackets",line:s.source[0].number,critical:!0}),s;let P=m;if("["===m[0]&&"]"===m[m.length-1]){T=!0,m=m.slice(1,-1);let b=m.split("=");if(m=b[0].trim(),void 0!==b[1]&&(g=b.slice(1).join("=").trim()),""===m)return s.problems.push({code:"spec:name:empty-name",message:"empty name",line:s.source[0].number,critical:!0}),s;if(""===g)return s.problems.push({code:"spec:name:empty-default",message:"empty default value",line:s.source[0].number,critical:!0}),s;if(!Lr(g)&&/=(?!>)/.test(g))return s.problems.push({code:"spec:name:invalid-default",message:"invalid default value syntax",line:s.source[0].number,critical:!0}),s}return s.optional=T,s.name=m,a.name=P,void 0!==g&&(s.default=g),[a.postName,a.description]=A(p.slice(a.name.length)),s}}function me(n="compact",s=v){let a=Ue(n);return p=>(p.description=a(p.source,s),p)}function Ue(n){return"compact"===n?Ur:"preserve"===n?Mr:n}function Ur(n,s=v){return n.map((({tokens:{description:a}})=>a.trim())).filter((a=>""!==a)).join(" ")}r(ue,"nameTokenizer"),r(me,"descriptionTokenizer"),r(Ue,"getJoiner"),r(Ur,"compactJoiner");var Br=r(((n,{tokens:s},a)=>""===s.type?n:a),"lineNo"),Cr=r((({tokens:n})=>(""===n.delimiter?n.start:n.postDelimiter.slice(1))+n.description),"getDescription");function Mr(n,s=v){if(0===n.length)return"";""===n[0].tokens.description&&n[0].tokens.delimiter===s.start&&(n=n.slice(1));let a=n[n.length-1];return void 0!==a&&""===a.tokens.description&&a.tokens.end.endsWith(s.end)&&(n=n.slice(0,-1)),(n=n.slice(n.reduce(Br,0))).map(Cr).join("\n")}function Be({startLine:n=0,fence:s="```",spacing:a="compact",markers:p=v,tokenizers:c=[n=>{let{tokens:s}=n.source[0],a=s.description.match(/\s*(@(\S+))(\s*)/);return null===a?(n.problems.push({code:"spec:tag:prefix",message:'tag should start with "@" symbol',line:n.source[0].number,critical:!0}),n):(s.tag=a[1],s.postTag=a[3],s.description=s.description.slice(a[0].length),n.tag=a[2],n)},le(a),ue(),me(a)]}={}){if(n<0||n%1>0)throw new Error("Invalid startLine");let u=Ve({startLine:n,markers:p}),m=_e({fence:s}),T=Le({tokenizers:c}),g=Ue(a);return function(P){let b=[];for(let de of ut(P)){let q=u(de);if(null===q)continue;let S=m(q),z=S.slice(1).map(T);b.push({description:g(S[0],p),tags:z,source:q,problems:z.reduce(((Te,ge)=>Te.concat(ge.problems)),[])})}return b}}function Kr(n){return n.start+n.delimiter+n.postDelimiter+n.tag+n.postTag+n.type+n.postType+n.name+n.postName+n.description+n.end+n.lineEnd}function Ce(){return n=>n.source.map((({tokens:s})=>Kr(s))).join("\n")}r(Mr,"preserveJoiner"),r(Be,"getParser"),r(Kr,"join"),r(Ce,"getStringifier");Object.keys({line:0,start:0,delimiter:0,postDelimiter:0,tag:0,postTag:0,name:0,postName:0,type:0,postType:0,description:0,end:0,lineEnd:0});function ft(n,s={}){return Be(s)(n)}r(ft,"parse");Ce();var $=((n,s,a)=>(a=null!=n?dr(xr(n)):{},((n,s,a,p)=>{if(s&&"object"==typeof s||"function"==typeof s)for(let c of gr(s))!hr.call(n,c)&&c!==a&&Ie(n,c,{get:()=>s[c],enumerable:!(p=Tr(s,c))||p.enumerable});return n})(!s&&n&&n.__esModule?a:Ie(a,"default",{value:n,enumerable:!0}),n)))(dt(),1);function qr(n){return null!=n&&n.includes("@")}function Yr(n){let c=ft("/**\n"+(n??"").split("\n").map((u=>` * ${u}`)).join("\n")+"\n*/",{spacing:"preserve"});if(!c||0===c.length)throw new Error("Cannot parse JSDoc tags.");return c[0]}r(qr,"containsJsDoc"),r(Yr,"parse");var Wr={tags:["param","arg","argument","returns","ignore","deprecated"]},Tt=r(((n,s=Wr)=>{if(!qr(n))return{includesJsDoc:!1,ignore:!1};let a=Yr(n),p=Gr(a,s.tags);return p.ignore?{includesJsDoc:!0,ignore:!0}:{includesJsDoc:!0,ignore:!1,description:a.description.trim(),extractedTags:p}}),"parseJsDoc");function Gr(n,s){let a={params:null,deprecated:null,returns:null,ignore:!1};for(let p of n.tags)if(void 0===s||s.includes(p.tag)){if("ignore"===p.tag){a.ignore=!0;break}switch(p.tag){case"param":case"arg":case"argument":{let c=zr(p);null!=c&&(null==a.params&&(a.params=[]),a.params.push(c));break}case"deprecated":{let c=Hr(p);null!=c&&(a.deprecated=c);break}case"returns":{let c=Qr(p);null!=c&&(a.returns=c);break}}}return a}function Xr(n){return n.replace(/[\.-]$/,"")}function zr(n){if(!n.name||"-"===n.name)return null;let s=ht(n.type);return{name:n.name,type:s,description:xt(n.description),getPrettyName:r((()=>Xr(n.name)),"getPrettyName"),getTypeName:r((()=>s?Jt(s):null),"getTypeName")}}function Hr(n){return n.name?gt(n.name,n.description):null}function gt(n,s){return xt(""===n?s:`${n} ${s}`)}function xt(n){let s=n.replace(/^- /g,"").trim();return""===s?null:s}function Qr(n){let s=ht(n.type);return s?{type:s,description:gt(n.name,n.description),getTypeName:r((()=>Jt(s)),"getTypeName")}:null}r(Gr,"extractJsDocTags"),r(Xr,"normaliseParamName"),r(zr,"extractParam"),r(Hr,"extractDeprecated"),r(gt,"joinNameAndDescription"),r(xt,"normaliseDescription"),r(Qr,"extractReturns");var _=(0,$.stringifyRules)(),Zr=_.JsdocTypeObject;function ht(n){try{return(0,$.parse)(n,"typescript")}catch{return null}}function Jt(n){return(0,$.transform)(_,n)}_.JsdocTypeAny=()=>"any",_.JsdocTypeObject=(n,s)=>`(${Zr(n,s)})`,_.JsdocTypeOptional=(n,s)=>s(n.element),_.JsdocTypeNullable=(n,s)=>s(n.element),_.JsdocTypeNotNullable=(n,s)=>s(n.element),_.JsdocTypeUnion=(n,s)=>n.elements.map(s).join("|"),r(ht,"extractType"),r(Jt,"extractTypeName");function Ke(n){return n.length>90}function wt(n){return n.length>50}function w(n,s){return n===s?{summary:n}:{summary:n,detail:s}}r(Ke,"isTooLongForTypeSummary"),r(wt,"isTooLongForDefaultValueSummary"),r(w,"createSummaryValue");function Pt(n,s){if(null!=n){let{value:a}=n;if(!K(a))return wt(a)?w(s?.name,a):w(a)}return null}function bt({name:n,value:s,elements:a,raw:p}){return s??(null!=a?a.map(bt).join(" | "):p??n)}function en({name:n,raw:s,elements:a}){return w(null!=a?a.map(bt).join(" | "):null!=s?s.replace(/^\|\s*/,""):n)}function tn({type:n,raw:s}){return w(null!=s?s:n)}function rn({type:n,raw:s}){return null!=s?Ke(s)?w(n,s):w(s):w(n)}function nn(n){let{type:s}=n;return"object"===s?rn(n):tn(n)}function on({name:n,raw:s}){return null!=s?Ke(s)?w(n,s):w(s):w(n)}function St(n){if(null==n)return null;switch(n.name){case"union":return en(n);case"signature":return nn(n);default:return on(n)}}r(Pt,"createDefaultValue"),r(bt,"generateUnionElement"),r(en,"generateUnion"),r(tn,"generateFuncSignature"),r(rn,"generateObjectSignature"),r(nn,"generateSignature"),r(on,"generateDefault"),r(St,"createType");var Et=r(((n,s)=>{let{flowType:a,description:p,required:c,defaultValue:u}=s;return{name:n,type:St(a),required:c,description:p,defaultValue:Pt(u??null,a??null)}}),"createFlowPropDef");function Nt({defaultValue:n}){if(null!=n){let{value:s}=n;if(!K(s))return w(s)}return null}function Dt({tsType:n,required:s}){if(null==n)return null;let a=n.name;return s||(a=a.replace(" | undefined","")),w(["Array","Record","signature"].includes(n.name)?n.raw:a)}r(Nt,"createDefaultValue"),r(Dt,"createType");var Ot=r(((n,s)=>{let{description:a,required:p}=s;return{name:n,type:Dt(s),required:p,description:a,defaultValue:Nt(s)}}),"createTsPropDef");function sn(n){return null!=n?w(n.name):null}function an(n){let{computed:s,func:a}=n;return typeof s>"u"&&typeof a>"u"}function pn(n){return!!n&&("string"===n.name||"enum"===n.name&&(Array.isArray(n.value)&&n.value.every((({value:s})=>"string"==typeof s&&'"'===s[0]&&'"'===s[s.length-1]))))}function cn(n,s){if(null!=n){let{value:a}=n;if(!K(a))return an(n)&&pn(s)?w(JSON.stringify(a)):w(a)}return null}function vt(n,s,a){let{description:p,required:c,defaultValue:u}=a;return{name:n,type:sn(s),required:c,description:p,defaultValue:cn(u,s)}}function ye(n,s){if(s?.includesJsDoc){let{description:a,extractedTags:p}=s;null!=a&&(n.description=s.description);let c={...p,params:p?.params?.map((u=>({name:u.getPrettyName(),description:u.description})))};Object.values(c).filter(Boolean).length>0&&(n.jsDocTags=c)}return n}r(sn,"createType"),r(an,"isReactDocgenTypescript"),r(pn,"isStringValued"),r(cn,"createDefaultValue"),r(vt,"createBasicPropDef"),r(ye,"applyJsDocResult");var ln=r(((n,s,a)=>{let p=vt(n,s.type,s);return p.sbType=pe(s),ye(p,a)}),"javaScriptFactory"),un=r(((n,s,a)=>{let p=Ot(n,s);return p.sbType=pe(s),ye(p,a)}),"tsFactory"),mn=r(((n,s,a)=>{let p=Et(n,s);return p.sbType=pe(s),ye(p,a)}),"flowFactory"),fn=r(((n,s,a)=>ye(vt(n,{name:"unknown"},s),a)),"unknownFactory"),$e=r((n=>{switch(n){case"JavaScript":return ln;case"TypeScript":return un;case"Flow":return mn;default:return fn}}),"getPropDefFactory"),kt=r((n=>null!=n.type?"JavaScript":null!=n.flowType?"Flow":null!=n.tsType?"TypeScript":"Unknown"),"getTypeSystem"),yn=r((n=>{let s=kt(n[0]),a=$e(s);return n.map((p=>{let c=p;return p.type?.elements&&(c={...p,type:{...p.type,value:p.type.elements}}),At(c.name,c,s,a)}))}),"extractComponentSectionArray"),dn=r((n=>{let s=Object.keys(n),a=kt(n[s[0]]),p=$e(a);return s.map((c=>{let u=n[c];return null!=u?At(c,u,a,p):null})).filter(Boolean)}),"extractComponentSectionObject"),aa=r(((n,s)=>{let a=pt(n,s);return it(a)?Array.isArray(a)?yn(a):dn(a):[]}),"extractComponentProps");function At(n,s,a,p){let c=Tt(s.description);return c.includesJsDoc&&c.ignore?null:{propDef:p(n,s,c),jsDocTags:c.extractedTags,docgenInfo:s,typeSystem:a}}function ia(n){return null!=n?ct(n):""}r(At,"extractProp"),r(ia,"extractComponentDescription");var qe=r(((...n)=>{let s={},a=n.filter(Boolean),p=a.reduce(((c,u)=>(Object.entries(u).forEach((([m,T])=>{let g=c[m];Array.isArray(T)||typeof g>"u"?c[m]=T:X(T)&&X(g)?s[m]=!0:typeof T<"u"&&(c[m]=T)})),c)),{});return Object.keys(s).forEach((c=>{let u=a.filter(Boolean).map((m=>m[c])).filter((m=>typeof m<"u"));u.every((m=>X(m)))?p[c]=qe(...u):p[c]=u[u.length-1]})),p}),"combineParameters"),ya=r((n=>{let{component:s,argTypes:a,parameters:{docs:p={}}}=n,{extractArgTypes:c}=p;if(!c||!s)return a;let u=c(s);return u?qe(u,a):a}),"enhanceArgTypes"),It="storybook/docs",ha=`${It}/snippet-rendered`,Tn=(p=>(p.AUTO="auto",p.CODE="code",p.DYNAMIC="dynamic",p))(Tn||{})},"./node_modules/storybook/dist/manager-api/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{MC:()=>manager_api_Vn});var react=__webpack_require__("./node_modules/react/index.js"),react_namespaceObject=__webpack_require__.t(react,2),external_STORYBOOK_MODULE_CORE_EVENTS_=__webpack_require__("storybook/internal/core-events"),external_STORYBOOK_MODULE_CLIENT_LOGGER_=__webpack_require__("storybook/internal/client-logger"),external_STORYBOOK_MODULE_TYPES_=__webpack_require__("storybook/internal/types"),external_STORYBOOK_MODULE_GLOBAL_=__webpack_require__("@storybook/global"),external_STORYBOOK_MODULE_CHANNELS_=__webpack_require__("storybook/internal/channels"),csf=__webpack_require__("./node_modules/storybook/dist/csf/index.js"),se=Object.defineProperty,n=(r,e)=>se(r,"name",{value:e,configurable:!0});function l(){return l=Object.assign?Object.assign.bind():function(r){for(var e=1;e1?i-1:0),u=1;u=0&&i<1?(f=o,p=u):i>=1&&i<2?(f=u,p=o):i>=2&&i<3?(p=o,g=u):i>=3&&i<4?(p=u,g=o):i>=4&&i<5?(f=u,g=o):i>=5&&i<6&&(f=o,g=u);var b=t-o/2;return a(f+b,p+b,g+b)}n($,"colorToInt"),n(ce,"convertToInt"),n(T,"hslToRgb");var Z={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};function me(r){if("string"!=typeof r)return r;var e=r.toLowerCase();return Z[e]?"#"+Z[e]:r}n(me,"nameToHex");var ge=/^#[a-fA-F0-9]{6}$/,he=/^#[a-fA-F0-9]{8}$/,be=/^#[a-fA-F0-9]{3}$/,ve=/^#[a-fA-F0-9]{4}$/,B=/^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i,ye=/^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i,we=/^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,xe=/^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;function F(r){if("string"!=typeof r)throw new d(3);var e=me(r);if(e.match(ge))return{red:parseInt(""+e[1]+e[2],16),green:parseInt(""+e[3]+e[4],16),blue:parseInt(""+e[5]+e[6],16)};if(e.match(he)){var t=parseFloat((parseInt(""+e[7]+e[8],16)/255).toFixed(2));return{red:parseInt(""+e[1]+e[2],16),green:parseInt(""+e[3]+e[4],16),blue:parseInt(""+e[5]+e[6],16),alpha:t}}if(e.match(be))return{red:parseInt(""+e[1]+e[1],16),green:parseInt(""+e[2]+e[2],16),blue:parseInt(""+e[3]+e[3],16)};if(e.match(ve)){var a=parseFloat((parseInt(""+e[4]+e[4],16)/255).toFixed(2));return{red:parseInt(""+e[1]+e[1],16),green:parseInt(""+e[2]+e[2],16),blue:parseInt(""+e[3]+e[3],16),alpha:a}}var i=B.exec(e);if(i)return{red:parseInt(""+i[1],10),green:parseInt(""+i[2],10),blue:parseInt(""+i[3],10)};var o=ye.exec(e.substring(0,50));if(o)return{red:parseInt(""+o[1],10),green:parseInt(""+o[2],10),blue:parseInt(""+o[3],10),alpha:parseFloat(""+o[4])>1?parseFloat(""+o[4])/100:parseFloat(""+o[4])};var u=we.exec(e);if(u){var b="rgb("+T(parseInt(""+u[1],10),parseInt(""+u[2],10)/100,parseInt(""+u[3],10)/100)+")",h=B.exec(b);if(!h)throw new d(4,e,b);return{red:parseInt(""+h[1],10),green:parseInt(""+h[2],10),blue:parseInt(""+h[3],10)}}var c=xe.exec(e.substring(0,50));if(c){var U="rgb("+T(parseInt(""+c[1],10),parseInt(""+c[2],10)/100,parseInt(""+c[3],10)/100)+")",I=B.exec(U);if(!I)throw new d(4,e,U);return{red:parseInt(""+I[1],10),green:parseInt(""+I[2],10),blue:parseInt(""+I[3],10),alpha:parseFloat(""+c[4])>1?parseFloat(""+c[4])/100:parseFloat(""+c[4])}}throw new d(5)}function Se(r){var e=r.red/255,t=r.green/255,a=r.blue/255,i=Math.max(e,t,a),o=Math.min(e,t,a),u=(i+o)/2;if(i===o)return void 0!==r.alpha?{hue:0,saturation:0,lightness:u,alpha:r.alpha}:{hue:0,saturation:0,lightness:u};var f,p=i-o,g=u>.5?p/(2-i-o):p/(i+o);switch(i){case e:f=(t-a)/p+(t=1?O(r,e,t):"rgba("+T(r,e,t)+","+a+")";if("object"==typeof r&&void 0===e&&void 0===t&&void 0===a)return r.alpha>=1?O(r.hue,r.saturation,r.lightness):"rgba("+T(r.hue,r.saturation,r.lightness)+","+r.alpha+")";throw new d(2)}function E(r,e,t){if("number"==typeof r&&"number"==typeof e&&"number"==typeof t)return P("#"+x(r)+x(e)+x(t));if("object"==typeof r&&void 0===e&&void 0===t)return P("#"+x(r.red)+x(r.green)+x(r.blue));throw new d(6)}function S(r,e,t,a){if("string"==typeof r&&"number"==typeof e){var i=F(r);return"rgba("+i.red+","+i.green+","+i.blue+","+e+")"}if("number"==typeof r&&"number"==typeof e&&"number"==typeof t&&"number"==typeof a)return a>=1?E(r,e,t):"rgba("+r+","+e+","+t+","+a+")";if("object"==typeof r&&void 0===e&&void 0===t&&void 0===a)return r.alpha>=1?E(r.red,r.green,r.blue):"rgba("+r.red+","+r.green+","+r.blue+","+r.alpha+")";throw new d(7)}n(x,"numberToHex"),n(M,"colorToHex"),n(Ce,"convertToHex"),n(O,"hslToHex"),n(ze,"hsl"),n(Ae,"hsla"),n(E,"rgb"),n(S,"rgba");var Te=n((function(e){return"number"==typeof e.red&&"number"==typeof e.green&&"number"==typeof e.blue&&("number"!=typeof e.alpha||typeof e.alpha>"u")}),"isRgb"),Ie=n((function(e){return"number"==typeof e.red&&"number"==typeof e.green&&"number"==typeof e.blue&&"number"==typeof e.alpha}),"isRgba"),Re=n((function(e){return"number"==typeof e.hue&&"number"==typeof e.saturation&&"number"==typeof e.lightness&&("number"!=typeof e.alpha||typeof e.alpha>"u")}),"isHsl"),je=n((function(e){return"number"==typeof e.hue&&"number"==typeof e.saturation&&"number"==typeof e.lightness&&"number"==typeof e.alpha}),"isHsla");function w(r){if("object"!=typeof r)throw new d(8);if(Ie(r))return S(r);if(Te(r))return E(r);if(je(r))return Ae(r);if(Re(r))return ze(r);throw new d(8)}function K(r,e,t){return n((function(){var i=t.concat(Array.prototype.slice.call(arguments));return i.length>=e?r.apply(this,i):K(r,e,i)}),"fn")}function m(r){return K(r,r.length,[])}function Oe(r,e){if("transparent"===e)return e;var t=y(e);return w(l({},t,{hue:t.hue+parseFloat(r)}))}n(w,"toColorString"),n(K,"curried"),n(m,"curry"),n(Oe,"adjustHue");m(Oe);function C(r,e,t){return Math.max(r,Math.min(e,t))}function ke(r,e){if("transparent"===e)return e;var t=y(e);return w(l({},t,{lightness:C(0,1,t.lightness-parseFloat(r))}))}n(C,"guard"),n(ke,"darken");var _=m(ke);function Be(r,e){if("transparent"===e)return e;var t=y(e);return w(l({},t,{saturation:C(0,1,t.saturation-parseFloat(r))}))}n(Be,"desaturate");m(Be);function Me(r,e){if("transparent"===e)return e;var t=y(e);return w(l({},t,{lightness:C(0,1,t.lightness+parseFloat(r))}))}n(Me,"lighten");var ee=m(Me);function Ee(r,e,t){if("transparent"===e)return t;if("transparent"===t)return e;if(0===r)return t;var a=F(e),i=l({},a,{alpha:"number"==typeof a.alpha?a.alpha:1}),o=F(t),u=l({},o,{alpha:"number"==typeof o.alpha?o.alpha:1}),f=i.alpha-u.alpha,p=2*parseFloat(r)-1,h=((p*f===-1?p:p+f)/(1+p*f)+1)/2,c=1-h;return S({red:Math.floor(i.red*h+u.red*c),green:Math.floor(i.green*h+u.green*c),blue:Math.floor(i.blue*h+u.blue*c),alpha:i.alpha*parseFloat(r)+u.alpha*(1-parseFloat(r))})}n(Ee,"mix");var re=m(Ee);function Le(r,e){if("transparent"===e)return e;var t=F(e);return S(l({},t,{alpha:C(0,1,(100*("number"==typeof t.alpha?t.alpha:1)+100*parseFloat(r))/100)}))}n(Le,"opacify");m(Le);function De(r,e){if("transparent"===e)return e;var t=y(e);return w(l({},t,{saturation:C(0,1,t.saturation+parseFloat(r))}))}n(De,"saturate");m(De);function We(r,e){return"transparent"===e?e:w(l({},y(e),{hue:parseFloat(r)}))}n(We,"setHue");m(We);function qe(r,e){return"transparent"===e?e:w(l({},y(e),{lightness:parseFloat(r)}))}n(qe,"setLightness");m(qe);function Ue(r,e){return"transparent"===e?e:w(l({},y(e),{saturation:parseFloat(r)}))}n(Ue,"setSaturation");m(Ue);function Ve(r,e){return"transparent"===e?e:re(parseFloat(r),"rgb(0, 0, 0)",e)}n(Ve,"shade");m(Ve);function Ne(r,e){return"transparent"===e?e:re(parseFloat(r),"rgb(255, 255, 255)",e)}n(Ne,"tint");m(Ne);function Ge(r,e){if("transparent"===e)return e;var t=F(e);return S(l({},t,{alpha:C(0,1,+(100*("number"==typeof t.alpha?t.alpha:1)-100*parseFloat(r)).toFixed(2)/100)}))}n(Ge,"transparentize");var s_secondary="#029CFD",s_lightest="#FFFFFF",s_mediumlight="#ECF4F9",s_medium="#D9E8F2",s_mediumdark="#73828C",s_dark="#5C6870",s_darkest="#2E3438",s_border="hsla(203, 50%, 30%, 0.15)",H_app="#F6F9FC",z=(m(Ge)(.9,s_secondary),{fonts:{base:['"Nunito Sans"',"-apple-system",'".SFNSText-Regular"','"San Francisco"',"BlinkMacSystemFont",'"Segoe UI"','"Helvetica Neue"',"Helvetica","Arial","sans-serif"].join(", "),mono:["ui-monospace","Menlo","Monaco",'"Roboto Mono"','"Oxygen Mono"','"Ubuntu Monospace"','"Source Code Pro"','"Droid Sans Mono"','"Courier New"',"monospace"].join(", ")},weight:{regular:400,bold:700},size:{s1:12,s2:14,s3:16,m1:20,m2:24,m3:28,l1:32,l2:40,l3:48,code:90}}),ne={base:"dark",colorPrimary:"#FF4785",colorSecondary:"#029CFD",appBg:"#222425",appContentBg:"#1B1C1D",appPreviewBg:s_lightest,appBorderColor:"rgba(255,255,255,.1)",appBorderRadius:4,fontBase:z.fonts.base,fontCode:z.fonts.mono,textColor:"#C9CDCF",textInverseColor:"#222425",textMutedColor:"#798186",barTextColor:s_mediumdark,barHoverColor:s_secondary,barSelectedColor:s_secondary,barBg:"#292C2E",buttonBg:"#222425",buttonBorder:"rgba(255,255,255,.1)",booleanBg:"#222425",booleanSelectedBg:"#2E3438",inputBg:"#1B1C1D",inputBorder:"rgba(255,255,255,.1)",inputTextColor:s_lightest,inputBorderRadius:4},L={base:"light",colorPrimary:"#FF4785",colorSecondary:"#029CFD",appBg:H_app,appContentBg:s_lightest,appPreviewBg:s_lightest,appBorderColor:s_border,appBorderRadius:4,fontBase:z.fonts.base,fontCode:z.fonts.mono,textColor:s_darkest,textInverseColor:s_lightest,textMutedColor:s_dark,barTextColor:s_mediumdark,barHoverColor:s_secondary,barSelectedColor:s_secondary,barBg:s_lightest,buttonBg:H_app,buttonBorder:s_medium,booleanBg:s_mediumlight,booleanSelectedBg:s_lightest,inputBg:s_lightest,inputBorder:s_border,inputTextColor:s_darkest,inputBorderRadius:4},{window:D}=external_STORYBOOK_MODULE_GLOBAL_.global,Ke=n((r=>"string"==typeof r||(external_STORYBOOK_MODULE_CLIENT_LOGGER_.logger.warn(`Color passed to theme object should be a string. Instead ${r}(${typeof r}) was passed.`),!1)),"isColorString"),_e=n((r=>!/(gradient|var|calc)/.test(r)),"isValidColorForPolished"),er=n(((r,e)=>"darken"===r?S(`${_(1,e)}`,.95):"lighten"===r?S(`${ee(1,e)}`,.95):e),"applyPolished"),ae=n((r=>e=>{if(!Ke(e)||!_e(e))return e;try{return er(r,e)}catch{return e}}),"colorFactory"),W=(ae("lighten"),ae("darken"),{light:L,dark:ne,normal:L}),q=n((()=>D&&D.matchMedia&&D.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),"getPreferredColorScheme")(),pt=n(((r={base:q},e)=>{let t={...W[q],...W[r.base]||{},...r,base:W[r.base]?r.base:q};return{...e,...t,barSelectedColor:r.barSelectedColor||t.colorSecondary}}),"create"),Sr=Object.create,router_Ae=Object.defineProperty,router_Dr=Object.getOwnPropertyDescriptor,router_Nr=Object.getOwnPropertyNames,Or=Object.getPrototypeOf,router_Pr=Object.prototype.hasOwnProperty,a=(e,t)=>router_Ae(e,"name",{value:t,configurable:!0}),router_re=(()=>__webpack_require__("./node_modules/storybook/dist/router sync recursive"))(),router_T=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),lt=(e,t,r)=>(r=null!=e?Sr(Or(e)):{},((e,t,r,o)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let n of router_Nr(t))!router_Pr.call(e,n)&&n!==r&&router_Ae(e,n,{get:()=>t[n],enumerable:!(o=router_Dr(t,n))||o.enumerable});return e})(!t&&e&&e.__esModule?r:router_Ae(r,"default",{value:e,enumerable:!0}),e)),Tt=router_T(((Mt,Me)=>{!function(e){if("object"==typeof Mt&&typeof Me<"u")Me.exports=e();else if("function"==typeof define&&__webpack_require__.amdO)define([],e);else{(typeof window<"u"?window:typeof __webpack_require__.g<"u"?__webpack_require__.g:typeof self<"u"?self:this).memoizerific=e()}}((function(){return a((function o(n,i,s){function l(f,h){if(!i[f]){if(!n[f]){var m="function"==typeof router_re&&router_re;if(!h&&m)return m(f,!0);if(u)return u(f,!0);var x=new Error("Cannot find module '"+f+"'");throw x.code="MODULE_NOT_FOUND",x}var y=i[f]={exports:{}};n[f][0].call(y.exports,(function(d){return l(n[f][1][d]||d)}),y,y.exports,o,n,i,s)}return i[f].exports}a(l,"s");for(var u="function"==typeof router_re&&router_re,c=0;c=0?(this.lastItem=this.list[u],this.list[u].val):void 0},s.prototype.set=function(l,u){var c;return this.lastItem&&this.isEqual(this.lastItem.key,l)?(this.lastItem.val=u,this):(c=this.indexOf(l))>=0?(this.lastItem=this.list[c],this.list[c].val=u,this):(this.lastItem={key:l,val:u},this.list.push(this.lastItem),this.size++,this)},s.prototype.delete=function(l){var u;if(this.lastItem&&this.isEqual(this.lastItem.key,l)&&(this.lastItem=void 0),(u=this.indexOf(l))>=0)return this.size--,this.list.splice(u,1)[0]},s.prototype.has=function(l){var u;return!(!this.lastItem||!this.isEqual(this.lastItem.key,l))||(u=this.indexOf(l))>=0&&(this.lastItem=this.list[u],!0)},s.prototype.forEach=function(l,u){var c;for(c=0;c=0&&(!(x=(m=f[y]).cacheItem.get(m.arg))||!x.size);y--)m.cacheItem.delete(m.arg)}function c(f,h){return f===h||f!=f&&h!=h}n.exports=function(f){var h=new s(!1),m=[];return function(x){var y=a((function(){var p,v,S,d=h,g=arguments.length-1,R=Array(g+1),w=!0;if((y.numArgs||0===y.numArgs)&&y.numArgs!==g+1)throw new Error("Memoizerific functions should always be called with the same number of arguments");for(S=0;S0&&(R[g]={cacheItem:d,arg:arguments[g]},w?l(m,R):m.push(R),m.length>f&&u(m.shift())),y.wasMemoized=w,y.numArgs=g+1,v}),"memoizerific");return y.limit=f,y.wasMemoized=!1,y.cache=h,y.lru=m,y}},a(l,"moveToMostRecentLru"),a(u,"removeCachedResult"),a(c,"isEqual")},{"map-or-similar":1}]},{},[3])(3)}))})),router_Ie=router_T((Te=>{Object.defineProperty(Te,"__esModule",{value:!0}),Te.encodeString=Ar;var C=Array.from({length:256},((e,t)=>"%"+((t<16?"0":"")+t.toString(16)).toUpperCase())),_r=new Int8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,1,1,0,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,0]);function Ar(e){let t=e.length;if(0===t)return"";let r="",o=0,n=0;e:for(;n>6]+C[128|63&i];else if(i<55296||i>=57344)o=n+1,r+=C[224|i>>12]+C[128|i>>6&63]+C[128|63&i];else{if(++n,n>=t)throw new Error("URI malformed");o=n+1,i=65536+((1023&i)<<10|1023&e.charCodeAt(n)),r+=C[240|i>>18]+C[128|i>>12&63]+C[128|i>>6&63]+C[128|63&i]}}return 0===o?e:o{Object.defineProperty(_,"__esModule",{value:!0}),_.defaultOptions=_.defaultShouldSerializeObject=_.defaultValueSerializer=void 0;var Be=router_Ie(),Lr=a((e=>{switch(typeof e){case"string":return(0,Be.encodeString)(e);case"bigint":case"boolean":return""+e;case"number":if(Number.isFinite(e))return e<1e21?""+e:(0,Be.encodeString)(""+e)}return e instanceof Date?(0,Be.encodeString)(e.toISOString()):""}),"defaultValueSerializer");_.defaultValueSerializer=Lr;var Fr=a((e=>e instanceof Date),"defaultShouldSerializeObject");_.defaultShouldSerializeObject=Fr;var It=a((e=>e),"identityFunc");_.defaultOptions={nesting:!0,nestingSyntax:"dot",arrayRepeat:!1,arrayRepeatSyntax:"repeat",delimiter:38,valueDeserializer:It,valueSerializer:_.defaultValueSerializer,keyDeserializer:It,shouldSerializeObject:_.defaultShouldSerializeObject}})),router_ze=router_T((ye=>{Object.defineProperty(ye,"__esModule",{value:!0}),ye.getDeepObject=Mr,ye.stringifyObject=Bt;var k=router_ge(),jr=router_Ie();function Ur(e){return"__proto__"===e||"constructor"===e||"prototype"===e}function Mr(e,t,r,o,n){if(Ur(t))return e;let i=e[t];return"object"==typeof i&&null!==i?i:!o&&(n||"number"==typeof r||"string"==typeof r&&0*r==0&&-1===r.indexOf("."))?e[t]=[]:e[t]={}}a(Ur,"isPrototypeKey"),a(Mr,"getDeepObject");var Tr=20,Ir="[]",Br="[",zr="]",kr=".";function Bt(e,t,r=0,o,n){let{nestingSyntax:i=k.defaultOptions.nestingSyntax,arrayRepeat:s=k.defaultOptions.arrayRepeat,arrayRepeatSyntax:l=k.defaultOptions.arrayRepeatSyntax,nesting:u=k.defaultOptions.nesting,delimiter:c=k.defaultOptions.delimiter,valueSerializer:f=k.defaultOptions.valueSerializer,shouldSerializeObject:h=k.defaultOptions.shouldSerializeObject}=t,m="number"==typeof c?String.fromCharCode(c):c,x=!0===n&&s,y="dot"===i||"js"===i&&!n;if(r>Tr)return"";let d="",p=!0,v=!1;for(let g in e){let w,R=e[g];o?(w=o,x?"bracket"===l&&(w+=Ir):y?(w+=kr,w+=g):(w+=Br,w+=g,w+=zr)):w=g,p||(d+=m),"object"!=typeof R||null===R||h(R)?(d+=(0,jr.encodeString)(w),d+="=",d+=f(R,g)):(v=void 0!==R.pop,(u||s&&v)&&(d+=Bt(R,t,r+1,w,v))),p&&(p=!1)}return d}a(Bt,"stringifyObject")})),Wt=router_T(((zo,Vt)=>{var ke=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,7,7,7,7,7,7,7,7,7,7,7,7,8,7,7,10,9,9,9,11,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,24,36,48,60,72,84,96,0,12,12,12,0,0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,0,0,24,24,24,0,0,0,0,0,0,0,0,0,24,24,0,0,0,0,0,0,0,0,0,0,48,48,48,0,0,0,0,0,0,0,0,0,0,48,48,0,0,0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,0,0,0,127,63,63,63,0,31,15,15,15,7,7,7];function Wr(e){var t=e.indexOf("%");if(-1===t)return e;for(var r=e.length,o="",n=0,i=0,s=t,l=12;t>-1&&t>10),56320+(1023&i)),i=0,n=t+3,t=s=e.indexOf("%",n)}return o+e.slice(n)}a(Wr,"decodeURIComponent");var Hr={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};function kt(e,t){var r=Hr[e];return void 0===r?255:r<{var Kr=M&&M.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(M,"__esModule",{value:!0}),M.numberValueDeserializer=M.numberKeyDeserializer=void 0,M.parse=Jr;var ve=router_ze(),V=router_ge(),Ht=Kr(Wt()),qr=a((e=>{let t=Number(e);return Number.isNaN(t)?e:t}),"numberKeyDeserializer");M.numberKeyDeserializer=qr;var $r=a((e=>{let t=Number(e);return Number.isNaN(t)?e:t}),"numberValueDeserializer");M.numberValueDeserializer=$r;var Kt=/\+/g,qt=a((function(){}),"Empty");function Re(e,t,r,o,n){let i=e.substring(t,r);return o&&(i=i.replace(Kt," ")),n&&(i=(0,Ht.default)(i)||i),i}function Jr(e,t){let{valueDeserializer:r=V.defaultOptions.valueDeserializer,keyDeserializer:o=V.defaultOptions.keyDeserializer,arrayRepeatSyntax:n=V.defaultOptions.arrayRepeatSyntax,nesting:i=V.defaultOptions.nesting,arrayRepeat:s=V.defaultOptions.arrayRepeat,nestingSyntax:l=V.defaultOptions.nestingSyntax,delimiter:u=V.defaultOptions.delimiter}=t??{},c="string"==typeof u?u.charCodeAt(0):u,f="js"===l,h=new qt;if("string"!=typeof e)return h;let g,m=e.length,x="",y=-1,d=-1,p=-1,v=h,R="",w="",S=!1,q=!1,F=!1,_e=!1,X=!1,G=!1,he=!1,j=0,Z=-1,ee=-1,st=-1;for(let D=0;Dy,he||(d=D),p!==d-1&&(w=Re(e,p+1,Z>-1?Z:d,F,S),R=o(w),void 0!==g&&(v=(0,ve.getDeepObject)(v,g,R,f&&X,f&&G))),he||""!==R){he&&(x=e.slice(d+1,D),_e&&(x=x.replace(Kt," ")),q&&(x=(0,Ht.default)(x)||x));let te=r(x,R);if(s){let pe=v[R];void 0===pe?v[R]=Z>-1?[te]:te:pe.pop?pe.push(te):v[R]=[pe,te]}else v[R]=te}x="",y=D,d=D,S=!1,q=!1,F=!1,_e=!1,X=!1,G=!1,Z=-1,p=D,v=h,g=void 0,R=""}else 93===j?(s&&"bracket"===n&&91===st&&(Z=ee),i&&("index"===l||f)&&d<=y&&(p!==ee&&(w=Re(e,p+1,D,F,S),R=o(w),void 0!==g&&(v=(0,ve.getDeepObject)(v,g,R,void 0,f)),g=R,F=!1,S=!1),p=D,G=!0,X=!1)):46===j?i&&("dot"===l||f)&&d<=y&&(p!==ee&&(w=Re(e,p+1,D,F,S),R=o(w),void 0!==g&&(v=(0,ve.getDeepObject)(v,g,R,f)),g=R,F=!1,S=!1),X=!0,G=!1,p=D):91===j?i&&("index"===l||f)&&d<=y&&(p!==ee&&(w=Re(e,p+1,D,F,S),R=o(w),f&&void 0!==g&&(v=(0,ve.getDeepObject)(v,g,R,f)),g=R,F=!1,S=!1,X=!1,G=!0),p=D):61===j?d<=y?d=D:q=!0:43===j?d>y?_e=!0:F=!0:37===j&&(d>y?q=!0:S=!0);ee=D,st=j}return h}qt.prototype=Object.create(null),a(Re,"computeKeySlice"),a(Jr,"parse")})),Jt=router_T((Ve=>{Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.stringify=Qr;var Yr=router_ze();function Qr(e,t){if(null===e||"object"!=typeof e)return"";let r=t??{};return(0,Yr.stringifyObject)(e,r)}a(Qr,"stringify")})),Yt=router_T((P=>{var Xr=P&&P.__createBinding||(Object.create?function(e,t,r,o){void 0===o&&(o=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:a((function(){return t[r]}),"get")}),Object.defineProperty(e,o,n)}:function(e,t,r,o){void 0===o&&(o=r),e[o]=t[r]}),Gr=P&&P.__exportStar||function(e,t){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(t,r)&&Xr(t,e,r)};Object.defineProperty(P,"__esModule",{value:!0}),P.stringify=P.parse=void 0;var Zr=$t();Object.defineProperty(P,"parse",{enumerable:!0,get:a((function(){return Zr.parse}),"get")});var en=Jt();Object.defineProperty(P,"stringify",{enumerable:!0,get:a((function(){return en.stringify}),"get")}),Gr(router_ge(),P)}));function ut(){}function router_Le(e){return Object.getOwnPropertySymbols(e).filter((t=>Object.prototype.propertyIsEnumerable.call(e,t)))}function router_Fe(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}a(ut,"noop"),a(router_Le,"getSymbols"),a(router_Fe,"getTag");function U(e){if(!e||"object"!=typeof e)return!1;let t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&"[object Object]"===Object.prototype.toString.call(e)}function jt(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function Ut(e,t,r){return router_ne(e,t,void 0,void 0,void 0,void 0,r)}function router_ne(e,t,r,o,n,i,s){let l=s(e,t,r,o,n,i);if(void 0!==l)return l;if(typeof e==typeof t)switch(typeof e){case"bigint":case"string":case"boolean":case"symbol":case"undefined":case"function":return e===t;case"number":return e===t||Object.is(e,t);case"object":return oe(e,t,i,s)}return oe(e,t,i,s)}function oe(e,t,r,o){if(Object.is(e,t))return!0;let n=router_Fe(e),i=router_Fe(t);if("[object Arguments]"===n&&(n="[object Object]"),"[object Arguments]"===i&&(i="[object Object]"),n!==i)return!1;switch(n){case"[object String]":return e.toString()===t.toString();case"[object Number]":return jt(e.valueOf(),t.valueOf());case"[object Boolean]":case"[object Date]":case"[object Symbol]":return Object.is(e.valueOf(),t.valueOf());case"[object RegExp]":return e.source===t.source&&e.flags===t.flags;case"[object Function]":return e===t}let s=(r=r??new Map).get(e),l=r.get(t);if(null!=s&&null!=l)return s===t;r.set(e,t),r.set(t,e);try{switch(n){case"[object Map]":if(e.size!==t.size)return!1;for(let[u,c]of e.entries())if(!t.has(u)||!router_ne(c,t.get(u),u,e,t,r,o))return!1;return!0;case"[object Set]":{if(e.size!==t.size)return!1;let u=Array.from(e.values()),c=Array.from(t.values());for(let f=0;frouter_ne(h,x,void 0,e,t,r,o)));if(-1===m)return!1;c.splice(m,1)}return!0}case"[object Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":case"[object BigUint64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object BigInt64Array]":case"[object Float32Array]":case"[object Float64Array]":if(typeof Buffer<"u"&&Buffer.isBuffer(e)!==Buffer.isBuffer(t)||e.length!==t.length)return!1;for(let u=0;u{let t={viewMode:void 0,storyId:void 0,refId:void 0};if(e){let[,r,o,n]=e.toLowerCase().match(rn)||[];r&&Object.assign(t,{viewMode:r,storyId:n,refId:o})}return t})),router_xe=Symbol("Deeply equal"),router_We=a(((e,t)=>{if(typeof e!=typeof t)return t;if(router_Ue(e,t))return router_xe;if(Array.isArray(e)&&Array.isArray(t)){let r=t.reduce(((o,n,i)=>{let s=router_We(e[i],n);return s!==router_xe&&(o[i]=s),o}),new Array(t.length));return t.length>=e.length?r:r.concat(new Array(e.length-t.length).fill(void 0))}return U(e)&&U(t)?Object.keys({...e,...t}).reduce(((r,o)=>{let n=router_We(e?.[o],t?.[o]);return n===router_xe?r:Object.assign(r,{[o]:n})}),{}):t}),"deepDiff"),Xt=/^[a-zA-Z0-9 _-]*$/,nn=/^-?[0-9]+(\.[0-9]+)?$/,Zt=/^#([a-f0-9]{3,4}|[a-f0-9]{6}|[a-f0-9]{8})$/i,router_er=/^(rgba?|hsla?)\(([0-9]{1,3}),\s?([0-9]{1,3})%?,\s?([0-9]{1,3})%?,?\s?([0-9](\.[0-9]{1,2})?)?\)$/i,router_He=a(((e="",t)=>!(null===e||""===e||!Xt.test(e))&&(null==t||t instanceof Date||"number"==typeof t||"boolean"==typeof t||("string"==typeof t?Xt.test(t)||nn.test(t)||Zt.test(t)||router_er.test(t):Array.isArray(t)?t.every((r=>router_He(e,r))):!!U(t)&&Object.entries(t).every((([r,o])=>router_He(r,o)))))),"validateArgs"),router_Ke=a((e=>void 0===e?"!undefined":null===e?"!null":"string"==typeof e?Zt.test(e)?`!hex(${e.slice(1)})`:router_er.test(e)?`!${e.replace(/[\s%]/g,"")}`:e:"boolean"==typeof e?`!${e}`:e instanceof Date?`!date(${e.toISOString()})`:Array.isArray(e)?e.map(router_Ke):U(e)?Object.entries(e).reduce(((t,[r,o])=>Object.assign(t,{[r]:router_Ke(o)})),{}):e),"encodeSpecialValues"),on=a((e=>{switch(e){case"%20":return"+";case"%5B":return"[";case"%5D":return"]";case"%2C":return",";case"%3A":return":"}return e}),"decodeKnownQueryChar"),an=/%[0-9A-F]{2}/g,Zo=a(((e,t)=>{let r=router_We(e,t);if(!r||r===router_xe)return"";let o=Object.entries(r).reduce(((n,[i,s])=>router_He(i,s)?Object.assign(n,{[i]:s}):(external_STORYBOOK_MODULE_CLIENT_LOGGER_.once.warn(Qt` + Omitted potentially unsafe URL args. + + More info: https://storybook.js.org/docs/writing-stories/args?ref=error#setting-args-through-the-url + `),n)),{});return(0,router_ae.stringify)(router_Ke(o),{delimiter:";",nesting:!0,nestingSyntax:"js"}).replace(an,on).split(";").map((n=>n.replace("=",":"))).join(";")}),"buildArgsParam"),sn=(0,router_be.default)(1e3)((e=>void 0!==e?(0,router_ae.parse)(e):{})),tr=a((e=>sn(e.search?e.search.slice(1):"")),"queryFromLocation"),rr=(0,router_be.default)(1e3)(((e,t,r=!0)=>{if(r){if("string"!=typeof t)throw new Error("startsWith only works with string targets");return e&&e.startsWith(t)?{path:e}:null}let o="string"==typeof t&&e===t,n=e&&t&&e.match(t);return o||n?{path:e}:null}));function router_ie(){return router_ie=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function router_W(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function ln(){return Math.random().toString(36).substr(2,8)}function or(e,t){return{usr:e.state,key:e.key,idx:t}}function router_$e(e,t,r,o){return void 0===r&&(r=null),router_ie({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?router_H(t):t,{state:r,key:t&&t.key||o||ln()})}function I(e){let{pathname:t="/",search:r="",hash:o=""}=e;return r&&"?"!==r&&(t+="?"===r.charAt(0)?r:"?"+r),o&&"#"!==o&&(t+="#"===o.charAt(0)?o:"#"+o),t}function router_H(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let o=e.indexOf("?");o>=0&&(t.search=e.substr(o),e=e.substr(0,o)),e&&(t.pathname=e)}return t}function un(e,t,r,o){void 0===o&&(o={});let{window:n=document.defaultView,v5Compat:i=!1}=o,s=n.history,l=A.Pop,u=null,c=f();function f(){return(s.state||{idx:null}).idx}function h(){l=A.Pop;let p=f(),v=null==p?null:p-c;c=p,u&&u({action:l,location:d.location,delta:v})}function m(p,v){l=A.Push;let g=router_$e(d.location,p,v);r&&r(g,p),c=f()+1;let R=or(g,c),w=d.createHref(g);try{s.pushState(R,"",w)}catch(S){if(S instanceof DOMException&&"DataCloneError"===S.name)throw S;n.location.assign(w)}i&&u&&u({action:l,location:d.location,delta:1})}function x(p,v){l=A.Replace;let g=router_$e(d.location,p,v);r&&r(g,p),c=f();let R=or(g,c),w=d.createHref(g);s.replaceState(R,"",w),i&&u&&u({action:l,location:d.location,delta:0})}function y(p){let v="null"!==n.location.origin?n.location.origin:n.location.href,g="string"==typeof p?p:I(p);return router_N(v,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,v)}null==c&&(c=0,s.replaceState(router_ie({},s.state,{idx:c}),"")),a(f,"getIndex"),a(h,"handlePop"),a(m,"push"),a(x,"replace"),a(y,"createURL");let d={get action(){return l},get location(){return e(n,s)},listen(p){if(u)throw new Error("A history only accepts one active listener");return n.addEventListener(nr,h),u=p,()=>{n.removeEventListener(nr,h),u=null}},createHref:p=>t(n,p),createURL:y,encodeLocation(p){let v=y(p);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:m,replace:x,go:p=>s.go(p)};return d}function router_K(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,o=e.charAt(r);return o&&"/"!==o?null:e.slice(r)||"/"}function router_Je(e,t){void 0===t&&(t="/");let{pathname:r,search:o="",hash:n=""}="string"==typeof e?router_H(e):e;return{pathname:r?r.startsWith("/")?r:cn(r,t):t,search:fn(o),hash:dn(n)}}function cn(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((n=>{".."===n?r.length>1&&r.pop():"."!==n&&r.push(n)})),r.length>1?r.join("/"):"/"}function router_qe(e,t,r,o){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(o)+"]. Please separate it out to the `to."+r+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function router_Ye(e){return e.filter(((t,r)=>0===r||t.route.path&&t.route.path.length>0))}function router_Qe(e,t,r,o){let n;void 0===o&&(o=!1),"string"==typeof e?n=router_H(e):(n=router_ie({},e),router_N(!n.pathname||!n.pathname.includes("?"),router_qe("?","pathname","search",n)),router_N(!n.pathname||!n.pathname.includes("#"),router_qe("#","pathname","hash",n)),router_N(!n.search||!n.search.includes("#"),router_qe("#","search","hash",n)));let l,i=""===e||""===n.pathname,s=i?"/":n.pathname;if(o||null==s)l=r;else{let h=t.length-1;if(s.startsWith("..")){let m=s.split("/");for(;".."===m[0];)m.shift(),h-=1;n.pathname=m.join("/")}l=h>=0?t[h]:"/"}let u=router_Je(n,l),c=s&&"/"!==s&&s.endsWith("/"),f=(i||"."===s)&&r.endsWith("/");return!u.pathname.endsWith("/")&&(c||f)&&(u.pathname+="/"),u}a(ir,"createBrowserHistory"),a(router_N,"invariant"),a(router_W,"warning"),a(ln,"createKey"),a(or,"getHistoryState"),a(router_$e,"createLocation"),a(I,"createPath"),a(router_H,"parsePath"),a(un,"getUrlBasedHistory"),function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(ar||(ar={})),a(router_K,"stripBasename"),a(router_Je,"resolvePath"),a(cn,"resolvePathname"),a(router_qe,"getInvalidPathError"),a(router_Ye,"getPathContributingMatches"),a(router_Qe,"resolveTo");var router_se=a((e=>e.join("/").replace(/\/\/+/g,"/")),"joinPaths"),fn=a((e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:""),"normalizeSearch"),dn=a((e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:""),"normalizeHash"),sr=["post","put","patch","delete"],hn=(new Set(sr),["get",...sr]);new Set(hn),Symbol("deferred");function Xe(){return Xe=Object.assign?Object.assign.bind():function(e){for(var t=1;t component.");let{basename:o,navigator:n}=react.useContext(router_O),{hash:i,pathname:s,search:l}=router_Y(e,{relative:r}),u=s;return"/"!==o&&(u="/"===s?o:router_se([o,s])),n.createHref({pathname:u,search:l,hash:i})}function ue(){return null!=react.useContext(router_le)}function router_L(){return ue()||router_N(!1,"useLocation() may be used only in the context of a component."),react.useContext(router_le).location}router_B.displayName="Route",react.createContext(null).displayName="RouteError",a(router_Ge,"useHref"),a(ue,"useInRouterContext"),a(router_L,"useLocation");var dr="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function hr(e){react.useContext(router_O).static||react.useLayoutEffect(e)}function router_ce(){let{isDataRoute:e}=react.useContext(router_B);return e?Dn():En()}function En(){ue()||router_N(!1,"useNavigate() may be used only in the context of a component.");let e=react.useContext(router_$),{basename:t,navigator:r}=react.useContext(router_O),{matches:o}=react.useContext(router_B),{pathname:n}=router_L(),i=JSON.stringify(router_Ye(o).map((u=>u.pathnameBase))),s=react.useRef(!1);return hr((()=>{s.current=!0})),react.useCallback((function(u,c){if(void 0===c&&(c={}),router_W(s.current,dr),!s.current)return;if("number"==typeof u)return void r.go(u);let f=router_Qe(u,JSON.parse(i),n,"path"===c.relative);null==e&&"/"!==t&&(f.pathname="/"===f.pathname?t:router_se([t,f.pathname])),(c.replace?r.replace:r.push)(f,c.state,c)}),[t,r,i,n,e])}function router_Y(e,t){let{relative:r}=void 0===t?{}:t,{matches:o}=react.useContext(router_B),{pathname:n}=router_L(),i=JSON.stringify(router_Ye(o).map((s=>s.pathnameBase)));return react.useMemo((()=>router_Qe(e,JSON.parse(i),n,"path"===r)),[e,i,n,r])}a(hr,"useIsomorphicLayoutEffect"),a(router_ce,"useNavigate"),a(En,"useNavigateUnstable"),a(router_Y,"useResolvedPath");var pr=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(pr||{}),router_fe=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(router_fe||{});function Ze(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function wn(e){let t=react.useContext(router_$);return t||router_N(!1,Ze(e)),t}function mr(e){let t=react.useContext(router_J);return t||router_N(!1,Ze(e)),t}function Sn(e){let t=react.useContext(router_B);return t||router_N(!1,Ze(e)),t}function gr(e){let t=Sn(e),r=t.matches[t.matches.length-1];return r.route.id||router_N(!1,e+' can only be used on routes that contain a unique "id"'),r.route.id}function et(){return gr(router_fe.UseRouteId)}function tt(){return mr(router_fe.UseNavigation).navigation}function rt(){let{matches:e,loaderData:t}=mr(router_fe.UseMatches);return react.useMemo((()=>e.map((r=>{let{pathname:o,params:n}=r;return{id:r.route.id,pathname:o,params:n,data:t[r.route.id],handle:r.route.handle}}))),[e,t])}function Dn(){let{router:e}=wn(pr.UseNavigateStable),t=gr(router_fe.UseNavigateStable),r=react.useRef(!1);return hr((()=>{r.current=!0})),react.useCallback((function(n,i){void 0===i&&(i={}),router_W(r.current,dr),r.current&&("number"==typeof n?e.navigate(n):e.navigate(n,Xe({fromRouteId:t},i)))}),[e,t])}a(Ze,"getDataRouterConsoleError"),a(wn,"useDataRouterContext"),a(mr,"useDataRouterState"),a(Sn,"useRouteContext"),a(gr,"useCurrentRouteId"),a(et,"useRouteId"),a(tt,"useNavigation"),a(rt,"useMatches"),a(Dn,"useNavigateStable");react_namespaceObject.startTransition;function router_Q(e){let{basename:t="/",children:r=null,location:o,navigationType:n=A.Pop,navigator:i,static:s=!1}=e;ue()&&router_N(!1,"You cannot render a inside another . You should never have more than one in your app.");let l=t.replace(/^\/*/,"/"),u=react.useMemo((()=>({basename:l,navigator:i,static:s})),[l,i,s]);"string"==typeof o&&(o=router_H(o));let{pathname:c="/",search:f="",hash:h="",state:m=null,key:x="default"}=o,y=react.useMemo((()=>{let d=router_K(c,l);return null==d?null:{location:{pathname:d,search:f,hash:h,state:m,key:x},navigationType:n}}),[l,c,f,h,m,x,n]);return router_W(null!=y,' is not able to match the URL "'+c+f+h+"\" because it does not start with the basename, so the won't render anything."),null==y?null:react.createElement(router_O.Provider,{value:u},react.createElement(router_le.Provider,{children:r,value:y}))}a(router_Q,"Router");new Promise((()=>{}));function router_z(){return router_z=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[n]=e[n]);return r}a(router_z,"_extends"),a(router_at,"_objectWithoutPropertiesLoose");var router_Se="get",router_De="application/x-www-form-urlencoded";function router_Pe(e){return null!=e&&"string"==typeof e.tagName}function Cn(e){return router_Pe(e)&&"button"===e.tagName.toLowerCase()}function _n(e){return router_Pe(e)&&"form"===e.tagName.toLowerCase()}function An(e){return router_Pe(e)&&"input"===e.tagName.toLowerCase()}function Ln(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Fn(e,t){return!(0!==e.button||t&&"_self"!==t||Ln(e))}a(router_Pe,"isHtmlElement"),a(Cn,"isButtonElement"),a(_n,"isFormElement"),a(An,"isInputElement"),a(Ln,"isModifiedEvent"),a(Fn,"shouldProcessLinkClick");var router_Ee=null;function jn(){if(null===router_Ee)try{new FormData(document.createElement("form"),0),router_Ee=!1}catch{router_Ee=!0}return router_Ee}a(jn,"isFormDataSubmitterSupported");var Un=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function router_nt(e){return null==e||Un.has(e)?e:(router_W(!1,'"'+e+'" is not a valid `encType` for `
`/`` and will default to "'+router_De+'"'),null)}function Mn(e,t){let r,o,n,i,s;if(_n(e)){let l=e.getAttribute("action");o=l?router_K(l,t):null,r=e.getAttribute("method")||router_Se,n=router_nt(e.getAttribute("enctype"))||router_De,i=new FormData(e)}else if(Cn(e)||An(e)&&("submit"===e.type||"image"===e.type)){let l=e.form;if(null==l)throw new Error('Cannot submit a