any>(getValue: F): F {\n if (!_weakMap) {\n // Without a `WeakMap` implementation, memoization is not possible.\n return getValue;\n }\n\n const cache = new _weakMap();\n\n function memoizedGetValue(input: any): any {\n if (!input || (typeof input !== 'function' && typeof input !== 'object')) {\n // A WeakMap can only be used to test against reference values, i.e. 'function' and 'object'.\n // All other inputs cannot be memoized against in this manner.\n return getValue(input);\n }\n\n if (cache.has(input)) {\n return cache.get(input)!;\n }\n\n const value = getValue(input);\n\n cache.set(input, value);\n\n return value;\n }\n\n return memoizedGetValue as F;\n}\n\nfunction _normalizeArg(val: null | undefined): { empty: boolean } | any;\nfunction _normalizeArg(val: object): any;\nfunction _normalizeArg(val: any): any {\n if (!val) {\n return _emptyObject;\n } else if (typeof val === 'object' || typeof val === 'function') {\n return val;\n } else if (!_dictionary[val]) {\n _dictionary[val] = { val };\n }\n\n return _dictionary[val];\n}\n\nfunction _createNode(): IMemoizeNode {\n return {\n map: _weakMap ? new _weakMap() : null,\n };\n}\n","/**\n * Verifies if an application can use DOM.\n */\nexport function canUseDOM(): boolean {\n return (\n typeof window !== 'undefined' &&\n !!(\n window.document &&\n // eslint-disable-next-line deprecation/deprecation\n window.document.createElement\n )\n );\n}\n","import { canUseDOM } from './canUseDOM';\n\n/**\n * Helper to get the document object. Note that in popup window cases, document\n * might be the wrong document, which is why we look at ownerDocument for the\n * truth.\n *\n * @public\n */\nexport function getDocument(rootElement?: HTMLElement | null): Document | undefined {\n if (!canUseDOM() || typeof document === 'undefined') {\n return undefined;\n } else {\n const el = rootElement as Element;\n\n return el && el.ownerDocument ? el.ownerDocument : document;\n }\n}\n","import { canUseDOM } from './canUseDOM';\n\nlet _window: Window | undefined = undefined;\n\n// Note: Accessing \"window\" in IE11 is somewhat expensive, and calling \"typeof window\"\n// hits a memory leak, whereas aliasing it and calling \"typeof _window\" does not.\n// Caching the window value at the file scope lets us minimize the impact.\ntry {\n _window = window;\n} catch (e) {\n /* no-op */\n}\n\n/**\n * Helper to get the window object. The helper will make sure to use a cached variable\n * of \"window\", to avoid overhead and memory leaks in IE11. Note that in popup scenarios the\n * window object won't match the \"global\" window object, and for these scenarios, you should\n * pass in an element hosted within the popup.\n *\n * @public\n */\nexport function getWindow(rootElement?: Element | null): Window | undefined {\n if (!canUseDOM() || typeof _window === 'undefined') {\n return undefined;\n } else {\n const el = rootElement as Element;\n\n return el && el.ownerDocument && el.ownerDocument.defaultView ? el.ownerDocument.defaultView : _window;\n }\n}\n","import { getWindow } from './dom/getWindow';\n\n/**\n * Fetches an item from session storage without throwing an exception\n * @param key The key of the item to fetch from session storage\n */\nexport function getItem(key: string): string | null {\n let result = null;\n try {\n const win = getWindow();\n result = win ? win.sessionStorage.getItem(key) : null;\n } catch (e) {\n /* Eat the exception */\n }\n return result;\n}\n\n/**\n * Inserts an item into session storage without throwing an exception\n * @param key The key of the item to add to session storage\n * @param data The data to put into session storage\n */\nexport function setItem(key: string, data: string): void {\n try {\n getWindow()?.sessionStorage.setItem(key, data);\n } catch (e) {\n /* Eat the exception */\n }\n}\n","import { KeyCodes } from './KeyCodes';\nimport { getDocument } from './dom/getDocument';\nimport { getItem, setItem } from './sessionStorage';\nimport { setRTL as mergeStylesSetRTL } from '@fluentui/merge-styles';\n\nconst RTL_LOCAL_STORAGE_KEY = 'isRTL';\n\n// Default to undefined so that we initialize on first read.\nlet _isRTL: boolean | undefined;\n\n/**\n * Gets the rtl state of the page (returns true if in rtl.)\n */\nexport function getRTL(theme: { rtl?: boolean } = {}): boolean {\n if (theme.rtl !== undefined) {\n return theme.rtl;\n }\n if (_isRTL === undefined) {\n // Fabric supports persisting the RTL setting between page refreshes via session storage\n let savedRTL = getItem(RTL_LOCAL_STORAGE_KEY);\n if (savedRTL !== null) {\n _isRTL = savedRTL === '1';\n setRTL(_isRTL);\n }\n\n let doc = getDocument();\n if (_isRTL === undefined && doc) {\n _isRTL = ((doc.body && doc.body.getAttribute('dir')) || doc.documentElement.getAttribute('dir')) === 'rtl';\n mergeStylesSetRTL(_isRTL);\n }\n }\n\n return !!_isRTL;\n}\n\n/**\n * Sets the rtl state of the page (by adjusting the dir attribute of the html element.)\n */\nexport function setRTL(isRTL: boolean, persistSetting: boolean = false): void {\n let doc = getDocument();\n if (doc) {\n doc.documentElement.setAttribute('dir', isRTL ? 'rtl' : 'ltr');\n }\n\n if (persistSetting) {\n setItem(RTL_LOCAL_STORAGE_KEY, isRTL ? '1' : '0');\n }\n\n _isRTL = isRTL;\n mergeStylesSetRTL(_isRTL);\n}\n\n/**\n * Returns the given key, but flips right/left arrows if necessary.\n */\nexport function getRTLSafeKeyCode(key: number, theme: { rtl?: boolean } = {}): number {\n if (getRTL(theme)) {\n if (key === KeyCodes.left) {\n key = KeyCodes.right;\n } else if (key === KeyCodes.right) {\n key = KeyCodes.left;\n }\n }\n\n return key;\n}\n","import { __assign } from 'tslib';\nexport const assign = __assign;\n","import * as React from 'react';\nimport { mergeCss } from '@fluentui/merge-styles';\nimport { IStyle, ITheme } from '@fluentui/style-utilities';\nimport { getRTL, memoizeFunction } from '@fluentui/utilities';\nimport { assign } from './utilities';\nimport { IFactoryOptions } from './IComponent';\nimport {\n ISlottableReactType,\n ISlot,\n ISlots,\n ISlotDefinition,\n ISlotFactory,\n ISlotProp,\n ISlottableProps,\n ISlotOptions,\n IDefaultSlotProps,\n IProcessedSlotProps,\n ValidProps,\n ValidShorthand,\n} from './ISlots';\n\n/**\n * This function is required for any module that uses slots.\n *\n * This function is a slot resolver that automatically evaluates slot functions to generate React elements.\n * A byproduct of this resolver is that it removes slots from the React hierarchy by bypassing React.createElement.\n *\n * To use this function on a per-file basis, use the jsx directive targeting withSlots.\n * This directive must be the FIRST LINE in the file to work correctly.\n * Usage of this pragma also requires withSlots import statement.\n *\n * See React.createElement\n */\n// Can't use typeof on React.createElement since it's overloaded. Approximate createElement's signature for now\n// and widen as needed.\nexport function withSlots(\n type: ISlot
| React.FunctionComponent
| string,\n props?: (React.Attributes & P) | null,\n ...children: React.ReactNode[]\n): ReturnType> {\n const slotType = type as ISlot;\n if (slotType.isSlot) {\n // Since we are bypassing createElement, use React.Children.toArray to make sure children are\n // properly assigned keys.\n // TODO: should this be mutating? does React mutate children subprop with createElement?\n // TODO: will toArray clobber existing keys?\n // TODO: React generates warnings because it doesn't detect hidden member _store that is set in createElement.\n // Even children passed to createElement without keys don't generate this warning.\n // Is there a better way to prevent slots from appearing in hierarchy? toArray doesn't address root issue.\n children = React.Children.toArray(children);\n\n // TODO: There is something weird going on here with children embedded in props vs. rest args.\n // Comment out these lines to see. Make sure this function is doing the right things.\n if (children.length === 0) {\n return slotType(props);\n }\n\n return slotType({ ...(props as any), children });\n } else {\n // TODO: Are there some cases where children should NOT be spread? Also, spreading reraises perf question.\n // Children had to be spread to avoid breaking KeytipData in Toggle.view:\n // react-dom.development.js:18931 Uncaught TypeError: children is not a function\n // Without spread, function child is a child array of one element\n // TODO: is there a reason this can't be:\n // return React.createElement.apply(this, arguments);\n return React.createElement(type, props, ...children);\n }\n}\n\n/**\n * This function creates factories that render ouput depending on the user ISlotProp props passed in.\n * @param DefaultComponent - Base component to render when not overridden by user props.\n * @param options - Factory options, including defaultProp value for shorthand prop mapping.\n * @returns ISlotFactory function used for rendering slots.\n */\nexport function createFactory(\n DefaultComponent: React.ComponentType,\n options: IFactoryOptions = {},\n): ISlotFactory {\n const { defaultProp = 'children' } = options;\n\n const result: ISlotFactory = (\n componentProps,\n userProps,\n userSlotOptions,\n defaultStyles,\n theme,\n ) => {\n // If they passed in raw JSX, just return that.\n if (React.isValidElement(userProps)) {\n return userProps;\n }\n\n const flattenedUserProps: TProps | undefined = _translateShorthand(defaultProp as string, userProps);\n const finalProps = _constructFinalProps(defaultStyles, theme, componentProps, flattenedUserProps);\n\n if (userSlotOptions) {\n if (userSlotOptions.component) {\n // TODO: Remove cast if possible. This cast is needed because TS errors on the intrinsic portion of ReactType.\n // return ;\n const UserComponent = userSlotOptions.component as React.ComponentType;\n return ;\n }\n\n if (userSlotOptions.render) {\n return userSlotOptions.render(finalProps, DefaultComponent);\n }\n }\n\n return ;\n };\n\n return result;\n}\n\n/**\n * Default factory for components without explicit factories.\n */\nconst defaultFactory = memoizeFunction(type => createFactory(type));\n\n/**\n * This function generates slots that can be used in JSX given a definition of slots and their corresponding types.\n * @param userProps - Props as pass to component.\n * @param slots - Slot definition object defining the default slot component for each slot.\n * @returns A set of created slots that components can render in JSX.\n */\nexport function getSlots, TComponentSlots>(\n userProps: TComponentProps,\n slots: ISlotDefinition>,\n): ISlots> {\n const result: ISlots> = {} as ISlots>;\n\n // userProps already has default props mixed in by createComponent. Recast here to gain typing for this function.\n const mixedProps = userProps as TComponentProps & IDefaultSlotProps;\n\n for (const name in slots) {\n if (slots.hasOwnProperty(name)) {\n // This closure method requires the use of withSlots to prevent unnecessary rerenders. This is because React\n // detects each closure as a different component (since it is a new instance) from the previous one and then\n // forces a rerender of the entire slot subtree. For now, the only way to avoid this is to use withSlots, which\n // bypasses the call to React.createElement.\n const slot: ISlots>[keyof TComponentSlots] = (componentProps, ...args: any[]) => {\n if (args.length > 0) {\n // If React.createElement is being incorrectly used with slots, there will be additional arguments.\n // We can detect these additional arguments and error on their presence.\n throw new Error('Any module using getSlots must use withSlots. Please see withSlots javadoc for more info.');\n }\n // TODO: having TS infer types here seems to cause infinite loop.\n // use explicit types or casting to preserve typing if possible.\n // TODO: this should be a lookup on TProps property instead of being TProps directly, which is probably\n // causing the infinite loop\n return _renderSlot(\n slots[name],\n // TODO: this cast to any is hiding a relationship issue between the first two args\n componentProps as any,\n mixedProps[name],\n mixedProps.slots && mixedProps.slots[name],\n // _defaultStyles should always be present, but a check for existence is added to make view tests\n // easier to use.\n mixedProps._defaultStyles && mixedProps._defaultStyles[name],\n (mixedProps as any).theme,\n );\n };\n slot.isSlot = true;\n result[name] = slot;\n }\n }\n\n return result;\n}\n\n/**\n * Helper function that translates shorthand as needed.\n * @param defaultProp\n * @param slotProps\n */\nfunction _translateShorthand(\n defaultProp: string,\n slotProps: ISlotProp,\n): TProps | undefined {\n let transformedProps: TProps | undefined;\n\n if (typeof slotProps === 'string' || typeof slotProps === 'number' || typeof slotProps === 'boolean') {\n transformedProps = {\n [defaultProp]: slotProps as any,\n } as TProps;\n } else {\n transformedProps = slotProps as TProps;\n }\n\n return transformedProps;\n}\n\n/**\n * Helper function that constructs final styles and props given a series of props ordered by increasing priority.\n */\nfunction _constructFinalProps(\n defaultStyles: IStyle,\n theme?: ITheme,\n ...allProps: (TProps | undefined)[]\n): TProps {\n const finalProps: TProps = {} as any;\n const classNames: (string | undefined)[] = [];\n\n for (const props of allProps) {\n classNames.push(props && props.className);\n assign(finalProps, props);\n }\n\n finalProps.className = mergeCss([defaultStyles, classNames], { rtl: getRTL(theme) });\n\n return finalProps;\n}\n\n/**\n * Render a slot given component and user props. Uses component factory if available, otherwise falls back\n * to default factory.\n * @param ComponentType Factory component type.\n * @param componentProps The properties passed into slot from within the component.\n * @param userProps The user properties passed in from outside of the component.\n */\nfunction _renderSlot<\n TSlotComponent extends ISlottableReactType,\n TSlotProps extends ValidProps,\n TSlotShorthand extends ValidShorthand,\n>(\n ComponentType: TSlotComponent,\n componentProps: TSlotProps,\n userProps: ISlotProp,\n slotOptions: ISlotOptions | undefined,\n defaultStyles: IStyle,\n theme?: ITheme,\n): ReturnType {\n if (ComponentType.create !== undefined) {\n return ComponentType.create(componentProps, userProps, slotOptions, defaultStyles);\n } else {\n // TODO: need to resolve typing / generic issues passing through memoizeFunction. for now, cast to 'unknown'\n return (defaultFactory(ComponentType) as unknown as ISlotFactory)(\n componentProps,\n userProps,\n slotOptions,\n defaultStyles,\n theme,\n );\n }\n}\n","import { IKeyframes } from './IKeyframes';\nimport { getStyleOptions } from './StyleOptionsState';\nimport { Stylesheet } from './Stylesheet';\nimport { serializeRuleEntries } from './styleToClassName';\n\n/**\n * Registers keyframe definitions.\n *\n * @public\n */\nexport function keyframes(timeline: IKeyframes): string {\n const stylesheet = Stylesheet.getInstance();\n const rulesArray: string[] = [];\n\n for (const prop in timeline) {\n if (timeline.hasOwnProperty(prop)) {\n rulesArray.push(prop, '{', serializeRuleEntries(getStyleOptions(), timeline[prop]), '}');\n }\n }\n const rules = rulesArray.join('');\n\n const className = stylesheet.classNameFromKey(rules);\n\n if (className) {\n return className;\n }\n\n const name = stylesheet.getClassName();\n stylesheet.insertRule(`@keyframes ${name}{${rules}}`, true);\n stylesheet.cacheClassName(name, rules, [], ['keyframes', rules]);\n\n return name;\n}\n","import { keyframes } from '@fluentui/merge-styles';\nimport type { IAnimationStyles, IAnimationVariables } from '../types/IAnimationStyles';\nimport type { IRawStyle } from '@fluentui/merge-styles';\n\n/* Register the keyframes */\n\nconst EASING_FUNCTION_1 = 'cubic-bezier(.1,.9,.2,1)';\nconst EASING_FUNCTION_2 = 'cubic-bezier(.1,.25,.75,.9)';\nconst DURATION_1 = '0.167s';\nconst DURATION_2 = '0.267s';\nconst DURATION_3 = '0.367s';\nconst DURATION_4 = '0.467s';\n\nconst FADE_IN: string = keyframes({\n from: { opacity: 0 },\n to: { opacity: 1 },\n});\n\nconst FADE_OUT: string = keyframes({\n from: { opacity: 1 },\n to: { opacity: 0, visibility: 'hidden' },\n});\n\nconst SLIDE_RIGHT_IN10: string = _createSlideInX(-10);\nconst SLIDE_RIGHT_IN20: string = _createSlideInX(-20);\nconst SLIDE_RIGHT_IN40: string = _createSlideInX(-40);\nconst SLIDE_RIGHT_IN400: string = _createSlideInX(-400);\nconst SLIDE_LEFT_IN10: string = _createSlideInX(10);\nconst SLIDE_LEFT_IN20: string = _createSlideInX(20);\nconst SLIDE_LEFT_IN40: string = _createSlideInX(40);\nconst SLIDE_LEFT_IN400: string = _createSlideInX(400);\nconst SLIDE_UP_IN10: string = _createSlideInY(10);\nconst SLIDE_UP_IN20: string = _createSlideInY(20);\nconst SLIDE_DOWN_IN10: string = _createSlideInY(-10);\nconst SLIDE_DOWN_IN20: string = _createSlideInY(-20);\n\nconst SLIDE_RIGHT_OUT10: string = _createSlideOutX(10);\nconst SLIDE_RIGHT_OUT20: string = _createSlideOutX(20);\nconst SLIDE_RIGHT_OUT40: string = _createSlideOutX(40);\nconst SLIDE_RIGHT_OUT400: string = _createSlideOutX(400);\nconst SLIDE_LEFT_OUT10: string = _createSlideOutX(-10);\nconst SLIDE_LEFT_OUT20: string = _createSlideOutX(-20);\nconst SLIDE_LEFT_OUT40: string = _createSlideOutX(-40);\nconst SLIDE_LEFT_OUT400: string = _createSlideOutX(-400);\nconst SLIDE_UP_OUT10: string = _createSlideOutY(-10);\nconst SLIDE_UP_OUT20: string = _createSlideOutY(-20);\nconst SLIDE_DOWN_OUT10: string = _createSlideOutY(10);\nconst SLIDE_DOWN_OUT20: string = _createSlideOutY(20);\n\nconst SCALE_UP100: string = keyframes({\n from: { transform: 'scale3d(.98,.98,1)' },\n to: { transform: 'scale3d(1,1,1)' },\n});\n\nconst SCALE_DOWN98: string = keyframes({\n from: { transform: 'scale3d(1,1,1)' },\n to: { transform: 'scale3d(.98,.98,1)' },\n});\n\nconst SCALE_DOWN100: string = keyframes({\n from: { transform: 'scale3d(1.03,1.03,1)' },\n to: { transform: 'scale3d(1,1,1)' },\n});\n\nconst SCALE_UP103: string = keyframes({\n from: { transform: 'scale3d(1,1,1)' },\n to: { transform: 'scale3d(1.03,1.03,1)' },\n});\n\nconst ROTATE90: string = keyframes({\n from: { transform: 'rotateZ(0deg)' },\n to: { transform: 'rotateZ(90deg)' },\n});\n\nconst ROTATE_N90: string = keyframes({\n from: { transform: 'rotateZ(0deg)' },\n to: { transform: 'rotateZ(-90deg)' },\n});\n\n/**\n * Exporting raw duraction values and easing functions to be used in custom animations\n */\nexport const AnimationVariables: IAnimationVariables = {\n easeFunction1: EASING_FUNCTION_1,\n easeFunction2: EASING_FUNCTION_2,\n durationValue1: DURATION_1,\n durationValue2: DURATION_2,\n durationValue3: DURATION_3,\n durationValue4: DURATION_4,\n};\n\n/**\n * All Fabric standard animations, exposed as json objects referencing predefined\n * keyframes. These objects can be mixed in with other class definitions.\n */\nexport const AnimationStyles: IAnimationStyles = {\n slideRightIn10: _createAnimation(`${FADE_IN},${SLIDE_RIGHT_IN10}`, DURATION_3, EASING_FUNCTION_1),\n slideRightIn20: _createAnimation(`${FADE_IN},${SLIDE_RIGHT_IN20}`, DURATION_3, EASING_FUNCTION_1),\n slideRightIn40: _createAnimation(`${FADE_IN},${SLIDE_RIGHT_IN40}`, DURATION_3, EASING_FUNCTION_1),\n slideRightIn400: _createAnimation(`${FADE_IN},${SLIDE_RIGHT_IN400}`, DURATION_3, EASING_FUNCTION_1),\n slideLeftIn10: _createAnimation(`${FADE_IN},${SLIDE_LEFT_IN10}`, DURATION_3, EASING_FUNCTION_1),\n slideLeftIn20: _createAnimation(`${FADE_IN},${SLIDE_LEFT_IN20}`, DURATION_3, EASING_FUNCTION_1),\n slideLeftIn40: _createAnimation(`${FADE_IN},${SLIDE_LEFT_IN40}`, DURATION_3, EASING_FUNCTION_1),\n slideLeftIn400: _createAnimation(`${FADE_IN},${SLIDE_LEFT_IN400}`, DURATION_3, EASING_FUNCTION_1),\n slideUpIn10: _createAnimation(`${FADE_IN},${SLIDE_UP_IN10}`, DURATION_3, EASING_FUNCTION_1),\n slideUpIn20: _createAnimation(`${FADE_IN},${SLIDE_UP_IN20}`, DURATION_3, EASING_FUNCTION_1),\n slideDownIn10: _createAnimation(`${FADE_IN},${SLIDE_DOWN_IN10}`, DURATION_3, EASING_FUNCTION_1),\n slideDownIn20: _createAnimation(`${FADE_IN},${SLIDE_DOWN_IN20}`, DURATION_3, EASING_FUNCTION_1),\n\n slideRightOut10: _createAnimation(`${FADE_OUT},${SLIDE_RIGHT_OUT10}`, DURATION_3, EASING_FUNCTION_1),\n slideRightOut20: _createAnimation(`${FADE_OUT},${SLIDE_RIGHT_OUT20}`, DURATION_3, EASING_FUNCTION_1),\n slideRightOut40: _createAnimation(`${FADE_OUT},${SLIDE_RIGHT_OUT40}`, DURATION_3, EASING_FUNCTION_1),\n slideRightOut400: _createAnimation(`${FADE_OUT},${SLIDE_RIGHT_OUT400}`, DURATION_3, EASING_FUNCTION_1),\n slideLeftOut10: _createAnimation(`${FADE_OUT},${SLIDE_LEFT_OUT10}`, DURATION_3, EASING_FUNCTION_1),\n slideLeftOut20: _createAnimation(`${FADE_OUT},${SLIDE_LEFT_OUT20}`, DURATION_3, EASING_FUNCTION_1),\n slideLeftOut40: _createAnimation(`${FADE_OUT},${SLIDE_LEFT_OUT40}`, DURATION_3, EASING_FUNCTION_1),\n slideLeftOut400: _createAnimation(`${FADE_OUT},${SLIDE_LEFT_OUT400}`, DURATION_3, EASING_FUNCTION_1),\n slideUpOut10: _createAnimation(`${FADE_OUT},${SLIDE_UP_OUT10}`, DURATION_3, EASING_FUNCTION_1),\n slideUpOut20: _createAnimation(`${FADE_OUT},${SLIDE_UP_OUT20}`, DURATION_3, EASING_FUNCTION_1),\n slideDownOut10: _createAnimation(`${FADE_OUT},${SLIDE_DOWN_OUT10}`, DURATION_3, EASING_FUNCTION_1),\n slideDownOut20: _createAnimation(`${FADE_OUT},${SLIDE_DOWN_OUT20}`, DURATION_3, EASING_FUNCTION_1),\n\n scaleUpIn100: _createAnimation(`${FADE_IN},${SCALE_UP100}`, DURATION_3, EASING_FUNCTION_1),\n scaleDownIn100: _createAnimation(`${FADE_IN},${SCALE_DOWN100}`, DURATION_3, EASING_FUNCTION_1),\n scaleUpOut103: _createAnimation(`${FADE_OUT},${SCALE_UP103}`, DURATION_1, EASING_FUNCTION_2),\n scaleDownOut98: _createAnimation(`${FADE_OUT},${SCALE_DOWN98}`, DURATION_1, EASING_FUNCTION_2),\n\n fadeIn100: _createAnimation(FADE_IN, DURATION_1, EASING_FUNCTION_2),\n fadeIn200: _createAnimation(FADE_IN, DURATION_2, EASING_FUNCTION_2),\n fadeIn400: _createAnimation(FADE_IN, DURATION_3, EASING_FUNCTION_2),\n fadeIn500: _createAnimation(FADE_IN, DURATION_4, EASING_FUNCTION_2),\n\n fadeOut100: _createAnimation(FADE_OUT, DURATION_1, EASING_FUNCTION_2),\n fadeOut200: _createAnimation(FADE_OUT, DURATION_2, EASING_FUNCTION_2),\n fadeOut400: _createAnimation(FADE_OUT, DURATION_3, EASING_FUNCTION_2),\n fadeOut500: _createAnimation(FADE_OUT, DURATION_4, EASING_FUNCTION_2),\n\n rotate90deg: _createAnimation(ROTATE90, '0.1s', EASING_FUNCTION_2),\n rotateN90deg: _createAnimation(ROTATE_N90, '0.1s', EASING_FUNCTION_2),\n\n // expandCollapse 100/200/400, delay 100/200\n};\n\nfunction _createAnimation(\n animationName: string,\n animationDuration: string,\n animationTimingFunction: string,\n): IRawStyle {\n return {\n animationName,\n animationDuration,\n animationTimingFunction,\n animationFillMode: 'both',\n };\n}\n\nfunction _createSlideInX(fromX: number): string {\n return keyframes({\n from: { transform: `translate3d(${fromX}px,0,0)`, pointerEvents: 'none' },\n to: { transform: `translate3d(0,0,0)`, pointerEvents: 'auto' },\n });\n}\n\nfunction _createSlideInY(fromY: number): string {\n return keyframes({\n from: { transform: `translate3d(0,${fromY}px,0)`, pointerEvents: 'none' },\n to: { transform: `translate3d(0,0,0)`, pointerEvents: 'auto' },\n });\n}\n\nfunction _createSlideOutX(toX: number): string {\n return keyframes({\n from: { transform: `translate3d(0,0,0)` },\n to: { transform: `translate3d(${toX}px,0,0)` },\n });\n}\n\nfunction _createSlideOutY(toY: number): string {\n return keyframes({\n from: { transform: `translate3d(0,0,0)` },\n to: { transform: `translate3d(0,${toY}px,0)` },\n });\n}\n","import { buildClassMap } from '../utilities/index';\nimport { AnimationStyles } from '../styles/index';\nimport type { IAnimationStyles } from '../interfaces/index';\n\n/**\n * {@docCategory AnimationClassNames}\n */\nexport const AnimationClassNames: { [key in keyof IAnimationStyles]?: string } = buildClassMap(AnimationStyles);\n","import type { IFontWeight } from '@fluentui/merge-styles';\n\n// Font face names to be registered.\nexport namespace LocalizedFontNames {\n export const Arabic = 'Segoe UI Web (Arabic)';\n export const Cyrillic = 'Segoe UI Web (Cyrillic)';\n export const EastEuropean = 'Segoe UI Web (East European)';\n export const Greek = 'Segoe UI Web (Greek)';\n export const Hebrew = 'Segoe UI Web (Hebrew)';\n export const Thai = 'Leelawadee UI Web';\n export const Vietnamese = 'Segoe UI Web (Vietnamese)';\n export const WestEuropean = 'Segoe UI Web (West European)';\n export const Selawik = 'Selawik Web';\n export const Armenian = 'Segoe UI Web (Armenian)';\n export const Georgian = 'Segoe UI Web (Georgian)';\n}\n\n// Font families with fallbacks, for the general regions.\nexport namespace LocalizedFontFamilies {\n export const Arabic = `'${LocalizedFontNames.Arabic}'`;\n export const ChineseSimplified = `'Microsoft Yahei UI', Verdana, Simsun`;\n export const ChineseTraditional = `'Microsoft Jhenghei UI', Pmingliu`;\n export const Cyrillic = `'${LocalizedFontNames.Cyrillic}'`;\n export const EastEuropean = `'${LocalizedFontNames.EastEuropean}'`;\n export const Greek = `'${LocalizedFontNames.Greek}'`;\n export const Hebrew = `'${LocalizedFontNames.Hebrew}'`;\n export const Hindi = `'Nirmala UI'`;\n export const Japanese = `'Yu Gothic UI', 'Meiryo UI', Meiryo, 'MS Pgothic', Osaka`;\n export const Korean = `'Malgun Gothic', Gulim`;\n export const Selawik = `'${LocalizedFontNames.Selawik}'`;\n export const Thai = `'Leelawadee UI Web', 'Kmer UI'`;\n export const Vietnamese = `'${LocalizedFontNames.Vietnamese}'`;\n export const WestEuropean = `'${LocalizedFontNames.WestEuropean}'`;\n export const Armenian = `'${LocalizedFontNames.Armenian}'`;\n export const Georgian = `'${LocalizedFontNames.Georgian}'`;\n}\n\n// Standard font sizes.\nexport namespace FontSizes {\n export const size10 = '10px';\n export const size12 = '12px';\n export const size14 = '14px';\n export const size16 = '16px';\n export const size18 = '18px';\n export const size20 = '20px';\n export const size24 = '24px';\n export const size28 = '28px';\n export const size32 = '32px';\n export const size42 = '42px';\n export const size68 = '68px';\n\n export const mini: string = '10px';\n export const xSmall: string = '10px';\n export const small: string = '12px';\n export const smallPlus: string = '12px';\n export const medium: string = '14px';\n export const mediumPlus: string = '16px';\n export const icon: string = '16px';\n export const large: string = '18px';\n export const xLarge: string = '20px';\n export const xLargePlus: string = '24px';\n export const xxLarge: string = '28px';\n export const xxLargePlus: string = '32px';\n export const superLarge: string = '42px';\n export const mega: string = '68px';\n}\n\n// Standard font weights.\nexport namespace FontWeights {\n export const light: IFontWeight = 100;\n export const semilight: IFontWeight = 300;\n export const regular: IFontWeight = 400;\n export const semibold: IFontWeight = 600;\n export const bold: IFontWeight = 700;\n}\n\n// Standard Icon Sizes.\nexport namespace IconFontSizes {\n export const xSmall: string = '10px';\n export const small: string = '12px';\n export const medium: string = '16px';\n export const large: string = '20px';\n}\n","import { mergeStyles } from '../MergeStyles';\n\n/**\n * Builds a class names object from a given map.\n *\n * @param styles - Map of unprocessed styles.\n * @returns Map of property name to class name.\n */\nexport function buildClassMap(styles: T): { [key in keyof T]?: string } {\n let classes: { [key in keyof T]?: string } = {};\n\n for (let styleName in styles) {\n if (styles.hasOwnProperty(styleName)) {\n let className: string;\n\n Object.defineProperty(classes, styleName, {\n get: (): string => {\n if (className === undefined) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n className = mergeStyles(styles[styleName] as any).toString();\n }\n return className;\n },\n enumerable: true,\n configurable: true,\n });\n }\n }\n\n return classes;\n}\n","import type { IRawStyle } from '../MergeStyles';\n\nexport const HighContrastSelector = '@media screen and (-ms-high-contrast: active), screen and (forced-colors: active)';\nexport const HighContrastSelectorWhite =\n // eslint-disable-next-line @fluentui/max-len\n '@media screen and (-ms-high-contrast: black-on-white), screen and (forced-colors: active) and (prefers-color-scheme: light)';\nexport const HighContrastSelectorBlack =\n // eslint-disable-next-line @fluentui/max-len\n '@media screen and (-ms-high-contrast: white-on-black), screen and (forced-colors: active) and (prefers-color-scheme: dark)';\n/**\n * @deprecated Use `HighContrastSelector`\n */\nexport const EdgeChromiumHighContrastSelector =\n '@media screen and (-ms-high-contrast: active), screen and (forced-colors: active)';\n\nexport const ScreenWidthMinSmall = 320;\nexport const ScreenWidthMinMedium = 480;\nexport const ScreenWidthMinLarge = 640;\nexport const ScreenWidthMinXLarge = 1024;\nexport const ScreenWidthMinXXLarge = 1366;\nexport const ScreenWidthMinXXXLarge = 1920;\nexport const ScreenWidthMaxSmall = ScreenWidthMinMedium - 1;\nexport const ScreenWidthMaxMedium = ScreenWidthMinLarge - 1;\nexport const ScreenWidthMaxLarge = ScreenWidthMinXLarge - 1;\nexport const ScreenWidthMaxXLarge = ScreenWidthMinXXLarge - 1;\nexport const ScreenWidthMaxXXLarge = ScreenWidthMinXXXLarge - 1;\n\nexport const ScreenWidthMinUhfMobile = 768;\n\nexport function getScreenSelector(min: number | undefined, max: number | undefined): string {\n const minSelector = typeof min === 'number' ? ` and (min-width: ${min}px)` : '';\n const maxSelector = typeof max === 'number' ? ` and (max-width: ${max}px)` : '';\n return `@media only screen${minSelector}${maxSelector}`;\n}\n\n/**\n * The style which turns off high contrast adjustment in browsers.\n */\nexport function getHighContrastNoAdjustStyle(): IRawStyle {\n return {\n forcedColorAdjust: 'none',\n MsHighContrastAdjust: 'none',\n };\n}\n\n/**\n * The style which turns off high contrast adjustment in (only) Edge Chromium browser.\n * @deprecated Use `getHighContrastNoAdjustStyle`\n */\n// eslint-disable-next-line deprecation/deprecation\nexport function getEdgeChromiumNoHighContrastAdjustSelector(): { [EdgeChromiumHighContrastSelector]: IRawStyle } {\n return {\n // eslint-disable-next-line deprecation/deprecation\n [EdgeChromiumHighContrastSelector]: {\n forcedColorAdjust: 'none',\n MsHighContrastAdjust: 'none',\n },\n };\n}\n","import * as React from 'react';\nimport { getWindow } from './dom/getWindow';\nexport const IsFocusVisibleClassName = 'ms-Fabric--isFocusVisible';\nexport const IsFocusHiddenClassName = 'ms-Fabric--isFocusHidden';\n\nfunction updateClassList(el: HTMLElement | null | undefined, enabled: boolean) {\n if (el) {\n el.classList.add(enabled ? IsFocusVisibleClassName : IsFocusHiddenClassName);\n el.classList.remove(enabled ? IsFocusHiddenClassName : IsFocusVisibleClassName);\n }\n}\n\n/**\n * Sets the visibility of focus styling.\n *\n * By default, focus styles (the box surrounding a focused Button, for example) only show up when navigational\n * keypresses occur (through Tab, arrows, PgUp/PgDn, Home and End), and are hidden when mouse interactions occur.\n * This API provides an imperative way to turn them on/off.\n *\n * A use case might be when you have a keypress like ctrl-f6 navigate to a particular region on the page,\n * and want focus to show up.\n *\n * @param enabled - Whether to turn focus visibility on or off.\n * @param target - Optional target from which to get window in case no `providerElem` has been specified.\n * @param registeredProviders - Array of provider refs that are associated with a FocusRectsProvider. If no array\n * is passed in, the classnames are attached to the document body that contains `target`.\n */\nexport function setFocusVisibility(\n enabled: boolean,\n target?: Element,\n registeredProviders?: React.RefObject[],\n): void {\n if (registeredProviders) {\n registeredProviders.forEach(ref => updateClassList(ref.current, enabled));\n } else {\n updateClassList(getWindow(target)?.document.body, enabled);\n }\n}\n","export namespace ZIndexes {\n export const Nav: number = 1;\n /**\n * @deprecated Do not use\n */\n export const ScrollablePane: number = 1;\n export const FocusStyle: number = 1;\n export const Coachmark: number = 1000;\n export const Layer: number = 1000000;\n export const KeytipLayer: number = 1000001;\n}\n","import { HighContrastSelector } from './CommonStyles';\nimport { IsFocusVisibleClassName } from '@fluentui/utilities';\nimport { ZIndexes } from './zIndexes';\nimport type { IRawStyle } from '@fluentui/merge-styles';\nimport type { IGetFocusStylesOptions, ITheme } from '../interfaces/index';\n\n/**\n * Generates a focus style which can be used to define an :after focus border.\n *\n * @param theme - The theme object to use.\n * @param options - Options to customize the focus border.\n * @returns The style object.\n */\nexport function getFocusStyle(theme: ITheme, options?: IGetFocusStylesOptions): IRawStyle;\n/**\n * Generates a focus style which can be used to define an :after focus border.\n *\n * @param theme - The theme object to use.\n * @param inset - The number of pixels to inset the border.\n * @param position - The positioning applied to the container. Must\n * be 'relative' or 'absolute' so that the focus border can live around it.\n * @param highContrastStyle - Style for high contrast mode.\n * @param borderColor - Color of the border.\n * @param outlineColor - Color of the outline.\n * @param isFocusedOnly - If the styles should apply on focus or not.\n * @param borderRadius - If the style should include a rounded border.\n * @returns The style object.\n * @deprecated Use the object parameter version instead.\n */\nexport function getFocusStyle(\n theme: ITheme,\n inset?: number,\n position?: 'relative' | 'absolute',\n highContrastStyle?: IRawStyle | undefined,\n borderColor?: string,\n outlineColor?: string,\n isFocusedOnly?: boolean,\n borderRadius?: string | number | undefined,\n): IRawStyle;\nexport function getFocusStyle(\n theme: ITheme,\n insetOrOptions?: number | IGetFocusStylesOptions,\n position?: 'relative' | 'absolute',\n highContrastStyle?: IRawStyle,\n borderColor?: string,\n outlineColor?: string,\n isFocusedOnly?: boolean,\n borderRadius?: string | number | undefined,\n): IRawStyle {\n if (typeof insetOrOptions === 'number' || !insetOrOptions) {\n return _getFocusStyleInternal(theme, {\n inset: insetOrOptions,\n position,\n highContrastStyle,\n borderColor,\n outlineColor,\n isFocusedOnly,\n borderRadius,\n });\n } else {\n return _getFocusStyleInternal(theme, insetOrOptions);\n }\n}\n\nfunction _getFocusStyleInternal(theme: ITheme, options: IGetFocusStylesOptions = {}): IRawStyle {\n const {\n borderRadius,\n inset = 0,\n width = 1,\n position = 'relative',\n highContrastStyle,\n borderColor = theme.palette.white,\n outlineColor = theme.palette.neutralSecondary,\n isFocusedOnly = true,\n pointerEvents,\n } = options;\n\n return {\n // Clear browser-specific focus styles and use 'transparent' as placeholder for focus style.\n outline: 'transparent',\n // Requirement because pseudo-element is absolutely positioned.\n position,\n\n selectors: {\n // Clear the focus border in Firefox.\n // Reference: http://stackoverflow.com/a/199319/1436671\n '::-moz-focus-inner': {\n border: '0',\n },\n\n // When the element that uses this mixin is in a :focus state, add a pseudo-element to\n // create a border.\n [`.${IsFocusVisibleClassName} &${isFocusedOnly ? ':focus' : ''}:after`]: {\n content: '\"\"',\n position: 'absolute',\n pointerEvents,\n left: inset + 1,\n top: inset + 1,\n bottom: inset + 1,\n right: inset + 1,\n border: `${width}px solid ${borderColor}`,\n outline: `${width}px solid ${outlineColor}`,\n zIndex: ZIndexes.FocusStyle,\n borderRadius: borderRadius,\n selectors: {\n [HighContrastSelector]: highContrastStyle,\n },\n },\n },\n };\n}\n\n/**\n * Generates style to clear browser specific focus styles.\n */\nexport function focusClear(): IRawStyle {\n return {\n selectors: {\n '&::-moz-focus-inner': {\n // Clear the focus border in Firefox. Reference: http://stackoverflow.com/a/199319/1436671\n border: 0,\n },\n '&': {\n // Clear browser specific focus styles and use transparent as placeholder for focus style\n outline: 'transparent',\n },\n },\n };\n}\n\n/**\n * Generates a style which can be used to set a border on focus.\n *\n * @param theme - The theme object to use.\n * @param inset - The number of pixels to inset the border (default 0)\n * @param width - The border width in pixels (default 1)\n * @param color - Color of the outline (default `theme.palette.neutralSecondary`)\n * @returns The style object.\n */\nexport function getFocusOutlineStyle(theme: ITheme, inset: number = 0, width: number = 1, color?: string): IRawStyle {\n return {\n selectors: {\n [`:global(${IsFocusVisibleClassName}) &:focus`]: {\n outline: `${width} solid ${color || theme.palette.neutralSecondary}`,\n outlineOffset: `${-inset}px`,\n },\n },\n };\n}\n\n/**\n * Generates text input border styles on focus.\n *\n * @param borderColor - Color of the border.\n * @param borderRadius - Radius of the border.\n * @param borderType - Type of the border.\n * @param borderPosition - Position of the border relative to the input element (default to -1\n * as it's the most common border width of the input element)\n * @returns The style object.\n */\nexport const getInputFocusStyle = (\n borderColor: string,\n borderRadius: string | number,\n borderType: 'border' | 'borderBottom' = 'border',\n borderPosition: number = -1,\n): IRawStyle => {\n const isBorderBottom = borderType === 'borderBottom';\n\n return {\n borderColor,\n selectors: {\n ':after': {\n pointerEvents: 'none',\n content: \"''\",\n position: 'absolute',\n left: isBorderBottom ? 0 : borderPosition,\n top: borderPosition,\n bottom: borderPosition,\n right: isBorderBottom ? 0 : borderPosition,\n [borderType]: `2px solid ${borderColor}`,\n borderRadius,\n width: borderType === 'borderBottom' ? '100%' : undefined,\n selectors: {\n [HighContrastSelector]: {\n [borderType === 'border' ? 'borderColor' : 'borderBottomColor']: 'Highlight',\n },\n },\n },\n },\n };\n};\n","import type { IRawStyle } from '@fluentui/merge-styles';\n\nexport const hiddenContentStyle: IRawStyle = {\n position: 'absolute',\n width: 1,\n height: 1,\n margin: -1,\n padding: 0,\n border: 0,\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n};\n","import { Stylesheet } from '@fluentui/merge-styles';\nimport { memoizeFunction } from '@fluentui/utilities';\nimport type { ITheme } from '../interfaces/index';\n\nexport type GlobalClassNames = Record;\n\n/**\n * Internal memoized function which simply takes in the class map and the\n * disable boolean. These immutable values can be memoized.\n */\nconst _getGlobalClassNames = memoizeFunction(\n (classNames: GlobalClassNames, disableGlobalClassNames?: boolean): GlobalClassNames => {\n const styleSheet = Stylesheet.getInstance();\n\n if (disableGlobalClassNames) {\n // disable global classnames\n return (Object.keys(classNames) as (keyof T)[]).reduce((acc, className) => {\n acc[className] = styleSheet.getClassName(classNames[className]);\n return acc;\n }, {} as GlobalClassNames);\n }\n\n // use global classnames\n return classNames;\n },\n);\n\n/**\n * Checks for the `disableGlobalClassNames` property on the `theme` to determine if it should return `classNames`\n * Note that calls to this function are memoized.\n *\n * @param classNames - The collection of global class names that apply when the flag is false. Make sure to pass in\n * the same instance on each call to benefit from memoization.\n * @param theme - The theme to check the flag on\n * @param disableGlobalClassNames - Optional. Explicitly opt in/out of disabling global classnames. Defaults to false.\n */\nexport function getGlobalClassNames(\n classNames: GlobalClassNames,\n theme: ITheme,\n disableGlobalClassNames?: boolean,\n): GlobalClassNames {\n return _getGlobalClassNames(\n classNames,\n disableGlobalClassNames !== undefined ? disableGlobalClassNames : theme.disableGlobalClassNames,\n );\n}\n","import { getWindow } from './dom/getWindow';\n\n/**\n * Storing global state in local module variables has issues when more than one copy\n * if the module gets loaded on the page (due to a bundling error or simply by consuming\n * a prebundled script.)\n *\n * This file contains helpers to deal with the getting and setting local state, and allows\n * callers to get called back when it mutates.\n */\n\nconst GLOBAL_SETTINGS_PROP_NAME = '__globalSettings__';\nconst CALLBACK_STATE_PROP_NAME = '__callbacks__';\n\nlet _counter = 0;\n\n/**\n * Change description used for change callbacks in GlobalSettings.\n *\n * @public\n * {@docCategory IChangeDescription}\n */\nexport interface IChangeDescription {\n key: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n oldValue: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n value: any;\n}\n\n/**\n * Change event callback.\n *\n * @public\n * {@docCategory IChangeEventCallback}\n */\nexport interface IChangeEventCallback {\n __id__?: string;\n (changeDescription?: IChangeDescription): void;\n}\n\n/**\n * Global settings helper, which stores settings in the global (window) namespace.\n * If window is not provided, it will store settings in module scope. Provides a\n * way to observe changes as well when their values change.\n *\n * @public\n * {@docCategory GlobalSettings}\n */\nexport class GlobalSettings {\n public static getValue(key: string, defaultValue?: T | (() => T)): T {\n const globalSettings = _getGlobalSettings();\n\n if (globalSettings[key] === undefined) {\n globalSettings[key] = typeof defaultValue === 'function' ? (defaultValue as Function)() : defaultValue;\n }\n\n return globalSettings[key];\n }\n\n public static setValue(key: string, value: T): T {\n const globalSettings = _getGlobalSettings();\n const callbacks = globalSettings[CALLBACK_STATE_PROP_NAME];\n let oldValue = globalSettings[key];\n\n if (value !== oldValue) {\n globalSettings[key] = value;\n\n let changeDescription = {\n oldValue,\n value,\n key,\n };\n\n for (let id in callbacks) {\n if (callbacks.hasOwnProperty(id)) {\n callbacks[id](changeDescription);\n }\n }\n }\n\n return value;\n }\n\n public static addChangeListener(cb: IChangeEventCallback): void {\n // Note: we use generated ids on the callbacks to create a map of the callbacks, which optimizes removal.\n // (It's faster to delete a key than it is to look up the index of an object and splice an array.)\n let id = cb.__id__;\n const callbacks = _getCallbacks();\n\n if (!id) {\n id = cb.__id__ = String(_counter++);\n }\n\n callbacks[id] = cb;\n }\n\n public static removeChangeListener(cb: IChangeEventCallback): void {\n const callbacks = _getCallbacks();\n delete callbacks[cb.__id__ as string];\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _getGlobalSettings(): { [key: string]: any } {\n const win = getWindow();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const globalObj: { [key: string]: any } = win || {};\n\n if (!globalObj[GLOBAL_SETTINGS_PROP_NAME]) {\n globalObj[GLOBAL_SETTINGS_PROP_NAME] = {\n [CALLBACK_STATE_PROP_NAME]: {},\n };\n }\n\n return globalObj[GLOBAL_SETTINGS_PROP_NAME];\n}\n\nfunction _getCallbacks(): { [key: string]: () => void } {\n const globalSettings = _getGlobalSettings();\n return globalSettings[CALLBACK_STATE_PROP_NAME];\n}\n","import { GlobalSettings } from '../GlobalSettings';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type ISettings = { [key: string]: any };\nexport type ISettingsFunction = (settings: ISettings) => ISettings;\n\n/**\n * @deprecated Use ISettings.\n */\nexport type Settings = ISettings;\n\n/**\n * @deprecated Use ISettingsFunction.\n */\nexport type SettingsFunction = ISettingsFunction;\n\nexport interface ICustomizations {\n settings: ISettings;\n scopedSettings: { [key: string]: ISettings };\n inCustomizerContext?: boolean;\n}\n\nconst CustomizationsGlobalKey = 'customizations';\nconst NO_CUSTOMIZATIONS = { settings: {}, scopedSettings: {}, inCustomizerContext: false };\n\nlet _allSettings = GlobalSettings.getValue(CustomizationsGlobalKey, {\n settings: {},\n scopedSettings: {},\n inCustomizerContext: false,\n});\n\nlet _events: (() => void)[] = [];\n\nexport class Customizations {\n private static _suppressUpdates: boolean;\n\n public static reset(): void {\n _allSettings.settings = {};\n _allSettings.scopedSettings = {};\n }\n\n /** Apply global Customization settings.\n * @example Customizations.applySettings(\\{ theme: \\{...\\} \\});\n */\n public static applySettings(settings: ISettings): void {\n _allSettings.settings = { ..._allSettings.settings, ...settings };\n Customizations._raiseChange();\n }\n\n /** Apply Customizations to a particular named scope, like a component.\n * @example Customizations.applyScopedSettings('Nav', \\{ styles: () =\\> \\{\\} \\});\n */\n public static applyScopedSettings(scopeName: string, settings: ISettings): void {\n _allSettings.scopedSettings[scopeName] = { ..._allSettings.scopedSettings[scopeName], ...settings };\n Customizations._raiseChange();\n }\n\n public static getSettings(\n properties: string[],\n scopeName?: string,\n localSettings: ICustomizations = NO_CUSTOMIZATIONS,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): any {\n const settings: ISettings = {};\n const localScopedSettings = (scopeName && localSettings.scopedSettings[scopeName]) || {};\n const globalScopedSettings = (scopeName && _allSettings.scopedSettings[scopeName]) || {};\n\n for (let property of properties) {\n settings[property] =\n localScopedSettings[property] ||\n localSettings.settings[property] ||\n globalScopedSettings[property] ||\n _allSettings.settings[property];\n }\n\n return settings;\n }\n\n /** Used to run some code that sets Customizations without triggering an update until the end.\n * Useful for applying Customizations that don't affect anything currently rendered, or for\n * applying many customizations at once.\n * @param suppressUpdate - Do not raise the change event at the end, preventing all updates\n */\n public static applyBatchedUpdates(code: () => void, suppressUpdate?: boolean): void {\n Customizations._suppressUpdates = true;\n try {\n code();\n } catch {\n /* do nothing */\n }\n Customizations._suppressUpdates = false;\n if (!suppressUpdate) {\n Customizations._raiseChange();\n }\n }\n\n public static observe(onChange: () => void): void {\n _events.push(onChange);\n }\n\n public static unobserve(onChange: () => void): void {\n _events = _events.filter((cb: () => void) => cb !== onChange);\n }\n\n private static _raiseChange(): void {\n if (!Customizations._suppressUpdates) {\n _events.forEach((cb: () => void) => cb());\n }\n }\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\n/**\n * An IThemingInstruction can specify a rawString to be preserved or a theme slot and a default value\n * to use if that slot is not specified by the theme.\n */\n\n/* eslint-disable @typescript-eslint/no-use-before-define */\n\n// Declaring a global here in case that the execution environment is Node.js (without importing the\n// entire node.js d.ts for now)\ndeclare let global: any; // eslint-disable-line @typescript-eslint/no-explicit-any\n\nexport interface IThemingInstruction {\n theme?: string;\n defaultValue?: string;\n rawString?: string;\n}\n\nexport type ThemableArray = IThemingInstruction[];\n\nexport interface ITheme {\n [key: string]: string;\n}\n\ninterface IStyleSheet {\n cssText: string;\n}\n\ninterface IExtendedHtmlStyleElement extends HTMLStyleElement {\n styleSheet: IStyleSheet;\n}\n\n/**\n * Performance Measurement of loading styles\n */\ninterface IMeasurement {\n /**\n * Count of style element injected, which is the slow operation in IE\n */\n count: number;\n /**\n * Total duration of all loadStyles exections\n */\n duration: number;\n}\n\ninterface IRunState {\n mode: Mode;\n buffer: ThemableArray[];\n flushTimer: number;\n}\n\ninterface IThemeState {\n theme: ITheme | undefined;\n lastStyleElement: IExtendedHtmlStyleElement;\n registeredStyles: IStyleRecord[]; // records of already registered non-themable styles\n registeredThemableStyles: IStyleRecord[]; // records of already registered themable styles\n loadStyles: ((processedStyles: string, rawStyles?: string | ThemableArray) => void) | undefined;\n perf: IMeasurement;\n runState: IRunState;\n}\n\ninterface IStyleRecord {\n styleElement: Element;\n themableStyle: ThemableArray;\n}\n\ninterface ICustomEvent extends Event {\n args?: T;\n}\n\n/**\n * object returned from resolveThemableArray function\n */\ninterface IThemableArrayResolveResult {\n /** this string is the processed styles in string */\n styleString: string;\n\n /** this boolean indicates if this style array is themable */\n themable: boolean;\n}\n\n/**\n * In sync mode, styles are registered as style elements synchronously with loadStyles() call.\n * In async mode, styles are buffered and registered as batch in async timer for performance purpose.\n */\nexport const enum Mode {\n sync,\n async\n}\n\n/**\n * Themable styles and non-themable styles are tracked separately\n * Specify ClearStyleOptions when calling clearStyles API to specify which group of registered styles should be cleared.\n */\nexport const enum ClearStyleOptions {\n /** only themable styles will be cleared */\n onlyThemable = 1,\n /** only non-themable styles will be cleared */\n onlyNonThemable = 2,\n /** both themable and non-themable styles will be cleared */\n all = 3\n}\n\n// Store the theming state in __themeState__ global scope for reuse in the case of duplicate\n// load-themed-styles hosted on the page.\nconst _root: any = typeof window === 'undefined' ? global : window; // eslint-disable-line @typescript-eslint/no-explicit-any\n\n// Nonce string to inject into script tag if one provided. This is used in CSP (Content Security Policy).\nconst _styleNonce: string = _root && _root.CSPSettings && _root.CSPSettings.nonce;\n\nconst _themeState: IThemeState = initializeThemeState();\n\n/**\n * Matches theming tokens. For example, \"[theme: themeSlotName, default: #FFF]\" (including the quotes).\n */\nconst _themeTokenRegex: RegExp =\n /[\\'\\\"]\\[theme:\\s*(\\w+)\\s*(?:\\,\\s*default:\\s*([\\\\\"\\']?[\\.\\,\\(\\)\\#\\-\\s\\w]*[\\.\\,\\(\\)\\#\\-\\w][\\\"\\']?))?\\s*\\][\\'\\\"]/g;\n\nconst now: () => number = () =>\n typeof performance !== 'undefined' && !!performance.now ? performance.now() : Date.now();\n\nfunction measure(func: () => void): void {\n const start: number = now();\n func();\n const end: number = now();\n _themeState.perf.duration += end - start;\n}\n\n/**\n * initialize global state object\n */\nfunction initializeThemeState(): IThemeState {\n let state: IThemeState = _root.__themeState__ || {\n theme: undefined,\n lastStyleElement: undefined,\n registeredStyles: []\n };\n\n if (!state.runState) {\n state = {\n ...state,\n perf: {\n count: 0,\n duration: 0\n },\n runState: {\n flushTimer: 0,\n mode: Mode.sync,\n buffer: []\n }\n };\n }\n if (!state.registeredThemableStyles) {\n state = {\n ...state,\n registeredThemableStyles: []\n };\n }\n _root.__themeState__ = state;\n return state;\n}\n\n/**\n * Loads a set of style text. If it is registered too early, we will register it when the window.load\n * event is fired.\n * @param {string | ThemableArray} styles Themable style text to register.\n * @param {boolean} loadAsync When true, always load styles in async mode, irrespective of current sync mode.\n */\nexport function loadStyles(styles: string | ThemableArray, loadAsync: boolean = false): void {\n measure(() => {\n const styleParts: ThemableArray = Array.isArray(styles) ? styles : splitStyles(styles);\n const { mode, buffer, flushTimer } = _themeState.runState;\n if (loadAsync || mode === Mode.async) {\n buffer.push(styleParts);\n if (!flushTimer) {\n _themeState.runState.flushTimer = asyncLoadStyles();\n }\n } else {\n applyThemableStyles(styleParts);\n }\n });\n}\n\n/**\n * Allows for customizable loadStyles logic. e.g. for server side rendering application\n * @param {(processedStyles: string, rawStyles?: string | ThemableArray) => void}\n * a loadStyles callback that gets called when styles are loaded or reloaded\n */\nexport function configureLoadStyles(\n loadStylesFn: ((processedStyles: string, rawStyles?: string | ThemableArray) => void) | undefined\n): void {\n _themeState.loadStyles = loadStylesFn;\n}\n\n/**\n * Configure run mode of load-themable-styles\n * @param mode load-themable-styles run mode, async or sync\n */\nexport function configureRunMode(mode: Mode): void {\n _themeState.runState.mode = mode;\n}\n\n/**\n * external code can call flush to synchronously force processing of currently buffered styles\n */\nexport function flush(): void {\n measure(() => {\n const styleArrays: ThemableArray[] = _themeState.runState.buffer.slice();\n _themeState.runState.buffer = [];\n const mergedStyleArray: ThemableArray = ([] as ThemableArray).concat.apply([], styleArrays);\n if (mergedStyleArray.length > 0) {\n applyThemableStyles(mergedStyleArray);\n }\n });\n}\n\n/**\n * register async loadStyles\n */\nfunction asyncLoadStyles(): number {\n return setTimeout(() => {\n _themeState.runState.flushTimer = 0;\n flush();\n }, 0);\n}\n\n/**\n * Loads a set of style text. If it is registered too early, we will register it when the window.load event\n * is fired.\n * @param {string} styleText Style to register.\n * @param {IStyleRecord} styleRecord Existing style record to re-apply.\n */\nfunction applyThemableStyles(stylesArray: ThemableArray, styleRecord?: IStyleRecord): void {\n if (_themeState.loadStyles) {\n _themeState.loadStyles(resolveThemableArray(stylesArray).styleString, stylesArray);\n } else {\n registerStyles(stylesArray);\n }\n}\n\n/**\n * Registers a set theme tokens to find and replace. If styles were already registered, they will be\n * replaced.\n * @param {theme} theme JSON object of theme tokens to values.\n */\nexport function loadTheme(theme: ITheme | undefined): void {\n _themeState.theme = theme;\n\n // reload styles.\n reloadStyles();\n}\n\n/**\n * Clear already registered style elements and style records in theme_State object\n * @param option - specify which group of registered styles should be cleared.\n * Default to be both themable and non-themable styles will be cleared\n */\nexport function clearStyles(option: ClearStyleOptions = ClearStyleOptions.all): void {\n if (option === ClearStyleOptions.all || option === ClearStyleOptions.onlyNonThemable) {\n clearStylesInternal(_themeState.registeredStyles);\n _themeState.registeredStyles = [];\n }\n if (option === ClearStyleOptions.all || option === ClearStyleOptions.onlyThemable) {\n clearStylesInternal(_themeState.registeredThemableStyles);\n _themeState.registeredThemableStyles = [];\n }\n}\n\nfunction clearStylesInternal(records: IStyleRecord[]): void {\n records.forEach((styleRecord: IStyleRecord) => {\n const styleElement: HTMLStyleElement = styleRecord && (styleRecord.styleElement as HTMLStyleElement);\n if (styleElement && styleElement.parentElement) {\n styleElement.parentElement.removeChild(styleElement);\n }\n });\n}\n\n/**\n * Reloads styles.\n */\nfunction reloadStyles(): void {\n if (_themeState.theme) {\n const themableStyles: ThemableArray[] = [];\n for (const styleRecord of _themeState.registeredThemableStyles) {\n themableStyles.push(styleRecord.themableStyle);\n }\n if (themableStyles.length > 0) {\n clearStyles(ClearStyleOptions.onlyThemable);\n applyThemableStyles(([] as ThemableArray).concat.apply([], themableStyles));\n }\n }\n}\n\n/**\n * Find theme tokens and replaces them with provided theme values.\n * @param {string} styles Tokenized styles to fix.\n */\nexport function detokenize(styles: string | undefined): string | undefined {\n if (styles) {\n styles = resolveThemableArray(splitStyles(styles)).styleString;\n }\n\n return styles;\n}\n\n/**\n * Resolves ThemingInstruction objects in an array and joins the result into a string.\n * @param {ThemableArray} splitStyleArray ThemableArray to resolve and join.\n */\nfunction resolveThemableArray(splitStyleArray: ThemableArray): IThemableArrayResolveResult {\n const { theme }: IThemeState = _themeState;\n let themable: boolean = false;\n // Resolve the array of theming instructions to an array of strings.\n // Then join the array to produce the final CSS string.\n const resolvedArray: (string | undefined)[] = (splitStyleArray || []).map(\n (currentValue: IThemingInstruction) => {\n const themeSlot: string | undefined = currentValue.theme;\n if (themeSlot) {\n themable = true;\n // A theming annotation. Resolve it.\n const themedValue: string | undefined = theme ? theme[themeSlot] : undefined;\n const defaultValue: string = currentValue.defaultValue || 'inherit';\n\n // Warn to console if we hit an unthemed value even when themes are provided, but only if \"DEBUG\" is true.\n // Allow the themedValue to be undefined to explicitly request the default value.\n if (\n theme &&\n !themedValue &&\n console &&\n !(themeSlot in theme) &&\n typeof DEBUG !== 'undefined' &&\n DEBUG\n ) {\n console.warn(`Theming value not provided for \"${themeSlot}\". Falling back to \"${defaultValue}\".`);\n }\n\n return themedValue || defaultValue;\n } else {\n // A non-themable string. Preserve it.\n return currentValue.rawString;\n }\n }\n );\n\n return {\n styleString: resolvedArray.join(''),\n themable: themable\n };\n}\n\n/**\n * Split tokenized CSS into an array of strings and theme specification objects\n * @param {string} styles Tokenized styles to split.\n */\nexport function splitStyles(styles: string): ThemableArray {\n const result: ThemableArray = [];\n if (styles) {\n let pos: number = 0; // Current position in styles.\n let tokenMatch: RegExpExecArray | null;\n while ((tokenMatch = _themeTokenRegex.exec(styles))) {\n const matchIndex: number = tokenMatch.index;\n if (matchIndex > pos) {\n result.push({\n rawString: styles.substring(pos, matchIndex)\n });\n }\n\n result.push({\n theme: tokenMatch[1],\n defaultValue: tokenMatch[2] // May be undefined\n });\n\n // index of the first character after the current match\n pos = _themeTokenRegex.lastIndex;\n }\n\n // Push the rest of the string after the last match.\n result.push({\n rawString: styles.substring(pos)\n });\n }\n\n return result;\n}\n\n/**\n * Registers a set of style text. If it is registered too early, we will register it when the\n * window.load event is fired.\n * @param {ThemableArray} styleArray Array of IThemingInstruction objects to register.\n * @param {IStyleRecord} styleRecord May specify a style Element to update.\n */\nfunction registerStyles(styleArray: ThemableArray): void {\n if (typeof document === 'undefined') {\n return;\n }\n const head: HTMLHeadElement = document.getElementsByTagName('head')[0];\n const styleElement: HTMLStyleElement = document.createElement('style');\n const { styleString, themable } = resolveThemableArray(styleArray);\n\n styleElement.setAttribute('data-load-themed-styles', 'true');\n if (_styleNonce) {\n styleElement.setAttribute('nonce', _styleNonce);\n }\n styleElement.appendChild(document.createTextNode(styleString));\n _themeState.perf.count++;\n head.appendChild(styleElement);\n\n const ev: ICustomEvent<{ newStyle: HTMLStyleElement }> = document.createEvent('HTMLEvents');\n ev.initEvent('styleinsert', true /* bubbleEvent */, false /* cancelable */);\n ev.args = {\n newStyle: styleElement\n };\n document.dispatchEvent(ev);\n\n const record: IStyleRecord = {\n styleElement: styleElement,\n themableStyle: styleArray\n };\n\n if (themable) {\n _themeState.registeredThemableStyles.push(record);\n } else {\n _themeState.registeredStyles.push(record);\n }\n}\n","import type { IPalette } from '../types/index';\n\n// When adding or removing a color, make sure you keep this consistent with IColorClassNames\n// by adding the color variants.\nexport const DefaultPalette: IPalette = {\n themeDarker: '#004578',\n themeDark: '#005a9e',\n themeDarkAlt: '#106ebe',\n themePrimary: '#0078d4',\n themeSecondary: '#2b88d8',\n themeTertiary: '#71afe5',\n themeLight: '#c7e0f4',\n themeLighter: '#deecf9',\n themeLighterAlt: '#eff6fc',\n black: '#000000',\n blackTranslucent40: 'rgba(0,0,0,.4)',\n neutralDark: '#201f1e',\n neutralPrimary: '#323130',\n neutralPrimaryAlt: '#3b3a39',\n neutralSecondary: '#605e5c',\n neutralSecondaryAlt: '#8a8886',\n neutralTertiary: '#a19f9d',\n neutralTertiaryAlt: '#c8c6c4',\n neutralQuaternary: '#d2d0ce',\n neutralQuaternaryAlt: '#e1dfdd',\n neutralLight: '#edebe9',\n neutralLighter: '#f3f2f1',\n neutralLighterAlt: '#faf9f8',\n accent: '#0078d4',\n white: '#ffffff',\n whiteTranslucent40: 'rgba(255,255,255,.4)',\n yellowDark: '#d29200',\n yellow: '#ffb900',\n yellowLight: '#fff100',\n orange: '#d83b01',\n orangeLight: '#ea4300',\n orangeLighter: '#ff8c00',\n redDark: '#a4262c',\n red: '#e81123',\n magentaDark: '#5c005c',\n magenta: '#b4009e',\n magentaLight: '#e3008c',\n purpleDark: '#32145a',\n purple: '#5c2d91',\n purpleLight: '#b4a0ff',\n blueDark: '#002050',\n blueMid: '#00188f',\n blue: '#0078d4',\n blueLight: '#00bcf2',\n tealDark: '#004b50',\n teal: '#008272',\n tealLight: '#00b294',\n greenDark: '#004b1c',\n green: '#107c10',\n greenLight: '#bad80a',\n};\n","export namespace Depths {\n export const depth0 = '0 0 0 0 transparent';\n export const depth4 = '0 1.6px 3.6px 0 rgba(0, 0, 0, 0.132), 0 0.3px 0.9px 0 rgba(0, 0, 0, 0.108)';\n export const depth8 = '0 3.2px 7.2px 0 rgba(0, 0, 0, 0.132), 0 0.6px 1.8px 0 rgba(0, 0, 0, 0.108)';\n export const depth16 = '0 6.4px 14.4px 0 rgba(0, 0, 0, 0.132), 0 1.2px 3.6px 0 rgba(0, 0, 0, 0.108)';\n export const depth64 = '0 25.6px 57.6px 0 rgba(0, 0, 0, 0.22), 0 4.8px 14.4px 0 rgba(0, 0, 0, 0.18)';\n}\n","import { Depths } from './FluentDepths';\nimport type { IEffects } from '../types/index';\n\nexport const DefaultEffects: IEffects = {\n elevation4: Depths.depth4,\n elevation8: Depths.depth8,\n elevation16: Depths.depth16,\n elevation64: Depths.depth64,\n\n roundedCorner2: '2px',\n roundedCorner4: '4px',\n roundedCorner6: '6px',\n};\n","import { IFontFace } from './IRawStyleBase';\nimport { getStyleOptions } from './StyleOptionsState';\nimport { Stylesheet } from './Stylesheet';\nimport { serializeRuleEntries } from './styleToClassName';\n\n/**\n * Registers a font face.\n * @public\n */\nexport function fontFace(font: IFontFace): void {\n const stylesheet = Stylesheet.getInstance();\n\n const rule = serializeRuleEntries(getStyleOptions(), font as {});\n\n const className = stylesheet.classNameFromKey(rule);\n\n if (className) {\n return;\n }\n\n const name = stylesheet.getClassName();\n stylesheet.insertRule(`@font-face{${rule}}`, true);\n stylesheet.cacheClassName(name, rule, [], ['font-face', rule]);\n}\n","import { FontSizes, FontWeights, LocalizedFontFamilies, LocalizedFontNames } from './FluentFonts';\nimport type { IFontWeight, IRawStyle } from '@fluentui/merge-styles';\nimport type { IFontStyles } from '../types/IFontStyles';\n\n// Fallback fonts, if specified system or web fonts are unavailable.\nconst FontFamilyFallbacks = `'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', sans-serif`;\n\n// By default, we favor system fonts for the default.\n// All localized fonts use a web font and never use the system font.\nconst defaultFontFamily = `'Segoe UI', '${LocalizedFontNames.WestEuropean}'`;\n\n// Mapping of language prefix to to font family.\nconst LanguageToFontMap = {\n ar: LocalizedFontFamilies.Arabic,\n bg: LocalizedFontFamilies.Cyrillic,\n cs: LocalizedFontFamilies.EastEuropean,\n el: LocalizedFontFamilies.Greek,\n et: LocalizedFontFamilies.EastEuropean,\n he: LocalizedFontFamilies.Hebrew,\n hi: LocalizedFontFamilies.Hindi,\n hr: LocalizedFontFamilies.EastEuropean,\n hu: LocalizedFontFamilies.EastEuropean,\n ja: LocalizedFontFamilies.Japanese,\n kk: LocalizedFontFamilies.EastEuropean,\n ko: LocalizedFontFamilies.Korean,\n lt: LocalizedFontFamilies.EastEuropean,\n lv: LocalizedFontFamilies.EastEuropean,\n pl: LocalizedFontFamilies.EastEuropean,\n ru: LocalizedFontFamilies.Cyrillic,\n sk: LocalizedFontFamilies.EastEuropean,\n 'sr-latn': LocalizedFontFamilies.EastEuropean,\n th: LocalizedFontFamilies.Thai,\n tr: LocalizedFontFamilies.EastEuropean,\n uk: LocalizedFontFamilies.Cyrillic,\n vi: LocalizedFontFamilies.Vietnamese,\n 'zh-hans': LocalizedFontFamilies.ChineseSimplified,\n 'zh-hant': LocalizedFontFamilies.ChineseTraditional,\n hy: LocalizedFontFamilies.Armenian,\n ka: LocalizedFontFamilies.Georgian,\n};\n\nfunction _fontFamilyWithFallbacks(fontFamily: string): string {\n return `${fontFamily}, ${FontFamilyFallbacks}`;\n}\n\n/**\n * If there is a localized font for this language, return that.\n * Returns undefined if there is no localized font for that language.\n */\nfunction _getLocalizedFontFamily(language: string | null): string {\n for (const lang in LanguageToFontMap) {\n if (LanguageToFontMap.hasOwnProperty(lang) && language && lang.indexOf(language) === 0) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return (LanguageToFontMap as any)[lang];\n }\n }\n\n return defaultFontFamily;\n}\n\nfunction _createFont(size: string, weight: IFontWeight, fontFamily: string): IRawStyle {\n return {\n fontFamily: fontFamily,\n MozOsxFontSmoothing: 'grayscale',\n WebkitFontSmoothing: 'antialiased',\n fontSize: size,\n fontWeight: weight,\n };\n}\n\nexport function createFontStyles(localeCode: string | null): IFontStyles {\n const localizedFont = _getLocalizedFontFamily(localeCode);\n const fontFamilyWithFallback = _fontFamilyWithFallbacks(localizedFont);\n\n const fontStyles = {\n tiny: _createFont(FontSizes.mini, FontWeights.regular, fontFamilyWithFallback),\n xSmall: _createFont(FontSizes.xSmall, FontWeights.regular, fontFamilyWithFallback),\n small: _createFont(FontSizes.small, FontWeights.regular, fontFamilyWithFallback),\n smallPlus: _createFont(FontSizes.smallPlus, FontWeights.regular, fontFamilyWithFallback),\n medium: _createFont(FontSizes.medium, FontWeights.regular, fontFamilyWithFallback),\n mediumPlus: _createFont(FontSizes.mediumPlus, FontWeights.regular, fontFamilyWithFallback),\n large: _createFont(FontSizes.large, FontWeights.regular, fontFamilyWithFallback),\n xLarge: _createFont(FontSizes.xLarge, FontWeights.semibold, fontFamilyWithFallback),\n xLargePlus: _createFont(FontSizes.xLargePlus, FontWeights.semibold, fontFamilyWithFallback),\n xxLarge: _createFont(FontSizes.xxLarge, FontWeights.semibold, fontFamilyWithFallback),\n xxLargePlus: _createFont(FontSizes.xxLargePlus, FontWeights.semibold, fontFamilyWithFallback),\n superLarge: _createFont(FontSizes.superLarge, FontWeights.semibold, fontFamilyWithFallback),\n mega: _createFont(FontSizes.mega, FontWeights.semibold, fontFamilyWithFallback),\n };\n\n return fontStyles;\n}\n","import { getDocument } from './dom/getDocument';\nimport * as localStorage from './localStorage';\nimport * as sessionStorage from './sessionStorage';\n\n// Default to undefined so that we initialize on first read.\nlet _language: string | null;\n\nconst STORAGE_KEY = 'language';\n\n/**\n * Gets the language set for the page.\n * @param persistenceType - Where to persist the value. Default is `sessionStorage` if available.\n */\nexport function getLanguage(\n persistenceType: 'localStorage' | 'sessionStorage' | 'none' = 'sessionStorage',\n): string | null {\n if (_language === undefined) {\n let doc = getDocument();\n const savedLanguage =\n persistenceType === 'localStorage'\n ? localStorage.getItem(STORAGE_KEY)\n : persistenceType === 'sessionStorage'\n ? sessionStorage.getItem(STORAGE_KEY)\n : undefined;\n\n if (savedLanguage) {\n _language = savedLanguage;\n }\n\n if (_language === undefined && doc) {\n _language = doc.documentElement.getAttribute('lang');\n }\n\n if (_language === undefined) {\n _language = 'en';\n }\n }\n\n return _language;\n}\n\n/**\n * Sets the language for the page (by adjusting the lang attribute of the html element).\n * @param language - Language to set.\n * @param persistenceType - Where to persist the value. Default is `sessionStorage` if available.\n */\nexport function setLanguage(language: string, persistenceType?: 'localStorage' | 'sessionStorage' | 'none'): void;\n/**\n * Sets the language for the page (by adjusting the lang attribute of the html element).\n * @deprecated Use string parameter version.\n * @param language - Language to set.\n * @param avoidPersisting - If true, don't store the value.\n */\nexport function setLanguage(language: string, avoidPersisting?: boolean): void;\nexport function setLanguage(\n language: string,\n persistenceParam?: 'localStorage' | 'sessionStorage' | 'none' | boolean,\n): void {\n let doc = getDocument();\n\n if (doc) {\n doc.documentElement.setAttribute('lang', language);\n }\n\n const persistenceType = persistenceParam === true ? 'none' : !persistenceParam ? 'sessionStorage' : persistenceParam;\n if (persistenceType === 'localStorage') {\n localStorage.setItem(STORAGE_KEY, language);\n } else if (persistenceType === 'sessionStorage') {\n sessionStorage.setItem(STORAGE_KEY, language);\n }\n\n _language = language;\n}\n","import { fontFace } from '@fluentui/merge-styles';\nimport { FontWeights, LocalizedFontFamilies, LocalizedFontNames } from './FluentFonts';\nimport { createFontStyles } from './createFontStyles';\nimport { getLanguage, getWindow } from '@fluentui/utilities';\nimport type { IFontWeight } from '@fluentui/merge-styles';\nimport type { IFontStyles } from '../types/IFontStyles';\nimport type { IFabricConfig } from '../types/IFabricConfig';\n\n// Default urls.\nconst DefaultBaseUrl = 'https://res-1.cdn.office.net/files/fabric-cdn-prod_20221209.001/assets';\n\n// Standard font styling.\nexport const DefaultFontStyles: IFontStyles = createFontStyles(getLanguage());\n\nfunction _registerFontFace(fontFamily: string, url: string, fontWeight?: IFontWeight, localFontName?: string): void {\n fontFamily = `'${fontFamily}'`;\n\n const localFontSrc = localFontName !== undefined ? `local('${localFontName}'),` : '';\n\n fontFace({\n fontFamily,\n src: localFontSrc + `url('${url}.woff2') format('woff2'),` + `url('${url}.woff') format('woff')`,\n fontWeight,\n fontStyle: 'normal',\n fontDisplay: 'swap',\n });\n}\n\nfunction _registerFontFaceSet(\n baseUrl: string,\n fontFamily: string,\n cdnFolder: string,\n cdnFontName: string = 'segoeui',\n localFontName?: string,\n): void {\n const urlBase = `${baseUrl}/${cdnFolder}/${cdnFontName}`;\n\n _registerFontFace(fontFamily, urlBase + '-light', FontWeights.light, localFontName && localFontName + ' Light');\n _registerFontFace(\n fontFamily,\n urlBase + '-semilight',\n FontWeights.semilight,\n localFontName && localFontName + ' SemiLight',\n );\n _registerFontFace(fontFamily, urlBase + '-regular', FontWeights.regular, localFontName);\n _registerFontFace(\n fontFamily,\n urlBase + '-semibold',\n FontWeights.semibold,\n localFontName && localFontName + ' SemiBold',\n );\n _registerFontFace(fontFamily, urlBase + '-bold', FontWeights.bold, localFontName && localFontName + ' Bold');\n}\n\nexport function registerDefaultFontFaces(baseUrl: string): void {\n if (baseUrl) {\n const fontUrl = `${baseUrl}/fonts`;\n\n // Produce @font-face definitions for all supported web fonts.\n _registerFontFaceSet(fontUrl, LocalizedFontNames.Thai, 'leelawadeeui-thai', 'leelawadeeui');\n _registerFontFaceSet(fontUrl, LocalizedFontNames.Arabic, 'segoeui-arabic');\n _registerFontFaceSet(fontUrl, LocalizedFontNames.Cyrillic, 'segoeui-cyrillic');\n _registerFontFaceSet(fontUrl, LocalizedFontNames.EastEuropean, 'segoeui-easteuropean');\n _registerFontFaceSet(fontUrl, LocalizedFontNames.Greek, 'segoeui-greek');\n _registerFontFaceSet(fontUrl, LocalizedFontNames.Hebrew, 'segoeui-hebrew');\n _registerFontFaceSet(fontUrl, LocalizedFontNames.Vietnamese, 'segoeui-vietnamese');\n _registerFontFaceSet(fontUrl, LocalizedFontNames.WestEuropean, 'segoeui-westeuropean', 'segoeui', 'Segoe UI');\n _registerFontFaceSet(fontUrl, LocalizedFontFamilies.Selawik, 'selawik', 'selawik');\n _registerFontFaceSet(fontUrl, LocalizedFontNames.Armenian, 'segoeui-armenian');\n _registerFontFaceSet(fontUrl, LocalizedFontNames.Georgian, 'segoeui-georgian');\n\n // Leelawadee UI (Thai) does not have a 'light' weight, so we override\n // the font-face generated above to use the 'semilight' weight instead.\n _registerFontFace('Leelawadee UI Web', `${fontUrl}/leelawadeeui-thai/leelawadeeui-semilight`, FontWeights.light);\n\n // Leelawadee UI (Thai) does not have a 'semibold' weight, so we override\n // the font-face generated above to use the 'bold' weight instead.\n _registerFontFace('Leelawadee UI Web', `${fontUrl}/leelawadeeui-thai/leelawadeeui-bold`, FontWeights.semibold);\n }\n}\n\n/**\n * Reads the fontBaseUrl from window.FabricConfig.fontBaseUrl or falls back to a default.\n */\nfunction _getFontBaseUrl(): string {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const fabricConfig: IFabricConfig | undefined = (getWindow() as any)?.FabricConfig;\n\n return fabricConfig?.fontBaseUrl ?? DefaultBaseUrl;\n}\n\n/**\n * Register the font faces.\n */\nregisterDefaultFontFaces(_getFontBaseUrl());\n","import { getWindow } from './dom/getWindow';\n\n/**\n * Fetches an item from local storage without throwing an exception\n * @param key The key of the item to fetch from local storage\n */\nexport function getItem(key: string): string | null {\n let result = null;\n try {\n const win = getWindow();\n result = win ? win.localStorage.getItem(key) : null;\n } catch (e) {\n /* Eat the exception */\n }\n return result;\n}\n\n/**\n * Inserts an item into local storage without throwing an exception\n * @param key The key of the item to add to local storage\n * @param data The data to put into local storage\n */\nexport function setItem(key: string, data: string): void {\n try {\n const win = getWindow();\n\n win && win.localStorage.setItem(key, data);\n } catch (e) {\n /* Eat the exception */\n }\n}\n","/**\n * Simple deep merge function. Takes all arguments and returns a deep copy of the objects merged\n * together in the order provided. If an object creates a circular reference, it will assign the\n * original reference.\n */\nexport function merge(target: Partial, ...args: (Partial | null | undefined | false)[]): T {\n for (const arg of args) {\n _merge(target || {}, arg as Partial);\n }\n\n return target as T;\n}\n\n/**\n * The _merge helper iterates through all props on source and assigns them to target.\n * When the value is an object, we will create a deep clone of the object. However if\n * there is a circular reference, the value will not be deep cloned and will persist\n * the reference.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _merge(target: T, source: T, circularReferences: any[] = []): T {\n circularReferences.push(source);\n\n for (let name in source) {\n if (source.hasOwnProperty(name)) {\n if (name !== '__proto__' && name !== 'constructor' && name !== 'prototype') {\n const value: T[Extract] = source[name];\n if (typeof value === 'object' && value !== null && !Array.isArray(value)) {\n const isCircularReference = circularReferences.indexOf(value) > -1;\n target[name] = (\n isCircularReference ? value : _merge(target[name] || {}, value, circularReferences)\n ) as T[Extract];\n } else {\n target[name] = value;\n }\n }\n }\n }\n\n circularReferences.pop();\n\n return target;\n}\n","import type { IEffects, IPalette, ISemanticColors } from '../types/index';\n\n/** Generates all the semantic slot colors based on the theme so far\n * We'll use these as fallbacks for semantic slots that the passed in theme did not define.\n * The caller must still mix in the customized semantic slots at the end.\n */\nexport function makeSemanticColors(\n p: IPalette,\n e: IEffects,\n s: Partial | undefined,\n isInverted: boolean,\n depComments: boolean = false,\n): ISemanticColors {\n const semanticColors: Partial = {\n primaryButtonBorder: 'transparent',\n\n errorText: !isInverted ? '#a4262c' : '#F1707B',\n\n messageText: !isInverted ? '#323130' : '#F3F2F1',\n messageLink: !isInverted ? '#005A9E' : '#6CB8F6',\n messageLinkHovered: !isInverted ? '#004578' : '#82C7FF',\n\n infoIcon: !isInverted ? '#605e5c' : '#C8C6C4',\n errorIcon: !isInverted ? '#A80000' : '#F1707B',\n blockingIcon: !isInverted ? '#FDE7E9' : '#442726',\n warningIcon: !isInverted ? '#797775' : '#C8C6C4',\n severeWarningIcon: !isInverted ? '#D83B01' : '#FCE100',\n successIcon: !isInverted ? '#107C10' : '#92C353',\n\n infoBackground: !isInverted ? '#f3f2f1' : '#323130',\n errorBackground: !isInverted ? '#FDE7E9' : '#442726',\n blockingBackground: !isInverted ? '#FDE7E9' : '#442726',\n warningBackground: !isInverted ? '#FFF4CE' : '#433519',\n severeWarningBackground: !isInverted ? '#FED9CC' : '#4F2A0F',\n successBackground: !isInverted ? '#DFF6DD' : '#393D1B',\n\n // deprecated\n warningHighlight: !isInverted ? '#ffb900' : '#fff100',\n successText: !isInverted ? '#107C10' : '#92c353',\n\n ...s,\n };\n\n const fullSemanticColors = getSemanticColors(p, e, semanticColors, isInverted);\n return _fixDeprecatedSlots(fullSemanticColors, depComments);\n}\n\n/**\n * Map partial platte and effects to partial semantic colors.\n */\nexport function getSemanticColors>(\n p: Partial | undefined,\n e: Partial | undefined,\n s: Partial | undefined,\n isInverted: boolean,\n depComments: boolean = false,\n): TResult {\n let result: Partial = {};\n\n // map palette\n const {\n white,\n black,\n themePrimary,\n themeDark,\n themeDarker,\n themeDarkAlt,\n themeLighter,\n neutralLight,\n neutralLighter,\n neutralDark,\n neutralQuaternary,\n neutralQuaternaryAlt,\n neutralPrimary,\n neutralSecondary,\n neutralSecondaryAlt,\n neutralTertiary,\n neutralTertiaryAlt,\n neutralLighterAlt,\n accent,\n } = p || {};\n\n if (white) {\n result.bodyBackground = white;\n result.bodyFrameBackground = white;\n result.accentButtonText = white;\n result.buttonBackground = white;\n result.primaryButtonText = white;\n result.primaryButtonTextHovered = white;\n result.primaryButtonTextPressed = white;\n result.inputBackground = white;\n result.inputForegroundChecked = white;\n result.listBackground = white;\n result.menuBackground = white;\n result.cardStandoutBackground = white;\n }\n if (black) {\n result.bodyTextChecked = black;\n result.buttonTextCheckedHovered = black;\n }\n if (themePrimary) {\n result.link = themePrimary;\n result.primaryButtonBackground = themePrimary;\n result.inputBackgroundChecked = themePrimary;\n result.inputIcon = themePrimary;\n result.inputFocusBorderAlt = themePrimary;\n result.menuIcon = themePrimary;\n result.menuHeader = themePrimary;\n result.accentButtonBackground = themePrimary;\n }\n if (themeDark) {\n result.primaryButtonBackgroundPressed = themeDark;\n result.inputBackgroundCheckedHovered = themeDark;\n result.inputIconHovered = themeDark;\n }\n if (themeDarker) {\n result.linkHovered = themeDarker;\n }\n if (themeDarkAlt) {\n result.primaryButtonBackgroundHovered = themeDarkAlt;\n }\n if (themeLighter) {\n result.inputPlaceholderBackgroundChecked = themeLighter;\n }\n if (neutralLight) {\n result.bodyBackgroundChecked = neutralLight;\n result.bodyFrameDivider = neutralLight;\n result.bodyDivider = neutralLight;\n result.variantBorder = neutralLight;\n result.buttonBackgroundCheckedHovered = neutralLight;\n result.buttonBackgroundPressed = neutralLight;\n result.listItemBackgroundChecked = neutralLight;\n result.listHeaderBackgroundPressed = neutralLight;\n result.menuItemBackgroundPressed = neutralLight;\n // eslint-disable-next-line deprecation/deprecation\n result.menuItemBackgroundChecked = neutralLight;\n }\n if (neutralLighter) {\n result.bodyBackgroundHovered = neutralLighter;\n result.buttonBackgroundHovered = neutralLighter;\n result.buttonBackgroundDisabled = neutralLighter;\n result.buttonBorderDisabled = neutralLighter;\n result.primaryButtonBackgroundDisabled = neutralLighter;\n result.disabledBackground = neutralLighter;\n result.listItemBackgroundHovered = neutralLighter;\n result.listHeaderBackgroundHovered = neutralLighter;\n result.menuItemBackgroundHovered = neutralLighter;\n }\n if (neutralQuaternary) {\n result.primaryButtonTextDisabled = neutralQuaternary;\n result.disabledSubtext = neutralQuaternary;\n }\n if (neutralQuaternaryAlt) {\n result.listItemBackgroundCheckedHovered = neutralQuaternaryAlt;\n }\n if (neutralTertiary) {\n result.disabledBodyText = neutralTertiary;\n result.variantBorderHovered = s?.variantBorderHovered || neutralTertiary;\n result.buttonTextDisabled = neutralTertiary;\n result.inputIconDisabled = neutralTertiary;\n result.disabledText = neutralTertiary;\n }\n if (neutralPrimary) {\n result.bodyText = neutralPrimary;\n result.actionLink = neutralPrimary;\n result.buttonText = neutralPrimary;\n result.inputBorderHovered = neutralPrimary;\n result.inputText = neutralPrimary;\n result.listText = neutralPrimary;\n result.menuItemText = neutralPrimary;\n }\n if (neutralLighterAlt) {\n result.bodyStandoutBackground = neutralLighterAlt;\n result.defaultStateBackground = neutralLighterAlt;\n }\n if (neutralDark) {\n result.actionLinkHovered = neutralDark;\n result.buttonTextHovered = neutralDark;\n result.buttonTextChecked = neutralDark;\n result.buttonTextPressed = neutralDark;\n result.inputTextHovered = neutralDark;\n result.menuItemTextHovered = neutralDark;\n }\n if (neutralSecondary) {\n result.bodySubtext = neutralSecondary;\n result.focusBorder = neutralSecondary;\n result.inputBorder = neutralSecondary;\n result.smallInputBorder = neutralSecondary;\n result.inputPlaceholderText = neutralSecondary;\n }\n if (neutralSecondaryAlt) {\n result.buttonBorder = neutralSecondaryAlt;\n }\n if (neutralTertiaryAlt) {\n result.disabledBodySubtext = neutralTertiaryAlt;\n result.disabledBorder = neutralTertiaryAlt;\n result.buttonBackgroundChecked = neutralTertiaryAlt;\n result.menuDivider = neutralTertiaryAlt;\n }\n if (accent) {\n result.accentButtonBackground = accent;\n }\n\n // map effects\n if (e?.elevation4) {\n result.cardShadow = e.elevation4;\n }\n if (!isInverted && e?.elevation8) {\n result.cardShadowHovered = e.elevation8;\n } else if (result.variantBorderHovered) {\n result.cardShadowHovered = '0 0 1px ' + result.variantBorderHovered;\n }\n\n result = {\n ...result,\n // mix in customized semantic slots\n ...s,\n };\n\n return result as TResult;\n}\n\nfunction _fixDeprecatedSlots(s: ISemanticColors, depComments: boolean): ISemanticColors {\n // Add @deprecated tag as comment if enabled\n let dep = '';\n if (depComments === true) {\n dep = ' /* @deprecated */';\n }\n\n /* eslint-disable deprecation/deprecation */\n s.listTextColor = s.listText + dep;\n s.menuItemBackgroundChecked += dep;\n s.warningHighlight += dep;\n s.warningText = s.messageText + dep;\n s.successText += dep;\n /* eslint-enable deprecation/deprecation */\n return s;\n}\n","import type { ISpacing } from '../types/index';\n\nexport const DefaultSpacing: ISpacing = {\n s2: '4px',\n s1: '8px',\n m: '16px',\n l1: '20px',\n l2: '32px',\n};\n","import { DefaultPalette } from './colors/index';\nimport { DefaultEffects } from './effects/index';\nimport { DefaultFontStyles } from './fonts/index';\nimport { mergeThemes } from './mergeThemes';\nimport { DefaultSpacing } from './spacing/index';\nimport { makeSemanticColors } from './utilities/makeSemanticColors';\nimport type { PartialTheme, Theme } from './types/index';\n\n/**\n * Creates a custom theme definition.\n * @param theme - Partial theme object.\n * @param depComments - Whether to include deprecated tags as comments for deprecated slots.\n */\nexport function createTheme(theme: PartialTheme = {}, depComments: boolean = false): Theme {\n const isInverted = !!theme.isInverted;\n const baseTheme: Theme = {\n palette: DefaultPalette,\n effects: DefaultEffects,\n fonts: DefaultFontStyles,\n spacing: DefaultSpacing,\n isInverted,\n disableGlobalClassNames: false,\n semanticColors: makeSemanticColors(DefaultPalette, DefaultEffects, undefined, isInverted, depComments),\n rtl: undefined,\n };\n\n return mergeThemes(baseTheme, theme);\n}\n","import { merge } from '@fluentui/utilities';\nimport { getSemanticColors } from './utilities/makeSemanticColors';\nimport type { IFontStyles, PartialTheme, Theme } from './types/index';\n\n/**\n * Merge a partial/full theme into a full theme and returns a merged full theme.\n */\nexport function mergeThemes(theme: Theme, partialTheme: PartialTheme = {}): Theme {\n const mergedTheme = merge({}, theme, partialTheme, {\n semanticColors: getSemanticColors(\n partialTheme.palette,\n partialTheme.effects,\n partialTheme.semanticColors,\n partialTheme.isInverted === undefined ? theme.isInverted : partialTheme.isInverted,\n ),\n }) as Theme;\n\n if (partialTheme.palette?.themePrimary && !partialTheme.palette?.accent) {\n mergedTheme.palette.accent = partialTheme.palette.themePrimary;\n }\n\n if (partialTheme.defaultFontStyle) {\n for (const fontStyle of Object.keys(mergedTheme.fonts) as (keyof IFontStyles)[]) {\n mergedTheme.fonts[fontStyle] = merge(\n mergedTheme.fonts[fontStyle],\n partialTheme.defaultFontStyle,\n partialTheme?.fonts?.[fontStyle],\n );\n }\n }\n\n return mergedTheme;\n}\n","import { Customizations, getWindow } from '@fluentui/utilities';\nimport { loadTheme as legacyLoadTheme } from '@microsoft/load-themed-styles';\nimport { createTheme } from '@fluentui/theme';\nimport type { ITheme, IPartialTheme, IFontStyles } from '../interfaces/index';\nimport type { IRawStyle } from '@fluentui/merge-styles';\n\nexport { createTheme } from '@fluentui/theme';\n\nlet _theme: ITheme = createTheme({});\nlet _onThemeChangeCallbacks: Array<(theme: ITheme) => void> = [];\n\nexport const ThemeSettingName = 'theme';\n\nexport function initializeThemeInCustomizations(): void {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const win: any = getWindow();\n\n if (win?.FabricConfig?.legacyTheme) {\n // does everything the `else` clause does and more, such as invoke legacy theming\n loadTheme(win.FabricConfig.legacyTheme);\n } else if (!Customizations.getSettings([ThemeSettingName]).theme) {\n if (win?.FabricConfig?.theme) {\n _theme = createTheme(win.FabricConfig.theme);\n }\n\n // Set the default theme.\n Customizations.applySettings({ [ThemeSettingName]: _theme });\n }\n}\n\ninitializeThemeInCustomizations();\n\n/**\n * Gets the theme object\n * @param depComments - Whether to include deprecated tags as comments for deprecated slots.\n */\nexport function getTheme(depComments: boolean = false): ITheme {\n if (depComments === true) {\n _theme = createTheme({}, depComments);\n }\n return _theme;\n}\n\n/**\n * Registers a callback that gets called whenever the theme changes.\n * This should only be used when the component cannot automatically get theme changes through its state.\n * This will not register duplicate callbacks.\n */\nexport function registerOnThemeChangeCallback(callback: (theme: ITheme) => void): void {\n if (_onThemeChangeCallbacks.indexOf(callback) === -1) {\n _onThemeChangeCallbacks.push(callback);\n }\n}\n\n/**\n * See registerOnThemeChangeCallback().\n * Removes previously registered callbacks.\n */\nexport function removeOnThemeChangeCallback(callback: (theme: ITheme) => void): void {\n const i = _onThemeChangeCallbacks.indexOf(callback);\n if (i === -1) {\n return;\n }\n\n _onThemeChangeCallbacks.splice(i, 1);\n}\n\n/**\n * Applies the theme, while filling in missing slots.\n * @param theme - Partial theme object.\n * @param depComments - Whether to include deprecated tags as comments for deprecated slots.\n */\nexport function loadTheme(theme: IPartialTheme, depComments: boolean = false): ITheme {\n _theme = createTheme(theme, depComments);\n\n // Invoke the legacy method of theming the page as well.\n legacyLoadTheme({ ..._theme.palette, ..._theme.semanticColors, ..._theme.effects, ..._loadFonts(_theme) });\n\n Customizations.applySettings({ [ThemeSettingName]: _theme });\n\n _onThemeChangeCallbacks.forEach((callback: (theme: ITheme) => void) => {\n try {\n callback(_theme);\n } catch (e) {\n // don't let a bad callback break everything else\n }\n });\n\n return _theme;\n}\n\n/**\n * Loads font variables into a JSON object.\n * @param theme - The theme object\n */\nfunction _loadFonts(theme: ITheme): { [name: string]: string } {\n const lines: { [key: string]: string } = {};\n\n for (const fontName of Object.keys(theme.fonts)) {\n const font: IRawStyle = theme.fonts[fontName as keyof IFontStyles];\n\n for (const propName of Object.keys(font)) {\n const name: string = fontName + propName.charAt(0).toUpperCase() + propName.slice(1);\n let value = font[propName as keyof IRawStyle] as string;\n\n if (propName === 'fontSize' && typeof value === 'number') {\n // if it's a number, convert it to px by default like our theming system does\n value = value + 'px';\n }\n lines[name] = value;\n }\n }\n return lines;\n}\n","import type { IRawStyle } from '@fluentui/merge-styles';\n\n// This file mimics styles and mixins from _General.Mixins.scss\nexport const normalize: IRawStyle = {\n boxShadow: 'none',\n margin: 0,\n padding: 0,\n boxSizing: 'border-box',\n};\n\nexport const noWrap: IRawStyle = {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n};\n","import type { IStyle } from '@fluentui/merge-styles';\n\n/**\n * Generates placeholder style for each of the browsers supported by `@fluentui/react`.\n * @param styles - The style to use.\n * @returns The placeholder style object for each browser depending on the placeholder directive it uses.\n */\nexport function getPlaceholderStyles(styles: IStyle): IStyle {\n return {\n selectors: {\n '::placeholder': styles, // Chrome, Safari, Opera, Firefox\n ':-ms-input-placeholder': styles, // IE 10+\n '::-ms-input-placeholder': styles, // Edge\n },\n };\n}\n","/* eslint-disable no-console */\n\nlet _warningCallback: ((message: string) => void) | undefined = undefined;\n\nexport type ISettingsMap = { [P in keyof T]?: string };\n\n/**\n * Sends a warning to console, if the api is present.\n *\n * @public\n * @param message - Warning message.\n */\nexport function warn(message: string): void {\n if (_warningCallback && process.env.NODE_ENV !== 'production') {\n _warningCallback(message);\n } else if (console && console.warn) {\n console.warn(message);\n }\n}\n\n/**\n * Configures the warning callback. Passing in undefined will reset it to use the default\n * console.warn function.\n *\n * @public\n * @param warningCallback - Callback to override the generated warnings.\n */\nexport function setWarningCallback(warningCallback?: (message: string) => void): void {\n _warningCallback = warningCallback;\n}\n","import { GlobalSettings, warn } from '@fluentui/utilities';\nimport { fontFace, mergeStyles, Stylesheet } from '@fluentui/merge-styles';\nimport type { IRawStyle, IFontFace } from '@fluentui/merge-styles';\n\nexport interface IIconSubset {\n fontFace?: IFontFace;\n icons: {\n [key: string]: string | JSX.Element;\n };\n\n style?: IRawStyle;\n /**\n * Indicates to the icon renderer that it is safe to merge any props on the original `Icon` element\n * onto the child content element registered for the icon which are valid for HTML images.\n */\n mergeImageProps?: boolean;\n}\n\nexport interface IIconSubsetRecord extends IIconSubset {\n isRegistered?: boolean;\n className?: string;\n}\n\nexport interface IIconRecord {\n code: string | undefined;\n subset: IIconSubsetRecord;\n}\n\nexport interface IIconOptions {\n /**\n * By default, registering the same set of icons will generate a console warning per duplicate icon\n * registered, because this scenario can create unexpected consequences.\n *\n * Some scenarios include:\n *\n * Icon set was previously registered using a different base url.\n * Icon set was previously registered but a different version was provided.\n * Icons in a previous registered set overlap with a new set.\n *\n * To simply ignore previously registered icons, you can specify to disable warnings. This means\n * that if an icon which was previous registered is registered again, it will be silently ignored.\n * However, consider whether the problems listed above will cause issues.\n **/\n disableWarnings: boolean;\n\n /**\n * @deprecated Use `disableWarnings` instead.\n */\n warnOnMissingIcons?: boolean;\n}\n\nexport interface IIconRecords {\n __options: IIconOptions;\n __remapped: { [key: string]: string };\n [key: string]: IIconRecord | {};\n}\n\nconst ICON_SETTING_NAME = 'icons';\n\nconst _iconSettings = GlobalSettings.getValue(ICON_SETTING_NAME, {\n __options: {\n disableWarnings: false,\n warnOnMissingIcons: true,\n },\n __remapped: {},\n});\n\n// Reset icon registration on stylesheet resets.\nconst stylesheet = Stylesheet.getInstance();\n\nif (stylesheet && stylesheet.onReset) {\n stylesheet.onReset(() => {\n for (const name in _iconSettings) {\n if (_iconSettings.hasOwnProperty(name) && !!(_iconSettings[name] as IIconRecord).subset) {\n (_iconSettings[name] as IIconRecord).subset.className = undefined;\n }\n }\n });\n}\n\n/**\n * Normalizes an icon name for consistent mapping.\n * Current implementation is to convert the icon name to lower case.\n *\n * @param name - Icon name to normalize.\n * @returns {string} Normalized icon name to use for indexing and mapping.\n */\nconst normalizeIconName = (name: string): string => name.toLowerCase();\n\n/**\n * Registers a given subset of icons.\n *\n * @param iconSubset - the icon subset definition.\n */\nexport function registerIcons(iconSubset: IIconSubset, options?: Partial): void {\n let subset = {\n ...iconSubset,\n isRegistered: false,\n className: undefined,\n };\n let { icons } = iconSubset;\n\n // Grab options, optionally mix user provided ones on top.\n options = options ? { ..._iconSettings.__options, ...options } : _iconSettings.__options;\n\n for (const iconName in icons) {\n if (icons.hasOwnProperty(iconName)) {\n const code = icons[iconName];\n const normalizedIconName = normalizeIconName(iconName);\n\n if (_iconSettings[normalizedIconName]) {\n _warnDuplicateIcon(iconName);\n } else {\n _iconSettings[normalizedIconName] = {\n code,\n subset,\n } as IIconRecord;\n }\n }\n }\n}\n\n/**\n * Unregisters icons by name.\n *\n * @param iconNames - List of icons to unregister.\n */\nexport function unregisterIcons(iconNames: string[]): void {\n const options = _iconSettings.__options;\n\n for (const iconName of iconNames) {\n const normalizedIconName = normalizeIconName(iconName);\n if (_iconSettings[normalizedIconName]) {\n delete _iconSettings[normalizedIconName];\n } else {\n // Warn that we are trying to delete an icon that doesn't exist\n if (!options.disableWarnings) {\n warn(`The icon \"${iconName}\" tried to unregister but was not registered.`);\n }\n }\n\n // Delete any aliases for this iconName\n if (_iconSettings.__remapped[normalizedIconName]) {\n delete _iconSettings.__remapped[normalizedIconName];\n }\n\n // Delete any items that were an alias for this iconName\n Object.keys(_iconSettings.__remapped).forEach((key: string) => {\n if (_iconSettings.__remapped[key] === normalizedIconName) {\n delete _iconSettings.__remapped[key];\n }\n });\n }\n}\n\n/**\n * Remaps one icon name to another.\n */\nexport function registerIconAlias(iconName: string, mappedToName: string): void {\n _iconSettings.__remapped[normalizeIconName(iconName)] = normalizeIconName(mappedToName);\n}\n\n/**\n * Gets an icon definition. If an icon is requested but the subset has yet to be registered,\n * it will get registered immediately.\n *\n * @public\n * @param name - Name of icon.\n */\nexport function getIcon(name?: string): IIconRecord | undefined {\n let icon: IIconRecord | undefined = undefined;\n const options = _iconSettings.__options;\n\n name = name ? normalizeIconName(name) : '';\n name = _iconSettings.__remapped[name] || name;\n\n if (name) {\n icon = _iconSettings[name!] as IIconRecord;\n\n if (icon) {\n let { subset } = icon;\n if (subset && subset.fontFace) {\n if (!subset.isRegistered) {\n fontFace(subset.fontFace);\n subset.isRegistered = true;\n }\n\n if (!subset.className) {\n subset.className = mergeStyles(subset.style, {\n fontFamily: subset.fontFace.fontFamily,\n fontWeight: subset.fontFace.fontWeight || 'normal',\n fontStyle: subset.fontFace.fontStyle || 'normal',\n });\n }\n }\n } else {\n // eslint-disable-next-line deprecation/deprecation\n if (!options.disableWarnings && options.warnOnMissingIcons) {\n warn(\n `The icon \"${name}\" was used but not registered. See https://github.com/microsoft/fluentui/wiki/Using-icons for more information.`,\n );\n }\n }\n }\n\n return icon;\n}\n\n/**\n * Sets the icon options.\n *\n * @public\n */\nexport function setIconOptions(options: Partial): void {\n _iconSettings.__options = {\n ..._iconSettings.__options,\n ...options,\n };\n}\n\nlet _missingIcons: string[] = [];\nlet _missingIconsTimer: ReturnType | undefined = undefined;\n\nfunction _warnDuplicateIcon(iconName: string): void {\n const options = _iconSettings.__options;\n const warningDelay = 2000;\n const maxIconsInMessage = 10;\n\n if (!options.disableWarnings) {\n _missingIcons.push(iconName);\n if (_missingIconsTimer === undefined) {\n _missingIconsTimer = setTimeout(() => {\n warn(\n `Some icons were re-registered. Applications should only call registerIcons for any given ` +\n `icon once. Redefining what an icon is may have unintended consequences. Duplicates ` +\n `include: \\n` +\n _missingIcons.slice(0, maxIconsInMessage).join(', ') +\n (_missingIcons.length > maxIconsInMessage ? ` (+ ${_missingIcons.length - maxIconsInMessage} more)` : ''),\n );\n _missingIconsTimer = undefined;\n _missingIcons = [];\n }, warningDelay);\n }\n }\n}\n","import { IStyleSet, IConcatenatedStyleSet } from './IStyleSet';\nimport { IStyleBase, IStyle } from './IStyle';\nimport { IStyleFunctionOrObject } from './IStyleFunction';\nimport { ObjectOnly } from './ObjectOnly';\n\n/**\n * Combine a set of styles together (but does not register css classes).\n * @param styleSet - The first style set to be concatenated.\n */\nexport function concatStyleSets(\n styleSet: TStyleSet | false | null | undefined,\n): IConcatenatedStyleSet>;\n\n/**\n * Combine a set of styles together (but does not register css classes).\n * @param styleSet1 - The first style set to be concatenated.\n * @param styleSet2 - The second style set to be concatenated.\n */\nexport function concatStyleSets(\n styleSet1: TStyleSet1 | false | null | undefined,\n styleSet2: TStyleSet2 | false | null | undefined,\n): IConcatenatedStyleSet & ObjectOnly>;\n\n/**\n * Combine a set of styles together (but does not register css classes).\n * @param styleSet1 - The first style set to be concatenated.\n * @param styleSet2 - The second style set to be concatenated.\n * @param styleSet3 - The third style set to be concatenated.\n */\nexport function concatStyleSets(\n styleSet1: TStyleSet1 | false | null | undefined,\n styleSet2: TStyleSet2 | false | null | undefined,\n styleSet3: TStyleSet3 | false | null | undefined,\n): IConcatenatedStyleSet & ObjectOnly & ObjectOnly>;\n\n/**\n * Combine a set of styles together (but does not register css classes).\n * @param styleSet1 - The first style set to be concatenated.\n * @param styleSet2 - The second style set to be concatenated.\n * @param styleSet3 - The third style set to be concatenated.\n * @param styleSet4 - The fourth style set to be concatenated.\n */\nexport function concatStyleSets(\n styleSet1: TStyleSet1 | false | null | undefined,\n styleSet2: TStyleSet2 | false | null | undefined,\n styleSet3: TStyleSet3 | false | null | undefined,\n styleSet4: TStyleSet4 | false | null | undefined,\n): IConcatenatedStyleSet<\n ObjectOnly & ObjectOnly & ObjectOnly & ObjectOnly\n>;\n\n/**\n * Combine a set of styles together (but does not register css classes).\n * @param styleSet1 - The first style set to be concatenated.\n * @param styleSet2 - The second style set to be concatenated.\n * @param styleSet3 - The third style set to be concatenated.\n * @param styleSet4 - The fourth style set to be concatenated.\n * @param styleSet5 - The fifth set to be concatenated.\n */\nexport function concatStyleSets(\n styleSet1: TStyleSet1 | false | null | undefined,\n styleSet2: TStyleSet2 | false | null | undefined,\n styleSet3: TStyleSet3 | false | null | undefined,\n styleSet4: TStyleSet4 | false | null | undefined,\n styleSet5: TStyleSet5 | false | null | undefined,\n): IConcatenatedStyleSet<\n ObjectOnly &\n ObjectOnly &\n ObjectOnly &\n ObjectOnly &\n ObjectOnly\n>;\n\n/**\n * Combine a set of styles together (but does not register css classes).\n * @param styleSet1 - The first style set to be concatenated.\n * @param styleSet2 - The second style set to be concatenated.\n * @param styleSet3 - The third style set to be concatenated.\n * @param styleSet4 - The fourth style set to be concatenated.\n * @param styleSet5 - The fifth set to be concatenated.\n * @param styleSet6 - The sixth set to be concatenated.\n */\nexport function concatStyleSets(\n styleSet1: TStyleSet1 | false | null | undefined,\n styleSet2: TStyleSet2 | false | null | undefined,\n styleSet3: TStyleSet3 | false | null | undefined,\n styleSet4: TStyleSet4 | false | null | undefined,\n styleSet5: TStyleSet5 | false | null | undefined,\n styleSet6: TStyleSet6 | false | null | undefined,\n): IConcatenatedStyleSet<\n ObjectOnly &\n ObjectOnly &\n ObjectOnly &\n ObjectOnly &\n ObjectOnly &\n ObjectOnly\n>;\n\n/**\n * Combine a set of styles together (but does not register css classes).\n * @param styleSets - One or more stylesets to be merged (each param can also be falsy).\n */\nexport function concatStyleSets(...styleSets: (IStyleSet | false | null | undefined)[]): IConcatenatedStyleSet;\n\n/**\n * Combine a set of styles together (but does not register css classes).\n * @param styleSets - One or more stylesets to be merged (each param can also be falsy).\n */\nexport function concatStyleSets(...styleSets: (IStyleSet | false | null | undefined)[]): IConcatenatedStyleSet {\n if (styleSets && styleSets.length === 1 && styleSets[0] && !(styleSets[0] as IStyleSet).subComponentStyles) {\n return styleSets[0] as IConcatenatedStyleSet;\n }\n\n const mergedSet: IConcatenatedStyleSet = {};\n\n // We process sub component styles in two phases. First we collect them, then we combine them into 1 style function.\n const workingSubcomponentStyles: { [key: string]: Array> } = {};\n\n for (const currentSet of styleSets) {\n if (currentSet) {\n for (const prop in currentSet) {\n if (currentSet.hasOwnProperty(prop)) {\n if (prop === 'subComponentStyles' && currentSet.subComponentStyles !== undefined) {\n // subcomponent styles - style functions or objects\n\n const currentComponentStyles = currentSet.subComponentStyles;\n for (const subCompProp in currentComponentStyles) {\n if (currentComponentStyles.hasOwnProperty(subCompProp)) {\n if (workingSubcomponentStyles.hasOwnProperty(subCompProp)) {\n workingSubcomponentStyles[subCompProp].push(currentComponentStyles[subCompProp]);\n } else {\n workingSubcomponentStyles[subCompProp] = [currentComponentStyles[subCompProp]];\n }\n }\n }\n\n continue;\n }\n\n // the as any casts below is a workaround for ts 2.8.\n // todo: remove cast to any in ts 2.9.\n const mergedValue: IStyle = (mergedSet as any)[prop];\n const currentValue = (currentSet as any)[prop];\n\n if (mergedValue === undefined) {\n (mergedSet as any)[prop] = currentValue;\n } else {\n (mergedSet as any)[prop] = [\n // https://github.com/Microsoft/TypeScript/issues/25474\n ...(Array.isArray(mergedValue) ? mergedValue : [mergedValue as IStyleBase]),\n ...(Array.isArray(currentValue) ? currentValue : [currentValue as IStyleBase]),\n ];\n }\n }\n }\n }\n }\n\n if (Object.keys(workingSubcomponentStyles).length > 0) {\n mergedSet.subComponentStyles = {};\n const mergedSubStyles = mergedSet.subComponentStyles;\n\n // now we process the subcomponent styles if there are any\n for (const subCompProp in workingSubcomponentStyles) {\n if (workingSubcomponentStyles.hasOwnProperty(subCompProp)) {\n const workingSet = workingSubcomponentStyles[subCompProp];\n mergedSubStyles[subCompProp] = (styleProps: any) => {\n return concatStyleSets(\n ...workingSet.map((styleFunctionOrObject: IStyleFunctionOrObject) =>\n typeof styleFunctionOrObject === 'function' ? styleFunctionOrObject(styleProps) : styleFunctionOrObject,\n ),\n );\n };\n }\n }\n }\n\n return mergedSet;\n}\n","import { concatStyleSets } from './concatStyleSets';\nimport { IStyleSet } from './IStyleSet';\nimport { IStyleFunctionOrObject } from './IStyleFunction';\nimport { DeepPartial } from './DeepPartial';\n\n/**\n * Concatenates style sets into one, but resolves functional sets using the given props.\n * @param styleProps - Props used to resolve functional sets.\n * @param allStyles - Style sets, which can be functions or objects.\n */\nexport function concatStyleSetsWithProps>(\n styleProps: TStyleProps,\n ...allStyles: (IStyleFunctionOrObject | undefined)[]\n): DeepPartial {\n const result: DeepPartial[] = [];\n for (const styles of allStyles) {\n if (styles) {\n result.push(typeof styles === 'function' ? styles(styleProps) : styles);\n }\n }\n if (result.length === 1) {\n return result[0] as DeepPartial;\n } else if (result.length) {\n // cliffkoh: I cannot figure out how to avoid the cast to any here.\n // It is something to do with the use of Omit in IStyleSet.\n // It might not be necessary once Omit becomes part of lib.d.ts (when we remove our own Omit and rely on\n // the official version).\n return concatStyleSets(...(result as any)) as any;\n }\n\n return {};\n}\n","import { concatStyleSets } from './concatStyleSets';\nimport { extractStyleParts } from './extractStyleParts';\nimport { IStyle } from './IStyle';\nimport { IStyleOptions } from './IStyleOptions';\nimport { IConcatenatedStyleSet, IProcessedStyleSet, IStyleSet } from './IStyleSet';\nimport { getStyleOptions } from './StyleOptionsState';\nimport { applyRegistration, styleToRegistration } from './styleToClassName';\nimport { ObjectOnly } from './ObjectOnly';\n\n/**\n * Takes in one or more style set objects, each consisting of a set of areas,\n * each which will produce a class name. Using this is analogous to calling\n * `mergeStyles` for each property in the object, but ensures we maintain the\n * set ordering when multiple style sets are merged.\n *\n * @param styleSet - The first style set to be merged and reigstered.\n */\nexport function mergeStyleSets(\n styleSet: TStyleSet | false | null | undefined,\n): IProcessedStyleSet>;\n\n/**\n * Takes in one or more style set objects, each consisting of a set of areas,\n * each which will produce a class name. Using this is analogous to calling\n * `mergeStyles` for each property in the object, but ensures we maintain the\n * set ordering when multiple style sets are merged.\n *\n * @param styleSet1 - The first style set to be merged.\n * @param styleSet2 - The second style set to be merged.\n */\nexport function mergeStyleSets(\n styleSet1: TStyleSet1 | false | null | undefined,\n styleSet2: TStyleSet2 | false | null | undefined,\n): IProcessedStyleSet & ObjectOnly>;\n\n/**\n * Takes in one or more style set objects, each consisting of a set of areas,\n * each which will produce a class name. Using this is analogous to calling\n * `mergeStyles` for each property in the object, but ensures we maintain the\n * set ordering when multiple style sets are merged.\n *\n * @param styleSet1 - The first style set to be merged.\n * @param styleSet2 - The second style set to be merged.\n * @param styleSet3 - The third style set to be merged.\n */\nexport function mergeStyleSets(\n styleSet1: TStyleSet1 | false | null | undefined,\n styleSet2: TStyleSet2 | false | null | undefined,\n styleSet3: TStyleSet3 | false | null | undefined,\n): IProcessedStyleSet & ObjectOnly & ObjectOnly>;\n\n/**\n * Takes in one or more style set objects, each consisting of a set of areas,\n * each which will produce a class name. Using this is analogous to calling\n * `mergeStyles` for each property in the object, but ensures we maintain the\n * set ordering when multiple style sets are merged.\n *\n * @param styleSet1 - The first style set to be merged.\n * @param styleSet2 - The second style set to be merged.\n * @param styleSet3 - The third style set to be merged.\n * @param styleSet4 - The fourth style set to be merged.\n */\nexport function mergeStyleSets(\n styleSet1: TStyleSet1 | false | null | undefined,\n styleSet2: TStyleSet2 | false | null | undefined,\n styleSet3: TStyleSet3 | false | null | undefined,\n styleSet4: TStyleSet4 | false | null | undefined,\n): IProcessedStyleSet<\n ObjectOnly & ObjectOnly & ObjectOnly & ObjectOnly\n>;\n\n/**\n * Takes in one or more style set objects, each consisting of a set of areas,\n * each which will produce a class name. Using this is analogous to calling\n * `mergeStyles` for each property in the object, but ensures we maintain the\n * set ordering when multiple style sets are merged.\n *\n * @param styleSets - One or more style sets to be merged.\n */\nexport function mergeStyleSets(...styleSets: Array): IProcessedStyleSet;\n\n/**\n * Takes in one or more style set objects, each consisting of a set of areas,\n * each which will produce a class name. Using this is analogous to calling\n * `mergeStyles` for each property in the object, but ensures we maintain the\n * set ordering when multiple style sets are merged.\n *\n * @param styleSets - One or more style sets to be merged.\n */\nexport function mergeStyleSets(...styleSets: Array): IProcessedStyleSet {\n return mergeCssSets(styleSets as any, getStyleOptions());\n}\n\n/**\n * Takes in one or more style set objects, each1consisting of a set of areas,\n * each which will produce a class name. Using this is analogous to calling\n * `mergeCss` for each property in the object, but ensures we maintain the\n * set ordering when multiple style sets are merged.\n *\n * @param styleSets - One or more style sets to be merged.\n * @param options - (optional) Options to use when creating rules.\n */\nexport function mergeCssSets(\n styleSets: [TStyleSet | false | null | undefined],\n options?: IStyleOptions,\n): IProcessedStyleSet;\n\n/**\n * Takes in one or more style set objects, each1consisting of a set of areas,\n * each which will produce a class name. Using this is analogous to calling\n * `mergeCss` for each property in the object, but ensures we maintain the\n * set ordering when multiple style sets are merged.\n *\n * @param styleSets - One or more style sets to be merged.\n * @param options - (optional) Options to use when creating rules.\n */\nexport function mergeCssSets(\n styleSets: [TStyleSet1 | false | null | undefined, TStyleSet2 | false | null | undefined],\n options?: IStyleOptions,\n): IProcessedStyleSet;\n\n/**\n * Takes in one or more style set objects, each1consisting of a set of areas,\n * each which will produce a class name. Using this is analogous to calling\n * `mergeCss` for each property in the object, but ensures we maintain the\n * set ordering when multiple style sets are merged.\n *\n * @param styleSets - One or more style sets to be merged.\n * @param options - (optional) Options to use when creating rules.\n */\nexport function mergeCssSets(\n styleSets: [\n TStyleSet1 | false | null | undefined,\n TStyleSet2 | false | null | undefined,\n TStyleSet3 | false | null | undefined,\n ],\n options?: IStyleOptions,\n): IProcessedStyleSet;\n\n/**\n * Takes in one or more style set objects, each1consisting of a set of areas,\n * each which will produce a class name. Using this is analogous to calling\n * `mergeCss` for each property in the object, but ensures we maintain the\n * set ordering when multiple style sets are merged.\n *\n * @param styleSets - One or more style sets to be merged.\n * @param options - (optional) Options to use when creating rules.\n */\nexport function mergeCssSets(\n styleSets: [\n TStyleSet1 | false | null | undefined,\n TStyleSet2 | false | null | undefined,\n TStyleSet3 | false | null | undefined,\n TStyleSet4 | false | null | undefined,\n ],\n options?: IStyleOptions,\n): IProcessedStyleSet<\n ObjectOnly & ObjectOnly & ObjectOnly & ObjectOnly\n>;\n\n/**\n * Takes in one or more style set objects, each1consisting of a set of areas,\n * each which will produce a class name. Using this is analogous to calling\n * `mergeCss` for each property in the object, but ensures we maintain the\n * set ordering when multiple style sets are merged.\n *\n * @param styleSets - One or more style sets to be merged.\n * @param options - (optional) Options to use when creating rules.\n */\nexport function mergeCssSets(\n styleSet: [TStyleSet | false | null | undefined],\n options?: IStyleOptions,\n): IProcessedStyleSet;\n\n/**\n * Takes in one or more style set objects, each1consisting of a set of areas,\n * each which will produce a class name. Using this is analogous to calling\n * `mergeCss` for each property in the object, but ensures the\n * set ordering when multiple style sets are merged.\n *\n * @param styleSets - One or more style sets to be merged.\n * @param options - (optional) Options to use when creating rules.\n */\nexport function mergeCssSets(\n styleSets: Array,\n options?: IStyleOptions,\n): IProcessedStyleSet {\n const classNameSet: IProcessedStyleSet = { subComponentStyles: {} };\n\n const styleSet = styleSets[0];\n\n if (!styleSet && styleSets.length <= 1) {\n return { subComponentStyles: {} } as any;\n }\n\n const concatenatedStyleSet = concatStyleSets(...styleSets);\n\n const registrations = [];\n\n for (const styleSetArea in concatenatedStyleSet) {\n if (concatenatedStyleSet.hasOwnProperty(styleSetArea)) {\n if (styleSetArea === 'subComponentStyles') {\n classNameSet.subComponentStyles = (concatenatedStyleSet as IConcatenatedStyleSet).subComponentStyles || {};\n continue;\n }\n\n const styles: IStyle = (concatenatedStyleSet as any)[styleSetArea];\n\n const { classes, objects } = extractStyleParts(styles);\n\n if (objects?.length) {\n const registration = styleToRegistration(options || {}, { displayName: styleSetArea }, objects);\n\n if (registration) {\n registrations.push(registration);\n // FIXME: classNameSet invalid types - exposed in TS 4.5 - cast needed\n (classNameSet as Record)[styleSetArea] = classes.concat([registration.className]).join(' ');\n }\n } else {\n // FIXME: classNameSet invalid types - exposed in TS 4.5 - cast needed\n (classNameSet as Record)[styleSetArea] = classes.join(' ');\n }\n }\n }\n\n for (const registration of registrations) {\n if (registration) {\n applyRegistration(registration, options?.specificityMultiplier);\n }\n }\n\n return classNameSet as any;\n}\n","// A packages cache that makes sure that we don't inject the same packageName twice in the same bundle -\n// this cache is local to the module closure inside this bundle\nconst packagesCache: { [name: string]: string } = {};\n\n// Cache access to window to avoid IE11 memory leak.\nlet _win: Window | undefined = undefined;\n\ntry {\n _win = window;\n} catch (e) {\n /* no-op */\n}\n\nexport function setVersion(packageName: string, packageVersion: string): void {\n if (typeof _win !== 'undefined') {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const packages = ((_win as any).__packages__ = (_win as any).__packages__ || {});\n\n // We allow either the global packages or local packages caches to invalidate so testing can\n // just clear the global to set this state\n if (!packages[packageName] || !packagesCache[packageName]) {\n packagesCache[packageName] = packageVersion;\n const versions = (packages[packageName] = packages[packageName] || []);\n versions.push(packageVersion);\n }\n }\n}\n","import { setVersion } from './setVersion';\nexport { setVersion };\n\nsetVersion('@fluentui/set-version', '6.0.0');\n","// Do not modify this file; it is generated as part of publish.\n// The checked in version is a placeholder only and will not be updated.\nimport { setVersion } from '@fluentui/set-version';\nsetVersion('@fluentui/style-utilities', '8.9.14');","export * from './classNames/index';\nexport * from './styles/index';\nexport * from './utilities/index';\nexport * from './interfaces/index';\nexport * from './MergeStyles';\nexport * from './cdn';\n\nimport './version';\n\n// Ensure theme is initialized when this package is referenced.\nimport { initializeThemeInCustomizations } from './styles/theme';\ninitializeThemeInCustomizations();\n","import * as React from 'react';\nimport type { ICustomizations } from './Customizations';\n\nexport interface ICustomizerContext {\n customizations: ICustomizations;\n}\n\nexport const CustomizerContext = React.createContext({\n customizations: {\n inCustomizerContext: false,\n settings: {},\n scopedSettings: {},\n },\n});\n","import * as React from 'react';\nimport { concatStyleSets, IStyleSet, ITheme } from '@fluentui/style-utilities';\nimport { Customizations, CustomizerContext, ICustomizerContext } from '@fluentui/utilities';\nimport { createFactory } from './slots';\nimport { assign } from './utilities';\n\nimport {\n IComponentOptions,\n ICustomizationProps,\n IStyleableComponentProps,\n IStylesFunctionOrObject,\n IToken,\n ITokenFunction,\n IViewComponent,\n} from './IComponent';\nimport { IDefaultSlotProps, ISlotCreator, ValidProps } from './ISlots';\n\n/**\n * Assembles a higher order component based on the following: styles, theme, view, and state.\n * Imposes a separation of concern and centralizes styling processing to increase ease of use and robustness\n * in how components use and apply styling and theming.\n *\n * Automatically merges and applies themes and styles with theme / styleprops having the highest priority.\n * State component, if provided, is passed in props for processing. Props from state / user are automatically processed\n * and styled before finally being passed to view.\n *\n * State components should contain all stateful behavior and should not generate any JSX, but rather simply call\n * the view prop.\n *\n * Views should simply be stateless pure functions that receive all props needed for rendering their output.\n *\n * State component is optional. If state is not provided, created component is essentially a functional\n * stateless component.\n *\n * @param options - component Component options. See IComponentOptions for more detail.\n */\nexport function createComponent<\n TComponentProps extends ValidProps,\n TTokens,\n TStyleSet extends IStyleSet,\n TViewProps extends TComponentProps = TComponentProps,\n TStatics = {},\n>(\n view: IViewComponent,\n options: IComponentOptions = {},\n): React.FunctionComponent & TStatics {\n const { factoryOptions = {} } = options;\n const { defaultProp } = factoryOptions;\n\n const ResultComponent: React.FunctionComponent = (\n componentProps: TComponentProps & IStyleableComponentProps,\n ) => {\n const settings: ICustomizationProps = _getCustomizations(\n options.displayName,\n React.useContext(CustomizerContext),\n options.fields,\n );\n\n const stateReducer = options.state;\n\n if (stateReducer) {\n // Don't assume state will return all props, so spread useState result over component props.\n componentProps = {\n ...componentProps,\n ...stateReducer(componentProps),\n };\n }\n\n const theme = componentProps.theme || settings.theme;\n\n const tokens = _resolveTokens(componentProps, theme, options.tokens, settings.tokens, componentProps.tokens);\n const styles = _resolveStyles(\n componentProps,\n theme,\n tokens,\n options.styles,\n settings.styles,\n componentProps.styles,\n );\n\n const viewProps = {\n ...componentProps,\n styles,\n tokens,\n _defaultStyles: styles,\n theme,\n } as unknown as TViewProps & IDefaultSlotProps;\n\n return view(viewProps);\n };\n\n ResultComponent.displayName = options.displayName || view.name;\n\n // If a shorthand prop is defined, create a factory for the component.\n // TODO: This shouldn't be a concern of createComponent.. factoryOptions should just be forwarded.\n // Need to weigh creating default factories on component creation vs. memoizing them on use in slots.tsx.\n if (defaultProp) {\n (ResultComponent as ISlotCreator).create = createFactory(ResultComponent, { defaultProp });\n }\n\n assign(ResultComponent, options.statics);\n\n // Later versions of TypeSript should allow us to merge objects in a type safe way and avoid this cast.\n return ResultComponent as React.FunctionComponent & TStatics;\n}\n\n/**\n * Resolve all styles functions with both props and tokens and flatten results along with all styles objects.\n */\nfunction _resolveStyles>(\n props: TProps,\n theme: ITheme,\n tokens: TTokens,\n ...allStyles: (IStylesFunctionOrObject | undefined)[]\n): ReturnType {\n return concatStyleSets(\n ...allStyles.map((styles: IStylesFunctionOrObject | undefined) =>\n typeof styles === 'function' ? styles(props, theme, tokens) : styles,\n ),\n );\n}\n\n/**\n * Resolve all tokens functions with props flatten results along with all tokens objects.\n */\nfunction _resolveTokens(\n props: TViewProps,\n theme: ITheme,\n ...allTokens: (IToken | false | null | undefined)[]\n): TTokens {\n const tokens = {};\n\n for (let currentTokens of allTokens) {\n if (currentTokens) {\n // TODO: why is this cast needed? TS seems to think there is a (TToken | Function) union from somewhere.\n currentTokens =\n typeof currentTokens === 'function'\n ? (currentTokens as ITokenFunction)(props, theme)\n : currentTokens;\n\n if (Array.isArray(currentTokens)) {\n currentTokens = _resolveTokens(props, theme, ...currentTokens);\n }\n\n assign(tokens, currentTokens);\n }\n }\n\n return tokens as TTokens;\n}\n\n/**\n * Helper function for calling Customizations.getSettings falling back to default fields.\n *\n * @param displayName Displayable name for component.\n * @param context React context passed to component containing contextual settings.\n * @param fields Optional list of properties to grab from global store and context.\n */\nfunction _getCustomizations>(\n displayName: string | undefined,\n context: ICustomizerContext,\n fields?: string[],\n): ICustomizationProps {\n // TODO: do we want field props? should fields be part of IComponent and used here?\n // TODO: should we centrally define DefaultFields? (not exported from styling)\n // TODO: tie this array to ICustomizationProps, such that each array element is keyof ICustomizationProps\n const DefaultFields = ['theme', 'styles', 'tokens'];\n return Customizations.getSettings(fields || DefaultFields, displayName, context.customizations);\n}\n","const toObjectMap = (...items: (string[] | Record)[]) => {\n const result: Record = {};\n\n for (const item of items) {\n const keys = Array.isArray(item) ? item : Object.keys(item);\n\n for (const key of keys) {\n result[key] = 1;\n }\n }\n\n return result;\n};\n\n/**\n * An array of events that are allowed on every html element type.\n *\n * @public\n */\nexport const baseElementEvents = toObjectMap([\n 'onCopy',\n 'onCut',\n 'onPaste',\n 'onCompositionEnd',\n 'onCompositionStart',\n 'onCompositionUpdate',\n 'onFocus',\n 'onFocusCapture',\n 'onBlur',\n 'onBlurCapture',\n 'onChange',\n 'onInput',\n 'onSubmit',\n 'onLoad',\n 'onError',\n 'onKeyDown',\n 'onKeyDownCapture',\n 'onKeyPress',\n 'onKeyUp',\n 'onAbort',\n 'onCanPlay',\n 'onCanPlayThrough',\n 'onDurationChange',\n 'onEmptied',\n 'onEncrypted',\n 'onEnded',\n 'onLoadedData',\n 'onLoadedMetadata',\n 'onLoadStart',\n 'onPause',\n 'onPlay',\n 'onPlaying',\n 'onProgress',\n 'onRateChange',\n 'onSeeked',\n 'onSeeking',\n 'onStalled',\n 'onSuspend',\n 'onTimeUpdate',\n 'onVolumeChange',\n 'onWaiting',\n 'onClick',\n 'onClickCapture',\n 'onContextMenu',\n 'onDoubleClick',\n 'onDrag',\n 'onDragEnd',\n 'onDragEnter',\n 'onDragExit',\n 'onDragLeave',\n 'onDragOver',\n 'onDragStart',\n 'onDrop',\n 'onMouseDown',\n 'onMouseDownCapture',\n 'onMouseEnter',\n 'onMouseLeave',\n 'onMouseMove',\n 'onMouseOut',\n 'onMouseOver',\n 'onMouseUp',\n 'onMouseUpCapture',\n 'onSelect',\n 'onTouchCancel',\n 'onTouchEnd',\n 'onTouchMove',\n 'onTouchStart',\n 'onScroll',\n 'onWheel',\n 'onPointerCancel',\n 'onPointerDown',\n 'onPointerEnter',\n 'onPointerLeave',\n 'onPointerMove',\n 'onPointerOut',\n 'onPointerOver',\n 'onPointerUp',\n 'onGotPointerCapture',\n 'onLostPointerCapture',\n]);\n\n/**\n * An array of element attributes which are allowed on every html element type.\n *\n * @public\n */\nexport const baseElementProperties = toObjectMap([\n 'accessKey', // global\n 'children', // global\n 'className', // global\n 'contentEditable', // global\n 'dir', // global\n 'draggable', // global\n 'hidden', // global\n 'htmlFor', // global\n 'id', // global\n 'lang', // global\n 'ref', // global\n 'role', // global\n 'style', // global\n 'tabIndex', // global\n 'title', // global\n 'translate', // global\n 'spellCheck', // global\n 'name', // global\n]);\n\n/**\n * An array of HTML element properties and events.\n *\n * @public\n */\nexport const htmlElementProperties = toObjectMap(baseElementProperties, baseElementEvents);\n\n/**\n * An array of LABEL tag properties and events.\n *\n * @public\n */\nexport const labelProperties = toObjectMap(htmlElementProperties, [\n 'form', // button, fieldset, input, label, meter, object, output, select, textarea\n]);\n\n/**\n * An array of AUDIO tag properties and events.\n\n * @public\n */\nexport const audioProperties = toObjectMap(htmlElementProperties, [\n 'height', // canvas, embed, iframe, img, input, object, video\n 'loop', // audio, video\n 'muted', // audio, video\n 'preload', // audio, video\n 'src', // audio, embed, iframe, img, input, script, source, track, video\n 'width', // canvas, embed, iframe, img, input, object, video\n]);\n\n/**\n * An array of VIDEO tag properties and events.\n *\n * @public\n */\nexport const videoProperties = toObjectMap(audioProperties, [\n 'poster', // video\n]);\n\n/**\n * An array of OL tag properties and events.\n *\n * @public\n */\nexport const olProperties = toObjectMap(htmlElementProperties, [\n 'start', // ol\n]);\n\n/**\n * An array of LI tag properties and events.\n *\n * @public\n */\nexport const liProperties = toObjectMap(htmlElementProperties, [\n 'value', // button, input, li, option, meter, progress, param\n]);\n\n/**\n * An array of A tag properties and events.\n *\n * @public\n */\nexport const anchorProperties = toObjectMap(htmlElementProperties, [\n 'download', // a, area\n 'href', // a, area, base, link\n 'hrefLang', // a, area, link\n 'media', // a, area, link, source, style\n 'rel', // a, area, link\n 'target', // a, area, base, form\n 'type', // a, button, input, link, menu, object, script, source, style\n]);\n\n/**\n * An array of BUTTON tag properties and events.\n *\n * @public\n */\nexport const buttonProperties = toObjectMap(htmlElementProperties, [\n 'autoFocus', // button, input, select, textarea\n 'disabled', // button, fieldset, input, optgroup, option, select, textarea\n 'form', // button, fieldset, input, label, meter, object, output, select, textarea\n 'formAction', // input, button\n 'formEncType', // input, button\n 'formMethod', // input, button\n 'formNoValidate', // input, button\n 'formTarget', // input, button\n 'type', // a, button, input, link, menu, object, script, source, style\n 'value', // button, input, li, option, meter, progress, param,\n]);\n\n/**\n * An array of INPUT tag properties and events.\n *\n * @public\n */\nexport const inputProperties = toObjectMap(buttonProperties, [\n 'accept', // input\n 'alt', // area, img, input\n 'autoCapitalize', // input, textarea\n 'autoComplete', // form, input\n 'checked', // input\n 'dirname', // input, textarea\n 'form', // button, fieldset, input, label, meter, object, output, select, textarea\n 'height', // canvas, embed, iframe, img, input, object, video\n 'inputMode', // input\n 'list', // input\n 'max', // input, meter\n 'maxLength', // input, textarea\n 'min', // input, meter\n 'minLength', // input, textarea\n 'multiple', // input, select\n 'pattern', // input\n 'placeholder', // input, textarea\n 'readOnly', // input, textarea\n 'required', // input, select, textarea\n 'src', // audio, embed, iframe, img, input, script, source, track, video\n 'step', // input\n 'size', // input\n 'type', // a, button, input, link, menu, object, script, source, style\n 'value', // button, input, li, option, meter, progress, param\n 'width', // canvas, embed, iframe, img, input, object, video\n]);\n\n/**\n * An array of TEXTAREA tag properties and events.\n *\n * @public\n */\nexport const textAreaProperties = toObjectMap(buttonProperties, [\n 'autoCapitalize', // input, textarea\n 'cols', // textarea\n 'dirname', // input, textarea\n 'form', // button, fieldset, input, label, meter, object, output, select, textarea\n 'maxLength', // input, textarea\n 'minLength', // input, textarea\n 'placeholder', // input, textarea\n 'readOnly', // input, textarea\n 'required', // input, select, textarea\n 'rows', // textarea\n 'wrap', // textarea\n]);\n\n/**\n * An array of SELECT tag properties and events.\n *\n * @public\n */\nexport const selectProperties = toObjectMap(buttonProperties, [\n 'form', // button, fieldset, input, label, meter, object, output, select, textarea\n 'multiple', // input, select\n 'required', // input, select, textarea\n]);\n\nexport const optionProperties = toObjectMap(htmlElementProperties, [\n 'selected', // option\n 'value', // button, input, li, option, meter, progress, param\n]);\n\n/**\n * An array of TABLE tag properties and events.\n *\n * @public\n */\nexport const tableProperties = toObjectMap(htmlElementProperties, [\n 'cellPadding', // table\n 'cellSpacing', // table\n]);\n\n/**\n * An array of TR tag properties and events.\n *\n * @public\n */\nexport const trProperties = htmlElementProperties;\n\n/**\n * An array of TH tag properties and events.\n *\n * @public\n */\nexport const thProperties = toObjectMap(htmlElementProperties, [\n 'rowSpan', // td, th\n 'scope', // th\n]);\n\n/**\n * An array of TD tag properties and events.\n *\n * @public\n */\nexport const tdProperties = toObjectMap(htmlElementProperties, [\n 'colSpan', // td\n 'headers', // td\n 'rowSpan', // td, th\n 'scope', // th\n]);\n\nexport const colGroupProperties = toObjectMap(htmlElementProperties, [\n 'span', // col, colgroup\n]);\n\nexport const colProperties = toObjectMap(htmlElementProperties, [\n 'span', // col, colgroup\n]);\n\n/**\n * An array of FORM tag properties and events.\n *\n * @public\n */\nexport const formProperties = toObjectMap(htmlElementProperties, [\n 'acceptCharset', // form\n 'action', // form\n 'encType', // form\n 'encType', // form\n 'method', // form\n 'noValidate', // form\n 'target', // form\n]);\n\n/**\n * An array of IFRAME tag properties and events.\n *\n * @public\n */\nexport const iframeProperties = toObjectMap(htmlElementProperties, [\n 'allow', // iframe\n 'allowFullScreen', // iframe\n 'allowPaymentRequest', // iframe\n 'allowTransparency', // iframe\n 'csp', // iframe\n 'height', // canvas, embed, iframe, img, input, object, video\n 'importance', // iframe\n 'referrerPolicy', // iframe\n 'sandbox', // iframe\n 'src', // audio, embed, iframe, img, input, script, source, track, video\n 'srcDoc', // iframe\n 'width', // canvas, embed, iframe, img, input, object, video,\n]);\n\n/**\n * An array of IMAGE tag properties and events.\n *\n * @public\n */\nexport const imgProperties = toObjectMap(htmlElementProperties, [\n 'alt', // area, img, input\n 'crossOrigin', // img\n 'height', // canvas, embed, iframe, img, input, object, video\n 'src', // audio, embed, iframe, img, input, script, source, track, video\n 'srcSet', // img, source\n 'useMap', // img, object,\n 'width', // canvas, embed, iframe, img, input, object, video\n]);\n\n/**\n * @deprecated Use imgProperties for img elements.\n */\nexport const imageProperties = imgProperties;\n\n/**\n * An array of DIV tag properties and events.\n *\n * @public\n */\nexport const divProperties = htmlElementProperties;\n\n/**\n * Gets native supported props for an html element provided the allowance set. Use one of the property\n * sets defined (divProperties, buttonPropertes, etc) to filter out supported properties from a given\n * props set. Note that all data- and aria- prefixed attributes will be allowed.\n * NOTE: getNativeProps should always be applied first when adding props to a react component. The\n * non-native props should be applied second. This will prevent getNativeProps from overriding your custom props.\n * For example, if props passed to getNativeProps has an onClick function and getNativeProps is added to\n * the component after an onClick function is added, then the getNativeProps onClick will override it.\n *\n * @public\n * @param props - The unfiltered input props\n * @param allowedPropsNames - The array or record of allowed prop names.\n * @returns The filtered props\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function getNativeProps>(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n props: Record,\n allowedPropNames: string[] | Record,\n excludedPropNames?: string[],\n): T {\n // It'd be great to properly type this while allowing 'aria-` and 'data-' attributes like TypeScript does for\n // JSX attributes, but that ability is hardcoded into the TS compiler with no analog in TypeScript typings.\n // Then we'd be able to enforce props extends native props (including aria- and data- attributes), and then\n // return native props.\n // We should be able to do this once this PR is merged: https://github.com/microsoft/TypeScript/pull/26797\n\n const isArray = Array.isArray(allowedPropNames);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const result: Record = {};\n const keys = Object.keys(props);\n\n for (const key of keys) {\n const isNativeProp =\n (!isArray && (allowedPropNames as Record)[key]) ||\n (isArray && (allowedPropNames as string[]).indexOf(key) >= 0) ||\n key.indexOf('data-') === 0 ||\n key.indexOf('aria-') === 0;\n\n if (isNativeProp && (!excludedPropNames || excludedPropNames?.indexOf(key) === -1)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n result[key] = props![key] as any;\n }\n }\n\n return result as T;\n}\n","/**\n * Dictionary of booleans.\n *\n * @internal\n */\nexport interface IDictionary {\n [className: string]: boolean;\n}\n\n/**\n * Serializable object.\n *\n * @internal\n */\nexport interface ISerializableObject {\n toString?: () => string;\n}\n\n/**\n * css input type.\n *\n * @internal\n */\nexport type ICssInput = string | ISerializableObject | IDictionary | null | undefined | boolean;\n\n/**\n * Concatination helper, which can merge class names together. Skips over falsey values.\n *\n * @public\n */\nexport function css(...args: ICssInput[]): string {\n let classes = [];\n\n for (let arg of args) {\n if (arg) {\n if (typeof arg === 'string') {\n classes.push(arg);\n } else if (arg.hasOwnProperty('toString') && typeof arg.toString === 'function') {\n classes.push(arg.toString());\n } else {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n for (let key in arg as any) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if ((arg as any)[key]) {\n classes.push(key);\n }\n }\n }\n }\n }\n\n return classes.join(' ');\n}\n","import { getGlobalClassNames } from '../../../Styling';\nimport type { IStackItemComponent, IStackItemStyles, IStackItemStylesReturnType } from './StackItem.types';\n\nexport const GlobalClassNames = {\n root: 'ms-StackItem',\n};\n\nconst alignMap: { [key: string]: string } = {\n start: 'flex-start',\n end: 'flex-end',\n};\n\nexport const StackItemStyles: IStackItemComponent['styles'] = (props, theme, tokens): IStackItemStylesReturnType => {\n const { grow, shrink, disableShrink, align, verticalFill, order, className, basis = 'auto' } = props;\n\n const classNames = getGlobalClassNames(GlobalClassNames, theme);\n\n return {\n root: [\n theme.fonts.medium,\n classNames.root,\n {\n flexBasis: basis,\n margin: tokens.margin,\n padding: tokens.padding,\n height: verticalFill ? '100%' : 'auto',\n width: 'auto',\n },\n grow && {\n flexGrow: grow === true ? 1 : grow,\n },\n (disableShrink || (!grow && !shrink)) && {\n flexShrink: 0,\n },\n shrink &&\n !disableShrink && {\n flexShrink: 1,\n },\n align && {\n alignSelf: alignMap[align] || align,\n },\n order && {\n order,\n },\n className,\n ],\n // TODO: this cast may be hiding some potential issues with styling and name\n // lookups and should be removed\n } as IStackItemStyles;\n};\n","import type { ITheme } from '../../Styling';\nimport type { IStackProps } from './Stack.types';\n\n// Helper function that converts a themed spacing key (if given) to the corresponding themed spacing value.\nconst _getThemedSpacing = (space: string, theme: ITheme): string => {\n if (theme.spacing.hasOwnProperty(space)) {\n return theme.spacing[space as keyof typeof theme.spacing];\n }\n return space;\n};\n\n// Helper function that takes a gap as a string and converts it into a { value, unit } representation.\nconst _getValueUnitGap = (gap: string): { value: number; unit: string } => {\n const numericalPart = parseFloat(gap);\n const numericalValue = isNaN(numericalPart) ? 0 : numericalPart;\n const numericalString = isNaN(numericalPart) ? '' : numericalPart.toString();\n\n const unitPart = gap.substring(numericalString.toString().length);\n\n return {\n value: numericalValue,\n unit: unitPart || 'px',\n };\n};\n\n/**\n * Takes in a gap size in either a CSS-style format (e.g. 10 or \"10px\")\n * or a key of a themed spacing value (e.g. \"s1\").\n * Returns the separate numerical value of the padding (e.g. 10)\n * and the CSS unit (e.g. \"px\").\n */\nexport const parseGap = (\n gap: IStackProps['gap'],\n theme: ITheme,\n): { rowGap: { value: number; unit: string }; columnGap: { value: number; unit: string } } => {\n if (gap === undefined || gap === '') {\n return {\n rowGap: {\n value: 0,\n unit: 'px',\n },\n columnGap: {\n value: 0,\n unit: 'px',\n },\n };\n }\n\n if (typeof gap === 'number') {\n return {\n rowGap: {\n value: gap,\n unit: 'px',\n },\n columnGap: {\n value: gap,\n unit: 'px',\n },\n };\n }\n\n const splitGap = gap.split(' ');\n\n // If the array has more than two values, then return 0px.\n if (splitGap.length > 2) {\n return {\n rowGap: {\n value: 0,\n unit: 'px',\n },\n columnGap: {\n value: 0,\n unit: 'px',\n },\n };\n }\n\n // If the array has two values, then parse each one.\n if (splitGap.length === 2) {\n return {\n rowGap: _getValueUnitGap(_getThemedSpacing(splitGap[0], theme)),\n columnGap: _getValueUnitGap(_getThemedSpacing(splitGap[1], theme)),\n };\n }\n\n // Else, parse the numerical value and pass it as both the vertical and horizontal gap.\n const calculatedGap = _getValueUnitGap(_getThemedSpacing(gap, theme));\n\n return {\n rowGap: calculatedGap,\n columnGap: calculatedGap,\n };\n};\n\n/**\n * Takes in a padding in a CSS-style format (e.g. 10, \"10px\", \"10px 10px\", etc.)\n * where the separate padding values can also be the key of a themed spacing value\n * (e.g. \"s1 m\", \"10px l1 20px l2\", etc.).\n * Returns a CSS-style padding.\n */\nexport const parsePadding = (padding: number | string | undefined, theme: ITheme): number | string | undefined => {\n if (padding === undefined || typeof padding === 'number' || padding === '') {\n return padding;\n }\n\n const paddingValues = padding.split(' ');\n if (paddingValues.length < 2) {\n return _getThemedSpacing(padding, theme);\n }\n\n return paddingValues.reduce((padding1: string, padding2: string) => {\n return _getThemedSpacing(padding1, theme) + ' ' + _getThemedSpacing(padding2, theme);\n });\n};\n","import { getGlobalClassNames } from '../../Styling';\nimport { GlobalClassNames as StackItemGlobalClassNames } from './StackItem/StackItem.styles';\nimport { parseGap, parsePadding } from './StackUtils';\nimport type { IStackComponent, IStackStyles, IStackStylesReturnType } from './Stack.types';\n\nconst nameMap: { [key: string]: string } = {\n start: 'flex-start',\n end: 'flex-end',\n};\n\nexport const GlobalClassNames = {\n root: 'ms-Stack',\n inner: 'ms-Stack-inner',\n child: 'ms-Stack-child',\n};\n\nexport const styles: IStackComponent['styles'] = (props, theme, tokens): IStackStylesReturnType => {\n const {\n className,\n disableShrink,\n enableScopedSelectors,\n grow,\n horizontal,\n horizontalAlign,\n reversed,\n verticalAlign,\n verticalFill,\n wrap,\n } = props;\n\n const classNames = getGlobalClassNames(GlobalClassNames, theme);\n\n /* eslint-disable deprecation/deprecation */\n const childrenGap = tokens && tokens.childrenGap ? tokens.childrenGap : props.gap;\n const maxHeight = tokens && tokens.maxHeight ? tokens.maxHeight : props.maxHeight;\n const maxWidth = tokens && tokens.maxWidth ? tokens.maxWidth : props.maxWidth;\n const padding = tokens && tokens.padding ? tokens.padding : props.padding;\n /* eslint-enable deprecation/deprecation */\n\n const { rowGap, columnGap } = parseGap(childrenGap, theme);\n\n const horizontalMargin = `${-0.5 * columnGap.value}${columnGap.unit}`;\n const verticalMargin = `${-0.5 * rowGap.value}${rowGap.unit}`;\n\n // styles to be applied to all direct children regardless of wrap or direction\n const childStyles = {\n textOverflow: 'ellipsis',\n };\n\n const childSelector = '> ' + (enableScopedSelectors ? '.' + GlobalClassNames.child : '*');\n\n const disableShrinkStyles = {\n // flexShrink styles are applied by the StackItem\n [`${childSelector}:not(.${StackItemGlobalClassNames.root})`]: {\n flexShrink: 0,\n },\n };\n\n if (wrap) {\n return {\n root: [\n classNames.root,\n {\n flexWrap: 'wrap',\n maxWidth,\n maxHeight,\n width: 'auto',\n overflow: 'visible',\n height: '100%',\n },\n horizontalAlign && {\n [horizontal ? 'justifyContent' : 'alignItems']: nameMap[horizontalAlign] || horizontalAlign,\n },\n verticalAlign && {\n [horizontal ? 'alignItems' : 'justifyContent']: nameMap[verticalAlign] || verticalAlign,\n },\n className,\n {\n // not allowed to be overridden by className\n // since this is necessary in order to prevent collapsing margins\n display: 'flex',\n },\n horizontal && {\n height: verticalFill ? '100%' : 'auto',\n },\n ],\n\n inner: [\n classNames.inner,\n {\n display: 'flex',\n flexWrap: 'wrap',\n marginLeft: horizontalMargin,\n marginRight: horizontalMargin,\n marginTop: verticalMargin,\n marginBottom: verticalMargin,\n overflow: 'visible',\n boxSizing: 'border-box',\n padding: parsePadding(padding, theme),\n // avoid unnecessary calc() calls if horizontal gap is 0\n width: columnGap.value === 0 ? '100%' : `calc(100% + ${columnGap.value}${columnGap.unit})`,\n maxWidth: '100vw',\n\n [childSelector]: {\n margin: `${0.5 * rowGap.value}${rowGap.unit} ${0.5 * columnGap.value}${columnGap.unit}`,\n\n ...childStyles,\n },\n },\n disableShrink && disableShrinkStyles,\n horizontalAlign && {\n [horizontal ? 'justifyContent' : 'alignItems']: nameMap[horizontalAlign] || horizontalAlign,\n },\n verticalAlign && {\n [horizontal ? 'alignItems' : 'justifyContent']: nameMap[verticalAlign] || verticalAlign,\n },\n horizontal && {\n flexDirection: reversed ? 'row-reverse' : 'row',\n\n // avoid unnecessary calc() calls if vertical gap is 0\n height: rowGap.value === 0 ? '100%' : `calc(100% + ${rowGap.value}${rowGap.unit})`,\n\n [childSelector]: {\n maxWidth: columnGap.value === 0 ? '100%' : `calc(100% - ${columnGap.value}${columnGap.unit})`,\n },\n },\n !horizontal && {\n flexDirection: reversed ? 'column-reverse' : 'column',\n height: `calc(100% + ${rowGap.value}${rowGap.unit})`,\n\n [childSelector]: {\n maxHeight: rowGap.value === 0 ? '100%' : `calc(100% - ${rowGap.value}${rowGap.unit})`,\n },\n },\n ],\n } as IStackStyles;\n }\n\n return {\n root: [\n classNames.root,\n {\n display: 'flex',\n flexDirection: horizontal ? (reversed ? 'row-reverse' : 'row') : reversed ? 'column-reverse' : 'column',\n flexWrap: 'nowrap',\n width: 'auto',\n height: verticalFill ? '100%' : 'auto',\n maxWidth,\n maxHeight,\n padding: parsePadding(padding, theme),\n boxSizing: 'border-box',\n\n [childSelector]: childStyles,\n },\n disableShrink && disableShrinkStyles,\n grow && {\n flexGrow: grow === true ? 1 : grow,\n },\n\n horizontalAlign && {\n [horizontal ? 'justifyContent' : 'alignItems']: nameMap[horizontalAlign] || horizontalAlign,\n },\n verticalAlign && {\n [horizontal ? 'alignItems' : 'justifyContent']: nameMap[verticalAlign] || verticalAlign,\n },\n horizontal &&\n columnGap.value > 0 && {\n // apply gap margin to every direct child except the first direct child if the direction is not reversed,\n // and the last direct one if it is\n [reversed ? `${childSelector}:not(:last-child)` : `${childSelector}:not(:first-child)`]: {\n marginLeft: `${columnGap.value}${columnGap.unit}`,\n },\n },\n !horizontal &&\n rowGap.value > 0 && {\n // apply gap margin to every direct child except the first direct child if the direction is not reversed,\n // and the last direct one if it is\n [reversed ? `${childSelector}:not(:last-child)` : `${childSelector}:not(:first-child)`]: {\n marginTop: `${rowGap.value}${rowGap.unit}`,\n },\n },\n className,\n ],\n // TODO: this cast may be hiding some potential issues with styling and name\n // lookups and should be removed\n } as IStackStyles;\n};\n","/** @jsxRuntime classic */\n/** @jsx withSlots */\nimport * as React from 'react';\nimport { withSlots, createComponent, getSlots } from '@fluentui/foundation-legacy';\nimport { getNativeProps, htmlElementProperties } from '../../../Utilities';\nimport { StackItemStyles as styles } from './StackItem.styles';\nimport type { IStackItemComponent, IStackItemProps, IStackItemSlots } from './StackItem.types';\n\nconst StackItemView: IStackItemComponent['view'] = props => {\n const { children } = props;\n const nativeProps = getNativeProps>(props, htmlElementProperties);\n // eslint-disable-next-line eqeqeq\n if (children == null) {\n return null;\n }\n\n const Slots = getSlots(props, {\n root: 'div',\n });\n\n return {children};\n};\n\nexport const StackItem: React.FunctionComponent = createComponent(StackItemView, {\n displayName: 'StackItem',\n styles,\n});\n\nexport default StackItem;\n","/** @jsxRuntime classic */\n/** @jsx withSlots */\nimport * as React from 'react';\nimport { withSlots, createComponent, getSlots } from '@fluentui/foundation-legacy';\nimport { css, getNativeProps, htmlElementProperties, warnDeprecations } from '../../Utilities';\nimport { styles, GlobalClassNames as StackGlobalClassNames } from './Stack.styles';\nimport { StackItem } from './StackItem/StackItem';\nimport type { IStackComponent, IStackProps, IStackSlots } from './Stack.types';\nimport type { IStackItemProps } from './StackItem/StackItem.types';\n\nconst StackView: IStackComponent['view'] = props => {\n const { as: RootType = 'div', disableShrink = false, enableScopedSelectors = false, wrap, ...rest } = props;\n\n warnDeprecations('Stack', props, {\n gap: 'tokens.childrenGap',\n maxHeight: 'tokens.maxHeight',\n maxWidth: 'tokens.maxWidth',\n padding: 'tokens.padding',\n });\n\n const stackChildren = _processStackChildren(props.children, { disableShrink, enableScopedSelectors });\n\n const nativeProps = getNativeProps>(rest, htmlElementProperties);\n\n const Slots = getSlots(props, {\n root: RootType,\n inner: 'div',\n });\n\n if (wrap) {\n return (\n \n {stackChildren}\n \n );\n }\n\n return {stackChildren};\n};\n\nfunction _processStackChildren(\n children: React.ReactNode,\n { disableShrink, enableScopedSelectors }: { disableShrink: boolean; enableScopedSelectors: boolean },\n): (React.ReactChild | React.ReactFragment | React.ReactPortal)[] {\n let childrenArray = React.Children.toArray(children);\n\n childrenArray = React.Children.map(childrenArray, child => {\n if (!child || !React.isValidElement(child)) {\n return child;\n }\n\n if (child.type === React.Fragment) {\n return child.props.children\n ? _processStackChildren(child.props.children, { disableShrink, enableScopedSelectors })\n : null;\n }\n\n const childAsReactElement = child as React.ReactElement;\n\n let defaultItemProps: IStackItemProps = {};\n if (_isStackItem(child)) {\n defaultItemProps = { shrink: !disableShrink };\n }\n const childClassName = childAsReactElement.props.className;\n\n return React.cloneElement(childAsReactElement, {\n ...defaultItemProps,\n ...childAsReactElement.props,\n ...(childClassName && { className: childClassName }),\n ...(enableScopedSelectors && { className: css(StackGlobalClassNames.child, childClassName) }),\n });\n });\n\n return childrenArray;\n}\n\nfunction _isStackItem(item: React.ReactNode): item is typeof StackItem {\n // In theory, we should be able to just check item.type === StackItem.\n // However, under certain unclear circumstances (see https://github.com/microsoft/fluentui/issues/10785),\n // the object identity is different despite the function implementation being the same.\n return (\n !!item &&\n typeof item === 'object' &&\n !!(item as React.ReactElement).type &&\n // StackItem is generated by createComponent, so we need to check its displayName instead of name\n ((item as React.ReactElement).type as React.ComponentType).displayName === StackItem.displayName\n );\n}\n\nconst StackStatics = {\n Item: StackItem,\n};\n\nexport const Stack: React.FunctionComponent & {\n Item: React.FunctionComponent;\n} = createComponent(StackView, {\n displayName: 'Stack',\n styles,\n statics: StackStatics,\n});\n\nexport default Stack;\n","// extracted by mini-css-extract-plugin\nexport default {\"answerContainer\":\"Answer_answerContainer__20rY+\",\"answerLogo\":\"Answer_answerLogo__bDFv2\",\"answerText\":\"Answer_answerText__lGL7N\",\"selected\":\"Answer_selected__sR1ax\",\"sourcesLink\":\"Answer_sourcesLink__W9D7U\",\"supContainer\":\"Answer_supContainer__b4XWG\",\"retryButton\":\"Answer_retryButton__9X+lE\",\"loadingdots\":\"Answer_loadingdots__UcLMO\",\"loading\":\"Answer_loading__Pz7EX\"};","import { Stack } from \"@fluentui/react\";\nimport DOMPurify from \"dompurify\";\n\nimport styles from \"./Answer.module.css\";\n\nimport { AskResponse } from \"../../api\";\n\ninterface Props {\n answer: AskResponse;\n isSelected?: boolean;\n}\n\nexport const Answer = ({\n answer,\n isSelected\n}: Props) => {\n const parsedAnswer = answer.answer.trim();\n\n const sanitizedAnswerHtml = DOMPurify.sanitize(parsedAnswer);\n\n return (\n \n\n \n \n \n\n {!!answer.source_documents.length && (\n \n \n Sources:
\n {answer.source_documents.map((x, i) => {\n return (\n \n {`${++i}. ${answer.source_documents_pages[i-1]}`}\n \n );\n })}\n \n \n )} \n\n \n );\n};\n","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}","import _typeof from \"./typeof.js\";\nexport default function _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","import defineProperty from \"./defineProperty.js\";\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n enumerableOnly && (symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n })), keys.push.apply(keys, symbols);\n }\n return keys;\n}\nexport default function _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = null != arguments[i] ? arguments[i] : {};\n i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {\n defineProperty(target, key, source[key]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);\n }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}","export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}","export default function _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}","import _typeof from \"./typeof.js\";\nimport assertThisInitialized from \"./assertThisInitialized.js\";\nexport default function _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n return assertThisInitialized(self);\n}","import getPrototypeOf from \"./getPrototypeOf.js\";\nimport isNativeReflectConstruct from \"./isNativeReflectConstruct.js\";\nimport possibleConstructorReturn from \"./possibleConstructorReturn.js\";\nexport default function _createSuper(Derived) {\n var hasNativeReflectConstruct = isNativeReflectConstruct();\n return function _createSuperInternal() {\n var Super = getPrototypeOf(Derived),\n result;\n if (hasNativeReflectConstruct) {\n var NewTarget = getPrototypeOf(this).constructor;\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n return possibleConstructorReturn(this, result);\n };\n}","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","import superPropBase from \"./superPropBase.js\";\nexport default function _get() {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get.bind();\n } else {\n _get = function _get(target, property, receiver) {\n var base = superPropBase(target, property);\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n if (desc.get) {\n return desc.get.call(arguments.length < 3 ? target : receiver);\n }\n return desc.value;\n };\n }\n return _get.apply(this, arguments);\n}","import getPrototypeOf from \"./getPrototypeOf.js\";\nexport default function _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = getPrototypeOf(object);\n if (object === null) break;\n }\n return object;\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nimport isNativeReflectConstruct from \"./isNativeReflectConstruct.js\";\nexport default function _construct(Parent, args, Class) {\n if (isNativeReflectConstruct()) {\n _construct = Reflect.construct.bind();\n } else {\n _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n return _construct.apply(null, arguments);\n}","import getPrototypeOf from \"./getPrototypeOf.js\";\nimport setPrototypeOf from \"./setPrototypeOf.js\";\nimport isNativeFunction from \"./isNativeFunction.js\";\nimport construct from \"./construct.js\";\nexport default function _wrapNativeSuper(Class) {\n var _cache = typeof Map === \"function\" ? new Map() : undefined;\n _wrapNativeSuper = function _wrapNativeSuper(Class) {\n if (Class === null || !isNativeFunction(Class)) return Class;\n if (typeof Class !== \"function\") {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n if (typeof _cache !== \"undefined\") {\n if (_cache.has(Class)) return _cache.get(Class);\n _cache.set(Class, Wrapper);\n }\n function Wrapper() {\n return construct(Class, arguments, getPrototypeOf(this).constructor);\n }\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n return setPrototypeOf(Wrapper, Class);\n };\n return _wrapNativeSuper(Class);\n}","export default function _isNativeFunction(fn) {\n return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n}","import unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nexport default function _createForOfIteratorHelper(o, allowArrayLike) {\n var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"];\n if (!it) {\n if (Array.isArray(o) || (it = unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n var F = function F() {};\n return {\n s: F,\n n: function n() {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n },\n e: function e(_e) {\n throw _e;\n },\n f: F\n };\n }\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n var normalCompletion = true,\n didErr = false,\n err;\n return {\n s: function s() {\n it = it.call(o);\n },\n n: function n() {\n var step = it.next();\n normalCompletion = step.done;\n return step;\n },\n e: function e(_e2) {\n didErr = true;\n err = _e2;\n },\n f: function f() {\n try {\n if (!normalCompletion && it[\"return\"] != null) it[\"return\"]();\n } finally {\n if (didErr) throw err;\n }\n }\n };\n}","var f=r(),n=e=>c(e,f),m=r();n.write=e=>c(e,m);var d=r();n.onStart=e=>c(e,d);var h=r();n.onFrame=e=>c(e,h);var p=r();n.onFinish=e=>c(e,p);var i=[];n.setTimeout=(e,t)=>{let a=n.now()+t,o=()=>{let F=i.findIndex(z=>z.cancel==o);~F&&i.splice(F,1),u-=~F?1:0},s={time:a,handler:e,cancel:o};return i.splice(w(a),0,s),u+=1,v(),s};var w=e=>~(~i.findIndex(t=>t.time>e)||~i.length);n.cancel=e=>{d.delete(e),h.delete(e),p.delete(e),f.delete(e),m.delete(e)};n.sync=e=>{T=!0,n.batchedUpdates(e),T=!1};n.throttle=e=>{let t;function a(){try{e(...t)}finally{t=null}}function o(...s){t=s,n.onStart(a)}return o.handler=e,o.cancel=()=>{d.delete(a),t=null},o};var y=typeof window<\"u\"?window.requestAnimationFrame:()=>{};n.use=e=>y=e;n.now=typeof performance<\"u\"?()=>performance.now():Date.now;n.batchedUpdates=e=>e();n.catch=console.error;n.frameLoop=\"always\";n.advance=()=>{n.frameLoop!==\"demand\"?console.warn(\"Cannot call the manual advancement of rafz whilst frameLoop is not set as demand\"):x()};var l=-1,u=0,T=!1;function c(e,t){T?(t.delete(e),e(0)):(t.add(e),v())}function v(){l<0&&(l=0,n.frameLoop!==\"demand\"&&y(b))}function R(){l=-1}function b(){~l&&(y(b),n.batchedUpdates(x))}function x(){let e=l;l=n.now();let t=w(l);if(t&&(Q(i.splice(0,t),a=>a.handler()),u-=t),!u){R();return}d.flush(),f.flush(e?Math.min(64,l-e):16.667),h.flush(),m.flush(),p.flush()}function r(){let e=new Set,t=e;return{add(a){u+=t==e&&!e.has(a)?1:0,e.add(a)},delete(a){return u-=t==e&&e.has(a)?1:0,e.delete(a)},flush(a){t.size&&(e=new Set,u-=t.size,Q(t,o=>o(a)&&e.add(o)),u+=e.size,t=e)}}}function Q(e,t){e.forEach(a=>{try{t(a)}catch(o){n.catch(o)}})}var S={count(){return u},isRunning(){return l>=0},clear(){l=-1,i=[],d=r(),f=r(),h=r(),m=r(),p=r(),u=0}};export{S as __raf,n as raf};\n","var ze=Object.defineProperty;var Le=(e,t)=>{for(var r in t)ze(e,r,{get:t[r],enumerable:!0})};var p={};Le(p,{assign:()=>U,colors:()=>c,createStringInterpolator:()=>k,skipAnimation:()=>ee,to:()=>J,willAdvance:()=>S});import{raf as I}from\"@react-spring/rafz\";function Y(){}var mt=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),l={arr:Array.isArray,obj:e=>!!e&&e.constructor.name===\"Object\",fun:e=>typeof e==\"function\",str:e=>typeof e==\"string\",num:e=>typeof e==\"number\",und:e=>e===void 0};function bt(e,t){if(l.arr(e)){if(!l.arr(t)||e.length!==t.length)return!1;for(let r=0;re.forEach(t);function xt(e,t,r){if(l.arr(e)){for(let n=0;nl.und(e)?[]:l.arr(e)?e:[e];function Pe(e,t){if(e.size){let r=Array.from(e);e.clear(),Ve(r,t)}}var yt=(e,...t)=>Pe(e,r=>r(...t)),h=()=>typeof window>\"u\"||!window.navigator||/ServerSideRendering|^Deno\\//.test(window.navigator.userAgent);var k,J,c=null,ee=!1,S=Y,U=e=>{e.to&&(J=e.to),e.now&&(I.now=e.now),e.colors!==void 0&&(c=e.colors),e.skipAnimation!=null&&(ee=e.skipAnimation),e.createStringInterpolator&&(k=e.createStringInterpolator),e.requestAnimationFrame&&I.use(e.requestAnimationFrame),e.batchedUpdates&&(I.batchedUpdates=e.batchedUpdates),e.willAdvance&&(S=e.willAdvance),e.frameLoop&&(I.frameLoop=e.frameLoop)};import{raf as R}from\"@react-spring/rafz\";var E=new Set,u=[],H=[],A=0,qe={get idle(){return!E.size&&!u.length},start(e){A>e.priority?(E.add(e),R.onStart($e)):(te(e),R(B))},advance:B,sort(e){if(A)R.onFrame(()=>qe.sort(e));else{let t=u.indexOf(e);~t&&(u.splice(t,1),re(e))}},clear(){u=[],E.clear()}};function $e(){E.forEach(te),E.clear(),R(B)}function te(e){u.includes(e)||re(e)}function re(e){u.splice(Ge(u,t=>t.priority>e.priority),0,e)}function B(e){let t=H;for(let r=0;r0}function Ge(e,t){let r=e.findIndex(t);return r<0?e.length:r}var ne=(e,t,r)=>Math.min(Math.max(r,e),t);var It={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199};var d=\"[-+]?\\\\d*\\\\.?\\\\d+\",M=d+\"%\";function C(...e){return\"\\\\(\\\\s*(\"+e.join(\")\\\\s*,\\\\s*(\")+\")\\\\s*\\\\)\"}var oe=new RegExp(\"rgb\"+C(d,d,d)),fe=new RegExp(\"rgba\"+C(d,d,d,d)),ae=new RegExp(\"hsl\"+C(d,M,M)),ie=new RegExp(\"hsla\"+C(d,M,M,d)),se=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ue=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,le=/^#([0-9a-fA-F]{6})$/,ce=/^#([0-9a-fA-F]{8})$/;function be(e){let t;return typeof e==\"number\"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=le.exec(e))?parseInt(t[1]+\"ff\",16)>>>0:c&&c[e]!==void 0?c[e]:(t=oe.exec(e))?(y(t[1])<<24|y(t[2])<<16|y(t[3])<<8|255)>>>0:(t=fe.exec(e))?(y(t[1])<<24|y(t[2])<<16|y(t[3])<<8|me(t[4]))>>>0:(t=se.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+\"ff\",16)>>>0:(t=ce.exec(e))?parseInt(t[1],16)>>>0:(t=ue.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=ae.exec(e))?(de(pe(t[1]),z(t[2]),z(t[3]))|255)>>>0:(t=ie.exec(e))?(de(pe(t[1]),z(t[2]),z(t[3]))|me(t[4]))>>>0:null}function j(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function de(e,t,r){let n=r<.5?r*(1+t):r+t-r*t,f=2*r-n,o=j(f,n,e+1/3),i=j(f,n,e),s=j(f,n,e-1/3);return Math.round(o*255)<<24|Math.round(i*255)<<16|Math.round(s*255)<<8}function y(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function pe(e){return(parseFloat(e)%360+360)%360/360}function me(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function z(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function D(e){let t=be(e);if(t===null)return e;t=t||0;let r=(t&4278190080)>>>24,n=(t&16711680)>>>16,f=(t&65280)>>>8,o=(t&255)/255;return`rgba(${r}, ${n}, ${f}, ${o})`}var W=(e,t,r)=>{if(l.fun(e))return e;if(l.arr(e))return W({range:e,output:t,extrapolate:r});if(l.str(e.output[0]))return k(e);let n=e,f=n.output,o=n.range||[0,1],i=n.extrapolateLeft||n.extrapolate||\"extend\",s=n.extrapolateRight||n.extrapolate||\"extend\",x=n.easing||(a=>a);return a=>{let F=He(a,o);return Ue(a,o[F],o[F+1],f[F],f[F+1],x,i,s,n.map)}};function Ue(e,t,r,n,f,o,i,s,x){let a=x?x(e):e;if(ar){if(s===\"identity\")return a;s===\"clamp\"&&(a=r)}return n===f?n:t===r?e<=t?n:f:(t===-1/0?a=-a:r===1/0?a=a-t:a=(a-t)/(r-t),a=o(a),n===-1/0?a=-a:f===1/0?a=a+n:a=a*(f-n)+n,a)}function He(e,t){for(var r=1;r=e);++r);return r-1}var Be=(e,t=\"end\")=>r=>{r=t===\"end\"?Math.min(r,.999):Math.max(r,.001);let n=r*e,f=t===\"end\"?Math.floor(n):Math.ceil(n);return ne(0,1,f/e)},P=1.70158,L=P*1.525,xe=P+1,he=2*Math.PI/3,ye=2*Math.PI/4.5,V=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,Lt={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>xe*e*e*e-P*e*e,easeOutBack:e=>1+xe*Math.pow(e-1,3)+P*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((L+1)*2*e-L)/2:(Math.pow(2*e-2,2)*((L+1)*(e*2-2)+L)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*he),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*he)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*ye))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*ye)/2+1,easeInBounce:e=>1-V(1-e),easeOutBounce:V,easeInOutBounce:e=>e<.5?(1-V(1-2*e))/2:(1+V(2*e-1))/2,steps:Be};var g=Symbol.for(\"FluidValue.get\"),m=Symbol.for(\"FluidValue.observers\");var Pt=e=>!!(e&&e[g]),ve=e=>e&&e[g]?e[g]():e,qt=e=>e[m]||null;function je(e,t){e.eventObserved?e.eventObserved(t):e(t)}function $t(e,t){let r=e[m];r&&r.forEach(n=>{je(n,t)})}var ge=class{[g];[m];constructor(t){if(!t&&!(t=this.get))throw Error(\"Unknown getter\");De(this,t)}},De=(e,t)=>Ee(e,g,t);function Gt(e,t){if(e[g]){let r=e[m];r||Ee(e,m,r=new Set),r.has(t)||(r.add(t),e.observerAdded&&e.observerAdded(r.size,t))}return t}function Qt(e,t){let r=e[m];if(r&&r.has(t)){let n=r.size-1;n?r.delete(t):e[m]=null,e.observerRemoved&&e.observerRemoved(n,t)}}var Ee=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0});var O=/[+\\-]?(?:0|[1-9]\\d*)(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g,Oe=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\\((-?\\d+%?[,\\s]+){2,3}\\s*[\\d\\.]+%?\\))/gi,K=new RegExp(`(${O.source})(%|[a-z]+)`,\"i\"),we=/rgba\\(([0-9\\.-]+), ([0-9\\.-]+), ([0-9\\.-]+), ([0-9\\.-]+)\\)/gi,b=/var\\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\\)/;var N=e=>{let[t,r]=We(e);if(!t||h())return e;let n=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(n)return n.trim();if(r&&r.startsWith(\"--\")){let f=window.getComputedStyle(document.documentElement).getPropertyValue(r);return f||e}else{if(r&&b.test(r))return N(r);if(r)return r}return e},We=e=>{let t=b.exec(e);if(!t)return[,];let[,r,n]=t;return[r,n]};var _,Ke=(e,t,r,n,f)=>`rgba(${Math.round(t)}, ${Math.round(r)}, ${Math.round(n)}, ${f})`,Xt=e=>{_||(_=c?new RegExp(`(${Object.keys(c).join(\"|\")})(?!\\\\w)`,\"g\"):/^\\b$/);let t=e.output.map(o=>ve(o).replace(b,N).replace(Oe,D).replace(_,D)),r=t.map(o=>o.match(O).map(Number)),f=r[0].map((o,i)=>r.map(s=>{if(!(i in s))throw Error('The arity of each \"output\" value must be equal');return s[i]})).map(o=>W({...e,output:o}));return o=>{let i=!K.test(t[0])&&t.find(x=>K.test(x))?.replace(O,\"\"),s=0;return t[0].replace(O,()=>`${f[s++](o)}${i||\"\"}`).replace(we,Ke)}};var Z=\"react-spring: \",Te=e=>{let t=e,r=!1;if(typeof t!=\"function\")throw new TypeError(`${Z}once requires a function parameter`);return(...n)=>{r||(t(...n),r=!0)}},Ne=Te(console.warn);function Jt(){Ne(`${Z}The \"interpolate\" function is deprecated in v9 (use \"to\" instead)`)}var _e=Te(console.warn);function er(){_e(`${Z}Directly calling start instead of using the api object is deprecated in v9 (use \".start\" instead), this will be removed in later 0.X.0 versions`)}function or(e){return l.str(e)&&(e[0]==\"#\"||/\\d/.test(e)||!h()&&b.test(e)||e in(c||{}))}import{raf as Re}from\"@react-spring/rafz\";var v,q=new WeakMap,Ze=e=>e.forEach(({target:t,contentRect:r})=>q.get(t)?.forEach(n=>n(r)));function Fe(e,t){v||typeof ResizeObserver<\"u\"&&(v=new ResizeObserver(Ze));let r=q.get(t);return r||(r=new Set,q.set(t,r)),r.add(e),v&&v.observe(t),()=>{let n=q.get(t);n&&(n.delete(e),!n.size&&v&&v.unobserve(t))}}var $=new Set,w,Xe=()=>{let e=()=>{$.forEach(t=>t({width:window.innerWidth,height:window.innerHeight}))};return window.addEventListener(\"resize\",e),()=>{window.removeEventListener(\"resize\",e)}},Ie=e=>($.add(e),w||(w=Xe()),()=>{$.delete(e),!$.size&&w&&(w(),w=void 0)});var ke=(e,{container:t=document.documentElement}={})=>t===document.documentElement?Ie(e):Fe(e,t);var Se=(e,t,r)=>t-e===0?1:(r-e)/(t-e);var Ye={x:{length:\"Width\",position:\"Left\"},y:{length:\"Height\",position:\"Top\"}},G=class{callback;container;info;constructor(t,r){this.callback=t,this.container=r,this.info={time:0,x:this.createAxis(),y:this.createAxis()}}createAxis=()=>({current:0,progress:0,scrollLength:0});updateAxis=t=>{let r=this.info[t],{length:n,position:f}=Ye[t];r.current=this.container[`scroll${f}`],r.scrollLength=this.container[\"scroll\"+n]-this.container[\"client\"+n],r.progress=Se(0,r.scrollLength,r.current)};update=()=>{this.updateAxis(\"x\"),this.updateAxis(\"y\")};sendEvent=()=>{this.callback(this.info)};advance=()=>{this.update(),this.sendEvent()}};var T=new WeakMap,Ae=new WeakMap,X=new WeakMap,Me=e=>e===document.documentElement?window:e,yr=(e,{container:t=document.documentElement}={})=>{let r=X.get(t);r||(r=new Set,X.set(t,r));let n=new G(e,t);if(r.add(n),!T.has(t)){let o=()=>(r?.forEach(s=>s.advance()),!0);T.set(t,o);let i=Me(t);window.addEventListener(\"resize\",o,{passive:!0}),t!==document.documentElement&&Ae.set(t,ke(o,{container:t})),i.addEventListener(\"scroll\",o,{passive:!0})}let f=T.get(t);return Re(f),()=>{Re.cancel(f);let o=X.get(t);if(!o||(o.delete(n),o.size))return;let i=T.get(t);T.delete(t),i&&(Me(t).removeEventListener(\"scroll\",i),window.removeEventListener(\"resize\",i),Ae.get(t)?.())}};import{useRef as Je}from\"react\";function Er(e){let t=Je(null);return t.current===null&&(t.current=e()),t.current}import{useState as nt}from\"react\";import{useRef as rt}from\"react\";import{useEffect as et,useLayoutEffect as tt}from\"react\";var Q=h()?et:tt;var Ce=()=>{let e=rt(!1);return Q(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Mr(){let e=nt()[1],t=Ce();return()=>{t.current&&e(Math.random())}}import{useEffect as ot,useRef as ft,useState as at}from\"react\";function Lr(e,t){let[r]=at(()=>({inputs:t,result:e()})),n=ft(),f=n.current,o=f;return o?t&&o.inputs&&it(t,o.inputs)||(o={inputs:t,result:e()}):o=r,ot(()=>{n.current=o,f==r&&(r.inputs=r.result=void 0)},[o]),o.result}function it(e,t){if(e.length!==t.length)return!1;for(let r=0;rst(e,ut),ut=[];import{useEffect as lt,useRef as ct}from\"react\";function Ur(e){let t=ct();return lt(()=>{t.current=e}),t.current}import{useState as dt}from\"react\";var Wr=()=>{let[e,t]=dt(null);return Q(()=>{let r=window.matchMedia(\"(prefers-reduced-motion)\"),n=f=>{t(f.matches),U({skipAnimation:f.matches})};return n(r),r.addEventListener(\"change\",n),()=>{r.removeEventListener(\"change\",n)}},[]),e};import{raf as yn}from\"@react-spring/rafz\";export{ge as FluidValue,p as Globals,Gt as addFluidObserver,je as callFluidObserver,$t as callFluidObservers,ne as clamp,D as colorToRgba,It as colors,W as createInterpolator,Xt as createStringInterpolator,mt as defineHidden,er as deprecateDirectCall,Jt as deprecateInterpolate,Ve as each,xt as eachProp,Lt as easings,Pe as flush,yt as flushCalls,qe as frameLoop,qt as getFluidObservers,ve as getFluidValue,Pt as hasFluidValue,se as hex3,ue as hex4,le as hex6,ce as hex8,ae as hsl,ie as hsla,l as is,or as isAnimatedString,bt as isEqual,h as isSSR,Y as noop,ke as onResize,yr as onScroll,Te as once,Z as prefix,yn as raf,Qt as removeFluidObserver,oe as rgb,fe as rgba,De as setFluidGetter,ht as toArray,Er as useConstant,Mr as useForceUpdate,Q as useIsomorphicLayoutEffect,Lr as useMemoOne,$r as useOnce,Ur as usePrev,Wr as useReducedMotion};\n","import{defineHidden as B}from\"@react-spring/shared\";var h=Symbol.for(\"Animated:node\"),v=e=>!!e&&e[h]===e,k=e=>e&&e[h],D=(e,t)=>B(e,h,t),F=e=>e&&e[h]&&e[h].getPayload(),c=class{payload;constructor(){D(this,this)}getPayload(){return this.payload||[]}};import{is as A}from\"@react-spring/shared\";var l=class extends c{constructor(r){super();this._value=r;A.num(this._value)&&(this.lastPosition=this._value)}done=!0;elapsedTime;lastPosition;lastVelocity;v0;durationProgress=0;static create(r){return new l(r)}getPayload(){return[this]}getValue(){return this._value}setValue(r,n){return A.num(r)&&(this.lastPosition=r,n&&(r=Math.round(r/n)*n,this.done&&(this.lastPosition=r))),this._value===r?!1:(this._value=r,!0)}reset(){let{done:r}=this;this.done=!1,A.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,r&&(this.lastVelocity=null),this.v0=null)}};import{is as K,createInterpolator as R}from\"@react-spring/shared\";var d=class extends l{_string=null;_toString;constructor(t){super(0),this._toString=R({output:[t,t]})}static create(t){return new d(t)}getValue(){let t=this._string;return t??(this._string=this._toString(this._value))}setValue(t){if(K.str(t)){if(t==this._string)return!1;this._string=t,this._value=1}else if(super.setValue(t))this._string=null;else return!1;return!0}reset(t){t&&(this._toString=R({output:[this.getValue(),t]})),this._value=0,super.reset()}};import{isAnimatedString as q}from\"@react-spring/shared\";import{each as L,eachProp as w,getFluidValue as M,hasFluidValue as C}from\"@react-spring/shared\";var f={dependencies:null};var u=class extends c{constructor(r){super();this.source=r;this.setValue(r)}getValue(r){let n={};return w(this.source,(a,i)=>{v(a)?n[i]=a.getValue(r):C(a)?n[i]=M(a):r||(n[i]=a)}),n}setValue(r){this.source=r,this.payload=this._makePayload(r)}reset(){this.payload&&L(this.payload,r=>r.reset())}_makePayload(r){if(r){let n=new Set;return w(r,this._addToPayload,n),Array.from(n)}}_addToPayload(r){f.dependencies&&C(r)&&f.dependencies.add(r);let n=F(r);n&&L(n,a=>this.add(a))}};var y=class extends u{constructor(t){super(t)}static create(t){return new y(t)}getValue(){return this.source.map(t=>t.getValue())}setValue(t){let r=this.getPayload();return t.length==r.length?r.map((n,a)=>n.setValue(t[a])).some(Boolean):(super.setValue(t.map(z)),!0)}};function z(e){return(q(e)?d:l).create(e)}import{is as G,isAnimatedString as J}from\"@react-spring/shared\";function Le(e){let t=k(e);return t?t.constructor:G.arr(e)?y:J(e)?d:l}import{is as g,eachProp as oe}from\"@react-spring/shared\";import*as O from\"react\";import{forwardRef as Q,useRef as H,useCallback as X,useEffect as Y}from\"react\";import{is as N,each as V,raf as U,useForceUpdate as Z,useOnce as ee,addFluidObserver as te,removeFluidObserver as E,useIsomorphicLayoutEffect as re}from\"@react-spring/shared\";var x=(e,t)=>{let r=!N.fun(e)||e.prototype&&e.prototype.isReactComponent;return Q((n,a)=>{let i=H(null),o=r&&X(s=>{i.current=ae(a,s)},[a]),[m,T]=ne(n,t),W=Z(),P=()=>{let s=i.current;if(r&&!s)return;(s?t.applyAnimatedValues(s,m.getValue(!0)):!1)===!1&&W()},_=new b(P,T),p=H();re(()=>(p.current=_,V(T,s=>te(s,_)),()=>{p.current&&(V(p.current.deps,s=>E(s,p.current)),U.cancel(p.current.update))})),Y(P,[]),ee(()=>()=>{let s=p.current;V(s.deps,S=>E(S,s))});let $=t.getComponentProps(m.getValue());return O.createElement(e,{...$,ref:o})})},b=class{constructor(t,r){this.update=t;this.deps=r}eventObserved(t){t.type==\"change\"&&U.write(this.update)}};function ne(e,t){let r=new Set;return f.dependencies=r,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new u(e),f.dependencies=null,[e,r]}function ae(e,t){return e&&(N.fun(e)?e(t):e.current=t),t}var j=Symbol.for(\"AnimatedComponent\"),Ke=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:r=a=>new u(a),getComponentProps:n=a=>a}={})=>{let a={applyAnimatedValues:t,createAnimatedStyle:r,getComponentProps:n},i=o=>{let m=I(o)||\"Anonymous\";return g.str(o)?o=i[o]||(i[o]=x(o,a)):o=o[j]||(o[j]=x(o,a)),o.displayName=`Animated(${m})`,o};return oe(e,(o,m)=>{g.arr(e)&&(m=I(o)),i[m]=i(o)}),{animated:i}},I=e=>g.str(e)?e:e&&g.str(e.displayName)?e.displayName:g.fun(e)&&e.name||null;export{c as Animated,y as AnimatedArray,u as AnimatedObject,d as AnimatedString,l as AnimatedValue,Ke as createHost,k as getAnimated,Le as getAnimatedType,F as getPayload,v as isAnimated,D as setAnimated};\n","import{each as ge,useIsomorphicLayoutEffect as an}from\"@react-spring/shared\";import{is as K,toArray as $t,eachProp as dt,getFluidValue as Zt,isAnimatedString as en,Globals as tn}from\"@react-spring/shared\";function I(t,...e){return K.fun(t)?t(...e):t}var te=(t,e)=>t===!0||!!(e&&t&&(K.fun(t)?t(e):$t(t).includes(e))),et=(t,e)=>K.obj(t)?e&&t[e]:t;var ke=(t,e)=>t.default===!0?t[e]:t.default?t.default[e]:void 0,nn=t=>t,ne=(t,e=nn)=>{let n=rn;t.default&&t.default!==!0&&(t=t.default,n=Object.keys(t));let r={};for(let o of n){let s=e(t[o],o);K.und(s)||(r[o]=s)}return r},rn=[\"config\",\"onProps\",\"onStart\",\"onChange\",\"onPause\",\"onResume\",\"onRest\"],on={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function sn(t){let e={},n=0;if(dt(t,(r,o)=>{on[o]||(e[o]=r,n++)}),n)return e}function de(t){let e=sn(t);if(e){let n={to:e};return dt(t,(r,o)=>o in e||(n[o]=r)),n}return{...t}}function me(t){return t=Zt(t),K.arr(t)?t.map(me):en(t)?tn.createStringInterpolator({range:[0,1],output:[t,t]})(1):t}function Ue(t){for(let e in t)return!0;return!1}function Ee(t){return K.fun(t)||K.arr(t)&&K.obj(t[0])}function xe(t,e){t.ref?.delete(t),e?.delete(t)}function he(t,e){e&&t.ref!==e&&(t.ref?.delete(t),e.add(t),t.ref=e)}function wr(t,e,n=1e3){an(()=>{if(e){let r=0;ge(t,(o,s)=>{let i=o.current;if(i.length){let a=n*e[s];isNaN(a)?a=r:r=a,ge(i,u=>{ge(u.queue,p=>{let f=p.delay;p.delay=d=>a+I(f||0,d)})}),o.start()}})}else{let r=Promise.resolve();ge(t,o=>{let s=o.current;if(s.length){let i=s.map(a=>{let u=a.queue;return a.queue=[],u});r=r.then(()=>(ge(s,(a,u)=>ge(i[u]||[],p=>a.queue.push(p))),Promise.all(o.start())))}})}})}import{is as Qn}from\"@react-spring/shared\";import{useContext as Mn,useMemo as Xe,useRef as Nt}from\"react\";import{is as jn,each as Ye,usePrev as Dt,useOnce as Nn,useForceUpdate as Dn,useIsomorphicLayoutEffect as qn}from\"@react-spring/shared\";import{is as R,raf as ve,each as At,isEqual as Y,toArray as Rt,eachProp as Pn,frameLoop as Tn,flushCalls as Qe,getFluidValue as ie,isAnimatedString as xn,Globals as bn,callFluidObservers as An,hasFluidValue as Se,addFluidObserver as Rn,removeFluidObserver as vn,getFluidObservers as vt}from\"@react-spring/shared\";import{AnimatedValue as Cn,AnimatedString as Ct,getPayload as In,getAnimated as ae,setAnimated as Vn,getAnimatedType as It}from\"@react-spring/animated\";import{is as re,easings as un}from\"@react-spring/shared\";var mt={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}};var tt={...mt.default,mass:1,damping:1,easing:un.linear,clamp:!1},we=class{tension;friction;frequency;damping;mass;velocity=0;restVelocity;precision;progress;duration;easing;clamp;bounce;decay;round;constructor(){Object.assign(this,tt)}};function gt(t,e,n){n&&(n={...n},ht(n,e),e={...n,...e}),ht(t,e),Object.assign(t,e);for(let i in tt)t[i]==null&&(t[i]=tt[i]);let{frequency:r,damping:o}=t,{mass:s}=t;return re.und(r)||(r<.01&&(r=.01),o<0&&(o=0),t.tension=Math.pow(2*Math.PI/r,2)*s,t.friction=4*Math.PI*o*s/r),t}function ht(t,e){if(!re.und(e.decay))t.duration=void 0;else{let n=!re.und(e.tension)||!re.und(e.friction);(n||!re.und(e.frequency)||!re.und(e.damping)||!re.und(e.mass))&&(t.duration=void 0,t.decay=void 0),n&&(t.frequency=void 0)}}var yt=[],Le=class{changed=!1;values=yt;toValues=null;fromValues=yt;to;from;config=new we;immediate=!1};import{is as pn,raf as St,Globals as ln}from\"@react-spring/shared\";function Me(t,{key:e,props:n,defaultProps:r,state:o,actions:s}){return new Promise((i,a)=>{let u,p,f=te(n.cancel??r?.cancel,e);if(f)b();else{pn.und(n.pause)||(o.paused=te(n.pause,e));let c=r?.pause;c!==!0&&(c=o.paused||te(c,e)),u=I(n.delay||0,e),c?(o.resumeQueue.add(m),s.pause()):(s.resume(),m())}function d(){o.resumeQueue.add(m),o.timeouts.delete(p),p.cancel(),u=p.time-St.now()}function m(){u>0&&!ln.skipAnimation?(o.delayed=!0,p=St.setTimeout(b,u),o.pauseQueue.add(d),o.timeouts.add(p)):b()}function b(){o.delayed&&(o.delayed=!1),o.pauseQueue.delete(d),o.timeouts.delete(p),t<=(o.cancelId||0)&&(f=!0);try{s.start({...n,callId:t,cancel:f},i)}catch(c){a(c)}}})}import{is as je,raf as cn,flush as fn,eachProp as dn,Globals as Pt}from\"@react-spring/shared\";var be=(t,e)=>e.length==1?e[0]:e.some(n=>n.cancelled)?q(t.get()):e.every(n=>n.noop)?nt(t.get()):E(t.get(),e.every(n=>n.finished)),nt=t=>({value:t,noop:!0,finished:!0,cancelled:!1}),E=(t,e,n=!1)=>({value:t,finished:e,cancelled:n}),q=t=>({value:t,cancelled:!0,finished:!1});function De(t,e,n,r){let{callId:o,parentId:s,onRest:i}=e,{asyncTo:a,promise:u}=n;return!s&&t===a&&!e.reset?u:n.promise=(async()=>{n.asyncId=o,n.asyncTo=t;let p=ne(e,(l,h)=>h===\"onRest\"?void 0:l),f,d,m=new Promise((l,h)=>(f=l,d=h)),b=l=>{let h=o<=(n.cancelId||0)&&q(r)||o!==n.asyncId&&E(r,!1);if(h)throw l.result=h,d(l),l},c=(l,h)=>{let g=new Ae,x=new Ne;return(async()=>{if(Pt.skipAnimation)throw oe(n),x.result=E(r,!1),d(x),x;b(g);let S=je.obj(l)?{...l}:{...h,to:l};S.parentId=o,dn(p,(V,_)=>{je.und(S[_])&&(S[_]=V)});let A=await r.start(S);return b(g),n.paused&&await new Promise(V=>{n.resumeQueue.add(V)}),A})()},P;if(Pt.skipAnimation)return oe(n),E(r,!1);try{let l;je.arr(t)?l=(async h=>{for(let g of h)await c(g)})(t):l=Promise.resolve(t(c,r.stop.bind(r))),await Promise.all([l.then(f),m]),P=E(r.get(),!0,!1)}catch(l){if(l instanceof Ae)P=l.result;else if(l instanceof Ne)P=l.result;else throw l}finally{o==n.asyncId&&(n.asyncId=s,n.asyncTo=s?a:void 0,n.promise=s?u:void 0)}return je.fun(i)&&cn.batchedUpdates(()=>{i(P,r,r.item)}),P})()}function oe(t,e){fn(t.timeouts,n=>n.cancel()),t.pauseQueue.clear(),t.resumeQueue.clear(),t.asyncId=t.asyncTo=t.promise=void 0,e&&(t.cancelId=e)}var Ae=class extends Error{result;constructor(){super(\"An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.\")}},Ne=class extends Error{result;constructor(){super(\"SkipAnimationSignal\")}};import{deprecateInterpolate as mn,frameLoop as hn,FluidValue as gn,Globals as Tt,callFluidObservers as xt}from\"@react-spring/shared\";import{getAnimated as yn}from\"@react-spring/animated\";var Re=t=>t instanceof X,Sn=1,X=class extends gn{id=Sn++;_priority=0;get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){let e=yn(this);return e&&e.getValue()}to(...e){return Tt.to(this,e)}interpolate(...e){return mn(),Tt.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,n=!1){xt(this,{type:\"change\",parent:this,value:e,idle:n})}_onPriorityChange(e){this.idle||hn.sort(this),xt(this,{type:\"priority\",parent:this,priority:e})}};var se=Symbol.for(\"SpringPhase\"),bt=1,rt=2,ot=4,qe=t=>(t[se]&bt)>0,Q=t=>(t[se]&rt)>0,ye=t=>(t[se]&ot)>0,st=(t,e)=>e?t[se]|=rt|bt:t[se]&=~rt,it=(t,e)=>e?t[se]|=ot:t[se]&=~ot;var ue=class extends X{key;animation=new Le;queue;defaultProps={};_state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set};_pendingCalls=new Set;_lastCallId=0;_lastToId=0;_memoizedDuration=0;constructor(e,n){if(super(),!R.und(e)||!R.und(n)){let r=R.obj(e)?{...e}:{...n,from:e};R.und(r.default)&&(r.default=!0),this.start(r)}}get idle(){return!(Q(this)||this._state.asyncTo)||ye(this)}get goal(){return ie(this.animation.to)}get velocity(){let e=ae(this);return e instanceof Cn?e.lastVelocity||0:e.getPayload().map(n=>n.lastVelocity||0)}get hasAnimated(){return qe(this)}get isAnimating(){return Q(this)}get isPaused(){return ye(this)}get isDelayed(){return this._state.delayed}advance(e){let n=!0,r=!1,o=this.animation,{toValues:s}=o,{config:i}=o,a=In(o.to);!a&&Se(o.to)&&(s=Rt(ie(o.to))),o.values.forEach((f,d)=>{if(f.done)return;let m=f.constructor==Ct?1:a?a[d].lastPosition:s[d],b=o.immediate,c=m;if(!b){if(c=f.lastPosition,i.tension<=0){f.done=!0;return}let P=f.elapsedTime+=e,l=o.fromValues[d],h=f.v0!=null?f.v0:f.v0=R.arr(i.velocity)?i.velocity[d]:i.velocity,g,x=i.precision||(l==m?.005:Math.min(1,Math.abs(m-l)*.001));if(R.und(i.duration))if(i.decay){let S=i.decay===!0?.998:i.decay,A=Math.exp(-(1-S)*P);c=l+h/(1-S)*(1-A),b=Math.abs(f.lastPosition-c)<=x,g=h*A}else{g=f.lastVelocity==null?h:f.lastVelocity;let S=i.restVelocity||x/10,A=i.clamp?0:i.bounce,V=!R.und(A),_=l==m?f.v0>0:lS,!(!v&&(b=Math.abs(m-c)<=x,b)));++L){V&&(w=c==m||c>m==_,w&&(g=-g*A,c=m));let N=-i.tension*1e-6*(c-m),y=-i.friction*.001*g,T=(N+y)/i.mass;g=g+T*C,c=c+g*C}}else{let S=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,f.durationProgress>0&&(f.elapsedTime=i.duration*f.durationProgress,P=f.elapsedTime+=e)),S=(i.progress||0)+P/this._memoizedDuration,S=S>1?1:S<0?0:S,f.durationProgress=S),c=l+i.easing(S)*(m-l),g=(c-f.lastPosition)/e,b=S==1}f.lastVelocity=g,Number.isNaN(c)&&(console.warn(\"Got NaN while animating:\",this),b=!0)}a&&!a[d].done&&(b=!1),b?f.done=!0:n=!1,f.setValue(c,i.round)&&(r=!0)});let u=ae(this),p=u.getValue();if(n){let f=ie(o.to);(p!==f||r)&&!i.decay?(u.setValue(f),this._onChange(f)):r&&i.decay&&this._onChange(p),this._stop()}else r&&this._onChange(p)}set(e){return ve.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Q(this)){let{to:e,config:n}=this.animation;ve.batchedUpdates(()=>{this._onStart(),n.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,n){let r;return R.und(e)?(r=this.queue||[],this.queue=[]):r=[R.obj(e)?e:{...n,to:e}],Promise.all(r.map(o=>this._update(o))).then(o=>be(this,o))}stop(e){let{to:n}=this.animation;return this._focus(this.get()),oe(this._state,e&&this._lastCallId),ve.batchedUpdates(()=>this._stop(n,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type==\"change\"?this._start():e.type==\"priority\"&&(this.priority=e.priority+1)}_prepareNode(e){let n=this.key||\"\",{to:r,from:o}=e;r=R.obj(r)?r[n]:r,(r==null||Ee(r))&&(r=void 0),o=R.obj(o)?o[n]:o,o==null&&(o=void 0);let s={to:r,from:o};return qe(this)||(e.reverse&&([r,o]=[o,r]),o=ie(o),R.und(o)?ae(this)||this._set(r):this._set(o)),s}_update({...e},n){let{key:r,defaultProps:o}=this;e.default&&Object.assign(o,ne(e,(a,u)=>/^on/.test(u)?et(a,r):a)),_t(this,e,\"onProps\"),Ie(this,\"onProps\",e,this);let s=this._prepareNode(e);if(Object.isFrozen(this))throw Error(\"Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?\");let i=this._state;return Me(++this._lastCallId,{key:r,props:e,defaultProps:o,state:i,actions:{pause:()=>{ye(this)||(it(this,!0),Qe(i.pauseQueue),Ie(this,\"onPause\",E(this,Ce(this,this.animation.to)),this))},resume:()=>{ye(this)&&(it(this,!1),Q(this)&&this._resume(),Qe(i.resumeQueue),Ie(this,\"onResume\",E(this,Ce(this,this.animation.to)),this))},start:this._merge.bind(this,s)}}).then(a=>{if(e.loop&&a.finished&&!(n&&a.noop)){let u=at(e);if(u)return this._update(u,!0)}return a})}_merge(e,n,r){if(n.cancel)return this.stop(!0),r(q(this));let o=!R.und(e.to),s=!R.und(e.from);if(o||s)if(n.callId>this._lastToId)this._lastToId=n.callId;else return r(q(this));let{key:i,defaultProps:a,animation:u}=this,{to:p,from:f}=u,{to:d=p,from:m=f}=e;s&&!o&&(!n.default||R.und(d))&&(d=m),n.reverse&&([d,m]=[m,d]);let b=!Y(m,f);b&&(u.from=m),m=ie(m);let c=!Y(d,p);c&&this._focus(d);let P=Ee(n.to),{config:l}=u,{decay:h,velocity:g}=l;(o||s)&&(l.velocity=0),n.config&&!P&>(l,I(n.config,i),n.config!==a.config?I(a.config,i):void 0);let x=ae(this);if(!x||R.und(d))return r(E(this,!0));let S=R.und(n.reset)?s&&!n.default:!R.und(m)&&te(n.reset,i),A=S?m:this.get(),V=me(d),_=R.num(V)||R.arr(V)||xn(V),v=!P&&(!_||te(a.immediate||n.immediate,i));if(c){let L=It(d);if(L!==x.constructor)if(v)x=this._set(V);else throw Error(`Cannot animate between ${x.constructor.name} and ${L.name}, as the \"to\" prop suggests`)}let w=x.constructor,C=Se(d),$=!1;if(!C){let L=S||!qe(this)&&b;(c||L)&&($=Y(me(A),V),C=!$),(!Y(u.immediate,v)&&!v||!Y(l.decay,h)||!Y(l.velocity,g))&&(C=!0)}if($&&Q(this)&&(u.changed&&!S?C=!0:C||this._stop(p)),!P&&((C||Se(p))&&(u.values=x.getPayload(),u.toValues=Se(d)?null:w==Ct?[1]:Rt(V)),u.immediate!=v&&(u.immediate=v,!v&&!S&&this._set(p)),C)){let{onRest:L}=u;At(_n,y=>_t(this,n,y));let N=E(this,Ce(this,p));Qe(this._pendingCalls,N),this._pendingCalls.add(r),u.changed&&ve.batchedUpdates(()=>{u.changed=!S,L?.(N,this),S?I(a.onRest,N):u.onStart?.(N,this)})}S&&this._set(A),P?r(De(n.to,n,this._state,this)):C?this._start():Q(this)&&!c?this._pendingCalls.add(r):r(nt(A))}_focus(e){let n=this.animation;e!==n.to&&(vt(this)&&this._detach(),n.to=e,vt(this)&&this._attach())}_attach(){let e=0,{to:n}=this.animation;Se(n)&&(Rn(n,this),Re(n)&&(e=n.priority+1)),this.priority=e}_detach(){let{to:e}=this.animation;Se(e)&&vn(e,this)}_set(e,n=!0){let r=ie(e);if(!R.und(r)){let o=ae(this);if(!o||!Y(r,o.getValue())){let s=It(r);!o||o.constructor!=s?Vn(this,s.create(r)):o.setValue(r),o&&ve.batchedUpdates(()=>{this._onChange(r,n)})}}return ae(this)}_onStart(){let e=this.animation;e.changed||(e.changed=!0,Ie(this,\"onStart\",E(this,Ce(this,e.to)),this))}_onChange(e,n){n||(this._onStart(),I(this.animation.onChange,e,this)),I(this.defaultProps.onChange,e,this),super._onChange(e,n)}_start(){let e=this.animation;ae(this).reset(ie(e.to)),e.immediate||(e.fromValues=e.values.map(n=>n.lastPosition)),Q(this)||(st(this,!0),ye(this)||this._resume())}_resume(){bn.skipAnimation?this.finish():Tn.start(this)}_stop(e,n){if(Q(this)){st(this,!1);let r=this.animation;At(r.values,s=>{s.done=!0}),r.toValues&&(r.onChange=r.onPause=r.onResume=void 0),An(this,{type:\"idle\",parent:this});let o=n?q(this.get()):E(this.get(),Ce(this,e??r.to));Qe(this._pendingCalls,o),r.changed&&(r.changed=!1,Ie(this,\"onRest\",o,this))}}};function Ce(t,e){let n=me(e),r=me(t.get());return Y(r,n)}function at(t,e=t.loop,n=t.to){let r=I(e);if(r){let o=r!==!0&&de(r),s=(o||t).reverse,i=!o||o.reset;return Pe({...t,loop:e,default:!1,pause:void 0,to:!s||Ee(n)?n:void 0,from:i?t.from:void 0,reset:i,...o})}}function Pe(t){let{to:e,from:n}=t=de(t),r=new Set;return R.obj(e)&&Vt(e,r),R.obj(n)&&Vt(n,r),t.keys=r.size?Array.from(r):null,t}function Ot(t){let e=Pe(t);return R.und(e.default)&&(e.default=ne(e)),e}function Vt(t,e){Pn(t,(n,r)=>n!=null&&e.add(r))}var _n=[\"onStart\",\"onRest\",\"onChange\",\"onPause\",\"onResume\"];function _t(t,e,n){t.animation[n]=e[n]!==ke(e,n)?et(e[n],t.key):void 0}function Ie(t,e,...n){t.animation[e]?.(...n),t.defaultProps[e]?.(...n)}import{is as z,raf as kt,each as pe,noop as Ft,flush as ut,toArray as Ve,eachProp as Ut,flushCalls as On,addFluidObserver as Et}from\"@react-spring/shared\";var Fn=[\"onStart\",\"onChange\",\"onRest\"],kn=1,le=class{id=kn++;springs={};queue=[];ref;_flush;_initialProps;_lastAsyncId=0;_active=new Set;_changed=new Set;_started=!1;_item;_state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set};_events={onStart:new Map,onChange:new Map,onRest:new Map};constructor(e,n){this._onFrame=this._onFrame.bind(this),n&&(this._flush=n),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){let e={};return this.each((n,r)=>e[r]=n.get()),e}set(e){for(let n in e){let r=e[n];z.und(r)||this.springs[n].set(r)}}update(e){return e&&this.queue.push(Pe(e)),this}start(e){let{queue:n}=this;return e?n=Ve(e).map(Pe):this.queue=[],this._flush?this._flush(this,n):(jt(this,n),ze(this,n))}stop(e,n){if(e!==!!e&&(n=e),n){let r=this.springs;pe(Ve(n),o=>r[o].stop(!!e))}else oe(this._state,this._lastAsyncId),this.each(r=>r.stop(!!e));return this}pause(e){if(z.und(e))this.start({pause:!0});else{let n=this.springs;pe(Ve(e),r=>n[r].pause())}return this}resume(e){if(z.und(e))this.start({pause:!1});else{let n=this.springs;pe(Ve(e),r=>n[r].resume())}return this}each(e){Ut(this.springs,e)}_onFrame(){let{onStart:e,onChange:n,onRest:r}=this._events,o=this._active.size>0,s=this._changed.size>0;(o&&!this._started||s&&!this._started)&&(this._started=!0,ut(e,([u,p])=>{p.value=this.get(),u(p,this,this._item)}));let i=!o&&this._started,a=s||i&&r.size?this.get():null;s&&n.size&&ut(n,([u,p])=>{p.value=a,u(p,this,this._item)}),i&&(this._started=!1,ut(r,([u,p])=>{p.value=a,u(p,this,this._item)}))}eventObserved(e){if(e.type==\"change\")this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type==\"idle\")this._active.delete(e.parent);else return;kt.onFrame(this._onFrame)}};function ze(t,e){return Promise.all(e.map(n=>wt(t,n))).then(n=>be(t,n))}async function wt(t,e,n){let{keys:r,to:o,from:s,loop:i,onRest:a,onResolve:u}=e,p=z.obj(e.default)&&e.default;i&&(e.loop=!1),o===!1&&(e.to=null),s===!1&&(e.from=null);let f=z.arr(o)||z.fun(o)?o:void 0;f?(e.to=void 0,e.onRest=void 0,p&&(p.onRest=void 0)):pe(Fn,P=>{let l=e[P];if(z.fun(l)){let h=t._events[P];e[P]=({finished:g,cancelled:x})=>{let S=h.get(l);S?(g||(S.finished=!1),x&&(S.cancelled=!0)):h.set(l,{value:null,finished:g||!1,cancelled:x||!1})},p&&(p[P]=e[P])}});let d=t._state;e.pause===!d.paused?(d.paused=e.pause,On(e.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(e.pause=!0);let m=(r||Object.keys(t.springs)).map(P=>t.springs[P].start(e)),b=e.cancel===!0||ke(e,\"cancel\")===!0;(f||b&&d.asyncId)&&m.push(Me(++t._lastAsyncId,{props:e,state:d,actions:{pause:Ft,resume:Ft,start(P,l){b?(oe(d,t._lastAsyncId),l(q(t))):(P.onRest=a,l(De(f,P,d,t)))}}})),d.paused&&await new Promise(P=>{d.resumeQueue.add(P)});let c=be(t,await Promise.all(m));if(i&&c.finished&&!(n&&c.noop)){let P=at(e,i,o);if(P)return jt(t,[P]),wt(t,P,!0)}return u&&kt.batchedUpdates(()=>u(c,t,t.item)),c}function _e(t,e){let n={...t.springs};return e&&pe(Ve(e),r=>{z.und(r.keys)&&(r=Pe(r)),z.obj(r.to)||(r={...r,to:void 0}),Mt(n,r,o=>Lt(o))}),pt(t,n),n}function pt(t,e){Ut(e,(n,r)=>{t.springs[r]||(t.springs[r]=n,Et(n,t))})}function Lt(t,e){let n=new ue;return n.key=t,e&&Et(n,e),n}function Mt(t,e,n){e.keys&&pe(e.keys,r=>{(t[r]||(t[r]=n(r)))._prepareNode(e)})}function jt(t,e){pe(e,n=>{Mt(t.springs,n,r=>Lt(r,t))})}import*as Be from\"react\";import{useContext as Un}from\"react\";import{useMemoOne as En}from\"@react-spring/shared\";var H=({children:t,...e})=>{let n=Un(Ge),r=e.pause||!!n.pause,o=e.immediate||!!n.immediate;e=En(()=>({pause:r,immediate:o}),[r,o]);let{Provider:s}=Ge;return Be.createElement(s,{value:e},t)},Ge=wn(H,{});H.Provider=Ge.Provider;H.Consumer=Ge.Consumer;function wn(t,e){return Object.assign(t,Be.createContext(e)),t.Provider._context=t,t.Consumer._context=t,t}import{each as ce,is as Ke,deprecateDirectCall as Ln}from\"@react-spring/shared\";var fe=()=>{let t=[],e=function(r){Ln();let o=[];return ce(t,(s,i)=>{if(Ke.und(r))o.push(s.start());else{let a=n(r,s,i);a&&o.push(s.start(a))}}),o};e.current=t,e.add=function(r){t.includes(r)||t.push(r)},e.delete=function(r){let o=t.indexOf(r);~o&&t.splice(o,1)},e.pause=function(){return ce(t,r=>r.pause(...arguments)),this},e.resume=function(){return ce(t,r=>r.resume(...arguments)),this},e.set=function(r){ce(t,(o,s)=>{let i=Ke.fun(r)?r(s,o):r;i&&o.set(i)})},e.start=function(r){let o=[];return ce(t,(s,i)=>{if(Ke.und(r))o.push(s.start());else{let a=this._getProps(r,s,i);a&&o.push(s.start(a))}}),o},e.stop=function(){return ce(t,r=>r.stop(...arguments)),this},e.update=function(r){return ce(t,(o,s)=>o.update(this._getProps(r,o,s))),this};let n=function(r,o,s){return Ke.fun(r)?r(s,o):r};return e._getProps=n,e};function He(t,e,n){let r=jn.fun(e)&&e;r&&!n&&(n=[]);let o=Xe(()=>r||arguments.length==3?fe():void 0,[]),s=Nt(0),i=Dn(),a=Xe(()=>({ctrls:[],queue:[],flush(h,g){let x=_e(h,g);return s.current>0&&!a.queue.length&&!Object.keys(x).some(A=>!h.springs[A])?ze(h,g):new Promise(A=>{pt(h,x),a.queue.push(()=>{A(ze(h,g))}),i()})}}),[]),u=Nt([...a.ctrls]),p=[],f=Dt(t)||0;Xe(()=>{Ye(u.current.slice(t,f),h=>{xe(h,o),h.stop(!0)}),u.current.length=t,d(f,t)},[t]),Xe(()=>{d(0,Math.min(f,t))},n);function d(h,g){for(let x=h;x_e(h,p[g])),b=Mn(H),c=Dt(b),P=b!==c&&Ue(b);qn(()=>{s.current++,a.ctrls=u.current;let{queue:h}=a;h.length&&(a.queue=[],Ye(h,g=>g())),Ye(u.current,(g,x)=>{o?.add(g),P&&g.start({default:b});let S=p[x];S&&(he(g,S.ref),g.ref?g.queue.push(S):g.start(S))})}),Nn(()=>()=>{Ye(a.ctrls,h=>h.stop(!0))});let l=m.map(h=>({...h}));return o?[l,o]:l}function J(t,e){let n=Qn.fun(t),[[r],o]=He(1,n?t:[t],n?e||[]:e);return n||arguments.length==2?[r,o]:r}import{useState as zn}from\"react\";var Gn=()=>fe(),Xo=()=>zn(Gn)[0];import{useConstant as Bn,useOnce as Kn}from\"@react-spring/shared\";var Wo=(t,e)=>{let n=Bn(()=>new ue(t,e));return Kn(()=>()=>{n.stop()}),n};import{each as Xn,is as qt,useIsomorphicLayoutEffect as Yn}from\"@react-spring/shared\";function Qt(t,e,n){let r=qt.fun(e)&&e;r&&!n&&(n=[]);let o=!0,s,i=He(t,(a,u)=>{let p=r?r(a,u):e;return s=p.ref,o=o&&p.reverse,p},n||[{}]);if(Yn(()=>{Xn(i[1].current,(a,u)=>{let p=i[1].current[u+(o?1:-1)];if(he(a,s),a.ref){p&&a.update({to:p.springs});return}p?a.start({to:p.springs}):a.start()})},n),r||arguments.length==3){let a=s??i[1];return a._getProps=(u,p,f)=>{let d=qt.fun(u)?u(f,p):u;if(d){let m=a.current[f+(d.reverse?1:-1)];return m&&(d.to=m.springs),d}},i}return i[0]}import*as Oe from\"react\";import{useContext as Hn,useRef as lt,useMemo as Jn}from\"react\";import{is as G,toArray as zt,useForceUpdate as Wn,useOnce as $n,usePrev as Zn,each as j,useIsomorphicLayoutEffect as Je}from\"@react-spring/shared\";function Gt(t,e,n){let r=G.fun(e)&&e,{reset:o,sort:s,trail:i=0,expires:a=!0,exitBeforeEnter:u=!1,onDestroyed:p,ref:f,config:d}=r?r():e,m=Jn(()=>r||arguments.length==3?fe():void 0,[]),b=zt(t),c=[],P=lt(null),l=o?null:P.current;Je(()=>{P.current=c}),$n(()=>(j(c,y=>{m?.add(y.ctrl),y.ctrl.ref=m}),()=>{j(P.current,y=>{y.expired&&clearTimeout(y.expirationId),xe(y.ctrl,m),y.ctrl.stop(!0)})}));let h=tr(b,r?r():e,l),g=o&&P.current||[];Je(()=>j(g,({ctrl:y,item:T,key:F})=>{xe(y,m),I(p,T,F)}));let x=[];if(l&&j(l,(y,T)=>{y.expired?(clearTimeout(y.expirationId),g.push(y)):(T=x[T]=h.indexOf(y.key),~T&&(c[T]=y))}),j(b,(y,T)=>{c[T]||(c[T]={key:h[T],item:y,phase:\"mount\",ctrl:new le},c[T].ctrl.item=y)}),x.length){let y=-1,{leave:T}=r?r():e;j(x,(F,k)=>{let O=l[k];~F?(y=c.indexOf(O),c[y]={...O,item:b[F]}):T&&c.splice(++y,0,O)})}G.fun(s)&&c.sort((y,T)=>s(y.item,T.item));let S=-i,A=Wn(),V=ne(e),_=new Map,v=lt(new Map),w=lt(!1);j(c,(y,T)=>{let F=y.key,k=y.phase,O=r?r():e,U,D,Jt=I(O.delay||0,F);if(k==\"mount\")U=O.enter,D=\"enter\";else{let M=h.indexOf(F)<0;if(k!=\"leave\")if(M)U=O.leave,D=\"leave\";else if(U=O.update)D=\"update\";else return;else if(!M)U=O.enter,D=\"enter\";else return}if(U=I(U,y.item,T),U=G.obj(U)?de(U):{to:U},!U.config){let M=d||V.config;U.config=I(M,y.item,T,D)}S+=i;let Z={...V,delay:Jt+S,ref:f,immediate:O.immediate,reset:!1,...U};if(D==\"enter\"&&G.und(Z.from)){let M=r?r():e,Te=G.und(M.initial)||l?M.from:M.initial;Z.from=I(Te,y.item,T)}let{onResolve:Wt}=Z;Z.onResolve=M=>{I(Wt,M);let Te=P.current,B=Te.find(Fe=>Fe.key===F);if(B&&!(M.cancelled&&B.phase!=\"update\")&&B.ctrl.idle){let Fe=Te.every(ee=>ee.ctrl.idle);if(B.phase==\"leave\"){let ee=I(a,B.item);if(ee!==!1){let Ze=ee===!0?0:ee;if(B.expired=!0,!Fe&&Ze>0){Ze<=2147483647&&(B.expirationId=setTimeout(A,Ze));return}}}Fe&&Te.some(ee=>ee.expired)&&(v.current.delete(B),u&&(w.current=!0),A())}};let ft=_e(y.ctrl,Z);D===\"leave\"&&u?v.current.set(y,{phase:D,springs:ft,payload:Z}):_.set(y,{phase:D,springs:ft,payload:Z})});let C=Hn(H),$=Zn(C),L=C!==$&&Ue(C);Je(()=>{L&&j(c,y=>{y.ctrl.start({default:C})})},[C]),j(_,(y,T)=>{if(v.current.size){let F=c.findIndex(k=>k.key===T.key);c.splice(F,1)}}),Je(()=>{j(v.current.size?v.current:_,({phase:y,payload:T},F)=>{let{ctrl:k}=F;F.phase=y,m?.add(k),L&&y==\"enter\"&&k.start({default:C}),T&&(he(k,T.ref),(k.ref||m)&&!w.current?k.update(T):(k.start(T),w.current&&(w.current=!1)))})},o?void 0:n);let N=y=>Oe.createElement(Oe.Fragment,null,c.map((T,F)=>{let{springs:k}=_.get(T)||T.ctrl,O=y({...k},T.item,T,F);return O&&O.type?Oe.createElement(O.type,{...O.props,key:G.str(T.key)||G.num(T.key)?T.key:T.ctrl.id,ref:O.ref}):O}));return m?[N,m]:N}var er=1;function tr(t,{key:e,keys:n=e},r){if(n===null){let o=new Set;return t.map(s=>{let i=r&&r.find(a=>a.item===s&&a.phase!==\"leave\"&&!o.has(a));return i?(o.add(i),i.key):er++})}return G.und(n)?t:G.fun(n)?t.map(n):zt(n)}import{each as nr,onScroll as rr,useIsomorphicLayoutEffect as or}from\"@react-spring/shared\";var hs=({container:t,...e}={})=>{let[n,r]=J(()=>({scrollX:0,scrollY:0,scrollXProgress:0,scrollYProgress:0,...e}),[]);return or(()=>{let o=rr(({x:s,y:i})=>{r.start({scrollX:s.current,scrollXProgress:s.progress,scrollY:i.current,scrollYProgress:i.progress})},{container:t?.current||void 0});return()=>{nr(Object.values(n),s=>s.stop()),o()}},[]),n};import{onResize as sr,each as ir,useIsomorphicLayoutEffect as ar}from\"@react-spring/shared\";var Ps=({container:t,...e})=>{let[n,r]=J(()=>({width:0,height:0,...e}),[]);return ar(()=>{let o=sr(({width:s,height:i})=>{r.start({width:s,height:i,immediate:n.width.get()===0||n.height.get()===0})},{container:t?.current||void 0});return()=>{ir(Object.values(n),s=>s.stop()),o()}},[]),n};import{useRef as ur,useState as pr}from\"react\";import{is as Bt,useIsomorphicLayoutEffect as lr}from\"@react-spring/shared\";var cr={any:0,all:1};function Cs(t,e){let[n,r]=pr(!1),o=ur(),s=Bt.fun(t)&&t,i=s?s():{},{to:a={},from:u={},...p}=i,f=s?e:t,[d,m]=J(()=>({from:u,...p}),[]);return lr(()=>{let b=o.current,{root:c,once:P,amount:l=\"any\",...h}=f??{};if(!b||P&&n||typeof IntersectionObserver>\"u\")return;let g=new WeakMap,x=()=>(a&&m.start(a),r(!0),P?void 0:()=>{u&&m.start(u),r(!1)}),S=V=>{V.forEach(_=>{let v=g.get(_.target);if(_.isIntersecting!==!!v)if(_.isIntersecting){let w=x();Bt.fun(w)?g.set(_.target,w):A.unobserve(_.target)}else v&&(v(),g.delete(_.target))})},A=new IntersectionObserver(S,{root:c&&c.current||void 0,threshold:typeof l==\"number\"||Array.isArray(l)?l:cr[l],...h});return A.observe(b),()=>A.unobserve(b)},[f]),s?[o,d]:[o,n]}function qs({children:t,...e}){return t(J(e))}import{is as fr}from\"@react-spring/shared\";function Bs({items:t,children:e,...n}){let r=Qt(t.length,n);return t.map((o,s)=>{let i=e(o,s);return fr.fun(i)?i(r[s]):i})}function Ys({items:t,children:e,...n}){return Gt(t,n)(e)}import{deprecateInterpolate as Cr}from\"@react-spring/shared\";import{is as dr,raf as mr,each as $e,isEqual as hr,toArray as We,frameLoop as gr,getFluidValue as Kt,createInterpolator as yr,Globals as Sr,callFluidObservers as Pr,addFluidObserver as Tr,removeFluidObserver as xr,hasFluidValue as Xt}from\"@react-spring/shared\";import{getAnimated as br,setAnimated as Ar,getAnimatedType as Rr,getPayload as Ht}from\"@react-spring/animated\";var W=class extends X{constructor(n,r){super();this.source=n;this.calc=yr(...r);let o=this._get(),s=Rr(o);Ar(this,s.create(o))}key;idle=!0;calc;_active=new Set;advance(n){let r=this._get(),o=this.get();hr(r,o)||(br(this).setValue(r),this._onChange(r,this.idle)),!this.idle&&Yt(this._active)&&ct(this)}_get(){let n=dr.arr(this.source)?this.source.map(Kt):We(Kt(this.source));return this.calc(...n)}_start(){this.idle&&!Yt(this._active)&&(this.idle=!1,$e(Ht(this),n=>{n.done=!1}),Sr.skipAnimation?(mr.batchedUpdates(()=>this.advance()),ct(this)):gr.start(this))}_attach(){let n=1;$e(We(this.source),r=>{Xt(r)&&Tr(r,this),Re(r)&&(r.idle||this._active.add(r),n=Math.max(n,r.priority+1))}),this.priority=n,this._start()}_detach(){$e(We(this.source),n=>{Xt(n)&&xr(n,this)}),this._active.clear(),ct(this)}eventObserved(n){n.type==\"change\"?n.idle?this.advance():(this._active.add(n.parent),this._start()):n.type==\"idle\"?this._active.delete(n.parent):n.type==\"priority\"&&(this.priority=We(this.source).reduce((r,o)=>Math.max(r,(Re(o)?o.priority:0)+1),0))}};function vr(t){return t.idle!==!1}function Yt(t){return!t.size||Array.from(t).every(vr)}function ct(t){t.idle||(t.idle=!0,$e(Ht(t),e=>{e.done=!0}),Pr(t,{type:\"idle\",parent:t}))}var ui=(t,...e)=>new W(t,e),pi=(t,...e)=>(Cr(),new W(t,e));import{Globals as Ir,frameLoop as Vr,createStringInterpolator as _r}from\"@react-spring/shared\";Ir.assign({createStringInterpolator:_r,to:(t,e)=>new W(t,e)});var di=Vr.advance;import{createInterpolator as Ui,useIsomorphicLayoutEffect as Ei,useReducedMotion as wi,easings as Li}from\"@react-spring/shared\";export*from\"@react-spring/types\";export{Ae as BailSignal,le as Controller,X as FrameValue,Ir as Globals,W as Interpolation,qs as Spring,H as SpringContext,fe as SpringRef,ue as SpringValue,Bs as Trail,Ys as Transition,mt as config,Ui as createInterpolator,Li as easings,de as inferTo,pi as interpolate,ui as to,di as update,wr as useChain,Cs as useInView,Ei as useIsomorphicLayoutEffect,wi as useReducedMotion,Ps as useResize,hs as useScroll,J as useSpring,Xo as useSpringRef,Wo as useSpringValue,He as useSprings,Qt as useTrail,Gt as useTransition};\n","export default function _objectDestructuringEmpty(obj) {\n if (obj == null) throw new TypeError(\"Cannot destructure \" + obj);\n}","import{Globals as M}from\"@react-spring/core\";import{unstable_batchedUpdates as N}from\"react-dom\";import{createStringInterpolator as U,colors as D}from\"@react-spring/shared\";import{createHost as H}from\"@react-spring/animated\";var k=/^--/;function I(t,e){return e==null||typeof e==\"boolean\"||e===\"\"?\"\":typeof e==\"number\"&&e!==0&&!k.test(t)&&!(c.hasOwnProperty(t)&&c[t])?e+\"px\":(\"\"+e).trim()}var v={};function V(t,e){if(!t.nodeType||!t.setAttribute)return!1;let r=t.nodeName===\"filter\"||t.parentNode&&t.parentNode.nodeName===\"filter\",{style:i,children:s,scrollTop:u,scrollLeft:l,viewBox:a,...n}=e,d=Object.values(n),m=Object.keys(n).map(o=>r||t.hasAttribute(o)?o:v[o]||(v[o]=o.replace(/([A-Z])/g,p=>\"-\"+p.toLowerCase())));s!==void 0&&(t.textContent=s);for(let o in i)if(i.hasOwnProperty(o)){let p=I(o,i[o]);k.test(o)?t.style.setProperty(o,p):t.style[o]=p}m.forEach((o,p)=>{t.setAttribute(o,d[p])}),u!==void 0&&(t.scrollTop=u),l!==void 0&&(t.scrollLeft=l),a!==void 0&&t.setAttribute(\"viewBox\",a)}var c={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},F=(t,e)=>t+e.charAt(0).toUpperCase()+e.substring(1),L=[\"Webkit\",\"Ms\",\"Moz\",\"O\"];c=Object.keys(c).reduce((t,e)=>(L.forEach(r=>t[F(r,e)]=t[e]),t),c);import{AnimatedObject as S}from\"@react-spring/animated\";import{is as b,each as f,toArray as E,eachProp as P,FluidValue as T,getFluidValue as w,callFluidObservers as j,hasFluidValue as A,addFluidObserver as R,removeFluidObserver as W}from\"@react-spring/shared\";var _=/^(matrix|translate|scale|rotate|skew)/,$=/^(translate)/,G=/^(rotate|skew)/,y=(t,e)=>b.num(t)&&t!==0?t+e:t,h=(t,e)=>b.arr(t)?t.every(r=>h(r,e)):b.num(t)?t===e:parseFloat(t)===e,g=class extends S{constructor({x:e,y:r,z:i,...s}){let u=[],l=[];(e||r||i)&&(u.push([e||0,r||0,i||0]),l.push(a=>[`translate3d(${a.map(n=>y(n,\"px\")).join(\",\")})`,h(a,0)])),P(s,(a,n)=>{if(n===\"transform\")u.push([a||\"\"]),l.push(d=>[d,d===\"\"]);else if(_.test(n)){if(delete s[n],b.und(a))return;let d=$.test(n)?\"px\":G.test(n)?\"deg\":\"\";u.push(E(a)),l.push(n===\"rotate3d\"?([m,o,p,O])=>[`rotate3d(${m},${o},${p},${y(O,d)})`,h(O,0)]:m=>[`${n}(${m.map(o=>y(o,d)).join(\",\")})`,h(m,n.startsWith(\"scale\")?1:0)])}}),u.length&&(s.transform=new x(u,l)),super(s)}},x=class extends T{constructor(r,i){super();this.inputs=r;this.transforms=i}_value=null;get(){return this._value||(this._value=this._get())}_get(){let r=\"\",i=!0;return f(this.inputs,(s,u)=>{let l=w(s[0]),[a,n]=this.transforms[u](b.arr(l)?l:s.map(w));r+=\" \"+a,i=i&&n}),i?\"none\":r}observerAdded(r){r==1&&f(this.inputs,i=>f(i,s=>A(s)&&R(s,this)))}observerRemoved(r){r==0&&f(this.inputs,i=>f(i,s=>A(s)&&W(s,this)))}eventObserved(r){r.type==\"change\"&&(this._value=null),j(this,r)}};var C=[\"a\",\"abbr\",\"address\",\"area\",\"article\",\"aside\",\"audio\",\"b\",\"base\",\"bdi\",\"bdo\",\"big\",\"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\",\"keygen\",\"label\",\"legend\",\"li\",\"link\",\"main\",\"map\",\"mark\",\"menu\",\"menuitem\",\"meta\",\"meter\",\"nav\",\"noscript\",\"object\",\"ol\",\"optgroup\",\"option\",\"output\",\"p\",\"param\",\"picture\",\"pre\",\"progress\",\"q\",\"rp\",\"rt\",\"ruby\",\"s\",\"samp\",\"script\",\"section\",\"select\",\"small\",\"source\",\"span\",\"strong\",\"style\",\"sub\",\"summary\",\"sup\",\"table\",\"tbody\",\"td\",\"textarea\",\"tfoot\",\"th\",\"thead\",\"time\",\"title\",\"tr\",\"track\",\"u\",\"ul\",\"var\",\"video\",\"wbr\",\"circle\",\"clipPath\",\"defs\",\"ellipse\",\"foreignObject\",\"g\",\"image\",\"line\",\"linearGradient\",\"mask\",\"path\",\"pattern\",\"polygon\",\"polyline\",\"radialGradient\",\"rect\",\"stop\",\"svg\",\"text\",\"tspan\"];export*from\"@react-spring/core\";M.assign({batchedUpdates:N,createStringInterpolator:U,colors:D});var q=H(C,{applyAnimatedValues:V,createAnimatedStyle:t=>new g(t),getComponentProps:({scrollTop:t,scrollLeft:e,...r})=>r}),it=q.animated;export{it as a,it as animated};\n","import { GriffelStylesUnsupportedCSSProperties, LookupItem, SequenceHash } from './types';\n\n// ----\n\n// Heads up!\n// These constants are global and will be shared between Griffel instances.\n// Any change in them should happen only in a MAJOR version. If it happens,\n// please change \"__NAMESPACE_PREFIX__\" to include a version.\n\nconst __GLOBAL__: any = typeof window === 'undefined' ? global : window;\nconst __NAMESPACE_PREFIX__ = '@griffel/';\n\nfunction getGlobalVar(name: string, defaultValue: T): T {\n if (!__GLOBAL__[Symbol.for(__NAMESPACE_PREFIX__ + name)]) {\n __GLOBAL__[Symbol.for(__NAMESPACE_PREFIX__ + name)] = defaultValue;\n }\n\n return __GLOBAL__[Symbol.for(__NAMESPACE_PREFIX__ + name)];\n}\n\n/** @internal */\nexport const DEBUG_RESET_CLASSES = getGlobalVar>('DEBUG_RESET_CLASSES', {});\n\n/** @internal */\nexport const DEFINITION_LOOKUP_TABLE = getGlobalVar>('DEFINITION_LOOKUP_TABLE', {});\n\n// ----\n\n/** @internal */\nexport const DATA_BUCKET_ATTR = 'data-make-styles-bucket';\n\n/** @internal */\nexport const HASH_PREFIX = 'f';\n\n/** @internal */\nexport const RESET_HASH_PREFIX = 'r';\n\n/** @internal */\nexport const SEQUENCE_HASH_LENGTH = 7;\n\n/** @internal */\nexport const SEQUENCE_PREFIX = '___';\n\n/** @internal */\nexport const DEBUG_SEQUENCE_SEPARATOR = '_';\n\n/** @internal */\nexport const SEQUENCE_SIZE =\n process.env.NODE_ENV === 'production'\n ? SEQUENCE_PREFIX.length + SEQUENCE_HASH_LENGTH\n : SEQUENCE_PREFIX.length + SEQUENCE_HASH_LENGTH + DEBUG_SEQUENCE_SEPARATOR.length + SEQUENCE_HASH_LENGTH;\n\n// indexes for values in LookupItem tuple\n\n/** @internal */\nexport const LOOKUP_DEFINITIONS_INDEX = 0;\n\n/** @internal */\nexport const LOOKUP_DIR_INDEX = 1;\n\n// This collection is a map simply for faster access when checking if a CSS property is unsupported\n/** @internal */\nexport const UNSUPPORTED_CSS_PROPERTIES: Record = {\n all: 1,\n animation: 1,\n background: 1,\n backgroundPosition: 1,\n border: 1,\n borderBlock: 1,\n borderBlockEnd: 1,\n borderBlockStart: 1,\n borderBottom: 1,\n borderColor: 1,\n borderImage: 1,\n borderInline: 1,\n borderInlineEnd: 1,\n borderInlineStart: 1,\n borderLeft: 1,\n borderRadius: 1,\n borderRight: 1,\n borderStyle: 1,\n borderTop: 1,\n borderWidth: 1,\n caret: 1,\n columns: 1,\n columnRule: 1,\n containIntrinsicSize: 1,\n container: 1,\n flex: 1,\n flexFlow: 1,\n font: 1,\n gap: 1,\n grid: 1,\n gridArea: 1,\n gridColumn: 1,\n gridRow: 1,\n gridTemplate: 1,\n inset: 1,\n insetBlock: 1,\n insetInline: 1,\n lineClamp: 1,\n listStyle: 1,\n margin: 1,\n marginBlock: 1,\n marginInline: 1,\n mask: 1,\n maskBorder: 1,\n motion: 1,\n offset: 1,\n outline: 1,\n overflow: 1,\n overscrollBehavior: 1,\n padding: 1,\n paddingBlock: 1,\n paddingInline: 1,\n placeItems: 1,\n placeContent: 1,\n placeSelf: 1,\n scrollMargin: 1,\n scrollMarginBlock: 1,\n scrollMarginInline: 1,\n scrollPadding: 1,\n scrollPaddingBlock: 1,\n scrollPaddingInline: 1,\n scrollSnapMargin: 1,\n scrollTimeline: 1,\n textDecoration: 1,\n textEmphasis: 1,\n transition: 1,\n} as const;\n","/* eslint-disable */\n// Inspired by https://github.com/garycourt/murmurhash-js\n// Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86\nfunction murmur2(str) {\n // 'm' and 'r' are mixing constants generated offline.\n // They're not really 'magic', they just happen to work well.\n // const m = 0x5bd1e995;\n // const r = 24;\n // Initialize the hash\n var h = 0; // Mix 4 bytes at a time into the hash\n\n var k,\n i = 0,\n len = str.length;\n\n for (; len >= 4; ++i, len -= 4) {\n k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;\n k =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);\n k ^=\n /* k >>> r: */\n k >>> 24;\n h =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Handle the last few bytes of the input array\n\n\n switch (len) {\n case 3:\n h ^= (str.charCodeAt(i + 2) & 0xff) << 16;\n\n case 2:\n h ^= (str.charCodeAt(i + 1) & 0xff) << 8;\n\n case 1:\n h ^= str.charCodeAt(i) & 0xff;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Do a few final mixes of the hash to ensure the last few\n // bytes are well-incorporated.\n\n\n h ^= h >>> 13;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n return ((h ^ h >>> 15) >>> 0).toString(36);\n}\n\nexport { murmur2 as default };\n","import hash from '@emotion/hash';\n\nimport { DEBUG_SEQUENCE_SEPARATOR, SEQUENCE_HASH_LENGTH, SEQUENCE_PREFIX } from '../../constants';\nimport { SequenceHash } from '../../types';\n\nfunction padEndHash(value: string): string {\n const hashLength = value.length;\n\n if (hashLength === SEQUENCE_HASH_LENGTH) {\n return value;\n }\n\n for (let i = hashLength; i < SEQUENCE_HASH_LENGTH; i++) {\n value += '0';\n }\n\n return value;\n}\n\nexport function hashSequence(\n classes: string,\n dir: 'ltr' | 'rtl',\n sequenceIds: (SequenceHash | undefined)[] = [],\n): SequenceHash {\n if (process.env.NODE_ENV === 'production') {\n return SEQUENCE_PREFIX + padEndHash(hash(classes + dir));\n }\n\n return (\n SEQUENCE_PREFIX +\n padEndHash(hash(classes + dir)) +\n DEBUG_SEQUENCE_SEPARATOR +\n padEndHash(hash(sequenceIds.join('')))\n );\n}\n","import { DEFINITION_LOOKUP_TABLE } from '../constants';\nimport { hashSequence } from './utils/hashSequence';\nimport { CSSClassesMapBySlot, CSSClassesMap, CSSClasses } from '../types';\n\n/**\n * Reduces a classname map for slot to a classname string. Uses classnames according to text directions.\n *\n * @private\n */\nexport function reduceToClassName(classMap: CSSClassesMap, dir: 'ltr' | 'rtl'): string {\n let className = '';\n\n // eslint-disable-next-line guard-for-in\n for (const propertyHash in classMap) {\n const classNameMapping: CSSClasses = classMap[propertyHash];\n\n if (classNameMapping) {\n const hasRTLClassName = Array.isArray(classNameMapping);\n\n if (dir === 'rtl') {\n className += (hasRTLClassName ? classNameMapping[1] : classNameMapping) + ' ';\n } else {\n className += (hasRTLClassName ? classNameMapping[0] : classNameMapping) + ' ';\n }\n }\n }\n\n return className.slice(0, -1);\n}\n\n/**\n * Reduces classname maps for slots to classname strings. Registers them in a definition cache to be used by\n * `mergeClasses()`.\n *\n * @internal\n */\nexport function reduceToClassNameForSlots(\n classesMapBySlot: CSSClassesMapBySlot,\n dir: 'ltr' | 'rtl',\n): Record {\n const classNamesForSlots = {} as Record;\n\n // eslint-disable-next-line guard-for-in\n for (const slotName in classesMapBySlot) {\n const slotClasses = reduceToClassName(classesMapBySlot[slotName], dir);\n\n // Handles a case when there are no classes in a set i.e. \"makeStyles({ root: {} })\"\n if (slotClasses === '') {\n classNamesForSlots[slotName] = '';\n continue;\n }\n\n const sequenceHash = hashSequence(slotClasses, dir);\n const resultSlotClasses = sequenceHash + ' ' + slotClasses;\n\n DEFINITION_LOOKUP_TABLE[sequenceHash] = [classesMapBySlot[slotName], dir];\n classNamesForSlots[slotName] = resultSlotClasses;\n }\n\n return classNamesForSlots;\n}\n","import { DATA_BUCKET_ATTR } from '../constants';\nimport { IsomorphicStyleSheet, StyleBucketName } from '../types';\n\nexport function createIsomorphicStyleSheet(\n styleElement: HTMLStyleElement | undefined,\n bucketName: StyleBucketName,\n elementAttributes: Record,\n): IsomorphicStyleSheet {\n // no CSSStyleSheet in SSR, just append rules here for server render\n const __cssRulesForSSR: string[] = [];\n\n elementAttributes[DATA_BUCKET_ATTR] = bucketName;\n if (styleElement) {\n for (const attrName in elementAttributes) {\n styleElement.setAttribute(attrName, elementAttributes[attrName]);\n }\n }\n\n function insertRule(rule: string) {\n if (styleElement?.sheet) {\n return styleElement.sheet.insertRule(rule, styleElement.sheet.cssRules.length);\n }\n\n return __cssRulesForSSR.push(rule);\n }\n\n return {\n elementAttributes,\n insertRule,\n element: styleElement,\n bucketName,\n cssRules() {\n if (styleElement?.sheet) {\n return Array.from(styleElement.sheet.cssRules).map(cssRule => cssRule.cssText);\n }\n\n return __cssRulesForSSR;\n },\n };\n}\n\nexport function createIsomorphicStyleSheetFromElement(element: HTMLStyleElement) {\n const elementAttributes = Array.from(element.attributes).reduce((acc, attr) => {\n acc[attr.name] = attr.value;\n return acc;\n }, {} as Record);\n const stylesheet = createIsomorphicStyleSheet(\n element,\n elementAttributes[DATA_BUCKET_ATTR] as StyleBucketName,\n elementAttributes,\n );\n return stylesheet;\n}\n","import { DATA_BUCKET_ATTR } from '../constants';\nimport { GriffelRenderer, IsomorphicStyleSheet, StyleBucketName } from '../types';\nimport { createIsomorphicStyleSheet } from './createIsomorphicStyleSheet';\n\n/**\n * Ordered style buckets using their short pseudo name.\n *\n * @internal\n */\nexport const styleBucketOrdering: StyleBucketName[] = [\n // reset styles\n 'r',\n // catch-all\n 'd',\n // link\n 'l',\n // visited\n 'v',\n // focus-within\n 'w',\n // focus\n 'f',\n // focus-visible\n 'i',\n // hover\n 'h',\n // active\n 'a',\n // keyframes\n 'k',\n // at-rules\n 't',\n // @media rules\n 'm',\n // @container rules\n 'c',\n];\n\n// avoid repeatedly calling `indexOf`to determine order during new insertions\nconst styleBucketOrderingMap = styleBucketOrdering.reduce((acc, cur, j) => {\n acc[cur as StyleBucketName] = j;\n return acc;\n}, {} as Record);\n\n/**\n * Lazily adds a `